repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/UriHelper.php
UriHelper.uriWithArguments
public static function uriWithArguments(UriInterface $uri, array $arguments): UriInterface { $query = http_build_query($arguments, '', '&', PHP_QUERY_RFC3986); return $uri->withQuery($query); }
php
public static function uriWithArguments(UriInterface $uri, array $arguments): UriInterface { $query = http_build_query($arguments, '', '&', PHP_QUERY_RFC3986); return $uri->withQuery($query); }
[ "public", "static", "function", "uriWithArguments", "(", "UriInterface", "$", "uri", ",", "array", "$", "arguments", ")", ":", "UriInterface", "{", "$", "query", "=", "http_build_query", "(", "$", "arguments", ",", "''", ",", "'&'", ",", "PHP_QUERY_RFC3986", ...
Returns an Uri object with the query string being generated from the array of arguments given @param UriInterface $uri @param array $arguments @return UriInterface
[ "Returns", "an", "Uri", "object", "with", "the", "query", "string", "being", "generated", "from", "the", "array", "of", "arguments", "given" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UriHelper.php#L84-L88
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/LazySplObjectStorage.php
LazySplObjectStorage.initialize
protected function initialize() { if (is_array($this->objectIdentifiers)) { foreach ($this->objectIdentifiers as $identifier) { try { parent::attach($this->persistenceManager->getObjectByIdentifier($identifier)); } catch (Exception\InvalidObjec...
php
protected function initialize() { if (is_array($this->objectIdentifiers)) { foreach ($this->objectIdentifiers as $identifier) { try { parent::attach($this->persistenceManager->getObjectByIdentifier($identifier)); } catch (Exception\InvalidObjec...
[ "protected", "function", "initialize", "(", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "objectIdentifiers", ")", ")", "{", "foreach", "(", "$", "this", "->", "objectIdentifiers", "as", "$", "identifier", ")", "{", "try", "{", "parent", "::"...
Loads the objects this LazySplObjectStorage is supposed to hold. @return void
[ "Loads", "the", "objects", "this", "LazySplObjectStorage", "is", "supposed", "to", "hold", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/LazySplObjectStorage.php#L55-L67
neos/flow-development-collection
Neos.Flow/Classes/Security/RequestPattern/CsrfProtection.php
CsrfProtection.matchRequest
public function matchRequest(RequestInterface $request) { if (!$request instanceof ActionRequest || SecurityHelper::hasSafeMethod($request->getHttpRequest())) { $this->logger->debug('CSRF: No token required, safe request'); return false; } if ($this->authenticationMan...
php
public function matchRequest(RequestInterface $request) { if (!$request instanceof ActionRequest || SecurityHelper::hasSafeMethod($request->getHttpRequest())) { $this->logger->debug('CSRF: No token required, safe request'); return false; } if ($this->authenticationMan...
[ "public", "function", "matchRequest", "(", "RequestInterface", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "ActionRequest", "||", "SecurityHelper", "::", "hasSafeMethod", "(", "$", "request", "->", "getHttpRequest", "(", ")", ")", "...
Matches a \Neos\Flow\Mvc\RequestInterface against the configured CSRF pattern rules and searches for invalid csrf tokens. If this returns true, the request is invalid! @param RequestInterface $request The request that should be matched @return boolean true if the pattern matched, false otherwise @throws Authentication...
[ "Matches", "a", "\\", "Neos", "\\", "Flow", "\\", "Mvc", "\\", "RequestInterface", "against", "the", "configured", "CSRF", "pattern", "rules", "and", "searches", "for", "invalid", "csrf", "tokens", ".", "If", "this", "returns", "true", "the", "request", "is"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/RequestPattern/CsrfProtection.php#L88-L139
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/JsonView.php
JsonView.render
public function render() { $this->controllerContext->getResponse()->setHeader('Content-Type', 'application/json'); $propertiesToRender = $this->renderArray(); $options = $this->getOption('jsonEncodingOptions'); return json_encode($propertiesToRender, $options); }
php
public function render() { $this->controllerContext->getResponse()->setHeader('Content-Type', 'application/json'); $propertiesToRender = $this->renderArray(); $options = $this->getOption('jsonEncodingOptions'); return json_encode($propertiesToRender, $options); }
[ "public", "function", "render", "(", ")", "{", "$", "this", "->", "controllerContext", "->", "getResponse", "(", ")", "->", "setHeader", "(", "'Content-Type'", ",", "'application/json'", ")", ";", "$", "propertiesToRender", "=", "$", "this", "->", "renderArray...
Transforms the value view variable to a serializable array represantion using a YAML view configuration and JSON encodes the result. @return string The JSON encoded variables @api
[ "Transforms", "the", "value", "view", "variable", "to", "a", "serializable", "array", "represantion", "using", "a", "YAML", "view", "configuration", "and", "JSON", "encodes", "the", "result", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/JsonView.php#L199-L205
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/JsonView.php
JsonView.renderArray
protected function renderArray() { if (count($this->variablesToRender) === 1) { $variableName = current($this->variablesToRender); $valueToRender = isset($this->variables[$variableName]) ? $this->variables[$variableName] : null; $configuration = isset($this->configuration...
php
protected function renderArray() { if (count($this->variablesToRender) === 1) { $variableName = current($this->variablesToRender); $valueToRender = isset($this->variables[$variableName]) ? $this->variables[$variableName] : null; $configuration = isset($this->configuration...
[ "protected", "function", "renderArray", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "variablesToRender", ")", "===", "1", ")", "{", "$", "variableName", "=", "current", "(", "$", "this", "->", "variablesToRender", ")", ";", "$", "valueToRe...
Loads the configuration and transforms the value to a serializable array. @return array An array containing the values, ready to be JSON encoded @api
[ "Loads", "the", "configuration", "and", "transforms", "the", "value", "to", "a", "serializable", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/JsonView.php#L214-L228
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/JsonView.php
JsonView.transformValue
protected function transformValue($value, array $configuration) { if (is_array($value) || $value instanceof \ArrayAccess) { $array = []; foreach ($value as $key => $element) { if (isset($configuration['_descendAll']) && is_array($configuration['_descendAll'])) { ...
php
protected function transformValue($value, array $configuration) { if (is_array($value) || $value instanceof \ArrayAccess) { $array = []; foreach ($value as $key => $element) { if (isset($configuration['_descendAll']) && is_array($configuration['_descendAll'])) { ...
[ "protected", "function", "transformValue", "(", "$", "value", ",", "array", "$", "configuration", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", "||", "$", "value", "instanceof", "\\", "ArrayAccess", ")", "{", "$", "array", "=", "[", "]", ";"...
Transforms a value depending on type recursively using the supplied configuration. @param mixed $value The value to transform @param array $configuration Configuration for transforming the value @return array The transformed value
[ "Transforms", "a", "value", "depending", "on", "type", "recursively", "using", "the", "supplied", "configuration", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/JsonView.php#L238-L263
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/JsonView.php
JsonView.transformObject
protected function transformObject($object, array $configuration) { if ($object instanceof \DateTimeInterface) { return $object->format(\DateTime::ISO8601); } else { $propertyNames = ObjectAccess::getGettablePropertyNames($object); $propertiesToRender = []; ...
php
protected function transformObject($object, array $configuration) { if ($object instanceof \DateTimeInterface) { return $object->format(\DateTime::ISO8601); } else { $propertyNames = ObjectAccess::getGettablePropertyNames($object); $propertiesToRender = []; ...
[ "protected", "function", "transformObject", "(", "$", "object", ",", "array", "$", "configuration", ")", "{", "if", "(", "$", "object", "instanceof", "\\", "DateTimeInterface", ")", "{", "return", "$", "object", "->", "format", "(", "\\", "DateTime", "::", ...
Traverses the given object structure in order to transform it into an array structure. @param object $object Object to traverse @param array $configuration Configuration for transforming the given object or NULL @return array Object structure as an array
[ "Traverses", "the", "given", "object", "structure", "in", "order", "to", "transform", "it", "into", "an", "array", "structure", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/JsonView.php#L273-L313
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/AbstractMethodInterceptorBuilder.php
AbstractMethodInterceptorBuilder.buildMethodArgumentsArrayCode
protected function buildMethodArgumentsArrayCode(string $className = null, string $methodName = null, bool $useArgumentsArray = false): string { if ($className === null || $methodName === null) { return ''; } $argumentsArrayCode = "\n \$methodArguments = [];\n"; ...
php
protected function buildMethodArgumentsArrayCode(string $className = null, string $methodName = null, bool $useArgumentsArray = false): string { if ($className === null || $methodName === null) { return ''; } $argumentsArrayCode = "\n \$methodArguments = [];\n"; ...
[ "protected", "function", "buildMethodArgumentsArrayCode", "(", "string", "$", "className", "=", "null", ",", "string", "$", "methodName", "=", "null", ",", "bool", "$", "useArgumentsArray", "=", "false", ")", ":", "string", "{", "if", "(", "$", "className", ...
Builds the PHP code for the method arguments array which is passed to the constructor of a new join point. Used in the method interceptor functions. @param string $className Name of the declaring class of the method @param string $methodName Name of the method to create arguments array code for @param boolean $useArgu...
[ "Builds", "the", "PHP", "code", "for", "the", "method", "arguments", "array", "which", "is", "passed", "to", "the", "constructor", "of", "a", "new", "join", "point", ".", "Used", "in", "the", "method", "interceptor", "functions", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/AbstractMethodInterceptorBuilder.php#L99-L124
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/AbstractMethodInterceptorBuilder.php
AbstractMethodInterceptorBuilder.buildSavedConstructorParametersCode
protected function buildSavedConstructorParametersCode(string $className = null): string { if ($className === null) { return ''; } $parametersCode = ''; $methodParameters = $this->reflectionService->getMethodParameters($className, '__construct'); $methodParameter...
php
protected function buildSavedConstructorParametersCode(string $className = null): string { if ($className === null) { return ''; } $parametersCode = ''; $methodParameters = $this->reflectionService->getMethodParameters($className, '__construct'); $methodParameter...
[ "protected", "function", "buildSavedConstructorParametersCode", "(", "string", "$", "className", "=", "null", ")", ":", "string", "{", "if", "(", "$", "className", "===", "null", ")", "{", "return", "''", ";", "}", "$", "parametersCode", "=", "''", ";", "$...
Generates the parameters code needed to call the constructor with the saved parameters. @param string $className Name of the class the method is declared in @return string The generated parameters code
[ "Generates", "the", "parameters", "code", "needed", "to", "call", "the", "constructor", "with", "the", "saved", "parameters", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/AbstractMethodInterceptorBuilder.php#L132-L148
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/AbstractMethodInterceptorBuilder.php
AbstractMethodInterceptorBuilder.buildAdvicesCode
protected function buildAdvicesCode(array $groupedAdvices, string $methodName = null, string $targetClassName = null, string $declaringClassName = null): string { $advicesCode = $this->buildMethodArgumentsArrayCode($declaringClassName, $methodName, ($methodName === '__construct')); if (isset($group...
php
protected function buildAdvicesCode(array $groupedAdvices, string $methodName = null, string $targetClassName = null, string $declaringClassName = null): string { $advicesCode = $this->buildMethodArgumentsArrayCode($declaringClassName, $methodName, ($methodName === '__construct')); if (isset($group...
[ "protected", "function", "buildAdvicesCode", "(", "array", "$", "groupedAdvices", ",", "string", "$", "methodName", "=", "null", ",", "string", "$", "targetClassName", "=", "null", ",", "string", "$", "declaringClassName", "=", "null", ")", ":", "string", "{",...
Builds the advice interception code, to be used in a method interceptor. @param array $groupedAdvices The advices grouped by advice type @param string $methodName Name of the method the advice applies to @param string $targetClassName Name of the target class @param string $declaringClassName Name of the declaring cla...
[ "Builds", "the", "advice", "interception", "code", "to", "be", "used", "in", "a", "method", "interceptor", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/AbstractMethodInterceptorBuilder.php#L159-L267
neos/flow-development-collection
Neos.Flow/Classes/Security/Aspect/PolicyEnforcementAspect.php
PolicyEnforcementAspect.enforcePolicy
public function enforcePolicy(JoinPointInterface $joinPoint) { if ($this->securityContext->areAuthorizationChecksDisabled() !== true) { $this->policyEnforcementInterceptor->setJoinPoint($joinPoint); $this->policyEnforcementInterceptor->invoke(); } return $joinPoint->...
php
public function enforcePolicy(JoinPointInterface $joinPoint) { if ($this->securityContext->areAuthorizationChecksDisabled() !== true) { $this->policyEnforcementInterceptor->setJoinPoint($joinPoint); $this->policyEnforcementInterceptor->invoke(); } return $joinPoint->...
[ "public", "function", "enforcePolicy", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "if", "(", "$", "this", "->", "securityContext", "->", "areAuthorizationChecksDisabled", "(", ")", "!==", "true", ")", "{", "$", "this", "->", "policyEnforcementIntercept...
The policy enforcement advice. This advices applies the security enforcement interceptor to all methods configured in the policy. Note: If we have some kind of "run as" functionality in the future, we would have to manipulate the security context before calling the policy enforcement interceptor @Flow\Around("filter(N...
[ "The", "policy", "enforcement", "advice", ".", "This", "advices", "applies", "the", "security", "enforcement", "interceptor", "to", "all", "methods", "configured", "in", "the", "policy", ".", "Note", ":", "If", "we", "have", "some", "kind", "of", "run", "as"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Aspect/PolicyEnforcementAspect.php#L58-L66
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php
AbstractWidgetViewHelper.initializeWidgetContext
private function initializeWidgetContext() { if ($this->ajaxWidget === true) { if ($this->storeConfigurationInSession === true) { $this->ajaxWidgetContextHolder->store($this->widgetContext); } $this->widgetContext->setAjaxWidgetConfiguration($this->getAjax...
php
private function initializeWidgetContext() { if ($this->ajaxWidget === true) { if ($this->storeConfigurationInSession === true) { $this->ajaxWidgetContextHolder->store($this->widgetContext); } $this->widgetContext->setAjaxWidgetConfiguration($this->getAjax...
[ "private", "function", "initializeWidgetContext", "(", ")", "{", "if", "(", "$", "this", "->", "ajaxWidget", "===", "true", ")", "{", "if", "(", "$", "this", "->", "storeConfigurationInSession", "===", "true", ")", "{", "$", "this", "->", "ajaxWidgetContextH...
Initialize the Widget Context, before the Render method is called. @return void
[ "Initialize", "the", "Widget", "Context", "before", "the", "Render", "method", "is", "called", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php#L124-L138
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php
AbstractWidgetViewHelper.initiateSubRequest
protected function initiateSubRequest() { if ($this->controller instanceof DependencyProxy) { $this->controller->_activateDependency(); } if (!($this->controller instanceof AbstractWidgetController)) { throw new Exception\MissingControllerException('initiateSubRequest...
php
protected function initiateSubRequest() { if ($this->controller instanceof DependencyProxy) { $this->controller->_activateDependency(); } if (!($this->controller instanceof AbstractWidgetController)) { throw new Exception\MissingControllerException('initiateSubRequest...
[ "protected", "function", "initiateSubRequest", "(", ")", "{", "if", "(", "$", "this", "->", "controller", "instanceof", "DependencyProxy", ")", "{", "$", "this", "->", "controller", "->", "_activateDependency", "(", ")", ";", "}", "if", "(", "!", "(", "$",...
Initiate a sub request to $this->controller. Make sure to fill $this->controller via Dependency Injection. @return Response the response of this request. @throws Exception\InvalidControllerException @throws Exception\MissingControllerException @throws InfiniteLoopException @throws StopActionException @api
[ "Initiate", "a", "sub", "request", "to", "$this", "-", ">", "controller", ".", "Make", "sure", "to", "fill", "$this", "-", ">", "controller", "via", "Dependency", "Injection", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php#L202-L255
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php
AbstractWidgetViewHelper.passArgumentsToSubRequest
private function passArgumentsToSubRequest(ActionRequest $subRequest) { $arguments = $this->controllerContext->getRequest()->getPluginArguments(); $widgetIdentifier = $this->widgetContext->getWidgetIdentifier(); $controllerActionName = 'index'; if (isset($arguments[$widgetIdentifier...
php
private function passArgumentsToSubRequest(ActionRequest $subRequest) { $arguments = $this->controllerContext->getRequest()->getPluginArguments(); $widgetIdentifier = $this->widgetContext->getWidgetIdentifier(); $controllerActionName = 'index'; if (isset($arguments[$widgetIdentifier...
[ "private", "function", "passArgumentsToSubRequest", "(", "ActionRequest", "$", "subRequest", ")", "{", "$", "arguments", "=", "$", "this", "->", "controllerContext", "->", "getRequest", "(", ")", "->", "getPluginArguments", "(", ")", ";", "$", "widgetIdentifier", ...
Pass the arguments of the widget to the sub request. @param ActionRequest $subRequest @return void
[ "Pass", "the", "arguments", "of", "the", "widget", "to", "the", "sub", "request", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php#L263-L279
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php
AbstractWidgetViewHelper.initializeWidgetIdentifier
private function initializeWidgetIdentifier() { $widgetIdentifier = ($this->hasArgument('widgetId') ? $this->arguments['widgetId'] : strtolower(str_replace('\\', '-', get_class($this)))); $this->widgetContext->setWidgetIdentifier($widgetIdentifier); }
php
private function initializeWidgetIdentifier() { $widgetIdentifier = ($this->hasArgument('widgetId') ? $this->arguments['widgetId'] : strtolower(str_replace('\\', '-', get_class($this)))); $this->widgetContext->setWidgetIdentifier($widgetIdentifier); }
[ "private", "function", "initializeWidgetIdentifier", "(", ")", "{", "$", "widgetIdentifier", "=", "(", "$", "this", "->", "hasArgument", "(", "'widgetId'", ")", "?", "$", "this", "->", "arguments", "[", "'widgetId'", "]", ":", "strtolower", "(", "str_replace",...
The widget identifier is unique on the current page, and is used in the URI as a namespace for the widget's arguments. @return string the widget identifier for this widget @return void
[ "The", "widget", "identifier", "is", "unique", "on", "the", "current", "page", "and", "is", "used", "in", "the", "URI", "as", "a", "namespace", "for", "the", "widget", "s", "arguments", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetViewHelper.php#L288-L292
neos/flow-development-collection
Neos.Flow/Classes/I18n/Translator.php
Translator.translateByOriginalLabel
public function translateByOriginalLabel($originalLabel, array $arguments = [], $quantity = null, Locale $locale = null, $sourceName = 'Main', $packageKey = 'Neos.Flow') { if ($locale === null) { $locale = $this->localizationService->getConfiguration()->getCurrentLocale(); } $plu...
php
public function translateByOriginalLabel($originalLabel, array $arguments = [], $quantity = null, Locale $locale = null, $sourceName = 'Main', $packageKey = 'Neos.Flow') { if ($locale === null) { $locale = $this->localizationService->getConfiguration()->getCurrentLocale(); } $plu...
[ "public", "function", "translateByOriginalLabel", "(", "$", "originalLabel", ",", "array", "$", "arguments", "=", "[", "]", ",", "$", "quantity", "=", "null", ",", "Locale", "$", "locale", "=", "null", ",", "$", "sourceName", "=", "'Main'", ",", "$", "pa...
Translates the message given as $originalLabel. Searches for a translation in the source as defined by $sourceName (interpretation depends on concrete translation provider used). If any arguments are provided in the $arguments array, they will be inserted to the translated string (in place of corresponding placeholde...
[ "Translates", "the", "message", "given", "as", "$originalLabel", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Translator.php#L124-L142
neos/flow-development-collection
Neos.Flow/Classes/I18n/Translator.php
Translator.translateById
public function translateById($labelId, array $arguments = [], $quantity = null, Locale $locale = null, $sourceName = 'Main', $packageKey = 'Neos.Flow') { if ($locale === null) { $locale = $this->localizationService->getConfiguration()->getCurrentLocale(); } $pluralForm = $this->...
php
public function translateById($labelId, array $arguments = [], $quantity = null, Locale $locale = null, $sourceName = 'Main', $packageKey = 'Neos.Flow') { if ($locale === null) { $locale = $this->localizationService->getConfiguration()->getCurrentLocale(); } $pluralForm = $this->...
[ "public", "function", "translateById", "(", "$", "labelId", ",", "array", "$", "arguments", "=", "[", "]", ",", "$", "quantity", "=", "null", ",", "Locale", "$", "locale", "=", "null", ",", "$", "sourceName", "=", "'Main'", ",", "$", "packageKey", "=",...
Returns translated string found under the $labelId. Searches for a translation in the source as defined by $sourceName (interpretation depends on concrete translation provider used). If any arguments are provided in the $arguments array, they will be inserted to the translated string (in place of corresponding placeh...
[ "Returns", "translated", "string", "found", "under", "the", "$labelId", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Translator.php#L167-L183
neos/flow-development-collection
Neos.Flow/Classes/I18n/Translator.php
Translator.getPluralForm
protected function getPluralForm($quantity, Locale $locale) { if (!is_numeric($quantity)) { return null; } else { return $this->pluralsReader->getPluralForm($quantity, $locale); } }
php
protected function getPluralForm($quantity, Locale $locale) { if (!is_numeric($quantity)) { return null; } else { return $this->pluralsReader->getPluralForm($quantity, $locale); } }
[ "protected", "function", "getPluralForm", "(", "$", "quantity", ",", "Locale", "$", "locale", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "quantity", ")", ")", "{", "return", "null", ";", "}", "else", "{", "return", "$", "this", "->", "pluralsRea...
Get the plural form to be used. If $quantity is numeric and non-NULL, the plural form for provided $locale will be chosen according to it. In all other cases, NULL is returned. @param mixed $quantity @param Locale $locale @return string
[ "Get", "the", "plural", "form", "to", "be", "used", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Translator.php#L197-L204
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/RestController.php
RestController.resolveActionMethodName
protected function resolveActionMethodName() { if ($this->request->getControllerActionName() === 'index') { $actionName = 'index'; switch ($this->request->getHttpRequest()->getMethod()) { case 'HEAD': case 'GET': $actionName = ($thi...
php
protected function resolveActionMethodName() { if ($this->request->getControllerActionName() === 'index') { $actionName = 'index'; switch ($this->request->getHttpRequest()->getMethod()) { case 'HEAD': case 'GET': $actionName = ($thi...
[ "protected", "function", "resolveActionMethodName", "(", ")", "{", "if", "(", "$", "this", "->", "request", "->", "getControllerActionName", "(", ")", "===", "'index'", ")", "{", "$", "actionName", "=", "'index'", ";", "switch", "(", "$", "this", "->", "re...
Determines the action method and assures that the method exists. @return string The action method name @throws NoSuchActionException if the action specified in the request object does not exist (and if there's no default action either).
[ "Determines", "the", "action", "method", "and", "assures", "that", "the", "method", "exists", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/RestController.php#L54-L86
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/RestController.php
RestController.initializeCreateAction
protected function initializeCreateAction() { $propertyMappingConfiguration = $this->arguments[$this->resourceArgumentName]->getPropertyMappingConfiguration(); $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_AL...
php
protected function initializeCreateAction() { $propertyMappingConfiguration = $this->arguments[$this->resourceArgumentName]->getPropertyMappingConfiguration(); $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_AL...
[ "protected", "function", "initializeCreateAction", "(", ")", "{", "$", "propertyMappingConfiguration", "=", "$", "this", "->", "arguments", "[", "$", "this", "->", "resourceArgumentName", "]", "->", "getPropertyMappingConfiguration", "(", ")", ";", "$", "propertyMap...
Allow creation of resources in createAction() @return void
[ "Allow", "creation", "of", "resources", "in", "createAction", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/RestController.php#L93-L98
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/RestController.php
RestController.initializeUpdateAction
protected function initializeUpdateAction() { $propertyMappingConfiguration = $this->arguments[$this->resourceArgumentName]->getPropertyMappingConfiguration(); $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATIO...
php
protected function initializeUpdateAction() { $propertyMappingConfiguration = $this->arguments[$this->resourceArgumentName]->getPropertyMappingConfiguration(); $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATIO...
[ "protected", "function", "initializeUpdateAction", "(", ")", "{", "$", "propertyMappingConfiguration", "=", "$", "this", "->", "arguments", "[", "$", "this", "->", "resourceArgumentName", "]", "->", "getPropertyMappingConfiguration", "(", ")", ";", "$", "propertyMap...
Allow modification of resources in updateAction() @return void
[ "Allow", "modification", "of", "resources", "in", "updateAction", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/RestController.php#L105-L110
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/RestController.php
RestController.redirectToUri
protected function redirectToUri($uri, $delay = 0, $statusCode = 303) { // the parent method throws the exception, but we need to act afterwards // thus the code in catch - it's the expected state try { parent::redirectToUri($uri, $delay, $statusCode); } catch (StopAction...
php
protected function redirectToUri($uri, $delay = 0, $statusCode = 303) { // the parent method throws the exception, but we need to act afterwards // thus the code in catch - it's the expected state try { parent::redirectToUri($uri, $delay, $statusCode); } catch (StopAction...
[ "protected", "function", "redirectToUri", "(", "$", "uri", ",", "$", "delay", "=", "0", ",", "$", "statusCode", "=", "303", ")", "{", "// the parent method throws the exception, but we need to act afterwards", "// thus the code in catch - it's the expected state", "try", "{...
Redirects the web request to another uri. NOTE: This method only supports web requests and will throw an exception if used with other request types. @param mixed $uri Either a string representation of a URI or a \Neos\Flow\Http\Uri object @param integer $delay (optional) The delay in seconds. Default is no delay. @pa...
[ "Redirects", "the", "web", "request", "to", "another", "uri", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/RestController.php#L125-L137
neos/flow-development-collection
Neos.Cache/Classes/Psr/SimpleCache/SimpleCache.php
SimpleCache.set
public function set($key, $variable, $lifetime = null) { $this->ensureValidEntryIdentifier($key); try { $this->backend->set($key, serialize($variable), [], $lifetime); } catch (\Throwable $throwable) { throw new Exception('An exception was thrown in retrieving the key...
php
public function set($key, $variable, $lifetime = null) { $this->ensureValidEntryIdentifier($key); try { $this->backend->set($key, serialize($variable), [], $lifetime); } catch (\Throwable $throwable) { throw new Exception('An exception was thrown in retrieving the key...
[ "public", "function", "set", "(", "$", "key", ",", "$", "variable", ",", "$", "lifetime", "=", "null", ")", "{", "$", "this", "->", "ensureValidEntryIdentifier", "(", "$", "key", ")", ";", "try", "{", "$", "this", "->", "backend", "->", "set", "(", ...
Saves the value of a PHP variable in the cache. Note that the variable will be serialized if necessary. @param string $key An identifier used for this cache entry @param mixed $variable The variable to cache @param integer $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is...
[ "Saves", "the", "value", "of", "a", "PHP", "variable", "in", "the", "cache", ".", "Note", "that", "the", "variable", "will", "be", "serialized", "if", "necessary", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/SimpleCache/SimpleCache.php#L68-L77
neos/flow-development-collection
Neos.Cache/Classes/Psr/SimpleCache/SimpleCache.php
SimpleCache.get
public function get($key, $defaultValue = null) { $this->ensureValidEntryIdentifier($key); try { $rawResult = $this->backend->get($key); } catch (\Throwable $throwable) { throw new Exception('An exception was thrown in retrieving the key from the cache backend.', 1515...
php
public function get($key, $defaultValue = null) { $this->ensureValidEntryIdentifier($key); try { $rawResult = $this->backend->get($key); } catch (\Throwable $throwable) { throw new Exception('An exception was thrown in retrieving the key from the cache backend.', 1515...
[ "public", "function", "get", "(", "$", "key", ",", "$", "defaultValue", "=", "null", ")", "{", "$", "this", "->", "ensureValidEntryIdentifier", "(", "$", "key", ")", ";", "try", "{", "$", "rawResult", "=", "$", "this", "->", "backend", "->", "get", "...
Finds and returns a variable value from the cache. @param string $key Identifier of the cache entry to fetch @param mixed $defaultValue @return mixed The value or the defaultValue if entry was not found @throws Exception @throws InvalidArgumentException
[ "Finds", "and", "returns", "a", "variable", "value", "from", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/SimpleCache/SimpleCache.php#L88-L101
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/UploadViewHelper.php
UploadViewHelper.getUploadedResource
protected function getUploadedResource() { $resource = null; if ($this->hasMappingErrorOccurred()) { $resource = $this->getLastSubmittedFormData(); } elseif ($this->hasArgument('value')) { $resource = $this->arguments['value']; } elseif ($this->isObjectAccesso...
php
protected function getUploadedResource() { $resource = null; if ($this->hasMappingErrorOccurred()) { $resource = $this->getLastSubmittedFormData(); } elseif ($this->hasArgument('value')) { $resource = $this->arguments['value']; } elseif ($this->isObjectAccesso...
[ "protected", "function", "getUploadedResource", "(", ")", "{", "$", "resource", "=", "null", ";", "if", "(", "$", "this", "->", "hasMappingErrorOccurred", "(", ")", ")", "{", "$", "resource", "=", "$", "this", "->", "getLastSubmittedFormData", "(", ")", ";...
Returns a previously uploaded resource, or the resource specified via "value" argument if no resource has been uploaded before If errors occurred during property mapping for this property, NULL is returned @return PersistentResource or NULL if no resource was uploaded and the "value" argument is not set
[ "Returns", "a", "previously", "uploaded", "resource", "or", "the", "resource", "specified", "via", "value", "argument", "if", "no", "resource", "has", "been", "uploaded", "before", "If", "errors", "occurred", "during", "property", "mapping", "for", "this", "prop...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/UploadViewHelper.php#L133-L150
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/UploadViewHelper.php
UploadViewHelper.getNameWithoutPrefix
protected function getNameWithoutPrefix() { if ($this->isObjectAccessorMode()) { $propertySegments = explode('.', $this->arguments['property']); $formObjectName = $this->viewHelperVariableContainer->get(FormViewHelper::class, 'formObjectName'); if (!empty($formObjectName)...
php
protected function getNameWithoutPrefix() { if ($this->isObjectAccessorMode()) { $propertySegments = explode('.', $this->arguments['property']); $formObjectName = $this->viewHelperVariableContainer->get(FormViewHelper::class, 'formObjectName'); if (!empty($formObjectName)...
[ "protected", "function", "getNameWithoutPrefix", "(", ")", "{", "if", "(", "$", "this", "->", "isObjectAccessorMode", "(", ")", ")", "{", "$", "propertySegments", "=", "explode", "(", "'.'", ",", "$", "this", "->", "arguments", "[", "'property'", "]", ")",...
Get the name of this form element, without prefix. Note: This is overridden here because the "value" argument should not have an effect on the name attribute of the <input type="file" /> tag In the original implementation, setting a value will influence the name, @see AbstractFormFieldViewHelper::getNameWithoutPrefix(...
[ "Get", "the", "name", "of", "this", "form", "element", "without", "prefix", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/UploadViewHelper.php#L160-L177
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.create
public static function create(Uri $uri, $method = 'GET', array $arguments = [], array $files = [], array $server = []) { $get = UriHelper::parseQueryIntoArguments($uri); $post = $arguments; $isDefaultPort = $uri->getScheme() === 'https' ? ($uri->getPort() === 443) : ($uri->getPort() === 80)...
php
public static function create(Uri $uri, $method = 'GET', array $arguments = [], array $files = [], array $server = []) { $get = UriHelper::parseQueryIntoArguments($uri); $post = $arguments; $isDefaultPort = $uri->getScheme() === 'https' ? ($uri->getPort() === 443) : ($uri->getPort() === 80)...
[ "public", "static", "function", "create", "(", "Uri", "$", "uri", ",", "$", "method", "=", "'GET'", ",", "array", "$", "arguments", "=", "[", "]", ",", "array", "$", "files", "=", "[", "]", ",", "array", "$", "server", "=", "[", "]", ")", "{", ...
Creates a new Request object from the given data. @param Uri $uri The request URI @param string $method Request method, for example "GET" @param array $arguments Arguments to send in the request body @param array $files @param array $server @return Request @api
[ "Creates", "a", "new", "Request", "object", "from", "the", "given", "data", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L157-L197
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.createFromEnvironment
public static function createFromEnvironment() { $request = new static($_GET, $_POST, $_FILES, $_SERVER); $request->setContent(null); return $request; }
php
public static function createFromEnvironment() { $request = new static($_GET, $_POST, $_FILES, $_SERVER); $request->setContent(null); return $request; }
[ "public", "static", "function", "createFromEnvironment", "(", ")", "{", "$", "request", "=", "new", "static", "(", "$", "_GET", ",", "$", "_POST", ",", "$", "_FILES", ",", "$", "_SERVER", ")", ";", "$", "request", "->", "setContent", "(", "null", ")", ...
Considers the environment information found in PHP's superglobals and Flow's environment configuration and creates a new instance of this Request class matching that data. @return Request @api
[ "Considers", "the", "environment", "information", "found", "in", "PHP", "s", "superglobals", "and", "Flow", "s", "environment", "configuration", "and", "creates", "a", "new", "instance", "of", "this", "Request", "class", "matching", "that", "data", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L207-L212
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.getBaseUri
public function getBaseUri() { if (!isset($this->attributes[self::ATTRIBUTE_BASE_URI])) { $this->attributes[self::ATTRIBUTE_BASE_URI] = $this->detectBaseUri(); } return $this->attributes[self::ATTRIBUTE_BASE_URI]; }
php
public function getBaseUri() { if (!isset($this->attributes[self::ATTRIBUTE_BASE_URI])) { $this->attributes[self::ATTRIBUTE_BASE_URI] = $this->detectBaseUri(); } return $this->attributes[self::ATTRIBUTE_BASE_URI]; }
[ "public", "function", "getBaseUri", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "attributes", "[", "self", "::", "ATTRIBUTE_BASE_URI", "]", ")", ")", "{", "$", "this", "->", "attributes", "[", "self", "::", "ATTRIBUTE_BASE_URI", "]", ...
Returns the detected base URI @return UriInterface|Uri @deprecated Since Flow 5.1, use attribute @see Request::getAttribute(Request::ATTRIBUTE_BASE_URI)
[ "Returns", "the", "detected", "base", "URI" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L270-L277
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.setBaseUri
public function setBaseUri($baseUri) { if (is_string($baseUri)) { $baseUri = new Uri($baseUri); } $this->attributes[self::ATTRIBUTE_BASE_URI] = $baseUri; }
php
public function setBaseUri($baseUri) { if (is_string($baseUri)) { $baseUri = new Uri($baseUri); } $this->attributes[self::ATTRIBUTE_BASE_URI] = $baseUri; }
[ "public", "function", "setBaseUri", "(", "$", "baseUri", ")", "{", "if", "(", "is_string", "(", "$", "baseUri", ")", ")", "{", "$", "baseUri", "=", "new", "Uri", "(", "$", "baseUri", ")", ";", "}", "$", "this", "->", "attributes", "[", "self", "::"...
Set the base URI of this request. @param string|UriInterface $baseUri @deprecated Since Flow 5.1, set as an attribute on ServerRequestInterface instead. @see Request::withAttribute(Request::ATTRIBUTE_BASE_URI)
[ "Set", "the", "base", "URI", "of", "this", "request", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L286-L293
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.detectBaseUri
protected function detectBaseUri() { $baseUri = clone $this->uri; $baseUri = $baseUri->withQuery('')->withFragment('')->withPath(RequestInformationHelper::getScriptRequestPath($this)); return $baseUri; }
php
protected function detectBaseUri() { $baseUri = clone $this->uri; $baseUri = $baseUri->withQuery('')->withFragment('')->withPath(RequestInformationHelper::getScriptRequestPath($this)); return $baseUri; }
[ "protected", "function", "detectBaseUri", "(", ")", "{", "$", "baseUri", "=", "clone", "$", "this", "->", "uri", ";", "$", "baseUri", "=", "$", "baseUri", "->", "withQuery", "(", "''", ")", "->", "withFragment", "(", "''", ")", "->", "withPath", "(", ...
Tries to detect the base URI of request. @return UriInterface @deprecated Since Flow 5.1
[ "Tries", "to", "detect", "the", "base", "URI", "of", "request", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L301-L307
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.withAttribute
public function withAttribute($name, $value) { $request = clone $this; $request->setAttribute($name, $value); return $request; }
php
public function withAttribute($name, $value) { $request = clone $this; $request->setAttribute($name, $value); return $request; }
[ "public", "function", "withAttribute", "(", "$", "name", ",", "$", "value", ")", "{", "$", "request", "=", "clone", "$", "this", ";", "$", "request", "->", "setAttribute", "(", "$", "name", ",", "$", "value", ")", ";", "return", "$", "request", ";", ...
PSR-7 Return an instance with the specified derived request attribute. This method allows setting a single derived request attribute as described in getAttributes(). This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated attribute....
[ "PSR", "-", "7" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L427-L432
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.getNegotiatedMediaType
public function getNegotiatedMediaType(array $supportedMediaTypes, $trim = true) { return MediaTypeHelper::negotiateMediaType(MediaTypeHelper::determineAcceptedMediaTypes($this), $supportedMediaTypes, $trim); }
php
public function getNegotiatedMediaType(array $supportedMediaTypes, $trim = true) { return MediaTypeHelper::negotiateMediaType(MediaTypeHelper::determineAcceptedMediaTypes($this), $supportedMediaTypes, $trim); }
[ "public", "function", "getNegotiatedMediaType", "(", "array", "$", "supportedMediaTypes", ",", "$", "trim", "=", "true", ")", "{", "return", "MediaTypeHelper", "::", "negotiateMediaType", "(", "MediaTypeHelper", "::", "determineAcceptedMediaTypes", "(", "$", "this", ...
Returns the best fitting IANA media type after applying the content negotiation rules on a possible Accept header. @param array $supportedMediaTypes A list of media types which are supported by the application / controller @param boolean $trim If true, only the type/subtype of the media type is returned. If false, the...
[ "Returns", "the", "best", "fitting", "IANA", "media", "type", "after", "applying", "the", "content", "negotiation", "rules", "on", "a", "possible", "Accept", "header", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L523-L526
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.createUploadedFileFromSpec
protected function createUploadedFileFromSpec(array $value, $argumentsForValue) { $file = new FlowUploadedFile( $value['tmp_name'], (int)$value['size'], (int)$value['error'], $value['name'], $value['type'] ); if (!empty($argumentsF...
php
protected function createUploadedFileFromSpec(array $value, $argumentsForValue) { $file = new FlowUploadedFile( $value['tmp_name'], (int)$value['size'], (int)$value['error'], $value['name'], $value['type'] ); if (!empty($argumentsF...
[ "protected", "function", "createUploadedFileFromSpec", "(", "array", "$", "value", ",", "$", "argumentsForValue", ")", "{", "$", "file", "=", "new", "FlowUploadedFile", "(", "$", "value", "[", "'tmp_name'", "]", ",", "(", "int", ")", "$", "value", "[", "'s...
Create and return an UploadedFile instance from a $_FILES specification. If the specification represents an array of values, this method will delegate to normalizeNestedFileSpec() and return that return value. @param array $value $_FILES struct @param array $argumentsForValue @return UploadedFileInterface
[ "Create", "and", "return", "an", "UploadedFile", "instance", "from", "a", "$_FILES", "specification", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L595-L614
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.getCookieParams
public function getCookieParams() { $cookies = []; foreach ($this->headers->getCookies() as $cookie) { $cookies[$cookie->getName()] = $cookie->getValue(); }; return $cookies; }
php
public function getCookieParams() { $cookies = []; foreach ($this->headers->getCookies() as $cookie) { $cookies[$cookie->getName()] = $cookie->getValue(); }; return $cookies; }
[ "public", "function", "getCookieParams", "(", ")", "{", "$", "cookies", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "headers", "->", "getCookies", "(", ")", "as", "$", "cookie", ")", "{", "$", "cookies", "[", "$", "cookie", "->", "getName"...
Retrieve cookies. Retrieves cookies sent by the client to the server. The data MUST be compatible with the structure of the $_COOKIE superglobal. @return array
[ "Retrieve", "cookies", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L641-L648
neos/flow-development-collection
Neos.Flow/Classes/Http/Request.php
Request.withCookieParams
public function withCookieParams(array $cookies) { $newRequest = clone $this; foreach ($cookies as $name => $value) { $newRequest->headers->setCookie(new Cookie($name, $value)); } return $newRequest; }
php
public function withCookieParams(array $cookies) { $newRequest = clone $this; foreach ($cookies as $name => $value) { $newRequest->headers->setCookie(new Cookie($name, $value)); } return $newRequest; }
[ "public", "function", "withCookieParams", "(", "array", "$", "cookies", ")", "{", "$", "newRequest", "=", "clone", "$", "this", ";", "foreach", "(", "$", "cookies", "as", "$", "name", "=>", "$", "value", ")", "{", "$", "newRequest", "->", "headers", "-...
Return an instance with the specified cookies. The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST be compatible with the structure of $_COOKIE. Typically, this data will be injected at instantiation. This method MUST NOT update the related Cookie header of the request instance, nor related value...
[ "Return", "an", "instance", "with", "the", "specified", "cookies", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Request.php#L667-L674
neos/flow-development-collection
Neos.Flow/Classes/Cli/SlaveRequestHandler.php
SlaveRequestHandler.handleRequest
public function handleRequest() { $sequence = $this->bootstrap->buildRuntimeSequence(); $sequence->invoke($this->bootstrap); $objectManager = $this->bootstrap->getObjectManager(); /** @var LoggerInterface $logger */ $logger = $objectManager->get(PsrLoggerFactoryInterface::cl...
php
public function handleRequest() { $sequence = $this->bootstrap->buildRuntimeSequence(); $sequence->invoke($this->bootstrap); $objectManager = $this->bootstrap->getObjectManager(); /** @var LoggerInterface $logger */ $logger = $objectManager->get(PsrLoggerFactoryInterface::cl...
[ "public", "function", "handleRequest", "(", ")", "{", "$", "sequence", "=", "$", "this", "->", "bootstrap", "->", "buildRuntimeSequence", "(", ")", ";", "$", "sequence", "->", "invoke", "(", "$", "this", "->", "bootstrap", ")", ";", "$", "objectManager", ...
Creates an event loop which takes orders from the parent process and executes them in runtime mode. @return void @throws FlowException
[ "Creates", "an", "event", "loop", "which", "takes", "orders", "from", "the", "parent", "process", "and", "executes", "them", "in", "runtime", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/SlaveRequestHandler.php#L75-L115
neos/flow-development-collection
Neos.Flow/Classes/Cli/SlaveRequestHandler.php
SlaveRequestHandler.handleException
protected function handleException(\Exception $exception) { $response = new Response(); $exceptionMessage = ''; $exceptionReference = "\n<b>More Information</b>\n"; $exceptionReference .= " Exception code #" . $exception->getCode() . "\n"; $exceptionReference .= " Fil...
php
protected function handleException(\Exception $exception) { $response = new Response(); $exceptionMessage = ''; $exceptionReference = "\n<b>More Information</b>\n"; $exceptionReference .= " Exception code #" . $exception->getCode() . "\n"; $exceptionReference .= " Fil...
[ "protected", "function", "handleException", "(", "\\", "Exception", "$", "exception", ")", "{", "$", "response", "=", "new", "Response", "(", ")", ";", "$", "exceptionMessage", "=", "''", ";", "$", "exceptionReference", "=", "\"\\n<b>More Information</b>\\n\"", ...
Displays a human readable, partly beautified version of the given exception and stops the application, return a non-zero exit code. @param \Exception $exception @return void
[ "Displays", "a", "human", "readable", "partly", "beautified", "version", "of", "the", "given", "exception", "and", "stops", "the", "application", "return", "a", "non", "-", "zero", "exit", "code", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/SlaveRequestHandler.php#L135-L151
neos/flow-development-collection
Neos.Eel/Classes/Context.php
Context.get
public function get($path) { if ($path instanceof Context) { $path = $path->unwrap(); } if ($path === null) { return null; } elseif (is_string($path) || is_integer($path)) { if (is_array($this->value)) { return array_key_exists($pat...
php
public function get($path) { if ($path instanceof Context) { $path = $path->unwrap(); } if ($path === null) { return null; } elseif (is_string($path) || is_integer($path)) { if (is_array($this->value)) { return array_key_exists($pat...
[ "public", "function", "get", "(", "$", "path", ")", "{", "if", "(", "$", "path", "instanceof", "Context", ")", "{", "$", "path", "=", "$", "path", "->", "unwrap", "(", ")", ";", "}", "if", "(", "$", "path", "===", "null", ")", "{", "return", "n...
Get a value of the context This basically acts as a safe access to non-existing properties, unified array and property access (using getters) and access to the current value (empty path). If a property or key did not exist this method will return NULL. @param string|integer|Context $path The path as string or Contex...
[ "Get", "a", "value", "of", "the", "context" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Context.php#L53-L73
neos/flow-development-collection
Neos.Eel/Classes/Context.php
Context.call
public function call($method, array $arguments = []) { if ($this->value === null) { return null; } elseif (is_object($this->value)) { $callback = [$this->value, $method]; } elseif (is_array($this->value)) { if (!array_key_exists($method, $this->value)) { ...
php
public function call($method, array $arguments = []) { if ($this->value === null) { return null; } elseif (is_object($this->value)) { $callback = [$this->value, $method]; } elseif (is_array($this->value)) { if (!array_key_exists($method, $this->value)) { ...
[ "public", "function", "call", "(", "$", "method", ",", "array", "$", "arguments", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "value", "===", "null", ")", "{", "return", "null", ";", "}", "elseif", "(", "is_object", "(", "$", "this", "...
Call a method on this context @param string $method @param array $arguments Arguments to the method, if of type Context they will be unwrapped @return mixed @throws \Exception
[ "Call", "a", "method", "on", "this", "context" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Context.php#L94-L118
neos/flow-development-collection
Neos.Eel/Classes/Context.php
Context.unwrapValue
public function unwrapValue($value) { if (is_array($value)) { $self = $this; return array_map(function ($item) use ($self) { if ($item instanceof Context) { return $item->unwrap(); } else { return $self->unwrapVa...
php
public function unwrapValue($value) { if (is_array($value)) { $self = $this; return array_map(function ($item) use ($self) { if ($item instanceof Context) { return $item->unwrap(); } else { return $self->unwrapVa...
[ "public", "function", "unwrapValue", "(", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "self", "=", "$", "this", ";", "return", "array_map", "(", "function", "(", "$", "item", ")", "use", "(", "$", "self", ...
Unwrap a value by unwrapping nested context objects This method is public for closure access. @param $value @return mixed
[ "Unwrap", "a", "value", "by", "unwrapping", "nested", "context", "objects" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Context.php#L165-L179
neos/flow-development-collection
Neos.Eel/Classes/Context.php
Context.push
public function push($value, $key = null) { if (!is_array($this->value)) { throw new EvaluationException('Array operation on non-array context', 1344418485); } if ($key === null) { $this->value[] = $value; } else { $this->value[$key] = $value; ...
php
public function push($value, $key = null) { if (!is_array($this->value)) { throw new EvaluationException('Array operation on non-array context', 1344418485); } if ($key === null) { $this->value[] = $value; } else { $this->value[$key] = $value; ...
[ "public", "function", "push", "(", "$", "value", ",", "$", "key", "=", "null", ")", "{", "if", "(", "!", "is_array", "(", "$", "this", "->", "value", ")", ")", "{", "throw", "new", "EvaluationException", "(", "'Array operation on non-array context'", ",", ...
Push an entry to the context Is used to build array instances inside the evaluator. @param mixed $value @param string $key @return Context @throws EvaluationException
[ "Push", "an", "entry", "to", "the", "context" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Context.php#L191-L202
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Format/Nl2brViewHelper.php
Nl2brViewHelper.render
public function render() { $value = $this->arguments['value']; if ($value === null) { $value = $this->renderChildren(); } return nl2br($value); }
php
public function render() { $value = $this->arguments['value']; if ($value === null) { $value = $this->renderChildren(); } return nl2br($value); }
[ "public", "function", "render", "(", ")", "{", "$", "value", "=", "$", "this", "->", "arguments", "[", "'value'", "]", ";", "if", "(", "$", "value", "===", "null", ")", "{", "$", "value", "=", "$", "this", "->", "renderChildren", "(", ")", ";", "...
Replaces newline characters by HTML line breaks. @return string the altered string. @api
[ "Replaces", "newline", "characters", "by", "HTML", "line", "breaks", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/Nl2brViewHelper.php#L65-L74
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/CollectionValidator.php
CollectionValidator.isValid
protected function isValid($value) { if ($value instanceof \Doctrine\ORM\PersistentCollection && !$value->isInitialized()) { return; } elseif ((is_object($value) && !TypeHandling::isCollectionType(get_class($value))) && !is_array($value)) { $this->addError('The given subject ...
php
protected function isValid($value) { if ($value instanceof \Doctrine\ORM\PersistentCollection && !$value->isInitialized()) { return; } elseif ((is_object($value) && !TypeHandling::isCollectionType(get_class($value))) && !is_array($value)) { $this->addError('The given subject ...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "\\", "Doctrine", "\\", "ORM", "\\", "PersistentCollection", "&&", "!", "$", "value", "->", "isInitialized", "(", ")", ")", "{", "return", ";", "}", ...
Checks for a collection and if needed validates the items in the collection. This is done with the specified element validator or a validator based on the given element type and validation group. Either elementValidator or elementType must be given, otherwise validation will be skipped. @param mixed $value A collecti...
[ "Checks", "for", "a", "collection", "and", "if", "needed", "validates", "the", "items", "in", "the", "collection", ".", "This", "is", "done", "with", "the", "specified", "element", "validator", "or", "a", "validator", "based", "on", "the", "given", "element"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/CollectionValidator.php#L51-L80
neos/flow-development-collection
Neos.Eel/Classes/InterpretedEvaluator.php
InterpretedEvaluator.evaluate
public function evaluate($expression, Context $context) { $expression = trim($expression); $parser = new InterpretedEelParser($expression, $context); $res = $parser->match_Expression(); if ($res === false) { throw new ParserException(sprintf('Expression "%s" could not be...
php
public function evaluate($expression, Context $context) { $expression = trim($expression); $parser = new InterpretedEelParser($expression, $context); $res = $parser->match_Expression(); if ($res === false) { throw new ParserException(sprintf('Expression "%s" could not be...
[ "public", "function", "evaluate", "(", "$", "expression", ",", "Context", "$", "context", ")", "{", "$", "expression", "=", "trim", "(", "$", "expression", ")", ";", "$", "parser", "=", "new", "InterpretedEelParser", "(", "$", "expression", ",", "$", "co...
Evaluate an expression under a given context @param string $expression @param Context $context @return mixed @throws ParserException
[ "Evaluate", "an", "expression", "under", "a", "given", "context" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/InterpretedEvaluator.php#L30-L49
neos/flow-development-collection
Neos.Flow/Classes/Cli/Response.php
Response.hasColorSupport
public function hasColorSupport(): bool { if ($this->colorSupport !== null) { return $this->colorSupport; } if (DIRECTORY_SEPARATOR !== '\\') { return function_exists('posix_isatty') && posix_isatty(STDOUT); } else { return getenv('ANSICON') !== fa...
php
public function hasColorSupport(): bool { if ($this->colorSupport !== null) { return $this->colorSupport; } if (DIRECTORY_SEPARATOR !== '\\') { return function_exists('posix_isatty') && posix_isatty(STDOUT); } else { return getenv('ANSICON') !== fa...
[ "public", "function", "hasColorSupport", "(", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "colorSupport", "!==", "null", ")", "{", "return", "$", "this", "->", "colorSupport", ";", "}", "if", "(", "DIRECTORY_SEPARATOR", "!==", "'\\\\'", ")", "{"...
Tells if the response content should be styled on send(). Regardless of this setting content will only be styled with output format set to "styled". @return boolean true if the terminal support ANSI colors, otherwise false
[ "Tells", "if", "the", "response", "content", "should", "be", "styled", "on", "send", "()", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Response.php#L97-L107
neos/flow-development-collection
Neos.Flow/Classes/Cli/Response.php
Response.send
public function send() { if ($this->content === null) { return; } if ($this->outputFormat === self::OUTPUTFORMAT_RAW) { echo $this->content; return; } if ($this->outputFormat === self::OUTPUTFORMAT_PLAIN) { echo strip_tags($th...
php
public function send() { if ($this->content === null) { return; } if ($this->outputFormat === self::OUTPUTFORMAT_RAW) { echo $this->content; return; } if ($this->outputFormat === self::OUTPUTFORMAT_PLAIN) { echo strip_tags($th...
[ "public", "function", "send", "(", ")", "{", "if", "(", "$", "this", "->", "content", "===", "null", ")", "{", "return", ";", "}", "if", "(", "$", "this", "->", "outputFormat", "===", "self", "::", "OUTPUTFORMAT_RAW", ")", "{", "echo", "$", "this", ...
Sends the response @return void @api
[ "Sends", "the", "response" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Response.php#L136-L171
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.getComposerManifest
public static function getComposerManifest(string $manifestPath, string $configurationPath = null) { $composerManifest = static::readComposerManifest($manifestPath); if ($composerManifest === null) { return null; } if ($configurationPath !== null) { return Ob...
php
public static function getComposerManifest(string $manifestPath, string $configurationPath = null) { $composerManifest = static::readComposerManifest($manifestPath); if ($composerManifest === null) { return null; } if ($configurationPath !== null) { return Ob...
[ "public", "static", "function", "getComposerManifest", "(", "string", "$", "manifestPath", ",", "string", "$", "configurationPath", "=", "null", ")", "{", "$", "composerManifest", "=", "static", "::", "readComposerManifest", "(", "$", "manifestPath", ")", ";", "...
Returns contents of Composer manifest - or part there of. @param string $manifestPath @param string $configurationPath Optional. Only return the part of the manifest indexed by configurationPath @return array|mixed
[ "Returns", "contents", "of", "Composer", "manifest", "-", "or", "part", "there", "of", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L46-L57
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.readComposerLock
public static function readComposerLock(): array { if (self::$composerLockCache !== null) { return self::$composerLockCache; } if (!file_exists(FLOW_PATH_ROOT . 'composer.lock')) { return []; } $json = file_get_contents(FLOW_PATH_ROOT . 'composer.loc...
php
public static function readComposerLock(): array { if (self::$composerLockCache !== null) { return self::$composerLockCache; } if (!file_exists(FLOW_PATH_ROOT . 'composer.lock')) { return []; } $json = file_get_contents(FLOW_PATH_ROOT . 'composer.loc...
[ "public", "static", "function", "readComposerLock", "(", ")", ":", "array", "{", "if", "(", "self", "::", "$", "composerLockCache", "!==", "null", ")", "{", "return", "self", "::", "$", "composerLockCache", ";", "}", "if", "(", "!", "file_exists", "(", "...
Read the content of the composer.lock @return array
[ "Read", "the", "content", "of", "the", "composer", ".", "lock" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L64-L81
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.readComposerManifest
protected static function readComposerManifest(string $manifestPath): array { $manifestPathAndFilename = $manifestPath . 'composer.json'; if (isset(self::$composerManifestCache[$manifestPathAndFilename])) { return self::$composerManifestCache[$manifestPathAndFilename]; } ...
php
protected static function readComposerManifest(string $manifestPath): array { $manifestPathAndFilename = $manifestPath . 'composer.json'; if (isset(self::$composerManifestCache[$manifestPathAndFilename])) { return self::$composerManifestCache[$manifestPathAndFilename]; } ...
[ "protected", "static", "function", "readComposerManifest", "(", "string", "$", "manifestPath", ")", ":", "array", "{", "$", "manifestPathAndFilename", "=", "$", "manifestPath", ".", "'composer.json'", ";", "if", "(", "isset", "(", "self", "::", "$", "composerMan...
Read the content of composer.json in the given path @param string $manifestPath @return array @throws Exception\MissingPackageManifestException
[ "Read", "the", "content", "of", "composer", ".", "json", "in", "the", "given", "path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L90-L109
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.isFlowPackageType
public static function isFlowPackageType(string $packageType): bool { foreach (['typo3-flow-', 'neos-'] as $allowedPackageTypePrefix) { if (strpos($packageType, $allowedPackageTypePrefix) === 0) { return true; } } return false; }
php
public static function isFlowPackageType(string $packageType): bool { foreach (['typo3-flow-', 'neos-'] as $allowedPackageTypePrefix) { if (strpos($packageType, $allowedPackageTypePrefix) === 0) { return true; } } return false; }
[ "public", "static", "function", "isFlowPackageType", "(", "string", "$", "packageType", ")", ":", "bool", "{", "foreach", "(", "[", "'typo3-flow-'", ",", "'neos-'", "]", "as", "$", "allowedPackageTypePrefix", ")", "{", "if", "(", "strpos", "(", "$", "package...
Checks if the given (composer) package type is a type native to the neos project. @param string $packageType @return boolean
[ "Checks", "if", "the", "given", "(", "composer", ")", "package", "type", "is", "a", "type", "native", "to", "the", "neos", "project", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L117-L126
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.getComposerPackageNameFromPackageKey
public static function getComposerPackageNameFromPackageKey(string $packageKey): string { $nameParts = explode('.', $packageKey); $vendor = array_shift($nameParts); return strtolower($vendor . '/' . implode('-', $nameParts)); }
php
public static function getComposerPackageNameFromPackageKey(string $packageKey): string { $nameParts = explode('.', $packageKey); $vendor = array_shift($nameParts); return strtolower($vendor . '/' . implode('-', $nameParts)); }
[ "public", "static", "function", "getComposerPackageNameFromPackageKey", "(", "string", "$", "packageKey", ")", ":", "string", "{", "$", "nameParts", "=", "explode", "(", "'.'", ",", "$", "packageKey", ")", ";", "$", "vendor", "=", "array_shift", "(", "$", "n...
Determines the composer package name ("vendor/foo-bar") from the Flow package key ("Vendor.Foo.Bar") @param string $packageKey @return string
[ "Determines", "the", "composer", "package", "name", "(", "vendor", "/", "foo", "-", "bar", ")", "from", "the", "Flow", "package", "key", "(", "Vendor", ".", "Foo", ".", "Bar", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L134-L139
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.writeComposerManifest
public static function writeComposerManifest(string $manifestPath, string $packageKey, array $composerManifestData = []): array { $manifest = [ 'description' => '' ]; if ($composerManifestData !== null) { $manifest = array_merge($manifest, $composerManifestData); ...
php
public static function writeComposerManifest(string $manifestPath, string $packageKey, array $composerManifestData = []): array { $manifest = [ 'description' => '' ]; if ($composerManifestData !== null) { $manifest = array_merge($manifest, $composerManifestData); ...
[ "public", "static", "function", "writeComposerManifest", "(", "string", "$", "manifestPath", ",", "string", "$", "packageKey", ",", "array", "$", "composerManifestData", "=", "[", "]", ")", ":", "array", "{", "$", "manifest", "=", "[", "'description'", "=>", ...
Write a composer manifest for the package. @param string $manifestPath @param string $packageKey @param array $composerManifestData @return array the manifest data written
[ "Write", "a", "composer", "manifest", "for", "the", "package", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L149-L180
neos/flow-development-collection
Neos.Flow/Classes/Composer/ComposerUtility.php
ComposerUtility.getPackageVersion
public static function getPackageVersion($composerName) { foreach (self::readComposerLock() as $composerLockData) { if (!isset($composerLockData['name'])) { continue; } if ($composerLockData['name'] === $composerName) { return preg_replace(...
php
public static function getPackageVersion($composerName) { foreach (self::readComposerLock() as $composerLockData) { if (!isset($composerLockData['name'])) { continue; } if ($composerLockData['name'] === $composerName) { return preg_replace(...
[ "public", "static", "function", "getPackageVersion", "(", "$", "composerName", ")", "{", "foreach", "(", "self", "::", "readComposerLock", "(", ")", "as", "$", "composerLockData", ")", "{", "if", "(", "!", "isset", "(", "$", "composerLockData", "[", "'name'"...
Get the package version of the given package Return normalized package version. @param string $composerName @return string @see https://getcomposer.org/doc/04-schema.md#version
[ "Get", "the", "package", "version", "of", "the", "given", "package", "Return", "normalized", "package", "version", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/ComposerUtility.php#L190-L202
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/DisjunctionValidator.php
DisjunctionValidator.validate
public function validate($value) { $validators = $this->getValidators(); if ($validators->count() > 0) { $result = null; foreach ($validators as $validator) { $validatorResult = $validator->validate($value); if ($validatorResult->hasErrors()) {...
php
public function validate($value) { $validators = $this->getValidators(); if ($validators->count() > 0) { $result = null; foreach ($validators as $validator) { $validatorResult = $validator->validate($value); if ($validatorResult->hasErrors()) {...
[ "public", "function", "validate", "(", "$", "value", ")", "{", "$", "validators", "=", "$", "this", "->", "getValidators", "(", ")", ";", "if", "(", "$", "validators", "->", "count", "(", ")", ">", "0", ")", "{", "$", "result", "=", "null", ";", ...
Checks if the given value is valid according to the validators of the disjunction. So only one validator has to be valid, to make the whole disjunction valid. Errors are only returned if all validators failed. @param mixed $value The value that should be validated @return ErrorResult @api
[ "Checks", "if", "the", "given", "value", "is", "valid", "according", "to", "the", "validators", "of", "the", "disjunction", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/DisjunctionValidator.php#L34-L61
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.offsetSet
public function offsetSet($offset, $value) { if (!$value instanceof Argument) { throw new \InvalidArgumentException(sprintf('Controller arguments must be valid %s objects.', Argument::class), 1187953786); } $argumentName = $value->getName(); parent::offsetSet($argumentNa...
php
public function offsetSet($offset, $value) { if (!$value instanceof Argument) { throw new \InvalidArgumentException(sprintf('Controller arguments must be valid %s objects.', Argument::class), 1187953786); } $argumentName = $value->getName(); parent::offsetSet($argumentNa...
[ "public", "function", "offsetSet", "(", "$", "offset", ",", "$", "value", ")", "{", "if", "(", "!", "$", "value", "instanceof", "Argument", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Controller arguments must be valid %s o...
Adds or replaces the argument specified by $value. The argument's name is taken from the argument object itself, therefore the $offset does not have any meaning in this context. @param mixed $offset Offset - not used here @param mixed $value The argument. @return void @throws \InvalidArgumentException if the argument ...
[ "Adds", "or", "replaces", "the", "argument", "specified", "by", "$value", ".", "The", "argument", "s", "name", "is", "taken", "from", "the", "argument", "object", "itself", "therefore", "the", "$offset", "does", "not", "have", "any", "meaning", "in", "this",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L40-L49
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.append
public function append($value) { if (!$value instanceof Argument) { throw new \InvalidArgumentException(sprintf('Controller arguments must be valid %s objects.', Argument::class), 1187953786); } $this->offsetSet(null, $value); }
php
public function append($value) { if (!$value instanceof Argument) { throw new \InvalidArgumentException(sprintf('Controller arguments must be valid %s objects.', Argument::class), 1187953786); } $this->offsetSet(null, $value); }
[ "public", "function", "append", "(", "$", "value", ")", "{", "if", "(", "!", "$", "value", "instanceof", "Argument", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Controller arguments must be valid %s objects.'", ",", "Argument...
Sets an argument, aliased to offsetSet() @param mixed $value The value @return void @throws \InvalidArgumentException if the argument is not a valid Controller Argument object @api
[ "Sets", "an", "argument", "aliased", "to", "offsetSet", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L59-L65
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.offsetUnset
public function offsetUnset($offset) { $translatedOffset = $this->validateArgumentExistence($offset); parent::offsetUnset($translatedOffset); unset($this->argumentNames[$translatedOffset]); if ($offset != $translatedOffset) { unset($this->argumentShortNames[$offset]); ...
php
public function offsetUnset($offset) { $translatedOffset = $this->validateArgumentExistence($offset); parent::offsetUnset($translatedOffset); unset($this->argumentNames[$translatedOffset]); if ($offset != $translatedOffset) { unset($this->argumentShortNames[$offset]); ...
[ "public", "function", "offsetUnset", "(", "$", "offset", ")", "{", "$", "translatedOffset", "=", "$", "this", "->", "validateArgumentExistence", "(", "$", "offset", ")", ";", "parent", "::", "offsetUnset", "(", "$", "translatedOffset", ")", ";", "unset", "("...
Unsets an argument @param mixed $offset Offset @return void @api
[ "Unsets", "an", "argument" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L74-L83
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.offsetGet
public function offsetGet($offset) { $translatedOffset = $this->validateArgumentExistence($offset); if ($translatedOffset === false) { throw new \Neos\Flow\Mvc\Exception\NoSuchArgumentException('An argument "' . $offset . '" does not exist.', 1216909923); } return parent:...
php
public function offsetGet($offset) { $translatedOffset = $this->validateArgumentExistence($offset); if ($translatedOffset === false) { throw new \Neos\Flow\Mvc\Exception\NoSuchArgumentException('An argument "' . $offset . '" does not exist.', 1216909923); } return parent:...
[ "public", "function", "offsetGet", "(", "$", "offset", ")", "{", "$", "translatedOffset", "=", "$", "this", "->", "validateArgumentExistence", "(", "$", "offset", ")", ";", "if", "(", "$", "translatedOffset", "===", "false", ")", "{", "throw", "new", "\\",...
Returns the value at the specified index @param mixed $offset Offset @return Argument The requested argument object @throws NoSuchArgumentException if the argument does not exist @api
[ "Returns", "the", "value", "at", "the", "specified", "index" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L106-L113
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.addNewArgument
public function addNewArgument($name, $dataType = 'string', $isRequired = true, $defaultValue = null) { $argument = new Argument($name, $dataType); $argument->setRequired($isRequired); $argument->setDefaultValue($defaultValue); $this->addArgument($argument); return $argument...
php
public function addNewArgument($name, $dataType = 'string', $isRequired = true, $defaultValue = null) { $argument = new Argument($name, $dataType); $argument->setRequired($isRequired); $argument->setDefaultValue($defaultValue); $this->addArgument($argument); return $argument...
[ "public", "function", "addNewArgument", "(", "$", "name", ",", "$", "dataType", "=", "'string'", ",", "$", "isRequired", "=", "true", ",", "$", "defaultValue", "=", "null", ")", "{", "$", "argument", "=", "new", "Argument", "(", "$", "name", ",", "$", ...
Creates, adds and returns a new controller argument to this composite object. If an argument with the same name exists already, it will be replaced by the new argument object. @param string $name Name of the argument @param string $dataType Name of one of the built-in data types @param boolean $isRequired true if this...
[ "Creates", "adds", "and", "returns", "a", "new", "controller", "argument", "to", "this", "composite", "object", ".", "If", "an", "argument", "with", "the", "same", "name", "exists", "already", "it", "will", "be", "replaced", "by", "the", "new", "argument", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L127-L135
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.removeAll
public function removeAll() { foreach ($this->argumentNames as $argumentName => $booleanValue) { parent::offsetUnset($argumentName); } $this->argumentNames = []; }
php
public function removeAll() { foreach ($this->argumentNames as $argumentName => $booleanValue) { parent::offsetUnset($argumentName); } $this->argumentNames = []; }
[ "public", "function", "removeAll", "(", ")", "{", "foreach", "(", "$", "this", "->", "argumentNames", "as", "$", "argumentName", "=>", "$", "booleanValue", ")", "{", "parent", "::", "offsetUnset", "(", "$", "argumentName", ")", ";", "}", "$", "this", "->...
Remove all arguments and resets this object @return void
[ "Remove", "all", "arguments", "and", "resets", "this", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L240-L246
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/Arguments.php
Arguments.getValidationResults
public function getValidationResults() { $results = new Result(); foreach ($this as $argument) { $argumentValidationResults = $argument->getValidationResults(); if ($argumentValidationResults === null) { continue; } $results ...
php
public function getValidationResults() { $results = new Result(); foreach ($this as $argument) { $argumentValidationResults = $argument->getValidationResults(); if ($argumentValidationResults === null) { continue; } $results ...
[ "public", "function", "getValidationResults", "(", ")", "{", "$", "results", "=", "new", "Result", "(", ")", ";", "foreach", "(", "$", "this", "as", "$", "argument", ")", "{", "$", "argumentValidationResults", "=", "$", "argument", "->", "getValidationResult...
Get all property mapping / validation errors @return Result
[ "Get", "all", "property", "mapping", "/", "validation", "errors" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/Arguments.php#L253-L269
neos/flow-development-collection
Neos.Flow/Classes/Mvc/ResponseDeprecationTrait.php
ResponseDeprecationTrait.createFromRaw
public static function createFromRaw($rawResponse, Response $parentResponse = null) { /** @var Response $response */ $response = ResponseInformationHelper::createFromRaw($rawResponse, self::class); $response->parentResponse = $parentResponse; return $response; }
php
public static function createFromRaw($rawResponse, Response $parentResponse = null) { /** @var Response $response */ $response = ResponseInformationHelper::createFromRaw($rawResponse, self::class); $response->parentResponse = $parentResponse; return $response; }
[ "public", "static", "function", "createFromRaw", "(", "$", "rawResponse", ",", "Response", "$", "parentResponse", "=", "null", ")", "{", "/** @var Response $response */", "$", "response", "=", "ResponseInformationHelper", "::", "createFromRaw", "(", "$", "rawResponse"...
Purely internal implementation to support backwards compatibility. @inheritDoc @internal @deprecated TODO: Can be removed when the ActionResponse no longer extends HTTP response.
[ "Purely", "internal", "implementation", "to", "support", "backwards", "compatibility", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/ResponseDeprecationTrait.php#L265-L272
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/BCryptHashingStrategy.php
BCryptHashingStrategy.hashPassword
public function hashPassword($password, $staticSalt = null) { $dynamicSalt = UtilityAlgorithms::generateRandomString(22, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./'); return crypt($password, '$2a$' . $this->cost . '$' . $dynamicSalt); }
php
public function hashPassword($password, $staticSalt = null) { $dynamicSalt = UtilityAlgorithms::generateRandomString(22, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./'); return crypt($password, '$2a$' . $this->cost . '$' . $dynamicSalt); }
[ "public", "function", "hashPassword", "(", "$", "password", ",", "$", "staticSalt", "=", "null", ")", "{", "$", "dynamicSalt", "=", "UtilityAlgorithms", "::", "generateRandomString", "(", "22", ",", "'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./'", "...
Creates a BCrypt hash @param string $password The plaintext password to hash @param string $staticSalt Optional static salt that will not be stored in the hashed password @return string the result of the crypt() call
[ "Creates", "a", "BCrypt", "hash" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/BCryptHashingStrategy.php#L49-L53
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/BCryptHashingStrategy.php
BCryptHashingStrategy.validatePassword
public function validatePassword($password, $hashedPasswordAndSalt, $staticSalt = null) { if (strlen($hashedPasswordAndSalt) < 29 || strpos($hashedPasswordAndSalt, '$2a$') !== 0) { return false; } $cryptSalt = '$2a$' . substr($hashedPasswordAndSalt, 4, 26); return crypt(...
php
public function validatePassword($password, $hashedPasswordAndSalt, $staticSalt = null) { if (strlen($hashedPasswordAndSalt) < 29 || strpos($hashedPasswordAndSalt, '$2a$') !== 0) { return false; } $cryptSalt = '$2a$' . substr($hashedPasswordAndSalt, 4, 26); return crypt(...
[ "public", "function", "validatePassword", "(", "$", "password", ",", "$", "hashedPasswordAndSalt", ",", "$", "staticSalt", "=", "null", ")", "{", "if", "(", "strlen", "(", "$", "hashedPasswordAndSalt", ")", "<", "29", "||", "strpos", "(", "$", "hashedPasswor...
Validate a password against a derived key (hashed password) and salt using BCrypt Passwords hashed with a different cost can be validated by using the cost parameter of the hashed password and salt. @param string $password The cleartext password @param string $hashedPasswordAndSalt The derived key and salt in as retu...
[ "Validate", "a", "password", "against", "a", "derived", "key", "(", "hashed", "password", ")", "and", "salt", "using", "BCrypt" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/BCryptHashingStrategy.php#L66-L74
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php
MvcPropertyMappingConfiguration.allowCreationForSubProperty
public function allowCreationForSubProperty($propertyPath) { $this->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true); return $this; }
php
public function allowCreationForSubProperty($propertyPath) { $this->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true); return $this; }
[ "public", "function", "allowCreationForSubProperty", "(", "$", "propertyPath", ")", "{", "$", "this", "->", "forProperty", "(", "$", "propertyPath", ")", "->", "setTypeConverterOption", "(", "PersistentObjectConverter", "::", "class", ",", "PersistentObjectConverter", ...
Allow creation of a certain sub property @param string $propertyPath @return MvcPropertyMappingConfiguration this @api
[ "Allow", "creation", "of", "a", "certain", "sub", "property" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php#L32-L36
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php
MvcPropertyMappingConfiguration.allowModificationForSubProperty
public function allowModificationForSubProperty($propertyPath) { $this->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, true); return $this; }
php
public function allowModificationForSubProperty($propertyPath) { $this->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, true); return $this; }
[ "public", "function", "allowModificationForSubProperty", "(", "$", "propertyPath", ")", "{", "$", "this", "->", "forProperty", "(", "$", "propertyPath", ")", "->", "setTypeConverterOption", "(", "PersistentObjectConverter", "::", "class", ",", "PersistentObjectConverter...
Allow modification for a given property path @param string $propertyPath @return MvcPropertyMappingConfiguration this @api
[ "Allow", "modification", "for", "a", "given", "property", "path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php#L45-L49
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php
MvcPropertyMappingConfiguration.setTargetTypeForSubProperty
public function setTargetTypeForSubProperty($propertyPath, $targetType) { $this->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_TARGET_TYPE, $targetType); return $this; }
php
public function setTargetTypeForSubProperty($propertyPath, $targetType) { $this->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_TARGET_TYPE, $targetType); return $this; }
[ "public", "function", "setTargetTypeForSubProperty", "(", "$", "propertyPath", ",", "$", "targetType", ")", "{", "$", "this", "->", "forProperty", "(", "$", "propertyPath", ")", "->", "setTypeConverterOption", "(", "PersistentObjectConverter", "::", "class", ",", ...
Set the target type for a certain property. Especially useful if there is an object which has a nested object which is abstract, and you want to instantiate a concrete object instead. @param string $propertyPath @param string $targetType @return MvcPropertyMappingConfiguration this @api
[ "Set", "the", "target", "type", "for", "a", "certain", "property", ".", "Especially", "useful", "if", "there", "is", "an", "object", "which", "has", "a", "nested", "object", "which", "is", "abstract", "and", "you", "want", "to", "instantiate", "a", "concre...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php#L73-L77
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.run
public function run() { Scripts::initializeClassLoader($this); Scripts::initializeSignalSlot($this); Scripts::initializePackageManagement($this); $this->activeRequestHandler = $this->resolveRequestHandler(); $this->activeRequestHandler->handleRequest(); }
php
public function run() { Scripts::initializeClassLoader($this); Scripts::initializeSignalSlot($this); Scripts::initializePackageManagement($this); $this->activeRequestHandler = $this->resolveRequestHandler(); $this->activeRequestHandler->handleRequest(); }
[ "public", "function", "run", "(", ")", "{", "Scripts", "::", "initializeClassLoader", "(", "$", "this", ")", ";", "Scripts", "::", "initializeSignalSlot", "(", "$", "this", ")", ";", "Scripts", "::", "initializePackageManagement", "(", "$", "this", ")", ";",...
Bootstraps the minimal infrastructure, resolves a fitting request handler and then passes control over to that request handler. @return void @api
[ "Bootstraps", "the", "minimal", "infrastructure", "resolves", "a", "fitting", "request", "handler", "and", "then", "passes", "control", "over", "to", "that", "request", "handler", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L104-L112
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.shutdown
public function shutdown(string $runlevel) { switch ($runlevel) { case self::RUNLEVEL_COMPILETIME: $this->emitFinishedCompiletimeRun(); break; case self::RUNLEVEL_RUNTIME: $this->emitFinishedRuntimeRun(); break; ...
php
public function shutdown(string $runlevel) { switch ($runlevel) { case self::RUNLEVEL_COMPILETIME: $this->emitFinishedCompiletimeRun(); break; case self::RUNLEVEL_RUNTIME: $this->emitFinishedRuntimeRun(); break; ...
[ "public", "function", "shutdown", "(", "string", "$", "runlevel", ")", "{", "switch", "(", "$", "runlevel", ")", "{", "case", "self", "::", "RUNLEVEL_COMPILETIME", ":", "$", "this", "->", "emitFinishedCompiletimeRun", "(", ")", ";", "break", ";", "case", "...
Initiates the shutdown procedure to safely close all connections, save modified data and commit other tasks necessary to cleanly exit Flow. This method should be called by a request handler after a successful run. Control is returned to the request handler which can exit the application as it sees fit. @param string ...
[ "Initiates", "the", "shutdown", "procedure", "to", "safely", "close", "all", "connections", "save", "modified", "data", "and", "commit", "other", "tasks", "necessary", "to", "cleanly", "exit", "Flow", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L126-L137
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.isCompiletimeCommand
public function isCompiletimeCommand(string $commandIdentifier): bool { $commandIdentifierParts = explode(':', $commandIdentifier); if (count($commandIdentifierParts) !== 3) { return false; } if (isset($this->compiletimeCommands[$commandIdentifier])) { return ...
php
public function isCompiletimeCommand(string $commandIdentifier): bool { $commandIdentifierParts = explode(':', $commandIdentifier); if (count($commandIdentifierParts) !== 3) { return false; } if (isset($this->compiletimeCommands[$commandIdentifier])) { return ...
[ "public", "function", "isCompiletimeCommand", "(", "string", "$", "commandIdentifier", ")", ":", "bool", "{", "$", "commandIdentifierParts", "=", "explode", "(", "':'", ",", "$", "commandIdentifier", ")", ";", "if", "(", "count", "(", "$", "commandIdentifierPart...
Tells if the given command controller is registered for compiletime or not. @param string $commandIdentifier Package key, controller name and command name separated by colon, e.g. "neos.flow:cache:flush" @return boolean @api
[ "Tells", "if", "the", "given", "command", "controller", "is", "registered", "for", "compiletime", "or", "not", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L224-L257
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.buildEssentialsSequence
public function buildEssentialsSequence(string $identifier): Sequence { $sequence = new Sequence($identifier); if ($this->context->isProduction()) { $lockManager = new LockManager(); $lockManager->exitIfSiteLocked(); if ($identifier === 'compiletime') { ...
php
public function buildEssentialsSequence(string $identifier): Sequence { $sequence = new Sequence($identifier); if ($this->context->isProduction()) { $lockManager = new LockManager(); $lockManager->exitIfSiteLocked(); if ($identifier === 'compiletime') { ...
[ "public", "function", "buildEssentialsSequence", "(", "string", "$", "identifier", ")", ":", "Sequence", "{", "$", "sequence", "=", "new", "Sequence", "(", "$", "identifier", ")", ";", "if", "(", "$", "this", "->", "context", "->", "isProduction", "(", ")"...
Builds a boot sequence with the minimum modules necessary for both, compiletime and runtime. @param string $identifier @return Sequence @api
[ "Builds", "a", "boot", "sequence", "with", "the", "minimum", "modules", "necessary", "for", "both", "compiletime", "and", "runtime", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L267-L289
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.buildCompiletimeSequence
public function buildCompiletimeSequence(): Sequence { $sequence = $this->buildEssentialsSequence('compiletime'); $sequence->addStep(new Step('neos.flow:cachemanagement:forceflush', [Scripts::class, 'forceFlushCachesIfNecessary']), 'neos.flow:systemlogger'); $sequence->addStep(new Step('neo...
php
public function buildCompiletimeSequence(): Sequence { $sequence = $this->buildEssentialsSequence('compiletime'); $sequence->addStep(new Step('neos.flow:cachemanagement:forceflush', [Scripts::class, 'forceFlushCachesIfNecessary']), 'neos.flow:systemlogger'); $sequence->addStep(new Step('neo...
[ "public", "function", "buildCompiletimeSequence", "(", ")", ":", "Sequence", "{", "$", "sequence", "=", "$", "this", "->", "buildEssentialsSequence", "(", "'compiletime'", ")", ";", "$", "sequence", "->", "addStep", "(", "new", "Step", "(", "'neos.flow:cachemana...
Builds a boot sequence starting all modules necessary for the compiletime state. This includes all of the "essentials" sequence. @return Sequence @api
[ "Builds", "a", "boot", "sequence", "starting", "all", "modules", "necessary", "for", "the", "compiletime", "state", ".", "This", "includes", "all", "of", "the", "essentials", "sequence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L298-L309
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.buildRuntimeSequence
public function buildRuntimeSequence(): Sequence { $sequence = $this->buildEssentialsSequence('runtime'); $sequence->addStep(new Step('neos.flow:objectmanagement:proxyclasses', [Scripts::class, 'initializeProxyClasses']), 'neos.flow:systemlogger'); $sequence->addStep(new Step('neos.flow:clas...
php
public function buildRuntimeSequence(): Sequence { $sequence = $this->buildEssentialsSequence('runtime'); $sequence->addStep(new Step('neos.flow:objectmanagement:proxyclasses', [Scripts::class, 'initializeProxyClasses']), 'neos.flow:systemlogger'); $sequence->addStep(new Step('neos.flow:clas...
[ "public", "function", "buildRuntimeSequence", "(", ")", ":", "Sequence", "{", "$", "sequence", "=", "$", "this", "->", "buildEssentialsSequence", "(", "'runtime'", ")", ";", "$", "sequence", "->", "addStep", "(", "new", "Step", "(", "'neos.flow:objectmanagement:...
Builds a boot sequence starting all modules necessary for the runtime state. This includes all of the "essentials" sequence. @return Sequence @api
[ "Builds", "a", "boot", "sequence", "starting", "all", "modules", "necessary", "for", "the", "runtime", "state", ".", "This", "includes", "all", "of", "the", "essentials", "sequence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L318-L333
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.getEarlyInstance
public function getEarlyInstance(string $objectName) { if (!isset($this->earlyInstances[$objectName])) { throw new FlowException('Unknown early instance "' . $objectName . '"', 1322581449); } return $this->earlyInstances[$objectName]; }
php
public function getEarlyInstance(string $objectName) { if (!isset($this->earlyInstances[$objectName])) { throw new FlowException('Unknown early instance "' . $objectName . '"', 1322581449); } return $this->earlyInstances[$objectName]; }
[ "public", "function", "getEarlyInstance", "(", "string", "$", "objectName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "earlyInstances", "[", "$", "objectName", "]", ")", ")", "{", "throw", "new", "FlowException", "(", "'Unknown early instanc...
Returns an instance which was registered earlier through setEarlyInstance() @param string $objectName Object name of the registered instance @return object @throws FlowException @api
[ "Returns", "an", "instance", "which", "was", "registered", "earlier", "through", "setEarlyInstance", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L369-L375
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.getObjectManager
public function getObjectManager(): ObjectManagerInterface { if (!isset($this->earlyInstances[ObjectManagerInterface::class])) { debug_print_backtrace(); throw new FlowException('The Object Manager is not available at this stage of the bootstrap run.', 1301120788); } ...
php
public function getObjectManager(): ObjectManagerInterface { if (!isset($this->earlyInstances[ObjectManagerInterface::class])) { debug_print_backtrace(); throw new FlowException('The Object Manager is not available at this stage of the bootstrap run.', 1301120788); } ...
[ "public", "function", "getObjectManager", "(", ")", ":", "ObjectManagerInterface", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "earlyInstances", "[", "ObjectManagerInterface", "::", "class", "]", ")", ")", "{", "debug_print_backtrace", "(", ")", ";",...
Returns the object manager instance @return ObjectManagerInterface @throws FlowException
[ "Returns", "the", "object", "manager", "instance" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L393-L400
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.resolveRequestHandler
protected function resolveRequestHandler(): RequestHandlerInterface { if ($this->preselectedRequestHandlerClassName !== null && isset($this->requestHandlers[$this->preselectedRequestHandlerClassName])) { /** @var RequestHandlerInterface $requestHandler */ $requestHandler = $this->req...
php
protected function resolveRequestHandler(): RequestHandlerInterface { if ($this->preselectedRequestHandlerClassName !== null && isset($this->requestHandlers[$this->preselectedRequestHandlerClassName])) { /** @var RequestHandlerInterface $requestHandler */ $requestHandler = $this->req...
[ "protected", "function", "resolveRequestHandler", "(", ")", ":", "RequestHandlerInterface", "{", "if", "(", "$", "this", "->", "preselectedRequestHandlerClassName", "!==", "null", "&&", "isset", "(", "$", "this", "->", "requestHandlers", "[", "$", "this", "->", ...
Iterates over the registered request handlers and determines which one fits best. @return RequestHandlerInterface A request handler @throws FlowException
[ "Iterates", "over", "the", "registered", "request", "handlers", "and", "determines", "which", "one", "fits", "best", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L408-L433
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.defineConstants
protected function defineConstants() { if (defined('FLOW_SAPITYPE')) { return; } define('FLOW_SAPITYPE', (PHP_SAPI === 'cli' ? 'CLI' : 'Web')); if (!defined('FLOW_PATH_FLOW')) { define('FLOW_PATH_FLOW', str_replace('//', '/', str_replace('\\', '/', __DIR__ ....
php
protected function defineConstants() { if (defined('FLOW_SAPITYPE')) { return; } define('FLOW_SAPITYPE', (PHP_SAPI === 'cli' ? 'CLI' : 'Web')); if (!defined('FLOW_PATH_FLOW')) { define('FLOW_PATH_FLOW', str_replace('//', '/', str_replace('\\', '/', __DIR__ ....
[ "protected", "function", "defineConstants", "(", ")", "{", "if", "(", "defined", "(", "'FLOW_SAPITYPE'", ")", ")", "{", "return", ";", "}", "define", "(", "'FLOW_SAPITYPE'", ",", "(", "PHP_SAPI", "===", "'cli'", "?", "'CLI'", ":", "'Web'", ")", ")", ";",...
Defines various path constants used by Flow and if no root path or web root was specified by an environment variable, exits with a respective error message. @return void
[ "Defines", "various", "path", "constants", "used", "by", "Flow", "and", "if", "no", "root", "path", "or", "web", "root", "was", "specified", "by", "an", "environment", "variable", "exits", "with", "a", "respective", "error", "message", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L475-L552
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.ensureRequiredEnvironment
protected function ensureRequiredEnvironment() { if (version_compare(phpversion(), self::MINIMUM_PHP_VERSION, '<')) { echo('Flow requires PHP version ' . self::MINIMUM_PHP_VERSION . ' or higher but your installed version is currently ' . phpversion() . '. (Error #1172215790)' . PHP_EOL); ...
php
protected function ensureRequiredEnvironment() { if (version_compare(phpversion(), self::MINIMUM_PHP_VERSION, '<')) { echo('Flow requires PHP version ' . self::MINIMUM_PHP_VERSION . ' or higher but your installed version is currently ' . phpversion() . '. (Error #1172215790)' . PHP_EOL); ...
[ "protected", "function", "ensureRequiredEnvironment", "(", ")", "{", "if", "(", "version_compare", "(", "phpversion", "(", ")", ",", "self", "::", "MINIMUM_PHP_VERSION", ",", "'<'", ")", ")", "{", "echo", "(", "'Flow requires PHP version '", ".", "self", "::", ...
Checks PHP version and other parameters of the environment @return void
[ "Checks", "PHP", "version", "and", "other", "parameters", "of", "the", "environment" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L559-L611
neos/flow-development-collection
Neos.Flow/Classes/Core/Bootstrap.php
Bootstrap.getEnvironmentConfigurationSetting
public static function getEnvironmentConfigurationSetting(string $variableName) { $variableValue = getenv($variableName); if ($variableValue !== false) { return $variableValue; } $variableValue = getenv('REDIRECT_' . $variableName); if ($variableValue !== false) ...
php
public static function getEnvironmentConfigurationSetting(string $variableName) { $variableValue = getenv($variableName); if ($variableValue !== false) { return $variableValue; } $variableValue = getenv('REDIRECT_' . $variableName); if ($variableValue !== false) ...
[ "public", "static", "function", "getEnvironmentConfigurationSetting", "(", "string", "$", "variableName", ")", "{", "$", "variableValue", "=", "getenv", "(", "$", "variableName", ")", ";", "if", "(", "$", "variableValue", "!==", "false", ")", "{", "return", "$...
Tries to find an environment setting with the following fallback chain: - getenv with $variableName - getenv with REDIRECT_ . $variableName (this is for php cgi where environment variables from the http server get prefixed) - $_SERVER[$variableName] (this is an alternative to set FLOW_* environment variables if passin...
[ "Tries", "to", "find", "an", "environment", "setting", "with", "the", "following", "fallback", "chain", ":" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Bootstrap.php#L624-L645
neos/flow-development-collection
Neos.Flow/Classes/Aop/Advice/AbstractAdvice.php
AbstractAdvice.emitAdviceInvoked
protected function emitAdviceInvoked($aspectObject, string $methodName, JoinPointInterface $joinPoint): void { if ($this->dispatcher === null) { $this->dispatcher = $this->objectManager->get(Dispatcher::class); } $this->dispatcher->dispatch(self::class, 'adviceInvoked', [$aspect...
php
protected function emitAdviceInvoked($aspectObject, string $methodName, JoinPointInterface $joinPoint): void { if ($this->dispatcher === null) { $this->dispatcher = $this->objectManager->get(Dispatcher::class); } $this->dispatcher->dispatch(self::class, 'adviceInvoked', [$aspect...
[ "protected", "function", "emitAdviceInvoked", "(", "$", "aspectObject", ",", "string", "$", "methodName", ",", "JoinPointInterface", "$", "joinPoint", ")", ":", "void", "{", "if", "(", "$", "this", "->", "dispatcher", "===", "null", ")", "{", "$", "this", ...
Emits a signal when an Advice is invoked The advice is not proxyable, so the signal is dispatched manually here. @param object $aspectObject @param string $methodName @param JoinPointInterface $joinPoint @return void @Flow\Signal
[ "Emits", "a", "signal", "when", "an", "Advice", "is", "invoked" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Advice/AbstractAdvice.php#L127-L134
neos/flow-development-collection
Neos.Utility.Pdo/Classes/PdoHelper.php
PdoHelper.importSql
public static function importSql(\PDO $databaseHandle, string $pdoDriver, string $pathAndFilename) { $sql = file($pathAndFilename, FILE_IGNORE_NEW_LINES & FILE_SKIP_EMPTY_LINES); // Remove MySQL style key length delimiters (yuck!) if we are not setting up a MySQL db if ($pdoDriver !== 'mysql...
php
public static function importSql(\PDO $databaseHandle, string $pdoDriver, string $pathAndFilename) { $sql = file($pathAndFilename, FILE_IGNORE_NEW_LINES & FILE_SKIP_EMPTY_LINES); // Remove MySQL style key length delimiters (yuck!) if we are not setting up a MySQL db if ($pdoDriver !== 'mysql...
[ "public", "static", "function", "importSql", "(", "\\", "PDO", "$", "databaseHandle", ",", "string", "$", "pdoDriver", ",", "string", "$", "pathAndFilename", ")", "{", "$", "sql", "=", "file", "(", "$", "pathAndFilename", ",", "FILE_IGNORE_NEW_LINES", "&", "...
Pumps the SQL into the database. Use for DDL only. Important: key definitions with length specifiers (needed for MySQL) must be given as "field"(xyz) - no space between double quote and parenthesis - so they can be removed automatically. @param \PDO $databaseHandle @param string $pdoDriver @param string $pathAndFilen...
[ "Pumps", "the", "SQL", "into", "the", "database", ".", "Use", "for", "DDL", "only", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Pdo/Classes/PdoHelper.php#L32-L48
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.initializeObject
public function initializeObject() { $this->configuration = new Configuration($this->settings['defaultLocale']); $this->configuration->setFallbackRule($this->settings['fallbackRule']); if ($this->cache->has('availableLocales')) { $this->localeCollection = $this->cache->get('avai...
php
public function initializeObject() { $this->configuration = new Configuration($this->settings['defaultLocale']); $this->configuration->setFallbackRule($this->settings['fallbackRule']); if ($this->cache->has('availableLocales')) { $this->localeCollection = $this->cache->get('avai...
[ "public", "function", "initializeObject", "(", ")", "{", "$", "this", "->", "configuration", "=", "new", "Configuration", "(", "$", "this", "->", "settings", "[", "'defaultLocale'", "]", ")", ";", "$", "this", "->", "configuration", "->", "setFallbackRule", ...
Initializes the locale service @return void
[ "Initializes", "the", "locale", "service" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L81-L95
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.getLocalizedFilename
public function getLocalizedFilename($pathAndFilename, Locale $locale = null, $strict = false) { if ($locale === null) { $locale = $this->configuration->getCurrentLocale(); } $filename = basename($pathAndFilename); if ((strpos($filename, '.')) !== false) { $d...
php
public function getLocalizedFilename($pathAndFilename, Locale $locale = null, $strict = false) { if ($locale === null) { $locale = $this->configuration->getCurrentLocale(); } $filename = basename($pathAndFilename); if ((strpos($filename, '.')) !== false) { $d...
[ "public", "function", "getLocalizedFilename", "(", "$", "pathAndFilename", ",", "Locale", "$", "locale", "=", "null", ",", "$", "strict", "=", "false", ")", "{", "if", "(", "$", "locale", "===", "null", ")", "{", "$", "locale", "=", "$", "this", "->", ...
Returns the path to the existing localized version of file given. Searching is done for the current locale if no $locale parameter is provided. The search is done according to the configured fallback rule. If parameter $strict is provided, searching is done only for the provided / current locale (without searching of...
[ "Returns", "the", "path", "to", "the", "existing", "localized", "version", "of", "file", "given", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L127-L157
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.getXliffFilenameAndPath
public function getXliffFilenameAndPath($path, $sourceName, Locale $locale = null) { if ($locale === null) { $locale = $this->configuration->getCurrentLocale(); } foreach ($this->getLocaleChain($locale) as $localeIdentifier => $locale) { $possibleXliffFilename = File...
php
public function getXliffFilenameAndPath($path, $sourceName, Locale $locale = null) { if ($locale === null) { $locale = $this->configuration->getCurrentLocale(); } foreach ($this->getLocaleChain($locale) as $localeIdentifier => $locale) { $possibleXliffFilename = File...
[ "public", "function", "getXliffFilenameAndPath", "(", "$", "path", ",", "$", "sourceName", ",", "Locale", "$", "locale", "=", "null", ")", "{", "if", "(", "$", "locale", "===", "null", ")", "{", "$", "locale", "=", "$", "this", "->", "configuration", "...
Returns the path to the existing localized version of file given. Searching is done for the current locale if no $locale parameter is provided. The search is done according to the configured fallback rule. If parameter $strict is provided, searching is done only for the provided / current locale (without searching of...
[ "Returns", "the", "path", "to", "the", "existing", "localized", "version", "of", "file", "given", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L180-L193
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.getLocaleChain
public function getLocaleChain(Locale $locale) { $fallbackRule = $this->configuration->getFallbackRule(); $localeChain = [(string)$locale => $locale]; if ($fallbackRule['strict'] === true) { foreach ($fallbackRule['order'] as $localeIdentifier) { $localeChain[$lo...
php
public function getLocaleChain(Locale $locale) { $fallbackRule = $this->configuration->getFallbackRule(); $localeChain = [(string)$locale => $locale]; if ($fallbackRule['strict'] === true) { foreach ($fallbackRule['order'] as $localeIdentifier) { $localeChain[$lo...
[ "public", "function", "getLocaleChain", "(", "Locale", "$", "locale", ")", "{", "$", "fallbackRule", "=", "$", "this", "->", "configuration", "->", "getFallbackRule", "(", ")", ";", "$", "localeChain", "=", "[", "(", "string", ")", "$", "locale", "=>", "...
Build a chain of locale objects according to the fallback rule and the available locales. @param Locale $locale @return array
[ "Build", "a", "chain", "of", "locale", "objects", "according", "to", "the", "fallback", "rule", "and", "the", "available", "locales", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L201-L229
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.generateAvailableLocalesCollectionFromSettings
protected function generateAvailableLocalesCollectionFromSettings() { foreach ($this->settings['availableLocales'] as $localeIdentifier) { $this->localeCollection->addLocale(new Locale($localeIdentifier)); } }
php
protected function generateAvailableLocalesCollectionFromSettings() { foreach ($this->settings['availableLocales'] as $localeIdentifier) { $this->localeCollection->addLocale(new Locale($localeIdentifier)); } }
[ "protected", "function", "generateAvailableLocalesCollectionFromSettings", "(", ")", "{", "foreach", "(", "$", "this", "->", "settings", "[", "'availableLocales'", "]", "as", "$", "localeIdentifier", ")", "{", "$", "this", "->", "localeCollection", "->", "addLocale"...
Generates the available Locales Collection from the configuration setting `Neos.Flow.i18n.availableLocales`. Note: result of this method invocation is cached @return void
[ "Generates", "the", "available", "Locales", "Collection", "from", "the", "configuration", "setting", "Neos", ".", "Flow", ".", "i18n", ".", "availableLocales", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L265-L270
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.getScanExcludePattern
protected function getScanExcludePattern() { $pattern = implode('|', array_keys(array_filter((array)$this->settings['scan']['excludePatterns']))); if ($pattern !== '') { $pattern = '#' . str_replace('#', '\#', $pattern) . '#'; } return $pattern; }
php
protected function getScanExcludePattern() { $pattern = implode('|', array_keys(array_filter((array)$this->settings['scan']['excludePatterns']))); if ($pattern !== '') { $pattern = '#' . str_replace('#', '\#', $pattern) . '#'; } return $pattern; }
[ "protected", "function", "getScanExcludePattern", "(", ")", "{", "$", "pattern", "=", "implode", "(", "'|'", ",", "array_keys", "(", "array_filter", "(", "(", "array", ")", "$", "this", "->", "settings", "[", "'scan'", "]", "[", "'excludePatterns'", "]", "...
Returns a regex pattern including enclosing characters, that matches any of the configured exclude list configured inside "Neos.Flow.i18n.scan.excludePatterns". @return string The regex pattern matching the configured exclude list
[ "Returns", "a", "regex", "pattern", "including", "enclosing", "characters", "that", "matches", "any", "of", "the", "configured", "exclude", "list", "configured", "inside", "Neos", ".", "Flow", ".", "i18n", ".", "scan", ".", "excludePatterns", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L278-L285
neos/flow-development-collection
Neos.Flow/Classes/I18n/Service.php
Service.generateAvailableLocalesCollectionByScanningFilesystem
protected function generateAvailableLocalesCollectionByScanningFilesystem() { $includePaths = array_keys(array_filter((array)$this->settings['scan']['includePaths'])); if ($includePaths === []) { return; } $excludePattern = $this->getScanExcludePattern(); /** @va...
php
protected function generateAvailableLocalesCollectionByScanningFilesystem() { $includePaths = array_keys(array_filter((array)$this->settings['scan']['includePaths'])); if ($includePaths === []) { return; } $excludePattern = $this->getScanExcludePattern(); /** @va...
[ "protected", "function", "generateAvailableLocalesCollectionByScanningFilesystem", "(", ")", "{", "$", "includePaths", "=", "array_keys", "(", "array_filter", "(", "(", "array", ")", "$", "this", "->", "settings", "[", "'scan'", "]", "[", "'includePaths'", "]", ")...
Finds all Locale objects representing locales available in the Flow installation. This is done by scanning all Private and Public resource files of all active packages, in order to find localized files. Localized files have a locale identifier added before their extension (or at the end of filename, if no extension ex...
[ "Finds", "all", "Locale", "objects", "representing", "locales", "available", "in", "the", "Flow", "installation", ".", "This", "is", "done", "by", "scanning", "all", "Private", "and", "Public", "resource", "files", "of", "all", "active", "packages", "in", "ord...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Service.php#L305-L361
neos/flow-development-collection
Neos.Kickstarter/Classes/ViewHelpers/Inflect/HumanizeCamelCaseViewHelper.php
HumanizeCamelCaseViewHelper.render
public function render($lowercase = false) { $content = $this->renderChildren(); return $this->inflector->humanizeCamelCase($content, $lowercase); }
php
public function render($lowercase = false) { $content = $this->renderChildren(); return $this->inflector->humanizeCamelCase($content, $lowercase); }
[ "public", "function", "render", "(", "$", "lowercase", "=", "false", ")", "{", "$", "content", "=", "$", "this", "->", "renderChildren", "(", ")", ";", "return", "$", "this", "->", "inflector", "->", "humanizeCamelCase", "(", "$", "content", ",", "$", ...
Humanize a model name @param boolean $lowercase Wether the result should be lowercased @return string The humanized string
[ "Humanize", "a", "model", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/ViewHelpers/Inflect/HumanizeCamelCaseViewHelper.php#L43-L47
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
AbstractFormViewHelper.prefixFieldName
protected function prefixFieldName($fieldName) { if ($fieldName === null || $fieldName === '') { return ''; } if (!$this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')) { return $fieldName; } ...
php
protected function prefixFieldName($fieldName) { if ($fieldName === null || $fieldName === '') { return ''; } if (!$this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')) { return $fieldName; } ...
[ "protected", "function", "prefixFieldName", "(", "$", "fieldName", ")", "{", "if", "(", "$", "fieldName", "===", "null", "||", "$", "fieldName", "===", "''", ")", "{", "return", "''", ";", "}", "if", "(", "!", "$", "this", "->", "viewHelperVariableContai...
Prefixes / namespaces the given name with the form field prefix @param string $fieldName field name to be prefixed @return string namespaced field name
[ "Prefixes", "/", "namespaces", "the", "given", "name", "with", "the", "form", "field", "prefix" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormViewHelper.php#L47-L65
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
AbstractFormViewHelper.renderHiddenIdentityField
protected function renderHiddenIdentityField($object, $name) { if (!is_object($object) || $this->persistenceManager->isNewObject($object)) { return ''; } $identifier = $this->persistenceManager->getIdentifierByObject($object); if ($identifier === null) { retur...
php
protected function renderHiddenIdentityField($object, $name) { if (!is_object($object) || $this->persistenceManager->isNewObject($object)) { return ''; } $identifier = $this->persistenceManager->getIdentifierByObject($object); if ($identifier === null) { retur...
[ "protected", "function", "renderHiddenIdentityField", "(", "$", "object", ",", "$", "name", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", "||", "$", "this", "->", "persistenceManager", "->", "isNewObject", "(", "$", "object", ")", ")", ...
Renders a hidden form field containing the technical identity of the given object. @param object $object Object to create the identity field for @param string $name Name @return string A hidden field containing the Identity (UUID in Flow) of the given object or NULL if the object is unknown to the persistence framewor...
[ "Renders", "a", "hidden", "form", "field", "containing", "the", "technical", "identity", "of", "the", "given", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormViewHelper.php#L75-L88
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
AbstractFormViewHelper.registerFieldNameForFormTokenGeneration
protected function registerFieldNameForFormTokenGeneration($fieldName) { if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames')) { $formFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelp...
php
protected function registerFieldNameForFormTokenGeneration($fieldName) { if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames')) { $formFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelp...
[ "protected", "function", "registerFieldNameForFormTokenGeneration", "(", "$", "fieldName", ")", "{", "if", "(", "$", "this", "->", "viewHelperVariableContainer", "->", "exists", "(", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "FormViewHelper", ":...
Register a field name for inclusion in the HMAC / Form Token generation @param string $fieldName name of the field to register @return void
[ "Register", "a", "field", "name", "for", "inclusion", "in", "the", "HMAC", "/", "Form", "Token", "generation" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormViewHelper.php#L96-L105
neos/flow-development-collection
Neos.Eel/Classes/Validation/ExpressionSyntaxValidator.php
ExpressionSyntaxValidator.isValid
protected function isValid($value) { $parser = new EelParser($value); $result = $parser->match_Expression(); if ($result === false) { $this->addError('Expression "%s" could not be parsed.', 1421940748, [$value]); } elseif ($parser->pos !== strlen($value)) { $...
php
protected function isValid($value) { $parser = new EelParser($value); $result = $parser->match_Expression(); if ($result === false) { $this->addError('Expression "%s" could not be parsed.', 1421940748, [$value]); } elseif ($parser->pos !== strlen($value)) { $...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "$", "parser", "=", "new", "EelParser", "(", "$", "value", ")", ";", "$", "result", "=", "$", "parser", "->", "match_Expression", "(", ")", ";", "if", "(", "$", "result", "===", "false"...
Check if $value is valid. If it is not valid, needs to add an error to Result. @param mixed $value @return void @api
[ "Check", "if", "$value", "is", "valid", ".", "If", "it", "is", "not", "valid", "needs", "to", "add", "an", "error", "to", "Result", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Validation/ExpressionSyntaxValidator.php#L23-L33
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php
DateTimeConverter.canConvertFrom
public function canConvertFrom($source, $targetType) { if (!is_callable([$targetType, 'createFromFormat'])) { return false; } if (is_array($source)) { return true; } if (is_integer($source)) { return true; } return is_string...
php
public function canConvertFrom($source, $targetType) { if (!is_callable([$targetType, 'createFromFormat'])) { return false; } if (is_array($source)) { return true; } if (is_integer($source)) { return true; } return is_string...
[ "public", "function", "canConvertFrom", "(", "$", "source", ",", "$", "targetType", ")", "{", "if", "(", "!", "is_callable", "(", "[", "$", "targetType", ",", "'createFromFormat'", "]", ")", ")", "{", "return", "false", ";", "}", "if", "(", "is_array", ...
If conversion is possible. @param string $source @param string $targetType @return boolean
[ "If", "conversion", "is", "possible", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php#L99-L111
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php
DateTimeConverter.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { $dateFormat = $this->getDefaultDateFormat($configuration); $isFormatSpecified = false; if (is_string($source)) { $dateAsString = ...
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { $dateFormat = $this->getDefaultDateFormat($configuration); $isFormatSpecified = false; if (is_string($source)) { $dateAsString = ...
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "$", "dateFormat", "=", "$",...
Converts $source to a \DateTime using the configured dateFormat @param string|integer|array $source the string to be converted to a \DateTime object @param string $targetType must be "DateTime" @param array $convertedChildProperties not used currently @param PropertyMappingConfigurationInterface $configuration @return...
[ "Converts", "$source", "to", "a", "\\", "DateTime", "using", "the", "configured", "dateFormat" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php#L123-L177
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php
DateTimeConverter.isDatePartKeysProvided
protected function isDatePartKeysProvided(array $source) { return isset($source['day']) && ctype_digit($source['day']) && isset($source['month']) && ctype_digit($source['month']) && isset($source['year']) && ctype_digit($source['year']); }
php
protected function isDatePartKeysProvided(array $source) { return isset($source['day']) && ctype_digit($source['day']) && isset($source['month']) && ctype_digit($source['month']) && isset($source['year']) && ctype_digit($source['year']); }
[ "protected", "function", "isDatePartKeysProvided", "(", "array", "$", "source", ")", "{", "return", "isset", "(", "$", "source", "[", "'day'", "]", ")", "&&", "ctype_digit", "(", "$", "source", "[", "'day'", "]", ")", "&&", "isset", "(", "$", "source", ...
Returns whether date information (day, month, year) are present as keys in $source. @param $source @return bool
[ "Returns", "whether", "date", "information", "(", "day", "month", "year", ")", "are", "present", "as", "keys", "in", "$source", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php#L184-L189
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php
DateTimeConverter.getDefaultDateFormat
protected function getDefaultDateFormat(PropertyMappingConfigurationInterface $configuration = null) { if ($configuration === null) { return self::DEFAULT_DATE_FORMAT; } $dateFormat = $configuration->getConfigurationValue(DateTimeConverter::class, self::CONFIGURATION_DATE_FORMAT)...
php
protected function getDefaultDateFormat(PropertyMappingConfigurationInterface $configuration = null) { if ($configuration === null) { return self::DEFAULT_DATE_FORMAT; } $dateFormat = $configuration->getConfigurationValue(DateTimeConverter::class, self::CONFIGURATION_DATE_FORMAT)...
[ "protected", "function", "getDefaultDateFormat", "(", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "if", "(", "$", "configuration", "===", "null", ")", "{", "return", "self", "::", "DEFAULT_DATE_FORMAT", ";", "}", "$", "dat...
Determines the default date format to use for the conversion. If no format is specified in the mapping configuration DEFAULT_DATE_FORMAT is used. @param PropertyMappingConfigurationInterface $configuration @return string @throws InvalidPropertyMappingConfigurationException
[ "Determines", "the", "default", "date", "format", "to", "use", "for", "the", "conversion", ".", "If", "no", "format", "is", "specified", "in", "the", "mapping", "configuration", "DEFAULT_DATE_FORMAT", "is", "used", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php#L199-L211
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php
DateTimeConverter.overrideTime
protected function overrideTime(\DateTimeInterface $date, array $source) { $hour = isset($source['hour']) ? (integer)$source['hour'] : 0; $minute = isset($source['minute']) ? (integer)$source['minute'] : 0; $second = isset($source['second']) ? (integer)$source['second'] : 0; if ($dat...
php
protected function overrideTime(\DateTimeInterface $date, array $source) { $hour = isset($source['hour']) ? (integer)$source['hour'] : 0; $minute = isset($source['minute']) ? (integer)$source['minute'] : 0; $second = isset($source['second']) ? (integer)$source['second'] : 0; if ($dat...
[ "protected", "function", "overrideTime", "(", "\\", "DateTimeInterface", "$", "date", ",", "array", "$", "source", ")", "{", "$", "hour", "=", "isset", "(", "$", "source", "[", "'hour'", "]", ")", "?", "(", "integer", ")", "$", "source", "[", "'hour'",...
Overrides hour, minute & second of the given date with the values in the $source array @param \DateTimeInterface $date @param array $source @return \DateTimeInterface
[ "Overrides", "hour", "minute", "&", "second", "of", "the", "given", "date", "with", "the", "values", "in", "the", "$source", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/DateTimeConverter.php#L220-L229
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.getValueAttribute
protected function getValueAttribute($ignoreSubmittedFormData = false) { $value = null; $submittedFormData = null; if (!$ignoreSubmittedFormData && $this->hasMappingErrorOccurred()) { $submittedFormData = $this->getLastSubmittedFormData(); } if ($submittedFormData...
php
protected function getValueAttribute($ignoreSubmittedFormData = false) { $value = null; $submittedFormData = null; if (!$ignoreSubmittedFormData && $this->hasMappingErrorOccurred()) { $submittedFormData = $this->getLastSubmittedFormData(); } if ($submittedFormData...
[ "protected", "function", "getValueAttribute", "(", "$", "ignoreSubmittedFormData", "=", "false", ")", "{", "$", "value", "=", "null", ";", "$", "submittedFormData", "=", "null", ";", "if", "(", "!", "$", "ignoreSubmittedFormData", "&&", "$", "this", "->", "h...
Returns the current value of this Form ViewHelper and converts it to an identifier string in case it's an object The value is determined as follows: * If property mapping errors occurred and the form is re-displayed, the *last submitted* value is returned * Else the bound property is returned (only in objectAccessor-mo...
[ "Returns", "the", "current", "value", "of", "this", "Form", "ViewHelper", "and", "converts", "it", "to", "an", "identifier", "string", "in", "case", "it", "s", "an", "object", "The", "value", "is", "determined", "as", "follows", ":", "*", "If", "property",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L109-L130