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
188,300
neos/form
Classes/Core/Model/Renderable/AbstractCompositeRenderable.php
AbstractCompositeRenderable.removeRenderable
protected function removeRenderable(RenderableInterface $renderableToRemove) { if ($renderableToRemove->getParentRenderable() !== $this) { throw new FormDefinitionConsistencyException('The renderable to be removed must be part of the calling parent renderable.', 1326090127); } $...
php
protected function removeRenderable(RenderableInterface $renderableToRemove) { if ($renderableToRemove->getParentRenderable() !== $this) { throw new FormDefinitionConsistencyException('The renderable to be removed must be part of the calling parent renderable.', 1326090127); } $...
[ "protected", "function", "removeRenderable", "(", "RenderableInterface", "$", "renderableToRemove", ")", "{", "if", "(", "$", "renderableToRemove", "->", "getParentRenderable", "(", ")", "!==", "$", "this", ")", "{", "throw", "new", "FormDefinitionConsistencyException...
Remove a renderable from this renderable. This function will be wrapped by the subclasses, f.e. with an "removePage" or "removeElement" method with the correct type hint. @param RenderableInterface $renderableToRemove @return void @throws FormDefinitionConsistencyException @internal
[ "Remove", "a", "renderable", "from", "this", "renderable", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractCompositeRenderable.php#L158-L175
188,301
neos/form
Classes/Core/Model/Renderable/AbstractCompositeRenderable.php
AbstractCompositeRenderable.registerInFormIfPossible
public function registerInFormIfPossible() { parent::registerInFormIfPossible(); foreach ($this->renderables as $renderable) { if ($renderable instanceof AbstractRenderable) { $renderable->registerInFormIfPossible(); } } }
php
public function registerInFormIfPossible() { parent::registerInFormIfPossible(); foreach ($this->renderables as $renderable) { if ($renderable instanceof AbstractRenderable) { $renderable->registerInFormIfPossible(); } } }
[ "public", "function", "registerInFormIfPossible", "(", ")", "{", "parent", "::", "registerInFormIfPossible", "(", ")", ";", "foreach", "(", "$", "this", "->", "renderables", "as", "$", "renderable", ")", "{", "if", "(", "$", "renderable", "instanceof", "Abstra...
Register this element at the parent form, if there is a connection to the parent form. @internal @return void
[ "Register", "this", "element", "at", "the", "parent", "form", "if", "there", "is", "a", "connection", "to", "the", "parent", "form", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractCompositeRenderable.php#L183-L191
188,302
neos/form
Classes/Core/Model/Page.php
Page.setParentRenderable
public function setParentRenderable(Renderable\CompositeRenderableInterface $parentRenderable) { if (!($parentRenderable instanceof FormDefinition)) { throw new Exception(sprintf('The specified parentRenderable must be a FormDefinition, got "%s"', is_object($parentRenderable) ? get_class($parent...
php
public function setParentRenderable(Renderable\CompositeRenderableInterface $parentRenderable) { if (!($parentRenderable instanceof FormDefinition)) { throw new Exception(sprintf('The specified parentRenderable must be a FormDefinition, got "%s"', is_object($parentRenderable) ? get_class($parent...
[ "public", "function", "setParentRenderable", "(", "Renderable", "\\", "CompositeRenderableInterface", "$", "parentRenderable", ")", "{", "if", "(", "!", "(", "$", "parentRenderable", "instanceof", "FormDefinition", ")", ")", "{", "throw", "new", "Exception", "(", ...
Set the parent renderable @param Renderable\CompositeRenderableInterface $parentRenderable @return void @throws Exception
[ "Set", "the", "parent", "renderable" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Page.php#L52-L58
188,303
neos/form
Classes/ViewHelpers/Form/TimePickerViewHelper.php
TimePickerViewHelper.render
public function render() { $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); $this->tag->addAttribute('name', $name . '[hour]'); $date = $this->getSelectedDate(); $this->setErrorClassAttribute(); $content = ''; $content .= $thi...
php
public function render() { $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); $this->tag->addAttribute('name', $name . '[hour]'); $date = $this->getSelectedDate(); $this->setErrorClassAttribute(); $content = ''; $content .= $thi...
[ "public", "function", "render", "(", ")", "{", "$", "name", "=", "$", "this", "->", "getName", "(", ")", ";", "$", "this", "->", "registerFieldNameForFormTokenGeneration", "(", "$", "name", ")", ";", "$", "this", "->", "tag", "->", "addAttribute", "(", ...
Renders the select fields for hour & minute @return string
[ "Renders", "the", "select", "fields", "for", "hour", "&", "minute" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/ViewHelpers/Form/TimePickerViewHelper.php#L56-L69
188,304
neos/form
Classes/Core/Runtime/FormRuntime.php
FormRuntime.userWentBackToPreviousStep
protected function userWentBackToPreviousStep() { return !$this->isAfterLastPage() && !$this->isFirstRequest() && $this->currentPage->getIndex() < $this->lastDisplayedPage->getIndex(); }
php
protected function userWentBackToPreviousStep() { return !$this->isAfterLastPage() && !$this->isFirstRequest() && $this->currentPage->getIndex() < $this->lastDisplayedPage->getIndex(); }
[ "protected", "function", "userWentBackToPreviousStep", "(", ")", "{", "return", "!", "$", "this", "->", "isAfterLastPage", "(", ")", "&&", "!", "$", "this", "->", "isFirstRequest", "(", ")", "&&", "$", "this", "->", "currentPage", "->", "getIndex", "(", ")...
returns TRUE if the user went back to any previous step in the form. @return boolean
[ "returns", "TRUE", "if", "the", "user", "went", "back", "to", "any", "previous", "step", "in", "the", "form", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Runtime/FormRuntime.php#L257-L260
188,305
neos/form
Classes/Core/Runtime/FormRuntime.php
FormRuntime.render
public function render() { if ($this->isAfterLastPage()) { $this->invokeFinishers(); $parentResponse = $this->response->getParentResponse(); if ($parentResponse !== null) { foreach ($this->response->getHeaders()->getAll() as $key => $value) { ...
php
public function render() { if ($this->isAfterLastPage()) { $this->invokeFinishers(); $parentResponse = $this->response->getParentResponse(); if ($parentResponse !== null) { foreach ($this->response->getHeaders()->getAll() as $key => $value) { ...
[ "public", "function", "render", "(", ")", "{", "if", "(", "$", "this", "->", "isAfterLastPage", "(", ")", ")", "{", "$", "this", "->", "invokeFinishers", "(", ")", ";", "$", "parentResponse", "=", "$", "this", "->", "response", "->", "getParentResponse",...
Render this form. @return string rendered form @api @throws RenderingException
[ "Render", "this", "form", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Runtime/FormRuntime.php#L337-L366
188,306
neos/form
Classes/Core/Runtime/FormRuntime.php
FormRuntime.invokeFinishers
protected function invokeFinishers() { $finisherContext = new FinisherContext($this); foreach ($this->formDefinition->getFinishers() as $finisher) { $finisher->execute($finisherContext); if ($finisherContext->isCancelled()) { break; } } ...
php
protected function invokeFinishers() { $finisherContext = new FinisherContext($this); foreach ($this->formDefinition->getFinishers() as $finisher) { $finisher->execute($finisherContext); if ($finisherContext->isCancelled()) { break; } } ...
[ "protected", "function", "invokeFinishers", "(", ")", "{", "$", "finisherContext", "=", "new", "FinisherContext", "(", "$", "this", ")", ";", "foreach", "(", "$", "this", "->", "formDefinition", "->", "getFinishers", "(", ")", "as", "$", "finisher", ")", "...
Executes all finishers of this form @return void @internal
[ "Executes", "all", "finishers", "of", "this", "form" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Runtime/FormRuntime.php#L374-L383
188,307
neos/form
Classes/Core/Runtime/FormRuntime.php
FormRuntime.getPreviousPage
public function getPreviousPage() { $previousPageIndex = $this->currentPage->getIndex() - 1; if (!$this->formDefinition->hasPageWithIndex($previousPageIndex)) { return null; } return $this->formDefinition->getPageByIndex($previousPageIndex); }
php
public function getPreviousPage() { $previousPageIndex = $this->currentPage->getIndex() - 1; if (!$this->formDefinition->hasPageWithIndex($previousPageIndex)) { return null; } return $this->formDefinition->getPageByIndex($previousPageIndex); }
[ "public", "function", "getPreviousPage", "(", ")", "{", "$", "previousPageIndex", "=", "$", "this", "->", "currentPage", "->", "getIndex", "(", ")", "-", "1", ";", "if", "(", "!", "$", "this", "->", "formDefinition", "->", "hasPageWithIndex", "(", "$", "...
Returns the previous page of the currently selected one or NULL if there is no previous page @return Page|null @api
[ "Returns", "the", "previous", "page", "of", "the", "currently", "selected", "one", "or", "NULL", "if", "there", "is", "no", "previous", "page" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Runtime/FormRuntime.php#L439-L446
188,308
neos/form
Classes/Core/Runtime/FormRuntime.php
FormRuntime.getNextPage
public function getNextPage() { $nextPageIndex = $this->currentPage->getIndex() + 1; if (!$this->formDefinition->hasPageWithIndex($nextPageIndex)) { return null; } return $this->formDefinition->getPageByIndex($nextPageIndex); }
php
public function getNextPage() { $nextPageIndex = $this->currentPage->getIndex() + 1; if (!$this->formDefinition->hasPageWithIndex($nextPageIndex)) { return null; } return $this->formDefinition->getPageByIndex($nextPageIndex); }
[ "public", "function", "getNextPage", "(", ")", "{", "$", "nextPageIndex", "=", "$", "this", "->", "currentPage", "->", "getIndex", "(", ")", "+", "1", ";", "if", "(", "!", "$", "this", "->", "formDefinition", "->", "hasPageWithIndex", "(", "$", "nextPage...
Returns the next page of the currently selected one or NULL if there is no next page @return Page|null @api
[ "Returns", "the", "next", "page", "of", "the", "currently", "selected", "one", "or", "NULL", "if", "there", "is", "no", "next", "page" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Runtime/FormRuntime.php#L454-L461
188,309
neos/form
Classes/Core/Runtime/FormRuntime.php
FormRuntime.getElementValue
protected function getElementValue($identifier) { $formValue = $this->formState->getFormValue($identifier); if ($formValue !== null) { return $formValue; } return $this->formDefinition->getElementDefaultValueByIdentifier($identifier); }
php
protected function getElementValue($identifier) { $formValue = $this->formState->getFormValue($identifier); if ($formValue !== null) { return $formValue; } return $this->formDefinition->getElementDefaultValueByIdentifier($identifier); }
[ "protected", "function", "getElementValue", "(", "$", "identifier", ")", "{", "$", "formValue", "=", "$", "this", "->", "formState", "->", "getFormValue", "(", "$", "identifier", ")", ";", "if", "(", "$", "formValue", "!==", "null", ")", "{", "return", "...
Returns the value of the specified element @param string $identifier @return mixed @api
[ "Returns", "the", "value", "of", "the", "specified", "element" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Runtime/FormRuntime.php#L510-L517
188,310
neos/form
Classes/Core/Model/Renderable/AbstractRenderable.php
AbstractRenderable.createValidator
public function createValidator($validatorIdentifier, array $options = []) { $validatorPresets = $this->getRootForm()->getValidatorPresets(); if (isset($validatorPresets[$validatorIdentifier]) && is_array($validatorPresets[$validatorIdentifier]) && isset($validatorPresets[$validatorIdentifier]['impl...
php
public function createValidator($validatorIdentifier, array $options = []) { $validatorPresets = $this->getRootForm()->getValidatorPresets(); if (isset($validatorPresets[$validatorIdentifier]) && is_array($validatorPresets[$validatorIdentifier]) && isset($validatorPresets[$validatorIdentifier]['impl...
[ "public", "function", "createValidator", "(", "$", "validatorIdentifier", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "validatorPresets", "=", "$", "this", "->", "getRootForm", "(", ")", "->", "getValidatorPresets", "(", ")", ";", "if", "("...
Create a validator for the element @param string $validatorIdentifier @param array $options @return mixed @throws ValidatorPresetNotFoundException
[ "Create", "a", "validator", "for", "the", "element" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractRenderable.php#L161-L176
188,311
neos/form
Classes/Core/Model/Renderable/AbstractRenderable.php
AbstractRenderable.addValidator
public function addValidator(ValidatorInterface $validator) { $formDefinition = $this->getRootForm(); $formDefinition->getProcessingRule($this->getIdentifier())->addValidator($validator); }
php
public function addValidator(ValidatorInterface $validator) { $formDefinition = $this->getRootForm(); $formDefinition->getProcessingRule($this->getIdentifier())->addValidator($validator); }
[ "public", "function", "addValidator", "(", "ValidatorInterface", "$", "validator", ")", "{", "$", "formDefinition", "=", "$", "this", "->", "getRootForm", "(", ")", ";", "$", "formDefinition", "->", "getProcessingRule", "(", "$", "this", "->", "getIdentifier", ...
Add a validator to the element @param ValidatorInterface $validator @return void
[ "Add", "a", "validator", "to", "the", "element" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractRenderable.php#L184-L188
188,312
neos/form
Classes/Core/Model/Renderable/AbstractRenderable.php
AbstractRenderable.setDataType
public function setDataType($dataType) { $formDefinition = $this->getRootForm(); $formDefinition->getProcessingRule($this->getIdentifier())->setDataType($dataType); }
php
public function setDataType($dataType) { $formDefinition = $this->getRootForm(); $formDefinition->getProcessingRule($this->getIdentifier())->setDataType($dataType); }
[ "public", "function", "setDataType", "(", "$", "dataType", ")", "{", "$", "formDefinition", "=", "$", "this", "->", "getRootForm", "(", ")", ";", "$", "formDefinition", "->", "getProcessingRule", "(", "$", "this", "->", "getIdentifier", "(", ")", ")", "->"...
Set the datatype @param string $dataType @return void
[ "Set", "the", "datatype" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractRenderable.php#L207-L211
188,313
neos/form
Classes/Core/Model/Renderable/AbstractRenderable.php
AbstractRenderable.getRootForm
public function getRootForm() { $rootRenderable = $this->parentRenderable; while ($rootRenderable !== null && !($rootRenderable instanceof FormDefinition)) { $rootRenderable = $rootRenderable->getParentRenderable(); } if ($rootRenderable === null) { throw new ...
php
public function getRootForm() { $rootRenderable = $this->parentRenderable; while ($rootRenderable !== null && !($rootRenderable instanceof FormDefinition)) { $rootRenderable = $rootRenderable->getParentRenderable(); } if ($rootRenderable === null) { throw new ...
[ "public", "function", "getRootForm", "(", ")", "{", "$", "rootRenderable", "=", "$", "this", "->", "parentRenderable", ";", "while", "(", "$", "rootRenderable", "!==", "null", "&&", "!", "(", "$", "rootRenderable", "instanceof", "FormDefinition", ")", ")", "...
Get the root form this element belongs to @internal @throws FormDefinitionConsistencyException @return FormDefinition
[ "Get", "the", "root", "form", "this", "element", "belongs", "to" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractRenderable.php#L288-L299
188,314
neos/form
Classes/Core/Model/Renderable/AbstractRenderable.php
AbstractRenderable.onRemoveFromParentRenderable
public function onRemoveFromParentRenderable() { try { $rootForm = $this->getRootForm(); $rootForm->unregisterRenderable($this); } catch (FormDefinitionConsistencyException $exception) { } $this->parentRenderable = null; }
php
public function onRemoveFromParentRenderable() { try { $rootForm = $this->getRootForm(); $rootForm->unregisterRenderable($this); } catch (FormDefinitionConsistencyException $exception) { } $this->parentRenderable = null; }
[ "public", "function", "onRemoveFromParentRenderable", "(", ")", "{", "try", "{", "$", "rootForm", "=", "$", "this", "->", "getRootForm", "(", ")", ";", "$", "rootForm", "->", "unregisterRenderable", "(", "$", "this", ")", ";", "}", "catch", "(", "FormDefin...
Triggered when the renderable is removed from it's parent @return void
[ "Triggered", "when", "the", "renderable", "is", "removed", "from", "it", "s", "parent" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/Renderable/AbstractRenderable.php#L321-L329
188,315
neos/form
Classes/FormElements/FileUpload.php
FileUpload.onSubmit
public function onSubmit(FormRuntime $formRuntime, &$elementValue) { $fileTypeValidator = new FileTypeValidator(array('allowedExtensions' => $this->properties['allowedExtensions'])); $this->addValidator($fileTypeValidator); }
php
public function onSubmit(FormRuntime $formRuntime, &$elementValue) { $fileTypeValidator = new FileTypeValidator(array('allowedExtensions' => $this->properties['allowedExtensions'])); $this->addValidator($fileTypeValidator); }
[ "public", "function", "onSubmit", "(", "FormRuntime", "$", "formRuntime", ",", "&", "$", "elementValue", ")", "{", "$", "fileTypeValidator", "=", "new", "FileTypeValidator", "(", "array", "(", "'allowedExtensions'", "=>", "$", "this", "->", "properties", "[", ...
Add FileTypeValidator just before submitting so that the "allowedExtension" can be changed at runtime @param FormRuntime $formRuntime @param mixed $elementValue @return void
[ "Add", "FileTypeValidator", "just", "before", "submitting", "so", "that", "the", "allowedExtension", "can", "be", "changed", "at", "runtime" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/FormElements/FileUpload.php#L39-L43
188,316
neos/form
Classes/Core/Model/FormDefinition.php
FormDefinition.initializeFromFormDefaults
protected function initializeFromFormDefaults() { $typeDefinition = $this->formFieldTypeManager->getMergedTypeDefinition($this->type); $this->setOptions($typeDefinition); }
php
protected function initializeFromFormDefaults() { $typeDefinition = $this->formFieldTypeManager->getMergedTypeDefinition($this->type); $this->setOptions($typeDefinition); }
[ "protected", "function", "initializeFromFormDefaults", "(", ")", "{", "$", "typeDefinition", "=", "$", "this", "->", "formFieldTypeManager", "->", "getMergedTypeDefinition", "(", "$", "this", "->", "type", ")", ";", "$", "this", "->", "setOptions", "(", "$", "...
Initialize the form defaults of the current type @return void @internal
[ "Initialize", "the", "form", "defaults", "of", "the", "current", "type" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/FormDefinition.php#L352-L356
188,317
neos/form
Classes/Core/Model/FormDefinition.php
FormDefinition.getPageByIndex
public function getPageByIndex($index) { if (!$this->hasPageWithIndex($index)) { throw new Exception(sprintf('There is no page with an index of %d', $index), 1329233627); } return $this->renderables[$index]; }
php
public function getPageByIndex($index) { if (!$this->hasPageWithIndex($index)) { throw new Exception(sprintf('There is no page with an index of %d', $index), 1329233627); } return $this->renderables[$index]; }
[ "public", "function", "getPageByIndex", "(", "$", "index", ")", "{", "if", "(", "!", "$", "this", "->", "hasPageWithIndex", "(", "$", "index", ")", ")", "{", "throw", "new", "Exception", "(", "sprintf", "(", "'There is no page with an index of %d'", ",", "$"...
Get the page with the passed index. The first page has index zero. If page at $index does not exist, an exception is thrown. @see hasPageWithIndex() @param integer $index @return Page the page, or NULL if none found. @throws Exception if the specified index does not exist @api
[ "Get", "the", "page", "with", "the", "passed", "index", ".", "The", "first", "page", "has", "index", "zero", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/FormDefinition.php#L482-L488
188,318
neos/form
Classes/Core/Model/FormDefinition.php
FormDefinition.registerRenderable
public function registerRenderable(Renderable\RenderableInterface $renderable) { if ($renderable instanceof FormElementInterface) { if (isset($this->elementsByIdentifier[$renderable->getIdentifier()])) { throw new Exception\DuplicateFormElementException(sprintf('A form element wi...
php
public function registerRenderable(Renderable\RenderableInterface $renderable) { if ($renderable instanceof FormElementInterface) { if (isset($this->elementsByIdentifier[$renderable->getIdentifier()])) { throw new Exception\DuplicateFormElementException(sprintf('A form element wi...
[ "public", "function", "registerRenderable", "(", "Renderable", "\\", "RenderableInterface", "$", "renderable", ")", "{", "if", "(", "$", "renderable", "instanceof", "FormElementInterface", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "elementsByIdentifier...
Add an element to the ElementsByIdentifier Cache. @param Renderable\RenderableInterface $renderable @return void @throws Exception\DuplicateFormElementException @internal
[ "Add", "an", "element", "to", "the", "ElementsByIdentifier", "Cache", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/FormDefinition.php#L548-L556
188,319
neos/form
Classes/Core/Model/FormDefinition.php
FormDefinition.unregisterRenderable
public function unregisterRenderable(Renderable\RenderableInterface $renderable) { if ($renderable instanceof FormElementInterface) { unset($this->elementsByIdentifier[$renderable->getIdentifier()]); } }
php
public function unregisterRenderable(Renderable\RenderableInterface $renderable) { if ($renderable instanceof FormElementInterface) { unset($this->elementsByIdentifier[$renderable->getIdentifier()]); } }
[ "public", "function", "unregisterRenderable", "(", "Renderable", "\\", "RenderableInterface", "$", "renderable", ")", "{", "if", "(", "$", "renderable", "instanceof", "FormElementInterface", ")", "{", "unset", "(", "$", "this", "->", "elementsByIdentifier", "[", "...
Remove an element from the ElementsByIdentifier cache @param Renderable\RenderableInterface $renderable @return void @internal
[ "Remove", "an", "element", "from", "the", "ElementsByIdentifier", "cache" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/FormDefinition.php#L565-L570
188,320
neos/form
Classes/Core/Model/FormDefinition.php
FormDefinition.getElementByIdentifier
public function getElementByIdentifier($elementIdentifier) { return isset($this->elementsByIdentifier[$elementIdentifier]) ? $this->elementsByIdentifier[$elementIdentifier] : null; }
php
public function getElementByIdentifier($elementIdentifier) { return isset($this->elementsByIdentifier[$elementIdentifier]) ? $this->elementsByIdentifier[$elementIdentifier] : null; }
[ "public", "function", "getElementByIdentifier", "(", "$", "elementIdentifier", ")", "{", "return", "isset", "(", "$", "this", "->", "elementsByIdentifier", "[", "$", "elementIdentifier", "]", ")", "?", "$", "this", "->", "elementsByIdentifier", "[", "$", "elemen...
Get a Form Element by its identifier If identifier does not exist, returns NULL. @param string $elementIdentifier @return FormElementInterface The element with the given $elementIdentifier or NULL if none found @api
[ "Get", "a", "Form", "Element", "by", "its", "identifier" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/FormDefinition.php#L581-L584
188,321
neos/form
Classes/Core/Model/FormDefinition.php
FormDefinition.addElementDefaultValue
public function addElementDefaultValue($elementIdentifier, $defaultValue) { $this->elementDefaultValues = Arrays::setValueByPath($this->elementDefaultValues, $elementIdentifier, $defaultValue); }
php
public function addElementDefaultValue($elementIdentifier, $defaultValue) { $this->elementDefaultValues = Arrays::setValueByPath($this->elementDefaultValues, $elementIdentifier, $defaultValue); }
[ "public", "function", "addElementDefaultValue", "(", "$", "elementIdentifier", ",", "$", "defaultValue", ")", "{", "$", "this", "->", "elementDefaultValues", "=", "Arrays", "::", "setValueByPath", "(", "$", "this", "->", "elementDefaultValues", ",", "$", "elementI...
Sets the default value of a form element @param string $elementIdentifier identifier of the form element. This supports property paths! @param mixed $defaultValue @return void @internal
[ "Sets", "the", "default", "value", "of", "a", "form", "element" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/FormDefinition.php#L594-L597
188,322
neos/form
Classes/Factory/ArrayFormFactory.php
ArrayFormFactory.build
public function build(array $configuration, $presetName) { $formDefaults = $this->getPresetConfiguration($presetName); $form = isset($configuration['type']) ? new FormDefinition($configuration['identifier'], $formDefaults, $configuration['type']) : new FormDefinition($config...
php
public function build(array $configuration, $presetName) { $formDefaults = $this->getPresetConfiguration($presetName); $form = isset($configuration['type']) ? new FormDefinition($configuration['identifier'], $formDefaults, $configuration['type']) : new FormDefinition($config...
[ "public", "function", "build", "(", "array", "$", "configuration", ",", "$", "presetName", ")", "{", "$", "formDefaults", "=", "$", "this", "->", "getPresetConfiguration", "(", "$", "presetName", ")", ";", "$", "form", "=", "isset", "(", "$", "configuratio...
Build a form definition, depending on some configuration and a "Preset Name". @param array $configuration @param string $presetName @return \Neos\Form\Core\Model\FormDefinition
[ "Build", "a", "form", "definition", "depending", "on", "some", "configuration", "and", "a", "Preset", "Name", "." ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Factory/ArrayFormFactory.php#L35-L58
188,323
neos/form
Classes/Core/Model/AbstractFormElement.php
AbstractFormElement.getUniqueIdentifier
public function getUniqueIdentifier() { $formDefinition = $this->getRootForm(); $uniqueIdentifier = sprintf('%s-%s', $formDefinition->getIdentifier(), $this->identifier); $uniqueIdentifier = preg_replace('/[^a-zA-Z0-9-_]/', '_', $uniqueIdentifier); return lcfirst($uniqueIdentifier); ...
php
public function getUniqueIdentifier() { $formDefinition = $this->getRootForm(); $uniqueIdentifier = sprintf('%s-%s', $formDefinition->getIdentifier(), $this->identifier); $uniqueIdentifier = preg_replace('/[^a-zA-Z0-9-_]/', '_', $uniqueIdentifier); return lcfirst($uniqueIdentifier); ...
[ "public", "function", "getUniqueIdentifier", "(", ")", "{", "$", "formDefinition", "=", "$", "this", "->", "getRootForm", "(", ")", ";", "$", "uniqueIdentifier", "=", "sprintf", "(", "'%s-%s'", ",", "$", "formDefinition", "->", "getIdentifier", "(", ")", ","...
Get the global unique identifier of the element @return string
[ "Get", "the", "global", "unique", "identifier", "of", "the", "element" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/AbstractFormElement.php#L88-L94
188,324
neos/form
Classes/Core/Model/AbstractFormElement.php
AbstractFormElement.setDefaultValue
public function setDefaultValue($defaultValue) { $formDefinition = $this->getRootForm(); $formDefinition->addElementDefaultValue($this->identifier, $defaultValue); }
php
public function setDefaultValue($defaultValue) { $formDefinition = $this->getRootForm(); $formDefinition->addElementDefaultValue($this->identifier, $defaultValue); }
[ "public", "function", "setDefaultValue", "(", "$", "defaultValue", ")", "{", "$", "formDefinition", "=", "$", "this", "->", "getRootForm", "(", ")", ";", "$", "formDefinition", "->", "addElementDefaultValue", "(", "$", "this", "->", "identifier", ",", "$", "...
Set the default value of the element @param mixed $defaultValue @return void
[ "Set", "the", "default", "value", "of", "the", "element" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/Core/Model/AbstractFormElement.php#L113-L117
188,325
neos/form
Classes/ViewHelpers/Form/UploadedImageViewHelper.php
UploadedImageViewHelper.getUploadedImage
protected function getUploadedImage() { if ($this->getMappingResultsForProperty()->hasErrors()) { return null; } $image = $this->getPropertyValue(); if ($image instanceof Image) { return $image; } return $this->propertyMapper->convert($this->ge...
php
protected function getUploadedImage() { if ($this->getMappingResultsForProperty()->hasErrors()) { return null; } $image = $this->getPropertyValue(); if ($image instanceof Image) { return $image; } return $this->propertyMapper->convert($this->ge...
[ "protected", "function", "getUploadedImage", "(", ")", "{", "if", "(", "$", "this", "->", "getMappingResultsForProperty", "(", ")", "->", "hasErrors", "(", ")", ")", "{", "return", "null", ";", "}", "$", "image", "=", "$", "this", "->", "getPropertyValue",...
Returns a previously uploaded image. If errors occurred during property mapping for this property, NULL is returned @return Image
[ "Returns", "a", "previously", "uploaded", "image", ".", "If", "errors", "occurred", "during", "property", "mapping", "for", "this", "property", "NULL", "is", "returned" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/ViewHelpers/Form/UploadedImageViewHelper.php#L77-L87
188,326
neos/form
Migrations/Code/Version20160601101500.php
Version20160601101500.renameTranslationPackage
public function renameTranslationPackage(array &$preset) { foreach ($preset as $key => $value) { if (is_array($value)) { if (isset($value['renderingOptions']['translationPackage'])) { $value['renderingOptions']['validationErrorTranslationPackage'] = $value['re...
php
public function renameTranslationPackage(array &$preset) { foreach ($preset as $key => $value) { if (is_array($value)) { if (isset($value['renderingOptions']['translationPackage'])) { $value['renderingOptions']['validationErrorTranslationPackage'] = $value['re...
[ "public", "function", "renameTranslationPackage", "(", "array", "&", "$", "preset", ")", "{", "foreach", "(", "$", "preset", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "if", "(", "isset", ...
Recurse into the given preset and rename translationPackage to validationErrorTranslationPackage @param array $preset @return array
[ "Recurse", "into", "the", "given", "preset", "and", "rename", "translationPackage", "to", "validationErrorTranslationPackage" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Migrations/Code/Version20160601101500.php#L54-L67
188,327
neos/form
Classes/ViewHelpers/Form/DatePickerViewHelper.php
DatePickerViewHelper.render
public function render($dateFormat = 'Y-m-d', $enableDatePicker = true) { $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); $this->tag->addAttribute('type', 'date'); $this->tag->addAttribute('name', $name . '[date]'); if ($enableDatePicker) { ...
php
public function render($dateFormat = 'Y-m-d', $enableDatePicker = true) { $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); $this->tag->addAttribute('type', 'date'); $this->tag->addAttribute('name', $name . '[date]'); if ($enableDatePicker) { ...
[ "public", "function", "render", "(", "$", "dateFormat", "=", "'Y-m-d'", ",", "$", "enableDatePicker", "=", "true", ")", "{", "$", "name", "=", "$", "this", "->", "getName", "(", ")", ";", "$", "this", "->", "registerFieldNameForFormTokenGeneration", "(", "...
Renders the text field, hidden field and required javascript @param string $dateFormat @param boolean $enableDatePicker @return string
[ "Renders", "the", "text", "field", "hidden", "field", "and", "required", "javascript" ]
5a4de206f68a24384ee30d712f57fd9fd30a187d
https://github.com/neos/form/blob/5a4de206f68a24384ee30d712f57fd9fd30a187d/Classes/ViewHelpers/Form/DatePickerViewHelper.php#L60-L103
188,328
giansalex/ubl-validator
src/Ubl/Resolver/UblPathResolver.php
UblPathResolver.getPath
function getPath(\DOMDocument $document) { $name = $document->documentElement->localName; if (empty($this->version)) { $this->loadVersion($document); } $path = $this->getFullPath($name); return $path; }
php
function getPath(\DOMDocument $document) { $name = $document->documentElement->localName; if (empty($this->version)) { $this->loadVersion($document); } $path = $this->getFullPath($name); return $path; }
[ "function", "getPath", "(", "\\", "DOMDocument", "$", "document", ")", "{", "$", "name", "=", "$", "document", "->", "documentElement", "->", "localName", ";", "if", "(", "empty", "(", "$", "this", "->", "version", ")", ")", "{", "$", "this", "->", "...
Get Path XSD. @param \DOMDocument $document @return string|null
[ "Get", "Path", "XSD", "." ]
a1aab4ece6b34a097e466dd192a5e7c86a708e8e
https://github.com/giansalex/ubl-validator/blob/a1aab4ece6b34a097e466dd192a5e7c86a708e8e/src/Ubl/Resolver/UblPathResolver.php#L52-L61
188,329
giansalex/ubl-validator
src/Ubl/Resolver/UblVersionResolver.php
UblVersionResolver.getVersion
public function getVersion(\DOMDocument $document) { if (empty($document->documentElement)) { return ''; } $xpath = $this->getXpath($document); $this->setNs($document); $xpath->registerNamespace('cbc', self::CBC_NS); return $this->getSingleValue($xpath, ...
php
public function getVersion(\DOMDocument $document) { if (empty($document->documentElement)) { return ''; } $xpath = $this->getXpath($document); $this->setNs($document); $xpath->registerNamespace('cbc', self::CBC_NS); return $this->getSingleValue($xpath, ...
[ "public", "function", "getVersion", "(", "\\", "DOMDocument", "$", "document", ")", "{", "if", "(", "empty", "(", "$", "document", "->", "documentElement", ")", ")", "{", "return", "''", ";", "}", "$", "xpath", "=", "$", "this", "->", "getXpath", "(", ...
UBL Version resolver. @param \DOMDocument $document @return string
[ "UBL", "Version", "resolver", "." ]
a1aab4ece6b34a097e466dd192a5e7c86a708e8e
https://github.com/giansalex/ubl-validator/blob/a1aab4ece6b34a097e466dd192a5e7c86a708e8e/src/Ubl/Resolver/UblVersionResolver.php#L30-L41
188,330
joseluisq/gimage
src/Text.php
Text.setColor
public function setColor($red, $green, $blue) { $this->red = $red; $this->green = $green; $this->blue = $blue; return $this; }
php
public function setColor($red, $green, $blue) { $this->red = $red; $this->green = $green; $this->blue = $blue; return $this; }
[ "public", "function", "setColor", "(", "$", "red", ",", "$", "green", ",", "$", "blue", ")", "{", "$", "this", "->", "red", "=", "$", "red", ";", "$", "this", "->", "green", "=", "$", "green", ";", "$", "this", "->", "blue", "=", "$", "blue", ...
Sets RGB color for text. @access public @param int $red Red color. @param int $green Green color. @param int $blue Blue color. @return $this
[ "Sets", "RGB", "color", "for", "text", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Text.php#L87-L94
188,331
joseluisq/gimage
src/Text.php
Text.wrappText
public function wrappText() { $wrapp = $this->getWrappedText( $this->size, $this->angle, $this->fontface, $this->string, $this->width ); return $wrapp; }
php
public function wrappText() { $wrapp = $this->getWrappedText( $this->size, $this->angle, $this->fontface, $this->string, $this->width ); return $wrapp; }
[ "public", "function", "wrappText", "(", ")", "{", "$", "wrapp", "=", "$", "this", "->", "getWrappedText", "(", "$", "this", "->", "size", ",", "$", "this", "->", "angle", ",", "$", "this", "->", "fontface", ",", "$", "this", "->", "string", ",", "$...
Wrapps the text. @access public @return array
[ "Wrapps", "the", "text", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Text.php#L267-L278
188,332
joseluisq/gimage
src/Text.php
Text.getWrappedText
public function getWrappedText($size, $angle, $fontface, $string, $width = 100) { $str = ''; $words = explode(' ', $string); foreach ($words as $word) { $testStr = $str . ' ' . $word; $box = imagettfbbox($size, $angle, $fontface, $testStr); if ($box[2] >...
php
public function getWrappedText($size, $angle, $fontface, $string, $width = 100) { $str = ''; $words = explode(' ', $string); foreach ($words as $word) { $testStr = $str . ' ' . $word; $box = imagettfbbox($size, $angle, $fontface, $testStr); if ($box[2] >...
[ "public", "function", "getWrappedText", "(", "$", "size", ",", "$", "angle", ",", "$", "fontface", ",", "$", "string", ",", "$", "width", "=", "100", ")", "{", "$", "str", "=", "''", ";", "$", "words", "=", "explode", "(", "' '", ",", "$", "strin...
Gets wrapped text. @access public @param int $size Font size fot the text. @param int $angle Angole for the text. @param string $fontface Path of TTF font. @param string $string String text. @param int $width Width for text box area. @return array
[ "Gets", "wrapped", "text", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Text.php#L291-L311
188,333
joseluisq/gimage
src/Text.php
Text.getBoundingBox
private function getBoundingBox($fontSize, $fontAngle, $fontFile, $text) { $box = imagettfbbox($fontSize, $fontAngle, $fontFile, $text); if (!$box) { return false; } $minX = min([$box[0], $box[2], $box[4], $box[6]]); $maxX = max([$box[0], $box[2], $box[4], $box[...
php
private function getBoundingBox($fontSize, $fontAngle, $fontFile, $text) { $box = imagettfbbox($fontSize, $fontAngle, $fontFile, $text); if (!$box) { return false; } $minX = min([$box[0], $box[2], $box[4], $box[6]]); $maxX = max([$box[0], $box[2], $box[4], $box[...
[ "private", "function", "getBoundingBox", "(", "$", "fontSize", ",", "$", "fontAngle", ",", "$", "fontFile", ",", "$", "text", ")", "{", "$", "box", "=", "imagettfbbox", "(", "$", "fontSize", ",", "$", "fontAngle", ",", "$", "fontFile", ",", "$", "text"...
Calculates bounding box of text using the TrueType font. Returns an array with 'left', 'top', 'width' and 'height' values. @author <blackbart@simail.it> <http://www.php.net/manual/en/function.imagettfbbox.php#97357> @access public @param int $fontSize Font size fot the text. @param int $fontAngle Angole for the text. ...
[ "Calculates", "bounding", "box", "of", "text", "using", "the", "TrueType", "font", ".", "Returns", "an", "array", "with", "left", "top", "width", "and", "height", "values", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Text.php#L325-L375
188,334
joseluisq/gimage
src/Image.php
Image.from
public function from($element = null) { if (!empty($element) && $element instanceof Image) { foreach (get_object_vars($element) as $key => $value) { $this->$key = $value; } return $this; } }
php
public function from($element = null) { if (!empty($element) && $element instanceof Image) { foreach (get_object_vars($element) as $key => $value) { $this->$key = $value; } return $this; } }
[ "public", "function", "from", "(", "$", "element", "=", "null", ")", "{", "if", "(", "!", "empty", "(", "$", "element", ")", "&&", "$", "element", "instanceof", "Image", ")", "{", "foreach", "(", "get_object_vars", "(", "$", "element", ")", "as", "$"...
Loads an image from Image or Figure class. @access public @param Image $element Image or Figure class. @return \GImage\Image
[ "Loads", "an", "image", "from", "Image", "or", "Figure", "class", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L79-L88
188,335
joseluisq/gimage
src/Image.php
Image.load
public function load($src) { if (empty($src)) { return $this; } if ($this->isImageStringByString($src)) { $this->loadImageFromString($src); } elseif (filter_var($src, FILTER_VALIDATE_URL)) { $this->loadImageFromURL($src); } elseif (is_file...
php
public function load($src) { if (empty($src)) { return $this; } if ($this->isImageStringByString($src)) { $this->loadImageFromString($src); } elseif (filter_var($src, FILTER_VALIDATE_URL)) { $this->loadImageFromURL($src); } elseif (is_file...
[ "public", "function", "load", "(", "$", "src", ")", "{", "if", "(", "empty", "(", "$", "src", ")", ")", "{", "return", "$", "this", ";", "}", "if", "(", "$", "this", "->", "isImageStringByString", "(", "$", "src", ")", ")", "{", "$", "this", "-...
Loads an image from a local path, external url or image string. @package GImage @access public @param string $src Local path, external url or image string. @return \GImage\Image
[ "Loads", "an", "image", "from", "a", "local", "path", "external", "url", "or", "image", "string", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L98-L113
188,336
joseluisq/gimage
src/Image.php
Image.loadImageFromURL
private function loadImageFromURL($url) { $image = $this->fetchImageContentFromURL($url); if (empty($image)) { return; } if (Utils::isJPGResource($image)) { $this->filename = $url; $this->extension = 'jpg'; $this->type = IMAGETYPE_JPE...
php
private function loadImageFromURL($url) { $image = $this->fetchImageContentFromURL($url); if (empty($image)) { return; } if (Utils::isJPGResource($image)) { $this->filename = $url; $this->extension = 'jpg'; $this->type = IMAGETYPE_JPE...
[ "private", "function", "loadImageFromURL", "(", "$", "url", ")", "{", "$", "image", "=", "$", "this", "->", "fetchImageContentFromURL", "(", "$", "url", ")", ";", "if", "(", "empty", "(", "$", "image", ")", ")", "{", "return", ";", "}", "if", "(", ...
Load an image from URL. @param string $url Image URL @return void
[ "Load", "an", "image", "from", "URL", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L121-L145
188,337
joseluisq/gimage
src/Image.php
Image.fetchImageContentFromURL
private function fetchImageContentFromURL($url) { $data = null; if ($stream = fopen($url, 'r')) { $data = stream_get_contents($stream); fclose($stream); } return $data; }
php
private function fetchImageContentFromURL($url) { $data = null; if ($stream = fopen($url, 'r')) { $data = stream_get_contents($stream); fclose($stream); } return $data; }
[ "private", "function", "fetchImageContentFromURL", "(", "$", "url", ")", "{", "$", "data", "=", "null", ";", "if", "(", "$", "stream", "=", "fopen", "(", "$", "url", ",", "'r'", ")", ")", "{", "$", "data", "=", "stream_get_contents", "(", "$", "strea...
Fetch an image string content from URL. @param string $url Image URL. @return string String data
[ "Fetch", "an", "image", "string", "content", "from", "URL", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L153-L163
188,338
joseluisq/gimage
src/Image.php
Image.loadImageFromString
private function loadImageFromString($imagestring) { if (Utils::isJPGResource($imagestring)) { $this->extension = 'jpg'; $this->type = IMAGETYPE_JPEG; } if (Utils::isPNGResource($imagestring)) { $this->extension = 'png'; $this->type = IMAGETYP...
php
private function loadImageFromString($imagestring) { if (Utils::isJPGResource($imagestring)) { $this->extension = 'jpg'; $this->type = IMAGETYPE_JPEG; } if (Utils::isPNGResource($imagestring)) { $this->extension = 'png'; $this->type = IMAGETYP...
[ "private", "function", "loadImageFromString", "(", "$", "imagestring", ")", "{", "if", "(", "Utils", "::", "isJPGResource", "(", "$", "imagestring", ")", ")", "{", "$", "this", "->", "extension", "=", "'jpg'", ";", "$", "this", "->", "type", "=", "IMAGET...
Load an image from image string. @param string $imagestring Image string @return void
[ "Load", "an", "image", "from", "image", "string", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L171-L187
188,339
joseluisq/gimage
src/Image.php
Image.loadImageFromFile
private function loadImageFromFile($filepath) { $this->from = 'local'; $this->filename = $filepath; if (!is_readable($filepath)) { return; } $image = null; $extension = ''; list($width, $height, $imageType) = getimagesize($filepath); swi...
php
private function loadImageFromFile($filepath) { $this->from = 'local'; $this->filename = $filepath; if (!is_readable($filepath)) { return; } $image = null; $extension = ''; list($width, $height, $imageType) = getimagesize($filepath); swi...
[ "private", "function", "loadImageFromFile", "(", "$", "filepath", ")", "{", "$", "this", "->", "from", "=", "'local'", ";", "$", "this", "->", "filename", "=", "$", "filepath", ";", "if", "(", "!", "is_readable", "(", "$", "filepath", ")", ")", "{", ...
Load an image file from path. @param string $filepath File path @return void
[ "Load", "an", "image", "file", "from", "path", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L206-L243
188,340
joseluisq/gimage
src/Image.php
Image.toJPG
public function toJPG() { $this->extension = 'jpg'; $this->type = IMAGETYPE_JPEG; $this->mimetype = Utils::getMimetypeByImageType(IMAGETYPE_JPEG); return $this; }
php
public function toJPG() { $this->extension = 'jpg'; $this->type = IMAGETYPE_JPEG; $this->mimetype = Utils::getMimetypeByImageType(IMAGETYPE_JPEG); return $this; }
[ "public", "function", "toJPG", "(", ")", "{", "$", "this", "->", "extension", "=", "'jpg'", ";", "$", "this", "->", "type", "=", "IMAGETYPE_JPEG", ";", "$", "this", "->", "mimetype", "=", "Utils", "::", "getMimetypeByImageType", "(", "IMAGETYPE_JPEG", ")",...
Changes output format to JPG. @access public @return \GImage\Image
[ "Changes", "output", "format", "to", "JPG", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L610-L616
188,341
joseluisq/gimage
src/Image.php
Image.toPNG
public function toPNG() { $this->extension = 'png'; $this->type = IMAGETYPE_PNG; $this->mimetype = Utils::getMimetypeByImageType(IMAGETYPE_PNG); return $this; }
php
public function toPNG() { $this->extension = 'png'; $this->type = IMAGETYPE_PNG; $this->mimetype = Utils::getMimetypeByImageType(IMAGETYPE_PNG); return $this; }
[ "public", "function", "toPNG", "(", ")", "{", "$", "this", "->", "extension", "=", "'png'", ";", "$", "this", "->", "type", "=", "IMAGETYPE_PNG", ";", "$", "this", "->", "mimetype", "=", "Utils", "::", "getMimetypeByImageType", "(", "IMAGETYPE_PNG", ")", ...
Changes output format to PNG. @access public @return \GImage\Image
[ "Changes", "output", "format", "to", "PNG", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L624-L630
188,342
joseluisq/gimage
src/Image.php
Image.toGIF
public function toGIF() { $this->extension = 'gif'; $this->type = IMAGETYPE_GIF; $this->mimetype = Utils::getMimetypeByImageType(IMAGETYPE_GIF); return $this; }
php
public function toGIF() { $this->extension = 'gif'; $this->type = IMAGETYPE_GIF; $this->mimetype = Utils::getMimetypeByImageType(IMAGETYPE_GIF); return $this; }
[ "public", "function", "toGIF", "(", ")", "{", "$", "this", "->", "extension", "=", "'gif'", ";", "$", "this", "->", "type", "=", "IMAGETYPE_GIF", ";", "$", "this", "->", "mimetype", "=", "Utils", "::", "getMimetypeByImageType", "(", "IMAGETYPE_GIF", ")", ...
Changes output format to GIF. @access public @return \GImage\Image
[ "Changes", "output", "format", "to", "GIF", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L638-L644
188,343
joseluisq/gimage
src/Image.php
Image.resizeToHeight
public function resizeToHeight($height) { $width = $this->getPropWidth($height); $this->resize($width, $height); return $this; }
php
public function resizeToHeight($height) { $width = $this->getPropWidth($height); $this->resize($width, $height); return $this; }
[ "public", "function", "resizeToHeight", "(", "$", "height", ")", "{", "$", "width", "=", "$", "this", "->", "getPropWidth", "(", "$", "height", ")", ";", "$", "this", "->", "resize", "(", "$", "width", ",", "$", "height", ")", ";", "return", "$", "...
Resize image proportionally basing on the height of the image. @access public @param int $height @return \GImage\Image
[ "Resize", "image", "proportionally", "basing", "on", "the", "height", "of", "the", "image", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L666-L672
188,344
joseluisq/gimage
src/Image.php
Image.resizeToWidth
public function resizeToWidth($width) { $height = $this->getPropHeight($width); $this->resize($width, $height); return $this; }
php
public function resizeToWidth($width) { $height = $this->getPropHeight($width); $this->resize($width, $height); return $this; }
[ "public", "function", "resizeToWidth", "(", "$", "width", ")", "{", "$", "height", "=", "$", "this", "->", "getPropHeight", "(", "$", "width", ")", ";", "$", "this", "->", "resize", "(", "$", "width", ",", "$", "height", ")", ";", "return", "$", "t...
Resize image proportionally basing on the width of the image. @access public @param int $width @return \GImage\Image
[ "Resize", "image", "proportionally", "basing", "on", "the", "width", "of", "the", "image", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L681-L687
188,345
joseluisq/gimage
src/Image.php
Image.getPropWidth
public function getPropWidth($height) { $ratio = (int) $height / $this->height; return $this->width * $ratio; }
php
public function getPropWidth($height) { $ratio = (int) $height / $this->height; return $this->width * $ratio; }
[ "public", "function", "getPropWidth", "(", "$", "height", ")", "{", "$", "ratio", "=", "(", "int", ")", "$", "height", "/", "$", "this", "->", "height", ";", "return", "$", "this", "->", "width", "*", "$", "ratio", ";", "}" ]
Gets proportional width of image from height value. @access public @param int $height @return int
[ "Gets", "proportional", "width", "of", "image", "from", "height", "value", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L696-L700
188,346
joseluisq/gimage
src/Image.php
Image.getPropHeight
public function getPropHeight($width) { $ratio = (int) $width / $this->width; return $this->height * $ratio; }
php
public function getPropHeight($width) { $ratio = (int) $width / $this->width; return $this->height * $ratio; }
[ "public", "function", "getPropHeight", "(", "$", "width", ")", "{", "$", "ratio", "=", "(", "int", ")", "$", "width", "/", "$", "this", "->", "width", ";", "return", "$", "this", "->", "height", "*", "$", "ratio", ";", "}" ]
Gets proportional height of image from width value. @access public @param int $width @return int
[ "Gets", "proportional", "height", "of", "image", "from", "width", "value", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L709-L714
188,347
joseluisq/gimage
src/Image.php
Image.scale
public function scale($scale = 1) { if ($scale > 1) { $scale = 1; } $width = (int) $this->width * $scale; $height = (int) $this->height * $scale; $this->resize($width, $height); return $this; }
php
public function scale($scale = 1) { if ($scale > 1) { $scale = 1; } $width = (int) $this->width * $scale; $height = (int) $this->height * $scale; $this->resize($width, $height); return $this; }
[ "public", "function", "scale", "(", "$", "scale", "=", "1", ")", "{", "if", "(", "$", "scale", ">", "1", ")", "{", "$", "scale", "=", "1", ";", "}", "$", "width", "=", "(", "int", ")", "$", "this", "->", "width", "*", "$", "scale", ";", "$"...
Scales the image. @access public @param int|double $scale @return \GImage\Image
[ "Scales", "the", "image", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L723-L735
188,348
joseluisq/gimage
src/Image.php
Image.rotate
public function rotate($angle = 0) { if ($this->resource) { $this->resource = imagerotate($this->resource, $angle, 0); } return $this; }
php
public function rotate($angle = 0) { if ($this->resource) { $this->resource = imagerotate($this->resource, $angle, 0); } return $this; }
[ "public", "function", "rotate", "(", "$", "angle", "=", "0", ")", "{", "if", "(", "$", "this", "->", "resource", ")", "{", "$", "this", "->", "resource", "=", "imagerotate", "(", "$", "this", "->", "resource", ",", "$", "angle", ",", "0", ")", ";...
Rotate the image with a given angle. @access public @param int $angle @return \GImage\Image
[ "Rotate", "the", "image", "with", "a", "given", "angle", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L744-L751
188,349
joseluisq/gimage
src/Image.php
Image.centerCrop
public function centerCrop($width, $height) { $pwidth = $this->getPropWidth($height); $pheight = $this->getPropHeight($width); if ($pwidth == $width && $pheight == $height) { $this->resizeToWidth($width); } else { if ($pheight > $height) { $th...
php
public function centerCrop($width, $height) { $pwidth = $this->getPropWidth($height); $pheight = $this->getPropHeight($width); if ($pwidth == $width && $pheight == $height) { $this->resizeToWidth($width); } else { if ($pheight > $height) { $th...
[ "public", "function", "centerCrop", "(", "$", "width", ",", "$", "height", ")", "{", "$", "pwidth", "=", "$", "this", "->", "getPropWidth", "(", "$", "height", ")", ";", "$", "pheight", "=", "$", "this", "->", "getPropHeight", "(", "$", "width", ")",...
Cuts the image proportionally and centered. @access public @param int $width Width crop. @param int $height Height crop. @return \GImage\Image
[ "Cuts", "the", "image", "proportionally", "and", "centered", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L761-L782
188,350
joseluisq/gimage
src/Image.php
Image.crop
public function crop($width, $height, $x1 = 0, $y1 = 0, $dstX = 0, $dstY = 0) { $this->resize($width, $height, $x1, $y1, $dstX, $dstY, true); return $this; }
php
public function crop($width, $height, $x1 = 0, $y1 = 0, $dstX = 0, $dstY = 0) { $this->resize($width, $height, $x1, $y1, $dstX, $dstY, true); return $this; }
[ "public", "function", "crop", "(", "$", "width", ",", "$", "height", ",", "$", "x1", "=", "0", ",", "$", "y1", "=", "0", ",", "$", "dstX", "=", "0", ",", "$", "dstY", "=", "0", ")", "{", "$", "this", "->", "resize", "(", "$", "width", ",", ...
Cuts part of image. @access public @param int $width Width crop. @param int $height Height crop. @param int $x1 [Optional] x-coordinate of source point. @param int $y1 [Optional] y-coordinate of source point. @param int $dstX [Optional] x-coordinate of destination point. @param int $dstY [Optional] y-coordinate of des...
[ "Cuts", "part", "of", "image", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L796-L801
188,351
joseluisq/gimage
src/Image.php
Image.resize
private function resize($width, $height, $x1 = 0, $y1 = 0, $dstX = 0, $dstY = 0, $isCrop = false) { if ($this->resource && $width > 0 && $height > 0) { $image = imagecreatetruecolor($width, $height); if ($this->isPNG()) { imagealphablending($image, false); ...
php
private function resize($width, $height, $x1 = 0, $y1 = 0, $dstX = 0, $dstY = 0, $isCrop = false) { if ($this->resource && $width > 0 && $height > 0) { $image = imagecreatetruecolor($width, $height); if ($this->isPNG()) { imagealphablending($image, false); ...
[ "private", "function", "resize", "(", "$", "width", ",", "$", "height", ",", "$", "x1", "=", "0", ",", "$", "y1", "=", "0", ",", "$", "dstX", "=", "0", ",", "$", "dstY", "=", "0", ",", "$", "isCrop", "=", "false", ")", "{", "if", "(", "$", ...
Resizes the image. @access private @param int $width Image's width. @param int $height Image's height. @param int $x1 [Optional] Left position @param int $y1 [Optional] Top position @param int $dstX [Optional] x-coordinate of destination point. @param int $dstY [Optional] y-coordinate of destination point. @param bool...
[ "Resizes", "the", "image", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L816-L845
188,352
joseluisq/gimage
src/Image.php
Image.render
public function render() { $image = null; if ($this->resource) { ob_start(); $this->outputBufferByImage(null, $this->quality); $string = ob_get_contents(); ob_end_clean(); if (!empty($string)) { $image = imagecreatefromstr...
php
public function render() { $image = null; if ($this->resource) { ob_start(); $this->outputBufferByImage(null, $this->quality); $string = ob_get_contents(); ob_end_clean(); if (!empty($string)) { $image = imagecreatefromstr...
[ "public", "function", "render", "(", ")", "{", "$", "image", "=", "null", ";", "if", "(", "$", "this", "->", "resource", ")", "{", "ob_start", "(", ")", ";", "$", "this", "->", "outputBufferByImage", "(", "null", ",", "$", "this", "->", "quality", ...
Render the image in-memory and return the resource. @access public @return resource | null Return the resource or null.
[ "Render", "the", "image", "in", "-", "memory", "and", "return", "the", "resource", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L877-L893
188,353
joseluisq/gimage
src/Image.php
Image.outputBuffer
private function outputBuffer($filename = null, $output = false) { if (!$this->resource) { return $this; } if ($output) { $filename = null; } elseif (empty($filename) && $this->isLocal()) { $filename = $this->filename; } elseif (empty($fil...
php
private function outputBuffer($filename = null, $output = false) { if (!$this->resource) { return $this; } if ($output) { $filename = null; } elseif (empty($filename) && $this->isLocal()) { $filename = $this->filename; } elseif (empty($fil...
[ "private", "function", "outputBuffer", "(", "$", "filename", "=", "null", ",", "$", "output", "=", "false", ")", "{", "if", "(", "!", "$", "this", "->", "resource", ")", "{", "return", "$", "this", ";", "}", "if", "(", "$", "output", ")", "{", "$...
Output the image to either the browser or a file. @access private @param string $filename [Optional] Path to save image @param bool $output [Optional] true to output the image. @return \GImage\Image | resource
[ "Output", "the", "image", "to", "either", "the", "browser", "or", "a", "file", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L903-L933
188,354
joseluisq/gimage
src/Image.php
Image.destroy
public function destroy() { if ($this->resource) { imagedestroy($this->resource); } $this->resource = null; return $this; }
php
public function destroy() { if ($this->resource) { imagedestroy($this->resource); } $this->resource = null; return $this; }
[ "public", "function", "destroy", "(", ")", "{", "if", "(", "$", "this", "->", "resource", ")", "{", "imagedestroy", "(", "$", "this", "->", "resource", ")", ";", "}", "$", "this", "->", "resource", "=", "null", ";", "return", "$", "this", ";", "}" ...
Destroys the current resource. @access public @return \GImage\Image
[ "Destroys", "the", "current", "resource", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L966-L975
188,355
joseluisq/gimage
src/Image.php
Image.addOpacityFilter
protected function addOpacityFilter() { $opacity = Utils::fixPNGOpacity($this->opacity); if ($opacity >= 0 && $opacity < 127) { imagealphablending($this->resource, false); imagefilter($this->resource, IMG_FILTER_COLORIZE, 0, 0, 0, $opacity); } }
php
protected function addOpacityFilter() { $opacity = Utils::fixPNGOpacity($this->opacity); if ($opacity >= 0 && $opacity < 127) { imagealphablending($this->resource, false); imagefilter($this->resource, IMG_FILTER_COLORIZE, 0, 0, 0, $opacity); } }
[ "protected", "function", "addOpacityFilter", "(", ")", "{", "$", "opacity", "=", "Utils", "::", "fixPNGOpacity", "(", "$", "this", "->", "opacity", ")", ";", "if", "(", "$", "opacity", ">=", "0", "&&", "$", "opacity", "<", "127", ")", "{", "imagealphab...
Add opacity filter to the current resource. @access protected @return void
[ "Add", "opacity", "filter", "to", "the", "current", "resource", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Image.php#L983-L991
188,356
laravel-notification-channels/backport
src/Notifications/NotificationServiceProvider.php
NotificationServiceProvider.boot
public function boot() { $this->loadViewsFrom(__DIR__.'/resources/views', 'notifications'); if ($this->app->runningInConsole()) { $this->publishes([ __DIR__.'/resources/views' => $this->app->basePath().'/resources/views/vendor/notifications', ], 'laravel-noti...
php
public function boot() { $this->loadViewsFrom(__DIR__.'/resources/views', 'notifications'); if ($this->app->runningInConsole()) { $this->publishes([ __DIR__.'/resources/views' => $this->app->basePath().'/resources/views/vendor/notifications', ], 'laravel-noti...
[ "public", "function", "boot", "(", ")", "{", "$", "this", "->", "loadViewsFrom", "(", "__DIR__", ".", "'/resources/views'", ",", "'notifications'", ")", ";", "if", "(", "$", "this", "->", "app", "->", "runningInConsole", "(", ")", ")", "{", "$", "this", ...
Boot the application services. @return void
[ "Boot", "the", "application", "services", "." ]
51e863387a6dc6e8afe68d24fab6166566f4376a
https://github.com/laravel-notification-channels/backport/blob/51e863387a6dc6e8afe68d24fab6166566f4376a/src/Notifications/NotificationServiceProvider.php#L19-L34
188,357
laravel-notification-channels/backport
src/Notifications/NotificationServiceProvider.php
NotificationServiceProvider.getAppVersion
private function getAppVersion() { $version = $this->app->version(); if (substr($version, 0, 7) === 'Lumen (') { $version = array_first(explode(')', str_replace('Lumen (', '', $version))); } return $version; }
php
private function getAppVersion() { $version = $this->app->version(); if (substr($version, 0, 7) === 'Lumen (') { $version = array_first(explode(')', str_replace('Lumen (', '', $version))); } return $version; }
[ "private", "function", "getAppVersion", "(", ")", "{", "$", "version", "=", "$", "this", "->", "app", "->", "version", "(", ")", ";", "if", "(", "substr", "(", "$", "version", ",", "0", ",", "7", ")", "===", "'Lumen ('", ")", "{", "$", "version", ...
Get the version number of the application. @return string
[ "Get", "the", "version", "number", "of", "the", "application", "." ]
51e863387a6dc6e8afe68d24fab6166566f4376a
https://github.com/laravel-notification-channels/backport/blob/51e863387a6dc6e8afe68d24fab6166566f4376a/src/Notifications/NotificationServiceProvider.php#L79-L86
188,358
laravel-notification-channels/backport
src/Notifications/Console/NotificationTableCommand.php
NotificationTableCommand.createBaseMigration
protected function createBaseMigration() { $name = 'create_notifications_table'; $path = $this->laravel->databasePath().'/migrations'; return $this->laravel['migration.creator']->create($name, $path); }
php
protected function createBaseMigration() { $name = 'create_notifications_table'; $path = $this->laravel->databasePath().'/migrations'; return $this->laravel['migration.creator']->create($name, $path); }
[ "protected", "function", "createBaseMigration", "(", ")", "{", "$", "name", "=", "'create_notifications_table'", ";", "$", "path", "=", "$", "this", "->", "laravel", "->", "databasePath", "(", ")", ".", "'/migrations'", ";", "return", "$", "this", "->", "lar...
Create a base migration file for the notifications. @return string
[ "Create", "a", "base", "migration", "file", "for", "the", "notifications", "." ]
51e863387a6dc6e8afe68d24fab6166566f4376a
https://github.com/laravel-notification-channels/backport/blob/51e863387a6dc6e8afe68d24fab6166566f4376a/src/Notifications/Console/NotificationTableCommand.php#L89-L96
188,359
joseluisq/gimage
src/Canvas.php
Canvas.append
public function append($elements) { if (!empty($elements)) { $elements = is_array($elements) ? $elements : [$elements]; foreach ($elements as $element) { if ($element instanceof Image || $element instanceof Text) { $this->elementList[] = $element;...
php
public function append($elements) { if (!empty($elements)) { $elements = is_array($elements) ? $elements : [$elements]; foreach ($elements as $element) { if ($element instanceof Image || $element instanceof Text) { $this->elementList[] = $element;...
[ "public", "function", "append", "(", "$", "elements", ")", "{", "if", "(", "!", "empty", "(", "$", "elements", ")", ")", "{", "$", "elements", "=", "is_array", "(", "$", "elements", ")", "?", "$", "elements", ":", "[", "$", "elements", "]", ";", ...
Adds one or more elements to canvas. @param mixed $elements Single or array of Image, Figure, Text classes. @access public @return \GImage\Canvas
[ "Adds", "one", "or", "more", "elements", "to", "canvas", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Canvas.php#L48-L61
188,360
joseluisq/gimage
src/Canvas.php
Canvas.draw
public function draw() { $canvas = $this->resource; if ($canvas) { foreach ($this->elementList as $element) { if ($element instanceof Image) { $this->drawImage($element, $canvas); } if ($element instanceof Text) { ...
php
public function draw() { $canvas = $this->resource; if ($canvas) { foreach ($this->elementList as $element) { if ($element instanceof Image) { $this->drawImage($element, $canvas); } if ($element instanceof Text) { ...
[ "public", "function", "draw", "(", ")", "{", "$", "canvas", "=", "$", "this", "->", "resource", ";", "if", "(", "$", "canvas", ")", "{", "foreach", "(", "$", "this", "->", "elementList", "as", "$", "element", ")", "{", "if", "(", "$", "element", ...
Draws the canvas. @access public @return \GImage\Canvas @throws \Exception
[ "Draws", "the", "canvas", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Canvas.php#L70-L94
188,361
joseluisq/gimage
src/Canvas.php
Canvas.drawImage
private function drawImage($element, $canvas) { $image = $element->getResource(); imagecopyresampled( $canvas, $image, $element->getLeft(), $element->getTop(), $element->getBoxLeft(), $element->getBoxTop(), $element...
php
private function drawImage($element, $canvas) { $image = $element->getResource(); imagecopyresampled( $canvas, $image, $element->getLeft(), $element->getTop(), $element->getBoxLeft(), $element->getBoxTop(), $element...
[ "private", "function", "drawImage", "(", "$", "element", ",", "$", "canvas", ")", "{", "$", "image", "=", "$", "element", "->", "getResource", "(", ")", ";", "imagecopyresampled", "(", "$", "canvas", ",", "$", "image", ",", "$", "element", "->", "getLe...
Draw the an Image or Figure element. @param \GImage\Image|\GImage\Figure $element Image or Figure element. @param mixed $canvas @return void
[ "Draw", "the", "an", "Image", "or", "Figure", "element", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Canvas.php#L103-L119
188,362
joseluisq/gimage
src/Canvas.php
Canvas.drawText
private function drawText(Text $text, $canvas) { list($red, $green, $blue) = $text->getColor(); $opacity = Utils::fixPNGOpacity($text->getOpacity()); $color = imagecolorallocatealpha( $canvas, $red, $green, $blue, $opacity < 127 ? ...
php
private function drawText(Text $text, $canvas) { list($red, $green, $blue) = $text->getColor(); $opacity = Utils::fixPNGOpacity($text->getOpacity()); $color = imagecolorallocatealpha( $canvas, $red, $green, $blue, $opacity < 127 ? ...
[ "private", "function", "drawText", "(", "Text", "$", "text", ",", "$", "canvas", ")", "{", "list", "(", "$", "red", ",", "$", "green", ",", "$", "blue", ")", "=", "$", "text", "->", "getColor", "(", ")", ";", "$", "opacity", "=", "Utils", "::", ...
Draw a Text element. @param \GImage\Text $text Text element. @param mixed $canvas @return void
[ "Draw", "a", "Text", "element", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Canvas.php#L128-L155
188,363
joseluisq/gimage
src/Figure.php
Figure.setSize
public function setSize($width = 0, $height = 0) { if (!empty($width) && !empty($height)) { $this->width = $this->boxWidth = $width; $this->height = $this->boxHeight = $height; } return $this; }
php
public function setSize($width = 0, $height = 0) { if (!empty($width) && !empty($height)) { $this->width = $this->boxWidth = $width; $this->height = $this->boxHeight = $height; } return $this; }
[ "public", "function", "setSize", "(", "$", "width", "=", "0", ",", "$", "height", "=", "0", ")", "{", "if", "(", "!", "empty", "(", "$", "width", ")", "&&", "!", "empty", "(", "$", "height", ")", ")", "{", "$", "this", "->", "width", "=", "$"...
Sets size to figure. @access public @param int $width Width. @param int $height Height. @return \GImage\Figure
[ "Sets", "size", "to", "figure", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Figure.php#L55-L63
188,364
joseluisq/gimage
src/Figure.php
Figure.setBackgroundColor
public function setBackgroundColor($red, $green, $blue) { $this->red = $red; $this->green = $green; $this->blue = $blue; return $this; }
php
public function setBackgroundColor($red, $green, $blue) { $this->red = $red; $this->green = $green; $this->blue = $blue; return $this; }
[ "public", "function", "setBackgroundColor", "(", "$", "red", ",", "$", "green", ",", "$", "blue", ")", "{", "$", "this", "->", "red", "=", "$", "red", ";", "$", "this", "->", "green", "=", "$", "green", ";", "$", "this", "->", "blue", "=", "$", ...
Sets background color in RGB format. @access public @param int $red Red. @param int $green Green. @param int $blue Blue. @return \GImage\Figure
[ "Sets", "background", "color", "in", "RGB", "format", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Figure.php#L98-L105
188,365
joseluisq/gimage
src/Figure.php
Figure.create
public function create() { $this->resource = imagecreatetruecolor($this->width, $this->height); imagesavealpha($this->resource, true); $color = imagecolorallocatealpha( $this->resource, $this->red, $this->green, $this->blue, null ...
php
public function create() { $this->resource = imagecreatetruecolor($this->width, $this->height); imagesavealpha($this->resource, true); $color = imagecolorallocatealpha( $this->resource, $this->red, $this->green, $this->blue, null ...
[ "public", "function", "create", "(", ")", "{", "$", "this", "->", "resource", "=", "imagecreatetruecolor", "(", "$", "this", "->", "width", ",", "$", "this", "->", "height", ")", ";", "imagesavealpha", "(", "$", "this", "->", "resource", ",", "true", "...
Creates the figure with alpha channel. @access public @return \GImage\Figure
[ "Creates", "the", "figure", "with", "alpha", "channel", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Figure.php#L124-L148
188,366
joseluisq/gimage
src/Figure.php
Figure.createRectangle
private function createRectangle($color) { imagefilledrectangle( $this->resource, 0, 0, $this->width, $this->height, $color ); }
php
private function createRectangle($color) { imagefilledrectangle( $this->resource, 0, 0, $this->width, $this->height, $color ); }
[ "private", "function", "createRectangle", "(", "$", "color", ")", "{", "imagefilledrectangle", "(", "$", "this", "->", "resource", ",", "0", ",", "0", ",", "$", "this", "->", "width", ",", "$", "this", "->", "height", ",", "$", "color", ")", ";", "}"...
Creates a filled rectangle. @access private @return void
[ "Creates", "a", "filled", "rectangle", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Figure.php#L156-L166
188,367
joseluisq/gimage
src/Figure.php
Figure.createEllipse
private function createEllipse($color) { $alpha = imagecolorallocatealpha($this->resource, 255, 255, 255, 127); imagefill($this->resource, 0, 0, $alpha); imagefilledellipse( $this->resource, $this->width / 2, $this->height / 2, $this->width, ...
php
private function createEllipse($color) { $alpha = imagecolorallocatealpha($this->resource, 255, 255, 255, 127); imagefill($this->resource, 0, 0, $alpha); imagefilledellipse( $this->resource, $this->width / 2, $this->height / 2, $this->width, ...
[ "private", "function", "createEllipse", "(", "$", "color", ")", "{", "$", "alpha", "=", "imagecolorallocatealpha", "(", "$", "this", "->", "resource", ",", "255", ",", "255", ",", "255", ",", "127", ")", ";", "imagefill", "(", "$", "this", "->", "resou...
Creates a filled ellipse. @access private @return void
[ "Creates", "a", "filled", "ellipse", "." ]
17d7ceda0656d79cd8708d98eb5970336738b96f
https://github.com/joseluisq/gimage/blob/17d7ceda0656d79cd8708d98eb5970336738b96f/src/Figure.php#L174-L187
188,368
laravel-notification-channels/backport
src/Notifications/Channels/SlackWebhookChannel.php
SlackWebhookChannel.fields
protected function fields(SlackAttachment $attachment) { return collect($attachment->fields)->map(function ($value, $key) { return ['title' => $key, 'value' => $value, 'short' => true]; })->values()->all(); }
php
protected function fields(SlackAttachment $attachment) { return collect($attachment->fields)->map(function ($value, $key) { return ['title' => $key, 'value' => $value, 'short' => true]; })->values()->all(); }
[ "protected", "function", "fields", "(", "SlackAttachment", "$", "attachment", ")", "{", "return", "collect", "(", "$", "attachment", "->", "fields", ")", "->", "map", "(", "function", "(", "$", "value", ",", "$", "key", ")", "{", "return", "[", "'title'"...
Format the attachment's fields. @param \Illuminate\Notifications\Messages\SlackAttachment $attachment @return array
[ "Format", "the", "attachment", "s", "fields", "." ]
51e863387a6dc6e8afe68d24fab6166566f4376a
https://github.com/laravel-notification-channels/backport/blob/51e863387a6dc6e8afe68d24fab6166566f4376a/src/Notifications/Channels/SlackWebhookChannel.php#L78-L83
188,369
laravel-notification-channels/backport
src/Notifications/ChannelManager.php
ChannelManager.createNexmoDriver
protected function createNexmoDriver() { return new Channels\NexmoSmsChannel( new NexmoClient(new NexmoCredentials( $this->app['config']['services.nexmo.key'], $this->app['config']['services.nexmo.secret'] )), $this->app['config']['services...
php
protected function createNexmoDriver() { return new Channels\NexmoSmsChannel( new NexmoClient(new NexmoCredentials( $this->app['config']['services.nexmo.key'], $this->app['config']['services.nexmo.secret'] )), $this->app['config']['services...
[ "protected", "function", "createNexmoDriver", "(", ")", "{", "return", "new", "Channels", "\\", "NexmoSmsChannel", "(", "new", "NexmoClient", "(", "new", "NexmoCredentials", "(", "$", "this", "->", "app", "[", "'config'", "]", "[", "'services.nexmo.key'", "]", ...
Create an instance of the Nexmo driver. @return \Illuminate\Notifications\Channels\NexmoSmsChannel
[ "Create", "an", "instance", "of", "the", "Nexmo", "driver", "." ]
51e863387a6dc6e8afe68d24fab6166566f4376a
https://github.com/laravel-notification-channels/backport/blob/51e863387a6dc6e8afe68d24fab6166566f4376a/src/Notifications/ChannelManager.php#L172-L181
188,370
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getVisitorsAndPageViews
public function getVisitorsAndPageViews($numberOfDays = 365, $groupBy = 'date') { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getVisitorsAndPageViewsForPeriod($startDate, $endDate, $groupBy); }
php
public function getVisitorsAndPageViews($numberOfDays = 365, $groupBy = 'date') { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getVisitorsAndPageViewsForPeriod($startDate, $endDate, $groupBy); }
[ "public", "function", "getVisitorsAndPageViews", "(", "$", "numberOfDays", "=", "365", ",", "$", "groupBy", "=", "'date'", ")", "{", "list", "(", "$", "startDate", ",", "$", "endDate", ")", "=", "$", "this", "->", "calculateNumberOfDays", "(", "$", "number...
Get the amount of visitors and pageviews. @param int $numberOfDays @param string $groupBy Possible values: date, yearMonth @return Collection
[ "Get", "the", "amount", "of", "visitors", "and", "pageviews", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L50-L55
188,371
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getVisitorsAndPageViewsForPeriod
public function getVisitorsAndPageViewsForPeriod($startDate, $endDate, $groupBy = 'date') { $visitorData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:visits,ga:pageviews', ['dimensions' => 'ga:'.$groupBy]); foreach ($answer->rows as $dateRow) { $visitorData[] = ...
php
public function getVisitorsAndPageViewsForPeriod($startDate, $endDate, $groupBy = 'date') { $visitorData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:visits,ga:pageviews', ['dimensions' => 'ga:'.$groupBy]); foreach ($answer->rows as $dateRow) { $visitorData[] = ...
[ "public", "function", "getVisitorsAndPageViewsForPeriod", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "groupBy", "=", "'date'", ")", "{", "$", "visitorData", "=", "[", "]", ";", "$", "answer", "=", "$", "this", "->", "performQuery", "(", "$", "...
Get the amount of visitors and pageviews for the given period. @param \DateTime $startDate @param \DateTime $endDate @param string $groupBy Possible values: date, yearMonth @return Collection
[ "Get", "the", "amount", "of", "visitors", "and", "pageviews", "for", "the", "given", "period", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L66-L76
188,372
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getTopKeywords
public function getTopKeywords($numberOfDays = 365, $maxResults = 30) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getTopKeyWordsForPeriod($startDate, $endDate, $maxResults); }
php
public function getTopKeywords($numberOfDays = 365, $maxResults = 30) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getTopKeyWordsForPeriod($startDate, $endDate, $maxResults); }
[ "public", "function", "getTopKeywords", "(", "$", "numberOfDays", "=", "365", ",", "$", "maxResults", "=", "30", ")", "{", "list", "(", "$", "startDate", ",", "$", "endDate", ")", "=", "$", "this", "->", "calculateNumberOfDays", "(", "$", "numberOfDays", ...
Get the top keywords. @param int $numberOfDays @param int $maxResults @return Collection
[ "Get", "the", "top", "keywords", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L86-L91
188,373
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getTopKeyWordsForPeriod
public function getTopKeyWordsForPeriod($startDate, $endDate, $maxResults = 30) { $keywordData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:sessions', ['dimensions' => 'ga:keyword', 'sort' => '-ga:sessions', 'max-results' => $maxResults, 'filters' => 'ga:keyword!=(not set);ga:keywo...
php
public function getTopKeyWordsForPeriod($startDate, $endDate, $maxResults = 30) { $keywordData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:sessions', ['dimensions' => 'ga:keyword', 'sort' => '-ga:sessions', 'max-results' => $maxResults, 'filters' => 'ga:keyword!=(not set);ga:keywo...
[ "public", "function", "getTopKeyWordsForPeriod", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "maxResults", "=", "30", ")", "{", "$", "keywordData", "=", "[", "]", ";", "$", "answer", "=", "$", "this", "->", "performQuery", "(", "$", "startDate"...
Get the top keywords for the given period. @param \DateTime $startDate @param \DateTime $endDate @param int $maxResults @return Collection
[ "Get", "the", "top", "keywords", "for", "the", "given", "period", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L102-L117
188,374
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getTopReferrers
public function getTopReferrers($numberOfDays = 365, $maxResults = 20) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getTopReferrersForPeriod($startDate, $endDate, $maxResults); }
php
public function getTopReferrers($numberOfDays = 365, $maxResults = 20) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getTopReferrersForPeriod($startDate, $endDate, $maxResults); }
[ "public", "function", "getTopReferrers", "(", "$", "numberOfDays", "=", "365", ",", "$", "maxResults", "=", "20", ")", "{", "list", "(", "$", "startDate", ",", "$", "endDate", ")", "=", "$", "this", "->", "calculateNumberOfDays", "(", "$", "numberOfDays", ...
Get the top referrers. @param int $numberOfDays @param int $maxResults @return Collection
[ "Get", "the", "top", "referrers", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L127-L132
188,375
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getTopReferrersForPeriod
public function getTopReferrersForPeriod($startDate, $endDate, $maxResults) { $referrerData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:pageviews', ['dimensions' => 'ga:fullReferrer', 'sort' => '-ga:pageviews', 'max-results' => $maxResults]); if (is_null($answer->rows)) {...
php
public function getTopReferrersForPeriod($startDate, $endDate, $maxResults) { $referrerData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:pageviews', ['dimensions' => 'ga:fullReferrer', 'sort' => '-ga:pageviews', 'max-results' => $maxResults]); if (is_null($answer->rows)) {...
[ "public", "function", "getTopReferrersForPeriod", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "maxResults", ")", "{", "$", "referrerData", "=", "[", "]", ";", "$", "answer", "=", "$", "this", "->", "performQuery", "(", "$", "startDate", ",", "$...
Get the top referrers for the given period. @param \DateTime $startDate @param \DateTime $endDate @param $maxResults @return Collection
[ "Get", "the", "top", "referrers", "for", "the", "given", "period", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L143-L158
188,376
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getTopBrowsers
public function getTopBrowsers($numberOfDays = 365, $maxResults = 6) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getTopBrowsersForPeriod($startDate, $endDate, $maxResults); }
php
public function getTopBrowsers($numberOfDays = 365, $maxResults = 6) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getTopBrowsersForPeriod($startDate, $endDate, $maxResults); }
[ "public", "function", "getTopBrowsers", "(", "$", "numberOfDays", "=", "365", ",", "$", "maxResults", "=", "6", ")", "{", "list", "(", "$", "startDate", ",", "$", "endDate", ")", "=", "$", "this", "->", "calculateNumberOfDays", "(", "$", "numberOfDays", ...
Get the top browsers. @param int $numberOfDays @param int $maxResults @return Collection
[ "Get", "the", "top", "browsers", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L168-L173
188,377
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getTopBrowsersForPeriod
public function getTopBrowsersForPeriod($startDate, $endDate, $maxResults) { $browserData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:sessions', ['dimensions' => 'ga:browser', 'sort' => '-ga:sessions']); if (is_null($answer->rows)) { return new Collection([]); ...
php
public function getTopBrowsersForPeriod($startDate, $endDate, $maxResults) { $browserData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:sessions', ['dimensions' => 'ga:browser', 'sort' => '-ga:sessions']); if (is_null($answer->rows)) { return new Collection([]); ...
[ "public", "function", "getTopBrowsersForPeriod", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "maxResults", ")", "{", "$", "browserData", "=", "[", "]", ";", "$", "answer", "=", "$", "this", "->", "performQuery", "(", "$", "startDate", ",", "$",...
Get the top browsers for the given period. @param \DateTime $startDate @param \DateTime $endDate @param $maxResults @return Collection
[ "Get", "the", "top", "browsers", "for", "the", "given", "period", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L184-L207
188,378
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getMostVisitedPages
public function getMostVisitedPages($numberOfDays = 365, $maxResults = 20) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getMostVisitedPagesForPeriod($startDate, $endDate, $maxResults); }
php
public function getMostVisitedPages($numberOfDays = 365, $maxResults = 20) { list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays); return $this->getMostVisitedPagesForPeriod($startDate, $endDate, $maxResults); }
[ "public", "function", "getMostVisitedPages", "(", "$", "numberOfDays", "=", "365", ",", "$", "maxResults", "=", "20", ")", "{", "list", "(", "$", "startDate", ",", "$", "endDate", ")", "=", "$", "this", "->", "calculateNumberOfDays", "(", "$", "numberOfDay...
Get the most visited pages. @param int $numberOfDays @param int $maxResults @return Collection
[ "Get", "the", "most", "visited", "pages", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L217-L222
188,379
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.getMostVisitedPagesForPeriod
public function getMostVisitedPagesForPeriod($startDate, $endDate, $maxResults = 20) { $pagesData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:pageviews', ['dimensions' => 'ga:pagePath', 'sort' => '-ga:pageviews', 'max-results' => $maxResults]); if (is_null($answer->rows))...
php
public function getMostVisitedPagesForPeriod($startDate, $endDate, $maxResults = 20) { $pagesData = []; $answer = $this->performQuery($startDate, $endDate, 'ga:pageviews', ['dimensions' => 'ga:pagePath', 'sort' => '-ga:pageviews', 'max-results' => $maxResults]); if (is_null($answer->rows))...
[ "public", "function", "getMostVisitedPagesForPeriod", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "maxResults", "=", "20", ")", "{", "$", "pagesData", "=", "[", "]", ";", "$", "answer", "=", "$", "this", "->", "performQuery", "(", "$", "startDa...
Get the most visited pages for the given period. @param \DateTime $startDate @param \DateTime $endDate @param int $maxResults @return Collection
[ "Get", "the", "most", "visited", "pages", "for", "the", "given", "period", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L233-L248
188,380
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.performQuery
public function performQuery($startDate, $endDate, $metrics, $others = []) { $startDate = $startDate->format('Y-m-d'); $endDate = $endDate->format('Y-m-d'); $cacheName = $this->determineCacheName([$startDate, $endDate, $metrics, $others]); if ($this->useCache() and Cache::has($cache...
php
public function performQuery($startDate, $endDate, $metrics, $others = []) { $startDate = $startDate->format('Y-m-d'); $endDate = $endDate->format('Y-m-d'); $cacheName = $this->determineCacheName([$startDate, $endDate, $metrics, $others]); if ($this->useCache() and Cache::has($cache...
[ "public", "function", "performQuery", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "metrics", ",", "$", "others", "=", "[", "]", ")", "{", "$", "startDate", "=", "$", "startDate", "->", "format", "(", "'Y-m-d'", ")", ";", "$", "endDate", "="...
Call the query method on the autenthicated client. @param \DateTime $startDate @param \DateTime $endDate @param $metrics @param array $others @return mixed
[ "Call", "the", "query", "method", "on", "the", "autenthicated", "client", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L274-L290
188,381
spatie/analytics-reports
src/AnalyticsReports.php
AnalyticsReports.calculateNumberOfDays
private function calculateNumberOfDays($numberOfDays) { $endDate = Carbon::today(); $startDate = Carbon::today()->subDays($numberOfDays); return [$startDate, $endDate]; }
php
private function calculateNumberOfDays($numberOfDays) { $endDate = Carbon::today(); $startDate = Carbon::today()->subDays($numberOfDays); return [$startDate, $endDate]; }
[ "private", "function", "calculateNumberOfDays", "(", "$", "numberOfDays", ")", "{", "$", "endDate", "=", "Carbon", "::", "today", "(", ")", ";", "$", "startDate", "=", "Carbon", "::", "today", "(", ")", "->", "subDays", "(", "$", "numberOfDays", ")", ";"...
Returns an array with the current date and the date minus the number of days specified. @param $numberOfDays @return array
[ "Returns", "an", "array", "with", "the", "current", "date", "and", "the", "date", "minus", "the", "number", "of", "days", "specified", "." ]
e286ae918450619d74fa6b8cf21669577d19fce8
https://github.com/spatie/analytics-reports/blob/e286ae918450619d74fa6b8cf21669577d19fce8/src/AnalyticsReports.php#L321-L327
188,382
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.video
public function video($video) { $oldSource = $this->source; $this->source = $video; $parsedURL = parse_url($video); // 1 thing, assume video. if (count($parsedURL) === 1) { $this->type = static::TYPE_VIDEO; $this->id = $parsedURL['path']; ...
php
public function video($video) { $oldSource = $this->source; $this->source = $video; $parsedURL = parse_url($video); // 1 thing, assume video. if (count($parsedURL) === 1) { $this->type = static::TYPE_VIDEO; $this->id = $parsedURL['path']; ...
[ "public", "function", "video", "(", "$", "video", ")", "{", "$", "oldSource", "=", "$", "this", "->", "source", ";", "$", "this", "->", "source", "=", "$", "video", ";", "$", "parsedURL", "=", "parse_url", "(", "$", "video", ")", ";", "// 1 thing, as...
Set Player Video Does not validate whether or not YouTube video exists. @param string $video Can be a URL or just the ID @throws AudioPlayerException @return $this
[ "Set", "Player", "Video", "Does", "not", "validate", "whether", "or", "not", "YouTube", "video", "exists", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L183-L231
188,383
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.playlist
public function playlist($playlist) { $oldSource = $this->source; $this->source = $playlist; $parsedURL = parse_url($playlist); // 1 thing, assume playlist. if (count($parsedURL) === 1) { $this->type = static::TYPE_PLAYLIST; $this->id = $parsedURL['p...
php
public function playlist($playlist) { $oldSource = $this->source; $this->source = $playlist; $parsedURL = parse_url($playlist); // 1 thing, assume playlist. if (count($parsedURL) === 1) { $this->type = static::TYPE_PLAYLIST; $this->id = $parsedURL['p...
[ "public", "function", "playlist", "(", "$", "playlist", ")", "{", "$", "oldSource", "=", "$", "this", "->", "source", ";", "$", "this", "->", "source", "=", "$", "playlist", ";", "$", "parsedURL", "=", "parse_url", "(", "$", "playlist", ")", ";", "//...
Set Player Playlist Does not validate whether or not YouTube playlist exists. @param string $playlist Can be a URL or just the ID @throws AudioPlayerException @return $this
[ "Set", "Player", "Playlist", "Does", "not", "validate", "whether", "or", "not", "YouTube", "playlist", "exists", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L244-L275
188,384
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.size
public function size($size) { if (!$this->isValidSize($size)) { throw new AudioPlayerException('Invalid Size'); } $this->size = $size; // Progress Bar & Time Code can not be used with Tiny/Invisible // Any other size (Small, Medium, Large) MUST have a Progress Ba...
php
public function size($size) { if (!$this->isValidSize($size)) { throw new AudioPlayerException('Invalid Size'); } $this->size = $size; // Progress Bar & Time Code can not be used with Tiny/Invisible // Any other size (Small, Medium, Large) MUST have a Progress Ba...
[ "public", "function", "size", "(", "$", "size", ")", "{", "if", "(", "!", "$", "this", "->", "isValidSize", "(", "$", "size", ")", ")", "{", "throw", "new", "AudioPlayerException", "(", "'Invalid Size'", ")", ";", "}", "$", "this", "->", "size", "=",...
Set Player Size. @param int $size [SIZE_INVISIBLE | SIZE_TINY | SIZE_SMALL | SIZE_MEDIUM | SIZE_LARGE] @throws AudioPlayerException @return $this
[ "Set", "Player", "Size", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L329-L345
188,385
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.theme
public function theme($theme) { if ($this->isPlaylist() && $theme == static::THEME_DARK) { throw new AudioPlayerException('Playlists can not use the Dark Theme. YouTube limitation.'); } if ($theme != static::THEME_LIGHT && $theme != static::THEME_DARK) { throw new Au...
php
public function theme($theme) { if ($this->isPlaylist() && $theme == static::THEME_DARK) { throw new AudioPlayerException('Playlists can not use the Dark Theme. YouTube limitation.'); } if ($theme != static::THEME_LIGHT && $theme != static::THEME_DARK) { throw new Au...
[ "public", "function", "theme", "(", "$", "theme", ")", "{", "if", "(", "$", "this", "->", "isPlaylist", "(", ")", "&&", "$", "theme", "==", "static", "::", "THEME_DARK", ")", "{", "throw", "new", "AudioPlayerException", "(", "'Playlists can not use the Dark ...
Set Player Theme. @param int $theme [THEME_LIGHT | THEME_DARK] @throws AudioPlayerException @return $this
[ "Set", "Player", "Theme", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L421-L432
188,386
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.hd
public function hd($useHD = true) { if ($useHD) { $this->hd = true; } else { $this->hd = false; } return $this; }
php
public function hd($useHD = true) { if ($useHD) { $this->hd = true; } else { $this->hd = false; } return $this; }
[ "public", "function", "hd", "(", "$", "useHD", "=", "true", ")", "{", "if", "(", "$", "useHD", ")", "{", "$", "this", "->", "hd", "=", "true", ";", "}", "else", "{", "$", "this", "->", "hd", "=", "false", ";", "}", "return", "$", "this", ";",...
Set HD Choose whether or not to force the player into HD. @param bool $useHD @return $this
[ "Set", "HD", "Choose", "whether", "or", "not", "to", "force", "the", "player", "into", "HD", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L452-L461
188,387
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.autoplay
public function autoplay($autoplay = true) { if ($autoplay) { $this->autoplay = true; } else { $this->autoplay = false; } return $this; }
php
public function autoplay($autoplay = true) { if ($autoplay) { $this->autoplay = true; } else { $this->autoplay = false; } return $this; }
[ "public", "function", "autoplay", "(", "$", "autoplay", "=", "true", ")", "{", "if", "(", "$", "autoplay", ")", "{", "$", "this", "->", "autoplay", "=", "true", ";", "}", "else", "{", "$", "this", "->", "autoplay", "=", "false", ";", "}", "return",...
Set Autoplay Choose whether or not to automatically play the video when it loads Please don't use this. You'll make me sad. @param bool $autoplay @return $this
[ "Set", "Autoplay", "Choose", "whether", "or", "not", "to", "automatically", "play", "the", "video", "when", "it", "loads", "Please", "don", "t", "use", "this", ".", "You", "ll", "make", "me", "sad", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L487-L496
188,388
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.jsAPI
public function jsAPI($useJSAPI = true) { if ($useJSAPI) { $this->jsapi = true; } else { $this->jsapi = false; } return $this; }
php
public function jsAPI($useJSAPI = true) { if ($useJSAPI) { $this->jsapi = true; } else { $this->jsapi = false; } return $this; }
[ "public", "function", "jsAPI", "(", "$", "useJSAPI", "=", "true", ")", "{", "if", "(", "$", "useJSAPI", ")", "{", "$", "this", "->", "jsapi", "=", "true", ";", "}", "else", "{", "$", "this", "->", "jsapi", "=", "false", ";", "}", "return", "$", ...
Set JSApi Choose whether or not to allow access via the YouTube JavaScript API. @param bool $useJSAPI @return $this
[ "Set", "JSApi", "Choose", "whether", "or", "not", "to", "allow", "access", "via", "the", "YouTube", "JavaScript", "API", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L521-L530
188,389
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.progressBar
public function progressBar($useProgressBar = true) { if ($useProgressBar) { $this->progressbar = true; } else { $this->progressbar = false; } // If they set this true after saying they want tiny, they actually want small. if ($useProgressBar && $this...
php
public function progressBar($useProgressBar = true) { if ($useProgressBar) { $this->progressbar = true; } else { $this->progressbar = false; } // If they set this true after saying they want tiny, they actually want small. if ($useProgressBar && $this...
[ "public", "function", "progressBar", "(", "$", "useProgressBar", "=", "true", ")", "{", "if", "(", "$", "useProgressBar", ")", "{", "$", "this", "->", "progressbar", "=", "true", ";", "}", "else", "{", "$", "this", "->", "progressbar", "=", "false", ";...
Set Progress Bar Choose whether or not to display the progress bar. @param bool $useProgressBar @return $this
[ "Set", "Progress", "Bar", "Choose", "whether", "or", "not", "to", "display", "the", "progress", "bar", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L594-L609
188,390
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.timeCode
public function timeCode($useTimeCode = true) { if ($useTimeCode) { // Requires Progress Bar. Sorry. $this->progressBar(); $this->timecode = true; } else { $this->timecode = false; } // If they set this true after saying they want tin...
php
public function timeCode($useTimeCode = true) { if ($useTimeCode) { // Requires Progress Bar. Sorry. $this->progressBar(); $this->timecode = true; } else { $this->timecode = false; } // If they set this true after saying they want tin...
[ "public", "function", "timeCode", "(", "$", "useTimeCode", "=", "true", ")", "{", "if", "(", "$", "useTimeCode", ")", "{", "// Requires Progress Bar. Sorry.", "$", "this", "->", "progressBar", "(", ")", ";", "$", "this", "->", "timecode", "=", "true", ";"...
Set Time Code Choose whether or not to display the time code. Requires Progress Bar. @param bool $useTimeCode @return $this
[ "Set", "Time", "Code", "Choose", "whether", "or", "not", "to", "display", "the", "time", "code", ".", "Requires", "Progress", "Bar", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L634-L651
188,391
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.cookies
public function cookies($useCookies = true) { if (!$useCookies && $this->getType() == static::TYPE_PLAYLIST) { throw new AudioPlayerException('Can not disable cookies with playlists. YouTube limitation.'); } if ($useCookies) { $this->cookies = true; } else {...
php
public function cookies($useCookies = true) { if (!$useCookies && $this->getType() == static::TYPE_PLAYLIST) { throw new AudioPlayerException('Can not disable cookies with playlists. YouTube limitation.'); } if ($useCookies) { $this->cookies = true; } else {...
[ "public", "function", "cookies", "(", "$", "useCookies", "=", "true", ")", "{", "if", "(", "!", "$", "useCookies", "&&", "$", "this", "->", "getType", "(", ")", "==", "static", "::", "TYPE_PLAYLIST", ")", "{", "throw", "new", "AudioPlayerException", "(",...
Set Cookies Choose whether or not to allow YouTube to collect cookies. @param bool $useCookies @throws AudioPlayerException @return $this
[ "Set", "Cookies", "Choose", "whether", "or", "not", "to", "allow", "YouTube", "to", "collect", "cookies", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L678-L691
188,392
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.https
public function https($useHTTPS = true) { if ($useHTTPS) { $this->https = true; } else { $this->https = false; } return $this; }
php
public function https($useHTTPS = true) { if ($useHTTPS) { $this->https = true; } else { $this->https = false; } return $this; }
[ "public", "function", "https", "(", "$", "useHTTPS", "=", "true", ")", "{", "if", "(", "$", "useHTTPS", ")", "{", "$", "this", "->", "https", "=", "true", ";", "}", "else", "{", "$", "this", "->", "https", "=", "false", ";", "}", "return", "$", ...
Set HTTPS Choose whether to use HTTPs or HTTP. @param bool $useHTTPS @return $this
[ "Set", "HTTPS", "Choose", "whether", "to", "use", "HTTPs", "or", "HTTP", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L716-L725
188,393
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.getEmbedURL
public function getEmbedURL($encode = true) { $url = ''; // PROTOCOL if ($this->getHTTPS()) { $url .= 'https://'; } else { $url .= 'http://'; } // DOMAIN if ($this->getCookies()) { $url .= 'www.youtube.com'; } else...
php
public function getEmbedURL($encode = true) { $url = ''; // PROTOCOL if ($this->getHTTPS()) { $url .= 'https://'; } else { $url .= 'http://'; } // DOMAIN if ($this->getCookies()) { $url .= 'www.youtube.com'; } else...
[ "public", "function", "getEmbedURL", "(", "$", "encode", "=", "true", ")", "{", "$", "url", "=", "''", ";", "// PROTOCOL", "if", "(", "$", "this", "->", "getHTTPS", "(", ")", ")", "{", "$", "url", ".=", "'https://'", ";", "}", "else", "{", "$", "...
Get Embed URL. @param bool $encode @return string
[ "Get", "Embed", "URL", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L797-L850
188,394
navarr/ytaudio
src/AudioPlayer.php
AudioPlayer.render
public function render($return = false) { // Build the string $html = '<object type="application/x-shockwave-flash"'; $html .= ' width="'.$this->getWidth().'"'; $html .= ' height="'.$this->getHeight().'"'; $html .= ' data="'.$this->getEmbedURL().'"'; if ($this->isInvi...
php
public function render($return = false) { // Build the string $html = '<object type="application/x-shockwave-flash"'; $html .= ' width="'.$this->getWidth().'"'; $html .= ' height="'.$this->getHeight().'"'; $html .= ' data="'.$this->getEmbedURL().'"'; if ($this->isInvi...
[ "public", "function", "render", "(", "$", "return", "=", "false", ")", "{", "// Build the string", "$", "html", "=", "'<object type=\"application/x-shockwave-flash\"'", ";", "$", "html", ".=", "' width=\"'", ".", "$", "this", "->", "getWidth", "(", ")", ".", "...
Render valid XHTML. @param bool $return Return the HTML instead of echoing it. @return string|bool
[ "Render", "valid", "XHTML", "." ]
f46a8b9bd7b9612b93d5aa97b6226a8d730ab940
https://github.com/navarr/ytaudio/blob/f46a8b9bd7b9612b93d5aa97b6226a8d730ab940/src/AudioPlayer.php#L859-L880
188,395
silverstripe/silverstripe-omnipay
src/Service/ServiceFactory.php
ServiceFactory.getService
public function getService(Payment $payment, $intent) { $method = 'create' . ucfirst($intent) . 'Service'; $values = $this->extend($method, $payment); if (count($values) > 1) { throw new InvalidConfigurationException("Multiple extensions are trying to create a service for '$inte...
php
public function getService(Payment $payment, $intent) { $method = 'create' . ucfirst($intent) . 'Service'; $values = $this->extend($method, $payment); if (count($values) > 1) { throw new InvalidConfigurationException("Multiple extensions are trying to create a service for '$inte...
[ "public", "function", "getService", "(", "Payment", "$", "payment", ",", "$", "intent", ")", "{", "$", "method", "=", "'create'", ".", "ucfirst", "(", "$", "intent", ")", ".", "'Service'", ";", "$", "values", "=", "$", "this", "->", "extend", "(", "$...
Create a service for the given payment and intent. This method will look for a method named `create{Intent}Service`, where "{Intent}" has to be substituted with the intent. So an intent "authorize" will look for a method named "createAuthorizeService". The method will be called on extensions first and then on this cla...
[ "Create", "a", "service", "for", "the", "given", "payment", "and", "intent", "." ]
dd6bed807b42420e90b345597d6ac76e9175988a
https://github.com/silverstripe/silverstripe-omnipay/blob/dd6bed807b42420e90b345597d6ac76e9175988a/src/Service/ServiceFactory.php#L52-L80
188,396
silverstripe/silverstripe-omnipay
src/Service/ServiceFactory.php
ServiceFactory.createPaymentService
protected function createPaymentService(Payment $payment) { return $this->getService( $payment, GatewayInfo::shouldUseAuthorize($payment->Gateway) ? ServiceFactory::INTENT_AUTHORIZE : ServiceFactory::INTENT_PURCHASE ); }
php
protected function createPaymentService(Payment $payment) { return $this->getService( $payment, GatewayInfo::shouldUseAuthorize($payment->Gateway) ? ServiceFactory::INTENT_AUTHORIZE : ServiceFactory::INTENT_PURCHASE ); }
[ "protected", "function", "createPaymentService", "(", "Payment", "$", "payment", ")", "{", "return", "$", "this", "->", "getService", "(", "$", "payment", ",", "GatewayInfo", "::", "shouldUseAuthorize", "(", "$", "payment", "->", "Gateway", ")", "?", "ServiceF...
Create a payment service. This will either return an AuthorizeService or PurchaseService, depending on the gateway config. @param Payment $payment @return PaymentService @throws InvalidConfigurationException
[ "Create", "a", "payment", "service", ".", "This", "will", "either", "return", "an", "AuthorizeService", "or", "PurchaseService", "depending", "on", "the", "gateway", "config", "." ]
dd6bed807b42420e90b345597d6ac76e9175988a
https://github.com/silverstripe/silverstripe-omnipay/blob/dd6bed807b42420e90b345597d6ac76e9175988a/src/Service/ServiceFactory.php#L91-L99
188,397
silverstripe/silverstripe-omnipay
src/Service/PaymentService.php
PaymentService.cancel
public function cancel() { if (!$this->payment->IsComplete()) { $this->payment->Status = 'Void'; $this->payment->write(); ErrorHandling::safeExtend($this->payment, 'onCancelled'); } return $this->generateServiceResponse(ServiceResponse::SERVICE_CANCELLED)...
php
public function cancel() { if (!$this->payment->IsComplete()) { $this->payment->Status = 'Void'; $this->payment->write(); ErrorHandling::safeExtend($this->payment, 'onCancelled'); } return $this->generateServiceResponse(ServiceResponse::SERVICE_CANCELLED)...
[ "public", "function", "cancel", "(", ")", "{", "if", "(", "!", "$", "this", "->", "payment", "->", "IsComplete", "(", ")", ")", "{", "$", "this", "->", "payment", "->", "Status", "=", "'Void'", ";", "$", "this", "->", "payment", "->", "write", "(",...
Cancel a payment @throws \Exception @throws \SilverStripe\ORM\ValidationException @throws \SilverStripe\Omnipay\Exception\ServiceException @return ServiceResponse
[ "Cancel", "a", "payment" ]
dd6bed807b42420e90b345597d6ac76e9175988a
https://github.com/silverstripe/silverstripe-omnipay/blob/dd6bed807b42420e90b345597d6ac76e9175988a/src/Service/PaymentService.php#L102-L111
188,398
silverstripe/silverstripe-omnipay
src/Service/PaymentService.php
PaymentService.oGateway
public function oGateway() { $gatewayName = $this->payment->Gateway; $gateway = $this->getGatewayFactory()->create($gatewayName); $parameters = GatewayInfo::getParameters($gatewayName); if (is_array($parameters)) { $gateway->initialize($parameters); } ...
php
public function oGateway() { $gatewayName = $this->payment->Gateway; $gateway = $this->getGatewayFactory()->create($gatewayName); $parameters = GatewayInfo::getParameters($gatewayName); if (is_array($parameters)) { $gateway->initialize($parameters); } ...
[ "public", "function", "oGateway", "(", ")", "{", "$", "gatewayName", "=", "$", "this", "->", "payment", "->", "Gateway", ";", "$", "gateway", "=", "$", "this", "->", "getGatewayFactory", "(", ")", "->", "create", "(", "$", "gatewayName", ")", ";", "$",...
Get the omnipay gateway associated with this payment, with configuration applied. @throws \RuntimeException - when gateway doesn't exist. @return GatewayInterface|AbstractGateway omnipay gateway class
[ "Get", "the", "omnipay", "gateway", "associated", "with", "this", "payment", "with", "configuration", "applied", "." ]
dd6bed807b42420e90b345597d6ac76e9175988a
https://github.com/silverstripe/silverstripe-omnipay/blob/dd6bed807b42420e90b345597d6ac76e9175988a/src/Service/PaymentService.php#L130-L143
188,399
silverstripe/silverstripe-omnipay
src/Service/PaymentService.php
PaymentService.handleNotification
public function handleNotification() { $gateway = $this->oGateway(); if (!$gateway->supportsAcceptNotification()) { throw new InvalidConfigurationException( sprintf('The gateway "%s" doesn\'t support "acceptNotification"', $this->payment->Gateway) ); }...
php
public function handleNotification() { $gateway = $this->oGateway(); if (!$gateway->supportsAcceptNotification()) { throw new InvalidConfigurationException( sprintf('The gateway "%s" doesn\'t support "acceptNotification"', $this->payment->Gateway) ); }...
[ "public", "function", "handleNotification", "(", ")", "{", "$", "gateway", "=", "$", "this", "->", "oGateway", "(", ")", ";", "if", "(", "!", "$", "gateway", "->", "supportsAcceptNotification", "(", ")", ")", "{", "throw", "new", "InvalidConfigurationExcepti...
Handle a notification via gateway->acceptNotification. This just invokes `acceptNotification` on the gateway (if available) and wraps the return value in the proper ServiceResponse. @throws InvalidConfigurationException @throws \Omnipay\Common\Exception\InvalidRequestException @throws \SilverStripe\Omnipay\Exception\...
[ "Handle", "a", "notification", "via", "gateway", "-", ">", "acceptNotification", "." ]
dd6bed807b42420e90b345597d6ac76e9175988a
https://github.com/silverstripe/silverstripe-omnipay/blob/dd6bed807b42420e90b345597d6ac76e9175988a/src/Service/PaymentService.php#L156-L206