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/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.addAdvicedMethodsToInterceptedMethods
protected function addAdvicedMethodsToInterceptedMethods(array &$interceptedMethods, array $methods, string $targetClassName, array &$aspectContainers): void { $pointcutQueryIdentifier = 0; foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassName...
php
protected function addAdvicedMethodsToInterceptedMethods(array &$interceptedMethods, array $methods, string $targetClassName, array &$aspectContainers): void { $pointcutQueryIdentifier = 0; foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassName...
[ "protected", "function", "addAdvicedMethodsToInterceptedMethods", "(", "array", "&", "$", "interceptedMethods", ",", "array", "$", "methods", ",", "string", "$", "targetClassName", ",", "array", "&", "$", "aspectContainers", ")", ":", "void", "{", "$", "pointcutQu...
Traverses all aspect containers, their aspects and their advisors and adds the methods and their advices to the (usually empty) array of intercepted methods. @param array &$interceptedMethods An array (empty or not) which contains the names of the intercepted methods and additional information @param array $methods An...
[ "Traverses", "all", "aspect", "containers", "their", "aspects", "and", "their", "advisors", "and", "adds", "the", "methods", "and", "their", "advices", "to", "the", "(", "usually", "empty", ")", "array", "of", "intercepted", "methods", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L641-L670
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.addIntroducedMethodsToInterceptedMethods
protected function addIntroducedMethodsToInterceptedMethods(array &$interceptedMethods, array $methodsFromIntroducedInterfaces): void { foreach ($methodsFromIntroducedInterfaces as $interfaceAndMethodName) { list($interfaceName, $methodName) = $interfaceAndMethodName; if (!isset($int...
php
protected function addIntroducedMethodsToInterceptedMethods(array &$interceptedMethods, array $methodsFromIntroducedInterfaces): void { foreach ($methodsFromIntroducedInterfaces as $interfaceAndMethodName) { list($interfaceName, $methodName) = $interfaceAndMethodName; if (!isset($int...
[ "protected", "function", "addIntroducedMethodsToInterceptedMethods", "(", "array", "&", "$", "interceptedMethods", ",", "array", "$", "methodsFromIntroducedInterfaces", ")", ":", "void", "{", "foreach", "(", "$", "methodsFromIntroducedInterfaces", "as", "$", "interfaceAnd...
Traverses all methods which were introduced by interfaces and adds them to the intercepted methods array if they didn't exist already. @param array &$interceptedMethods An array (empty or not) which contains the names of the intercepted methods and additional information @param array $methodsFromIntroducedInterfaces A...
[ "Traverses", "all", "methods", "which", "were", "introduced", "by", "interfaces", "and", "adds", "them", "to", "the", "intercepted", "methods", "array", "if", "they", "didn", "t", "exist", "already", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L680-L689
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getMatchingInterfaceIntroductions
protected function getMatchingInterfaceIntroductions(array &$aspectContainers, string $targetClassName): array { $introductions = []; foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassNameCandidates()->hasClassName($targetClassName)) { ...
php
protected function getMatchingInterfaceIntroductions(array &$aspectContainers, string $targetClassName): array { $introductions = []; foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassNameCandidates()->hasClassName($targetClassName)) { ...
[ "protected", "function", "getMatchingInterfaceIntroductions", "(", "array", "&", "$", "aspectContainers", ",", "string", "$", "targetClassName", ")", ":", "array", "{", "$", "introductions", "=", "[", "]", ";", "foreach", "(", "$", "aspectContainers", "as", "$",...
Traverses all aspect containers and returns an array of interface introductions which match the target class. @param array &$aspectContainers All aspects to take into consideration @param string $targetClassName Name of the class the pointcut should match with @return array array of interface names
[ "Traverses", "all", "aspect", "containers", "and", "returns", "an", "array", "of", "interface", "introductions", "which", "match", "the", "target", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L699-L714
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getMatchingPropertyIntroductions
protected function getMatchingPropertyIntroductions(array &$aspectContainers, string $targetClassName): array { $introductions = []; foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassNameCandidates()->hasClassName($targetClassName)) { ...
php
protected function getMatchingPropertyIntroductions(array &$aspectContainers, string $targetClassName): array { $introductions = []; foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassNameCandidates()->hasClassName($targetClassName)) { ...
[ "protected", "function", "getMatchingPropertyIntroductions", "(", "array", "&", "$", "aspectContainers", ",", "string", "$", "targetClassName", ")", ":", "array", "{", "$", "introductions", "=", "[", "]", ";", "foreach", "(", "$", "aspectContainers", "as", "$", ...
Traverses all aspect containers and returns an array of property introductions which match the target class. @param array &$aspectContainers All aspects to take into consideration @param string $targetClassName Name of the class the pointcut should match with @return array|PropertyIntroduction[] array of property intr...
[ "Traverses", "all", "aspect", "containers", "and", "returns", "an", "array", "of", "property", "introductions", "which", "match", "the", "target", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L724-L739
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getMatchingTraitNamesFromIntroductions
protected function getMatchingTraitNamesFromIntroductions(array &$aspectContainers, string $targetClassName): array { $introductions = []; /** @var AspectContainer $aspectContainer */ foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassNam...
php
protected function getMatchingTraitNamesFromIntroductions(array &$aspectContainers, string $targetClassName): array { $introductions = []; /** @var AspectContainer $aspectContainer */ foreach ($aspectContainers as $aspectContainer) { if (!$aspectContainer->getCachedTargetClassNam...
[ "protected", "function", "getMatchingTraitNamesFromIntroductions", "(", "array", "&", "$", "aspectContainers", ",", "string", "$", "targetClassName", ")", ":", "array", "{", "$", "introductions", "=", "[", "]", ";", "/** @var AspectContainer $aspectContainer */", "forea...
Traverses all aspect containers and returns an array of trait introductions which match the target class. @param array &$aspectContainers All aspects to take into consideration @param string $targetClassName Name of the class the pointcut should match with @return array array of trait names
[ "Traverses", "all", "aspect", "containers", "and", "returns", "an", "array", "of", "trait", "introductions", "which", "match", "the", "target", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L749-L767
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getInterfaceNamesFromIntroductions
protected function getInterfaceNamesFromIntroductions(array $interfaceIntroductions): array { $interfaceNames = []; foreach ($interfaceIntroductions as $introduction) { $interfaceNames[] = '\\' . $introduction->getInterfaceName(); } return $interfaceNames; }
php
protected function getInterfaceNamesFromIntroductions(array $interfaceIntroductions): array { $interfaceNames = []; foreach ($interfaceIntroductions as $introduction) { $interfaceNames[] = '\\' . $introduction->getInterfaceName(); } return $interfaceNames; }
[ "protected", "function", "getInterfaceNamesFromIntroductions", "(", "array", "$", "interfaceIntroductions", ")", ":", "array", "{", "$", "interfaceNames", "=", "[", "]", ";", "foreach", "(", "$", "interfaceIntroductions", "as", "$", "introduction", ")", "{", "$", ...
Returns an array of interface names introduced by the given introductions @param array $interfaceIntroductions An array of interface introductions @return array Array of interface names
[ "Returns", "an", "array", "of", "interface", "names", "introduced", "by", "the", "given", "introductions" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L775-L782
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getIntroducedMethodsFromInterfaceIntroductions
protected function getIntroducedMethodsFromInterfaceIntroductions(array $interfaceIntroductions): array { $methods = []; $methodsAndIntroductions = []; foreach ($interfaceIntroductions as $introduction) { $interfaceName = $introduction->getInterfaceName(); $methodName...
php
protected function getIntroducedMethodsFromInterfaceIntroductions(array $interfaceIntroductions): array { $methods = []; $methodsAndIntroductions = []; foreach ($interfaceIntroductions as $introduction) { $interfaceName = $introduction->getInterfaceName(); $methodName...
[ "protected", "function", "getIntroducedMethodsFromInterfaceIntroductions", "(", "array", "$", "interfaceIntroductions", ")", ":", "array", "{", "$", "methods", "=", "[", "]", ";", "$", "methodsAndIntroductions", "=", "[", "]", ";", "foreach", "(", "$", "interfaceI...
Returns all methods declared by the introduced interfaces @param array $interfaceIntroductions An array of Aop\InterfaceIntroduction @return array An array of method information (interface, method name) @throws Aop\Exception
[ "Returns", "all", "methods", "declared", "by", "the", "introduced", "interfaces" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L791-L809
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.renderSourceHint
protected function renderSourceHint(string $aspectClassName, string $methodName, string $tagName): string { return sprintf('%s::%s (%s advice)', $aspectClassName, $methodName, $tagName); }
php
protected function renderSourceHint(string $aspectClassName, string $methodName, string $tagName): string { return sprintf('%s::%s (%s advice)', $aspectClassName, $methodName, $tagName); }
[ "protected", "function", "renderSourceHint", "(", "string", "$", "aspectClassName", ",", "string", "$", "methodName", ",", "string", "$", "tagName", ")", ":", "string", "{", "return", "sprintf", "(", "'%s::%s (%s advice)'", ",", "$", "aspectClassName", ",", "$",...
Renders a short message which gives a hint on where the currently parsed pointcut expression was defined. @param string $aspectClassName @param string $methodName @param string $tagName @return string
[ "Renders", "a", "short", "message", "which", "gives", "a", "hint", "on", "where", "the", "currently", "parsed", "pointcut", "expression", "was", "defined", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L819-L822
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php
NamespaceDetectionTemplateProcessor.preProcessSource
public function preProcessSource($templateSource) { $templateSource = $this->protectCDataSectionsFromParser($templateSource); $templateSource = $this->registerNamespacesFromTemplateSource($templateSource); $this->throwExceptionsForUnhandledNamespaces($templateSource); return $templa...
php
public function preProcessSource($templateSource) { $templateSource = $this->protectCDataSectionsFromParser($templateSource); $templateSource = $this->registerNamespacesFromTemplateSource($templateSource); $this->throwExceptionsForUnhandledNamespaces($templateSource); return $templa...
[ "public", "function", "preProcessSource", "(", "$", "templateSource", ")", "{", "$", "templateSource", "=", "$", "this", "->", "protectCDataSectionsFromParser", "(", "$", "templateSource", ")", ";", "$", "templateSource", "=", "$", "this", "->", "registerNamespace...
Pre-process the template source before it is returned to the TemplateParser or passed to the next TemplateProcessorInterface instance. @param string $templateSource @return string
[ "Pre", "-", "process", "the", "template", "source", "before", "it", "is", "returned", "to", "the", "TemplateParser", "or", "passed", "to", "the", "next", "TemplateProcessorInterface", "instance", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php#L58-L65
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php
NamespaceDetectionTemplateProcessor.protectCDataSectionsFromParser
public function protectCDataSectionsFromParser($templateSource) { $parts = preg_split('/(\<\!\[CDATA\[|\]\]\>)/', $templateSource, -1, PREG_SPLIT_DELIM_CAPTURE); $balance = 0; $content = ''; $resultingParts = []; foreach ($parts as $index => $part) { unset($parts[...
php
public function protectCDataSectionsFromParser($templateSource) { $parts = preg_split('/(\<\!\[CDATA\[|\]\]\>)/', $templateSource, -1, PREG_SPLIT_DELIM_CAPTURE); $balance = 0; $content = ''; $resultingParts = []; foreach ($parts as $index => $part) { unset($parts[...
[ "public", "function", "protectCDataSectionsFromParser", "(", "$", "templateSource", ")", "{", "$", "parts", "=", "preg_split", "(", "'/(\\<\\!\\[CDATA\\[|\\]\\]\\>)/'", ",", "$", "templateSource", ",", "-", "1", ",", "PREG_SPLIT_DELIM_CAPTURE", ")", ";", "$", "balan...
Encodes areas enclosed in CDATA to prevent further parsing by the Fluid engine. CDATA sections will appear as they are in the final rendered result. @param string $templateSource @return mixed
[ "Encodes", "areas", "enclosed", "in", "CDATA", "to", "prevent", "further", "parsing", "by", "the", "Fluid", "engine", ".", "CDATA", "sections", "will", "appear", "as", "they", "are", "in", "the", "final", "rendered", "result", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php#L74-L116
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php
NamespaceDetectionTemplateProcessor.throwExceptionsForUnhandledNamespaces
public function throwExceptionsForUnhandledNamespaces($templateSource) { $viewHelperResolver = $this->renderingContext->getViewHelperResolver(); $splitTemplate = preg_split(static::$EXTENDED_SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS, $templateSource, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); ...
php
public function throwExceptionsForUnhandledNamespaces($templateSource) { $viewHelperResolver = $this->renderingContext->getViewHelperResolver(); $splitTemplate = preg_split(static::$EXTENDED_SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS, $templateSource, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); ...
[ "public", "function", "throwExceptionsForUnhandledNamespaces", "(", "$", "templateSource", ")", "{", "$", "viewHelperResolver", "=", "$", "this", "->", "renderingContext", "->", "getViewHelperResolver", "(", ")", ";", "$", "splitTemplate", "=", "preg_split", "(", "s...
Throw an UnknownNamespaceException for any unknown and not ignored namespace inside the template string. @param string $templateSource @return void
[ "Throw", "an", "UnknownNamespaceException", "for", "any", "unknown", "and", "not", "ignored", "namespace", "inside", "the", "template", "string", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php#L125-L153
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php
FileSystemStorage.initializeObject
public function initializeObject() { if (!is_dir($this->path) && !is_link($this->path)) { throw new Exception('The directory "' . $this->path . '" which was configured as a resource storage does not exist.', 1361533189); } }
php
public function initializeObject() { if (!is_dir($this->path) && !is_link($this->path)) { throw new Exception('The directory "' . $this->path . '" which was configured as a resource storage does not exist.', 1361533189); } }
[ "public", "function", "initializeObject", "(", ")", "{", "if", "(", "!", "is_dir", "(", "$", "this", "->", "path", ")", "&&", "!", "is_link", "(", "$", "this", "->", "path", ")", ")", "{", "throw", "new", "Exception", "(", "'The directory \"'", ".", ...
Initializes this resource storage @return void @throws Exception If the storage directory does not exist
[ "Initializes", "this", "resource", "storage" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php#L87-L92
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php
FileSystemStorage.getStreamByResource
public function getStreamByResource(PersistentResource $resource) { $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1()); return (file_exists($pathAndFilename) ? fopen($pathAndFilename, 'rb') : false); }
php
public function getStreamByResource(PersistentResource $resource) { $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1()); return (file_exists($pathAndFilename) ? fopen($pathAndFilename, 'rb') : false); }
[ "public", "function", "getStreamByResource", "(", "PersistentResource", "$", "resource", ")", "{", "$", "pathAndFilename", "=", "$", "this", "->", "getStoragePathAndFilenameByHash", "(", "$", "resource", "->", "getSha1", "(", ")", ")", ";", "return", "(", "file_...
Returns a stream handle which can be used internally to open / copy the given resource stored in this storage. @param PersistentResource $resource The resource stored in this storage @return resource | boolean The resource stream or false if the stream could not be obtained
[ "Returns", "a", "stream", "handle", "which", "can", "be", "used", "internally", "to", "open", "/", "copy", "the", "given", "resource", "stored", "in", "this", "storage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php#L111-L115
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php
FileSystemStorage.getStreamByResourcePath
public function getStreamByResourcePath($relativePath) { $pathAndFilename = $this->path . ltrim($relativePath, '/'); return (file_exists($pathAndFilename) ? fopen($pathAndFilename, 'r') : false); }
php
public function getStreamByResourcePath($relativePath) { $pathAndFilename = $this->path . ltrim($relativePath, '/'); return (file_exists($pathAndFilename) ? fopen($pathAndFilename, 'r') : false); }
[ "public", "function", "getStreamByResourcePath", "(", "$", "relativePath", ")", "{", "$", "pathAndFilename", "=", "$", "this", "->", "path", ".", "ltrim", "(", "$", "relativePath", ",", "'/'", ")", ";", "return", "(", "file_exists", "(", "$", "pathAndFilenam...
Returns a stream handle which can be used internally to open / copy the given resource stored in this storage. @param string $relativePath A path relative to the storage root, for example "MyFirstDirectory/SecondDirectory/Foo.css" @return resource | boolean A URI (for example the full path and filename) leading to the...
[ "Returns", "a", "stream", "handle", "which", "can", "be", "used", "internally", "to", "open", "/", "copy", "the", "given", "resource", "stored", "in", "this", "storage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php#L124-L128
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php
FileSystemStorage.getObjects
public function getObjects(callable $callback = null) { foreach ($this->resourceManager->getCollectionsByStorage($this) as $collection) { yield $this->getObjectsByCollection($collection, $callback); } }
php
public function getObjects(callable $callback = null) { foreach ($this->resourceManager->getCollectionsByStorage($this) as $collection) { yield $this->getObjectsByCollection($collection, $callback); } }
[ "public", "function", "getObjects", "(", "callable", "$", "callback", "=", "null", ")", "{", "foreach", "(", "$", "this", "->", "resourceManager", "->", "getCollectionsByStorage", "(", "$", "this", ")", "as", "$", "collection", ")", "{", "yield", "$", "thi...
Retrieve all Objects stored in this storage. @param callable $callback Function called after each iteration @return \Generator<Object>
[ "Retrieve", "all", "Objects", "stored", "in", "this", "storage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php#L136-L141
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php
FileSystemStorage.getObjectsByCollection
public function getObjectsByCollection(CollectionInterface $collection, callable $callback = null) { $iterator = $this->resourceRepository->findByCollectionNameIterator($collection->getName()); $iteration = 0; foreach ($this->resourceRepository->iterate($iterator, $callback) as $resource) { ...
php
public function getObjectsByCollection(CollectionInterface $collection, callable $callback = null) { $iterator = $this->resourceRepository->findByCollectionNameIterator($collection->getName()); $iteration = 0; foreach ($this->resourceRepository->iterate($iterator, $callback) as $resource) { ...
[ "public", "function", "getObjectsByCollection", "(", "CollectionInterface", "$", "collection", ",", "callable", "$", "callback", "=", "null", ")", "{", "$", "iterator", "=", "$", "this", "->", "resourceRepository", "->", "findByCollectionNameIterator", "(", "$", "...
Retrieve all Objects stored in this storage, filtered by the given collection name @param callable $callback Function called after each iteration @param CollectionInterface $collection @return \Generator<Object>
[ "Retrieve", "all", "Objects", "stored", "in", "this", "storage", "filtered", "by", "the", "given", "collection", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/FileSystemStorage.php#L150-L170
neos/flow-development-collection
Neos.Utility.OpcodeCache/Classes/OpcodeCacheHelper.php
OpcodeCacheHelper.initialize
protected static function initialize() { self::$clearCacheCallbacks = []; // Zend OpCache (built in by default since PHP 5.5) - http://php.net/manual/de/book.opcache.php if (extension_loaded('Zend OPcache') && ini_get('opcache.enable') === '1') { self::$clearCacheCallbacks[] = f...
php
protected static function initialize() { self::$clearCacheCallbacks = []; // Zend OpCache (built in by default since PHP 5.5) - http://php.net/manual/de/book.opcache.php if (extension_loaded('Zend OPcache') && ini_get('opcache.enable') === '1') { self::$clearCacheCallbacks[] = f...
[ "protected", "static", "function", "initialize", "(", ")", "{", "self", "::", "$", "clearCacheCallbacks", "=", "[", "]", ";", "// Zend OpCache (built in by default since PHP 5.5) - http://php.net/manual/de/book.opcache.php", "if", "(", "extension_loaded", "(", "'Zend OPcache'...
Initialize the ClearCache-Callbacks @return void
[ "Initialize", "the", "ClearCache", "-", "Callbacks" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.OpcodeCache/Classes/OpcodeCacheHelper.php#L34-L71
neos/flow-development-collection
Neos.Utility.OpcodeCache/Classes/OpcodeCacheHelper.php
OpcodeCacheHelper.clearAllActive
public static function clearAllActive(string $absolutePathAndFilename = null) { if (self::$clearCacheCallbacks === null) { self::initialize(); } foreach (self::$clearCacheCallbacks as $clearCacheCallback) { $clearCacheCallback($absolutePathAndFilename); } ...
php
public static function clearAllActive(string $absolutePathAndFilename = null) { if (self::$clearCacheCallbacks === null) { self::initialize(); } foreach (self::$clearCacheCallbacks as $clearCacheCallback) { $clearCacheCallback($absolutePathAndFilename); } ...
[ "public", "static", "function", "clearAllActive", "(", "string", "$", "absolutePathAndFilename", "=", "null", ")", "{", "if", "(", "self", "::", "$", "clearCacheCallbacks", "===", "null", ")", "{", "self", "::", "initialize", "(", ")", ";", "}", "foreach", ...
Clear a PHP file from all active cache files. Also supports to flush the cache completely, if called without parameter. @param string $absolutePathAndFilename Absolute path towards the PHP file to clear. @return void
[ "Clear", "a", "PHP", "file", "from", "all", "active", "cache", "files", ".", "Also", "supports", "to", "flush", "the", "cache", "completely", "if", "called", "without", "parameter", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.OpcodeCache/Classes/OpcodeCacheHelper.php#L79-L87
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/ChildrenOperation.php
ChildrenOperation.evaluate
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (count($flowQuery->getContext()) === 0) { return; } if (!isset($arguments[0]) || empty($arguments[0])) { if ($flowQuery->peekOperationName() === 'filter') { $filterOperation = $flow...
php
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (count($flowQuery->getContext()) === 0) { return; } if (!isset($arguments[0]) || empty($arguments[0])) { if ($flowQuery->peekOperationName() === 'filter') { $filterOperation = $flow...
[ "public", "function", "evaluate", "(", "FlowQuery", "$", "flowQuery", ",", "array", "$", "arguments", ")", "{", "if", "(", "count", "(", "$", "flowQuery", "->", "getContext", "(", ")", ")", "===", "0", ")", "{", "return", ";", "}", "if", "(", "!", ...
{@inheritdoc} @param FlowQuery $flowQuery the FlowQuery object @param array $arguments the filter expression to use (in index 0) @return void @throws FizzleException
[ "{", "@inheritdoc", "}" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/ChildrenOperation.php#L43-L83
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/ChildrenOperation.php
ChildrenOperation.evaluatePropertyNameFilter
protected function evaluatePropertyNameFilter(FlowQuery $query, $propertyNameFilter) { $resultObjects = []; $resultObjectHashes = []; foreach ($query->getContext() as $element) { $subProperty = ObjectAccess::getPropertyPath($element, $propertyNameFilter); if (is_objec...
php
protected function evaluatePropertyNameFilter(FlowQuery $query, $propertyNameFilter) { $resultObjects = []; $resultObjectHashes = []; foreach ($query->getContext() as $element) { $subProperty = ObjectAccess::getPropertyPath($element, $propertyNameFilter); if (is_objec...
[ "protected", "function", "evaluatePropertyNameFilter", "(", "FlowQuery", "$", "query", ",", "$", "propertyNameFilter", ")", "{", "$", "resultObjects", "=", "[", "]", ";", "$", "resultObjectHashes", "=", "[", "]", ";", "foreach", "(", "$", "query", "->", "get...
Evaluate the property name filter by traversing to the child object. We only support nested objects right now @param FlowQuery $query @param string $propertyNameFilter @return void
[ "Evaluate", "the", "property", "name", "filter", "by", "traversing", "to", "the", "child", "object", ".", "We", "only", "support", "nested", "objects", "right", "now" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/ChildrenOperation.php#L93-L115
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AjaxWidgetContextHolder.php
AjaxWidgetContextHolder.get
public function get($ajaxWidgetId) { $ajaxWidgetId = (int) $ajaxWidgetId; if (!isset($this->widgetContexts[$ajaxWidgetId])) { throw new WidgetContextNotFoundException('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId . '". This only happens if AJAX URIs are c...
php
public function get($ajaxWidgetId) { $ajaxWidgetId = (int) $ajaxWidgetId; if (!isset($this->widgetContexts[$ajaxWidgetId])) { throw new WidgetContextNotFoundException('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId . '". This only happens if AJAX URIs are c...
[ "public", "function", "get", "(", "$", "ajaxWidgetId", ")", "{", "$", "ajaxWidgetId", "=", "(", "int", ")", "$", "ajaxWidgetId", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "widgetContexts", "[", "$", "ajaxWidgetId", "]", ")", ")", "{", "th...
Get the widget context for the given $ajaxWidgetId. @param integer $ajaxWidgetId @return WidgetContext @throws Exception\WidgetContextNotFoundException
[ "Get", "the", "widget", "context", "for", "the", "given", "$ajaxWidgetId", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AjaxWidgetContextHolder.php#L51-L58
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AjaxWidgetContextHolder.php
AjaxWidgetContextHolder.store
public function store(WidgetContext $widgetContext) { $ajaxWidgetId = $this->nextFreeAjaxWidgetId++; $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId); $this->widgetContexts[$ajaxWidgetId] = $widgetContext; }
php
public function store(WidgetContext $widgetContext) { $ajaxWidgetId = $this->nextFreeAjaxWidgetId++; $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId); $this->widgetContexts[$ajaxWidgetId] = $widgetContext; }
[ "public", "function", "store", "(", "WidgetContext", "$", "widgetContext", ")", "{", "$", "ajaxWidgetId", "=", "$", "this", "->", "nextFreeAjaxWidgetId", "++", ";", "$", "widgetContext", "->", "setAjaxWidgetIdentifier", "(", "$", "ajaxWidgetId", ")", ";", "$", ...
Stores the WidgetContext inside the Context, and sets the AjaxWidgetIdentifier inside the Widget Context correctly. @param WidgetContext $widgetContext @return void @Flow\Session(autoStart=true)
[ "Stores", "the", "WidgetContext", "inside", "the", "Context", "and", "sets", "the", "AjaxWidgetIdentifier", "inside", "the", "Widget", "Context", "correctly", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AjaxWidgetContextHolder.php#L68-L73
neos/flow-development-collection
Neos.Flow/Classes/Cli/Command.php
Command.getShortDescription
public function getShortDescription(): string { $commandMethodReflection = $this->getCommandMethodReflection(); $lines = explode(chr(10), $commandMethodReflection->getDescription()); $shortDescription = ((count($lines) > 0) ? trim($lines[0]) : '<no description available>') . ($this->isDeprec...
php
public function getShortDescription(): string { $commandMethodReflection = $this->getCommandMethodReflection(); $lines = explode(chr(10), $commandMethodReflection->getDescription()); $shortDescription = ((count($lines) > 0) ? trim($lines[0]) : '<no description available>') . ($this->isDeprec...
[ "public", "function", "getShortDescription", "(", ")", ":", "string", "{", "$", "commandMethodReflection", "=", "$", "this", "->", "getCommandMethodReflection", "(", ")", ";", "$", "lines", "=", "explode", "(", "chr", "(", "10", ")", ",", "$", "commandMethod...
Returns a short description of this command @return string A short description
[ "Returns", "a", "short", "description", "of", "this", "command" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Command.php#L121-L131
neos/flow-development-collection
Neos.Flow/Classes/Cli/Command.php
Command.getDescription
public function getDescription(): string { $commandMethodReflection = $this->getCommandMethodReflection(); $lines = explode(chr(10), $commandMethodReflection->getDescription()); array_shift($lines); $descriptionLines = []; foreach ($lines as $line) { $trimmedLine ...
php
public function getDescription(): string { $commandMethodReflection = $this->getCommandMethodReflection(); $lines = explode(chr(10), $commandMethodReflection->getDescription()); array_shift($lines); $descriptionLines = []; foreach ($lines as $line) { $trimmedLine ...
[ "public", "function", "getDescription", "(", ")", ":", "string", "{", "$", "commandMethodReflection", "=", "$", "this", "->", "getCommandMethodReflection", "(", ")", ";", "$", "lines", "=", "explode", "(", "chr", "(", "10", ")", ",", "$", "commandMethodRefle...
Returns a longer description of this command This is the complete method description except for the first line which can be retrieved via getShortDescription() If The command description only consists of one line, an empty string is returned @return string A longer description of this command
[ "Returns", "a", "longer", "description", "of", "this", "command", "This", "is", "the", "complete", "method", "description", "except", "for", "the", "first", "line", "which", "can", "be", "retrieved", "via", "getShortDescription", "()", "If", "The", "command", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Command.php#L140-L157
neos/flow-development-collection
Neos.Flow/Classes/Cli/Command.php
Command.getArgumentDefinitions
public function getArgumentDefinitions(): array { if (!$this->hasArguments()) { return []; } $commandArgumentDefinitions = []; $commandMethodReflection = $this->getCommandMethodReflection(); $annotations = $commandMethodReflection->getTagsValues(); $comman...
php
public function getArgumentDefinitions(): array { if (!$this->hasArguments()) { return []; } $commandArgumentDefinitions = []; $commandMethodReflection = $this->getCommandMethodReflection(); $annotations = $commandMethodReflection->getTagsValues(); $comman...
[ "public", "function", "getArgumentDefinitions", "(", ")", ":", "array", "{", "if", "(", "!", "$", "this", "->", "hasArguments", "(", ")", ")", "{", "return", "[", "]", ";", "}", "$", "commandArgumentDefinitions", "=", "[", "]", ";", "$", "commandMethodRe...
Returns an array of CommandArgumentDefinition that contains information about required/optional arguments of this command. If the command does not expect any arguments, an empty array is returned @return array<CommandArgumentDefinition>
[ "Returns", "an", "array", "of", "CommandArgumentDefinition", "that", "contains", "information", "about", "required", "/", "optional", "arguments", "of", "this", "command", ".", "If", "the", "command", "does", "not", "expect", "any", "arguments", "an", "empty", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Command.php#L176-L196
neos/flow-development-collection
Neos.Flow/Classes/Cli/Command.php
Command.getRelatedCommandIdentifiers
public function getRelatedCommandIdentifiers(): array { $commandMethodReflection = $this->getCommandMethodReflection(); if (!$commandMethodReflection->isTaggedWith('see')) { return []; } $relatedCommandIdentifiers = []; foreach ($commandMethodReflection->getTagVa...
php
public function getRelatedCommandIdentifiers(): array { $commandMethodReflection = $this->getCommandMethodReflection(); if (!$commandMethodReflection->isTaggedWith('see')) { return []; } $relatedCommandIdentifiers = []; foreach ($commandMethodReflection->getTagVa...
[ "public", "function", "getRelatedCommandIdentifiers", "(", ")", ":", "array", "{", "$", "commandMethodReflection", "=", "$", "this", "->", "getCommandMethodReflection", "(", ")", ";", "if", "(", "!", "$", "commandMethodReflection", "->", "isTaggedWith", "(", "'see...
Returns an array of command identifiers which were specified in the "@see" annotation of a command method. @return array
[ "Returns", "an", "array", "of", "command", "identifiers", "which", "were", "specified", "in", "the", "@see", "annotation", "of", "a", "command", "method", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Command.php#L240-L254
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/UriBuilder.php
UriBuilder.reset
public function reset() { $this->arguments = []; $this->section = ''; $this->format = null; $this->createAbsoluteUri = false; $this->addQueryString = false; $this->argumentsToBeExcludedFromQueryString = []; return $this; }
php
public function reset() { $this->arguments = []; $this->section = ''; $this->format = null; $this->createAbsoluteUri = false; $this->addQueryString = false; $this->argumentsToBeExcludedFromQueryString = []; return $this; }
[ "public", "function", "reset", "(", ")", "{", "$", "this", "->", "arguments", "=", "[", "]", ";", "$", "this", "->", "section", "=", "''", ";", "$", "this", "->", "format", "=", "null", ";", "$", "this", "->", "createAbsoluteUri", "=", "false", ";"...
Resets all UriBuilder options to their default value. Note: This won't reset the Request that is attached to this UriBuilder (@see setRequest()) @return UriBuilder the current UriBuilder to allow method chaining @api
[ "Resets", "all", "UriBuilder", "options", "to", "their", "default", "value", ".", "Note", ":", "This", "won", "t", "reset", "the", "Request", "that", "is", "attached", "to", "this", "UriBuilder", "(", "@see", "setRequest", "()", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L258-L268
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/UriBuilder.php
UriBuilder.uriFor
public function uriFor($actionName, $controllerArguments = [], $controllerName = null, $packageKey = null, $subPackageKey = null) { if ($actionName === null || $actionName === '') { throw new Exception\MissingActionNameException('The URI Builder could not build a URI linking to an action control...
php
public function uriFor($actionName, $controllerArguments = [], $controllerName = null, $packageKey = null, $subPackageKey = null) { if ($actionName === null || $actionName === '') { throw new Exception\MissingActionNameException('The URI Builder could not build a URI linking to an action control...
[ "public", "function", "uriFor", "(", "$", "actionName", ",", "$", "controllerArguments", "=", "[", "]", ",", "$", "controllerName", "=", "null", ",", "$", "packageKey", "=", "null", ",", "$", "subPackageKey", "=", "null", ")", "{", "if", "(", "$", "act...
Creates an URI used for linking to an Controller action. @param string $actionName Name of the action to be called @param array $controllerArguments Additional query parameters. Will be merged with $this->arguments. @param string $controllerName Name of the target controller. If not set, current ControllerName is used...
[ "Creates", "an", "URI", "used", "for", "linking", "to", "an", "Controller", "action", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L283-L310
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/UriBuilder.php
UriBuilder.addNamespaceToArguments
protected function addNamespaceToArguments(array $arguments, RequestInterface $currentRequest) { while (!$currentRequest->isMainRequest()) { $argumentNamespace = $currentRequest->getArgumentNamespace(); if ($argumentNamespace !== '') { $arguments = [$argumentNamespace...
php
protected function addNamespaceToArguments(array $arguments, RequestInterface $currentRequest) { while (!$currentRequest->isMainRequest()) { $argumentNamespace = $currentRequest->getArgumentNamespace(); if ($argumentNamespace !== '') { $arguments = [$argumentNamespace...
[ "protected", "function", "addNamespaceToArguments", "(", "array", "$", "arguments", ",", "RequestInterface", "$", "currentRequest", ")", "{", "while", "(", "!", "$", "currentRequest", "->", "isMainRequest", "(", ")", ")", "{", "$", "argumentNamespace", "=", "$",...
Adds the argument namespace of the current request to the specified arguments. This happens recursively iterating through the nested requests in case of a subrequest. For example if this is executed inside a widget sub request in a plugin sub request, the result would be: array( 'pluginRequestNamespace' => array( 'widg...
[ "Adds", "the", "argument", "namespace", "of", "the", "current", "request", "to", "the", "specified", "arguments", ".", "This", "happens", "recursively", "iterating", "through", "the", "nested", "requests", "in", "case", "of", "a", "subrequest", ".", "For", "ex...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L326-L336
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/UriBuilder.php
UriBuilder.build
public function build(array $arguments = []) { $arguments = Arrays::arrayMergeRecursiveOverrule($this->arguments, $arguments); $arguments = $this->mergeArgumentsWithRequestArguments($arguments); $httpRequest = $this->request->getHttpRequest(); $uriPathPrefix = $this->environment->i...
php
public function build(array $arguments = []) { $arguments = Arrays::arrayMergeRecursiveOverrule($this->arguments, $arguments); $arguments = $this->mergeArgumentsWithRequestArguments($arguments); $httpRequest = $this->request->getHttpRequest(); $uriPathPrefix = $this->environment->i...
[ "public", "function", "build", "(", "array", "$", "arguments", "=", "[", "]", ")", "{", "$", "arguments", "=", "Arrays", "::", "arrayMergeRecursiveOverrule", "(", "$", "this", "->", "arguments", ",", "$", "arguments", ")", ";", "$", "arguments", "=", "$"...
Builds the URI @param array $arguments optional URI arguments. Will be merged with $this->arguments with precedence to $arguments @return string the (absolute or relative) URI as string @api
[ "Builds", "the", "URI" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L345-L362
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/UriBuilder.php
UriBuilder.mergeArgumentsWithRequestArguments
protected function mergeArgumentsWithRequestArguments(array $arguments) { if ($this->request !== $this->request->getMainRequest()) { $subRequest = $this->request; while ($subRequest instanceof ActionRequest) { $requestArguments = (array)$subRequest->getArguments(); ...
php
protected function mergeArgumentsWithRequestArguments(array $arguments) { if ($this->request !== $this->request->getMainRequest()) { $subRequest = $this->request; while ($subRequest instanceof ActionRequest) { $requestArguments = (array)$subRequest->getArguments(); ...
[ "protected", "function", "mergeArgumentsWithRequestArguments", "(", "array", "$", "arguments", ")", "{", "if", "(", "$", "this", "->", "request", "!==", "$", "this", "->", "request", "->", "getMainRequest", "(", ")", ")", "{", "$", "subRequest", "=", "$", ...
Merges specified arguments with arguments from request. If $this->request is no sub request, request arguments will only be merged if $this->addQueryString is set. Otherwise all request arguments except for the ones prefixed with the current request argument namespace will be merged. Additionally special arguments (Pa...
[ "Merges", "specified", "arguments", "with", "arguments", "from", "request", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L380-L451
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/UriBuilder.php
UriBuilder.getRequestNamespacePath
protected function getRequestNamespacePath($request) { if (!$request instanceof Request) { $parentPath = $this->getRequestNamespacePath($request->getParentRequest()); return $parentPath . ($parentPath !== '' && $request->getArgumentNamespace() !== '' ? '.' : '') . $request->getArgume...
php
protected function getRequestNamespacePath($request) { if (!$request instanceof Request) { $parentPath = $this->getRequestNamespacePath($request->getParentRequest()); return $parentPath . ($parentPath !== '' && $request->getArgumentNamespace() !== '' ? '.' : '') . $request->getArgume...
[ "protected", "function", "getRequestNamespacePath", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "Request", ")", "{", "$", "parentPath", "=", "$", "this", "->", "getRequestNamespacePath", "(", "$", "request", "->", "getParentReq...
Get the path of the argument namespaces of all parent requests. Example: mainrequest.subrequest.subsubrequest @param ActionRequest $request @return string
[ "Get", "the", "path", "of", "the", "argument", "namespaces", "of", "all", "parent", "requests", ".", "Example", ":", "mainrequest", ".", "subrequest", ".", "subsubrequest" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L460-L467
neos/flow-development-collection
Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php
AbstractPersistenceManager.registerNewObject
public function registerNewObject(Aspect\PersistenceMagicInterface $object) { $identifier = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true); $this->newObjects[$identifier] = $object; }
php
public function registerNewObject(Aspect\PersistenceMagicInterface $object) { $identifier = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true); $this->newObjects[$identifier] = $object; }
[ "public", "function", "registerNewObject", "(", "Aspect", "\\", "PersistenceMagicInterface", "$", "object", ")", "{", "$", "identifier", "=", "ObjectAccess", "::", "getProperty", "(", "$", "object", ",", "'Persistence_Object_Identifier'", ",", "true", ")", ";", "$...
Registers an object which has been created or cloned during this request. The given object must contain the Persistence_Object_Identifier property, thus the PersistenceMagicInterface type hint. A "new" object does not necessarily have to be known by any repository or be persisted in the end. Objects registered with t...
[ "Registers", "an", "object", "which", "has", "been", "created", "or", "cloned", "during", "this", "request", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php#L87-L91
neos/flow-development-collection
Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php
AbstractPersistenceManager.throwExceptionIfObjectIsNotWhitelisted
protected function throwExceptionIfObjectIsNotWhitelisted($object) { if (!$this->whitelistedObjects->contains($object)) { $message = 'Detected modified or new objects (' . get_class($object) . ', uuid:' . $this->getIdentifierByObject($object) . ') to be persisted which is not allowed for "safe r...
php
protected function throwExceptionIfObjectIsNotWhitelisted($object) { if (!$this->whitelistedObjects->contains($object)) { $message = 'Detected modified or new objects (' . get_class($object) . ', uuid:' . $this->getIdentifierByObject($object) . ') to be persisted which is not allowed for "safe r...
[ "protected", "function", "throwExceptionIfObjectIsNotWhitelisted", "(", "$", "object", ")", "{", "if", "(", "!", "$", "this", "->", "whitelistedObjects", "->", "contains", "(", "$", "object", ")", ")", "{", "$", "message", "=", "'Detected modified or new objects (...
Checks if the given object is whitelisted and if not, throws an exception @param object $object @return void @throws \Neos\Flow\Persistence\Exception
[ "Checks", "if", "the", "given", "object", "is", "whitelisted", "and", "if", "not", "throws", "an", "exception" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php#L113-L124
neos/flow-development-collection
Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php
AbstractPersistenceManager.convertObjectToIdentityArray
public function convertObjectToIdentityArray($object) { $identifier = $this->getIdentifierByObject($object); if ($identifier === null) { throw new Exception\UnknownObjectException(sprintf('Tried to convert an object of type "%s" to an identity array, but it is unknown to the Persistence ...
php
public function convertObjectToIdentityArray($object) { $identifier = $this->getIdentifierByObject($object); if ($identifier === null) { throw new Exception\UnknownObjectException(sprintf('Tried to convert an object of type "%s" to an identity array, but it is unknown to the Persistence ...
[ "public", "function", "convertObjectToIdentityArray", "(", "$", "object", ")", "{", "$", "identifier", "=", "$", "this", "->", "getIdentifierByObject", "(", "$", "object", ")", ";", "if", "(", "$", "identifier", "===", "null", ")", "{", "throw", "new", "Ex...
Converts the given object into an array containing the identity of the domain object. @param object $object The object to be converted @return array The identity array in the format array('__identity' => '...') @throws Exception\UnknownObjectException if the given object is not known to the Persistence Manager
[ "Converts", "the", "given", "object", "into", "an", "array", "containing", "the", "identity", "of", "the", "domain", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php#L133-L140
neos/flow-development-collection
Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php
AbstractPersistenceManager.convertObjectsToIdentityArrays
public function convertObjectsToIdentityArrays(array $array) { foreach ($array as $key => $value) { if (is_array($value)) { $array[$key] = $this->convertObjectsToIdentityArrays($value); } elseif (is_object($value) && $value instanceof \Traversable) { $...
php
public function convertObjectsToIdentityArrays(array $array) { foreach ($array as $key => $value) { if (is_array($value)) { $array[$key] = $this->convertObjectsToIdentityArrays($value); } elseif (is_object($value) && $value instanceof \Traversable) { $...
[ "public", "function", "convertObjectsToIdentityArrays", "(", "array", "$", "array", ")", "{", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "array", "[", "$...
Recursively iterates through the given array and turns objects into an arrays containing the identity of the domain object. @param array $array The array to be iterated over @return array The modified array without objects @throws Exception\UnknownObjectException if array contains objects that are not known to the Per...
[ "Recursively", "iterates", "through", "the", "given", "array", "and", "turns", "objects", "into", "an", "arrays", "containing", "the", "identity", "of", "the", "domain", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/AbstractPersistenceManager.php#L150-L162
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/CountWalker.php
CountWalker.walkSelectStatement
public function walkSelectStatement(\Doctrine\ORM\Query\AST\SelectStatement $AST) { $parent = null; $parentName = null; foreach ($this->_getQueryComponents() as $dqlAlias => $qComp) { if ($qComp['parent'] === null && $qComp['nestingLevel'] == 0) { $parent = $qComp...
php
public function walkSelectStatement(\Doctrine\ORM\Query\AST\SelectStatement $AST) { $parent = null; $parentName = null; foreach ($this->_getQueryComponents() as $dqlAlias => $qComp) { if ($qComp['parent'] === null && $qComp['nestingLevel'] == 0) { $parent = $qComp...
[ "public", "function", "walkSelectStatement", "(", "\\", "Doctrine", "\\", "ORM", "\\", "Query", "\\", "AST", "\\", "SelectStatement", "$", "AST", ")", "{", "$", "parent", "=", "null", ";", "$", "parentName", "=", "null", ";", "foreach", "(", "$", "this",...
Walks down a SelectStatement AST node, modifying it to retrieve a COUNT @param \Doctrine\ORM\Query\AST\SelectStatement $AST @return void
[ "Walks", "down", "a", "SelectStatement", "AST", "node", "modifying", "it", "to", "retrieve", "a", "COUNT" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/CountWalker.php#L27-L53
neos/flow-development-collection
Neos.Flow/Classes/SignalSlot/Dispatcher.php
Dispatcher.connect
public function connect($signalClassName, $signalName, $slotClassNameOrObject, $slotMethodName = '', $passSignalInformation = true) { $class = null; $object = null; if (strpos($signalName, 'emit') === 0) { $possibleSignalName = lcfirst(substr($signalName, strlen('emit'))); ...
php
public function connect($signalClassName, $signalName, $slotClassNameOrObject, $slotMethodName = '', $passSignalInformation = true) { $class = null; $object = null; if (strpos($signalName, 'emit') === 0) { $possibleSignalName = lcfirst(substr($signalName, strlen('emit'))); ...
[ "public", "function", "connect", "(", "$", "signalClassName", ",", "$", "signalName", ",", "$", "slotClassNameOrObject", ",", "$", "slotMethodName", "=", "''", ",", "$", "passSignalInformation", "=", "true", ")", "{", "$", "class", "=", "null", ";", "$", "...
Connects a signal with a slot. One slot can be connected with multiple signals by calling this method multiple times. @param string $signalClassName Name of the class containing the signal @param string $signalName Name of the signal @param mixed $slotClassNameOrObject Name of the class containing the slot or the inst...
[ "Connects", "a", "signal", "with", "a", "slot", ".", "One", "slot", "can", "be", "connected", "with", "multiple", "signals", "by", "calling", "this", "method", "multiple", "times", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/SignalSlot/Dispatcher.php#L64-L91
neos/flow-development-collection
Neos.Flow/Classes/SignalSlot/Dispatcher.php
Dispatcher.dispatch
public function dispatch($signalClassName, $signalName, array $signalArguments = []) { if (!isset($this->slots[$signalClassName][$signalName])) { return; } foreach ($this->slots[$signalClassName][$signalName] as $slotInformation) { $finalSignalArguments = $signalArgu...
php
public function dispatch($signalClassName, $signalName, array $signalArguments = []) { if (!isset($this->slots[$signalClassName][$signalName])) { return; } foreach ($this->slots[$signalClassName][$signalName] as $slotInformation) { $finalSignalArguments = $signalArgu...
[ "public", "function", "dispatch", "(", "$", "signalClassName", ",", "$", "signalName", ",", "array", "$", "signalArguments", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "slots", "[", "$", "signalClassName", "]", "[", "$", ...
Dispatches a signal by calling the registered Slot methods @param string $signalClassName Name of the class containing the signal @param string $signalName Name of the signal @param array $signalArguments arguments passed to the signal method @return void @throws Exception\InvalidSlotException if the slot is not valid...
[ "Dispatches", "a", "signal", "by", "calling", "the", "registered", "Slot", "methods" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/SignalSlot/Dispatcher.php#L103-L141
neos/flow-development-collection
Neos.Flow/Classes/SignalSlot/Dispatcher.php
Dispatcher.getSlots
public function getSlots($signalClassName, $signalName) { return (isset($this->slots[$signalClassName][$signalName])) ? $this->slots[$signalClassName][$signalName] : []; }
php
public function getSlots($signalClassName, $signalName) { return (isset($this->slots[$signalClassName][$signalName])) ? $this->slots[$signalClassName][$signalName] : []; }
[ "public", "function", "getSlots", "(", "$", "signalClassName", ",", "$", "signalName", ")", "{", "return", "(", "isset", "(", "$", "this", "->", "slots", "[", "$", "signalClassName", "]", "[", "$", "signalName", "]", ")", ")", "?", "$", "this", "->", ...
Returns all slots which are connected with the given signal @param string $signalClassName Name of the class containing the signal @param string $signalName Name of the signal @return array An array of arrays with slot information @api
[ "Returns", "all", "slots", "which", "are", "connected", "with", "the", "given", "signal" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/SignalSlot/Dispatcher.php#L151-L154
neos/flow-development-collection
Neos.Flow.Log/Classes/Backend/ConsoleBackend.php
ConsoleBackend.open
public function open() { $this->severityLabels = [ LOG_EMERG => 'EMERGENCY', LOG_ALERT => 'ALERT ', LOG_CRIT => 'CRITICAL ', LOG_ERR => 'ERROR ', LOG_WARNING => 'WARNING ', LOG_NOTICE => 'NOTICE ', LOG_I...
php
public function open() { $this->severityLabels = [ LOG_EMERG => 'EMERGENCY', LOG_ALERT => 'ALERT ', LOG_CRIT => 'CRITICAL ', LOG_ERR => 'ERROR ', LOG_WARNING => 'WARNING ', LOG_NOTICE => 'NOTICE ', LOG_I...
[ "public", "function", "open", "(", ")", "{", "$", "this", "->", "severityLabels", "=", "[", "LOG_EMERG", "=>", "'EMERGENCY'", ",", "LOG_ALERT", "=>", "'ALERT '", ",", "LOG_CRIT", "=>", "'CRITICAL '", ",", "LOG_ERR", "=>", "'ERROR '", ",", "LOG_WARNING", ...
Carries out all actions necessary to prepare the logging backend, such as opening the log file or opening a database connection. @return void @throws CouldNotOpenResourceException @api
[ "Carries", "out", "all", "actions", "necessary", "to", "prepare", "the", "logging", "backend", "such", "as", "opening", "the", "log", "file", "or", "opening", "a", "database", "connection", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/ConsoleBackend.php#L49-L66
neos/flow-development-collection
Neos.Flow.Log/Classes/Backend/ConsoleBackend.php
ConsoleBackend.append
public function append($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null) { if ($severity > $this->severityThreshold) { return; } $severityLabel = (isset($this->severityLabels[$severity])) ? $this->severityLabels[$s...
php
public function append($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null) { if ($severity > $this->severityThreshold) { return; } $severityLabel = (isset($this->severityLabels[$severity])) ? $this->severityLabels[$s...
[ "public", "function", "append", "(", "$", "message", ",", "$", "severity", "=", "LOG_INFO", ",", "$", "additionalData", "=", "null", ",", "$", "packageKey", "=", "null", ",", "$", "className", "=", "null", ",", "$", "methodName", "=", "null", ")", "{",...
Appends the given message along with the additional information into the log. @param string $message The message to log @param integer $severity One of the LOG_* constants @param mixed $additionalData A variable containing more information about the event to be logged @param string $packageKey Key of the package trigg...
[ "Appends", "the", "given", "message", "along", "with", "the", "additional", "information", "into", "the", "log", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/ConsoleBackend.php#L80-L94
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/NumberParser.php
NumberParser.parseNumberWithCustomPattern
public function parseNumberWithCustomPattern($numberToParse, $format, Locale $locale, $strictMode = true) { return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseCustomFormat($format), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode); }
php
public function parseNumberWithCustomPattern($numberToParse, $format, Locale $locale, $strictMode = true) { return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseCustomFormat($format), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode); }
[ "public", "function", "parseNumberWithCustomPattern", "(", "$", "numberToParse", ",", "$", "format", ",", "Locale", "$", "locale", ",", "$", "strictMode", "=", "true", ")", "{", "return", "$", "this", "->", "doParsingWithParsedFormat", "(", "$", "numberToParse",...
Parses number given as a string using provided format. @param string $numberToParse Number to be parsed @param string $format Number format to use @param Locale $locale Locale to use @param boolean $strictMode Work mode (strict when true, lenient when false) @return mixed Parsed float number or false on failure @api
[ "Parses", "number", "given", "as", "a", "string", "using", "provided", "format", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/NumberParser.php#L67-L70
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/NumberParser.php
NumberParser.parseDecimalNumber
public function parseDecimalNumber($numberToParse, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { NumbersReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale...
php
public function parseDecimalNumber($numberToParse, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { NumbersReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale...
[ "public", "function", "parseDecimalNumber", "(", "$", "numberToParse", ",", "Locale", "$", "locale", ",", "$", "formatLength", "=", "NumbersReader", "::", "FORMAT_LENGTH_DEFAULT", ",", "$", "strictMode", "=", "true", ")", "{", "NumbersReader", "::", "validateForma...
Parses decimal number using proper format from CLDR. @param string $numberToParse Number to be parsed @param Locale $locale Locale to use @param string $formatLength One of NumbersReader FORMAT_LENGTH constants @param boolean $strictMode Work mode (strict when true, lenient when false) @return mixed Parsed float numbe...
[ "Parses", "decimal", "number", "using", "proper", "format", "from", "CLDR", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/NumberParser.php#L82-L86
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/NumberParser.php
NumberParser.parsePercentNumber
public function parsePercentNumber($numberToParse, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { NumbersReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale...
php
public function parsePercentNumber($numberToParse, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { NumbersReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale...
[ "public", "function", "parsePercentNumber", "(", "$", "numberToParse", ",", "Locale", "$", "locale", ",", "$", "formatLength", "=", "NumbersReader", "::", "FORMAT_LENGTH_DEFAULT", ",", "$", "strictMode", "=", "true", ")", "{", "NumbersReader", "::", "validateForma...
Parses percent number using proper format from CLDR. @param string $numberToParse Number to be parsed @param Locale $locale Locale to use @param string $formatLength One of NumbersReader FORMAT_LENGTH constants @param boolean $strictMode Work mode (strict when true, lenient when false) @return mixed Parsed float numbe...
[ "Parses", "percent", "number", "using", "proper", "format", "from", "CLDR", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/NumberParser.php#L98-L102
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/NumberParser.php
NumberParser.doParsingWithParsedFormat
protected function doParsingWithParsedFormat($numberToParse, array $parsedFormat, array $localizedSymbols, $strictMode) { return ($strictMode) ? $this->doParsingInStrictMode($numberToParse, $parsedFormat, $localizedSymbols) : $this->doParsingInLenientMode($numberToParse, $parsedFormat, $localizedSymbols); ...
php
protected function doParsingWithParsedFormat($numberToParse, array $parsedFormat, array $localizedSymbols, $strictMode) { return ($strictMode) ? $this->doParsingInStrictMode($numberToParse, $parsedFormat, $localizedSymbols) : $this->doParsingInLenientMode($numberToParse, $parsedFormat, $localizedSymbols); ...
[ "protected", "function", "doParsingWithParsedFormat", "(", "$", "numberToParse", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedSymbols", ",", "$", "strictMode", ")", "{", "return", "(", "$", "strictMode", ")", "?", "$", "this", "->", "doParsi...
Parses number using parsed format, in strict or lenient mode. @param string $numberToParse Number to be parsed @param array $parsedFormat Parsed format (from NumbersReader) @param array $localizedSymbols An array with symbols to use @param boolean $strictMode Work mode (strict when true, lenient when false) @return mi...
[ "Parses", "number", "using", "parsed", "format", "in", "strict", "or", "lenient", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/NumberParser.php#L113-L116
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/NumberParser.php
NumberParser.doParsingInStrictMode
protected function doParsingInStrictMode($numberToParse, array $parsedFormat, array $localizedSymbols) { $numberIsNegative = false; if (!empty($parsedFormat['negativePrefix']) && !empty($parsedFormat['negativeSuffix'])) { if (Utility::stringBeginsWith($numberToParse, $parsedFormat['nega...
php
protected function doParsingInStrictMode($numberToParse, array $parsedFormat, array $localizedSymbols) { $numberIsNegative = false; if (!empty($parsedFormat['negativePrefix']) && !empty($parsedFormat['negativeSuffix'])) { if (Utility::stringBeginsWith($numberToParse, $parsedFormat['nega...
[ "protected", "function", "doParsingInStrictMode", "(", "$", "numberToParse", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedSymbols", ")", "{", "$", "numberIsNegative", "=", "false", ";", "if", "(", "!", "empty", "(", "$", "parsedFormat", "[",...
Parses number in strict mode. In strict mode parser checks all constraints of provided parsed format, and if any of them is not fullfiled, parsing fails (false is returned). @param string $numberToParse Number to be parsed @param array $parsedFormat Parsed format (from NumbersReader) @param array $localizedSymbols An...
[ "Parses", "number", "in", "strict", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/NumberParser.php#L129-L222
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/NumberParser.php
NumberParser.doParsingInLenientMode
protected function doParsingInLenientMode($numberToParse, array $parsedFormat, array $localizedSymbols) { $numberIsNegative = false; $positionOfFirstDigit = null; $positionOfLastDigit = null; $charactersOfNumberString = str_split($numberToParse); foreach ($charactersOfNumber...
php
protected function doParsingInLenientMode($numberToParse, array $parsedFormat, array $localizedSymbols) { $numberIsNegative = false; $positionOfFirstDigit = null; $positionOfLastDigit = null; $charactersOfNumberString = str_split($numberToParse); foreach ($charactersOfNumber...
[ "protected", "function", "doParsingInLenientMode", "(", "$", "numberToParse", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedSymbols", ")", "{", "$", "numberIsNegative", "=", "false", ";", "$", "positionOfFirstDigit", "=", "null", ";", "$", "pos...
Parses number in lenient mode. Lenient parsing ignores everything that can be ignored, and tries to extract number from the string, even if it's not well formed. Implementation is simple but should work more often than strict parsing. Algorithm: 1. Find first digit 2. Find last digit 3. Find decimal separator betwee...
[ "Parses", "number", "in", "lenient", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/NumberParser.php#L246-L308
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.loadClass
public function loadClass(string $className): bool { $className = ltrim($className, '\\'); $namespaceParts = explode('\\', $className); // Workaround for Doctrine's annotation parser which does a class_exists() for annotations like "@param" and so on: if (isset($this->ignoredClassNam...
php
public function loadClass(string $className): bool { $className = ltrim($className, '\\'); $namespaceParts = explode('\\', $className); // Workaround for Doctrine's annotation parser which does a class_exists() for annotations like "@param" and so on: if (isset($this->ignoredClassNam...
[ "public", "function", "loadClass", "(", "string", "$", "className", ")", ":", "bool", "{", "$", "className", "=", "ltrim", "(", "$", "className", ",", "'\\\\'", ")", ";", "$", "namespaceParts", "=", "explode", "(", "'\\\\'", ",", "$", "className", ")", ...
Loads php files containing classes or interfaces found in the classes directory of a package and specifically registered classes. @param string $className Name of the class/interface to load @return boolean
[ "Loads", "php", "files", "containing", "classes", "or", "interfaces", "found", "in", "the", "classes", "directory", "of", "a", "package", "and", "specifically", "registered", "classes", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L112-L157
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.loadClassFromPossiblePaths
protected function loadClassFromPossiblePaths(array $possiblePaths, array $namespaceParts, int $packageNamespacePartCount): bool { foreach ($possiblePaths as $possiblePathData) { $possibleFilePath = ''; if ($possiblePathData['mappingType'] === self::MAPPING_TYPE_PSR0) { ...
php
protected function loadClassFromPossiblePaths(array $possiblePaths, array $namespaceParts, int $packageNamespacePartCount): bool { foreach ($possiblePaths as $possiblePathData) { $possibleFilePath = ''; if ($possiblePathData['mappingType'] === self::MAPPING_TYPE_PSR0) { ...
[ "protected", "function", "loadClassFromPossiblePaths", "(", "array", "$", "possiblePaths", ",", "array", "$", "namespaceParts", ",", "int", "$", "packageNamespacePartCount", ")", ":", "bool", "{", "foreach", "(", "$", "possiblePaths", "as", "$", "possiblePathData", ...
Tries to load a class from a list of possible paths. This is needed because packages are not prefix-free; i.e. there may exist a package "Neos" and a package "Neos.NodeTypes" -- so a class Neos\NodeTypes\Foo must be first loaded (if it exists) from Neos.NodeTypes, falling back to Neos afterwards. @param array $possibl...
[ "Tries", "to", "load", "a", "class", "from", "a", "list", "of", "possible", "paths", ".", "This", "is", "needed", "because", "packages", "are", "not", "prefix", "-", "free", ";", "i", ".", "e", ".", "there", "may", "exist", "a", "package", "Neos", "a...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L169-L189
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.setPackages
public function setPackages(array $activePackages) { /** @var Package $package */ foreach ($activePackages as $packageKey => $package) { foreach ($package->getFlattenedAutoloadConfiguration() as $configuration) { $this->createNamespaceMapEntry($configuration['namespace'],...
php
public function setPackages(array $activePackages) { /** @var Package $package */ foreach ($activePackages as $packageKey => $package) { foreach ($package->getFlattenedAutoloadConfiguration() as $configuration) { $this->createNamespaceMapEntry($configuration['namespace'],...
[ "public", "function", "setPackages", "(", "array", "$", "activePackages", ")", "{", "/** @var Package $package */", "foreach", "(", "$", "activePackages", "as", "$", "packageKey", "=>", "$", "package", ")", "{", "foreach", "(", "$", "package", "->", "getFlattene...
Sets the available packages @param array $activePackages An array of \Neos\Flow\Package\Package objects @return void
[ "Sets", "the", "available", "packages" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L197-L211
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.createNamespaceMapEntry
protected function createNamespaceMapEntry(string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0) { $unifiedClassPath = Files::getNormalizedPath($classPath); $entryIdentifier = md5($unifiedClassPath . '-' . $mappingType); $currentArray = & $this->packageNamespa...
php
protected function createNamespaceMapEntry(string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0) { $unifiedClassPath = Files::getNormalizedPath($classPath); $entryIdentifier = md5($unifiedClassPath . '-' . $mappingType); $currentArray = & $this->packageNamespa...
[ "protected", "function", "createNamespaceMapEntry", "(", "string", "$", "namespace", ",", "string", "$", "classPath", ",", "string", "$", "mappingType", "=", "self", "::", "MAPPING_TYPE_PSR0", ")", "{", "$", "unifiedClassPath", "=", "Files", "::", "getNormalizedPa...
Add a namespace to class path mapping to the class loader for resolving classes. @param string $namespace A namespace to map to a class path. @param string $classPath The class path to be mapped. @param string $mappingType The mapping type for this mapping entry. Currently one of self::MAPPING_TYPE_PSR0 or self::MAPPI...
[ "Add", "a", "namespace", "to", "class", "path", "mapping", "to", "the", "class", "loader", "for", "resolving", "classes", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L221-L241
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.createFallbackPathEntry
public function createFallbackPathEntry(string $path) { $entryIdentifier = md5($path); if (!isset($this->fallbackClassPaths[$entryIdentifier])) { $this->fallbackClassPaths[$entryIdentifier] = [ 'path' => $path, 'mappingType' => self::MAPPING_TYPE_PSR4 ...
php
public function createFallbackPathEntry(string $path) { $entryIdentifier = md5($path); if (!isset($this->fallbackClassPaths[$entryIdentifier])) { $this->fallbackClassPaths[$entryIdentifier] = [ 'path' => $path, 'mappingType' => self::MAPPING_TYPE_PSR4 ...
[ "public", "function", "createFallbackPathEntry", "(", "string", "$", "path", ")", "{", "$", "entryIdentifier", "=", "md5", "(", "$", "path", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "fallbackClassPaths", "[", "$", "entryIdentifier", "]", ...
Adds an entry to the fallback path map. MappingType for this kind of paths is always PSR4 as no package namespace is used then. @param string $path The fallback path to search in. @return void
[ "Adds", "an", "entry", "to", "the", "fallback", "path", "map", ".", "MappingType", "for", "this", "kind", "of", "paths", "is", "always", "PSR4", "as", "no", "package", "namespace", "is", "used", "then", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L249-L258
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.buildClassPathWithPsr0
protected function buildClassPathWithPsr0(array $classNameParts, string $classPath): string { $fileName = implode('/', $classNameParts) . '.php'; return $classPath . $fileName; }
php
protected function buildClassPathWithPsr0(array $classNameParts, string $classPath): string { $fileName = implode('/', $classNameParts) . '.php'; return $classPath . $fileName; }
[ "protected", "function", "buildClassPathWithPsr0", "(", "array", "$", "classNameParts", ",", "string", "$", "classPath", ")", ":", "string", "{", "$", "fileName", "=", "implode", "(", "'/'", ",", "$", "classNameParts", ")", ".", "'.php'", ";", "return", "$",...
Try to build a path to a class according to PSR-0 rules. @param array $classNameParts Parts of the FQ classname. @param string $classPath Already detected class path to a possible package. @return string
[ "Try", "to", "build", "a", "path", "to", "a", "class", "according", "to", "PSR", "-", "0", "rules", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L299-L304
neos/flow-development-collection
Neos.Flow/Classes/Core/ClassLoader.php
ClassLoader.buildClassPathWithPsr4
protected function buildClassPathWithPsr4(array $classNameParts, string $classPath, int $packageNamespacePartCount): string { $fileName = implode('/', array_slice($classNameParts, $packageNamespacePartCount)) . '.php'; return $classPath . $fileName; }
php
protected function buildClassPathWithPsr4(array $classNameParts, string $classPath, int $packageNamespacePartCount): string { $fileName = implode('/', array_slice($classNameParts, $packageNamespacePartCount)) . '.php'; return $classPath . $fileName; }
[ "protected", "function", "buildClassPathWithPsr4", "(", "array", "$", "classNameParts", ",", "string", "$", "classPath", ",", "int", "$", "packageNamespacePartCount", ")", ":", "string", "{", "$", "fileName", "=", "implode", "(", "'/'", ",", "array_slice", "(", ...
Try to build a path to a class according to PSR-4 rules. @param array $classNameParts Parts of the FQ classname. @param string $classPath Already detected class path to a possible package. @param integer $packageNamespacePartCount Amount of parts of the className that is also part of the package namespace. @return str...
[ "Try", "to", "build", "a", "path", "to", "a", "class", "according", "to", "PSR", "-", "4", "rules", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ClassLoader.php#L314-L319
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/FloatConverter.php
FloatConverter.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { if ($source === null || $source === '') { return null; } elseif (is_string($source) && $configuration instanceof PropertyMappingConfigura...
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { if ($source === null || $source === '') { return null; } elseif (is_string($source) && $configuration instanceof PropertyMappingConfigura...
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "if", "(", "$", "source", ...
Actually convert from $source to $targetType, by doing a typecast. @param mixed $source @param string $targetType @param array $convertedChildProperties @param PropertyMappingConfigurationInterface $configuration @return float|\Neos\Error\Messages\Error @api
[ "Actually", "convert", "from", "$source", "to", "$targetType", "by", "doing", "a", "typecast", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/FloatConverter.php#L132-L147
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/FloatConverter.php
FloatConverter.parseUsingLocaleIfConfigured
protected function parseUsingLocaleIfConfigured($source, PropertyMappingConfigurationInterface $configuration) { $configuration = $this->getConfigurationKeysAndValues($configuration, ['locale', 'strictMode', 'formatLength', 'formatType']); if ($configuration['locale'] === null) { return...
php
protected function parseUsingLocaleIfConfigured($source, PropertyMappingConfigurationInterface $configuration) { $configuration = $this->getConfigurationKeysAndValues($configuration, ['locale', 'strictMode', 'formatLength', 'formatType']); if ($configuration['locale'] === null) { return...
[ "protected", "function", "parseUsingLocaleIfConfigured", "(", "$", "source", ",", "PropertyMappingConfigurationInterface", "$", "configuration", ")", "{", "$", "configuration", "=", "$", "this", "->", "getConfigurationKeysAndValues", "(", "$", "configuration", ",", "[",...
Tries to parse the input using the NumberParser. @param string $source @param PropertyMappingConfigurationInterface $configuration @return float|\Neos\Flow\Validation\Error Parsed float number or error @throws \Neos\Flow\Property\Exception\InvalidPropertyMappingConfigurationException
[ "Tries", "to", "parse", "the", "input", "using", "the", "NumberParser", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/FloatConverter.php#L157-L209
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/FloatConverter.php
FloatConverter.getConfigurationKeysAndValues
protected function getConfigurationKeysAndValues(PropertyMappingConfigurationInterface $configuration, array $configurationKeys) { $keysAndValues = []; foreach ($configurationKeys as $configurationKey) { $keysAndValues[$configurationKey] = $configuration->getConfigurationValue(FloatConve...
php
protected function getConfigurationKeysAndValues(PropertyMappingConfigurationInterface $configuration, array $configurationKeys) { $keysAndValues = []; foreach ($configurationKeys as $configurationKey) { $keysAndValues[$configurationKey] = $configuration->getConfigurationValue(FloatConve...
[ "protected", "function", "getConfigurationKeysAndValues", "(", "PropertyMappingConfigurationInterface", "$", "configuration", ",", "array", "$", "configurationKeys", ")", "{", "$", "keysAndValues", "=", "[", "]", ";", "foreach", "(", "$", "configurationKeys", "as", "$...
Helper method to collect configuration for this class. @param PropertyMappingConfigurationInterface $configuration @param array $configurationKeys @return array
[ "Helper", "method", "to", "collect", "configuration", "for", "this", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/FloatConverter.php#L218-L225
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.getConstructor
public function getConstructor() { if (!isset($this->constructor)) { $this->constructor = new ProxyConstructor($this->fullOriginalClassName); $this->constructor->injectReflectionService($this->reflectionService); } return $this->constructor; }
php
public function getConstructor() { if (!isset($this->constructor)) { $this->constructor = new ProxyConstructor($this->fullOriginalClassName); $this->constructor->injectReflectionService($this->reflectionService); } return $this->constructor; }
[ "public", "function", "getConstructor", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "constructor", ")", ")", "{", "$", "this", "->", "constructor", "=", "new", "ProxyConstructor", "(", "$", "this", "->", "fullOriginalClassName", ")", ...
Returns the ProxyConstructor for this ProxyClass. Creates it if needed. @return ProxyConstructor
[ "Returns", "the", "ProxyConstructor", "for", "this", "ProxyClass", ".", "Creates", "it", "if", "needed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L116-L123
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.getMethod
public function getMethod($methodName) { if ($methodName === '__construct') { return $this->getConstructor(); } if (!isset($this->methods[$methodName])) { $this->methods[$methodName] = new ProxyMethod($this->fullOriginalClassName, $methodName); $this->meth...
php
public function getMethod($methodName) { if ($methodName === '__construct') { return $this->getConstructor(); } if (!isset($this->methods[$methodName])) { $this->methods[$methodName] = new ProxyMethod($this->fullOriginalClassName, $methodName); $this->meth...
[ "public", "function", "getMethod", "(", "$", "methodName", ")", "{", "if", "(", "$", "methodName", "===", "'__construct'", ")", "{", "return", "$", "this", "->", "getConstructor", "(", ")", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "...
Returns the named ProxyMethod for this ProxyClass. Creates it if needed. @param string $methodName The name of the methods to return @return ProxyMethod
[ "Returns", "the", "named", "ProxyMethod", "for", "this", "ProxyClass", ".", "Creates", "it", "if", "needed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L131-L141
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.addProperty
public function addProperty($name, $initialValueCode, $visibility = 'private', $docComment = '') { $this->properties[$name] = [ 'initialValueCode' => $initialValueCode, 'visibility' => $visibility, 'docComment' => $docComment ]; }
php
public function addProperty($name, $initialValueCode, $visibility = 'private', $docComment = '') { $this->properties[$name] = [ 'initialValueCode' => $initialValueCode, 'visibility' => $visibility, 'docComment' => $docComment ]; }
[ "public", "function", "addProperty", "(", "$", "name", ",", "$", "initialValueCode", ",", "$", "visibility", "=", "'private'", ",", "$", "docComment", "=", "''", ")", "{", "$", "this", "->", "properties", "[", "$", "name", "]", "=", "[", "'initialValueCo...
Adds a class property to this proxy class @param string $name Name of the property @param string $initialValueCode PHP code of the initial value assignment @param string $visibility @param string $docComment @return void
[ "Adds", "a", "class", "property", "to", "this", "proxy", "class" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L164-L171
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.render
public function render() { $namespace = $this->namespace; $proxyClassName = $this->originalClassName; $originalClassName = $this->originalClassName . Compiler::ORIGINAL_CLASSNAME_SUFFIX; $classModifier = ''; if ($this->reflectionService->isClassAbstract($this->fullOriginalCla...
php
public function render() { $namespace = $this->namespace; $proxyClassName = $this->originalClassName; $originalClassName = $this->originalClassName . Compiler::ORIGINAL_CLASSNAME_SUFFIX; $classModifier = ''; if ($this->reflectionService->isClassAbstract($this->fullOriginalCla...
[ "public", "function", "render", "(", ")", "{", "$", "namespace", "=", "$", "this", "->", "namespace", ";", "$", "proxyClassName", "=", "$", "this", "->", "originalClassName", ";", "$", "originalClassName", "=", "$", "this", "->", "originalClassName", ".", ...
Renders and returns the PHP code for this ProxyClass. @return string
[ "Renders", "and", "returns", "the", "PHP", "code", "for", "this", "ProxyClass", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L206-L242
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.buildClassDocumentation
protected function buildClassDocumentation() { $classDocumentation = "/**\n"; $classReflection = new ClassReflection($this->fullOriginalClassName); $classDescription = $classReflection->getDescription(); $classDocumentation .= ' * ' . str_replace("\n", "\n * ", $classDescription) . ...
php
protected function buildClassDocumentation() { $classDocumentation = "/**\n"; $classReflection = new ClassReflection($this->fullOriginalClassName); $classDescription = $classReflection->getDescription(); $classDocumentation .= ' * ' . str_replace("\n", "\n * ", $classDescription) . ...
[ "protected", "function", "buildClassDocumentation", "(", ")", "{", "$", "classDocumentation", "=", "\"/**\\n\"", ";", "$", "classReflection", "=", "new", "ClassReflection", "(", "$", "this", "->", "fullOriginalClassName", ")", ";", "$", "classDescription", "=", "$...
Builds the class documentation block for the specified class keeping doc comments and vital annotations @return string $methodDocumentation DocComment for the given method
[ "Builds", "the", "class", "documentation", "block", "for", "the", "specified", "class", "keeping", "doc", "comments", "and", "vital", "annotations" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L249-L263
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.renderConstantsCode
protected function renderConstantsCode() { $code = ''; foreach ($this->constants as $name => $valueCode) { $code .= ' const ' . $name . ' = ' . $valueCode . ";\n\n"; } return $code; }
php
protected function renderConstantsCode() { $code = ''; foreach ($this->constants as $name => $valueCode) { $code .= ' const ' . $name . ' = ' . $valueCode . ";\n\n"; } return $code; }
[ "protected", "function", "renderConstantsCode", "(", ")", "{", "$", "code", "=", "''", ";", "foreach", "(", "$", "this", "->", "constants", "as", "$", "name", "=>", "$", "valueCode", ")", "{", "$", "code", ".=", "' const '", ".", "$", "name", ".", ...
Renders code for the added class constants @return string
[ "Renders", "code", "for", "the", "added", "class", "constants" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L270-L277
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php
ProxyClass.renderPropertiesCode
protected function renderPropertiesCode() { $code = ''; foreach ($this->properties as $name => $attributes) { if (!empty($attributes['docComment'])) { $code .= ' ' . $attributes['docComment'] . "\n"; } $code .= ' ' . $attributes['visibility']...
php
protected function renderPropertiesCode() { $code = ''; foreach ($this->properties as $name => $attributes) { if (!empty($attributes['docComment'])) { $code .= ' ' . $attributes['docComment'] . "\n"; } $code .= ' ' . $attributes['visibility']...
[ "protected", "function", "renderPropertiesCode", "(", ")", "{", "$", "code", "=", "''", ";", "foreach", "(", "$", "this", "->", "properties", "as", "$", "name", "=>", "$", "attributes", ")", "{", "if", "(", "!", "empty", "(", "$", "attributes", "[", ...
Renders code for the added class properties @return string
[ "Renders", "code", "for", "the", "added", "class", "properties" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyClass.php#L284-L294
neos/flow-development-collection
Neos.Cache/Classes/Frontend/StringFrontend.php
StringFrontend.getByTag
public function getByTag(string $tag): array { if (!$this->backend instanceof TaggableBackendInterface) { throw new NotSupportedByBackendException('The backend must implement TaggableBackendInterface. Please choose a different cache backend or adjust the code using this cache.', 1483487409); ...
php
public function getByTag(string $tag): array { if (!$this->backend instanceof TaggableBackendInterface) { throw new NotSupportedByBackendException('The backend must implement TaggableBackendInterface. Please choose a different cache backend or adjust the code using this cache.', 1483487409); ...
[ "public", "function", "getByTag", "(", "string", "$", "tag", ")", ":", "array", "{", "if", "(", "!", "$", "this", "->", "backend", "instanceof", "TaggableBackendInterface", ")", "{", "throw", "new", "NotSupportedByBackendException", "(", "'The backend must impleme...
Finds and returns all cache entries which are tagged by the specified tag. @param string $tag The tag to search for @return array An array with the identifier (key) and content (value) of all matching entries. An empty array if no entries matched @throws NotSupportedByBackendException @throws \InvalidArgumentException...
[ "Finds", "and", "returns", "all", "cache", "entries", "which", "are", "tagged", "by", "the", "specified", "tag", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/StringFrontend.php#L81-L96
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.parseDatetimeWithCustomPattern
public function parseDatetimeWithCustomPattern($datetimeToParse, $format, I18n\Locale $locale, $strictMode = true) { return $this->doParsingWithParsedFormat($datetimeToParse, $this->datesReader->parseCustomFormat($format), $this->datesReader->getLocalizedLiteralsForLocale($locale), $strictMode); }
php
public function parseDatetimeWithCustomPattern($datetimeToParse, $format, I18n\Locale $locale, $strictMode = true) { return $this->doParsingWithParsedFormat($datetimeToParse, $this->datesReader->parseCustomFormat($format), $this->datesReader->getLocalizedLiteralsForLocale($locale), $strictMode); }
[ "public", "function", "parseDatetimeWithCustomPattern", "(", "$", "datetimeToParse", ",", "$", "format", ",", "I18n", "\\", "Locale", "$", "locale", ",", "$", "strictMode", "=", "true", ")", "{", "return", "$", "this", "->", "doParsingWithParsedFormat", "(", "...
Returns dateTime parsed by custom format (string provided in parameter). Format must obey syntax defined in CLDR specification, excluding unimplemented features (see documentation for DatesReader class). Format is remembered in cache and won't be parsed again for some time. @param string $datetimeToParse Date/time t...
[ "Returns", "dateTime", "parsed", "by", "custom", "format", "(", "string", "provided", "in", "parameter", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L71-L74
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.parseDate
public function parseDate($dateToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { DatesReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($dateToParse, $this->datesReader->parseFormatFromCldr($locale, DatesReader:...
php
public function parseDate($dateToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { DatesReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($dateToParse, $this->datesReader->parseFormatFromCldr($locale, DatesReader:...
[ "public", "function", "parseDate", "(", "$", "dateToParse", ",", "I18n", "\\", "Locale", "$", "locale", ",", "$", "formatLength", "=", "DatesReader", "::", "FORMAT_LENGTH_DEFAULT", ",", "$", "strictMode", "=", "true", ")", "{", "DatesReader", "::", "validateFo...
Parses date with format string for date defined in CLDR for particular locale. @param string $dateToParse date to be parsed @param I18n\Locale $locale @param string $formatLength One of: full, long, medium, short, or 'default' in order to use default length from CLDR @param boolean $strictMode Work mode (strict when t...
[ "Parses", "date", "with", "format", "string", "for", "date", "defined", "in", "CLDR", "for", "particular", "locale", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L87-L91
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.parseTime
public function parseTime($timeToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { DatesReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($timeToParse, $this->datesReader->parseFormatFromCldr($locale, DatesReader:...
php
public function parseTime($timeToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { DatesReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($timeToParse, $this->datesReader->parseFormatFromCldr($locale, DatesReader:...
[ "public", "function", "parseTime", "(", "$", "timeToParse", ",", "I18n", "\\", "Locale", "$", "locale", ",", "$", "formatLength", "=", "DatesReader", "::", "FORMAT_LENGTH_DEFAULT", ",", "$", "strictMode", "=", "true", ")", "{", "DatesReader", "::", "validateFo...
Parses time with format string for time defined in CLDR for particular locale. @param string $timeToParse Time to be parsed @param I18n\Locale $locale @param string $formatLength One of: full, long, medium, short, or 'default' in order to use default length from CLDR @param boolean $strictMode Work mode (strict when t...
[ "Parses", "time", "with", "format", "string", "for", "time", "defined", "in", "CLDR", "for", "particular", "locale", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L104-L108
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.parseDateAndTime
public function parseDateAndTime($dateAndTimeToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { DatesReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($dateAndTimeToParse, $this->datesReader->parseFormatFromCldr(...
php
public function parseDateAndTime($dateAndTimeToParse, I18n\Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { DatesReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($dateAndTimeToParse, $this->datesReader->parseFormatFromCldr(...
[ "public", "function", "parseDateAndTime", "(", "$", "dateAndTimeToParse", ",", "I18n", "\\", "Locale", "$", "locale", ",", "$", "formatLength", "=", "DatesReader", "::", "FORMAT_LENGTH_DEFAULT", ",", "$", "strictMode", "=", "true", ")", "{", "DatesReader", "::",...
Parses dateTime with format string for date and time defined in CLDR for particular locale. @param string $dateAndTimeToParse Date and time to be parsed @param I18n\Locale $locale @param string $formatLength One of: full, long, medium, short, or 'default' in order to use default length from CLDR @param boolean $strict...
[ "Parses", "dateTime", "with", "format", "string", "for", "date", "and", "time", "defined", "in", "CLDR", "for", "particular", "locale", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L120-L124
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.doParsingWithParsedFormat
protected function doParsingWithParsedFormat($datetimeToParse, array $parsedFormat, array $localizedLiterals, $strictMode) { return ($strictMode) ? $this->doParsingInStrictMode($datetimeToParse, $parsedFormat, $localizedLiterals) : $this->doParsingInLenientMode($datetimeToParse, $parsedFormat, $localizedLit...
php
protected function doParsingWithParsedFormat($datetimeToParse, array $parsedFormat, array $localizedLiterals, $strictMode) { return ($strictMode) ? $this->doParsingInStrictMode($datetimeToParse, $parsedFormat, $localizedLiterals) : $this->doParsingInLenientMode($datetimeToParse, $parsedFormat, $localizedLit...
[ "protected", "function", "doParsingWithParsedFormat", "(", "$", "datetimeToParse", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedLiterals", ",", "$", "strictMode", ")", "{", "return", "(", "$", "strictMode", ")", "?", "$", "this", "->", "doPa...
Parses date and / or time using parsed format, in strict or lenient mode. @param string $datetimeToParse Date/time to be parsed @param array $parsedFormat Parsed format (from DatesReader) @param array $localizedLiterals Array of date / time literals from CLDR @param boolean $strictMode Work mode (strict when true, len...
[ "Parses", "date", "and", "/", "or", "time", "using", "parsed", "format", "in", "strict", "or", "lenient", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L135-L138
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.doParsingInStrictMode
protected function doParsingInStrictMode($datetimeToParse, array $parsedFormat, array $localizedLiterals) { $datetimeElements = [ 'year' => null, 'month' => null, 'day' => null, 'hour' => null, 'minute' => null, 'second' => null, ...
php
protected function doParsingInStrictMode($datetimeToParse, array $parsedFormat, array $localizedLiterals) { $datetimeElements = [ 'year' => null, 'month' => null, 'day' => null, 'hour' => null, 'minute' => null, 'second' => null, ...
[ "protected", "function", "doParsingInStrictMode", "(", "$", "datetimeToParse", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedLiterals", ")", "{", "$", "datetimeElements", "=", "[", "'year'", "=>", "null", ",", "'month'", "=>", "null", ",", "'...
Parses date and / or time in strict mode. @param string $datetimeToParse Date/time to be parsed @param array $parsedFormat Format parsed by DatesReader @param array $localizedLiterals Array of date / time literals from CLDR @return array Array of parsed date and / or time elements, false on failure @throws InvalidArgu...
[ "Parses", "date", "and", "/", "or", "time", "in", "strict", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L150-L331
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.doParsingInLenientMode
protected function doParsingInLenientMode($datetimeToParse, array $parsedFormat, array $localizedLiterals) { $datetimeElements = [ 'year' => null, 'month' => null, 'day' => null, 'hour' => null, 'minute' => null, 'second' => null, ...
php
protected function doParsingInLenientMode($datetimeToParse, array $parsedFormat, array $localizedLiterals) { $datetimeElements = [ 'year' => null, 'month' => null, 'day' => null, 'hour' => null, 'minute' => null, 'second' => null, ...
[ "protected", "function", "doParsingInLenientMode", "(", "$", "datetimeToParse", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedLiterals", ")", "{", "$", "datetimeElements", "=", "[", "'year'", "=>", "null", ",", "'month'", "=>", "null", ",", "...
Parses date and / or time in lenient mode. Algorithm assumptions: - ignore all literals - order of elements in parsed format is important - length of subformat is not strictly checked (eg. 'h' and 'hh') - number must be in range in order to be accepted (eg. 1-12 for month) - some format fallback substitutions can be d...
[ "Parses", "date", "and", "/", "or", "time", "in", "lenient", "mode", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L351-L573
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.extractAndCheckNumber
protected function extractAndCheckNumber($datetimeToParse, $isTwoDigits, $minValue, $maxValue) { if ($isTwoDigits || is_numeric($datetimeToParse[1])) { $number = substr($datetimeToParse, 0, 2); } else { $number = $datetimeToParse[0]; } if (is_numeric($number)...
php
protected function extractAndCheckNumber($datetimeToParse, $isTwoDigits, $minValue, $maxValue) { if ($isTwoDigits || is_numeric($datetimeToParse[1])) { $number = substr($datetimeToParse, 0, 2); } else { $number = $datetimeToParse[0]; } if (is_numeric($number)...
[ "protected", "function", "extractAndCheckNumber", "(", "$", "datetimeToParse", ",", "$", "isTwoDigits", ",", "$", "minValue", ",", "$", "maxValue", ")", "{", "if", "(", "$", "isTwoDigits", "||", "is_numeric", "(", "$", "datetimeToParse", "[", "1", "]", ")", ...
Extracts one or two-digit number from the beginning of the string. If the number has certainly two digits, $isTwoDigits can be set to true so no additional checking is done (this implies from some date/time formats, like 'hh'). Number is also checked for constraints: minimum and maximum value. @param string $datetim...
[ "Extracts", "one", "or", "two", "-", "digit", "number", "from", "the", "beginning", "of", "the", "string", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L591-L608
neos/flow-development-collection
Neos.Flow/Classes/I18n/Parser/DatetimeParser.php
DatetimeParser.extractNumberAndGetPosition
protected function extractNumberAndGetPosition($datetimeToParse, &$position) { $characters = str_split($datetimeToParse); $number = ''; $numberStarted = false; foreach ($characters as $index => $character) { if (ord($character) >= 48 && ord($character) <= 57) { ...
php
protected function extractNumberAndGetPosition($datetimeToParse, &$position) { $characters = str_split($datetimeToParse); $number = ''; $numberStarted = false; foreach ($characters as $index => $character) { if (ord($character) >= 48 && ord($character) <= 57) { ...
[ "protected", "function", "extractNumberAndGetPosition", "(", "$", "datetimeToParse", ",", "&", "$", "position", ")", "{", "$", "characters", "=", "str_split", "(", "$", "datetimeToParse", ")", ";", "$", "number", "=", "''", ";", "$", "numberStarted", "=", "f...
Extracts and returns first integer number encountered in provided string. Searches for first digit and extracts all adjacent digits. Also returns position of first digit in string. @param string $datetimeToParse String to search number in @param int $position Index of first digit in string @return string Extracted nu...
[ "Extracts", "and", "returns", "first", "integer", "number", "encountered", "in", "provided", "string", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Parser/DatetimeParser.php#L621-L644
neos/flow-development-collection
Neos.Cache/Classes/Frontend/PhpFrontend.php
PhpFrontend.get
public function get(string $entryIdentifier) { if (!$this->isValidEntryIdentifier($entryIdentifier)) { throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752); } $code = $this->backend->get($entryIdentifier); i...
php
public function get(string $entryIdentifier) { if (!$this->isValidEntryIdentifier($entryIdentifier)) { throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752); } $code = $this->backend->get($entryIdentifier); i...
[ "public", "function", "get", "(", "string", "$", "entryIdentifier", ")", "{", "if", "(", "!", "$", "this", "->", "isValidEntryIdentifier", "(", "$", "entryIdentifier", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'\"'", ".", "$", ...
Finds and returns the original code from the cache. @param string $entryIdentifier Identifier of the cache entry to fetch @return string|bool The value @throws \InvalidArgumentException @api
[ "Finds", "and", "returns", "the", "original", "code", "from", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/PhpFrontend.php#L48-L62
neos/flow-development-collection
Neos.Cache/Classes/Frontend/PhpFrontend.php
PhpFrontend.getWrapped
public function getWrapped(string $entryIdentifier): string { if (!$this->isValidEntryIdentifier($entryIdentifier)) { throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752); } return $this->backend->get($entryIdentifi...
php
public function getWrapped(string $entryIdentifier): string { if (!$this->isValidEntryIdentifier($entryIdentifier)) { throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752); } return $this->backend->get($entryIdentifi...
[ "public", "function", "getWrapped", "(", "string", "$", "entryIdentifier", ")", ":", "string", "{", "if", "(", "!", "$", "this", "->", "isValidEntryIdentifier", "(", "$", "entryIdentifier", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", ...
Returns the code wrapped in php tags as written to the cache, ready to be included. @param string $entryIdentifier @return string @throws \InvalidArgumentException
[ "Returns", "the", "code", "wrapped", "in", "php", "tags", "as", "written", "to", "the", "cache", "ready", "to", "be", "included", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/PhpFrontend.php#L71-L78
neos/flow-development-collection
Neos.Cache/Classes/Frontend/PhpFrontend.php
PhpFrontend.set
public function set(string $entryIdentifier, $sourceCode, array $tags = [], int $lifetime = null) { if (!$this->isValidEntryIdentifier($entryIdentifier)) { throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1264023823); } if (...
php
public function set(string $entryIdentifier, $sourceCode, array $tags = [], int $lifetime = null) { if (!$this->isValidEntryIdentifier($entryIdentifier)) { throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1264023823); } if (...
[ "public", "function", "set", "(", "string", "$", "entryIdentifier", ",", "$", "sourceCode", ",", "array", "$", "tags", "=", "[", "]", ",", "int", "$", "lifetime", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "isValidEntryIdentifier", "(", ...
Saves the PHP source code in the cache. @param string $entryIdentifier An identifier used for this cache entry, for example the class name @param string $sourceCode PHP source code @param array $tags Tags to associate with this cache entry @param integer $lifetime Lifetime of this cache entry in seconds. If NULL is sp...
[ "Saves", "the", "PHP", "source", "code", "in", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/PhpFrontend.php#L93-L108
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/UniqueEntityValidator.php
UniqueEntityValidator.isValid
protected function isValid($value) { if (!is_object($value)) { throw new InvalidValidationOptionsException('The value supplied for the UniqueEntityValidator must be an object.', 1358454270); } $classSchema = $this->reflectionService->getClassSchema(TypeHandling::getTypeForValue(...
php
protected function isValid($value) { if (!is_object($value)) { throw new InvalidValidationOptionsException('The value supplied for the UniqueEntityValidator must be an object.', 1358454270); } $classSchema = $this->reflectionService->getClassSchema(TypeHandling::getTypeForValue(...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "!", "is_object", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidValidationOptionsException", "(", "'The value supplied for the UniqueEntityValidator must be an object.'", ",", "135...
Checks if the given value is a unique entity depending on it's identity properties or custom configured identity properties. @param mixed $value The value that should be validated @return void @throws InvalidValidationOptionsException @api
[ "Checks", "if", "the", "given", "value", "is", "a", "unique", "entity", "depending", "on", "it", "s", "identity", "properties", "or", "custom", "configured", "identity", "properties", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/UniqueEntityValidator.php#L57-L99
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/EntryPoint/HttpBasic.php
HttpBasic.startAuthentication
public function startAuthentication(Request $request, Response $response) { $response->setStatus(401); $response->setHeader('WWW-Authenticate', 'Basic realm="' . (isset($this->options['realm']) ? $this->options['realm'] : sha1(FLOW_PATH_ROOT)) . '"'); $response->setContent('Authorization req...
php
public function startAuthentication(Request $request, Response $response) { $response->setStatus(401); $response->setHeader('WWW-Authenticate', 'Basic realm="' . (isset($this->options['realm']) ? $this->options['realm'] : sha1(FLOW_PATH_ROOT)) . '"'); $response->setContent('Authorization req...
[ "public", "function", "startAuthentication", "(", "Request", "$", "request", ",", "Response", "$", "response", ")", "{", "$", "response", "->", "setStatus", "(", "401", ")", ";", "$", "response", "->", "setHeader", "(", "'WWW-Authenticate'", ",", "'Basic realm...
Starts the authentication: Send HTTP header @param Request $request The current request @param Response $response The current response @return void
[ "Starts", "the", "authentication", ":", "Send", "HTTP", "header" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/EntryPoint/HttpBasic.php#L29-L34
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.setLimit
public function setLimit($limit) { if ($limit < 1 || !is_int($limit)) { throw new \InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249); } $this->limit = $limit; return $this; }
php
public function setLimit($limit) { if ($limit < 1 || !is_int($limit)) { throw new \InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249); } $this->limit = $limit; return $this; }
[ "public", "function", "setLimit", "(", "$", "limit", ")", "{", "if", "(", "$", "limit", "<", "1", "||", "!", "is_int", "(", "$", "limit", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'setLimit() accepts only integers greater 0.'", "...
Sets the maximum size of the result set to limit. Returns $this to allow for chaining (fluid interface) @param integer $limit @return QueryInterface @throws \InvalidArgumentException @api
[ "Sets", "the", "maximum", "size", "of", "the", "result", "set", "to", "limit", ".", "Returns", "$this", "to", "allow", "for", "chaining", "(", "fluid", "interface", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L192-L200
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.logicalAnd
public function logicalAnd($constraint1) { if (is_array($constraint1)) { $resultingConstraint = array_shift($constraint1); $constraints = $constraint1; } else { $constraints = func_get_args(); $resultingConstraint = array_shift($constraints); }...
php
public function logicalAnd($constraint1) { if (is_array($constraint1)) { $resultingConstraint = array_shift($constraint1); $constraints = $constraint1; } else { $constraints = func_get_args(); $resultingConstraint = array_shift($constraints); }...
[ "public", "function", "logicalAnd", "(", "$", "constraint1", ")", "{", "if", "(", "is_array", "(", "$", "constraint1", ")", ")", "{", "$", "resultingConstraint", "=", "array_shift", "(", "$", "constraint1", ")", ";", "$", "constraints", "=", "$", "constrai...
Performs a logical conjunction of the two given constraints. The method takes one or more contraints and concatenates them with a boolean AND. It also accepts a single array of constraints to be concatenated. @param mixed $constraint1 The first of multiple constraints or an array of constraints. @return Qom\LogicalAnd...
[ "Performs", "a", "logical", "conjunction", "of", "the", "two", "given", "constraints", ".", "The", "method", "takes", "one", "or", "more", "contraints", "and", "concatenates", "them", "with", "a", "boolean", "AND", ".", "It", "also", "accepts", "a", "single"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L302-L320
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.logicalOr
public function logicalOr($constraint1) { if (is_array($constraint1)) { $resultingConstraint = array_shift($constraint1); $constraints = $constraint1; } else { $constraints = func_get_args(); $resultingConstraint = array_shift($constraints); } ...
php
public function logicalOr($constraint1) { if (is_array($constraint1)) { $resultingConstraint = array_shift($constraint1); $constraints = $constraint1; } else { $constraints = func_get_args(); $resultingConstraint = array_shift($constraints); } ...
[ "public", "function", "logicalOr", "(", "$", "constraint1", ")", "{", "if", "(", "is_array", "(", "$", "constraint1", ")", ")", "{", "$", "resultingConstraint", "=", "array_shift", "(", "$", "constraint1", ")", ";", "$", "constraints", "=", "$", "constrain...
Performs a logical disjunction of the two given constraints. The method takes one or more constraints and concatenates them with a boolean OR. It also accepts a single array of constraints to be concatenated. @param object $constraint1 The first of multiple constraints or an array of constraints. @return Qom\LogicalOr...
[ "Performs", "a", "logical", "disjunction", "of", "the", "two", "given", "constraints", ".", "The", "method", "takes", "one", "or", "more", "constraints", "and", "concatenates", "them", "with", "a", "boolean", "OR", ".", "It", "also", "accepts", "a", "single"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L332-L350
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.equals
public function equals($propertyName, $operand, $caseSensitive = true) { if ($operand === null) { $comparison = $this->qomFactory->comparison( $this->qomFactory->propertyValue($propertyName, '_entity'), QueryInterface::OPERATOR_IS_NULL ); } els...
php
public function equals($propertyName, $operand, $caseSensitive = true) { if ($operand === null) { $comparison = $this->qomFactory->comparison( $this->qomFactory->propertyValue($propertyName, '_entity'), QueryInterface::OPERATOR_IS_NULL ); } els...
[ "public", "function", "equals", "(", "$", "propertyName", ",", "$", "operand", ",", "$", "caseSensitive", "=", "true", ")", "{", "if", "(", "$", "operand", "===", "null", ")", "{", "$", "comparison", "=", "$", "this", "->", "qomFactory", "->", "compari...
Returns an equals criterion used for matching objects against a query. It matches if the $operand equals the value of the property named $propertyName. If $operand is NULL a strict check for NULL is done. For strings the comparison can be done with or without case-sensitivity. @param string $propertyName The name of ...
[ "Returns", "an", "equals", "criterion", "used", "for", "matching", "objects", "against", "a", "query", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L378-L402
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.like
public function like($propertyName, $operand, $caseSensitive = true) { if (!is_string($operand)) { throw new InvalidQueryException('Operand must be a string, was ' . gettype($operand), 1276781107); } if ($caseSensitive) { $comparison = $this->qomFactory->comparison( ...
php
public function like($propertyName, $operand, $caseSensitive = true) { if (!is_string($operand)) { throw new InvalidQueryException('Operand must be a string, was ' . gettype($operand), 1276781107); } if ($caseSensitive) { $comparison = $this->qomFactory->comparison( ...
[ "public", "function", "like", "(", "$", "propertyName", ",", "$", "operand", ",", "$", "caseSensitive", "=", "true", ")", "{", "if", "(", "!", "is_string", "(", "$", "operand", ")", ")", "{", "throw", "new", "InvalidQueryException", "(", "'Operand must be ...
Returns a like criterion used for matching objects against a query. Matches if the property named $propertyName is like the $operand, using standard SQL wildcards. @param string $propertyName The name of the property to compare against @param string $operand The value to compare with @param boolean $caseSensitive Whet...
[ "Returns", "a", "like", "criterion", "used", "for", "matching", "objects", "against", "a", "query", ".", "Matches", "if", "the", "property", "named", "$propertyName", "is", "like", "the", "$operand", "using", "standard", "SQL", "wildcards", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L416-L438
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.contains
public function contains($propertyName, $operand) { if (!$this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must be multi-valued', 1276781026); } return $this->qomFactory->comparison( $this->qo...
php
public function contains($propertyName, $operand) { if (!$this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must be multi-valued', 1276781026); } return $this->qomFactory->comparison( $this->qo...
[ "public", "function", "contains", "(", "$", "propertyName", ",", "$", "operand", ")", "{", "if", "(", "!", "$", "this", "->", "classSchema", "->", "isMultiValuedProperty", "(", "$", "propertyName", ")", ")", "{", "throw", "new", "InvalidQueryException", "(",...
Returns a "contains" criterion used for matching objects against a query. It matches if the multivalued property contains the given operand. If NULL is given as $operand, there will never be a match! @param string $propertyName The name of the multivalued property to compare against @param mixed $operand The value to...
[ "Returns", "a", "contains", "criterion", "used", "for", "matching", "objects", "against", "a", "query", ".", "It", "matches", "if", "the", "multivalued", "property", "contains", "the", "given", "operand", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L452-L462
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.isEmpty
public function isEmpty($propertyName) { if (!$this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must be multi-valued', 1276853547); } return $this->qomFactory->comparison( $this->qomFactory->p...
php
public function isEmpty($propertyName) { if (!$this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must be multi-valued', 1276853547); } return $this->qomFactory->comparison( $this->qomFactory->p...
[ "public", "function", "isEmpty", "(", "$", "propertyName", ")", "{", "if", "(", "!", "$", "this", "->", "classSchema", "->", "isMultiValuedProperty", "(", "$", "propertyName", ")", ")", "{", "throw", "new", "InvalidQueryException", "(", "'Property \"'", ".", ...
Returns an "isEmpty" criterion used for matching objects against a query. It matches if the multivalued property contains no values or is NULL. @param string $propertyName The name of the multivalued property to check @return boolean @throws InvalidQueryException if used on a single-valued property @api
[ "Returns", "an", "isEmpty", "criterion", "used", "for", "matching", "objects", "against", "a", "query", ".", "It", "matches", "if", "the", "multivalued", "property", "contains", "no", "values", "or", "is", "NULL", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L473-L482
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.in
public function in($propertyName, $operand) { if (!is_array($operand) && (!$operand instanceof \ArrayAccess) && (!$operand instanceof \Traversable)) { throw new InvalidQueryException('The "in" constraint must be given a multi-valued operand (array, ArrayAccess, Traversable).', 1264678095); ...
php
public function in($propertyName, $operand) { if (!is_array($operand) && (!$operand instanceof \ArrayAccess) && (!$operand instanceof \Traversable)) { throw new InvalidQueryException('The "in" constraint must be given a multi-valued operand (array, ArrayAccess, Traversable).', 1264678095); ...
[ "public", "function", "in", "(", "$", "propertyName", ",", "$", "operand", ")", "{", "if", "(", "!", "is_array", "(", "$", "operand", ")", "&&", "(", "!", "$", "operand", "instanceof", "\\", "ArrayAccess", ")", "&&", "(", "!", "$", "operand", "instan...
Returns an "in" criterion used for matching objects against a query. It matches if the property's value is contained in the multivalued operand. @param string $propertyName The name of the property to compare against @param mixed $operand The value to compare with, multivalued @return Qom\Comparison @throws InvalidQue...
[ "Returns", "an", "in", "criterion", "used", "for", "matching", "objects", "against", "a", "query", ".", "It", "matches", "if", "the", "property", "s", "value", "is", "contained", "in", "the", "multivalued", "operand", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L494-L508
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.lessThan
public function lessThan($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276784963); } if (!($operand instanceof \DateTimeInterface) && !TypeHa...
php
public function lessThan($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276784963); } if (!($operand instanceof \DateTimeInterface) && !TypeHa...
[ "public", "function", "lessThan", "(", "$", "propertyName", ",", "$", "operand", ")", "{", "if", "(", "$", "this", "->", "classSchema", "->", "isMultiValuedProperty", "(", "$", "propertyName", ")", ")", "{", "throw", "new", "InvalidQueryException", "(", "'Pr...
Returns a less than criterion used for matching objects against a query @param string $propertyName The name of the property to compare against @param mixed $operand The value to compare with @return Qom\Comparison @throws InvalidQueryException if used on a multi-valued property or with a non-literal/non-DateTime oper...
[ "Returns", "a", "less", "than", "criterion", "used", "for", "matching", "objects", "against", "a", "query" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L519-L533
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.lessThanOrEqual
public function lessThanOrEqual($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276784943); } if (!($operand instanceof \DateTimeInterface) && ...
php
public function lessThanOrEqual($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276784943); } if (!($operand instanceof \DateTimeInterface) && ...
[ "public", "function", "lessThanOrEqual", "(", "$", "propertyName", ",", "$", "operand", ")", "{", "if", "(", "$", "this", "->", "classSchema", "->", "isMultiValuedProperty", "(", "$", "propertyName", ")", ")", "{", "throw", "new", "InvalidQueryException", "(",...
Returns a less or equal than criterion used for matching objects against a query @param string $propertyName The name of the property to compare against @param mixed $operand The value to compare with @return Qom\Comparison @throws InvalidQueryException if used on a multi-valued property or with a non-literal/non-Date...
[ "Returns", "a", "less", "or", "equal", "than", "criterion", "used", "for", "matching", "objects", "against", "a", "query" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L544-L558
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.greaterThan
public function greaterThan($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276774885); } if (!($operand instanceof \DateTimeInterface) && !Typ...
php
public function greaterThan($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276774885); } if (!($operand instanceof \DateTimeInterface) && !Typ...
[ "public", "function", "greaterThan", "(", "$", "propertyName", ",", "$", "operand", ")", "{", "if", "(", "$", "this", "->", "classSchema", "->", "isMultiValuedProperty", "(", "$", "propertyName", ")", ")", "{", "throw", "new", "InvalidQueryException", "(", "...
Returns a greater than criterion used for matching objects against a query @param string $propertyName The name of the property to compare against @param mixed $operand The value to compare with @return Qom\Comparison @throws InvalidQueryException if used on a multi-valued property or with a non-literal/non-DateTime o...
[ "Returns", "a", "greater", "than", "criterion", "used", "for", "matching", "objects", "against", "a", "query" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L569-L583
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Query.php
Query.greaterThanOrEqual
public function greaterThanOrEqual($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276774883); } if (!($operand instanceof \DateTimeInterface) ...
php
public function greaterThanOrEqual($propertyName, $operand) { if ($this->classSchema->isMultiValuedProperty($propertyName)) { throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued', 1276774883); } if (!($operand instanceof \DateTimeInterface) ...
[ "public", "function", "greaterThanOrEqual", "(", "$", "propertyName", ",", "$", "operand", ")", "{", "if", "(", "$", "this", "->", "classSchema", "->", "isMultiValuedProperty", "(", "$", "propertyName", ")", ")", "{", "throw", "new", "InvalidQueryException", "...
Returns a greater than or equal criterion used for matching objects against a query @param string $propertyName The name of the property to compare against @param mixed $operand The value to compare with @return Qom\Comparison @throws InvalidQueryException if used on a multi-valued property or with a non-literal/non-D...
[ "Returns", "a", "greater", "than", "or", "equal", "criterion", "used", "for", "matching", "objects", "against", "a", "query" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Query.php#L594-L608
neos/flow-development-collection
Neos.Flow/Classes/Mvc/RequestMatcher.php
RequestMatcher.matchRequestProperty
protected function matchRequestProperty($propertyName, $expectedValue, $weight) { if ($this->request === null) { return false; } $value = ObjectAccess::getProperty($this->request, $propertyName); if ($value === $expectedValue) { $this->addWeight($weight); ...
php
protected function matchRequestProperty($propertyName, $expectedValue, $weight) { if ($this->request === null) { return false; } $value = ObjectAccess::getProperty($this->request, $propertyName); if ($value === $expectedValue) { $this->addWeight($weight); ...
[ "protected", "function", "matchRequestProperty", "(", "$", "propertyName", ",", "$", "expectedValue", ",", "$", "weight", ")", "{", "if", "(", "$", "this", "->", "request", "===", "null", ")", "{", "return", "false", ";", "}", "$", "value", "=", "ObjectA...
Compare a request propertyValue against an expected value and add the weight if it's true @param string $propertyName @param string $expectedValue @param integer $weight @return boolean
[ "Compare", "a", "request", "propertyValue", "against", "an", "expected", "value", "and", "add", "the", "weight", "if", "it", "s", "true" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/RequestMatcher.php#L139-L152
neos/flow-development-collection
Neos.Flow/Classes/Mvc/RequestMatcher.php
RequestMatcher.getParentRequest
public function getParentRequest() { if ($this->request === null || $this->request->isMainRequest()) { return new RequestMatcher(); } $this->addWeight(1000000); return new RequestMatcher($this->request->getParentRequest(), $this); }
php
public function getParentRequest() { if ($this->request === null || $this->request->isMainRequest()) { return new RequestMatcher(); } $this->addWeight(1000000); return new RequestMatcher($this->request->getParentRequest(), $this); }
[ "public", "function", "getParentRequest", "(", ")", "{", "if", "(", "$", "this", "->", "request", "===", "null", "||", "$", "this", "->", "request", "->", "isMainRequest", "(", ")", ")", "{", "return", "new", "RequestMatcher", "(", ")", ";", "}", "$", ...
Get a new RequestMatcher for the Request's ParentRequest @return RequestMatcher @api
[ "Get", "a", "new", "RequestMatcher", "for", "the", "Request", "s", "ParentRequest" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/RequestMatcher.php#L160-L167
neos/flow-development-collection
Neos.Flow/Classes/Mvc/RequestMatcher.php
RequestMatcher.addWeight
public function addWeight($weight) { $this->weight += $weight; if ($this->parentMatcher !== null) { $this->parentMatcher->addWeight($weight); } }
php
public function addWeight($weight) { $this->weight += $weight; if ($this->parentMatcher !== null) { $this->parentMatcher->addWeight($weight); } }
[ "public", "function", "addWeight", "(", "$", "weight", ")", "{", "$", "this", "->", "weight", "+=", "$", "weight", ";", "if", "(", "$", "this", "->", "parentMatcher", "!==", "null", ")", "{", "$", "this", "->", "parentMatcher", "->", "addWeight", "(", ...
Add a weight to the total @param integer $weight @return void
[ "Add", "a", "weight", "to", "the", "total" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/RequestMatcher.php#L197-L203
neos/flow-development-collection
Neos.Eel/Classes/Helper/ArrayHelper.php
ArrayHelper.concat
public function concat($array1, $array2, $array_ = null): array { $arguments = func_get_args(); foreach ($arguments as &$argument) { if (!is_array($argument)) { $argument = [$argument]; } } return call_user_func_array('array_merge', $arguments)...
php
public function concat($array1, $array2, $array_ = null): array { $arguments = func_get_args(); foreach ($arguments as &$argument) { if (!is_array($argument)) { $argument = [$argument]; } } return call_user_func_array('array_merge', $arguments)...
[ "public", "function", "concat", "(", "$", "array1", ",", "$", "array2", ",", "$", "array_", "=", "null", ")", ":", "array", "{", "$", "arguments", "=", "func_get_args", "(", ")", ";", "foreach", "(", "$", "arguments", "as", "&", "$", "argument", ")",...
Concatenate arrays or values to a new array @param array|mixed $array1 First array or value @param array|mixed $array2 Second array or value @param array|mixed $array_ Optional variable list of additional arrays / values @return array The array with concatenated arrays or values
[ "Concatenate", "arrays", "or", "values", "to", "a", "new", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/ArrayHelper.php#L38-L47
neos/flow-development-collection
Neos.Eel/Classes/Helper/ArrayHelper.php
ArrayHelper.slice
public function slice(array $array, $begin, $end = null): array { if ($end === null) { $end = count($array); } elseif ($end < 0) { $end = count($array) + $end; } $length = $end - $begin; return array_slice($array, $begin, $length); }
php
public function slice(array $array, $begin, $end = null): array { if ($end === null) { $end = count($array); } elseif ($end < 0) { $end = count($array) + $end; } $length = $end - $begin; return array_slice($array, $begin, $length); }
[ "public", "function", "slice", "(", "array", "$", "array", ",", "$", "begin", ",", "$", "end", "=", "null", ")", ":", "array", "{", "if", "(", "$", "end", "===", "null", ")", "{", "$", "end", "=", "count", "(", "$", "array", ")", ";", "}", "e...
Extract a portion of an indexed array @param array $array The array (with numeric indices) @param int $begin @param int $end @return array
[ "Extract", "a", "portion", "of", "an", "indexed", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/ArrayHelper.php#L69-L78
neos/flow-development-collection
Neos.Eel/Classes/Helper/ArrayHelper.php
ArrayHelper.indexOf
public function indexOf(array $array, $searchElement, $fromIndex = null): int { if ($fromIndex !== null) { $array = array_slice($array, $fromIndex, null, true); } $result = array_search($searchElement, $array, true); if ($result === false) { return -1; ...
php
public function indexOf(array $array, $searchElement, $fromIndex = null): int { if ($fromIndex !== null) { $array = array_slice($array, $fromIndex, null, true); } $result = array_search($searchElement, $array, true); if ($result === false) { return -1; ...
[ "public", "function", "indexOf", "(", "array", "$", "array", ",", "$", "searchElement", ",", "$", "fromIndex", "=", "null", ")", ":", "int", "{", "if", "(", "$", "fromIndex", "!==", "null", ")", "{", "$", "array", "=", "array_slice", "(", "$", "array...
Returns the first index at which a given element can be found in the array, or -1 if it is not present @param array $array The array @param mixed $searchElement The element value to find @param int $fromIndex Position in the array to start the search. @return int
[ "Returns", "the", "first", "index", "at", "which", "a", "given", "element", "can", "be", "found", "in", "the", "array", "or", "-", "1", "if", "it", "is", "not", "present" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/ArrayHelper.php#L155-L165
neos/flow-development-collection
Neos.Eel/Classes/Helper/ArrayHelper.php
ArrayHelper.sort
public function sort(array $array): array { if ($array === []) { return $array; } natsort($array); $i = 0; $newArray = []; foreach ($array as $key => $value) { if (is_string($key)) { $newArray[$key] = $value; } else ...
php
public function sort(array $array): array { if ($array === []) { return $array; } natsort($array); $i = 0; $newArray = []; foreach ($array as $key => $value) { if (is_string($key)) { $newArray[$key] = $value; } else ...
[ "public", "function", "sort", "(", "array", "$", "array", ")", ":", "array", "{", "if", "(", "$", "array", "===", "[", "]", ")", "{", "return", "$", "array", ";", "}", "natsort", "(", "$", "array", ")", ";", "$", "i", "=", "0", ";", "$", "new...
Sorts an array The sorting is done first by numbers, then by characters. Internally natsort() is used as it most closely resembles javascript's sort(). Because there are no real associative arrays in Javascript, keys of the array will be preserved. @param array $array @return array The sorted array
[ "Sorts", "an", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/ArrayHelper.php#L193-L210
neos/flow-development-collection
Neos.Eel/Classes/Helper/ArrayHelper.php
ArrayHelper.shuffle
public function shuffle(array $array, $preserveKeys = true): array { if ($array === []) { return $array; } if ($preserveKeys) { $keys = array_keys($array); shuffle($keys); $shuffledArray = []; foreach ($keys as $key) { ...
php
public function shuffle(array $array, $preserveKeys = true): array { if ($array === []) { return $array; } if ($preserveKeys) { $keys = array_keys($array); shuffle($keys); $shuffledArray = []; foreach ($keys as $key) { ...
[ "public", "function", "shuffle", "(", "array", "$", "array", ",", "$", "preserveKeys", "=", "true", ")", ":", "array", "{", "if", "(", "$", "array", "===", "[", "]", ")", "{", "return", "$", "array", ";", "}", "if", "(", "$", "preserveKeys", ")", ...
Shuffle an array Randomizes entries an array with the option to preserve the existing keys. When this option is set to false, all keys will be replaced @param array $array @param bool $preserveKeys Wether to preserve the keys when shuffling the array @return array The shuffled array
[ "Shuffle", "an", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/ArrayHelper.php#L222-L239