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,400
zeroem/ZeroemCurlBundle
HttpKernel/RemoteHttpKernel.php
RemoteHttpKernel.handleRaw
private function handleRaw(Request $request) { $curl = $this->lastCurlRequest = $this->getCurlRequest(); $curl->setOptionArray( array( CURLOPT_URL=>$request->getUri(), CURLOPT_HTTPHEADER=>$this->buildHeadersArray($request->headers), CURLINFO_HE...
php
private function handleRaw(Request $request) { $curl = $this->lastCurlRequest = $this->getCurlRequest(); $curl->setOptionArray( array( CURLOPT_URL=>$request->getUri(), CURLOPT_HTTPHEADER=>$this->buildHeadersArray($request->headers), CURLINFO_HE...
[ "private", "function", "handleRaw", "(", "Request", "$", "request", ")", "{", "$", "curl", "=", "$", "this", "->", "lastCurlRequest", "=", "$", "this", "->", "getCurlRequest", "(", ")", ";", "$", "curl", "->", "setOptionArray", "(", "array", "(", "CURLOP...
Execute a Request object via cURL @param Request $request the request to execute @param array $options additional curl options to set/override @return Response @throws CurlErrorException
[ "Execute", "a", "Request", "object", "via", "cURL" ]
1045e2093bec5a013ff9458828721e581725f1a0
https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/HttpKernel/RemoteHttpKernel.php#L100-L150
33,401
zeroem/ZeroemCurlBundle
HttpKernel/RemoteHttpKernel.php
RemoteHttpKernel.setPostFields
private function setPostFields(CurlRequest $curl, Request $request) { $postfields = null; $content = $request->getContent(); if (!empty($content)) { $postfields = $content; } else if (count($request->request->all()) > 0) { $postfields = $request->request->all(); ...
php
private function setPostFields(CurlRequest $curl, Request $request) { $postfields = null; $content = $request->getContent(); if (!empty($content)) { $postfields = $content; } else if (count($request->request->all()) > 0) { $postfields = $request->request->all(); ...
[ "private", "function", "setPostFields", "(", "CurlRequest", "$", "curl", ",", "Request", "$", "request", ")", "{", "$", "postfields", "=", "null", ";", "$", "content", "=", "$", "request", "->", "getContent", "(", ")", ";", "if", "(", "!", "empty", "("...
Populate the POSTFIELDS option @param CurlRequest $curl cURL request object @param Request $request the Request object we're populating
[ "Populate", "the", "POSTFIELDS", "option" ]
1045e2093bec5a013ff9458828721e581725f1a0
https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/HttpKernel/RemoteHttpKernel.php#L159-L170
33,402
silverorange/swat
Swat/SwatBooleanCellRenderer.php
SwatBooleanCellRenderer.setFromStock
public function setFromStock($stock_id, $overwrite_properties = true) { $content_type = 'text/plain'; switch ($stock_id) { case 'yes-no': $false_content = Swat::_('No'); $true_content = Swat::_('Yes'); break; case 'check-only'...
php
public function setFromStock($stock_id, $overwrite_properties = true) { $content_type = 'text/plain'; switch ($stock_id) { case 'yes-no': $false_content = Swat::_('No'); $true_content = Swat::_('Yes'); break; case 'check-only'...
[ "public", "function", "setFromStock", "(", "$", "stock_id", ",", "$", "overwrite_properties", "=", "true", ")", "{", "$", "content_type", "=", "'text/plain'", ";", "switch", "(", "$", "stock_id", ")", "{", "case", "'yes-no'", ":", "$", "false_content", "=", ...
Sets the values of this boolean cell renderer to a stock type Valid stock type ids are: - check-only - yes-no @param string $stock_id the identifier of the stock type to use. @param boolean $overwrite_properties optional. Whether to overwrite properties if they are already set. By default, properties are overwritten...
[ "Sets", "the", "values", "of", "this", "boolean", "cell", "renderer", "to", "a", "stock", "type" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatBooleanCellRenderer.php#L78-L116
33,403
silverorange/swat
Swat/SwatBooleanCellRenderer.php
SwatBooleanCellRenderer.displayCheck
protected function displayCheck() { $image_tag = new SwatHtmlTag('img'); $image_tag->src = 'packages/swat/images/check.png'; $image_tag->alt = Swat::_('Yes'); $image_tag->height = '14'; $image_tag->width = '14'; $image_tag->display(); }
php
protected function displayCheck() { $image_tag = new SwatHtmlTag('img'); $image_tag->src = 'packages/swat/images/check.png'; $image_tag->alt = Swat::_('Yes'); $image_tag->height = '14'; $image_tag->width = '14'; $image_tag->display(); }
[ "protected", "function", "displayCheck", "(", ")", "{", "$", "image_tag", "=", "new", "SwatHtmlTag", "(", "'img'", ")", ";", "$", "image_tag", "->", "src", "=", "'packages/swat/images/check.png'", ";", "$", "image_tag", "->", "alt", "=", "Swat", "::", "_", ...
Renders a checkmark image for this boolean cell renderer This is used when this cell renderer has a {@link SwatBooleanCellRenderer::$stock_id} of 'check-only'.
[ "Renders", "a", "checkmark", "image", "for", "this", "boolean", "cell", "renderer" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatBooleanCellRenderer.php#L211-L219
33,404
rollun-com/rollun-datastore
src/DataStore/src/DataStore/Cacheable.php
Cacheable.update
public function update($itemData, $createIfAbsent = false) { if ($createIfAbsent) { trigger_error("Option 'createIfAbsent' is no more use.", E_DEPRECATED); } if (method_exists($this->dataSource, "update")) { return $this->dataSource->update($itemData, $createIfAbsent...
php
public function update($itemData, $createIfAbsent = false) { if ($createIfAbsent) { trigger_error("Option 'createIfAbsent' is no more use.", E_DEPRECATED); } if (method_exists($this->dataSource, "update")) { return $this->dataSource->update($itemData, $createIfAbsent...
[ "public", "function", "update", "(", "$", "itemData", ",", "$", "createIfAbsent", "=", "false", ")", "{", "if", "(", "$", "createIfAbsent", ")", "{", "trigger_error", "(", "\"Option 'createIfAbsent' is no more use.\"", ",", "E_DEPRECATED", ")", ";", "}", "if", ...
By default, update existing Item. If item with PrimaryKey == $item["id"] is existing in store, item will update. Fields which don't present in $item will not change in item in store.<br> Method will return updated item<br> <br> If $item["id"] isn't set - method will throw exception.<br> <br> If item with PrimaryKey ==...
[ "By", "default", "update", "existing", "Item", "." ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/Cacheable.php#L165-L176
33,405
rollun-com/rollun-datastore
src/DataStore/src/DataStore/Cacheable.php
Cacheable.publicdelete
public function publicdelete($id) { if (method_exists($this->dataSource, "delete")) { return $this->dataSource->delete($id); } else { throw new DataStoreException("Refreshable don't haw method delete"); } }
php
public function publicdelete($id) { if (method_exists($this->dataSource, "delete")) { return $this->dataSource->delete($id); } else { throw new DataStoreException("Refreshable don't haw method delete"); } }
[ "public", "function", "publicdelete", "(", "$", "id", ")", "{", "if", "(", "method_exists", "(", "$", "this", "->", "dataSource", ",", "\"delete\"", ")", ")", "{", "return", "$", "this", "->", "dataSource", "->", "delete", "(", "$", "id", ")", ";", "...
Delete Item by id. Method do nothing if item with that id is absent. @param int|string $id PrimaryKey @return int number of deleted items: 0 , 1 or null if object doesn't support it @throws DataStoreException
[ "Delete", "Item", "by", "id", ".", "Method", "do", "nothing", "if", "item", "with", "that", "id", "is", "absent", "." ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/Cacheable.php#L185-L192
33,406
brainworxx/kreXX
src/View/Output/File.php
File.finalize
public function finalize() { // Output our chunks. // Every output is split into 4 chunk strings (header, messages, // data, footer). foreach ($this->chunkStrings as $chunkString) { // Save everything to the file after we are done. $this->pool->chunks->saveDec...
php
public function finalize() { // Output our chunks. // Every output is split into 4 chunk strings (header, messages, // data, footer). foreach ($this->chunkStrings as $chunkString) { // Save everything to the file after we are done. $this->pool->chunks->saveDec...
[ "public", "function", "finalize", "(", ")", "{", "// Output our chunks.", "// Every output is split into 4 chunk strings (header, messages,", "// data, footer).", "foreach", "(", "$", "this", "->", "chunkStrings", "as", "$", "chunkString", ")", "{", "// Save everything to the...
Creating the logfile after the analysis.
[ "Creating", "the", "logfile", "after", "the", "analysis", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/File.php#L79-L88
33,407
TeknooSoftware/states
demo/Acme/Extendable/GrandDaughter/GrandDaughter.php
GrandDaughter.listMethodsByStates
public function listMethodsByStates() { $methodsList = array(); foreach ($this->getStatesList() as $stateName => $stateContainer) { $methodsList[$stateName] = $stateContainer->listMethods(); } ksort($methodsList); return $methodsList; }
php
public function listMethodsByStates() { $methodsList = array(); foreach ($this->getStatesList() as $stateName => $stateContainer) { $methodsList[$stateName] = $stateContainer->listMethods(); } ksort($methodsList); return $methodsList; }
[ "public", "function", "listMethodsByStates", "(", ")", "{", "$", "methodsList", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "getStatesList", "(", ")", "as", "$", "stateName", "=>", "$", "stateContainer", ")", "{", "$", "methodsList", ...
Return the list of available state in this class. @return array
[ "Return", "the", "list", "of", "available", "state", "in", "this", "class", "." ]
0c675b768781ee3a3a15c2663cffec5d50c1d5fd
https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/demo/Acme/Extendable/GrandDaughter/GrandDaughter.php#L53-L63
33,408
silverorange/swat
Swat/SwatProgressBar.php
SwatProgressBar.display
public function display() { if (!$this->visible) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $div_tag->open(); $this->displayBar(); $t...
php
public function display() { if (!$this->visible) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $div_tag->open(); $this->displayBar(); $t...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ";", "$", "div_tag", "=", "new", "SwatHtmlTag", "(", "'div'", ")", ";", "$", "div_tag",...
Displays this progress bar @throws SwatException if this progress bar's <i>$length</i> property is not a valid cascading style-sheet dimension.
[ "Displays", "this", "progress", "bar" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatProgressBar.php#L153-L173
33,409
silverorange/swat
Swat/SwatProgressBar.php
SwatProgressBar.displayBar
protected function displayBar() { // ensure length is in cascading style-sheet units $dimension_pattern = '/([0-9]+(%|p[xtc]|e[mx]|in|[cm]m|)|auto)/'; if (preg_match($dimension_pattern, $this->length) === 0) { throw new SwatException( sprintf( ...
php
protected function displayBar() { // ensure length is in cascading style-sheet units $dimension_pattern = '/([0-9]+(%|p[xtc]|e[mx]|in|[cm]m|)|auto)/'; if (preg_match($dimension_pattern, $this->length) === 0) { throw new SwatException( sprintf( ...
[ "protected", "function", "displayBar", "(", ")", "{", "// ensure length is in cascading style-sheet units", "$", "dimension_pattern", "=", "'/([0-9]+(%|p[xtc]|e[mx]|in|[cm]m|)|auto)/'", ";", "if", "(", "preg_match", "(", "$", "dimension_pattern", ",", "$", "this", "->", "...
Displays the bar part of this progress bar @throws SwatException if this progress bar's <i>$length</i> property is not a valid cascading style-sheet dimension.
[ "Displays", "the", "bar", "part", "of", "this", "progress", "bar" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatProgressBar.php#L184-L263
33,410
silverorange/swat
Swat/SwatProgressBar.php
SwatProgressBar.displayText
protected function displayText() { if ($this->text === null) { // still show an empty span if there is no text for this // progress bar $text = ''; } else { if ($this->text_value === null) { $text = $this->text; } elseif (is...
php
protected function displayText() { if ($this->text === null) { // still show an empty span if there is no text for this // progress bar $text = ''; } else { if ($this->text_value === null) { $text = $this->text; } elseif (is...
[ "protected", "function", "displayText", "(", ")", "{", "if", "(", "$", "this", "->", "text", "===", "null", ")", "{", "// still show an empty span if there is no text for this", "// progress bar", "$", "text", "=", "''", ";", "}", "else", "{", "if", "(", "$", ...
Displays the text part of this progress bar
[ "Displays", "the", "text", "part", "of", "this", "progress", "bar" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatProgressBar.php#L271-L292
33,411
silverorange/swat
Swat/SwatProgressBar.php
SwatProgressBar.getInlineJavaScript
protected function getInlineJavaScript() { return sprintf( "var %s_obj = new SwatProgressBar('%s', %s, %s);", $this->id, $this->id, $this->orientation, $this->value ); }
php
protected function getInlineJavaScript() { return sprintf( "var %s_obj = new SwatProgressBar('%s', %s, %s);", $this->id, $this->id, $this->orientation, $this->value ); }
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "return", "sprintf", "(", "\"var %s_obj = new SwatProgressBar('%s', %s, %s);\"", ",", "$", "this", "->", "id", ",", "$", "this", "->", "id", ",", "$", "this", "->", "orientation", ",", "$", "this", ...
Gets inline JavaScript for this progress bar @return string inline JavaScript for this progress bar.
[ "Gets", "inline", "JavaScript", "for", "this", "progress", "bar" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatProgressBar.php#L302-L311
33,412
neos/composer-plugin
Classes/Installer.php
Installer.camelCaseFlowPackageType
protected function camelCaseFlowPackageType($flowPackageType) { $packageTypeParts = explode('-', $flowPackageType); $packageTypeParts = array_map('ucfirst', $packageTypeParts); return implode('', $packageTypeParts); }
php
protected function camelCaseFlowPackageType($flowPackageType) { $packageTypeParts = explode('-', $flowPackageType); $packageTypeParts = array_map('ucfirst', $packageTypeParts); return implode('', $packageTypeParts); }
[ "protected", "function", "camelCaseFlowPackageType", "(", "$", "flowPackageType", ")", "{", "$", "packageTypeParts", "=", "explode", "(", "'-'", ",", "$", "flowPackageType", ")", ";", "$", "packageTypeParts", "=", "array_map", "(", "'ucfirst'", ",", "$", "packag...
Camel case the flow package type. "framework" => "Framework" "some-project" => "SomeProject" @param string $flowPackageType @return string
[ "Camel", "case", "the", "flow", "package", "type", ".", "framework", "=", ">", "Framework", "some", "-", "project", "=", ">", "SomeProject" ]
fe4a2b526cc784032d53f6229ef34d7304a5d13d
https://github.com/neos/composer-plugin/blob/fe4a2b526cc784032d53f6229ef34d7304a5d13d/Classes/Installer.php#L83-L88
33,413
neos/composer-plugin
Classes/Installer.php
Installer.replacePlaceholdersInPath
protected function replacePlaceholdersInPath($path, $arguments) { foreach ($arguments as $argumentName => $argumentValue) { $path = str_replace('{' . $argumentName . '}', $argumentValue, $path); } return $path; }
php
protected function replacePlaceholdersInPath($path, $arguments) { foreach ($arguments as $argumentName => $argumentValue) { $path = str_replace('{' . $argumentName . '}', $argumentValue, $path); } return $path; }
[ "protected", "function", "replacePlaceholdersInPath", "(", "$", "path", ",", "$", "arguments", ")", "{", "foreach", "(", "$", "arguments", "as", "$", "argumentName", "=>", "$", "argumentValue", ")", "{", "$", "path", "=", "str_replace", "(", "'{'", ".", "$...
Replace placeholders in the install path. @param string $path @param array $arguments @return string
[ "Replace", "placeholders", "in", "the", "install", "path", "." ]
fe4a2b526cc784032d53f6229ef34d7304a5d13d
https://github.com/neos/composer-plugin/blob/fe4a2b526cc784032d53f6229ef34d7304a5d13d/Classes/Installer.php#L97-L104
33,414
neos/composer-plugin
Classes/Installer.php
Installer.getFlowPackageType
protected function getFlowPackageType($composerPackageType) { foreach ($this->allowedPackageTypePrefixes as $allowedPackagePrefix) { $packagePrefixPosition = strpos($composerPackageType, $allowedPackagePrefix); if ($packagePrefixPosition === 0) { return substr($compos...
php
protected function getFlowPackageType($composerPackageType) { foreach ($this->allowedPackageTypePrefixes as $allowedPackagePrefix) { $packagePrefixPosition = strpos($composerPackageType, $allowedPackagePrefix); if ($packagePrefixPosition === 0) { return substr($compos...
[ "protected", "function", "getFlowPackageType", "(", "$", "composerPackageType", ")", "{", "foreach", "(", "$", "this", "->", "allowedPackageTypePrefixes", "as", "$", "allowedPackagePrefix", ")", "{", "$", "packagePrefixPosition", "=", "strpos", "(", "$", "composerPa...
Gets the Flow package type based on the given composer package type. "typo3-flow-framework" would return "framework". Returns FALSE if the given composerPackageType is not a Flow package type. @param string $composerPackageType @return bool|string
[ "Gets", "the", "Flow", "package", "type", "based", "on", "the", "given", "composer", "package", "type", ".", "typo3", "-", "flow", "-", "framework", "would", "return", "framework", ".", "Returns", "FALSE", "if", "the", "given", "composerPackageType", "is", "...
fe4a2b526cc784032d53f6229ef34d7304a5d13d
https://github.com/neos/composer-plugin/blob/fe4a2b526cc784032d53f6229ef34d7304a5d13d/Classes/Installer.php#L113-L123
33,415
brainworxx/kreXX
src/Analyse/Callback/Analyse/Objects.php
Objects.callMe
public function callMe() { $output = $this->pool->render->renderSingeChildHr() . $this->dispatchStartEvent(); $ref = $this->parameters[static::PARAM_REF] = new ReflectionClass($this->parameters[static::PARAM_DATA]); // Dumping public properties. $output .= $this->dumpStuff('Brainwo...
php
public function callMe() { $output = $this->pool->render->renderSingeChildHr() . $this->dispatchStartEvent(); $ref = $this->parameters[static::PARAM_REF] = new ReflectionClass($this->parameters[static::PARAM_DATA]); // Dumping public properties. $output .= $this->dumpStuff('Brainwo...
[ "public", "function", "callMe", "(", ")", "{", "$", "output", "=", "$", "this", "->", "pool", "->", "render", "->", "renderSingeChildHr", "(", ")", ".", "$", "this", "->", "dispatchStartEvent", "(", ")", ";", "$", "ref", "=", "$", "this", "->", "para...
Starts the dump of an object. @throws \ReflectionException @return string The generated markup.
[ "Starts", "the", "dump", "of", "an", "object", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects.php#L66-L118
33,416
brainworxx/kreXX
src/Analyse/Callback/Analyse/Objects.php
Objects.dumpStuff
protected function dumpStuff($classname) { return $this->pool ->createClass($classname) ->setParams($this->parameters) ->callMe(); }
php
protected function dumpStuff($classname) { return $this->pool ->createClass($classname) ->setParams($this->parameters) ->callMe(); }
[ "protected", "function", "dumpStuff", "(", "$", "classname", ")", "{", "return", "$", "this", "->", "pool", "->", "createClass", "(", "$", "classname", ")", "->", "setParams", "(", "$", "this", "->", "parameters", ")", "->", "callMe", "(", ")", ";", "}...
Dumping stuff is everywhere the same, only the callback class is changing. @var string $classname The name of the callback class we are using. @return string The generated html markup.
[ "Dumping", "stuff", "is", "everywhere", "the", "same", "only", "the", "callback", "class", "is", "changing", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects.php#L129-L135
33,417
silverorange/swat
Swat/SwatContainer.php
SwatContainer.replace
public function replace(SwatWidget $widget, SwatWidget $new_widget) { foreach ($this->children as $key => $child_widget) { if ($child_widget === $widget) { $this->children[$key] = $new_widget; $new_widget->parent = $this; $widget->parent = null; ...
php
public function replace(SwatWidget $widget, SwatWidget $new_widget) { foreach ($this->children as $key => $child_widget) { if ($child_widget === $widget) { $this->children[$key] = $new_widget; $new_widget->parent = $this; $widget->parent = null; ...
[ "public", "function", "replace", "(", "SwatWidget", "$", "widget", ",", "SwatWidget", "$", "new_widget", ")", "{", "foreach", "(", "$", "this", "->", "children", "as", "$", "key", "=>", "$", "child_widget", ")", "{", "if", "(", "$", "child_widget", "==="...
Replace a widget Replaces a child widget in this container. The parent of the removed widget is set to null. @param SwatWidget $widget a reference to the widget to be replaced. @param SwatWidget $widget a reference to the new widget. @return SwatWidget a reference to the removed widget, or null if the widget is not ...
[ "Replace", "a", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L86-L106
33,418
silverorange/swat
Swat/SwatContainer.php
SwatContainer.remove
public function remove(SwatWidget $widget) { foreach ($this->children as $key => $child_widget) { if ($child_widget === $widget) { // use array_splice here instead of unset in order to re-index // the array keys array_splice($this->children, $key, ...
php
public function remove(SwatWidget $widget) { foreach ($this->children as $key => $child_widget) { if ($child_widget === $widget) { // use array_splice here instead of unset in order to re-index // the array keys array_splice($this->children, $key, ...
[ "public", "function", "remove", "(", "SwatWidget", "$", "widget", ")", "{", "foreach", "(", "$", "this", "->", "children", "as", "$", "key", "=>", "$", "child_widget", ")", "{", "if", "(", "$", "child_widget", "===", "$", "widget", ")", "{", "// use ar...
Removes a widget Removes a child widget from this container. The parent of the widget is set to null. @param SwatWidget $widget a reference to the widget to remove. @return SwatWidget a reference to the removed widget, or null if the widget is not found.
[ "Removes", "a", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L122-L139
33,419
silverorange/swat
Swat/SwatContainer.php
SwatContainer.packStart
public function packStart(SwatWidget $widget) { if ($widget->parent !== null) { throw new SwatException( 'Attempting to add a widget that already has a parent.' ); } array_unshift($this->children, $widget); $widget->parent = $this; if...
php
public function packStart(SwatWidget $widget) { if ($widget->parent !== null) { throw new SwatException( 'Attempting to add a widget that already has a parent.' ); } array_unshift($this->children, $widget); $widget->parent = $this; if...
[ "public", "function", "packStart", "(", "SwatWidget", "$", "widget", ")", "{", "if", "(", "$", "widget", "->", "parent", "!==", "null", ")", "{", "throw", "new", "SwatException", "(", "'Attempting to add a widget that already has a parent.'", ")", ";", "}", "arr...
Adds a widget to start Adds a widget to the start of the list of widgets in this container. @param SwatWidget $widget a reference to the widget to add.
[ "Adds", "a", "widget", "to", "start" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L151-L167
33,420
silverorange/swat
Swat/SwatContainer.php
SwatContainer.insertBefore
public function insertBefore(SwatWidget $widget, SwatWidget $child) { if ($widget->parent !== null) { throw new SwatException( 'Attempting to add a widget that already has a parent.' ); } if ($child->parent !== $this) { throw new SwatExcep...
php
public function insertBefore(SwatWidget $widget, SwatWidget $child) { if ($widget->parent !== null) { throw new SwatException( 'Attempting to add a widget that already has a parent.' ); } if ($child->parent !== $this) { throw new SwatExcep...
[ "public", "function", "insertBefore", "(", "SwatWidget", "$", "widget", ",", "SwatWidget", "$", "child", ")", "{", "if", "(", "$", "widget", "->", "parent", "!==", "null", ")", "{", "throw", "new", "SwatException", "(", "'Attempting to add a widget that already ...
Adds a widget to this container before another widget @param SwatWidget $widget a reference to the widget to add. @param SwatWidget $child a reference to the widget to add before.
[ "Adds", "a", "widget", "to", "this", "container", "before", "another", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L178-L209
33,421
silverorange/swat
Swat/SwatContainer.php
SwatContainer.packEnd
public function packEnd(SwatWidget $widget) { if ($widget->parent !== null) { throw new SwatException( 'Attempting to add a widget that already has a parent.' ); } $this->children[] = $widget; $widget->parent = $this; if ($widget->id ...
php
public function packEnd(SwatWidget $widget) { if ($widget->parent !== null) { throw new SwatException( 'Attempting to add a widget that already has a parent.' ); } $this->children[] = $widget; $widget->parent = $this; if ($widget->id ...
[ "public", "function", "packEnd", "(", "SwatWidget", "$", "widget", ")", "{", "if", "(", "$", "widget", "->", "parent", "!==", "null", ")", "{", "throw", "new", "SwatException", "(", "'Attempting to add a widget that already has a parent.'", ")", ";", "}", "$", ...
Adds a widget to end Adds a widget to the end of the list of widgets in this container. @param SwatWidget $widget a reference to the widget to add.
[ "Adds", "a", "widget", "to", "end" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L221-L237
33,422
silverorange/swat
Swat/SwatContainer.php
SwatContainer.getChild
public function getChild($id) { if (array_key_exists($id, $this->children_by_id)) { return $this->children_by_id[$id]; } else { return null; } }
php
public function getChild($id) { if (array_key_exists($id, $this->children_by_id)) { return $this->children_by_id[$id]; } else { return null; } }
[ "public", "function", "getChild", "(", "$", "id", ")", "{", "if", "(", "array_key_exists", "(", "$", "id", ",", "$", "this", "->", "children_by_id", ")", ")", "{", "return", "$", "this", "->", "children_by_id", "[", "$", "id", "]", ";", "}", "else", ...
Gets a child widget Retrieves a widget from the list of widgets in the container based on the unique identifier of the widget. @param string $id the unique id of the widget to look for. @return SwatWidget the found widget or null if not found.
[ "Gets", "a", "child", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L252-L259
33,423
silverorange/swat
Swat/SwatContainer.php
SwatContainer.getFirst
public function getFirst() { if (count($this->children)) { reset($this->children); return current($this->children); } else { return null; } }
php
public function getFirst() { if (count($this->children)) { reset($this->children); return current($this->children); } else { return null; } }
[ "public", "function", "getFirst", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "children", ")", ")", "{", "reset", "(", "$", "this", "->", "children", ")", ";", "return", "current", "(", "$", "this", "->", "children", ")", ";", "}", ...
Gets the first child widget Retrieves the first child widget from the list of widgets in the container. @return SwatWidget the first widget in this container or null if there are no widgets in this container.
[ "Gets", "the", "first", "child", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L273-L281
33,424
silverorange/swat
Swat/SwatContainer.php
SwatContainer.getChildren
public function getChildren($class_name = null) { if ($class_name === null) { return $this->children; } $out = array(); foreach ($this->children as $child_widget) { if ($child_widget instanceof $class_name) { $out[] = $child_widget; ...
php
public function getChildren($class_name = null) { if ($class_name === null) { return $this->children; } $out = array(); foreach ($this->children as $child_widget) { if ($child_widget instanceof $class_name) { $out[] = $child_widget; ...
[ "public", "function", "getChildren", "(", "$", "class_name", "=", "null", ")", "{", "if", "(", "$", "class_name", "===", "null", ")", "{", "return", "$", "this", "->", "children", ";", "}", "$", "out", "=", "array", "(", ")", ";", "foreach", "(", "...
Gets all child widgets Retrieves an array of all widgets directly contained by this container. @param string $class_name optional class name. If set, only widgets that are instances of <code>$class_name</code> are returned. @return array the child widgets of this container.
[ "Gets", "all", "child", "widgets" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L297-L312
33,425
silverorange/swat
Swat/SwatContainer.php
SwatContainer.getDescendantStates
public function getDescendantStates() { $states = array(); foreach ($this->getDescendants('SwatState') as $id => $object) { $states[$id] = $object->getState(); } return $states; }
php
public function getDescendantStates() { $states = array(); foreach ($this->getDescendants('SwatState') as $id => $object) { $states[$id] = $object->getState(); } return $states; }
[ "public", "function", "getDescendantStates", "(", ")", "{", "$", "states", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "getDescendants", "(", "'SwatState'", ")", "as", "$", "id", "=>", "$", "object", ")", "{", "$", "states", "[", ...
Gets descendant states Retrieves an array of states of all stateful UI-objects in the widget subtree below this container. @return array an array of UI-object states with UI-object identifiers as array keys.
[ "Gets", "descendant", "states" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L414-L423
33,426
silverorange/swat
Swat/SwatContainer.php
SwatContainer.setDescendantStates
public function setDescendantStates(array $states) { foreach ($this->getDescendants('SwatState') as $id => $object) { if (isset($states[$id])) { $object->setState($states[$id]); } } }
php
public function setDescendantStates(array $states) { foreach ($this->getDescendants('SwatState') as $id => $object) { if (isset($states[$id])) { $object->setState($states[$id]); } } }
[ "public", "function", "setDescendantStates", "(", "array", "$", "states", ")", "{", "foreach", "(", "$", "this", "->", "getDescendants", "(", "'SwatState'", ")", "as", "$", "id", "=>", "$", "object", ")", "{", "if", "(", "isset", "(", "$", "states", "[...
Sets descendant states Sets states on all stateful UI-objects in the widget subtree below this container. @param array $states an array of UI-object states with UI-object identifiers as array keys.
[ "Sets", "descendant", "states" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L437-L444
33,427
silverorange/swat
Swat/SwatContainer.php
SwatContainer.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); foreach ($this->children as $child_widget) { $set->addEntrySet($child_widget->getHtmlHeadEntrySet()); } return $set; }
php
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); foreach ($this->children as $child_widget) { $set->addEntrySet($child_widget->getHtmlHeadEntrySet()); } return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getHtmlHeadEntrySet", "(", ")", ";", "foreach", "(", "$", "this", "->", "children", "as", "$", "child_widget", ")", "{", "$", "set", "->", "addEntrySet", "(", "...
Gets the SwatHtmlHeadEntry objects needed by this container @return SwatHtmlHeadEntrySet the {@link SwatHtmlHeadEntry} objects needed by this container. @see SwatUIObject::getHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "container" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L571-L580
33,428
silverorange/swat
Swat/SwatContainer.php
SwatContainer.getAvailableHtmlHeadEntrySet
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); foreach ($this->children as $child_widget) { $set->addEntrySet($child_widget->getAvailableHtmlHeadEntrySet()); } return $set; }
php
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); foreach ($this->children as $child_widget) { $set->addEntrySet($child_widget->getAvailableHtmlHeadEntrySet()); } return $set; }
[ "public", "function", "getAvailableHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getAvailableHtmlHeadEntrySet", "(", ")", ";", "foreach", "(", "$", "this", "->", "children", "as", "$", "child_widget", ")", "{", "$", "set", "->", "addEnt...
Gets the SwatHtmlHeadEntry objects that may be needed by this container @return SwatHtmlHeadEntrySet the {@link SwatHtmlHeadEntry} objects that may be needed by this container. @see SwatUIObject::getAvailableHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "that", "may", "be", "needed", "by", "this", "container" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L593-L602
33,429
silverorange/swat
Swat/SwatContainer.php
SwatContainer.sendAddNotifySignal
protected function sendAddNotifySignal($widget) { $this->notifyOfAdd($widget); if ($this->parent !== null && $this->parent instanceof SwatContainer) { $this->parent->sendAddNotifySignal($widget); } }
php
protected function sendAddNotifySignal($widget) { $this->notifyOfAdd($widget); if ($this->parent !== null && $this->parent instanceof SwatContainer) { $this->parent->sendAddNotifySignal($widget); } }
[ "protected", "function", "sendAddNotifySignal", "(", "$", "widget", ")", "{", "$", "this", "->", "notifyOfAdd", "(", "$", "widget", ")", ";", "if", "(", "$", "this", "->", "parent", "!==", "null", "&&", "$", "this", "->", "parent", "instanceof", "SwatCon...
Sends the notification signal up the widget tree This container is notified of the added widget and then this method is called on the container parent. @param SwatWidget $widget the widget that has been added.
[ "Sends", "the", "notification", "signal", "up", "the", "widget", "tree" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatContainer.php#L725-L732
33,430
silverorange/swat
Swat/SwatSimpleColorEntry.php
SwatSimpleColorEntry.getInlineJavaScript
protected function getInlineJavaScript() { $javascript = parent::getInlineJavaScript(); $colors = "'" . implode("', '", $this->colors) . "'"; if ($this->none_option) { $none_option = $this->none_option_title === null ? 'null' ...
php
protected function getInlineJavaScript() { $javascript = parent::getInlineJavaScript(); $colors = "'" . implode("', '", $this->colors) . "'"; if ($this->none_option) { $none_option = $this->none_option_title === null ? 'null' ...
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "$", "javascript", "=", "parent", "::", "getInlineJavaScript", "(", ")", ";", "$", "colors", "=", "\"'\"", ".", "implode", "(", "\"', '\"", ",", "$", "this", "->", "colors", ")", ".", "\"'\"", ...
Gets simple color selector inline JavaScript The JavaScript is the majority of the simple color selector code @return string simple color selector inline JavaScript.
[ "Gets", "simple", "color", "selector", "inline", "JavaScript" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatSimpleColorEntry.php#L176-L200
33,431
silverorange/swat
Swat/SwatOptionControl.php
SwatOptionControl.addOptionMetadata
public function addOptionMetadata( SwatOption $option, $metadata, $value = null ) { $key = $this->getOptionMetadataKey($option); if (is_array($metadata)) { $this->option_metadata[$key] = array_merge( $this->option_metadata[$key], $...
php
public function addOptionMetadata( SwatOption $option, $metadata, $value = null ) { $key = $this->getOptionMetadataKey($option); if (is_array($metadata)) { $this->option_metadata[$key] = array_merge( $this->option_metadata[$key], $...
[ "public", "function", "addOptionMetadata", "(", "SwatOption", "$", "option", ",", "$", "metadata", ",", "$", "value", "=", "null", ")", "{", "$", "key", "=", "$", "this", "->", "getOptionMetadataKey", "(", "$", "option", ")", ";", "if", "(", "is_array", ...
Sets the metadata for an option Any metadata may be added to options. It is up to the control to make use of particular metadata fields. Common metadata fields are: - classes - an array of CSS classes @param SwatOption $option the option for which to set the metadata. @param array|string $metadata either an array of...
[ "Sets", "the", "metadata", "for", "an", "option" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatOptionControl.php#L161-L176
33,432
silverorange/swat
Swat/SwatOptionControl.php
SwatOptionControl.getOptionMetadata
public function getOptionMetadata(SwatOption $option, $metadata = null) { $key = $this->getOptionMetadataKey($option); if ($metadata === null) { if (isset($this->option_metadata[$key])) { $metadata = $this->option_metadata[$key]; } else { $met...
php
public function getOptionMetadata(SwatOption $option, $metadata = null) { $key = $this->getOptionMetadataKey($option); if ($metadata === null) { if (isset($this->option_metadata[$key])) { $metadata = $this->option_metadata[$key]; } else { $met...
[ "public", "function", "getOptionMetadata", "(", "SwatOption", "$", "option", ",", "$", "metadata", "=", "null", ")", "{", "$", "key", "=", "$", "this", "->", "getOptionMetadataKey", "(", "$", "option", ")", ";", "if", "(", "$", "metadata", "===", "null",...
Gets the metadata for an option Any metadata may be added to options. It is up to the control to make use of particular metadata fields. Common metadata fields are: - classes - an array of CSS classes @param SwatOption $option the option for which to get the metadata. @param string $metadata optional. An optional me...
[ "Gets", "the", "metadata", "for", "an", "option" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatOptionControl.php#L202-L224
33,433
silverorange/swat
Swat/SwatOptionControl.php
SwatOptionControl.removeOption
public function removeOption(SwatOption $option) { $removed_option = null; foreach ($this->options as $key => $control_option) { if ($control_option === $option) { $removed_option = $control_option; // remove from options list unset($this...
php
public function removeOption(SwatOption $option) { $removed_option = null; foreach ($this->options as $key => $control_option) { if ($control_option === $option) { $removed_option = $control_option; // remove from options list unset($this...
[ "public", "function", "removeOption", "(", "SwatOption", "$", "option", ")", "{", "$", "removed_option", "=", "null", ";", "foreach", "(", "$", "this", "->", "options", "as", "$", "key", "=>", "$", "control_option", ")", "{", "if", "(", "$", "control_opt...
Removes an option from this option control @param SwatOption $option the option to remove. @return SwatOption the removed option or null if no option was removed.
[ "Removes", "an", "option", "from", "this", "option", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatOptionControl.php#L236-L254
33,434
silverorange/swat
Swat/SwatOptionControl.php
SwatOptionControl.removeOptionsByValue
public function removeOptionsByValue($value) { $removed_options = array(); foreach ($this->options as $key => $control_option) { if ($control_option->value === $value) { $removed_options[] = $control_option; // remove from options list un...
php
public function removeOptionsByValue($value) { $removed_options = array(); foreach ($this->options as $key => $control_option) { if ($control_option->value === $value) { $removed_options[] = $control_option; // remove from options list un...
[ "public", "function", "removeOptionsByValue", "(", "$", "value", ")", "{", "$", "removed_options", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "options", "as", "$", "key", "=>", "$", "control_option", ")", "{", "if", "(", "$", "cont...
Removes options from this option control by their value @param mixed $value the value of the option or options to remove. @return array an array of removed SwatOption objects or an empty array if no options are removed.
[ "Removes", "options", "from", "this", "option", "control", "by", "their", "value" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatOptionControl.php#L267-L285
33,435
silverorange/swat
Swat/SwatOptionControl.php
SwatOptionControl.getOptionsByValue
public function getOptionsByValue($value) { $options = array(); foreach ($this->options as $option) { if ($option->value === $value) { $options[] = $option; } } return $options; }
php
public function getOptionsByValue($value) { $options = array(); foreach ($this->options as $option) { if ($option->value === $value) { $options[] = $option; } } return $options; }
[ "public", "function", "getOptionsByValue", "(", "$", "value", ")", "{", "$", "options", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "options", "as", "$", "option", ")", "{", "if", "(", "$", "option", "->", "value", "===", "$", "...
Gets options from this option control by their value @param mixed $value the value of the option or options to get. @return array an array of SwatOption objects or an empty array if no options with the given value exist within this option control.
[ "Gets", "options", "from", "this", "option", "control", "by", "their", "value" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatOptionControl.php#L320-L331
33,436
brainworxx/kreXX
src/Analyse/Callback/Analyse/Objects/Traversable.php
Traversable.callMe
public function callMe() { $output = $this->dispatchStartEvent(); // Check nesting level, memory and runtime. $this->pool->emergencyHandler->upOneNestingLevel(); if ($this->pool->emergencyHandler->checkNesting() === true || $this->pool->emergencyHandler->checkEmergencyBr...
php
public function callMe() { $output = $this->dispatchStartEvent(); // Check nesting level, memory and runtime. $this->pool->emergencyHandler->upOneNestingLevel(); if ($this->pool->emergencyHandler->checkNesting() === true || $this->pool->emergencyHandler->checkEmergencyBr...
[ "public", "function", "callMe", "(", ")", "{", "$", "output", "=", "$", "this", "->", "dispatchStartEvent", "(", ")", ";", "// Check nesting level, memory and runtime.", "$", "this", "->", "pool", "->", "emergencyHandler", "->", "upOneNestingLevel", "(", ")", ";...
Checks runtime, memory and nesting level. Then trigger the actual analysis. @return string The generated markup.
[ "Checks", "runtime", "memory", "and", "nesting", "level", ".", "Then", "trigger", "the", "actual", "analysis", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/Traversable.php#L64-L81
33,437
brainworxx/kreXX
src/Analyse/Callback/Analyse/Objects/Traversable.php
Traversable.getTaversableData
protected function getTaversableData() { $data = $this->parameters[static::PARAM_DATA]; $name = $this->parameters[static::PARAM_NAME]; // Add a try to prevent the hosting CMS from doing something stupid. try { // We need to deactivate the current error handling to ...
php
protected function getTaversableData() { $data = $this->parameters[static::PARAM_DATA]; $name = $this->parameters[static::PARAM_NAME]; // Add a try to prevent the hosting CMS from doing something stupid. try { // We need to deactivate the current error handling to ...
[ "protected", "function", "getTaversableData", "(", ")", "{", "$", "data", "=", "$", "this", "->", "parameters", "[", "static", "::", "PARAM_DATA", "]", ";", "$", "name", "=", "$", "this", "->", "parameters", "[", "static", "::", "PARAM_NAME", "]", ";", ...
Analyses the traversable data. @return string The generated markup.
[ "Analyses", "the", "traversable", "data", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/Traversable.php#L89-L169
33,438
silverorange/swat
Swat/SwatCellRenderer.php
SwatCellRenderer.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { if ($this->render_count > 0) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } return $set; }
php
public function getHtmlHeadEntrySet() { if ($this->render_count > 0) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "if", "(", "$", "this", "->", "render_count", ">", "0", ")", "{", "$", "set", "=", "new", "SwatHtmlHeadEntrySet", "(", "$", "this", "->", "html_head_entry_set", ")", ";", "}", "else", "{", "$", ...
Gets the SwatHtmlHeadEntry objects needed by this cell renderer If this renderer has never been rendered, an empty set is returned to reduce the number of required HTTP requests. @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this cell renderer.
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "cell", "renderer" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRenderer.php#L235-L244
33,439
silverorange/swat
Swat/SwatCellRenderer.php
SwatCellRenderer.getInheritanceCSSClassNames
final public function getInheritanceCSSClassNames() { $php_class_name = get_class($this); $css_class_names = array(); // get the ancestors that are swat classes while ($php_class_name !== 'SwatCellRenderer') { if (strncmp($php_class_name, 'Swat', 4) === 0) { ...
php
final public function getInheritanceCSSClassNames() { $php_class_name = get_class($this); $css_class_names = array(); // get the ancestors that are swat classes while ($php_class_name !== 'SwatCellRenderer') { if (strncmp($php_class_name, 'Swat', 4) === 0) { ...
[ "final", "public", "function", "getInheritanceCSSClassNames", "(", ")", "{", "$", "php_class_name", "=", "get_class", "(", "$", "this", ")", ";", "$", "css_class_names", "=", "array", "(", ")", ";", "// get the ancestors that are swat classes", "while", "(", "$", ...
Gets the CSS class names of this cell renderer based on the inheritance tree for this cell renderer For example, a class with the following ancestry: SwatCellRenderer -> SwatTextCellRenderer -> SwatNullTextCellRenderer will return the following array of class names: <code> array( 'swat-cell-renderer', 'swat-text-ce...
[ "Gets", "the", "CSS", "class", "names", "of", "this", "cell", "renderer", "based", "on", "the", "inheritance", "tree", "for", "this", "cell", "renderer" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRenderer.php#L306-L328
33,440
silverorange/swat
Swat/SwatCellRenderer.php
SwatCellRenderer.addCompositeRenderer
final protected function addCompositeRenderer( SwatCellRenderer $renderer, $key ) { if (array_key_exists($key, $this->composite_renderers)) { throw new SwatDuplicateIdException( sprintf( "A composite renderer with the key '%s' already exists in...
php
final protected function addCompositeRenderer( SwatCellRenderer $renderer, $key ) { if (array_key_exists($key, $this->composite_renderers)) { throw new SwatDuplicateIdException( sprintf( "A composite renderer with the key '%s' already exists in...
[ "final", "protected", "function", "addCompositeRenderer", "(", "SwatCellRenderer", "$", "renderer", ",", "$", "key", ")", "{", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "composite_renderers", ")", ")", "{", "throw", "new", "Swat...
Adds a composite a renderer to this renderer @param SwatCellRenderer $renderer the composite renderer to add. @param string $key a key identifying the renderer so it may be retrieved later. The key has to be unique within this renderer relative to the keys of other composite renderers. @throws SwatDuplicateIdExceptio...
[ "Adds", "a", "composite", "a", "renderer", "to", "this", "renderer" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRenderer.php#L360-L385
33,441
silverorange/swat
Swat/SwatCellRenderer.php
SwatCellRenderer.getCompositeRenderer
final protected function getCompositeRenderer($key) { $this->confirmCompositeRenderers(); if (!array_key_exists($key, $this->composite_renderers)) { throw new SwatWidgetNotFoundException( sprintf( "Composite renderer with key of '%s' not found in %s. ...
php
final protected function getCompositeRenderer($key) { $this->confirmCompositeRenderers(); if (!array_key_exists($key, $this->composite_renderers)) { throw new SwatWidgetNotFoundException( sprintf( "Composite renderer with key of '%s' not found in %s. ...
[ "final", "protected", "function", "getCompositeRenderer", "(", "$", "key", ")", "{", "$", "this", "->", "confirmCompositeRenderers", "(", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "composite_renderers", ")", ")", ...
Gets a composite renderer of this renderer by the composite renderer's key This is used by other methods to retrieve a specific composite renderer. This method ensures composite renderers are created before trying to retrieve the specified renderer. @param string $key the key of the composite renderer to get. @retur...
[ "Gets", "a", "composite", "renderer", "of", "this", "renderer", "by", "the", "composite", "renderer", "s", "key" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRenderer.php#L406-L425
33,442
silverorange/swat
Swat/SwatCellRenderer.php
SwatCellRenderer.getCompositeRenderers
final protected function getCompositeRenderers($class_name = null) { $this->confirmCompositeRenderers(); if ( !( $class_name === null || class_exists($class_name) || interface_exists($class_name) ) ) { retur...
php
final protected function getCompositeRenderers($class_name = null) { $this->confirmCompositeRenderers(); if ( !( $class_name === null || class_exists($class_name) || interface_exists($class_name) ) ) { retur...
[ "final", "protected", "function", "getCompositeRenderers", "(", "$", "class_name", "=", "null", ")", "{", "$", "this", "->", "confirmCompositeRenderers", "(", ")", ";", "if", "(", "!", "(", "$", "class_name", "===", "null", "||", "class_exists", "(", "$", ...
Gets all composite renderers added to this renderer This method ensures composite renderers are created before retrieving the renderers. @param string $class_name optional class name. If set, only renderers that are instances of <code>$class_name</code> are returned. @return array all composite wigets added to this ...
[ "Gets", "all", "composite", "renderers", "added", "to", "this", "renderer" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRenderer.php#L445-L468
33,443
silverorange/swat
Swat/SwatCellRenderer.php
SwatCellRenderer.makePropertyStatic
final protected function makePropertyStatic($property_name) { $reflector = new ReflectionObject($this); if ($reflector->hasProperty($property_name)) { $property = $reflector->getProperty($property_name); if ($property->isPublic() && !$property->isStatic()) { $...
php
final protected function makePropertyStatic($property_name) { $reflector = new ReflectionObject($this); if ($reflector->hasProperty($property_name)) { $property = $reflector->getProperty($property_name); if ($property->isPublic() && !$property->isStatic()) { $...
[ "final", "protected", "function", "makePropertyStatic", "(", "$", "property_name", ")", "{", "$", "reflector", "=", "new", "ReflectionObject", "(", "$", "this", ")", ";", "if", "(", "$", "reflector", "->", "hasProperty", "(", "$", "property_name", ")", ")", ...
Make a public property static This method takes a property name and marks it as static, meaning that a user can not data-map this property. @param $property_name string the property name @see SwatCellRenderer::isPropertyStatic() @throws SwatInvalidPropertyException if the specified <i>$property_name</i> is not a no...
[ "Make", "a", "public", "property", "static" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRenderer.php#L512-L536
33,444
brainworxx/kreXX
src/Analyse/Code/Codegen.php
Codegen.generateSource
public function generateSource(Model $model) { if ($this->allowCodegen === true) { // We handle the first one special, because we need to add the original // variable name to the source generation. if ($this->firstRun === true) { $this->firstRun = false; ...
php
public function generateSource(Model $model) { if ($this->allowCodegen === true) { // We handle the first one special, because we need to add the original // variable name to the source generation. if ($this->firstRun === true) { $this->firstRun = false; ...
[ "public", "function", "generateSource", "(", "Model", "$", "model", ")", "{", "if", "(", "$", "this", "->", "allowCodegen", "===", "true", ")", "{", "// We handle the first one special, because we need to add the original", "// variable name to the source generation.", "if"...
Generates PHP sourcecode. From the 2 connectors and from the name of name/key of the attribute we can generate PHP code to actually reach the corresponding value. This function generates this code. @param \Brainworxx\Krexx\Analyse\Model $model The model, which hosts all the data we need. @return string The generated...
[ "Generates", "PHP", "sourcecode", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Code/Codegen.php#L102-L157
33,445
brainworxx/kreXX
src/Analyse/Code/Codegen.php
Codegen.concatenation
protected function concatenation(Model $model) { // We simply add the connectors for public access. return $model->getConnectorLeft() . $this->pool->encodingService->encodeStringForCodeGeneration($model->getName()) . $model->getConnectorRight(); }
php
protected function concatenation(Model $model) { // We simply add the connectors for public access. return $model->getConnectorLeft() . $this->pool->encodingService->encodeStringForCodeGeneration($model->getName()) . $model->getConnectorRight(); }
[ "protected", "function", "concatenation", "(", "Model", "$", "model", ")", "{", "// We simply add the connectors for public access.", "return", "$", "model", "->", "getConnectorLeft", "(", ")", ".", "$", "this", "->", "pool", "->", "encodingService", "->", "encodeSt...
Simple concatenation of all parameters. @param \Brainworxx\Krexx\Analyse\Model $model @return string The generated code.
[ "Simple", "concatenation", "of", "all", "parameters", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Code/Codegen.php#L191-L197
33,446
silverorange/swat
Swat/SwatRadioTable.php
SwatRadioTable.displayRadioTableOption
protected function displayRadioTableOption(SwatOption $option, $index) { $tr_tag = $this->getTrTag($option, $index); // add option-specific CSS classes from option metadata $classes = $this->getOptionMetadata($option, 'classes'); if (is_array($classes)) { $tr_tag->class ...
php
protected function displayRadioTableOption(SwatOption $option, $index) { $tr_tag = $this->getTrTag($option, $index); // add option-specific CSS classes from option metadata $classes = $this->getOptionMetadata($option, 'classes'); if (is_array($classes)) { $tr_tag->class ...
[ "protected", "function", "displayRadioTableOption", "(", "SwatOption", "$", "option", ",", "$", "index", ")", "{", "$", "tr_tag", "=", "$", "this", "->", "getTrTag", "(", "$", "option", ",", "$", "index", ")", ";", "// add option-specific CSS classes from option...
Displays a single option in this radio table @param SwatOption $option the option to display. @param integer $index the numeric index of the option in this list. Starts at 0.
[ "Displays", "a", "single", "option", "in", "this", "radio", "table" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioTable.php#L74-L107
33,447
vaniocz/vanio-domain-bundle
Request/GetPostParamConverter.php
GetPostParamConverter.resolveRouteParameters
private function resolveRouteParameters(array $attributes): array { if (!isset($attributes['_route'])) { return []; } $routeParameters = array_keys($attributes['_route_params']); $routeParameters = array_combine($routeParameters, $routeParameters); if (!$this->a...
php
private function resolveRouteParameters(array $attributes): array { if (!isset($attributes['_route'])) { return []; } $routeParameters = array_keys($attributes['_route_params']); $routeParameters = array_combine($routeParameters, $routeParameters); if (!$this->a...
[ "private", "function", "resolveRouteParameters", "(", "array", "$", "attributes", ")", ":", "array", "{", "if", "(", "!", "isset", "(", "$", "attributes", "[", "'_route'", "]", ")", ")", "{", "return", "[", "]", ";", "}", "$", "routeParameters", "=", "...
Returns an array of route parameters which placeholders arepresent in route definition. @param mixed[] $attributes @return string[]
[ "Returns", "an", "array", "of", "route", "parameters", "which", "placeholders", "arepresent", "in", "route", "definition", "." ]
3eee57327c0a2f41f249868799b40505b5ef4717
https://github.com/vaniocz/vanio-domain-bundle/blob/3eee57327c0a2f41f249868799b40505b5ef4717/Request/GetPostParamConverter.php#L103-L136
33,448
silverorange/swat
Swat/SwatControl.php
SwatControl.addMessage
public function addMessage(SwatMessage $message) { if ($this->parent instanceof SwatTitleable) { $title = $this->parent->getTitle(); if ($title === null) { $field_title = ''; } else { if ($this->parent->getTitleContentType() === 'text/xml')...
php
public function addMessage(SwatMessage $message) { if ($this->parent instanceof SwatTitleable) { $title = $this->parent->getTitle(); if ($title === null) { $field_title = ''; } else { if ($this->parent->getTitleContentType() === 'text/xml')...
[ "public", "function", "addMessage", "(", "SwatMessage", "$", "message", ")", "{", "if", "(", "$", "this", "->", "parent", "instanceof", "SwatTitleable", ")", "{", "$", "title", "=", "$", "this", "->", "parent", "->", "getTitle", "(", ")", ";", "if", "(...
Adds a message to this control Before the message is added, the content is updated with the name of this controls's parent title field if the parent implements the {@link SwatTitleable} interface. @param SwatMessage $message the message to add. @see SwatWidget::addMessage()
[ "Adds", "a", "message", "to", "this", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatControl.php#L25-L58
33,449
brainworxx/kreXX
src/Analyse/Callback/Iterate/ThroughMethods.php
ThroughMethods.callMe
public function callMe() { $result = $this->dispatchStartEvent(); /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */ $reflectionClass = $this->parameters[static::PARAM_REF]; $commentAnalysis = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Commen...
php
public function callMe() { $result = $this->dispatchStartEvent(); /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */ $reflectionClass = $this->parameters[static::PARAM_REF]; $commentAnalysis = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Commen...
[ "public", "function", "callMe", "(", ")", "{", "$", "result", "=", "$", "this", "->", "dispatchStartEvent", "(", ")", ";", "/** @var \\Brainworxx\\Krexx\\Service\\Reflection\\ReflectionClass $reflectionClass */", "$", "reflectionClass", "=", "$", "this", "->", "paramete...
Simply start to iterate through the methods. @return string The rendered markup.
[ "Simply", "start", "to", "iterate", "through", "the", "methods", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughMethods.php#L63-L137
33,450
brainworxx/kreXX
src/Analyse/Callback/Iterate/ThroughMethods.php
ThroughMethods.getDeclarationPlace
protected function getDeclarationPlace(\ReflectionMethod $reflectionMethod, \ReflectionClass $declaringClass) { $filename = $this->pool->fileService->filterFilePath($reflectionMethod->getFileName()); if (empty($filename) === true) { return static::UNKNOWN_DECLARATION; } ...
php
protected function getDeclarationPlace(\ReflectionMethod $reflectionMethod, \ReflectionClass $declaringClass) { $filename = $this->pool->fileService->filterFilePath($reflectionMethod->getFileName()); if (empty($filename) === true) { return static::UNKNOWN_DECLARATION; } ...
[ "protected", "function", "getDeclarationPlace", "(", "\\", "ReflectionMethod", "$", "reflectionMethod", ",", "\\", "ReflectionClass", "$", "declaringClass", ")", "{", "$", "filename", "=", "$", "this", "->", "pool", "->", "fileService", "->", "filterFilePath", "("...
Get the declaration place of this method. @param \ReflectionMethod $reflectionMethod Reflection of the method we are analysing. @param \ReflectionClass $declaringClass Reflection of the class we are analysing @return string The analysis result.
[ "Get", "the", "declaration", "place", "of", "this", "method", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughMethods.php#L150-L178
33,451
brainworxx/kreXX
src/Analyse/Callback/Iterate/ThroughMethods.php
ThroughMethods.retrieveDeclaringReflection
protected function retrieveDeclaringReflection( \ReflectionMethod $reflectionMethod, \ReflectionClass $declaringClass ) { // Get a first impression. if ($reflectionMethod->getFileName() === $declaringClass->getFileName()) { return $declaringClass; } // Go...
php
protected function retrieveDeclaringReflection( \ReflectionMethod $reflectionMethod, \ReflectionClass $declaringClass ) { // Get a first impression. if ($reflectionMethod->getFileName() === $declaringClass->getFileName()) { return $declaringClass; } // Go...
[ "protected", "function", "retrieveDeclaringReflection", "(", "\\", "ReflectionMethod", "$", "reflectionMethod", ",", "\\", "ReflectionClass", "$", "declaringClass", ")", "{", "// Get a first impression.", "if", "(", "$", "reflectionMethod", "->", "getFileName", "(", ")"...
Retrieve the declaration class reflection from traits. @param \ReflectionMethod $reflectionMethod The reflection of the method we are analysing. @param \ReflectionClass $declaringClass The original declaring class, the one with the traits. @return bool|\ReflectionClass false = unable to retrieve someting. Otherwise r...
[ "Retrieve", "the", "declaration", "class", "reflection", "from", "traits", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughMethods.php#L192-L211
33,452
silverorange/swat
Swat/SwatTableViewRow.php
SwatTableViewRow.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { if ($this->isDisplayed()) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } return $set; }
php
public function getHtmlHeadEntrySet() { if ($this->isDisplayed()) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "if", "(", "$", "this", "->", "isDisplayed", "(", ")", ")", "{", "$", "set", "=", "new", "SwatHtmlHeadEntrySet", "(", "$", "this", "->", "html_head_entry_set", ")", ";", "}", "else", "{", "$", ...
Gets the SwatHtmlHeadEntry objects needed by this row If this row has not been displayed, an empty set is returned to reduce the number of required HTTP requests. @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this row.
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewRow.php#L166-L175
33,453
TeknooSoftware/states
demo/Acme/Extendable/Mother/Mother.php
Mother.listAvailableStates
public function listAvailableStates(): array { if (!empty($this->states) && \is_array($this->states)) { return \array_keys($this->states); } else { return []; } }
php
public function listAvailableStates(): array { if (!empty($this->states) && \is_array($this->states)) { return \array_keys($this->states); } else { return []; } }
[ "public", "function", "listAvailableStates", "(", ")", ":", "array", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "states", ")", "&&", "\\", "is_array", "(", "$", "this", "->", "states", ")", ")", "{", "return", "\\", "array_keys", "(", "$",...
Return the list of registered states. Present only for debug and tests
[ "Return", "the", "list", "of", "registered", "states", ".", "Present", "only", "for", "debug", "and", "tests" ]
0c675b768781ee3a3a15c2663cffec5d50c1d5fd
https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/demo/Acme/Extendable/Mother/Mother.php#L62-L69
33,454
silverorange/swat
demo/include/DemoApplication.php
DemoApplication.getDemo
private function getDemo() { $demo = isset($_GET['demo']) ? $_GET['demo'] : null; // simple security if (!array_key_exists($demo, $this->available_demos)) $demo = null; return $demo; }
php
private function getDemo() { $demo = isset($_GET['demo']) ? $_GET['demo'] : null; // simple security if (!array_key_exists($demo, $this->available_demos)) $demo = null; return $demo; }
[ "private", "function", "getDemo", "(", ")", "{", "$", "demo", "=", "isset", "(", "$", "_GET", "[", "'demo'", "]", ")", "?", "$", "_GET", "[", "'demo'", "]", ":", "null", ";", "// simple security", "if", "(", "!", "array_key_exists", "(", "$", "demo",...
Gets the demo page
[ "Gets", "the", "demo", "page" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/demo/include/DemoApplication.php#L494-L503
33,455
silverorange/swat
Swat/SwatFrame.php
SwatFrame.getTitle
public function getTitle() { if ($this->subtitle === null) { return $this->title; } if ($this->title === null) { return $this->subtitle; } return $this->title . ': ' . $this->subtitle; }
php
public function getTitle() { if ($this->subtitle === null) { return $this->title; } if ($this->title === null) { return $this->subtitle; } return $this->title . ': ' . $this->subtitle; }
[ "public", "function", "getTitle", "(", ")", "{", "if", "(", "$", "this", "->", "subtitle", "===", "null", ")", "{", "return", "$", "this", "->", "title", ";", "}", "if", "(", "$", "this", "->", "title", "===", "null", ")", "{", "return", "$", "th...
Gets the title of this frame Implements the {@link SwatTitleable::getTitle()} interface. @return string the title of this frame.
[ "Gets", "the", "title", "of", "this", "frame" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFrame.php#L64-L75
33,456
silverorange/swat
Swat/SwatFrame.php
SwatFrame.display
public function display() { if (!$this->visible) { return; } SwatWidget::display(); $outer_div = new SwatHtmlTag('div'); $outer_div->id = $this->id; $outer_div->class = $this->getCSSClassString(); $outer_div->open(); $this->displayTitle(...
php
public function display() { if (!$this->visible) { return; } SwatWidget::display(); $outer_div = new SwatHtmlTag('div'); $outer_div->id = $this->id; $outer_div->class = $this->getCSSClassString(); $outer_div->open(); $this->displayTitle(...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "SwatWidget", "::", "display", "(", ")", ";", "$", "outer_div", "=", "new", "SwatHtmlTag", "(", "'div'", ")", ";", "$", "out...
Displays this frame
[ "Displays", "this", "frame" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFrame.php#L98-L114
33,457
silverorange/swat
Swat/SwatFrame.php
SwatFrame.displayTitle
protected function displayTitle() { if ($this->title !== null) { $header_tag = new SwatHtmlTag('h' . $this->getHeaderLevel()); $header_tag->class = 'swat-frame-title'; $header_tag->setContent($this->title, $this->title_content_type); if ($this->subtitle === n...
php
protected function displayTitle() { if ($this->title !== null) { $header_tag = new SwatHtmlTag('h' . $this->getHeaderLevel()); $header_tag->class = 'swat-frame-title'; $header_tag->setContent($this->title, $this->title_content_type); if ($this->subtitle === n...
[ "protected", "function", "displayTitle", "(", ")", "{", "if", "(", "$", "this", "->", "title", "!==", "null", ")", "{", "$", "header_tag", "=", "new", "SwatHtmlTag", "(", "'h'", ".", "$", "this", "->", "getHeaderLevel", "(", ")", ")", ";", "$", "head...
Displays this frame's title
[ "Displays", "this", "frame", "s", "title" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFrame.php#L122-L146
33,458
silverorange/swat
Swat/SwatFrame.php
SwatFrame.displayContent
protected function displayContent() { $inner_div = new SwatHtmlTag('div'); $inner_div->class = 'swat-frame-contents'; $inner_div->open(); $this->displayChildren(); $inner_div->close(); }
php
protected function displayContent() { $inner_div = new SwatHtmlTag('div'); $inner_div->class = 'swat-frame-contents'; $inner_div->open(); $this->displayChildren(); $inner_div->close(); }
[ "protected", "function", "displayContent", "(", ")", "{", "$", "inner_div", "=", "new", "SwatHtmlTag", "(", "'div'", ")", ";", "$", "inner_div", "->", "class", "=", "'swat-frame-contents'", ";", "$", "inner_div", "->", "open", "(", ")", ";", "$", "this", ...
Displays this frame's content
[ "Displays", "this", "frame", "s", "content" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFrame.php#L154-L161
33,459
honey-comb/core
src/Http/Requests/HCUserRequest.php
HCUserRequest.getUserInput
public function getUserInput(): array { $data = [ 'email' => $this->input('email'), 'is_active' => $this->filled('is_active') ? 1 : 0, ]; if ($this->input('password')) { Arr::set($data, 'password', $this->input('password')); } return $dat...
php
public function getUserInput(): array { $data = [ 'email' => $this->input('email'), 'is_active' => $this->filled('is_active') ? 1 : 0, ]; if ($this->input('password')) { Arr::set($data, 'password', $this->input('password')); } return $dat...
[ "public", "function", "getUserInput", "(", ")", ":", "array", "{", "$", "data", "=", "[", "'email'", "=>", "$", "this", "->", "input", "(", "'email'", ")", ",", "'is_active'", "=>", "$", "this", "->", "filled", "(", "'is_active'", ")", "?", "1", ":",...
Get request inputs @return array
[ "Get", "request", "inputs" ]
5c12aba31cae092e9681f0ae3e3664ed3fcec956
https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Http/Requests/HCUserRequest.php#L46-L58
33,460
honey-comb/core
src/Http/Requests/HCUserRequest.php
HCUserRequest.getPersonalData
public function getPersonalData(): array { $photo = $this->input('photo_id'); if (is_array($photo) && !$photo) { $photo = null; } return [ 'first_name' => $this->input('first_name'), 'last_name' => $this->input('last_name'), 'photo_id...
php
public function getPersonalData(): array { $photo = $this->input('photo_id'); if (is_array($photo) && !$photo) { $photo = null; } return [ 'first_name' => $this->input('first_name'), 'last_name' => $this->input('last_name'), 'photo_id...
[ "public", "function", "getPersonalData", "(", ")", ":", "array", "{", "$", "photo", "=", "$", "this", "->", "input", "(", "'photo_id'", ")", ";", "if", "(", "is_array", "(", "$", "photo", ")", "&&", "!", "$", "photo", ")", "{", "$", "photo", "=", ...
Get personal info @return array
[ "Get", "personal", "info" ]
5c12aba31cae092e9681f0ae3e3664ed3fcec956
https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Http/Requests/HCUserRequest.php#L83-L100
33,461
silverorange/swat
Swat/SwatWidget.php
SwatWidget.process
public function process() { if (!$this->isInitialized()) { $this->init(); } foreach ($this->getCompositeWidgets() as $widget) { $widget->process(); } $this->processed = true; }
php
public function process() { if (!$this->isInitialized()) { $this->init(); } foreach ($this->getCompositeWidgets() as $widget) { $widget->process(); } $this->processed = true; }
[ "public", "function", "process", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isInitialized", "(", ")", ")", "{", "$", "this", "->", "init", "(", ")", ";", "}", "foreach", "(", "$", "this", "->", "getCompositeWidgets", "(", ")", "as", "$", ...
Processes this widget After a form submit, this widget processes itself and its dependencies and then recursively processes any of its child widgets. Composite widgets of this widget are automatically processed as well. If this widget has not been initialized, it is automatically initialized before processing.
[ "Processes", "this", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L208-L219
33,462
silverorange/swat
Swat/SwatWidget.php
SwatWidget.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { if ($this->isDisplayed()) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } foreach ($this->getCompositeWidgets() as $widget) { $set->addEntrySet($w...
php
public function getHtmlHeadEntrySet() { if ($this->isDisplayed()) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } foreach ($this->getCompositeWidgets() as $widget) { $set->addEntrySet($w...
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "if", "(", "$", "this", "->", "isDisplayed", "(", ")", ")", "{", "$", "set", "=", "new", "SwatHtmlHeadEntrySet", "(", "$", "this", "->", "html_head_entry_set", ")", ";", "}", "else", "{", "$", ...
Gets the SwatHtmlHeadEntry objects needed by this widget If this widget has not been displayed, an empty set is returned to reduce the number of required HTTP requests. @return SwatHtmlHeadEntrySet the {@link SwatHtmlHeadEntry} objects needed by this widget.
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L269-L282
33,463
silverorange/swat
Swat/SwatWidget.php
SwatWidget.getAvailableHtmlHeadEntrySet
public function getAvailableHtmlHeadEntrySet() { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); foreach ($this->getCompositeWidgets() as $widget) { $set->addEntrySet($widget->getAvailableHtmlHeadEntrySet()); } return $set; }
php
public function getAvailableHtmlHeadEntrySet() { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); foreach ($this->getCompositeWidgets() as $widget) { $set->addEntrySet($widget->getAvailableHtmlHeadEntrySet()); } return $set; }
[ "public", "function", "getAvailableHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "new", "SwatHtmlHeadEntrySet", "(", "$", "this", "->", "html_head_entry_set", ")", ";", "foreach", "(", "$", "this", "->", "getCompositeWidgets", "(", ")", "as", "$", "widget...
Gets the SwatHtmlHeadEntry objects that may be needed by this widget @return SwatHtmlHeadEntrySet the {@link SwatHtmlHeadEntry} objects that may be needed by this widget.
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "that", "may", "be", "needed", "by", "this", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L293-L302
33,464
silverorange/swat
Swat/SwatWidget.php
SwatWidget.isSensitive
public function isSensitive() { if ($this->parent !== null && $this->parent instanceof SwatWidget) { return $this->parent->isSensitive() && $this->sensitive; } else { return $this->sensitive; } }
php
public function isSensitive() { if ($this->parent !== null && $this->parent instanceof SwatWidget) { return $this->parent->isSensitive() && $this->sensitive; } else { return $this->sensitive; } }
[ "public", "function", "isSensitive", "(", ")", "{", "if", "(", "$", "this", "->", "parent", "!==", "null", "&&", "$", "this", "->", "parent", "instanceof", "SwatWidget", ")", "{", "return", "$", "this", "->", "parent", "->", "isSensitive", "(", ")", "&...
Determines the sensitivity of this widget. Looks at the sensitive property of the ancestors of this widget to determine if this widget is sensitive. @return boolean whether this widget is sensitive. @see SwatWidget::$sensitive
[ "Determines", "the", "sensitivity", "of", "this", "widget", "." ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L381-L388
33,465
silverorange/swat
Swat/SwatWidget.php
SwatWidget.replaceWithContainer
public function replaceWithContainer(SwatContainer $container = null) { if ($this->parent === null) { throw new SwatException( 'Widget does not have a parent, unable ' . 'to replace this widget with a container.' ); } if ($containe...
php
public function replaceWithContainer(SwatContainer $container = null) { if ($this->parent === null) { throw new SwatException( 'Widget does not have a parent, unable ' . 'to replace this widget with a container.' ); } if ($containe...
[ "public", "function", "replaceWithContainer", "(", "SwatContainer", "$", "container", "=", "null", ")", "{", "if", "(", "$", "this", "->", "parent", "===", "null", ")", "{", "throw", "new", "SwatException", "(", "'Widget does not have a parent, unable '", ".", "...
Replace this widget with a new container Replaces this widget in the widget tree with a new {@link SwatContainer}, then adds this widget to the new container. @param SwatContainer $container optional container to use @throws SwatException @return SwatContainer a reference to the new container.
[ "Replace", "this", "widget", "with", "a", "new", "container" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L469-L487
33,466
silverorange/swat
Swat/SwatWidget.php
SwatWidget.getCSSClassNames
protected function getCSSClassNames() { $classes = array(); if (!$this->isSensitive()) { $classes[] = 'swat-insensitive'; } $classes = array_merge($classes, parent::getCSSClassNames()); return $classes; }
php
protected function getCSSClassNames() { $classes = array(); if (!$this->isSensitive()) { $classes[] = 'swat-insensitive'; } $classes = array_merge($classes, parent::getCSSClassNames()); return $classes; }
[ "protected", "function", "getCSSClassNames", "(", ")", "{", "$", "classes", "=", "array", "(", ")", ";", "if", "(", "!", "$", "this", "->", "isSensitive", "(", ")", ")", "{", "$", "classes", "[", "]", "=", "'swat-insensitive'", ";", "}", "$", "classe...
Gets the array of CSS classes that are applied to this widget @return array the array of CSS classes that are applied to this widget.
[ "Gets", "the", "array", "of", "CSS", "classes", "that", "are", "applied", "to", "this", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L539-L550
33,467
silverorange/swat
Swat/SwatWidget.php
SwatWidget.addCompositeWidget
final protected function addCompositeWidget(SwatWidget $widget, $key) { if (array_key_exists($key, $this->composite_widgets)) { throw new SwatDuplicateIdException( sprintf( "A composite widget with the key '%s' already exists in this " . ...
php
final protected function addCompositeWidget(SwatWidget $widget, $key) { if (array_key_exists($key, $this->composite_widgets)) { throw new SwatDuplicateIdException( sprintf( "A composite widget with the key '%s' already exists in this " . ...
[ "final", "protected", "function", "addCompositeWidget", "(", "SwatWidget", "$", "widget", ",", "$", "key", ")", "{", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "composite_widgets", ")", ")", "{", "throw", "new", "SwatDuplicateIdE...
Adds a composite a widget to this widget @param SwatWidget $widget the composite widget to add. @param string $key a key identifying the widget so it may be retrieved later. The key does not have to be the widget's id but the key does have to be unique within this widget relative to the keys of other composite widgets...
[ "Adds", "a", "composite", "a", "widget", "to", "this", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L584-L606
33,468
silverorange/swat
Swat/SwatWidget.php
SwatWidget.getCompositeWidget
final protected function getCompositeWidget($key) { $this->confirmCompositeWidgets(); if (!array_key_exists($key, $this->composite_widgets)) { throw new SwatWidgetNotFoundException( sprintf( "Composite widget with key of '%s' not found in %s. Make sur...
php
final protected function getCompositeWidget($key) { $this->confirmCompositeWidgets(); if (!array_key_exists($key, $this->composite_widgets)) { throw new SwatWidgetNotFoundException( sprintf( "Composite widget with key of '%s' not found in %s. Make sur...
[ "final", "protected", "function", "getCompositeWidget", "(", "$", "key", ")", "{", "$", "this", "->", "confirmCompositeWidgets", "(", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "composite_widgets", ")", ")", "{",...
Gets a composite widget of this widget by the composite widget's key This is used by other methods to retrieve a specific composite widget. This method ensures composite widgets are created before trying to retrieve the specified widget. @param string $key the key of the composite widget to get. @return SwatWidget t...
[ "Gets", "a", "composite", "widget", "of", "this", "widget", "by", "the", "composite", "widget", "s", "key" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L625-L643
33,469
silverorange/swat
Swat/SwatWidget.php
SwatWidget.getCompositeWidgets
final protected function getCompositeWidgets($class_name = null) { $this->confirmCompositeWidgets(); if ( !( $class_name === null || class_exists($class_name) || interface_exists($class_name) ) ) { return ar...
php
final protected function getCompositeWidgets($class_name = null) { $this->confirmCompositeWidgets(); if ( !( $class_name === null || class_exists($class_name) || interface_exists($class_name) ) ) { return ar...
[ "final", "protected", "function", "getCompositeWidgets", "(", "$", "class_name", "=", "null", ")", "{", "$", "this", "->", "confirmCompositeWidgets", "(", ")", ";", "if", "(", "!", "(", "$", "class_name", "===", "null", "||", "class_exists", "(", "$", "cla...
Gets all composite widgets added to this widget This method ensures composite widgets are created before retrieving the widgets. @param string $class_name optional class name. If set, only widgets that are instances of <code>$class_name</code> are returned. @return array all composite wigets added to this widget. Th...
[ "Gets", "all", "composite", "widgets", "added", "to", "this", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatWidget.php#L663-L686
33,470
brainworxx/kreXX
src/Service/Flow/Recursion.php
Recursion.isInHive
public function isInHive($bee) { // Check objects. if (is_object($bee) === true) { return $this->recursionHive->contains($bee); } // Check arrays (only the $GLOBAL array may apply). if (isset($bee[$this->recursionMarker]) === true) { // We render the ...
php
public function isInHive($bee) { // Check objects. if (is_object($bee) === true) { return $this->recursionHive->contains($bee); } // Check arrays (only the $GLOBAL array may apply). if (isset($bee[$this->recursionMarker]) === true) { // We render the ...
[ "public", "function", "isInHive", "(", "$", "bee", ")", "{", "// Check objects.", "if", "(", "is_object", "(", "$", "bee", ")", "===", "true", ")", "{", "return", "$", "this", "->", "recursionHive", "->", "contains", "(", "$", "bee", ")", ";", "}", "...
Find out if our bee is already in the hive. @param object|array $bee The object or array we want to check for recursion. @return bool Boolean which shows whether we are facing a recursion.
[ "Find", "out", "if", "our", "bee", "is", "already", "in", "the", "hive", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Flow/Recursion.php#L135-L155
33,471
silverorange/swat
Swat/SwatActions.php
SwatActions.display
public function display() { if (!$this->visible) { return; } parent::display(); $flydown = $this->getCompositeWidget('action_flydown'); foreach ($this->action_items as $item) { if ($item->visible) { if ($item instanceof SwatActionItem...
php
public function display() { if (!$this->visible) { return; } parent::display(); $flydown = $this->getCompositeWidget('action_flydown'); foreach ($this->action_items as $item) { if ($item->visible) { if ($item instanceof SwatActionItem...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ";", "$", "flydown", "=", "$", "this", "->", "getCompositeWidget", "(", "'action_flydown'",...
Displays this list of actions Internal widgets are automatically created if they do not exist. Javascript is displayed, then the display methods of the internal widgets are called.
[ "Displays", "this", "list", "of", "actions" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L129-L207
33,472
silverorange/swat
Swat/SwatActions.php
SwatActions.process
public function process() { parent::process(); $flydown = $this->getCompositeWidget('action_flydown'); $selected_id = $flydown->value; if (isset($this->action_items_by_id[$selected_id])) { $this->selected = $this->action_items_by_id[$selected_id]; if ($this...
php
public function process() { parent::process(); $flydown = $this->getCompositeWidget('action_flydown'); $selected_id = $flydown->value; if (isset($this->action_items_by_id[$selected_id])) { $this->selected = $this->action_items_by_id[$selected_id]; if ($this...
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "$", "flydown", "=", "$", "this", "->", "getCompositeWidget", "(", "'action_flydown'", ")", ";", "$", "selected_id", "=", "$", "flydown", "->", "value", ";", "if", ...
Figures out what action item is selected This method creates internal widgets if they do not exist, and then determines what SwatActionItem was selected by the user by calling the process methods of the internal widgets.
[ "Figures", "out", "what", "action", "item", "is", "selected" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L219-L235
33,473
silverorange/swat
Swat/SwatActions.php
SwatActions.addActionItem
public function addActionItem(SwatActionItem $item) { $this->action_items[] = $item; $item->parent = $this; if ($item->id !== null) { $this->action_items_by_id[$item->id] = $item; } }
php
public function addActionItem(SwatActionItem $item) { $this->action_items[] = $item; $item->parent = $this; if ($item->id !== null) { $this->action_items_by_id[$item->id] = $item; } }
[ "public", "function", "addActionItem", "(", "SwatActionItem", "$", "item", ")", "{", "$", "this", "->", "action_items", "[", "]", "=", "$", "item", ";", "$", "item", "->", "parent", "=", "$", "this", ";", "if", "(", "$", "item", "->", "id", "!==", ...
Adds an action item Adds a SwatActionItem to this SwatActions widget. @param SwatActionItem $item a reference to the item to add. @see SwatActionItem
[ "Adds", "an", "action", "item" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L249-L257
33,474
silverorange/swat
Swat/SwatActions.php
SwatActions.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); foreach ($this->action_items as $child_widget) { $set->addEntrySet($child_widget->getHtmlHeadEntrySet()); } return $set; }
php
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); foreach ($this->action_items as $child_widget) { $set->addEntrySet($child_widget->getHtmlHeadEntrySet()); } return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getHtmlHeadEntrySet", "(", ")", ";", "foreach", "(", "$", "this", "->", "action_items", "as", "$", "child_widget", ")", "{", "$", "set", "->", "addEntrySet", "(",...
Gets the SwatHtmlHeadEntry objects needed by this actions list @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this actions list. @see SwatWidget::getHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "actions", "list" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L302-L311
33,475
silverorange/swat
Swat/SwatActions.php
SwatActions.getAvailableHtmlHeadEntrySet
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); foreach ($this->action_items as $child_widget) { $set->addEntrySet($child_widget->getAvailableHtmlHeadEntrySet()); } return $set; }
php
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); foreach ($this->action_items as $child_widget) { $set->addEntrySet($child_widget->getAvailableHtmlHeadEntrySet()); } return $set; }
[ "public", "function", "getAvailableHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getAvailableHtmlHeadEntrySet", "(", ")", ";", "foreach", "(", "$", "this", "->", "action_items", "as", "$", "child_widget", ")", "{", "$", "set", "->", "ad...
Gets the SwatHtmlHeadEntry objects that may be needed by this actions list @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects that may be needed by this actions list. @see SwatWidget::getAvailableHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "that", "may", "be", "needed", "by", "this", "actions", "list" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L325-L334
33,476
silverorange/swat
Swat/SwatActions.php
SwatActions.setViewSelector
public function setViewSelector( SwatView $view, SwatViewSelector $selector = null ) { if ($view === null) { $selector = null; } else { if ($selector === null) { $selector = $view->getFirstDescendant('SwatViewSelector'); } ...
php
public function setViewSelector( SwatView $view, SwatViewSelector $selector = null ) { if ($view === null) { $selector = null; } else { if ($selector === null) { $selector = $view->getFirstDescendant('SwatViewSelector'); } ...
[ "public", "function", "setViewSelector", "(", "SwatView", "$", "view", ",", "SwatViewSelector", "$", "selector", "=", "null", ")", "{", "if", "(", "$", "view", "===", "null", ")", "{", "$", "selector", "=", "null", ";", "}", "else", "{", "if", "(", "...
Sets the optional view and selector of this actions control If a view and selector are specified for this actions control, submitting the form is prevented until one or more items in the view are selected by the selector. @param SwatView $view the view items must be selected in. Specify null to remove any existing vi...
[ "Sets", "the", "optional", "view", "and", "selector", "of", "this", "actions", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L503-L524
33,477
silverorange/swat
Swat/SwatActions.php
SwatActions.createCompositeWidgets
protected function createCompositeWidgets() { $flydown = new SwatFlydown($this->id . '_action_flydown'); $flydown->show_blank = $this->show_blank; $this->addCompositeWidget($flydown, 'action_flydown'); $button = new SwatButton($this->id . '_apply_button'); $this->addComposi...
php
protected function createCompositeWidgets() { $flydown = new SwatFlydown($this->id . '_action_flydown'); $flydown->show_blank = $this->show_blank; $this->addCompositeWidget($flydown, 'action_flydown'); $button = new SwatButton($this->id . '_apply_button'); $this->addComposi...
[ "protected", "function", "createCompositeWidgets", "(", ")", "{", "$", "flydown", "=", "new", "SwatFlydown", "(", "$", "this", "->", "id", ".", "'_action_flydown'", ")", ";", "$", "flydown", "->", "show_blank", "=", "$", "this", "->", "show_blank", ";", "$...
Creates and the composite flydown and button widgets of this actions control
[ "Creates", "and", "the", "composite", "flydown", "and", "button", "widgets", "of", "this", "actions", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L607-L616
33,478
silverorange/swat
Swat/SwatActions.php
SwatActions.getInlineJavaScript
protected function getInlineJavaScript() { static $shown = false; if (!$shown) { $javascript = $this->getInlineJavaScriptTranslations(); $shown = true; } else { $javascript = ''; } $values = array(); if ($this->show_blank) { ...
php
protected function getInlineJavaScript() { static $shown = false; if (!$shown) { $javascript = $this->getInlineJavaScriptTranslations(); $shown = true; } else { $javascript = ''; } $values = array(); if ($this->show_blank) { ...
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "static", "$", "shown", "=", "false", ";", "if", "(", "!", "$", "shown", ")", "{", "$", "javascript", "=", "$", "this", "->", "getInlineJavaScriptTranslations", "(", ")", ";", "$", "shown", "...
Gets inline JavaScript required to show and hide selected action items @return string inline JavaScript required to show and hide selected action items.
[ "Gets", "inline", "JavaScript", "required", "to", "show", "and", "hide", "selected", "action", "items" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActions.php#L627-L672
33,479
spiral/dumper
src/Dumper.php
Dumper.dump
public function dump($value, int $target = self::OUTPUT): ?string { $r = $this->getRenderer($target); $dump = $r->wrapContent($this->renderValue($r, $value)); switch ($target) { case self::OUTPUT: echo $dump; break; case self::RETURN:...
php
public function dump($value, int $target = self::OUTPUT): ?string { $r = $this->getRenderer($target); $dump = $r->wrapContent($this->renderValue($r, $value)); switch ($target) { case self::OUTPUT: echo $dump; break; case self::RETURN:...
[ "public", "function", "dump", "(", "$", "value", ",", "int", "$", "target", "=", "self", "::", "OUTPUT", ")", ":", "?", "string", "{", "$", "r", "=", "$", "this", "->", "getRenderer", "(", "$", "target", ")", ";", "$", "dump", "=", "$", "r", "-...
Dump given value into target output. @param mixed $value @param int $target Possible options: OUTPUT, RETURN, ERROR_LOG, LOGGER. @return string @throws DumperException
[ "Dump", "given", "value", "into", "target", "output", "." ]
87bc579b0ecd69754197804b1fc5e0d5b3293bd3
https://github.com/spiral/dumper/blob/87bc579b0ecd69754197804b1fc5e0d5b3293bd3/src/Dumper.php#L82-L108
33,480
spiral/dumper
src/Dumper.php
Dumper.setRenderer
public function setRenderer(int $target, RendererInterface $renderer): Dumper { if (!isset($this->targets[$target])) { throw new DumperException(sprintf("Undefined dump target %d", $target)); } $this->targets[$target] = $renderer; return $this; }
php
public function setRenderer(int $target, RendererInterface $renderer): Dumper { if (!isset($this->targets[$target])) { throw new DumperException(sprintf("Undefined dump target %d", $target)); } $this->targets[$target] = $renderer; return $this; }
[ "public", "function", "setRenderer", "(", "int", "$", "target", ",", "RendererInterface", "$", "renderer", ")", ":", "Dumper", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "targets", "[", "$", "target", "]", ")", ")", "{", "throw", "new", "D...
Associate rendered with given output target. @param int $target @param RendererInterface $renderer @return Dumper @throws DumperException
[ "Associate", "rendered", "with", "given", "output", "target", "." ]
87bc579b0ecd69754197804b1fc5e0d5b3293bd3
https://github.com/spiral/dumper/blob/87bc579b0ecd69754197804b1fc5e0d5b3293bd3/src/Dumper.php#L118-L127
33,481
spiral/dumper
src/Dumper.php
Dumper.getRenderer
private function getRenderer(int $target): RendererInterface { if ($target == self::OUTPUT && System::isCLI()) { if (System::isColorsSupported(STDOUT)) { $target = self::OUTPUT_CLI_COLORS; } else { $target = self::OUTPUT_CLI; } } ...
php
private function getRenderer(int $target): RendererInterface { if ($target == self::OUTPUT && System::isCLI()) { if (System::isColorsSupported(STDOUT)) { $target = self::OUTPUT_CLI_COLORS; } else { $target = self::OUTPUT_CLI; } } ...
[ "private", "function", "getRenderer", "(", "int", "$", "target", ")", ":", "RendererInterface", "{", "if", "(", "$", "target", "==", "self", "::", "OUTPUT", "&&", "System", "::", "isCLI", "(", ")", ")", "{", "if", "(", "System", "::", "isColorsSupported"...
Returns renderer instance associated with given output target. Automatically detects CLI mode, RR mode and colorization support. @param int $target @return RendererInterface @throws DumperException
[ "Returns", "renderer", "instance", "associated", "with", "given", "output", "target", ".", "Automatically", "detects", "CLI", "mode", "RR", "mode", "and", "colorization", "support", "." ]
87bc579b0ecd69754197804b1fc5e0d5b3293bd3
https://github.com/spiral/dumper/blob/87bc579b0ecd69754197804b1fc5e0d5b3293bd3/src/Dumper.php#L137-L156
33,482
honey-comb/core
src/Repositories/Acl/HCPermissionRepository.php
HCPermissionRepository.deletePermission
public function deletePermission(string $action): void { /** @var HCAclPermission $permission */ $permission = $this->findOneBy(['action' => $action]); $permission->roles()->detach(); $permission->forceDelete(); }
php
public function deletePermission(string $action): void { /** @var HCAclPermission $permission */ $permission = $this->findOneBy(['action' => $action]); $permission->roles()->detach(); $permission->forceDelete(); }
[ "public", "function", "deletePermission", "(", "string", "$", "action", ")", ":", "void", "{", "/** @var HCAclPermission $permission */", "$", "permission", "=", "$", "this", "->", "findOneBy", "(", "[", "'action'", "=>", "$", "action", "]", ")", ";", "$", "...
Deleting permission with and remove it from role_permission connection @param string $action @throws \Exception
[ "Deleting", "permission", "with", "and", "remove", "it", "from", "role_permission", "connection" ]
5c12aba31cae092e9681f0ae3e3664ed3fcec956
https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Repositories/Acl/HCPermissionRepository.php#L58-L66
33,483
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.createTable
public function createTable($tableName, $tableConfig = null) { if ($this->hasTable($tableName)) { throw new RuntimeException("Table with name {$tableName} is exist. Use rewriteTable()"); } return $this->create($tableName, $tableConfig); }
php
public function createTable($tableName, $tableConfig = null) { if ($this->hasTable($tableName)) { throw new RuntimeException("Table with name {$tableName} is exist. Use rewriteTable()"); } return $this->create($tableName, $tableConfig); }
[ "public", "function", "createTable", "(", "$", "tableName", ",", "$", "tableConfig", "=", "null", ")", "{", "if", "(", "$", "this", "->", "hasTable", "(", "$", "tableName", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Table with name {$tableNam...
Preparing method of creating table Checks if the table exists and than if one don't creates the new table @param string $tableName @param string $tableConfig @return mixed @throws RuntimeException @throws Exception
[ "Preparing", "method", "of", "creating", "table" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L244-L251
33,484
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.rewriteTable
public function rewriteTable($tableName, $tableConfig = null) { if ($this->hasTable($tableName)) { $this->deleteTable($tableName); } return $this->create($tableName, $tableConfig); }
php
public function rewriteTable($tableName, $tableConfig = null) { if ($this->hasTable($tableName)) { $this->deleteTable($tableName); } return $this->create($tableName, $tableConfig); }
[ "public", "function", "rewriteTable", "(", "$", "tableName", ",", "$", "tableConfig", "=", "null", ")", "{", "if", "(", "$", "this", "->", "hasTable", "(", "$", "tableName", ")", ")", "{", "$", "this", "->", "deleteTable", "(", "$", "tableName", ")", ...
Rewrites the table. Rewrite == delete existing table + create the new table @param string $tableName @param string $tableConfig @return mixed
[ "Rewrites", "the", "table", "." ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L262-L269
33,485
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.getTableInfoStr
public function getTableInfoStr($tableName) { $metadata = Factory::createSourceFromAdapter($this->db); $table = $metadata->getTable($tableName); $spaces = function ($count) { return str_repeat(' ', $count); }; $result = "{$spaces(4)}With columns:" . PHP_EOL; ...
php
public function getTableInfoStr($tableName) { $metadata = Factory::createSourceFromAdapter($this->db); $table = $metadata->getTable($tableName); $spaces = function ($count) { return str_repeat(' ', $count); }; $result = "{$spaces(4)}With columns:" . PHP_EOL; ...
[ "public", "function", "getTableInfoStr", "(", "$", "tableName", ")", "{", "$", "metadata", "=", "Factory", "::", "createSourceFromAdapter", "(", "$", "this", "->", "db", ")", ";", "$", "table", "=", "$", "metadata", "->", "getTable", "(", "$", "tableName",...
Builds and gets table info @see http://framework.zend.com/manual/current/en/modules/zend.db.metadata.html @param string $tableName @return string
[ "Builds", "and", "gets", "table", "info" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L292-L336
33,486
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.getTableConfig
public function getTableConfig($tableConfig) { if (is_string($tableConfig)) { $config = $this->getConfig(); if (isset($config[self::KEY_TABLES_CONFIGS][$tableConfig])) { $tableConfig = $config[self::KEY_TABLES_CONFIGS][$tableConfig]; } else { ...
php
public function getTableConfig($tableConfig) { if (is_string($tableConfig)) { $config = $this->getConfig(); if (isset($config[self::KEY_TABLES_CONFIGS][$tableConfig])) { $tableConfig = $config[self::KEY_TABLES_CONFIGS][$tableConfig]; } else { ...
[ "public", "function", "getTableConfig", "(", "$", "tableConfig", ")", "{", "if", "(", "is_string", "(", "$", "tableConfig", ")", ")", "{", "$", "config", "=", "$", "this", "->", "getConfig", "(", ")", ";", "if", "(", "isset", "(", "$", "config", "[",...
Fetches the table config from common config of all the tables @param $tableConfig @return mixed @throws Exception
[ "Fetches", "the", "table", "config", "from", "common", "config", "of", "all", "the", "tables" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L383-L396
33,487
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.create
protected function create($tableName, $tableConfig = null) { $tableConfig = is_null($tableConfig) ? $tableConfig = $tableName : $tableConfig; $createTable = $this->createCreateTable($tableName, $this->getTableConfig($tableConfig)); $sql = $this->getCreateTableSql($createTable, $tableName); ...
php
protected function create($tableName, $tableConfig = null) { $tableConfig = is_null($tableConfig) ? $tableConfig = $tableName : $tableConfig; $createTable = $this->createCreateTable($tableName, $this->getTableConfig($tableConfig)); $sql = $this->getCreateTableSql($createTable, $tableName); ...
[ "protected", "function", "create", "(", "$", "tableName", ",", "$", "tableConfig", "=", "null", ")", "{", "$", "tableConfig", "=", "is_null", "(", "$", "tableConfig", ")", "?", "$", "tableConfig", "=", "$", "tableName", ":", "$", "tableConfig", ";", "$",...
Creates table by its name and config @param $tableName @param $tableConfig @return Adapter\Driver\StatementInterface|\Zend\Db\ResultSet\ResultSet @throws Exception
[ "Creates", "table", "by", "its", "name", "and", "config" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L406-L413
33,488
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.createCreateTable
protected function createCreateTable(string $tableName, array $tableConfig): CreateTable { $createTable = new CreateTable($tableName); $primaryKeys = []; foreach ($tableConfig as $fieldName => $fieldData) { if (isset($fieldData[static::PRIMARY_KEY])) { $primaryKe...
php
protected function createCreateTable(string $tableName, array $tableConfig): CreateTable { $createTable = new CreateTable($tableName); $primaryKeys = []; foreach ($tableConfig as $fieldName => $fieldData) { if (isset($fieldData[static::PRIMARY_KEY])) { $primaryKe...
[ "protected", "function", "createCreateTable", "(", "string", "$", "tableName", ",", "array", "$", "tableConfig", ")", ":", "CreateTable", "{", "$", "createTable", "=", "new", "CreateTable", "(", "$", "tableName", ")", ";", "$", "primaryKeys", "=", "[", "]", ...
Create and return instance of CreateTable @param $tableName @param $tableConfig @return CreateTable
[ "Create", "and", "return", "instance", "of", "CreateTable" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L422-L453
33,489
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.createColumn
protected function createColumn(array $fieldData, string $fieldName): ColumnInterface { $fieldType = $fieldData[self::FIELD_TYPE]; switch (true) { case key_exists($fieldType, $this->fieldClasses[self::COLUMN_SIMPLE]): $defaultFieldParameters = $this->parameters[self::COL...
php
protected function createColumn(array $fieldData, string $fieldName): ColumnInterface { $fieldType = $fieldData[self::FIELD_TYPE]; switch (true) { case key_exists($fieldType, $this->fieldClasses[self::COLUMN_SIMPLE]): $defaultFieldParameters = $this->parameters[self::COL...
[ "protected", "function", "createColumn", "(", "array", "$", "fieldData", ",", "string", "$", "fieldName", ")", ":", "ColumnInterface", "{", "$", "fieldType", "=", "$", "fieldData", "[", "self", "::", "FIELD_TYPE", "]", ";", "switch", "(", "true", ")", "{",...
Create and return instance of ColumnInterface @param array $fieldData @param string $fieldName @return ColumnInterface
[ "Create", "and", "return", "instance", "of", "ColumnInterface" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L480-L520
33,490
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.createUniqueKeyConstraint
protected function createUniqueKeyConstraint( $constraintOptions, string $fieldName, string $tableName ): Constraint\UniqueKey { $constraintName = is_string($constraintOptions) ? $constraintOptions : "UniqueKey_{$tableName}_{$fieldName}"; return new Constraint\UniqueKey([$fi...
php
protected function createUniqueKeyConstraint( $constraintOptions, string $fieldName, string $tableName ): Constraint\UniqueKey { $constraintName = is_string($constraintOptions) ? $constraintOptions : "UniqueKey_{$tableName}_{$fieldName}"; return new Constraint\UniqueKey([$fi...
[ "protected", "function", "createUniqueKeyConstraint", "(", "$", "constraintOptions", ",", "string", "$", "fieldName", ",", "string", "$", "tableName", ")", ":", "Constraint", "\\", "UniqueKey", "{", "$", "constraintName", "=", "is_string", "(", "$", "constraintOpt...
Create and return instance of Constraint\UniqueKey @param null $constraintOptions @param string $fieldName @param string $tableName @return Constraint\UniqueKey
[ "Create", "and", "return", "instance", "of", "Constraint", "\\", "UniqueKey" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L530-L538
33,491
rollun-com/rollun-datastore
src/DataStore/src/TableGateway/TableManagerMysql.php
TableManagerMysql.createForeignKeyConstraint
protected function createForeignKeyConstraint(array $constraintOptions, string $fieldName, string $tableName) { if (is_string($constraintOptions['name'] ?? null)) { $constraintName = $constraintOptions; } else { $constraintName = "ForeignKey_{$tableName}_{$fieldName}"; ...
php
protected function createForeignKeyConstraint(array $constraintOptions, string $fieldName, string $tableName) { if (is_string($constraintOptions['name'] ?? null)) { $constraintName = $constraintOptions; } else { $constraintName = "ForeignKey_{$tableName}_{$fieldName}"; ...
[ "protected", "function", "createForeignKeyConstraint", "(", "array", "$", "constraintOptions", ",", "string", "$", "fieldName", ",", "string", "$", "tableName", ")", "{", "if", "(", "is_string", "(", "$", "constraintOptions", "[", "'name'", "]", "??", "null", ...
Create and return instance of Constraint\ForeignKey @param array $constraintOptions @param string $fieldName @param string $tableName @return Constraint\ForeignKey
[ "Create", "and", "return", "instance", "of", "Constraint", "\\", "ForeignKey" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/TableGateway/TableManagerMysql.php#L548-L572
33,492
silverorange/swat
Swat/SwatPagination.php
SwatPagination.getResultsMessage
public function getResultsMessage($unit = null, $unit_plural = null) { if ($unit === null) { $unit = Swat::_('record'); } if ($unit_plural === null) { $unit_plural = Swat::_('records'); } $message = ''; if ($this->total_records === 0) { ...
php
public function getResultsMessage($unit = null, $unit_plural = null) { if ($unit === null) { $unit = Swat::_('record'); } if ($unit_plural === null) { $unit_plural = Swat::_('records'); } $message = ''; if ($this->total_records === 0) { ...
[ "public", "function", "getResultsMessage", "(", "$", "unit", "=", "null", ",", "$", "unit_plural", "=", "null", ")", "{", "if", "(", "$", "unit", "===", "null", ")", "{", "$", "unit", "=", "Swat", "::", "_", "(", "'record'", ")", ";", "}", "if", ...
Gets a human readable summary of the current state of this pagination widget @param $unit string optional. The type of unit being returned. By default this is 'record'. @param $unit_plural string optional. The plural version of the <i>$unit</i> parameter. By default this is 'records'. @return string a human readable ...
[ "Gets", "a", "human", "readable", "summary", "of", "the", "current", "state", "of", "this", "pagination", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L188-L221
33,493
silverorange/swat
Swat/SwatPagination.php
SwatPagination.display
public function display() { if (!$this->visible) { return; } parent::display(); $this->calculatePages(); if ($this->total_pages > 1) { $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getC...
php
public function display() { if (!$this->visible) { return; } parent::display(); $this->calculatePages(); if ($this->total_pages > 1) { $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getC...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ";", "$", "this", "->", "calculatePages", "(", ")", ";", "if", "(", "$", "this", "->"...
Displays this pagination widget
[ "Displays", "this", "pagination", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L229-L263
33,494
silverorange/swat
Swat/SwatPagination.php
SwatPagination.setCurrentPage
public function setCurrentPage($page) { $this->current_page = max(1, (int) $page); $this->current_record = ($this->current_page - 1) * $this->page_size; }
php
public function setCurrentPage($page) { $this->current_page = max(1, (int) $page); $this->current_record = ($this->current_page - 1) * $this->page_size; }
[ "public", "function", "setCurrentPage", "(", "$", "page", ")", "{", "$", "this", "->", "current_page", "=", "max", "(", "1", ",", "(", "int", ")", "$", "page", ")", ";", "$", "this", "->", "current_record", "=", "(", "$", "this", "->", "current_page"...
Set the current page that is displayed Calculates the current_record properties. @param integer $page The current page being displayed.
[ "Set", "the", "current", "page", "that", "is", "displayed" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L275-L280
33,495
silverorange/swat
Swat/SwatPagination.php
SwatPagination.displayPrev
protected function displayPrev() { if ($this->prev_page > 0) { $link = $this->getLink(); $anchor = new SwatHtmlTag('a'); $anchor->href = sprintf($link, (string) $this->prev_page); // this is a non-breaking space $anchor->setContent($this->previous...
php
protected function displayPrev() { if ($this->prev_page > 0) { $link = $this->getLink(); $anchor = new SwatHtmlTag('a'); $anchor->href = sprintf($link, (string) $this->prev_page); // this is a non-breaking space $anchor->setContent($this->previous...
[ "protected", "function", "displayPrev", "(", ")", "{", "if", "(", "$", "this", "->", "prev_page", ">", "0", ")", "{", "$", "link", "=", "$", "this", "->", "getLink", "(", ")", ";", "$", "anchor", "=", "new", "SwatHtmlTag", "(", "'a'", ")", ";", "...
Displays the previous page link
[ "Displays", "the", "previous", "page", "link" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L301-L318
33,496
silverorange/swat
Swat/SwatPagination.php
SwatPagination.displayPosition
protected function displayPosition() { $div = new SwatHtmlTag('div'); $div->class = 'swat-pagination-position'; $div->setContent( sprintf( Swat::_('Page %d of %d'), $this->current_page, $this->total_pages ) ); ...
php
protected function displayPosition() { $div = new SwatHtmlTag('div'); $div->class = 'swat-pagination-position'; $div->setContent( sprintf( Swat::_('Page %d of %d'), $this->current_page, $this->total_pages ) ); ...
[ "protected", "function", "displayPosition", "(", ")", "{", "$", "div", "=", "new", "SwatHtmlTag", "(", "'div'", ")", ";", "$", "div", "->", "class", "=", "'swat-pagination-position'", ";", "$", "div", "->", "setContent", "(", "sprintf", "(", "Swat", "::", ...
Displays the current page position i.e. "1 of 3"
[ "Displays", "the", "current", "page", "position" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L328-L342
33,497
silverorange/swat
Swat/SwatPagination.php
SwatPagination.displayNext
protected function displayNext() { if ($this->next_page > 0) { $link = $this->getLink(); $anchor = new SwatHtmlTag('a'); $anchor->href = sprintf($link, (string) $this->next_page); // this is a non-breaking space $anchor->setContent($this->next_lab...
php
protected function displayNext() { if ($this->next_page > 0) { $link = $this->getLink(); $anchor = new SwatHtmlTag('a'); $anchor->href = sprintf($link, (string) $this->next_page); // this is a non-breaking space $anchor->setContent($this->next_lab...
[ "protected", "function", "displayNext", "(", ")", "{", "if", "(", "$", "this", "->", "next_page", ">", "0", ")", "{", "$", "link", "=", "$", "this", "->", "getLink", "(", ")", ";", "$", "anchor", "=", "new", "SwatHtmlTag", "(", "'a'", ")", ";", "...
Displays the next page link
[ "Displays", "the", "next", "page", "link" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L350-L368
33,498
silverorange/swat
Swat/SwatPagination.php
SwatPagination.calculatePages
protected function calculatePages() { $this->total_pages = ceil($this->total_records / $this->page_size); if ( $this->total_pages <= 1 || $this->total_pages == $this->current_page ) { $this->next_page = 0; } else { $this->next_page = $...
php
protected function calculatePages() { $this->total_pages = ceil($this->total_records / $this->page_size); if ( $this->total_pages <= 1 || $this->total_pages == $this->current_page ) { $this->next_page = 0; } else { $this->next_page = $...
[ "protected", "function", "calculatePages", "(", ")", "{", "$", "this", "->", "total_pages", "=", "ceil", "(", "$", "this", "->", "total_records", "/", "$", "this", "->", "page_size", ")", ";", "if", "(", "$", "this", "->", "total_pages", "<=", "1", "||...
Calculates page totals Sets the internal total_pages, next_page and prev_page properties.
[ "Calculates", "page", "totals" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatPagination.php#L469-L487
33,499
TeknooSoftware/states
src/Automated/Assertion/Property/AbstractConstraint.php
AbstractConstraint.isValid
protected function isValid(&$value): ConstraintInterface { if ($this->constraintsSet instanceof ConstraintsSetInterface) { $this->constraintsSet->isValid($value); } return $this; }
php
protected function isValid(&$value): ConstraintInterface { if ($this->constraintsSet instanceof ConstraintsSetInterface) { $this->constraintsSet->isValid($value); } return $this; }
[ "protected", "function", "isValid", "(", "&", "$", "value", ")", ":", "ConstraintInterface", "{", "if", "(", "$", "this", "->", "constraintsSet", "instanceof", "ConstraintsSetInterface", ")", "{", "$", "this", "->", "constraintsSet", "->", "isValid", "(", "$",...
To return the success of the check to the ConstraintSet and continue the workflow @param mixed $value @return ConstraintInterface
[ "To", "return", "the", "success", "of", "the", "check", "to", "the", "ConstraintSet", "and", "continue", "the", "workflow" ]
0c675b768781ee3a3a15c2663cffec5d50c1d5fd
https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/src/Automated/Assertion/Property/AbstractConstraint.php#L67-L74