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.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.getOptionValueScalar
protected function getOptionValueScalar($valueElement) { if (is_object($valueElement)) { if ($this->hasArgument('optionValueField')) { return ObjectAccess::getPropertyPath($valueElement, $this->arguments['optionValueField']); } elseif ($this->persistenceManager->getId...
php
protected function getOptionValueScalar($valueElement) { if (is_object($valueElement)) { if ($this->hasArgument('optionValueField')) { return ObjectAccess::getPropertyPath($valueElement, $this->arguments['optionValueField']); } elseif ($this->persistenceManager->getId...
[ "protected", "function", "getOptionValueScalar", "(", "$", "valueElement", ")", "{", "if", "(", "is_object", "(", "$", "valueElement", ")", ")", "{", "if", "(", "$", "this", "->", "hasArgument", "(", "'optionValueField'", ")", ")", "{", "return", "ObjectAcce...
Get the option value for an object @param mixed $valueElement @return string
[ "Get", "the", "option", "value", "for", "an", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L330-L343
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.renderOptionTag
protected function renderOptionTag($value, $label) { $output = '<option value="' . htmlspecialchars($value) . '"'; if ($this->isSelected($value)) { $output .= ' selected="selected"'; } $output .= '>' . htmlspecialchars($label) . '</option>'; return $output; ...
php
protected function renderOptionTag($value, $label) { $output = '<option value="' . htmlspecialchars($value) . '"'; if ($this->isSelected($value)) { $output .= ' selected="selected"'; } $output .= '>' . htmlspecialchars($label) . '</option>'; return $output; ...
[ "protected", "function", "renderOptionTag", "(", "$", "value", ",", "$", "label", ")", "{", "$", "output", "=", "'<option value=\"'", ".", "htmlspecialchars", "(", "$", "value", ")", ".", "'\"'", ";", "if", "(", "$", "this", "->", "isSelected", "(", "$",...
Render one option tag @param string $value value attribute of the option tag (will be escaped) @param string $label content of the option tag (will be escaped) @return string the rendered option tag
[ "Render", "one", "option", "tag" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L352-L362
neos/flow-development-collection
Neos.Flow/Classes/Log/Utility/LogEnvironment.php
LogEnvironment.fromMethodName
public static function fromMethodName(string $methodName): array { if (strpos($methodName, '::') > 0) { list($className, $functionName) = explode('::', $methodName); } elseif (substr($methodName, -9, 9) === '{closure}') { $className = substr($methodName, 0, -9); $...
php
public static function fromMethodName(string $methodName): array { if (strpos($methodName, '::') > 0) { list($className, $functionName) = explode('::', $methodName); } elseif (substr($methodName, -9, 9) === '{closure}') { $className = substr($methodName, 0, -9); $...
[ "public", "static", "function", "fromMethodName", "(", "string", "$", "methodName", ")", ":", "array", "{", "if", "(", "strpos", "(", "$", "methodName", ",", "'::'", ")", ">", "0", ")", "{", "list", "(", "$", "className", ",", "$", "functionName", ")",...
Returns an array containing the log environment variables under the key FLOW_LOG_ENVIRONMENT to be set as part of the additional data in an log method call. @param string $methodName @return array
[ "Returns", "an", "array", "containing", "the", "log", "environment", "variables", "under", "the", "key", "FLOW_LOG_ENVIRONMENT", "to", "be", "set", "as", "part", "of", "the", "additional", "data", "in", "an", "log", "method", "call", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/Utility/LogEnvironment.php#L39-L55
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.freeze
public function freeze() { if ($this->frozen === true) { throw new \RuntimeException(sprintf('The cache "%s" is already frozen.', $this->cacheIdentifier), 1323353176); } $cacheEntryFileExtensionLength = strlen($this->cacheEntryFileExtension); for ($directoryIterator = n...
php
public function freeze() { if ($this->frozen === true) { throw new \RuntimeException(sprintf('The cache "%s" is already frozen.', $this->cacheIdentifier), 1323353176); } $cacheEntryFileExtensionLength = strlen($this->cacheEntryFileExtension); for ($directoryIterator = n...
[ "public", "function", "freeze", "(", ")", "{", "if", "(", "$", "this", "->", "frozen", "===", "true", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'The cache \"%s\" is already frozen.'", ",", "$", "this", "->", "cacheIdentifier", ...
Freezes this cache backend. All data in a frozen backend remains unchanged and methods which try to add or modify data result in an exception thrown. Possible expiry times of individual cache entries are ignored. On the positive side, a frozen cache backend is much faster on read access. A frozen backend can only be ...
[ "Freezes", "this", "cache", "backend", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L63-L95
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.setCache
public function setCache(FrontendInterface $cache) { parent::setCache($cache); if (is_file($this->cacheDirectory . 'FrozenCache.data')) { $this->frozen = true; $cachePathAndFileName = $this->cacheDirectory . 'FrozenCache.data'; $data = $this->readCacheFile($cache...
php
public function setCache(FrontendInterface $cache) { parent::setCache($cache); if (is_file($this->cacheDirectory . 'FrozenCache.data')) { $this->frozen = true; $cachePathAndFileName = $this->cacheDirectory . 'FrozenCache.data'; $data = $this->readCacheFile($cache...
[ "public", "function", "setCache", "(", "FrontendInterface", "$", "cache", ")", "{", "parent", "::", "setCache", "(", "$", "cache", ")", ";", "if", "(", "is_file", "(", "$", "this", "->", "cacheDirectory", ".", "'FrozenCache.data'", ")", ")", "{", "$", "t...
Sets a reference to the cache frontend which uses this backend and initializes the default cache directory. This method also detects if this backend is frozen and sets the internal flag accordingly. @param FrontendInterface $cache The cache frontend @return void @throws Exception
[ "Sets", "a", "reference", "to", "the", "cache", "frontend", "which", "uses", "this", "backend", "and", "initializes", "the", "default", "cache", "directory", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L118-L132
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.set
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073032); } if ($e...
php
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073032); } if ($e...
[ "public", "function", "set", "(", "string", "$", "entryIdentifier", ",", "string", "$", "data", ",", "array", "$", "tags", "=", "[", "]", ",", "int", "$", "lifetime", "=", "null", ")", "{", "if", "(", "$", "entryIdentifier", "!==", "basename", "(", "...
Saves data in a cache file. @param string $entryIdentifier An identifier for this specific cache entry @param string $data The data to be stored @param array $tags Tags to associate with this cache entry @param integer $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is use...
[ "Saves", "data", "in", "a", "cache", "file", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L147-L174
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.has
public function has(string $entryIdentifier): bool { if ($this->frozen === true) { return isset($this->cacheEntryIdentifiers[$entryIdentifier]); } if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifie...
php
public function has(string $entryIdentifier): bool { if ($this->frozen === true) { return isset($this->cacheEntryIdentifiers[$entryIdentifier]); } if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifie...
[ "public", "function", "has", "(", "string", "$", "entryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "frozen", "===", "true", ")", "{", "return", "isset", "(", "$", "this", "->", "cacheEntryIdentifiers", "[", "$", "entryIdentifier", "...
Checks if a cache entry with the specified identifier exists. @param string $entryIdentifier @return boolean true if such an entry exists, false if not @throws \InvalidArgumentException @api
[ "Checks", "if", "a", "cache", "entry", "with", "the", "specified", "identifier", "exists", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L197-L206
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.remove
public function remove(string $entryIdentifier): bool { if ($this->frozen === true) { throw new \RuntimeException(sprintf('Cannot remove cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344193); } return parent::remove($entryIdentifier); ...
php
public function remove(string $entryIdentifier): bool { if ($this->frozen === true) { throw new \RuntimeException(sprintf('Cannot remove cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344193); } return parent::remove($entryIdentifier); ...
[ "public", "function", "remove", "(", "string", "$", "entryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "frozen", "===", "true", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'Cannot remove cache entry because th...
Removes all cache entries matching the specified identifier. Usually this only affects one entry. @param string $entryIdentifier Specifies the cache entry to remove @return boolean true if (at least) an entry could be removed or false if no entry was found @throws \RuntimeException @throws \InvalidArgumentException @a...
[ "Removes", "all", "cache", "entries", "matching", "the", "specified", "identifier", ".", "Usually", "this", "only", "affects", "one", "entry", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L218-L225
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.findIdentifiersByTag
public function findIdentifiersByTag(string $searchedTag): array { $entryIdentifiers = []; $now = $_SERVER['REQUEST_TIME']; $cacheEntryFileExtensionLength = strlen($this->cacheEntryFileExtension); for ($directoryIterator = new \DirectoryIterator($this->cacheDirectory); $directoryIter...
php
public function findIdentifiersByTag(string $searchedTag): array { $entryIdentifiers = []; $now = $_SERVER['REQUEST_TIME']; $cacheEntryFileExtensionLength = strlen($this->cacheEntryFileExtension); for ($directoryIterator = new \DirectoryIterator($this->cacheDirectory); $directoryIter...
[ "public", "function", "findIdentifiersByTag", "(", "string", "$", "searchedTag", ")", ":", "array", "{", "$", "entryIdentifiers", "=", "[", "]", ";", "$", "now", "=", "$", "_SERVER", "[", "'REQUEST_TIME'", "]", ";", "$", "cacheEntryFileExtensionLength", "=", ...
Finds and returns all cache entry identifiers which are tagged by the specified tag. @param string $searchedTag The tag to search for @return array An array with identifiers of all matching entries. An empty array if no entries matched @api
[ "Finds", "and", "returns", "all", "cache", "entry", "identifiers", "which", "are", "tagged", "by", "the", "specified", "tag", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L235-L264
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.flush
public function flush() { Files::emptyDirectoryRecursively($this->cacheDirectory); if ($this->frozen === true) { @unlink($this->cacheDirectory . 'FrozenCache.data'); $this->frozen = false; } }
php
public function flush() { Files::emptyDirectoryRecursively($this->cacheDirectory); if ($this->frozen === true) { @unlink($this->cacheDirectory . 'FrozenCache.data'); $this->frozen = false; } }
[ "public", "function", "flush", "(", ")", "{", "Files", "::", "emptyDirectoryRecursively", "(", "$", "this", "->", "cacheDirectory", ")", ";", "if", "(", "$", "this", "->", "frozen", "===", "true", ")", "{", "@", "unlink", "(", "$", "this", "->", "cache...
Removes all cache entries of this cache and sets the frozen flag to false. @return void @api @throws \Neos\Utility\Exception\FilesException
[ "Removes", "all", "cache", "entries", "of", "this", "cache", "and", "sets", "the", "frozen", "flag", "to", "false", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L273-L280
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.flushByTag
public function flushByTag(string $tag): int { $identifiers = $this->findIdentifiersByTag($tag); if (count($identifiers) === 0) { return 0; } foreach ($identifiers as $entryIdentifier) { $this->remove($entryIdentifier); } return count($identif...
php
public function flushByTag(string $tag): int { $identifiers = $this->findIdentifiersByTag($tag); if (count($identifiers) === 0) { return 0; } foreach ($identifiers as $entryIdentifier) { $this->remove($entryIdentifier); } return count($identif...
[ "public", "function", "flushByTag", "(", "string", "$", "tag", ")", ":", "int", "{", "$", "identifiers", "=", "$", "this", "->", "findIdentifiersByTag", "(", "$", "tag", ")", ";", "if", "(", "count", "(", "$", "identifiers", ")", "===", "0", ")", "{"...
Removes all cache entries of this cache which are tagged by the specified tag. @param string $tag The tag the entries must have @return integer The number of entries which have been affected by this flush @api
[ "Removes", "all", "cache", "entries", "of", "this", "cache", "which", "are", "tagged", "by", "the", "specified", "tag", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L289-L300
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.isCacheFileExpired
protected function isCacheFileExpired(string $cacheEntryPathAndFilename, bool $acquireLock = true): bool { if (is_file($cacheEntryPathAndFilename) === false) { return true; } $expiryTimeOffset = filesize($cacheEntryPathAndFilename) - self::DATASIZE_DIGITS - self::EXPIRYTIME_LENG...
php
protected function isCacheFileExpired(string $cacheEntryPathAndFilename, bool $acquireLock = true): bool { if (is_file($cacheEntryPathAndFilename) === false) { return true; } $expiryTimeOffset = filesize($cacheEntryPathAndFilename) - self::DATASIZE_DIGITS - self::EXPIRYTIME_LENG...
[ "protected", "function", "isCacheFileExpired", "(", "string", "$", "cacheEntryPathAndFilename", ",", "bool", "$", "acquireLock", "=", "true", ")", ":", "bool", "{", "if", "(", "is_file", "(", "$", "cacheEntryPathAndFilename", ")", "===", "false", ")", "{", "re...
Checks if the given cache entry files are still valid or if their lifetime has exceeded. @param string $cacheEntryPathAndFilename @param boolean $acquireLock @return boolean @api
[ "Checks", "if", "the", "given", "cache", "entry", "files", "are", "still", "valid", "or", "if", "their", "lifetime", "has", "exceeded", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L311-L325
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.collectGarbage
public function collectGarbage() { if ($this->frozen === true) { return; } for ($directoryIterator = new \DirectoryIterator($this->cacheDirectory); $directoryIterator->valid(); $directoryIterator->next()) { if ($directoryIterator->isDot()) { continue;...
php
public function collectGarbage() { if ($this->frozen === true) { return; } for ($directoryIterator = new \DirectoryIterator($this->cacheDirectory); $directoryIterator->valid(); $directoryIterator->next()) { if ($directoryIterator->isDot()) { continue;...
[ "public", "function", "collectGarbage", "(", ")", "{", "if", "(", "$", "this", "->", "frozen", "===", "true", ")", "{", "return", ";", "}", "for", "(", "$", "directoryIterator", "=", "new", "\\", "DirectoryIterator", "(", "$", "this", "->", "cacheDirecto...
Does garbage collection @return void @api
[ "Does", "garbage", "collection" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L333-L348
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.findCacheFilesByIdentifier
protected function findCacheFilesByIdentifier(string $entryIdentifier) { $pattern = $this->cacheDirectory . $entryIdentifier; $filesFound = glob($pattern); if ($filesFound === false || count($filesFound) === 0) { return false; } return $filesFound; }
php
protected function findCacheFilesByIdentifier(string $entryIdentifier) { $pattern = $this->cacheDirectory . $entryIdentifier; $filesFound = glob($pattern); if ($filesFound === false || count($filesFound) === 0) { return false; } return $filesFound; }
[ "protected", "function", "findCacheFilesByIdentifier", "(", "string", "$", "entryIdentifier", ")", "{", "$", "pattern", "=", "$", "this", "->", "cacheDirectory", ".", "$", "entryIdentifier", ";", "$", "filesFound", "=", "glob", "(", "$", "pattern", ")", ";", ...
Tries to find the cache entry for the specified identifier. Usually only one cache entry should be found - if more than one exist, this is due to some error or crash. @param string $entryIdentifier The cache entry identifier @return mixed The filenames (including path) as an array if one or more entries could be found...
[ "Tries", "to", "find", "the", "cache", "entry", "for", "the", "specified", "identifier", ".", "Usually", "only", "one", "cache", "entry", "should", "be", "found", "-", "if", "more", "than", "one", "exist", "this", "is", "due", "to", "some", "error", "or"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L358-L366
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.requireOnce
public function requireOnce(string $entryIdentifier) { if ($this->frozen === true) { if (isset($this->cacheEntryIdentifiers[$entryIdentifier])) { return require_once($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension); } return false...
php
public function requireOnce(string $entryIdentifier) { if ($this->frozen === true) { if (isset($this->cacheEntryIdentifiers[$entryIdentifier])) { return require_once($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension); } return false...
[ "public", "function", "requireOnce", "(", "string", "$", "entryIdentifier", ")", "{", "if", "(", "$", "this", "->", "frozen", "===", "true", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "cacheEntryIdentifiers", "[", "$", "entryIdentifier", "]", ...
Loads PHP code from the cache and require_onces it right away. @param string $entryIdentifier An identifier which describes the cache entry to load @throws \InvalidArgumentException @return mixed Potential return value from the include operation @api
[ "Loads", "PHP", "code", "from", "the", "cache", "and", "require_onces", "it", "right", "away", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L376-L390
neos/flow-development-collection
Neos.Cache/Classes/Backend/FileBackend.php
FileBackend.internalGet
protected function internalGet(string $entryIdentifier, bool $acquireLock = true) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073033); } $pathAndFilename = $th...
php
protected function internalGet(string $entryIdentifier, bool $acquireLock = true) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073033); } $pathAndFilename = $th...
[ "protected", "function", "internalGet", "(", "string", "$", "entryIdentifier", ",", "bool", "$", "acquireLock", "=", "true", ")", "{", "if", "(", "$", "entryIdentifier", "!==", "basename", "(", "$", "entryIdentifier", ")", ")", "{", "throw", "new", "\\", "...
Internal get method, allows to nest locks by using the $acquireLock flag @param string $entryIdentifier @param boolean $acquireLock @return bool|string @throws \InvalidArgumentException
[ "Internal", "get", "method", "allows", "to", "nest", "locks", "by", "using", "the", "$acquireLock", "flag" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/FileBackend.php#L400-L434
neos/flow-development-collection
Neos.Flow/Classes/Reflection/PropertyReflection.php
PropertyReflection.getValue
public function getValue($object = null) { if (!is_object($object)) { throw new Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212); } if ($this->isPublic()) { return parent::getValue($object); ...
php
public function getValue($object = null) { if (!is_object($object)) { throw new Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212); } if ($this->isPublic()) { return parent::getValue($object); ...
[ "public", "function", "getValue", "(", "$", "object", "=", "null", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "Exception", "(", "'$object is of type '", ".", "gettype", "(", "$", "object", ")", ".", "', in...
Returns the value of the reflected property - even if it is protected. @param object $object Instance of the declaring class to read the value from @return mixed Value of the property @throws Exception
[ "Returns", "the", "value", "of", "the", "reflected", "property", "-", "even", "if", "it", "is", "protected", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/PropertyReflection.php#L96-L107
neos/flow-development-collection
Neos.Flow/Classes/Reflection/PropertyReflection.php
PropertyReflection.setValue
public function setValue($object = null, $value = null) { if (!is_object($object)) { throw new Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212); } if ($this->isPublic()) { parent::setValue($object,...
php
public function setValue($object = null, $value = null) { if (!is_object($object)) { throw new Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212); } if ($this->isPublic()) { parent::setValue($object,...
[ "public", "function", "setValue", "(", "$", "object", "=", "null", ",", "$", "value", "=", "null", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "Exception", "(", "'$object is of type '", ".", "gettype", "(",...
Returns the value of the reflected property - even if it is protected. @param object $object Instance of the declaring class to set the value on @param mixed $value The value to set on the property @return void @throws Exception
[ "Returns", "the", "value", "of", "the", "reflected", "property", "-", "even", "if", "it", "is", "protected", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/PropertyReflection.php#L117-L129
neos/flow-development-collection
Neos.Flow/Classes/Log/PsrLoggerFactory.php
PsrLoggerFactory.get
public function get(string $identifier): \Psr\Log\LoggerInterface { if (isset($this->instances[$identifier])) { return $this->instances[$identifier]; } if (!isset($this->configuration[$identifier])) { throw new \InvalidArgumentException(sprintf('The given log identif...
php
public function get(string $identifier): \Psr\Log\LoggerInterface { if (isset($this->instances[$identifier])) { return $this->instances[$identifier]; } if (!isset($this->configuration[$identifier])) { throw new \InvalidArgumentException(sprintf('The given log identif...
[ "public", "function", "get", "(", "string", "$", "identifier", ")", ":", "\\", "Psr", "\\", "Log", "\\", "LoggerInterface", "{", "if", "(", "isset", "(", "$", "this", "->", "instances", "[", "$", "identifier", "]", ")", ")", "{", "return", "$", "this...
Get the logger configured with given identifier. This implementation treats the logger as singleton. @param string $identifier @return \Psr\Log\LoggerInterface @throws \Exception
[ "Get", "the", "logger", "configured", "with", "given", "identifier", ".", "This", "implementation", "treats", "the", "logger", "as", "singleton", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/PsrLoggerFactory.php#L46-L65
neos/flow-development-collection
Neos.Flow/Classes/Log/PsrLoggerFactory.php
PsrLoggerFactory.instantiateBackends
protected function instantiateBackends(array $configuration) { $backends = []; foreach ($configuration as $backendConfiguration) { $class = $backendConfiguration['class'] ?? ''; $options = $backendConfiguration['options'] ?? []; $backends[] = $this->instantiateBac...
php
protected function instantiateBackends(array $configuration) { $backends = []; foreach ($configuration as $backendConfiguration) { $class = $backendConfiguration['class'] ?? ''; $options = $backendConfiguration['options'] ?? []; $backends[] = $this->instantiateBac...
[ "protected", "function", "instantiateBackends", "(", "array", "$", "configuration", ")", "{", "$", "backends", "=", "[", "]", ";", "foreach", "(", "$", "configuration", "as", "$", "backendConfiguration", ")", "{", "$", "class", "=", "$", "backendConfiguration"...
Instantiate all configured backends @param array $configuration @return BackendInterface[] @throws \Exception
[ "Instantiate", "all", "configured", "backends" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/PsrLoggerFactory.php#L86-L96
neos/flow-development-collection
Neos.Flow/Classes/Log/PsrLoggerFactory.php
PsrLoggerFactory.instantiateBackend
protected function instantiateBackend(string $class, array $options = []) { $backend = new $class($options); if (!($backend instanceof BackendInterface)) { throw new \Exception(sprintf('The log backend class "%s" does not implement the BackendInterface', htmlspecialchars($class)), 151535...
php
protected function instantiateBackend(string $class, array $options = []) { $backend = new $class($options); if (!($backend instanceof BackendInterface)) { throw new \Exception(sprintf('The log backend class "%s" does not implement the BackendInterface', htmlspecialchars($class)), 151535...
[ "protected", "function", "instantiateBackend", "(", "string", "$", "class", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "backend", "=", "new", "$", "class", "(", "$", "options", ")", ";", "if", "(", "!", "(", "$", "backend", "instance...
Instantiate a backend based on configuration. @param string $class @param array $options @return BackendInterface @throws \Exception
[ "Instantiate", "a", "backend", "based", "on", "configuration", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/PsrLoggerFactory.php#L106-L114
neos/flow-development-collection
Neos.Flow/Classes/Reflection/ClassSchema.php
ClassSchema.addProperty
public function addProperty($name, $type, $lazy = false, $transient = false) { try { $type = TypeHandling::parseType($type); } catch (InvalidTypeException $exception) { throw new \InvalidArgumentException(sprintf($exception->getMessage(), 'class "' . $name . '"'), 1315564474)...
php
public function addProperty($name, $type, $lazy = false, $transient = false) { try { $type = TypeHandling::parseType($type); } catch (InvalidTypeException $exception) { throw new \InvalidArgumentException(sprintf($exception->getMessage(), 'class "' . $name . '"'), 1315564474)...
[ "public", "function", "addProperty", "(", "$", "name", ",", "$", "type", ",", "$", "lazy", "=", "false", ",", "$", "transient", "=", "false", ")", "{", "try", "{", "$", "type", "=", "TypeHandling", "::", "parseType", "(", "$", "type", ")", ";", "}"...
Adds (defines) a specific property and its type. @param string $name Name of the property @param string $type Type of the property @param boolean $lazy Whether the property should be lazy-loaded when reconstituting @param boolean $transient Whether the property should not be considered for persistence @return void @th...
[ "Adds", "(", "defines", ")", "a", "specific", "property", "and", "its", "type", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ClassSchema.php#L119-L132
neos/flow-development-collection
Neos.Flow/Classes/Reflection/ClassSchema.php
ClassSchema.isMultiValuedProperty
public function isMultiValuedProperty($propertyName) { return ($this->properties[$propertyName]['type'] === 'array' || $this->properties[$propertyName]['type'] === 'SplObjectStorage' || $this->properties[$propertyName]['type'] === 'Doctrine\Common\Collections\Collection' || $this->properties[$propertyName][...
php
public function isMultiValuedProperty($propertyName) { return ($this->properties[$propertyName]['type'] === 'array' || $this->properties[$propertyName]['type'] === 'SplObjectStorage' || $this->properties[$propertyName]['type'] === 'Doctrine\Common\Collections\Collection' || $this->properties[$propertyName][...
[ "public", "function", "isMultiValuedProperty", "(", "$", "propertyName", ")", "{", "return", "(", "$", "this", "->", "properties", "[", "$", "propertyName", "]", "[", "'type'", "]", "===", "'array'", "||", "$", "this", "->", "properties", "[", "$", "proper...
Checks if the given property defined in this schema is multi-valued (i.e. array or SplObjectStorage). @param string $propertyName @return boolean
[ "Checks", "if", "the", "given", "property", "defined", "in", "this", "schema", "is", "multi", "-", "valued", "(", "i", ".", "e", ".", "array", "or", "SplObjectStorage", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ClassSchema.php#L163-L166
neos/flow-development-collection
Neos.Flow/Classes/Reflection/ClassSchema.php
ClassSchema.setModelType
public function setModelType($modelType) { if ($modelType !== self::MODELTYPE_ENTITY && $modelType !== self::MODELTYPE_VALUEOBJECT) { throw new \InvalidArgumentException('"' . $modelType . '" is an invalid model type.', 1212519195); } $this->modelType = $modelType; if ($m...
php
public function setModelType($modelType) { if ($modelType !== self::MODELTYPE_ENTITY && $modelType !== self::MODELTYPE_VALUEOBJECT) { throw new \InvalidArgumentException('"' . $modelType . '" is an invalid model type.', 1212519195); } $this->modelType = $modelType; if ($m...
[ "public", "function", "setModelType", "(", "$", "modelType", ")", "{", "if", "(", "$", "modelType", "!==", "self", "::", "MODELTYPE_ENTITY", "&&", "$", "modelType", "!==", "self", "::", "MODELTYPE_VALUEOBJECT", ")", "{", "throw", "new", "\\", "InvalidArgumentE...
Sets the model type of the class this schema is referring to. @param integer $modelType The model type, one of the MODELTYPE_* constants. @return void @throws \InvalidArgumentException
[ "Sets", "the", "model", "type", "of", "the", "class", "this", "schema", "is", "referring", "to", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ClassSchema.php#L175-L185
neos/flow-development-collection
Neos.Flow/Classes/Reflection/ClassSchema.php
ClassSchema.setRepositoryClassName
public function setRepositoryClassName($repositoryClassName) { if ($this->modelType === self::MODELTYPE_VALUEOBJECT && $repositoryClassName !== null) { throw new Exception\ClassSchemaConstraintViolationException('Value objects must not be aggregate roots (have a repository)', 1268739172); ...
php
public function setRepositoryClassName($repositoryClassName) { if ($this->modelType === self::MODELTYPE_VALUEOBJECT && $repositoryClassName !== null) { throw new Exception\ClassSchemaConstraintViolationException('Value objects must not be aggregate roots (have a repository)', 1268739172); ...
[ "public", "function", "setRepositoryClassName", "(", "$", "repositoryClassName", ")", "{", "if", "(", "$", "this", "->", "modelType", "===", "self", "::", "MODELTYPE_VALUEOBJECT", "&&", "$", "repositoryClassName", "!==", "null", ")", "{", "throw", "new", "Except...
Set the class name of the repository managing an entity. @param string $repositoryClassName @return void @throws Exception\ClassSchemaConstraintViolationException
[ "Set", "the", "class", "name", "of", "the", "repository", "managing", "an", "entity", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ClassSchema.php#L204-L210
neos/flow-development-collection
Neos.Flow/Classes/Reflection/ClassSchema.php
ClassSchema.markAsIdentityProperty
public function markAsIdentityProperty($propertyName) { if ($this->modelType === self::MODELTYPE_VALUEOBJECT) { throw new Exception\ClassSchemaConstraintViolationException('Value objects must not have identity properties', 1264102084); } if (!array_key_exists($propertyName, $this...
php
public function markAsIdentityProperty($propertyName) { if ($this->modelType === self::MODELTYPE_VALUEOBJECT) { throw new Exception\ClassSchemaConstraintViolationException('Value objects must not have identity properties', 1264102084); } if (!array_key_exists($propertyName, $this...
[ "public", "function", "markAsIdentityProperty", "(", "$", "propertyName", ")", "{", "if", "(", "$", "this", "->", "modelType", "===", "self", "::", "MODELTYPE_VALUEOBJECT", ")", "{", "throw", "new", "Exception", "\\", "ClassSchemaConstraintViolationException", "(", ...
Marks the given property as one of properties forming the identity of an object. The property must already be registered in the class schema. @param string $propertyName @return void @throws \InvalidArgumentException @throws Exception\ClassSchemaConstraintViolationException
[ "Marks", "the", "given", "property", "as", "one", "of", "properties", "forming", "the", "identity", "of", "an", "object", ".", "The", "property", "must", "already", "be", "registered", "in", "the", "class", "schema", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ClassSchema.php#L273-L286
neos/flow-development-collection
Neos.Eel/Classes/Helper/SecurityHelper.php
SecurityHelper.isAuthenticated
public function isAuthenticated(): bool { if (!$this->securityContext->canBeInitialized()) { return false; } return array_reduce($this->securityContext->getAuthenticationTokens(), function (bool $isAuthenticated, TokenInterface $token) { return $isAuthenticated || $t...
php
public function isAuthenticated(): bool { if (!$this->securityContext->canBeInitialized()) { return false; } return array_reduce($this->securityContext->getAuthenticationTokens(), function (bool $isAuthenticated, TokenInterface $token) { return $isAuthenticated || $t...
[ "public", "function", "isAuthenticated", "(", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "securityContext", "->", "canBeInitialized", "(", ")", ")", "{", "return", "false", ";", "}", "return", "array_reduce", "(", "$", "this", "->", "secur...
Returns true, if any account is currently authenticated @return boolean true if any account is authenticated
[ "Returns", "true", "if", "any", "account", "is", "currently", "authenticated" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/SecurityHelper.php#L68-L77
neos/flow-development-collection
Neos.Eel/Classes/Helper/SecurityHelper.php
SecurityHelper.hasAccess
public function hasAccess(string $privilegeTarget, array $parameters = []): bool { if (!$this->securityContext->canBeInitialized()) { return false; } return $this->privilegeManager->isPrivilegeTargetGranted($privilegeTarget, $parameters); }
php
public function hasAccess(string $privilegeTarget, array $parameters = []): bool { if (!$this->securityContext->canBeInitialized()) { return false; } return $this->privilegeManager->isPrivilegeTargetGranted($privilegeTarget, $parameters); }
[ "public", "function", "hasAccess", "(", "string", "$", "privilegeTarget", ",", "array", "$", "parameters", "=", "[", "]", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "securityContext", "->", "canBeInitialized", "(", ")", ")", "{", "return",...
Returns true, if access to the given privilege-target is granted @param string $privilegeTarget The identifier of the privilege target to decide on @param array $parameters Optional array of privilege parameters (simple key => value array) @return boolean true if access is granted, false otherwise
[ "Returns", "true", "if", "access", "to", "the", "given", "privilege", "-", "target", "is", "granted" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/SecurityHelper.php#L86-L92
neos/flow-development-collection
Neos.Eel/Classes/Helper/SecurityHelper.php
SecurityHelper.hasRole
public function hasRole($roleIdentifier) { if ($roleIdentifier === 'Neos.Flow:Everybody') { return true; } if ($this->securityContext->canBeInitialized()) { return $this->securityContext->hasRole($roleIdentifier); } return false; }
php
public function hasRole($roleIdentifier) { if ($roleIdentifier === 'Neos.Flow:Everybody') { return true; } if ($this->securityContext->canBeInitialized()) { return $this->securityContext->hasRole($roleIdentifier); } return false; }
[ "public", "function", "hasRole", "(", "$", "roleIdentifier", ")", "{", "if", "(", "$", "roleIdentifier", "===", "'Neos.Flow:Everybody'", ")", "{", "return", "true", ";", "}", "if", "(", "$", "this", "->", "securityContext", "->", "canBeInitialized", "(", ")"...
Returns true, if at least one of the currently authenticated accounts holds a role with the given identifier, also recursively. @param string $roleIdentifier The string representation of the role to search for @return boolean true, if a role with the given string representation was found
[ "Returns", "true", "if", "at", "least", "one", "of", "the", "currently", "authenticated", "accounts", "holds", "a", "role", "with", "the", "given", "identifier", "also", "recursively", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/SecurityHelper.php#L101-L112
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php
AuthenticationProviderManager.injectSettings
public function injectSettings(array $settings): void { if (isset($settings['security']['authentication']['authenticationStrategy'])) { $authenticationStrategyName = $settings['security']['authentication']['authenticationStrategy']; switch ($authenticationStrategyName) { ...
php
public function injectSettings(array $settings): void { if (isset($settings['security']['authentication']['authenticationStrategy'])) { $authenticationStrategyName = $settings['security']['authentication']['authenticationStrategy']; switch ($authenticationStrategyName) { ...
[ "public", "function", "injectSettings", "(", "array", "$", "settings", ")", ":", "void", "{", "if", "(", "isset", "(", "$", "settings", "[", "'security'", "]", "[", "'authentication'", "]", "[", "'authenticationStrategy'", "]", ")", ")", "{", "$", "authent...
Inject the settings and does a fresh build of tokens based on the injected settings @param array $settings The settings @return void @throws Exception
[ "Inject", "the", "settings", "and", "does", "a", "fresh", "build", "of", "tokens", "based", "on", "the", "injected", "settings" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php#L87-L108
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php
AuthenticationProviderManager.authenticate
public function authenticate() { $this->isAuthenticated = false; $anyTokenAuthenticated = false; if ($this->securityContext === null) { throw new Exception('Cannot authenticate because no security context has been set.', 1232978667); } $tokens = $this->securityC...
php
public function authenticate() { $this->isAuthenticated = false; $anyTokenAuthenticated = false; if ($this->securityContext === null) { throw new Exception('Cannot authenticate because no security context has been set.', 1232978667); } $tokens = $this->securityC...
[ "public", "function", "authenticate", "(", ")", "{", "$", "this", "->", "isAuthenticated", "=", "false", ";", "$", "anyTokenAuthenticated", "=", "false", ";", "if", "(", "$", "this", "->", "securityContext", "===", "null", ")", "{", "throw", "new", "Except...
Tries to authenticate the tokens in the security context (in the given order) with the available authentication providers, if needed. If the authentication strategy is set to "allTokens", all tokens have to be authenticated. If the strategy is set to "oneToken", only one token needs to be authenticated, but the authent...
[ "Tries", "to", "authenticate", "the", "tokens", "in", "the", "security", "context", "(", "in", "the", "given", "order", ")", "with", "the", "available", "authentication", "providers", "if", "needed", ".", "If", "the", "authentication", "strategy", "is", "set",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php#L170-L229
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php
AuthenticationProviderManager.isAuthenticated
public function isAuthenticated() { if ($this->isAuthenticated === null) { try { $this->authenticate(); } catch (AuthenticationRequiredException $exception) { } } return $this->isAuthenticated; }
php
public function isAuthenticated() { if ($this->isAuthenticated === null) { try { $this->authenticate(); } catch (AuthenticationRequiredException $exception) { } } return $this->isAuthenticated; }
[ "public", "function", "isAuthenticated", "(", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "===", "null", ")", "{", "try", "{", "$", "this", "->", "authenticate", "(", ")", ";", "}", "catch", "(", "AuthenticationRequiredException", "$", "exce...
Checks if one or all tokens are authenticated (depending on the authentication strategy). Will call authenticate() if not done before. @return boolean @throws Exception
[ "Checks", "if", "one", "or", "all", "tokens", "are", "authenticated", "(", "depending", "on", "the", "authentication", "strategy", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php#L239-L248
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php
AuthenticationProviderManager.logout
public function logout() { if ($this->isAuthenticated() !== true) { return; } $this->isAuthenticated = null; $session = $this->sessionManager->getCurrentSession(); /** @var $token TokenInterface */ foreach ($this->securityContext->getAuthenticationTokens(...
php
public function logout() { if ($this->isAuthenticated() !== true) { return; } $this->isAuthenticated = null; $session = $this->sessionManager->getCurrentSession(); /** @var $token TokenInterface */ foreach ($this->securityContext->getAuthenticationTokens(...
[ "public", "function", "logout", "(", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", "!==", "true", ")", "{", "return", ";", "}", "$", "this", "->", "isAuthenticated", "=", "null", ";", "$", "session", "=", "$", "this", "->", "...
Logout all active authentication tokens @return void @throws Exception @throws \Neos\Flow\Session\Exception\SessionNotStartedException
[ "Logout", "all", "active", "authentication", "tokens" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/AuthenticationProviderManager.php#L257-L273
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceTypeConverter.php
ResourceTypeConverter.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { if (empty($source)) { return null; } if ($source instanceof UploadedFileInterface) { return $this->handleUploadedFil...
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { if (empty($source)) { return null; } if ($source instanceof UploadedFileInterface) { return $this->handleUploadedFil...
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "if", "(", "empty", "(", "...
Converts the given string or array to a PersistentResource object. If the input format is an array, this method assumes the resource to be a fresh file upload and imports the temporary upload file through the ResourceManager. Note that $source['error'] will also be present if a file was successfully uploaded. In that...
[ "Converts", "the", "given", "string", "or", "array", "to", "a", "PersistentResource", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceTypeConverter.php#L155-L176
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceTypeConverter.php
ResourceTypeConverter.getCollectionName
protected function getCollectionName($source, PropertyMappingConfigurationInterface $configuration = null) { if ($configuration === null) { return ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME; } $collectionName = $configuration->getConfigurationValue(ResourceTypeConverter:...
php
protected function getCollectionName($source, PropertyMappingConfigurationInterface $configuration = null) { if ($configuration === null) { return ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME; } $collectionName = $configuration->getConfigurationValue(ResourceTypeConverter:...
[ "protected", "function", "getCollectionName", "(", "$", "source", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "if", "(", "$", "configuration", "===", "null", ")", "{", "return", "ResourceManager", "::", "DEFAULT_PERSIST...
Get the collection name this resource will be stored in. Default will be ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME The propertyMappingConfiguration CONFIGURATION_COLLECTION_NAME will directly override the default. Then if CONFIGURATION_ALLOW_COLLECTION_OVERRIDE is true and __collectionName is in the $source t...
[ "Get", "the", "collection", "name", "this", "resource", "will", "be", "stored", "in", ".", "Default", "will", "be", "ResourceManager", "::", "DEFAULT_PERSISTENT_COLLECTION_NAME", "The", "propertyMappingConfiguration", "CONFIGURATION_COLLECTION_NAME", "will", "directly", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceTypeConverter.php#L329-L349
neos/flow-development-collection
Neos.Flow/Classes/Security/AccountRepository.php
AccountRepository.findByAccountIdentifierAndAuthenticationProviderName
public function findByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, $authenticationProviderName) { $query = $this->createQuery(); return $query->matching( $query->logicalAnd( $query->equals('accountIdentifier', $accountIdentifier), $qu...
php
public function findByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, $authenticationProviderName) { $query = $this->createQuery(); return $query->matching( $query->logicalAnd( $query->equals('accountIdentifier', $accountIdentifier), $qu...
[ "public", "function", "findByAccountIdentifierAndAuthenticationProviderName", "(", "$", "accountIdentifier", ",", "$", "authenticationProviderName", ")", "{", "$", "query", "=", "$", "this", "->", "createQuery", "(", ")", ";", "return", "$", "query", "->", "matching...
Returns the account for a specific authentication provider with the given identifier @param string $accountIdentifier The account identifier @param string $authenticationProviderName The authentication provider name @return Account
[ "Returns", "the", "account", "for", "a", "specific", "authentication", "provider", "with", "the", "given", "identifier" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/AccountRepository.php#L67-L76
neos/flow-development-collection
Neos.Flow/Classes/Security/AccountRepository.php
AccountRepository.findActiveByAccountIdentifierAndAuthenticationProviderName
public function findActiveByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, $authenticationProviderName) { $query = $this->createQuery(); return $query->matching( $query->logicalAnd( $query->equals('accountIdentifier', $accountIdentifier), ...
php
public function findActiveByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, $authenticationProviderName) { $query = $this->createQuery(); return $query->matching( $query->logicalAnd( $query->equals('accountIdentifier', $accountIdentifier), ...
[ "public", "function", "findActiveByAccountIdentifierAndAuthenticationProviderName", "(", "$", "accountIdentifier", ",", "$", "authenticationProviderName", ")", "{", "$", "query", "=", "$", "this", "->", "createQuery", "(", ")", ";", "return", "$", "query", "->", "ma...
Returns the account for a specific authentication provider with the given identifier if it's not expired @param string $accountIdentifier The account identifier @param string $authenticationProviderName The authentication provider name @return Account
[ "Returns", "the", "account", "for", "a", "specific", "authentication", "provider", "with", "the", "given", "identifier", "if", "it", "s", "not", "expired" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/AccountRepository.php#L85-L98
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Dispatcher.php
Dispatcher.dispatch
public function dispatch(RequestInterface $request, ResponseInterface $response) { if ($request instanceof CliRequest) { $this->initiateDispatchLoop($request, $response); return; } // NOTE: The dispatcher is used for both Action- and CLI-Requests. For the latter case...
php
public function dispatch(RequestInterface $request, ResponseInterface $response) { if ($request instanceof CliRequest) { $this->initiateDispatchLoop($request, $response); return; } // NOTE: The dispatcher is used for both Action- and CLI-Requests. For the latter case...
[ "public", "function", "dispatch", "(", "RequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", ")", "{", "if", "(", "$", "request", "instanceof", "CliRequest", ")", "{", "$", "this", "->", "initiateDispatchLoop", "(", "$", "request", ","...
Dispatches a request to a controller @param RequestInterface $request The request to dispatch @param ResponseInterface $response The response, to be modified by the controller @return void @throws AccessDeniedException @throws AuthenticationRequiredException @throws InfiniteLoopException @throws InvalidControllerExcep...
[ "Dispatches", "a", "request", "to", "a", "controller" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Dispatcher.php#L74-L125
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Dispatcher.php
Dispatcher.initiateDispatchLoop
protected function initiateDispatchLoop(RequestInterface $request, ResponseInterface $response) { $dispatchLoopCount = 0; /** @var ActionRequest $request */ while (!$request->isDispatched()) { if ($dispatchLoopCount++ > 99) { throw new Exception\InfiniteLoopExcept...
php
protected function initiateDispatchLoop(RequestInterface $request, ResponseInterface $response) { $dispatchLoopCount = 0; /** @var ActionRequest $request */ while (!$request->isDispatched()) { if ($dispatchLoopCount++ > 99) { throw new Exception\InfiniteLoopExcept...
[ "protected", "function", "initiateDispatchLoop", "(", "RequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", ")", "{", "$", "dispatchLoopCount", "=", "0", ";", "/** @var ActionRequest $request */", "while", "(", "!", "$", "request", "->", "is...
Try processing the request until it is successfully marked "dispatched" @param RequestInterface $request @param ResponseInterface $response @throws InvalidControllerException|InfiniteLoopException|NoSuchOptionException TODO: From next major we might want to create one ActionResponse PER controller invocation and then...
[ "Try", "processing", "the", "request", "until", "it", "is", "successfully", "marked", "dispatched" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Dispatcher.php#L136-L158
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Dispatcher.php
Dispatcher.resolveController
protected function resolveController(RequestInterface $request) { /** @var ActionRequest $request */ $controllerObjectName = $request->getControllerObjectName(); if ($controllerObjectName === '') { $exceptionMessage = 'No controller could be resolved which would match your reques...
php
protected function resolveController(RequestInterface $request) { /** @var ActionRequest $request */ $controllerObjectName = $request->getControllerObjectName(); if ($controllerObjectName === '') { $exceptionMessage = 'No controller could be resolved which would match your reques...
[ "protected", "function", "resolveController", "(", "RequestInterface", "$", "request", ")", "{", "/** @var ActionRequest $request */", "$", "controllerObjectName", "=", "$", "request", "->", "getControllerObjectName", "(", ")", ";", "if", "(", "$", "controllerObjectName...
Finds and instantiates a controller that matches the current request. If no controller can be found, an instance of NotFoundControllerInterface is returned. @param RequestInterface $request The request to dispatch @return ControllerInterface @throws NoSuchOptionException @throws Controller\Exception\InvalidControllerE...
[ "Finds", "and", "instantiates", "a", "controller", "that", "matches", "the", "current", "request", ".", "If", "no", "controller", "can", "be", "found", "an", "instance", "of", "NotFoundControllerInterface", "is", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Dispatcher.php#L196-L217
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.setCache
public function setCache(FrontendInterface $cache) { parent::setCache($cache); $this->cacheEntryFileExtension = ($cache instanceof PhpFrontend) ? '.php' : ''; $this->configureCacheDirectory(); }
php
public function setCache(FrontendInterface $cache) { parent::setCache($cache); $this->cacheEntryFileExtension = ($cache instanceof PhpFrontend) ? '.php' : ''; $this->configureCacheDirectory(); }
[ "public", "function", "setCache", "(", "FrontendInterface", "$", "cache", ")", "{", "parent", "::", "setCache", "(", "$", "cache", ")", ";", "$", "this", "->", "cacheEntryFileExtension", "=", "(", "$", "cache", "instanceof", "PhpFrontend", ")", "?", "'.php'"...
Sets a reference to the cache frontend which uses this backend and initializes the default cache directory. @param \Neos\Cache\Frontend\FrontendInterface $cache The cache frontend @return void @throws Exception
[ "Sets", "a", "reference", "to", "the", "cache", "frontend", "which", "uses", "this", "backend", "and", "initializes", "the", "default", "cache", "directory", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L104-L109
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.set
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756735); } if ($e...
php
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756735); } if ($e...
[ "public", "function", "set", "(", "string", "$", "entryIdentifier", ",", "string", "$", "data", ",", "array", "$", "tags", "=", "[", "]", ",", "int", "$", "lifetime", "=", "null", ")", "{", "if", "(", "$", "entryIdentifier", "!==", "basename", "(", "...
Saves data in a cache file. @param string $entryIdentifier An identifier for this specific cache entry @param string $data The data to be stored @param array $tags Ignored in this type of cache backend @param integer $lifetime Ignored in this type of cache backend @return void @throws Exception if the directory does n...
[ "Saves", "data", "in", "a", "cache", "file", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L146-L167
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.get
public function get(string $entryIdentifier) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756877); } $pathAndFilename = $this->cacheDirectory . $entryIdentifier...
php
public function get(string $entryIdentifier) { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756877); } $pathAndFilename = $this->cacheDirectory . $entryIdentifier...
[ "public", "function", "get", "(", "string", "$", "entryIdentifier", ")", "{", "if", "(", "$", "entryIdentifier", "!==", "basename", "(", "$", "entryIdentifier", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The specified entry identifier ...
Loads data from a cache file. @param string $entryIdentifier An identifier which describes the cache entry to load @return mixed The cache entry's content as a string or false if the cache entry could not be loaded @throws \InvalidArgumentException @api
[ "Loads", "data", "from", "a", "cache", "file", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L177-L190
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.has
public function has(string $entryIdentifier): bool { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756878); } return file_exists($this->cacheDirectory . $entryIdent...
php
public function has(string $entryIdentifier): bool { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756878); } return file_exists($this->cacheDirectory . $entryIdent...
[ "public", "function", "has", "(", "string", "$", "entryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "entryIdentifier", "!==", "basename", "(", "$", "entryIdentifier", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The specified ...
Checks if a cache entry with the specified identifier exists. @param string $entryIdentifier @return boolean true if such an entry exists, false if not @throws \InvalidArgumentException @api
[ "Checks", "if", "a", "cache", "entry", "with", "the", "specified", "identifier", "exists", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L200-L206
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.tryRemoveWithLock
private function tryRemoveWithLock(string $fileName): bool { if (strncasecmp(PHP_OS, 'WIN', 3) == 0) { // On Windows, unlinking a locked/opened file will not work, so we just attempt the delete straight away. // In the worst case, the unlink will just fail due to concurrent access an...
php
private function tryRemoveWithLock(string $fileName): bool { if (strncasecmp(PHP_OS, 'WIN', 3) == 0) { // On Windows, unlinking a locked/opened file will not work, so we just attempt the delete straight away. // In the worst case, the unlink will just fail due to concurrent access an...
[ "private", "function", "tryRemoveWithLock", "(", "string", "$", "fileName", ")", ":", "bool", "{", "if", "(", "strncasecmp", "(", "PHP_OS", ",", "'WIN'", ",", "3", ")", "==", "0", ")", "{", "// On Windows, unlinking a locked/opened file will not work, so we just att...
Try to remove a file and make sure it is not locked. @param string $fileName The full filename of the file to remove. @return bool True if the file was removed successfully or false otherwise
[ "Try", "to", "remove", "a", "file", "and", "make", "sure", "it", "is", "not", "locked", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L214-L234
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.remove
public function remove(string $entryIdentifier): bool { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756960); } if ($entryIdentifier === '') { throw ne...
php
public function remove(string $entryIdentifier): bool { if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756960); } if ($entryIdentifier === '') { throw ne...
[ "public", "function", "remove", "(", "string", "$", "entryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "entryIdentifier", "!==", "basename", "(", "$", "entryIdentifier", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The specifi...
Removes all cache entries matching the specified identifier. Usually this only affects one entry. @param string $entryIdentifier Specifies the cache entry to remove @return boolean true if (at least) an entry could be removed or false if no entry was found @throws \InvalidArgumentException @api
[ "Removes", "all", "cache", "entries", "matching", "the", "specified", "identifier", ".", "Usually", "this", "only", "affects", "one", "entry", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L245-L268
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.findCacheFilesByIdentifier
protected function findCacheFilesByIdentifier(string $entryIdentifier) { $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension; return (file_exists($pathAndFilename) ? [$pathAndFilename] : false); }
php
protected function findCacheFilesByIdentifier(string $entryIdentifier) { $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension; return (file_exists($pathAndFilename) ? [$pathAndFilename] : false); }
[ "protected", "function", "findCacheFilesByIdentifier", "(", "string", "$", "entryIdentifier", ")", "{", "$", "pathAndFilename", "=", "$", "this", "->", "cacheDirectory", ".", "$", "entryIdentifier", ".", "$", "this", "->", "cacheEntryFileExtension", ";", "return", ...
Tries to find the cache entry for the specified identifier. @param string $entryIdentifier The cache entry identifier @return mixed The filenames (including path) as an array if one or more entries could be found, otherwise false
[ "Tries", "to", "find", "the", "cache", "entry", "for", "the", "specified", "identifier", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L311-L315
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.requireOnce
public function requireOnce(string $entryIdentifier) { $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension; if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier (' . $entryIdent...
php
public function requireOnce(string $entryIdentifier) { $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension; if ($entryIdentifier !== basename($entryIdentifier)) { throw new \InvalidArgumentException('The specified entry identifier (' . $entryIdent...
[ "public", "function", "requireOnce", "(", "string", "$", "entryIdentifier", ")", "{", "$", "pathAndFilename", "=", "$", "this", "->", "cacheDirectory", ".", "$", "entryIdentifier", ".", "$", "this", "->", "cacheEntryFileExtension", ";", "if", "(", "$", "entryI...
Loads PHP code from the cache and include_onces it right away. @param string $entryIdentifier An identifier which describes the cache entry to load @return mixed Potential return value from the include operation @throws \InvalidArgumentException @api
[ "Loads", "PHP", "code", "from", "the", "cache", "and", "include_onces", "it", "right", "away", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L325-L336
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.current
public function current() { if ($this->cacheFilesIterator === null) { $this->rewind(); } $pathAndFilename = $this->cacheFilesIterator->getPathname(); return $this->readCacheFile($pathAndFilename); }
php
public function current() { if ($this->cacheFilesIterator === null) { $this->rewind(); } $pathAndFilename = $this->cacheFilesIterator->getPathname(); return $this->readCacheFile($pathAndFilename); }
[ "public", "function", "current", "(", ")", "{", "if", "(", "$", "this", "->", "cacheFilesIterator", "===", "null", ")", "{", "$", "this", "->", "rewind", "(", ")", ";", "}", "$", "pathAndFilename", "=", "$", "this", "->", "cacheFilesIterator", "->", "g...
Returns the data of the current cache entry pointed to by the cache entry iterator. @return mixed @api
[ "Returns", "the", "data", "of", "the", "current", "cache", "entry", "pointed", "to", "by", "the", "cache", "entry", "iterator", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L345-L353
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.next
public function next() { if ($this->cacheFilesIterator === null) { $this->rewind(); } $this->cacheFilesIterator->next(); while ($this->cacheFilesIterator->isDot() && $this->cacheFilesIterator->valid()) { $this->cacheFilesIterator->next(); } }
php
public function next() { if ($this->cacheFilesIterator === null) { $this->rewind(); } $this->cacheFilesIterator->next(); while ($this->cacheFilesIterator->isDot() && $this->cacheFilesIterator->valid()) { $this->cacheFilesIterator->next(); } }
[ "public", "function", "next", "(", ")", "{", "if", "(", "$", "this", "->", "cacheFilesIterator", "===", "null", ")", "{", "$", "this", "->", "rewind", "(", ")", ";", "}", "$", "this", "->", "cacheFilesIterator", "->", "next", "(", ")", ";", "while", ...
Move forward to the next cache entry @return void @api
[ "Move", "forward", "to", "the", "next", "cache", "entry" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L361-L370
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.key
public function key(): string { if ($this->cacheFilesIterator === null) { $this->rewind(); } return $this->cacheFilesIterator->getBasename($this->cacheEntryFileExtension); }
php
public function key(): string { if ($this->cacheFilesIterator === null) { $this->rewind(); } return $this->cacheFilesIterator->getBasename($this->cacheEntryFileExtension); }
[ "public", "function", "key", "(", ")", ":", "string", "{", "if", "(", "$", "this", "->", "cacheFilesIterator", "===", "null", ")", "{", "$", "this", "->", "rewind", "(", ")", ";", "}", "return", "$", "this", "->", "cacheFilesIterator", "->", "getBasena...
Returns the identifier of the current cache entry pointed to by the cache entry iterator. @return string @api
[ "Returns", "the", "identifier", "of", "the", "current", "cache", "entry", "pointed", "to", "by", "the", "cache", "entry", "iterator", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L379-L385
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.valid
public function valid(): bool { if ($this->cacheFilesIterator === null) { $this->rewind(); } return $this->cacheFilesIterator->valid(); }
php
public function valid(): bool { if ($this->cacheFilesIterator === null) { $this->rewind(); } return $this->cacheFilesIterator->valid(); }
[ "public", "function", "valid", "(", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "cacheFilesIterator", "===", "null", ")", "{", "$", "this", "->", "rewind", "(", ")", ";", "}", "return", "$", "this", "->", "cacheFilesIterator", "->", "valid", ...
Checks if the current position of the cache entry iterator is valid @return boolean true if the current position is valid, otherwise false @api
[ "Checks", "if", "the", "current", "position", "of", "the", "cache", "entry", "iterator", "is", "valid" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L393-L399
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.rewind
public function rewind() { if ($this->cacheFilesIterator === null) { $this->cacheFilesIterator = new \DirectoryIterator($this->cacheDirectory); } $this->cacheFilesIterator->rewind(); while (substr($this->cacheFilesIterator->getFilename(), 0, 1) === '.' && $this->cacheFile...
php
public function rewind() { if ($this->cacheFilesIterator === null) { $this->cacheFilesIterator = new \DirectoryIterator($this->cacheDirectory); } $this->cacheFilesIterator->rewind(); while (substr($this->cacheFilesIterator->getFilename(), 0, 1) === '.' && $this->cacheFile...
[ "public", "function", "rewind", "(", ")", "{", "if", "(", "$", "this", "->", "cacheFilesIterator", "===", "null", ")", "{", "$", "this", "->", "cacheFilesIterator", "=", "new", "\\", "DirectoryIterator", "(", "$", "this", "->", "cacheDirectory", ")", ";", ...
Rewinds the cache entry iterator to the first element @return void @api
[ "Rewinds", "the", "cache", "entry", "iterator", "to", "the", "first", "element" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L407-L416
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.readCacheFile
protected function readCacheFile(string $cacheEntryPathAndFilename, int $offset = null, int $maxlen = null) { for ($i = 0; $i < 3; $i++) { $data = false; try { $file = fopen($cacheEntryPathAndFilename, 'rb'); if ($file === false) { ...
php
protected function readCacheFile(string $cacheEntryPathAndFilename, int $offset = null, int $maxlen = null) { for ($i = 0; $i < 3; $i++) { $data = false; try { $file = fopen($cacheEntryPathAndFilename, 'rb'); if ($file === false) { ...
[ "protected", "function", "readCacheFile", "(", "string", "$", "cacheEntryPathAndFilename", ",", "int", "$", "offset", "=", "null", ",", "int", "$", "maxlen", "=", "null", ")", "{", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "3", ";", "$", ...
Reads the cache data from the given cache file, using locking. @param string $cacheEntryPathAndFilename @param int|null $offset @param int|null $maxlen @return boolean|string The contents of the cache file or false on error
[ "Reads", "the", "cache", "data", "from", "the", "given", "cache", "file", "using", "locking", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L491-L518
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.writeCacheFile
protected function writeCacheFile(string $cacheEntryPathAndFilename, string $data) { for ($i = 0; $i < 3; $i++) { // This can be replaced by a simple file_put_contents($cacheEntryPathAndFilename, $data, LOCK_EX) once vfs // is fixed for file_put_contents with LOCK_EX, see https://git...
php
protected function writeCacheFile(string $cacheEntryPathAndFilename, string $data) { for ($i = 0; $i < 3; $i++) { // This can be replaced by a simple file_put_contents($cacheEntryPathAndFilename, $data, LOCK_EX) once vfs // is fixed for file_put_contents with LOCK_EX, see https://git...
[ "protected", "function", "writeCacheFile", "(", "string", "$", "cacheEntryPathAndFilename", ",", "string", "$", "data", ")", "{", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "3", ";", "$", "i", "++", ")", "{", "// This can be replaced by a simple f...
Writes the cache data into the given cache file, using locking. @param string $cacheEntryPathAndFilename @param string $data @return boolean|integer Return value of file_put_contents
[ "Writes", "the", "cache", "data", "into", "the", "given", "cache", "file", "using", "locking", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L527-L553
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.setup
public function setup(): Result { $result = new Result(); try { $this->configureCacheDirectory(); } catch (Exception $exception) { $result->addError(new Error('Failed to configure cache directory: %s', $exception->getCode(), [$exception->getMessage()], 'Cache Director...
php
public function setup(): Result { $result = new Result(); try { $this->configureCacheDirectory(); } catch (Exception $exception) { $result->addError(new Error('Failed to configure cache directory: %s', $exception->getCode(), [$exception->getMessage()], 'Cache Director...
[ "public", "function", "setup", "(", ")", ":", "Result", "{", "$", "result", "=", "new", "Result", "(", ")", ";", "try", "{", "$", "this", "->", "configureCacheDirectory", "(", ")", ";", "}", "catch", "(", "Exception", "$", "exception", ")", "{", "$",...
Sets up this backend by creating the required cache directory if it doesn't exist yet @return Result @api
[ "Sets", "up", "this", "backend", "by", "creating", "the", "required", "cache", "directory", "if", "it", "doesn", "t", "exist", "yet" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L561-L570
neos/flow-development-collection
Neos.Cache/Classes/Backend/SimpleFileBackend.php
SimpleFileBackend.getStatus
public function getStatus(): Result { $result = new Result(); try { $this->verifyCacheDirectory(); } catch (Exception $exception) { $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Cache Directory')); return $result; ...
php
public function getStatus(): Result { $result = new Result(); try { $this->verifyCacheDirectory(); } catch (Exception $exception) { $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Cache Directory')); return $result; ...
[ "public", "function", "getStatus", "(", ")", ":", "Result", "{", "$", "result", "=", "new", "Result", "(", ")", ";", "try", "{", "$", "this", "->", "verifyCacheDirectory", "(", ")", ";", "}", "catch", "(", "Exception", "$", "exception", ")", "{", "$"...
Validates that the configured cache directory exists and is writeable and returns some details about its configuration if that's the case @return Result @api
[ "Validates", "that", "the", "configured", "cache", "directory", "exists", "and", "is", "writeable", "and", "returns", "some", "details", "about", "its", "configuration", "if", "that", "s", "the", "case" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/SimpleFileBackend.php#L578-L590
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/Role.php
Role.setParentRoles
public function setParentRoles(array $parentRoles) { $this->parentRoles = []; foreach ($parentRoles as $parentRole) { $this->addParentRole($parentRole); } }
php
public function setParentRoles(array $parentRoles) { $this->parentRoles = []; foreach ($parentRoles as $parentRole) { $this->addParentRole($parentRole); } }
[ "public", "function", "setParentRoles", "(", "array", "$", "parentRoles", ")", "{", "$", "this", "->", "parentRoles", "=", "[", "]", ";", "foreach", "(", "$", "parentRoles", "as", "$", "parentRole", ")", "{", "$", "this", "->", "addParentRole", "(", "$",...
Assign parent roles to this role. @param Role[] $parentRoles indexed by role identifier @return void
[ "Assign", "parent", "roles", "to", "this", "role", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/Role.php#L137-L143
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/Role.php
Role.getAllParentRoles
public function getAllParentRoles() { $reducer = function (array $result, Role $role) { $result[$role->getIdentifier()] = $role; return array_merge($result, $role->getAllParentRoles()); }; return array_reduce($this->parentRoles, $reducer, []); }
php
public function getAllParentRoles() { $reducer = function (array $result, Role $role) { $result[$role->getIdentifier()] = $role; return array_merge($result, $role->getAllParentRoles()); }; return array_reduce($this->parentRoles, $reducer, []); }
[ "public", "function", "getAllParentRoles", "(", ")", "{", "$", "reducer", "=", "function", "(", "array", "$", "result", ",", "Role", "$", "role", ")", "{", "$", "result", "[", "$", "role", "->", "getIdentifier", "(", ")", "]", "=", "$", "role", ";", ...
Returns all (directly and indirectly reachable) parent roles for the given role. @return Role[] Array of parent roles, indexed by role identifier
[ "Returns", "all", "(", "directly", "and", "indirectly", "reachable", ")", "parent", "roles", "for", "the", "given", "role", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/Role.php#L160-L168
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/Role.php
Role.addParentRole
public function addParentRole(Role $parentRole) { if (!$this->hasParentRole($parentRole)) { $parentRoleIdentifier = $parentRole->getIdentifier(); $this->parentRoles[$parentRoleIdentifier] = $parentRole; } }
php
public function addParentRole(Role $parentRole) { if (!$this->hasParentRole($parentRole)) { $parentRoleIdentifier = $parentRole->getIdentifier(); $this->parentRoles[$parentRoleIdentifier] = $parentRole; } }
[ "public", "function", "addParentRole", "(", "Role", "$", "parentRole", ")", "{", "if", "(", "!", "$", "this", "->", "hasParentRole", "(", "$", "parentRole", ")", ")", "{", "$", "parentRoleIdentifier", "=", "$", "parentRole", "->", "getIdentifier", "(", ")"...
Add a (direct) parent role to this role. @param Role $parentRole @return void
[ "Add", "a", "(", "direct", ")", "parent", "role", "to", "this", "role", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/Role.php#L176-L182
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/Role.php
Role.setPrivileges
public function setPrivileges(array $privileges) { foreach ($privileges as $privilege) { $this->privileges[$privilege->getCacheEntryIdentifier()] = $privilege; } }
php
public function setPrivileges(array $privileges) { foreach ($privileges as $privilege) { $this->privileges[$privilege->getCacheEntryIdentifier()] = $privilege; } }
[ "public", "function", "setPrivileges", "(", "array", "$", "privileges", ")", "{", "foreach", "(", "$", "privileges", "as", "$", "privilege", ")", "{", "$", "this", "->", "privileges", "[", "$", "privilege", "->", "getCacheEntryIdentifier", "(", ")", "]", "...
Assign privileges to this role. @param PrivilegeInterface[] $privileges @return void
[ "Assign", "privileges", "to", "this", "role", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/Role.php#L201-L206
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php
ResponseInformationHelper.createFromRaw
public static function createFromRaw(string $rawResponse, string $responseClassName = Response::class): ResponseInterface { $response = new $responseClassName(); if (!$response instanceof ResponseInterface) { throw new \InvalidArgumentException(sprintf('The given response class name "%s...
php
public static function createFromRaw(string $rawResponse, string $responseClassName = Response::class): ResponseInterface { $response = new $responseClassName(); if (!$response instanceof ResponseInterface) { throw new \InvalidArgumentException(sprintf('The given response class name "%s...
[ "public", "static", "function", "createFromRaw", "(", "string", "$", "rawResponse", ",", "string", "$", "responseClassName", "=", "Response", "::", "class", ")", ":", "ResponseInterface", "{", "$", "response", "=", "new", "$", "responseClassName", "(", ")", ";...
Creates a response from the given raw, that is plain text, HTTP response. @param string $rawResponse @throws \InvalidArgumentException @return ResponseInterface
[ "Creates", "a", "response", "from", "the", "given", "raw", "that", "is", "plain", "text", "HTTP", "response", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php#L33-L93
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php
ResponseInformationHelper.generateStatusLine
public static function generateStatusLine(ResponseInterface $response): string { return sprintf("HTTP/%s %s %s\r\n", $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase()); }
php
public static function generateStatusLine(ResponseInterface $response): string { return sprintf("HTTP/%s %s %s\r\n", $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase()); }
[ "public", "static", "function", "generateStatusLine", "(", "ResponseInterface", "$", "response", ")", ":", "string", "{", "return", "sprintf", "(", "\"HTTP/%s %s %s\\r\\n\"", ",", "$", "response", "->", "getProtocolVersion", "(", ")", ",", "$", "response", "->", ...
Return the Request-Line of this Request Message, consisting of the method, the URI and the HTTP version Would be, for example, "GET /foo?bar=baz HTTP/1.1" Note that the URI part is, at the moment, only possible in the form "abs_path" since the actual requestUri of the Request cannot be determined during the creation of...
[ "Return", "the", "Request", "-", "Line", "of", "this", "Request", "Message", "consisting", "of", "the", "method", "the", "URI", "and", "the", "HTTP", "version", "Would", "be", "for", "example", "GET", "/", "foo?bar", "=", "baz", "HTTP", "/", "1", ".", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php#L164-L167
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php
ResponseInformationHelper.prepareHeaders
public static function prepareHeaders(ResponseInterface $response): array { $preparedHeaders = []; $statusHeader = rtrim(self::generateStatusLine($response), "\r\n"); $preparedHeaders[] = $statusHeader; $headers = $response->getHeaders(); if ($headers instanceof Headers) { ...
php
public static function prepareHeaders(ResponseInterface $response): array { $preparedHeaders = []; $statusHeader = rtrim(self::generateStatusLine($response), "\r\n"); $preparedHeaders[] = $statusHeader; $headers = $response->getHeaders(); if ($headers instanceof Headers) { ...
[ "public", "static", "function", "prepareHeaders", "(", "ResponseInterface", "$", "response", ")", ":", "array", "{", "$", "preparedHeaders", "=", "[", "]", ";", "$", "statusHeader", "=", "rtrim", "(", "self", "::", "generateStatusLine", "(", "$", "response", ...
Prepare array of header lines for this response @param ResponseInterface $response @return array
[ "Prepare", "array", "of", "header", "lines", "for", "this", "response" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php#L175-L191
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php
ResponseInformationHelper.makeStandardsCompliant
public static function makeStandardsCompliant(ResponseInterface $response, RequestInterface $request): ResponseInterface { $statusCode = $response->getStatusCode(); if ($request->hasHeader('If-Modified-Since') && $response->hasHeader('Last-Modified') && $statusCode === 200) { $ifModified...
php
public static function makeStandardsCompliant(ResponseInterface $response, RequestInterface $request): ResponseInterface { $statusCode = $response->getStatusCode(); if ($request->hasHeader('If-Modified-Since') && $response->hasHeader('Last-Modified') && $statusCode === 200) { $ifModified...
[ "public", "static", "function", "makeStandardsCompliant", "(", "ResponseInterface", "$", "response", ",", "RequestInterface", "$", "request", ")", ":", "ResponseInterface", "{", "$", "statusCode", "=", "$", "response", "->", "getStatusCode", "(", ")", ";", "if", ...
Analyzes this response, considering the given request and makes additions or removes certain headers in order to make the response compliant to RFC 2616 and related standards. It is recommended to call this method before the response is sent and Flow does so by default in its built-in HTTP request handler. @param Res...
[ "Analyzes", "this", "response", "considering", "the", "given", "request", "and", "makes", "additions", "or", "removes", "certain", "headers", "in", "order", "to", "make", "the", "response", "compliant", "to", "RFC", "2616", "and", "related", "standards", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/ResponseInformationHelper.php#L206-L254
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Service/AbstractGenerator.php
AbstractGenerator.getClassNamesInNamespace
protected function getClassNamesInNamespace($namespace) { $affectedViewHelperClassNames = []; $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass(AbstractViewHelper::class); foreach ($allViewHelperClassNames as $viewHelperClassName) { if ($this->refl...
php
protected function getClassNamesInNamespace($namespace) { $affectedViewHelperClassNames = []; $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass(AbstractViewHelper::class); foreach ($allViewHelperClassNames as $viewHelperClassName) { if ($this->refl...
[ "protected", "function", "getClassNamesInNamespace", "(", "$", "namespace", ")", "{", "$", "affectedViewHelperClassNames", "=", "[", "]", ";", "$", "allViewHelperClassNames", "=", "$", "this", "->", "reflectionService", "->", "getAllSubClassNamesForClass", "(", "Abstr...
Get all class names inside this namespace and return them as array. @param string $namespace @return array Array of all class names inside a given namespace.
[ "Get", "all", "class", "names", "inside", "this", "namespace", "and", "return", "them", "as", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Service/AbstractGenerator.php#L59-L74
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Service/AbstractGenerator.php
AbstractGenerator.getTagNameForClass
protected function getTagNameForClass($className, $namespace) { $strippedClassName = substr($className, strlen($namespace)); $classNameParts = explode('\\', $strippedClassName); if (count($classNameParts) == 1) { $tagName = lcfirst(substr($classNameParts[0], 0, -10)); // strip t...
php
protected function getTagNameForClass($className, $namespace) { $strippedClassName = substr($className, strlen($namespace)); $classNameParts = explode('\\', $strippedClassName); if (count($classNameParts) == 1) { $tagName = lcfirst(substr($classNameParts[0], 0, -10)); // strip t...
[ "protected", "function", "getTagNameForClass", "(", "$", "className", ",", "$", "namespace", ")", "{", "$", "strippedClassName", "=", "substr", "(", "$", "className", ",", "strlen", "(", "$", "namespace", ")", ")", ";", "$", "classNameParts", "=", "explode",...
Get a tag name for a given ViewHelper class. Example: For the View Helper Neos\FluidAdaptor\ViewHelpers\Form\SelectViewHelper, and the namespace prefix Neos\FluidAdaptor\ViewHelpers\, this method returns "form.select". @param string $className Class name @param string $namespace Base namespace to use @return string Ta...
[ "Get", "a", "tag", "name", "for", "a", "given", "ViewHelper", "class", ".", "Example", ":", "For", "the", "View", "Helper", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "Form", "\\", "SelectViewHelper", "and", "the", "namespace", "prefix", "Neos"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Service/AbstractGenerator.php#L85-L96
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/CountValidator.php
CountValidator.isValid
protected function isValid($value) { if (!is_array($value) && !($value instanceof \Countable)) { $this->addError('The given subject was not countable.', 1253718666); return; } $minimum = intval($this->options['minimum']); $maximum = intval($this->options['max...
php
protected function isValid($value) { if (!is_array($value) && !($value instanceof \Countable)) { $this->addError('The given subject was not countable.', 1253718666); return; } $minimum = intval($this->options['minimum']); $maximum = intval($this->options['max...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "!", "is_array", "(", "$", "value", ")", "&&", "!", "(", "$", "value", "instanceof", "\\", "Countable", ")", ")", "{", "$", "this", "->", "addError", "(", "'The given subject w...
The given value is valid if it is an array or \Countable that contains the specified amount of elements. @param mixed $value The value that should be validated @return void @api
[ "The", "given", "value", "is", "valid", "if", "it", "is", "an", "array", "or", "\\", "Countable", "that", "contains", "the", "specified", "amount", "of", "elements", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/CountValidator.php#L37-L49
neos/flow-development-collection
Neos.Flow/Classes/I18n/Xliff/Model/FileAdapter.php
FileAdapter.getTargetBySource
public function getTargetBySource($source, $pluralFormIndex = 0) { if (empty($this->fileData['translationUnits'])) { $this->i18nLogger->debug(sprintf('No trans-unit elements were found in "%s". This is allowed per specification, but no translation can be applied then.', $this->fileData['fileIden...
php
public function getTargetBySource($source, $pluralFormIndex = 0) { if (empty($this->fileData['translationUnits'])) { $this->i18nLogger->debug(sprintf('No trans-unit elements were found in "%s". This is allowed per specification, but no translation can be applied then.', $this->fileData['fileIden...
[ "public", "function", "getTargetBySource", "(", "$", "source", ",", "$", "pluralFormIndex", "=", "0", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "fileData", "[", "'translationUnits'", "]", ")", ")", "{", "$", "this", "->", "i18nLogger", "->", ...
Returns translated label ("target" tag in XLIFF) from source-target pair where "source" tag equals to $source parameter. @param string $source Label in original language ("source" tag in XLIFF) @param integer $pluralFormIndex Index of plural form to use (starts with 0) @return mixed Translated label or false on failur...
[ "Returns", "translated", "label", "(", "target", "tag", "in", "XLIFF", ")", "from", "source", "-", "target", "pair", "where", "source", "tag", "equals", "to", "$source", "parameter", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Xliff/Model/FileAdapter.php#L75-L98
neos/flow-development-collection
Neos.Flow/Classes/I18n/Xliff/Model/FileAdapter.php
FileAdapter.getTargetByTransUnitId
public function getTargetByTransUnitId($transUnitId, $pluralFormIndex = 0) { if (!isset($this->fileData['translationUnits'][$transUnitId])) { $this->i18nLogger->debug('No trans-unit element with the id "' . $transUnitId . '" was found in ' . $this->fileData['fileIdentifier'] . '. Either this tra...
php
public function getTargetByTransUnitId($transUnitId, $pluralFormIndex = 0) { if (!isset($this->fileData['translationUnits'][$transUnitId])) { $this->i18nLogger->debug('No trans-unit element with the id "' . $transUnitId . '" was found in ' . $this->fileData['fileIdentifier'] . '. Either this tra...
[ "public", "function", "getTargetByTransUnitId", "(", "$", "transUnitId", ",", "$", "pluralFormIndex", "=", "0", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "fileData", "[", "'translationUnits'", "]", "[", "$", "transUnitId", "]", ")", ")", ...
Returns translated label ("target" tag in XLIFF) for the id given. Id is compared with "id" attribute of "trans-unit" tag (see XLIFF specification for details). @param string $transUnitId The "id" attribute of "trans-unit" tag in XLIFF @param integer $pluralFormIndex Index of plural form to use (starts with 0) @return...
[ "Returns", "translated", "label", "(", "target", "tag", "in", "XLIFF", ")", "for", "the", "id", "given", ".", "Id", "is", "compared", "with", "id", "attribute", "of", "trans", "-", "unit", "tag", "(", "see", "XLIFF", "specification", "for", "details", ")...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Xliff/Model/FileAdapter.php#L109-L129
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Mapping/ClassMetadata.php
ClassMetadata.wakeupReflection
public function wakeupReflection($reflService) { parent::wakeupReflection($reflService); $this->reflClass = new ClassReflection($this->name); }
php
public function wakeupReflection($reflService) { parent::wakeupReflection($reflService); $this->reflClass = new ClassReflection($this->name); }
[ "public", "function", "wakeupReflection", "(", "$", "reflService", ")", "{", "parent", "::", "wakeupReflection", "(", "$", "reflService", ")", ";", "$", "this", "->", "reflClass", "=", "new", "ClassReflection", "(", "$", "this", "->", "name", ")", ";", "}"...
Restores some state that can not be serialized/unserialized. @param DoctrineReflectionService $reflService @return void
[ "Restores", "some", "state", "that", "can", "not", "be", "serialized", "/", "unserialized", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Mapping/ClassMetadata.php#L53-L57
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Mapping/ClassMetadata.php
ClassMetadata._initializeReflection
protected function _initializeReflection() { $this->reflClass = new ClassReflection($this->name); $this->namespace = $this->reflClass->getNamespaceName(); $this->name = $this->rootEntityName = $this->reflClass->getName(); $this->table['name'] = $this->reflClass->getShortName(); }
php
protected function _initializeReflection() { $this->reflClass = new ClassReflection($this->name); $this->namespace = $this->reflClass->getNamespaceName(); $this->name = $this->rootEntityName = $this->reflClass->getName(); $this->table['name'] = $this->reflClass->getShortName(); }
[ "protected", "function", "_initializeReflection", "(", ")", "{", "$", "this", "->", "reflClass", "=", "new", "ClassReflection", "(", "$", "this", "->", "name", ")", ";", "$", "this", "->", "namespace", "=", "$", "this", "->", "reflClass", "->", "getNamespa...
Initializes $this->reflClass and a number of related variables. @return void
[ "Initializes", "$this", "-", ">", "reflClass", "and", "a", "number", "of", "related", "variables", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Mapping/ClassMetadata.php#L64-L70
neos/flow-development-collection
Neos.Flow/Classes/Utility/PhpAnalyzer.php
PhpAnalyzer.extractFullyQualifiedClassName
public function extractFullyQualifiedClassName() { $fullyQualifiedClassName = $this->extractClassName(); if ($fullyQualifiedClassName === null) { return null; } $namespace = $this->extractNamespace(); if ($namespace !== null) { $fullyQualifiedClassName...
php
public function extractFullyQualifiedClassName() { $fullyQualifiedClassName = $this->extractClassName(); if ($fullyQualifiedClassName === null) { return null; } $namespace = $this->extractNamespace(); if ($namespace !== null) { $fullyQualifiedClassName...
[ "public", "function", "extractFullyQualifiedClassName", "(", ")", "{", "$", "fullyQualifiedClassName", "=", "$", "this", "->", "extractClassName", "(", ")", ";", "if", "(", "$", "fullyQualifiedClassName", "===", "null", ")", "{", "return", "null", ";", "}", "$...
Extracts the Fully Qualified Class name from the given PHP code @return string FQN in the format "Some\Fully\Qualified\ClassName" or NULL if no class was detected
[ "Extracts", "the", "Fully", "Qualified", "Class", "name", "from", "the", "given", "PHP", "code" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Utility/PhpAnalyzer.php#L48-L59
neos/flow-development-collection
Neos.Flow/Classes/Utility/PhpAnalyzer.php
PhpAnalyzer.extractNamespace
public function extractNamespace() { $namespaceParts = []; $tokens = token_get_all($this->phpCode); $numberOfTokens = count($tokens); for ($i = 0; $i < $numberOfTokens; $i++) { $token = $tokens[$i]; if (is_string($token) || $token[0] !== T_NAMESPACE) { ...
php
public function extractNamespace() { $namespaceParts = []; $tokens = token_get_all($this->phpCode); $numberOfTokens = count($tokens); for ($i = 0; $i < $numberOfTokens; $i++) { $token = $tokens[$i]; if (is_string($token) || $token[0] !== T_NAMESPACE) { ...
[ "public", "function", "extractNamespace", "(", ")", "{", "$", "namespaceParts", "=", "[", "]", ";", "$", "tokens", "=", "token_get_all", "(", "$", "this", "->", "phpCode", ")", ";", "$", "numberOfTokens", "=", "count", "(", "$", "tokens", ")", ";", "fo...
Extracts the PHP namespace from the given PHP code @return string the PHP namespace in the form "Some\Namespace" (w/o leading backslash) - or NULL if no namespace modifier was found
[ "Extracts", "the", "PHP", "namespace", "from", "the", "given", "PHP", "code" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Utility/PhpAnalyzer.php#L66-L96
neos/flow-development-collection
Neos.Flow/Classes/Utility/PhpAnalyzer.php
PhpAnalyzer.extractClassName
public function extractClassName() { $tokens = token_get_all($this->phpCode); $numberOfTokens = count($tokens); for ($i = 0; $i < $numberOfTokens; $i++) { $token = $tokens[$i]; if (is_string($token) || $token[0] !== T_CLASS) { continue; } ...
php
public function extractClassName() { $tokens = token_get_all($this->phpCode); $numberOfTokens = count($tokens); for ($i = 0; $i < $numberOfTokens; $i++) { $token = $tokens[$i]; if (is_string($token) || $token[0] !== T_CLASS) { continue; } ...
[ "public", "function", "extractClassName", "(", ")", "{", "$", "tokens", "=", "token_get_all", "(", "$", "this", "->", "phpCode", ")", ";", "$", "numberOfTokens", "=", "count", "(", "$", "tokens", ")", ";", "for", "(", "$", "i", "=", "0", ";", "$", ...
Extracts the className of the given PHP code Note: This only returns the class name without namespace, @see extractFullyQualifiedClassName() @return string
[ "Extracts", "the", "className", "of", "the", "given", "PHP", "code", "Note", ":", "This", "only", "returns", "the", "class", "name", "without", "namespace", "@see", "extractFullyQualifiedClassName", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Utility/PhpAnalyzer.php#L104-L128
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/Router.php
Router.route
public function route(RouteContext $routeContext): array { $this->lastMatchedRoute = null; $cachedRouteResult = $this->routerCachingService->getCachedMatchResults($routeContext); if ($cachedRouteResult !== false) { return $cachedRouteResult; } $this->createRoutesF...
php
public function route(RouteContext $routeContext): array { $this->lastMatchedRoute = null; $cachedRouteResult = $this->routerCachingService->getCachedMatchResults($routeContext); if ($cachedRouteResult !== false) { return $cachedRouteResult; } $this->createRoutesF...
[ "public", "function", "route", "(", "RouteContext", "$", "routeContext", ")", ":", "array", "{", "$", "this", "->", "lastMatchedRoute", "=", "null", ";", "$", "cachedRouteResult", "=", "$", "this", "->", "routerCachingService", "->", "getCachedMatchResults", "("...
Iterates through all configured routes and calls matches() on them. Returns the matchResults of the matching route or NULL if no matching route could be found. @param RouteContext $routeContext The Route Context containing the current HTTP Request and, optional, Routing RouteParameters @return array The results of the...
[ "Iterates", "through", "all", "configured", "routes", "and", "calls", "matches", "()", "on", "them", ".", "Returns", "the", "matchResults", "of", "the", "matching", "route", "or", "NULL", "if", "no", "matching", "route", "could", "be", "found", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Router.php#L115-L137
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/Router.php
Router.resolve
public function resolve(ResolveContext $resolveContext): UriInterface { $this->lastResolvedRoute = null; $cachedResolvedUriConstraints = $this->routerCachingService->getCachedResolvedUriConstraints($resolveContext); if ($cachedResolvedUriConstraints !== false) { return $cachedRes...
php
public function resolve(ResolveContext $resolveContext): UriInterface { $this->lastResolvedRoute = null; $cachedResolvedUriConstraints = $this->routerCachingService->getCachedResolvedUriConstraints($resolveContext); if ($cachedResolvedUriConstraints !== false) { return $cachedRes...
[ "public", "function", "resolve", "(", "ResolveContext", "$", "resolveContext", ")", ":", "UriInterface", "{", "$", "this", "->", "lastResolvedRoute", "=", "null", ";", "$", "cachedResolvedUriConstraints", "=", "$", "this", "->", "routerCachingService", "->", "getC...
Builds the corresponding uri (excluding protocol and host) by iterating through all configured routes and calling their respective resolves() method. If no matching route is found, an empty string is returned. Note: calls of this message are cached by RouterCachingAspect @param ResolveContext $resolveContext The Resol...
[ "Builds", "the", "corresponding", "uri", "(", "excluding", "protocol", "and", "host", ")", "by", "iterating", "through", "all", "configured", "routes", "and", "calling", "their", "respective", "resolves", "()", "method", ".", "If", "no", "matching", "route", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Router.php#L183-L205
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/Router.php
Router.createRoutesFromConfiguration
protected function createRoutesFromConfiguration() { if ($this->routesCreated === true) { return; } $this->initializeRoutesConfiguration(); $this->routes = []; $routesWithHttpMethodConstraints = []; foreach ($this->routesConfiguration as $routeConfiguratio...
php
protected function createRoutesFromConfiguration() { if ($this->routesCreated === true) { return; } $this->initializeRoutesConfiguration(); $this->routes = []; $routesWithHttpMethodConstraints = []; foreach ($this->routesConfiguration as $routeConfiguratio...
[ "protected", "function", "createRoutesFromConfiguration", "(", ")", "{", "if", "(", "$", "this", "->", "routesCreated", "===", "true", ")", "{", "return", ";", "}", "$", "this", "->", "initializeRoutesConfiguration", "(", ")", ";", "$", "this", "->", "routes...
Creates \Neos\Flow\Mvc\Routing\Route objects from the injected routes configuration. @return void @throws InvalidRouteSetupException
[ "Creates", "\\", "Neos", "\\", "Flow", "\\", "Mvc", "\\", "Routing", "\\", "Route", "objects", "from", "the", "injected", "routes", "configuration", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Router.php#L225-L267
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/Router.php
Router.initializeRoutesConfiguration
protected function initializeRoutesConfiguration() { if ($this->routesConfiguration === null) { $this->routesConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_ROUTES); } }
php
protected function initializeRoutesConfiguration() { if ($this->routesConfiguration === null) { $this->routesConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_ROUTES); } }
[ "protected", "function", "initializeRoutesConfiguration", "(", ")", "{", "if", "(", "$", "this", "->", "routesConfiguration", "===", "null", ")", "{", "$", "this", "->", "routesConfiguration", "=", "$", "this", "->", "configurationManager", "->", "getConfiguration...
Checks if a routes configuration was set and otherwise loads the configuration from the configuration manager. @return void
[ "Checks", "if", "a", "routes", "configuration", "was", "set", "and", "otherwise", "loads", "the", "configuration", "from", "the", "configuration", "manager", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Router.php#L274-L279
neos/flow-development-collection
Neos.Flow/Classes/Configuration/ConfigurationSchemaValidator.php
ConfigurationSchemaValidator.validate
public function validate(string $configurationType = null, string $path = null, array &$loadedSchemaFiles = []): Result { if ($configurationType === null) { $configurationTypes = $this->configurationManager->getAvailableConfigurationTypes(); } else { $configurationTypes = [$c...
php
public function validate(string $configurationType = null, string $path = null, array &$loadedSchemaFiles = []): Result { if ($configurationType === null) { $configurationTypes = $this->configurationManager->getAvailableConfigurationTypes(); } else { $configurationTypes = [$c...
[ "public", "function", "validate", "(", "string", "$", "configurationType", "=", "null", ",", "string", "$", "path", "=", "null", ",", "array", "&", "$", "loadedSchemaFiles", "=", "[", "]", ")", ":", "Result", "{", "if", "(", "$", "configurationType", "==...
Validate the given $configurationType and $path @param string $configurationType (optional) the configuration type to validate. if NULL, validates all configuration. @param string $path (optional) configuration path to validate @param array $loadedSchemaFiles (optional). if given, will be filled with a list of loaded ...
[ "Validate", "the", "given", "$configurationType", "and", "$path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/ConfigurationSchemaValidator.php#L66-L80
neos/flow-development-collection
Neos.Flow/Classes/Configuration/ConfigurationSchemaValidator.php
ConfigurationSchemaValidator.validateSingleType
protected function validateSingleType(string $configurationType, string $path = null, array&$loadedSchemaFiles = []): Result { $availableConfigurationTypes = $this->configurationManager->getAvailableConfigurationTypes(); if (in_array($configurationType, $availableConfigurationTypes) === false) { ...
php
protected function validateSingleType(string $configurationType, string $path = null, array&$loadedSchemaFiles = []): Result { $availableConfigurationTypes = $this->configurationManager->getAvailableConfigurationTypes(); if (in_array($configurationType, $availableConfigurationTypes) === false) { ...
[ "protected", "function", "validateSingleType", "(", "string", "$", "configurationType", ",", "string", "$", "path", "=", "null", ",", "array", "&", "$", "loadedSchemaFiles", "=", "[", "]", ")", ":", "Result", "{", "$", "availableConfigurationTypes", "=", "$", ...
Validate a single configuration type @param string $configurationType the configuration typr to validate @param string $path configuration path to validate, or NULL. @param array $loadedSchemaFiles will be filled with a list of loaded schema files @return \Neos\Error\Messages\Result @throws Exception\SchemaValidationE...
[ "Validate", "a", "single", "configuration", "type" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/ConfigurationSchemaValidator.php#L91-L154
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Interceptor/PolicyEnforcement.php
PolicyEnforcement.invoke
public function invoke() { $reason = ''; $privilegeSubject = new MethodPrivilegeSubject($this->joinPoint); try { $this->authenticationManager->authenticate(); } catch (EntityNotFoundException $exception) { throw new AuthenticationRequiredException('Could not...
php
public function invoke() { $reason = ''; $privilegeSubject = new MethodPrivilegeSubject($this->joinPoint); try { $this->authenticationManager->authenticate(); } catch (EntityNotFoundException $exception) { throw new AuthenticationRequiredException('Could not...
[ "public", "function", "invoke", "(", ")", "{", "$", "reason", "=", "''", ";", "$", "privilegeSubject", "=", "new", "MethodPrivilegeSubject", "(", "$", "this", "->", "joinPoint", ")", ";", "try", "{", "$", "this", "->", "authenticationManager", "->", "authe...
Invokes the security interception @return boolean true if the security checks was passed @throws AccessDeniedException @throws AuthenticationRequiredException if an entity could not be found (assuming it is bound to the current session), causing a redirect to the authentication entrypoint @throws NoTokensAuthenticated...
[ "Invokes", "the", "security", "interception" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Interceptor/PolicyEnforcement.php#L91-L113
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Interceptor/PolicyEnforcement.php
PolicyEnforcement.renderDecisionReasonMessage
protected function renderDecisionReasonMessage($privilegeReasonMessage) { if (count($this->securityContext->getRoles()) === 0) { $rolesMessage = 'No authenticated roles'; } else { $rolesMessage = 'Authenticated roles: ' . implode(', ', array_keys($this->securityContext->getRo...
php
protected function renderDecisionReasonMessage($privilegeReasonMessage) { if (count($this->securityContext->getRoles()) === 0) { $rolesMessage = 'No authenticated roles'; } else { $rolesMessage = 'Authenticated roles: ' . implode(', ', array_keys($this->securityContext->getRo...
[ "protected", "function", "renderDecisionReasonMessage", "(", "$", "privilegeReasonMessage", ")", "{", "if", "(", "count", "(", "$", "this", "->", "securityContext", "->", "getRoles", "(", ")", ")", "===", "0", ")", "{", "$", "rolesMessage", "=", "'No authentic...
Returns a string message, giving insights what happened during privilege evaluation. @param string $privilegeReasonMessage @return string
[ "Returns", "a", "string", "message", "giving", "insights", "what", "happened", "during", "privilege", "evaluation", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Interceptor/PolicyEnforcement.php#L121-L130
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/Token/PasswordToken.php
PasswordToken.updateCredentials
public function updateCredentials(ActionRequest $actionRequest) { if ($actionRequest->getHttpRequest()->getMethod() !== 'POST') { return; } $postArguments = $actionRequest->getInternalArguments(); $password = ObjectAccess::getPropertyPath($postArguments, '__authenticatio...
php
public function updateCredentials(ActionRequest $actionRequest) { if ($actionRequest->getHttpRequest()->getMethod() !== 'POST') { return; } $postArguments = $actionRequest->getInternalArguments(); $password = ObjectAccess::getPropertyPath($postArguments, '__authenticatio...
[ "public", "function", "updateCredentials", "(", "ActionRequest", "$", "actionRequest", ")", "{", "if", "(", "$", "actionRequest", "->", "getHttpRequest", "(", ")", "->", "getMethod", "(", ")", "!==", "'POST'", ")", "{", "return", ";", "}", "$", "postArgument...
Updates the password credential from the POST vars, if the POST parameters are available. Sets the authentication status to AUTHENTICATION_NEEDED, if credentials have been sent. Note: You need to send the password in this POST parameter: __authentication[Neos][Flow][Security][Authentication][Token][PasswordToken][pass...
[ "Updates", "the", "password", "credential", "from", "the", "POST", "vars", "if", "the", "POST", "parameters", "are", "available", ".", "Sets", "the", "authentication", "status", "to", "AUTHENTICATION_NEEDED", "if", "credentials", "have", "been", "sent", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/Token/PasswordToken.php#L46-L59
neos/flow-development-collection
Neos.Flow/Classes/Core/ProxyClassLoader.php
ProxyClassLoader.loadClass
public function loadClass($className) { $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->ignoredClassNames[$classNam...
php
public function loadClass($className) { $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->ignoredClassNames[$classNam...
[ "public", "function", "loadClass", "(", "$", "className", ")", "{", "$", "className", "=", "ltrim", "(", "$", "className", ",", "'\\\\'", ")", ";", "$", "namespaceParts", "=", "explode", "(", "'\\\\'", ",", "$", "className", ")", ";", "// Workaround for Do...
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/ProxyClassLoader.php#L84-L100
neos/flow-development-collection
Neos.Flow/Classes/Core/ProxyClassLoader.php
ProxyClassLoader.initializeAvailableProxyClasses
public function initializeAvailableProxyClasses(ApplicationContext $context = null) { if ($context === null) { return; } $proxyClasses = @include(FLOW_PATH_TEMPORARY_BASE . '/' . (string)$context . '/AvailableProxyClasses.php'); if ($proxyClasses !== false) { ...
php
public function initializeAvailableProxyClasses(ApplicationContext $context = null) { if ($context === null) { return; } $proxyClasses = @include(FLOW_PATH_TEMPORARY_BASE . '/' . (string)$context . '/AvailableProxyClasses.php'); if ($proxyClasses !== false) { ...
[ "public", "function", "initializeAvailableProxyClasses", "(", "ApplicationContext", "$", "context", "=", "null", ")", "{", "if", "(", "$", "context", "===", "null", ")", "{", "return", ";", "}", "$", "proxyClasses", "=", "@", "include", "(", "FLOW_PATH_TEMPORA...
Initialize available proxy classes from the cached list. @param ApplicationContext $context @return void
[ "Initialize", "available", "proxy", "classes", "from", "the", "cached", "list", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/ProxyClassLoader.php#L108-L118
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php
AbstractViewHelper.callRenderMethod
protected function callRenderMethod() { $renderMethodParameters = []; foreach ($this->argumentDefinitions as $argumentName => $argumentDefinition) { if ($argumentDefinition instanceof ArgumentDefinition && $argumentDefinition->isMethodParameter()) { $renderMethodParameter...
php
protected function callRenderMethod() { $renderMethodParameters = []; foreach ($this->argumentDefinitions as $argumentName => $argumentDefinition) { if ($argumentDefinition instanceof ArgumentDefinition && $argumentDefinition->isMethodParameter()) { $renderMethodParameter...
[ "protected", "function", "callRenderMethod", "(", ")", "{", "$", "renderMethodParameters", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "argumentDefinitions", "as", "$", "argumentName", "=>", "$", "argumentDefinition", ")", "{", "if", "(", "$", "ar...
Call the render() method and handle errors. @return string the rendered ViewHelper @throws Exception
[ "Call", "the", "render", "()", "method", "and", "handle", "errors", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php#L112-L134
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php
AbstractViewHelper.registerArgument
protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null) { if (array_key_exists($name, $this->argumentDefinitions)) { throw new Exception('Argument "' . $name . '" has already been defined, thus it should not be defined again.', 1253036401); ...
php
protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null) { if (array_key_exists($name, $this->argumentDefinitions)) { throw new Exception('Argument "' . $name . '" has already been defined, thus it should not be defined again.', 1253036401); ...
[ "protected", "function", "registerArgument", "(", "$", "name", ",", "$", "type", ",", "$", "description", ",", "$", "required", "=", "false", ",", "$", "defaultValue", "=", "null", ")", "{", "if", "(", "array_key_exists", "(", "$", "name", ",", "$", "t...
Register a new argument. Call this method from your ViewHelper subclass inside the initializeArguments() method. @param string $name Name of the argument @param string $type Type of the argument @param string $description Description of the argument @param boolean $required If true, argument is required. Defaults to f...
[ "Register", "a", "new", "argument", ".", "Call", "this", "method", "from", "your", "ViewHelper", "subclass", "inside", "the", "initializeArguments", "()", "method", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php#L162-L168
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php
AbstractViewHelper.registerRenderMethodArguments
protected function registerRenderMethodArguments() { foreach (static::getRenderMethodArgumentDefinitions($this->objectManager) as $argumentName => $definition) { $this->argumentDefinitions[$argumentName] = new ArgumentDefinition($definition[0], $definition[1], $definition[2], $definition[3], $de...
php
protected function registerRenderMethodArguments() { foreach (static::getRenderMethodArgumentDefinitions($this->objectManager) as $argumentName => $definition) { $this->argumentDefinitions[$argumentName] = new ArgumentDefinition($definition[0], $definition[1], $definition[2], $definition[3], $de...
[ "protected", "function", "registerRenderMethodArguments", "(", ")", "{", "foreach", "(", "static", "::", "getRenderMethodArgumentDefinitions", "(", "$", "this", "->", "objectManager", ")", "as", "$", "argumentName", "=>", "$", "definition", ")", "{", "$", "this", ...
Registers render method arguments @return void @deprecated Render method should no longer expect arguments, instead all arguments should be registered in "initializeArguments"
[ "Registers", "render", "method", "arguments" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractViewHelper.php#L199-L204
neos/flow-development-collection
Neos.Flow/Classes/Cache/CacheFactory.php
CacheFactory.instantiateCache
protected function instantiateCache(string $cacheIdentifier, string $cacheObjectName, BackendInterface $backend): FrontendInterface { $cache = parent::instantiateCache($cacheIdentifier, $cacheObjectName, $backend); if (is_callable([$cache, 'initializeObject'])) { $cache->initializeObjec...
php
protected function instantiateCache(string $cacheIdentifier, string $cacheObjectName, BackendInterface $backend): FrontendInterface { $cache = parent::instantiateCache($cacheIdentifier, $cacheObjectName, $backend); if (is_callable([$cache, 'initializeObject'])) { $cache->initializeObjec...
[ "protected", "function", "instantiateCache", "(", "string", "$", "cacheIdentifier", ",", "string", "$", "cacheObjectName", ",", "BackendInterface", "$", "backend", ")", ":", "FrontendInterface", "{", "$", "cache", "=", "parent", "::", "instantiateCache", "(", "$",...
{@inheritdoc}
[ "{" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheFactory.php#L120-L129
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.strtotitle
public static function strtotitle(string $string): string { $result = ''; $splitIntoLowerCaseWords = preg_split("/([\n\r\t ])/", self::strtolower($string), -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($splitIntoLowerCaseWords as $delimiterOrValue) { $result .= self::strtoupper(self::s...
php
public static function strtotitle(string $string): string { $result = ''; $splitIntoLowerCaseWords = preg_split("/([\n\r\t ])/", self::strtolower($string), -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($splitIntoLowerCaseWords as $delimiterOrValue) { $result .= self::strtoupper(self::s...
[ "public", "static", "function", "strtotitle", "(", "string", "$", "string", ")", ":", "string", "{", "$", "result", "=", "''", ";", "$", "splitIntoLowerCaseWords", "=", "preg_split", "(", "\"/([\\n\\r\\t ])/\"", ",", "self", "::", "strtolower", "(", "$", "st...
Converts the first character of each word to uppercase and all remaining characters to lowercase. @param string $string The string to convert @return string The converted string @api
[ "Converts", "the", "first", "character", "of", "each", "word", "to", "uppercase", "and", "all", "remaining", "characters", "to", "lowercase", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L31-L39
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.substr
public static function substr(string $string, int $start, int $length = null) { if ($length === 0) { return ''; } // Cannot omit $length, when specifying charset if ($length === null) { // save internal encoding $enc = mb_internal_encoding(); ...
php
public static function substr(string $string, int $start, int $length = null) { if ($length === 0) { return ''; } // Cannot omit $length, when specifying charset if ($length === null) { // save internal encoding $enc = mb_internal_encoding(); ...
[ "public", "static", "function", "substr", "(", "string", "$", "string", ",", "int", "$", "start", ",", "int", "$", "length", "=", "null", ")", "{", "if", "(", "$", "length", "===", "0", ")", "{", "return", "''", ";", "}", "// Cannot omit $length, when ...
Unicode variant of substr() @param string $string The string to crop @param integer $start Position of the left boundary @param integer $length (optional) Length of the returned string @return string The processed string @api
[ "Unicode", "variant", "of", "substr", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L50-L69
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.strtoupper
public static function strtoupper(string $string): string { return str_replace('ß', 'SS', mb_strtoupper($string, 'UTF-8')); }
php
public static function strtoupper(string $string): string { return str_replace('ß', 'SS', mb_strtoupper($string, 'UTF-8')); }
[ "public", "static", "function", "strtoupper", "(", "string", "$", "string", ")", ":", "string", "{", "return", "str_replace", "(", "'ß',", " ", "SS',", " ", "b_strtoupper(", "$", "s", "tring,", " ", "UTF-8')", ")", ";", "", "}" ]
Unicode variant of strtoupper() @param string $string The string to uppercase @return string The processed string @api
[ "Unicode", "variant", "of", "strtoupper", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L78-L81
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.ucfirst
public static function ucfirst(string $string): string { return self::strtoupper(self::substr($string, 0, 1)) . self::substr($string, 1); }
php
public static function ucfirst(string $string): string { return self::strtoupper(self::substr($string, 0, 1)) . self::substr($string, 1); }
[ "public", "static", "function", "ucfirst", "(", "string", "$", "string", ")", ":", "string", "{", "return", "self", "::", "strtoupper", "(", "self", "::", "substr", "(", "$", "string", ",", "0", ",", "1", ")", ")", ".", "self", "::", "substr", "(", ...
Unicode variant of ucfirst() - assumes that the string is a Unicode string, not binary @param string $string The string whose first letter should be uppercased @return string The same string, first character uppercased @api
[ "Unicode", "variant", "of", "ucfirst", "()", "-", "assumes", "that", "the", "string", "is", "a", "Unicode", "string", "not", "binary" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L114-L117
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.lcfirst
public static function lcfirst(string $string): string { return self::strtolower(self::substr($string, 0, 1)) . self::substr($string, 1); }
php
public static function lcfirst(string $string): string { return self::strtolower(self::substr($string, 0, 1)) . self::substr($string, 1); }
[ "public", "static", "function", "lcfirst", "(", "string", "$", "string", ")", ":", "string", "{", "return", "self", "::", "strtolower", "(", "self", "::", "substr", "(", "$", "string", ",", "0", ",", "1", ")", ")", ".", "self", "::", "substr", "(", ...
Unicode variant of lcfirst() - assumes that the string is a Unicode string, not binary @param string $string The string whose first letter should be lowercased @return string The same string, first character lowercased @api
[ "Unicode", "variant", "of", "lcfirst", "()", "-", "assumes", "that", "the", "string", "is", "a", "Unicode", "string", "not", "binary" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L126-L129
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.strpos
public static function strpos(string $haystack, string $needle, int $offset = 0) { return mb_strpos($haystack, $needle, $offset, 'UTF-8'); }
php
public static function strpos(string $haystack, string $needle, int $offset = 0) { return mb_strpos($haystack, $needle, $offset, 'UTF-8'); }
[ "public", "static", "function", "strpos", "(", "string", "$", "haystack", ",", "string", "$", "needle", ",", "int", "$", "offset", "=", "0", ")", "{", "return", "mb_strpos", "(", "$", "haystack", ",", "$", "needle", ",", "$", "offset", ",", "'UTF-8'", ...
Unicode variant of strpos() - assumes that the string is a Unicode string, not binary @param string $haystack UTF-8 string to search in @param string $needle UTF-8 string to search for @param integer $offset Positition to start the search @return integer The character position @api
[ "Unicode", "variant", "of", "strpos", "()", "-", "assumes", "that", "the", "string", "is", "a", "Unicode", "string", "not", "binary" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L140-L143
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.pathinfo
public static function pathinfo(string $path, int $options = null) { $currentLocale = setlocale(LC_CTYPE, 0); // Before we have a setting for setlocale, his should suffice for pathinfo // to work correctly on Unicode strings setlocale(LC_CTYPE, 'en_US.UTF-8'); $pathinfo = $op...
php
public static function pathinfo(string $path, int $options = null) { $currentLocale = setlocale(LC_CTYPE, 0); // Before we have a setting for setlocale, his should suffice for pathinfo // to work correctly on Unicode strings setlocale(LC_CTYPE, 'en_US.UTF-8'); $pathinfo = $op...
[ "public", "static", "function", "pathinfo", "(", "string", "$", "path", ",", "int", "$", "options", "=", "null", ")", "{", "$", "currentLocale", "=", "setlocale", "(", "LC_CTYPE", ",", "0", ")", ";", "// Before we have a setting for setlocale, his should suffice f...
Unicode variant of pathinfo() pathinfo() function is not unicode-friendly if setlocale is not set. It's sufficient to set it to any UTF-8 locale to correctly handle unicode strings. This wrapper function temporarily sets locale to 'en_US.UTF-8' and then restores original locale. It's not necessary to use this function ...
[ "Unicode", "variant", "of", "pathinfo", "()", "pathinfo", "()", "function", "is", "not", "unicode", "-", "friendly", "if", "setlocale", "is", "not", "set", ".", "It", "s", "sufficient", "to", "set", "it", "to", "any", "UTF", "-", "8", "locale", "to", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L162-L171
neos/flow-development-collection
Neos.Utility.Unicode/Classes/Functions.php
Functions.parse_url
public static function parse_url(string $url, int $component = -1) { // the host and port must be used as is, to allow IPv6 syntax, e.g.: [3b00:f59:1008::212:183:20]:8080 // thus we parse here, before url-encoding $componentsFromUrl = parse_url($url); if ($componentsFromUrl === false...
php
public static function parse_url(string $url, int $component = -1) { // the host and port must be used as is, to allow IPv6 syntax, e.g.: [3b00:f59:1008::212:183:20]:8080 // thus we parse here, before url-encoding $componentsFromUrl = parse_url($url); if ($componentsFromUrl === false...
[ "public", "static", "function", "parse_url", "(", "string", "$", "url", ",", "int", "$", "component", "=", "-", "1", ")", "{", "// the host and port must be used as is, to allow IPv6 syntax, e.g.: [3b00:f59:1008::212:183:20]:8080", "// thus we parse here, before url-encoding", ...
Parse a URL and return its components, UTF-8 safe @param string $url The URL to parse. Invalid characters are replaced by _. @param integer $component Specify one of PHP_URL_SCHEME, PHP_URL_HOST, PHP_URL_PORT, PHP_URL_USER, PHP_URL_PASS, PHP_URL_PATH, PHP_URL_QUERY or PHP_URL_FRAGMENT to retrieve just a specific URL c...
[ "Parse", "a", "URL", "and", "return", "its", "components", "UTF", "-", "8", "safe" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/Functions.php#L180-L234
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/PolicyService.php
PolicyService.initialize
protected function initialize() { if ($this->initialized) { return; } $this->policyConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_POLICY); $this->emitConfigurationLoaded($this->policyConfiguration); $this->...
php
protected function initialize() { if ($this->initialized) { return; } $this->policyConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_POLICY); $this->emitConfigurationLoaded($this->policyConfiguration); $this->...
[ "protected", "function", "initialize", "(", ")", "{", "if", "(", "$", "this", "->", "initialized", ")", "{", "return", ";", "}", "$", "this", "->", "policyConfiguration", "=", "$", "this", "->", "configurationManager", "->", "getConfiguration", "(", "Configu...
Parses the global policy configuration and initializes roles and privileges accordingly @return void @throws SecurityException
[ "Parses", "the", "global", "policy", "configuration", "and", "initializes", "roles", "and", "privileges", "accordingly" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/PolicyService.php#L92-L170
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/PolicyService.php
PolicyService.initializePrivilegeTargets
protected function initializePrivilegeTargets() { if (!isset($this->policyConfiguration['privilegeTargets'])) { return; } foreach ($this->policyConfiguration['privilegeTargets'] as $privilegeClassName => $privilegeTargetsConfiguration) { foreach ($privilegeTargetsConf...
php
protected function initializePrivilegeTargets() { if (!isset($this->policyConfiguration['privilegeTargets'])) { return; } foreach ($this->policyConfiguration['privilegeTargets'] as $privilegeClassName => $privilegeTargetsConfiguration) { foreach ($privilegeTargetsConf...
[ "protected", "function", "initializePrivilegeTargets", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "policyConfiguration", "[", "'privilegeTargets'", "]", ")", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "policyConfigu...
Initialized all configured privilege targets from the policy definitions @return void @throws SecurityException
[ "Initialized", "all", "configured", "privilege", "targets", "from", "the", "policy", "definitions" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/PolicyService.php#L178-L204