repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.initializeObject
public function initializeObject() { if (!$this->backend instanceof Backend\BackendInterface) { throw new MissingBackendException('A persistence backend must be set prior to initializing the persistence manager.', 1215508456); } $this->backend->setPersistenceManager($this); ...
php
public function initializeObject() { if (!$this->backend instanceof Backend\BackendInterface) { throw new MissingBackendException('A persistence backend must be set prior to initializing the persistence manager.', 1215508456); } $this->backend->setPersistenceManager($this); ...
[ "public", "function", "initializeObject", "(", ")", "{", "if", "(", "!", "$", "this", "->", "backend", "instanceof", "Backend", "\\", "BackendInterface", ")", "{", "throw", "new", "MissingBackendException", "(", "'A persistence backend must be set prior to initializing ...
Initializes the persistence manager @return void @throws MissingBackendException
[ "Initializes", "the", "persistence", "manager" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L125-L132
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.persistAll
public function persistAll($onlyWhitelistedObjects = false) { if ($onlyWhitelistedObjects) { foreach ($this->changedObjects as $object) { $this->throwExceptionIfObjectIsNotWhitelisted($object); } foreach ($this->removedObjects as $object) { ...
php
public function persistAll($onlyWhitelistedObjects = false) { if ($onlyWhitelistedObjects) { foreach ($this->changedObjects as $object) { $this->throwExceptionIfObjectIsNotWhitelisted($object); } foreach ($this->removedObjects as $object) { ...
[ "public", "function", "persistAll", "(", "$", "onlyWhitelistedObjects", "=", "false", ")", "{", "if", "(", "$", "onlyWhitelistedObjects", ")", "{", "foreach", "(", "$", "this", "->", "changedObjects", "as", "$", "object", ")", "{", "$", "this", "->", "thro...
Commits new objects and changes to objects in the current persistence session into the backend @param boolean $onlyWhitelistedObjects @return void @api
[ "Commits", "new", "objects", "and", "changes", "to", "objects", "in", "the", "current", "persistence", "session", "into", "the", "backend" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L166-L195
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.clearState
public function clearState() { parent::clearState(); $this->addedObjects = new \SplObjectStorage(); $this->removedObjects = new \SplObjectStorage(); $this->changedObjects = new \SplObjectStorage(); $this->persistenceSession->destroy(); $this->hasUnpersistedChanges = f...
php
public function clearState() { parent::clearState(); $this->addedObjects = new \SplObjectStorage(); $this->removedObjects = new \SplObjectStorage(); $this->changedObjects = new \SplObjectStorage(); $this->persistenceSession->destroy(); $this->hasUnpersistedChanges = f...
[ "public", "function", "clearState", "(", ")", "{", "parent", "::", "clearState", "(", ")", ";", "$", "this", "->", "addedObjects", "=", "new", "\\", "SplObjectStorage", "(", ")", ";", "$", "this", "->", "removedObjects", "=", "new", "\\", "SplObjectStorage...
Clears the in-memory state of the persistence. Managed instances become detached, any fetches will return data directly from the persistence "backend". It will also forget about new objects. @return void
[ "Clears", "the", "in", "-", "memory", "state", "of", "the", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L206-L214
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.getObjectByIdentifier
public function getObjectByIdentifier($identifier, $objectType = null, $useLazyLoading = false) { if (isset($this->newObjects[$identifier])) { return $this->newObjects[$identifier]; } if ($this->persistenceSession->hasIdentifier($identifier)) { return $this->persisten...
php
public function getObjectByIdentifier($identifier, $objectType = null, $useLazyLoading = false) { if (isset($this->newObjects[$identifier])) { return $this->newObjects[$identifier]; } if ($this->persistenceSession->hasIdentifier($identifier)) { return $this->persisten...
[ "public", "function", "getObjectByIdentifier", "(", "$", "identifier", ",", "$", "objectType", "=", "null", ",", "$", "useLazyLoading", "=", "false", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "newObjects", "[", "$", "identifier", "]", ")", ")...
Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned. @param mixed $identifier @param string $objectType @param boolean $useLazyLoading This option is ignored in this persistence manager @return object The object for the identifier if it is known, or NULL @api
[ "Returns", "the", "object", "with", "the", "(", "internal", ")", "identifier", "if", "it", "is", "known", "to", "the", "backend", ".", "Otherwise", "NULL", "is", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L255-L270
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.add
public function add($object) { $this->hasUnpersistedChanges = true; $this->addedObjects->attach($object); $this->removedObjects->detach($object); }
php
public function add($object) { $this->hasUnpersistedChanges = true; $this->addedObjects->attach($object); $this->removedObjects->detach($object); }
[ "public", "function", "add", "(", "$", "object", ")", "{", "$", "this", "->", "hasUnpersistedChanges", "=", "true", ";", "$", "this", "->", "addedObjects", "->", "attach", "(", "$", "object", ")", ";", "$", "this", "->", "removedObjects", "->", "detach",...
Adds an object to the persistence. @param object $object The object to add @return void @api
[ "Adds", "an", "object", "to", "the", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L303-L308
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.remove
public function remove($object) { $this->hasUnpersistedChanges = true; if ($this->addedObjects->contains($object)) { $this->addedObjects->detach($object); } else { $this->removedObjects->attach($object); } }
php
public function remove($object) { $this->hasUnpersistedChanges = true; if ($this->addedObjects->contains($object)) { $this->addedObjects->detach($object); } else { $this->removedObjects->attach($object); } }
[ "public", "function", "remove", "(", "$", "object", ")", "{", "$", "this", "->", "hasUnpersistedChanges", "=", "true", ";", "if", "(", "$", "this", "->", "addedObjects", "->", "contains", "(", "$", "object", ")", ")", "{", "$", "this", "->", "addedObje...
Removes an object to the persistence. @param object $object The object to remove @return void @api
[ "Removes", "an", "object", "to", "the", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L317-L325
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php
PersistenceManager.update
public function update($object) { if ($this->isNewObject($object)) { throw new UnknownObjectException('The object of type "' . get_class($object) . '" given to update must be persisted already, but is new.', 1249479819); } $this->hasUnpersistedChanges = true; $this->chang...
php
public function update($object) { if ($this->isNewObject($object)) { throw new UnknownObjectException('The object of type "' . get_class($object) . '" given to update must be persisted already, but is new.', 1249479819); } $this->hasUnpersistedChanges = true; $this->chang...
[ "public", "function", "update", "(", "$", "object", ")", "{", "if", "(", "$", "this", "->", "isNewObject", "(", "$", "object", ")", ")", "{", "throw", "new", "UnknownObjectException", "(", "'The object of type \"'", ".", "get_class", "(", "$", "object", ")...
Update an object in the persistence. @param object $object The modified object @return void @throws UnknownObjectException @api
[ "Update", "an", "object", "in", "the", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/PersistenceManager.php#L335-L342
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.set
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null) { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } ...
php
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null) { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } ...
[ "public", "function", "set", "(", "string", "$", "entryIdentifier", ",", "string", "$", "data", ",", "array", "$", "tags", "=", "[", "]", ",", "int", "$", "lifetime", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isFrozen", "(", ")", ")", ...
Saves data in the cache. @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. If the backend does not support tags, this option can be ignored. @param integer $lifetime Lifetime of this cache ent...
[ "Saves", "data", "in", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L125-L152
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.get
public function get(string $entryIdentifier) { return $this->uncompress($this->redis->get($this->buildKey('entry:' . $entryIdentifier))); }
php
public function get(string $entryIdentifier) { return $this->uncompress($this->redis->get($this->buildKey('entry:' . $entryIdentifier))); }
[ "public", "function", "get", "(", "string", "$", "entryIdentifier", ")", "{", "return", "$", "this", "->", "uncompress", "(", "$", "this", "->", "redis", "->", "get", "(", "$", "this", "->", "buildKey", "(", "'entry:'", ".", "$", "entryIdentifier", ")", ...
Loads data from the cache. @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 @api
[ "Loads", "data", "from", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L161-L164
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.has
public function has(string $entryIdentifier): bool { // exists returned true or false in phpredis versions < 4.0.0, now it returns the number of keys $existsResult = $this->redis->exists($this->buildKey('entry:' . $entryIdentifier)); return $existsResult === true || $existsResult > 0; }
php
public function has(string $entryIdentifier): bool { // exists returned true or false in phpredis versions < 4.0.0, now it returns the number of keys $existsResult = $this->redis->exists($this->buildKey('entry:' . $entryIdentifier)); return $existsResult === true || $existsResult > 0; }
[ "public", "function", "has", "(", "string", "$", "entryIdentifier", ")", ":", "bool", "{", "// exists returned true or false in phpredis versions < 4.0.0, now it returns the number of keys", "$", "existsResult", "=", "$", "this", "->", "redis", "->", "exists", "(", "$", ...
Checks if a cache entry with the specified identifier exists. @param string $entryIdentifier An identifier specifying the cache entry @return boolean true if such an entry exists, false if not @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/RedisBackend.php#L173-L178
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.remove
public function remove(string $entryIdentifier): bool { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot remove cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } do { $tagsKey = $this->buildKey('tags...
php
public function remove(string $entryIdentifier): bool { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot remove cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } do { $tagsKey = $this->buildKey('tags...
[ "public", "function", "remove", "(", "string", "$", "entryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "isFrozen", "(", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'Cannot remove cache entry because the b...
Removes all cache entries matching the specified identifier. Usually this only affects one entry but if - for what reason ever - old entries for the identifier still exist, they are removed as well. @param string $entryIdentifier Specifies the cache entry to remove @throws \RuntimeException @return boolean true if (at...
[ "Removes", "all", "cache", "entries", "matching", "the", "specified", "identifier", ".", "Usually", "this", "only", "affects", "one", "entry", "but", "if", "-", "for", "what", "reason", "ever", "-", "old", "entries", "for", "the", "identifier", "still", "exi...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L190-L210
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.flush
public function flush() { $script = " local entries = redis.call('LRANGE',KEYS[1],0,-1) for k1,entryIdentifier in ipairs(entries) do redis.call('DEL', ARGV[1]..'entry:'..entryIdentifier) local tags = redis.call('SMEMBERS', ARGV[1]..'tags:'..entryIdentifier) for k2,tagName in ipairs(tags) do ...
php
public function flush() { $script = " local entries = redis.call('LRANGE',KEYS[1],0,-1) for k1,entryIdentifier in ipairs(entries) do redis.call('DEL', ARGV[1]..'entry:'..entryIdentifier) local tags = redis.call('SMEMBERS', ARGV[1]..'tags:'..entryIdentifier) for k2,tagName in ipairs(tags) do ...
[ "public", "function", "flush", "(", ")", "{", "$", "script", "=", "\"\n\t\tlocal entries = redis.call('LRANGE',KEYS[1],0,-1)\n\t\tfor k1,entryIdentifier in ipairs(entries) do\n\t\t\tredis.call('DEL', ARGV[1]..'entry:'..entryIdentifier)\n\t\t\tlocal tags = redis.call('SMEMBERS', ARGV[1]..'tags:'..e...
Removes all cache entries of this cache The flush method will use the EVAL command to flush all entries and tags for this cache in an atomic way. @throws \RuntimeException @return void @api
[ "Removes", "all", "cache", "entries", "of", "this", "cache" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L222-L240
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.flushByTag
public function flushByTag(string $tag): int { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } $script = " local entries = redis.call('SMEMBERS...
php
public function flushByTag(string $tag): int { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } $script = " local entries = redis.call('SMEMBERS...
[ "public", "function", "flushByTag", "(", "string", "$", "tag", ")", ":", "int", "{", "if", "(", "$", "this", "->", "isFrozen", "(", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'Cannot add or modify cache entry because the bac...
Removes all cache entries of this cache which are tagged by the specified tag. @param string $tag The tag the entries must have @throws \RuntimeException @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/RedisBackend.php#L269-L290
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.key
public function key() { $entryIdentifier = $this->redis->lIndex($this->buildKey('entries'), $this->entryCursor); if ($entryIdentifier !== false && !$this->has($entryIdentifier)) { return false; } return $entryIdentifier; }
php
public function key() { $entryIdentifier = $this->redis->lIndex($this->buildKey('entries'), $this->entryCursor); if ($entryIdentifier !== false && !$this->has($entryIdentifier)) { return false; } return $entryIdentifier; }
[ "public", "function", "key", "(", ")", "{", "$", "entryIdentifier", "=", "$", "this", "->", "redis", "->", "lIndex", "(", "$", "this", "->", "buildKey", "(", "'entries'", ")", ",", "$", "this", "->", "entryCursor", ")", ";", "if", "(", "$", "entryIde...
{@inheritdoc}
[ "{" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L324-L331
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.freeze
public function freeze() { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } do { $entriesKey = $this->buildKey('entries'); ...
php
public function freeze() { if ($this->isFrozen()) { throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192); } do { $entriesKey = $this->buildKey('entries'); ...
[ "public", "function", "freeze", "(", ")", "{", "if", "(", "$", "this", "->", "isFrozen", "(", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'Cannot add or modify cache entry because the backend of cache \"%s\" is frozen.'", ",", "$",...
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. A frozen backend can only be thawn by calling the flush() method. @throws \RuntimeException @return void
[ "Freezes", "this", "cache", "backend", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L361-L378
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.isFrozen
public function isFrozen(): bool { if (null === $this->frozen) { $this->frozen = $this->redis->exists($this->buildKey('frozen')); } return $this->frozen; }
php
public function isFrozen(): bool { if (null === $this->frozen) { $this->frozen = $this->redis->exists($this->buildKey('frozen')); } return $this->frozen; }
[ "public", "function", "isFrozen", "(", ")", ":", "bool", "{", "if", "(", "null", "===", "$", "this", "->", "frozen", ")", "{", "$", "this", "->", "frozen", "=", "$", "this", "->", "redis", "->", "exists", "(", "$", "this", "->", "buildKey", "(", ...
Tells if this backend is frozen. @return boolean
[ "Tells", "if", "this", "backend", "is", "frozen", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/RedisBackend.php#L385-L392
neos/flow-development-collection
Neos.Cache/Classes/Backend/RedisBackend.php
RedisBackend.getStatus
public function getStatus(): Result { $result = new Result(); try { $this->verifyRedisVersionIsSupported(); } catch (CacheException $exception) { $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Redis Version')); return $re...
php
public function getStatus(): Result { $result = new Result(); try { $this->verifyRedisVersionIsSupported(); } catch (CacheException $exception) { $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Redis Version')); return $re...
[ "public", "function", "getStatus", "(", ")", ":", "Result", "{", "$", "result", "=", "new", "Result", "(", ")", ";", "try", "{", "$", "this", "->", "verifyRedisVersionIsSupported", "(", ")", ";", "}", "catch", "(", "CacheException", "$", "exception", ")"...
Validates that the configured redis backend is accessible and returns some details about its configuration if that's the case @return Result @api
[ "Validates", "that", "the", "configured", "redis", "backend", "is", "accessible", "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/RedisBackend.php#L548-L568
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateActionController
public function generateActionController($packageKey, $subpackage, $controllerName, $overwrite = false) { list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $controllerName = ucfirst($controllerName); $controlle...
php
public function generateActionController($packageKey, $subpackage, $controllerName, $overwrite = false) { list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $controllerName = ucfirst($controllerName); $controlle...
[ "public", "function", "generateActionController", "(", "$", "packageKey", ",", "$", "subpackage", ",", "$", "controllerName", ",", "$", "overwrite", "=", "false", ")", "{", "list", "(", "$", "baseNamespace", ",", "$", "namespaceEntryPath", ")", "=", "$", "th...
Generate a controller with the given name for the given package @param string $packageKey The package key of the controller's package @param string $subpackage An optional subpackage name @param string $controllerName The name of the new controller @param boolean $overwrite Overwrite any existing files? @return array ...
[ "Generate", "a", "controller", "with", "the", "given", "name", "for", "the", "given", "package" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L67-L93
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateView
public function generateView($packageKey, $subpackage, $controllerName, $viewName, $templateName, $overwrite = false) { list($baseNamespace) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $viewName = ucfirst($viewName); $templatePathAndFilename = '...
php
public function generateView($packageKey, $subpackage, $controllerName, $viewName, $templateName, $overwrite = false) { list($baseNamespace) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $viewName = ucfirst($viewName); $templatePathAndFilename = '...
[ "public", "function", "generateView", "(", "$", "packageKey", ",", "$", "subpackage", ",", "$", "controllerName", ",", "$", "viewName", ",", "$", "templateName", ",", "$", "overwrite", "=", "false", ")", "{", "list", "(", "$", "baseNamespace", ")", "=", ...
Generate a view with the given name for the given package and controller @param string $packageKey The package key of the controller's package @param string $subpackage An optional subpackage name @param string $controllerName The name of the new controller @param string $viewName The name of the view @param string $t...
[ "Generate", "a", "view", "with", "the", "given", "name", "for", "the", "given", "package", "and", "controller" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L180-L220
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateLayout
public function generateLayout($packageKey, $layoutName, $overwrite = false) { $layoutName = ucfirst($layoutName); $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/View/' . $layoutName . 'Layout.html'; $contextVariables = []; $contextVariables['packageKey']...
php
public function generateLayout($packageKey, $layoutName, $overwrite = false) { $layoutName = ucfirst($layoutName); $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/View/' . $layoutName . 'Layout.html'; $contextVariables = []; $contextVariables['packageKey']...
[ "public", "function", "generateLayout", "(", "$", "packageKey", ",", "$", "layoutName", ",", "$", "overwrite", "=", "false", ")", "{", "$", "layoutName", "=", "ucfirst", "(", "$", "layoutName", ")", ";", "$", "templatePathAndFilename", "=", "'resource://Neos.K...
Generate a default layout @param string $packageKey The package key of the controller's package @param string $layoutName The name of the layout @param boolean $overwrite Overwrite any existing files? @return array An array of generated filenames
[ "Generate", "a", "default", "layout" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L230-L248
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateModel
public function generateModel($packageKey, $modelName, array $fieldDefinitions, $overwrite = false) { list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $modelName = ucfirst($modelName); $namespace = trim($baseN...
php
public function generateModel($packageKey, $modelName, array $fieldDefinitions, $overwrite = false) { list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $modelName = ucfirst($modelName); $namespace = trim($baseN...
[ "public", "function", "generateModel", "(", "$", "packageKey", ",", "$", "modelName", ",", "array", "$", "fieldDefinitions", ",", "$", "overwrite", "=", "false", ")", "{", "list", "(", "$", "baseNamespace", ",", "$", "namespaceEntryPath", ")", "=", "$", "t...
Generate a model for the package with the given model name and fields @param string $packageKey The package key of the controller's package @param string $modelName The name of the new model @param array $fieldDefinitions The field definitions @param boolean $overwrite Overwrite any existing files? @return array An ar...
[ "Generate", "a", "model", "for", "the", "package", "with", "the", "given", "model", "name", "and", "fields" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L259-L285
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateRepository
public function generateRepository($packageKey, $modelName, $overwrite = false) { list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $modelName = ucfirst($modelName); $repositoryClassName = $modelName . 'Reposit...
php
public function generateRepository($packageKey, $modelName, $overwrite = false) { list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey)); $modelName = ucfirst($modelName); $repositoryClassName = $modelName . 'Reposit...
[ "public", "function", "generateRepository", "(", "$", "packageKey", ",", "$", "modelName", ",", "$", "overwrite", "=", "false", ")", "{", "list", "(", "$", "baseNamespace", ",", "$", "namespaceEntryPath", ")", "=", "$", "this", "->", "getPrimaryNamespaceAndEnt...
Generate a repository for a model given a model name and package key @param string $packageKey The package key @param string $modelName The name of the model @param boolean $overwrite Overwrite any existing files? @return array An array of generated filenames
[ "Generate", "a", "repository", "for", "a", "model", "given", "a", "model", "name", "and", "package", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L328-L352
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateDocumentation
public function generateDocumentation($packageKey) { $documentationPath = Files::concatenatePaths([$this->packageManager->getPackage($packageKey)->getPackagePath(), 'Documentation']); $contextVariables = []; $contextVariables['packageKey'] = $packageKey; $templatePathAndFilename = '...
php
public function generateDocumentation($packageKey) { $documentationPath = Files::concatenatePaths([$this->packageManager->getPackage($packageKey)->getPackagePath(), 'Documentation']); $contextVariables = []; $contextVariables['packageKey'] = $packageKey; $templatePathAndFilename = '...
[ "public", "function", "generateDocumentation", "(", "$", "packageKey", ")", "{", "$", "documentationPath", "=", "Files", "::", "concatenatePaths", "(", "[", "$", "this", "->", "packageManager", "->", "getPackage", "(", "$", "packageKey", ")", "->", "getPackagePa...
Generate a documentation skeleton for the package key @param string $packageKey The package key @return array An array of generated filenames
[ "Generate", "a", "documentation", "skeleton", "for", "the", "package", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L360-L389
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateTranslation
public function generateTranslation($packageKey, $sourceLanguageKey, array $targetLanguageKeys = []) { $translationPath = 'resource://' . $packageKey . '/Private/Translations'; $contextVariables = []; $contextVariables['packageKey'] = $packageKey; $contextVariables['sourceLanguageKey...
php
public function generateTranslation($packageKey, $sourceLanguageKey, array $targetLanguageKeys = []) { $translationPath = 'resource://' . $packageKey . '/Private/Translations'; $contextVariables = []; $contextVariables['packageKey'] = $packageKey; $contextVariables['sourceLanguageKey...
[ "public", "function", "generateTranslation", "(", "$", "packageKey", ",", "$", "sourceLanguageKey", ",", "array", "$", "targetLanguageKeys", "=", "[", "]", ")", "{", "$", "translationPath", "=", "'resource://'", ".", "$", "packageKey", ".", "'/Private/Translations...
Generate translation for the package key @param string $packageKey @param string $sourceLanguageKey @param array $targetLanguageKeys @return array An array of generated filenames
[ "Generate", "translation", "for", "the", "package", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L399-L426
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.normalizeFieldDefinitions
protected function normalizeFieldDefinitions(array $fieldDefinitions, $namespace = '') { foreach ($fieldDefinitions as &$fieldDefinition) { if ($fieldDefinition['type'] == 'bool') { $fieldDefinition['type'] = 'boolean'; } elseif ($fieldDefinition['type'] == 'int') { ...
php
protected function normalizeFieldDefinitions(array $fieldDefinitions, $namespace = '') { foreach ($fieldDefinitions as &$fieldDefinition) { if ($fieldDefinition['type'] == 'bool') { $fieldDefinition['type'] = 'boolean'; } elseif ($fieldDefinition['type'] == 'int') { ...
[ "protected", "function", "normalizeFieldDefinitions", "(", "array", "$", "fieldDefinitions", ",", "$", "namespace", "=", "''", ")", "{", "foreach", "(", "$", "fieldDefinitions", "as", "&", "$", "fieldDefinition", ")", "{", "if", "(", "$", "fieldDefinition", "[...
Normalize types and prefix types with namespaces @param array $fieldDefinitions The field definitions @param string $namespace The namespace @return array The normalized and type converted field definitions
[ "Normalize", "types", "and", "prefix", "types", "with", "namespaces" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L435-L451
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.generateFile
protected function generateFile($targetPathAndFilename, $fileContent, $force = false) { if (!is_dir(dirname($targetPathAndFilename))) { \Neos\Utility\Files::createDirectoryRecursively(dirname($targetPathAndFilename)); } if (substr($targetPathAndFilename, 0, 11) === 'resource://'...
php
protected function generateFile($targetPathAndFilename, $fileContent, $force = false) { if (!is_dir(dirname($targetPathAndFilename))) { \Neos\Utility\Files::createDirectoryRecursively(dirname($targetPathAndFilename)); } if (substr($targetPathAndFilename, 0, 11) === 'resource://'...
[ "protected", "function", "generateFile", "(", "$", "targetPathAndFilename", ",", "$", "fileContent", ",", "$", "force", "=", "false", ")", "{", "if", "(", "!", "is_dir", "(", "dirname", "(", "$", "targetPathAndFilename", ")", ")", ")", "{", "\\", "Neos", ...
Generate a file with the given content and add it to the generated files @param string $targetPathAndFilename @param string $fileContent @param boolean $force @return void
[ "Generate", "a", "file", "with", "the", "given", "content", "and", "add", "it", "to", "the", "generated", "files" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L462-L483
neos/flow-development-collection
Neos.Kickstarter/Classes/Service/GeneratorService.php
GeneratorService.renderTemplate
protected function renderTemplate($templatePathAndFilename, array $contextVariables) { $standaloneView = new StandaloneView(); $standaloneView->setTemplatePathAndFilename($templatePathAndFilename); $standaloneView->assignMultiple($contextVariables); return $standaloneView->render(); ...
php
protected function renderTemplate($templatePathAndFilename, array $contextVariables) { $standaloneView = new StandaloneView(); $standaloneView->setTemplatePathAndFilename($templatePathAndFilename); $standaloneView->assignMultiple($contextVariables); return $standaloneView->render(); ...
[ "protected", "function", "renderTemplate", "(", "$", "templatePathAndFilename", ",", "array", "$", "contextVariables", ")", "{", "$", "standaloneView", "=", "new", "StandaloneView", "(", ")", ";", "$", "standaloneView", "->", "setTemplatePathAndFilename", "(", "$", ...
Render the given template file with the given variables @param string $templatePathAndFilename @param array $contextVariables @return string @throws \Neos\FluidAdaptor\Core\Exception
[ "Render", "the", "given", "template", "file", "with", "the", "given", "variables" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Service/GeneratorService.php#L493-L499
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/OperationResolver.php
OperationResolver.initializeObject
public function initializeObject() { $operationsAndFinalOperationNames = static::buildOperationsAndFinalOperationNames($this->objectManager); $this->operations = $operationsAndFinalOperationNames[0]; $this->finalOperationNames = $operationsAndFinalOperationNames[1]; }
php
public function initializeObject() { $operationsAndFinalOperationNames = static::buildOperationsAndFinalOperationNames($this->objectManager); $this->operations = $operationsAndFinalOperationNames[0]; $this->finalOperationNames = $operationsAndFinalOperationNames[1]; }
[ "public", "function", "initializeObject", "(", ")", "{", "$", "operationsAndFinalOperationNames", "=", "static", "::", "buildOperationsAndFinalOperationNames", "(", "$", "this", "->", "objectManager", ")", ";", "$", "this", "->", "operations", "=", "$", "operationsA...
Initializer, building up $this->operations and $this->finalOperationNames
[ "Initializer", "building", "up", "$this", "-", ">", "operations", "and", "$this", "-", ">", "finalOperationNames" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/OperationResolver.php#L56-L61
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/OperationResolver.php
OperationResolver.resolveOperation
public function resolveOperation($operationName, $context) { if (!isset($this->operations[$operationName])) { throw new FlowQueryException('Operation "' . $operationName . '" not found.', 1332491837); } foreach ($this->operations[$operationName] as $operationClassName) { ...
php
public function resolveOperation($operationName, $context) { if (!isset($this->operations[$operationName])) { throw new FlowQueryException('Operation "' . $operationName . '" not found.', 1332491837); } foreach ($this->operations[$operationName] as $operationClassName) { ...
[ "public", "function", "resolveOperation", "(", "$", "operationName", ",", "$", "context", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "operations", "[", "$", "operationName", "]", ")", ")", "{", "throw", "new", "FlowQueryException", "(", "...
Resolve an operation, taking runtime constraints into account. @param string $operationName @param array|mixed $context @throws FlowQueryException @return OperationInterface the resolved operation
[ "Resolve", "an", "operation", "taking", "runtime", "constraints", "into", "account", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/OperationResolver.php#L120-L134
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Aspect/LazyLoadingObjectAspect.php
LazyLoadingObjectAspect.initialize
public function initialize(JoinPointInterface $joinPoint) { $proxy = $joinPoint->getProxy(); if (property_exists($proxy, 'Flow_Persistence_LazyLoadingObject_thawProperties') && $proxy->Flow_Persistence_LazyLoadingObject_thawProperties instanceof \Closure) { $proxy->Flow_Persistence_LazyL...
php
public function initialize(JoinPointInterface $joinPoint) { $proxy = $joinPoint->getProxy(); if (property_exists($proxy, 'Flow_Persistence_LazyLoadingObject_thawProperties') && $proxy->Flow_Persistence_LazyLoadingObject_thawProperties instanceof \Closure) { $proxy->Flow_Persistence_LazyL...
[ "public", "function", "initialize", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "proxy", "=", "$", "joinPoint", "->", "getProxy", "(", ")", ";", "if", "(", "property_exists", "(", "$", "proxy", ",", "'Flow_Persistence_LazyLoadingObject_thawProperti...
Before advice, making sure we initialize before use. This expects $proxy->Flow_Persistence_LazyLoadingObject_thawProperties to be a Closure that populates the object. That variable is unset after initializing the object! @param JoinPointInterface $joinPoint The current join point @return void @Flow\Before("Neos\Flow\...
[ "Before", "advice", "making", "sure", "we", "initialize", "before", "use", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Aspect/LazyLoadingObjectAspect.php#L50-L57
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodTargetExpressionParser.php
MethodTargetExpressionParser.parseDesignatorPointcut
protected function parseDesignatorPointcut(string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite, array &$trace = []): void { throw new InvalidPointcutExpressionException('The given method privilege target matcher contained an expression for a named pointcut. This no...
php
protected function parseDesignatorPointcut(string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite, array &$trace = []): void { throw new InvalidPointcutExpressionException('The given method privilege target matcher contained an expression for a named pointcut. This no...
[ "protected", "function", "parseDesignatorPointcut", "(", "string", "$", "operator", ",", "string", "$", "pointcutExpression", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ",", "array", "&", "$", "trace", "=", "[", "]", ")", ":", "void", "{", "...
Throws an exception, as recursive privilege targets are not allowed. @param string $operator The operator @param string $pointcutExpression The pointcut expression (value of the designator) @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the pointcu...
[ "Throws", "an", "exception", "as", "recursive", "privilege", "targets", "are", "not", "allowed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodTargetExpressionParser.php#L37-L40
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.injectSettings
public function injectSettings(array $settings) { if (isset($settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration']) && is_array($settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration'])) { $this->openSSLConfiguration = $settin...
php
public function injectSettings(array $settings) { if (isset($settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration']) && is_array($settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration'])) { $this->openSSLConfiguration = $settin...
[ "public", "function", "injectSettings", "(", "array", "$", "settings", ")", "{", "if", "(", "isset", "(", "$", "settings", "[", "'security'", "]", "[", "'cryptography'", "]", "[", "'RSAWalletServicePHP'", "]", "[", "'openSSLConfiguration'", "]", ")", "&&", "...
Injects the OpenSSL configuration to be used @param array $settings @return void @throws MissingConfigurationException @throws SecurityException
[ "Injects", "the", "OpenSSL", "configuration", "to", "be", "used" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L63-L81
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.initializeObject
public function initializeObject() { if (file_exists($this->keystorePathAndFilename)) { $this->keys = unserialize(file_get_contents($this->keystorePathAndFilename)); } $this->saveKeysOnShutdown = false; }
php
public function initializeObject() { if (file_exists($this->keystorePathAndFilename)) { $this->keys = unserialize(file_get_contents($this->keystorePathAndFilename)); } $this->saveKeysOnShutdown = false; }
[ "public", "function", "initializeObject", "(", ")", "{", "if", "(", "file_exists", "(", "$", "this", "->", "keystorePathAndFilename", ")", ")", "{", "$", "this", "->", "keys", "=", "unserialize", "(", "file_get_contents", "(", "$", "this", "->", "keystorePat...
Initializes the rsa wallet service by fetching the keys from the keystore file @return void
[ "Initializes", "the", "rsa", "wallet", "service", "by", "fetching", "the", "keys", "from", "the", "keystore", "file" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L88-L94
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.generateNewKeypair
public function generateNewKeypair($usedForPasswords = false) { $keyResource = openssl_pkey_new($this->openSSLConfiguration); if ($keyResource === false) { throw new SecurityException('OpenSSL private key generation failed.', 1254838154); } $modulus = $this->getModulus(...
php
public function generateNewKeypair($usedForPasswords = false) { $keyResource = openssl_pkey_new($this->openSSLConfiguration); if ($keyResource === false) { throw new SecurityException('OpenSSL private key generation failed.', 1254838154); } $modulus = $this->getModulus(...
[ "public", "function", "generateNewKeypair", "(", "$", "usedForPasswords", "=", "false", ")", "{", "$", "keyResource", "=", "openssl_pkey_new", "(", "$", "this", "->", "openSSLConfiguration", ")", ";", "if", "(", "$", "keyResource", "===", "false", ")", "{", ...
Generates a new keypair and returns a fingerprint to refer to it @param boolean $usedForPasswords true if this keypair should be used to encrypt passwords (then decryption won't be allowed!). @return string The RSA public key fingerprint for reference @throws SecurityException
[ "Generates", "a", "new", "keypair", "and", "returns", "a", "fingerprint", "to", "refer", "to", "it" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L103-L119
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.registerKeyPairFromPrivateKeyString
public function registerKeyPairFromPrivateKeyString($privateKeyString, $usedForPasswords = false) { $keyResource = openssl_pkey_get_private($privateKeyString); $modulus = $this->getModulus($keyResource); $publicKeyString = $this->getPublicKeyString($keyResource); $privateKey = new ...
php
public function registerKeyPairFromPrivateKeyString($privateKeyString, $usedForPasswords = false) { $keyResource = openssl_pkey_get_private($privateKeyString); $modulus = $this->getModulus($keyResource); $publicKeyString = $this->getPublicKeyString($keyResource); $privateKey = new ...
[ "public", "function", "registerKeyPairFromPrivateKeyString", "(", "$", "privateKeyString", ",", "$", "usedForPasswords", "=", "false", ")", "{", "$", "keyResource", "=", "openssl_pkey_get_private", "(", "$", "privateKeyString", ")", ";", "$", "modulus", "=", "$", ...
Adds the specified keypair to the local store and returns a fingerprint to refer to it. @param string $privateKeyString The private key in its string representation @param boolean $usedForPasswords true if this keypair should be used to encrypt passwords (then decryption won't be allowed!). @return string The RSA publ...
[ "Adds", "the", "specified", "keypair", "to", "the", "local", "store", "and", "returns", "a", "fingerprint", "to", "refer", "to", "it", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L128-L139
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.registerPublicKeyFromString
public function registerPublicKeyFromString($publicKeyString) { $keyResource = openssl_pkey_get_public($publicKeyString); $modulus = $this->getModulus($keyResource); $publicKey = new OpenSslRsaKey($modulus, $publicKeyString); return $this->storeKeyPair($publicKey, null, false); ...
php
public function registerPublicKeyFromString($publicKeyString) { $keyResource = openssl_pkey_get_public($publicKeyString); $modulus = $this->getModulus($keyResource); $publicKey = new OpenSslRsaKey($modulus, $publicKeyString); return $this->storeKeyPair($publicKey, null, false); ...
[ "public", "function", "registerPublicKeyFromString", "(", "$", "publicKeyString", ")", "{", "$", "keyResource", "=", "openssl_pkey_get_public", "(", "$", "publicKeyString", ")", ";", "$", "modulus", "=", "$", "this", "->", "getModulus", "(", "$", "keyResource", ...
Adds the specified public key to the wallet and returns a fingerprint to refer to it. This is helpful if you have not private key and want to use this key only to verify incoming data. @param string $publicKeyString The public key in its string representation @return string The RSA public key fingerprint for reference
[ "Adds", "the", "specified", "public", "key", "to", "the", "wallet", "and", "returns", "a", "fingerprint", "to", "refer", "to", "it", ".", "This", "is", "helpful", "if", "you", "have", "not", "private", "key", "and", "want", "to", "use", "this", "key", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L149-L157
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.getPublicKey
public function getPublicKey($fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438860); } return $this->keys[$fingerprint]['publicKey']; }
php
public function getPublicKey($fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438860); } return $this->keys[$fingerprint]['publicKey']; }
[ "public", "function", "getPublicKey", "(", "$", "fingerprint", ")", "{", "if", "(", "$", "fingerprint", "===", "null", "||", "!", "isset", "(", "$", "this", "->", "keys", "[", "$", "fingerprint", "]", ")", ")", "{", "throw", "new", "InvalidKeyPairIdExcep...
Returns the public key for the given fingerprint @param string $fingerprint The fingerprint of the stored key @return OpenSslRsaKey The public key @throws InvalidKeyPairIdException If the given fingerprint identifies no valid key pair
[ "Returns", "the", "public", "key", "for", "the", "given", "fingerprint" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L166-L173
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.encryptWithPublicKey
public function encryptWithPublicKey($plaintext, $fingerprint) { $cipher = ''; if (openssl_public_encrypt($plaintext, $cipher, $this->getPublicKey($fingerprint)->getKeyString(), $this->paddingAlgorithm) === false) { $openSslErrors = []; while (($errorMessage = openssl_error_s...
php
public function encryptWithPublicKey($plaintext, $fingerprint) { $cipher = ''; if (openssl_public_encrypt($plaintext, $cipher, $this->getPublicKey($fingerprint)->getKeyString(), $this->paddingAlgorithm) === false) { $openSslErrors = []; while (($errorMessage = openssl_error_s...
[ "public", "function", "encryptWithPublicKey", "(", "$", "plaintext", ",", "$", "fingerprint", ")", "{", "$", "cipher", "=", "''", ";", "if", "(", "openssl_public_encrypt", "(", "$", "plaintext", ",", "$", "cipher", ",", "$", "this", "->", "getPublicKey", "...
Encrypts the given plaintext with the public key identified by the given fingerprint @param string $plaintext The plaintext to encrypt @param string $fingerprint The fingerprint to identify to correct public key @return string The ciphertext @throws SecurityException If encryption failed for some other reason
[ "Encrypts", "the", "given", "plaintext", "with", "the", "public", "key", "identified", "by", "the", "given", "fingerprint" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L183-L195
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.decrypt
public function decrypt($cipher, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438861); } $keyPair = $this->keys[$fingerprint]; if ($keyPair['usedForPassword...
php
public function decrypt($cipher, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438861); } $keyPair = $this->keys[$fingerprint]; if ($keyPair['usedForPassword...
[ "public", "function", "decrypt", "(", "$", "cipher", ",", "$", "fingerprint", ")", "{", "if", "(", "$", "fingerprint", "===", "null", "||", "!", "isset", "(", "$", "this", "->", "keys", "[", "$", "fingerprint", "]", ")", ")", "{", "throw", "new", "...
Decrypts the given cipher with the private key identified by the given fingerprint Note: You should never decrypt a password with this function. Use checkRSAEncryptedPassword() to check passwords! @param string $cipher cipher text to decrypt @param string $fingerprint The fingerprint to identify the private key (RSA p...
[ "Decrypts", "the", "given", "cipher", "with", "the", "private", "key", "identified", "by", "the", "given", "fingerprint", "Note", ":", "You", "should", "never", "decrypt", "a", "password", "with", "this", "function", ".", "Use", "checkRSAEncryptedPassword", "()"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L209-L222
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.sign
public function sign($plaintext, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1299095799); } $signature = ''; openssl_sign($plaintext, $signature, $this->keys[$f...
php
public function sign($plaintext, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1299095799); } $signature = ''; openssl_sign($plaintext, $signature, $this->keys[$f...
[ "public", "function", "sign", "(", "$", "plaintext", ",", "$", "fingerprint", ")", "{", "if", "(", "$", "fingerprint", "===", "null", "||", "!", "isset", "(", "$", "this", "->", "keys", "[", "$", "fingerprint", "]", ")", ")", "{", "throw", "new", "...
Signs the given plaintext with the private key identified by the given fingerprint @param string $plaintext The plaintext to sign @param string $fingerprint The fingerprint to identify the private key (RSA public key fingerprint) @return string The signature of the given plaintext @throws InvalidKeyPairIdException If ...
[ "Signs", "the", "given", "plaintext", "with", "the", "private", "key", "identified", "by", "the", "given", "fingerprint" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L232-L242
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.verifySignature
public function verifySignature($plaintext, $signature, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1304959763); } $verifyResult = openssl_verify($plaintext, $signature...
php
public function verifySignature($plaintext, $signature, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1304959763); } $verifyResult = openssl_verify($plaintext, $signature...
[ "public", "function", "verifySignature", "(", "$", "plaintext", ",", "$", "signature", ",", "$", "fingerprint", ")", "{", "if", "(", "$", "fingerprint", "===", "null", "||", "!", "isset", "(", "$", "this", "->", "keys", "[", "$", "fingerprint", "]", ")...
Checks whether the given signature is valid for the given plaintext with the public key identified by the given fingerprint @param string $plaintext The plaintext to sign @param string $signature The signature that should be verified @param string $fingerprint The fingerprint to identify the public key (RSA public key...
[ "Checks", "whether", "the", "given", "signature", "is", "valid", "for", "the", "given", "plaintext", "with", "the", "public", "key", "identified", "by", "the", "given", "fingerprint" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L254-L263
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.checkRSAEncryptedPassword
public function checkRSAEncryptedPassword($encryptedPassword, $passwordHash, $salt, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1233655216); } $decryptedPassword = $thi...
php
public function checkRSAEncryptedPassword($encryptedPassword, $passwordHash, $salt, $fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1233655216); } $decryptedPassword = $thi...
[ "public", "function", "checkRSAEncryptedPassword", "(", "$", "encryptedPassword", ",", "$", "passwordHash", ",", "$", "salt", ",", "$", "fingerprint", ")", "{", "if", "(", "$", "fingerprint", "===", "null", "||", "!", "isset", "(", "$", "this", "->", "keys...
Checks if the given encrypted password is correct by comparing it's md5 hash. The salt is appended to the decrypted password string before hashing. @param string $encryptedPassword The received, RSA encrypted password to check @param string $passwordHash The md5 hashed password string (md5(md5(password) . salt)) @para...
[ "Checks", "if", "the", "given", "encrypted", "password", "is", "correct", "by", "comparing", "it", "s", "md5", "hash", ".", "The", "salt", "is", "appended", "to", "the", "decrypted", "password", "string", "before", "hashing", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L276-L285
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.destroyKeypair
public function destroyKeypair($fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438863); } unset($this->keys[$fingerprint]); $this->saveKeysOnShutdown = true; ...
php
public function destroyKeypair($fingerprint) { if ($fingerprint === null || !isset($this->keys[$fingerprint])) { throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438863); } unset($this->keys[$fingerprint]); $this->saveKeysOnShutdown = true; ...
[ "public", "function", "destroyKeypair", "(", "$", "fingerprint", ")", "{", "if", "(", "$", "fingerprint", "===", "null", "||", "!", "isset", "(", "$", "this", "->", "keys", "[", "$", "fingerprint", "]", ")", ")", "{", "throw", "new", "InvalidKeyPairIdExc...
Destroys the keypair identified by the given fingerprint @param string $fingerprint The fingerprint @return void @throws InvalidKeyPairIdException If the given fingerprint identifies no valid key pair
[ "Destroys", "the", "keypair", "identified", "by", "the", "given", "fingerprint" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L294-L302
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.decryptWithPrivateKey
private function decryptWithPrivateKey($cipher, OpenSslRsaKey $privateKey) { $decrypted = ''; $key = openssl_pkey_get_private($privateKey->getKeyString()); if (openssl_private_decrypt($cipher, $decrypted, $key, $this->paddingAlgorithm) === false) { // Fallback for data that was e...
php
private function decryptWithPrivateKey($cipher, OpenSslRsaKey $privateKey) { $decrypted = ''; $key = openssl_pkey_get_private($privateKey->getKeyString()); if (openssl_private_decrypt($cipher, $decrypted, $key, $this->paddingAlgorithm) === false) { // Fallback for data that was e...
[ "private", "function", "decryptWithPrivateKey", "(", "$", "cipher", ",", "OpenSslRsaKey", "$", "privateKey", ")", "{", "$", "decrypted", "=", "''", ";", "$", "key", "=", "openssl_pkey_get_private", "(", "$", "privateKey", "->", "getKeyString", "(", ")", ")", ...
Decrypts the given ciphertext with the given private key @param string $cipher The ciphertext to decrypt @param OpenSslRsaKey $privateKey The private key @return string The decrypted plaintext @throws SecurityException
[ "Decrypts", "the", "given", "ciphertext", "with", "the", "given", "private", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L349-L368
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.storeKeyPair
private function storeKeyPair($publicKey, $privateKey, $usedForPasswords) { $publicKeyFingerprint = $this->getFingerprintByPublicKey($publicKey->getKeyString()); $keyPair = []; $keyPair['publicKey'] = $publicKey; $keyPair['privateKey'] = $privateKey; $keyPair['usedForPasswor...
php
private function storeKeyPair($publicKey, $privateKey, $usedForPasswords) { $publicKeyFingerprint = $this->getFingerprintByPublicKey($publicKey->getKeyString()); $keyPair = []; $keyPair['publicKey'] = $publicKey; $keyPair['privateKey'] = $privateKey; $keyPair['usedForPasswor...
[ "private", "function", "storeKeyPair", "(", "$", "publicKey", ",", "$", "privateKey", ",", "$", "usedForPasswords", ")", "{", "$", "publicKeyFingerprint", "=", "$", "this", "->", "getFingerprintByPublicKey", "(", "$", "publicKey", "->", "getKeyString", "(", ")",...
Stores the given keypair and returns its fingerprint. The SSH fingerprint of the RSA public key will be used as an identifier for consistent key access. @param OpenSslRsaKey $publicKey The public key @param OpenSslRsaKey $privateKey The private key @param boolean $usedForPasswords true if this keypair should be used ...
[ "Stores", "the", "given", "keypair", "and", "returns", "its", "fingerprint", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L381-L394
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.shutdownObject
public function shutdownObject() { if ($this->saveKeysOnShutdown === false) { return; } $temporaryKeystorePathAndFilename = $this->keystorePathAndFilename . Utility\Algorithms::generateRandomString(13) . '.temp'; $result = file_put_contents($temporaryKeystorePathAndFilen...
php
public function shutdownObject() { if ($this->saveKeysOnShutdown === false) { return; } $temporaryKeystorePathAndFilename = $this->keystorePathAndFilename . Utility\Algorithms::generateRandomString(13) . '.temp'; $result = file_put_contents($temporaryKeystorePathAndFilen...
[ "public", "function", "shutdownObject", "(", ")", "{", "if", "(", "$", "this", "->", "saveKeysOnShutdown", "===", "false", ")", "{", "return", ";", "}", "$", "temporaryKeystorePathAndFilename", "=", "$", "this", "->", "keystorePathAndFilename", ".", "Utility", ...
Stores the keys array in the keystore file @return void @throws SecurityException
[ "Stores", "the", "keys", "array", "in", "the", "keystore", "file" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L402-L421
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.getFingerprintByPublicKey
public function getFingerprintByPublicKey($publicKeyString) { $keyResource = openssl_pkey_get_public($publicKeyString); $keyDetails = openssl_pkey_get_details($keyResource); $modulus = $this->sshConvertMpint($keyDetails['rsa']['n']); $publicExponent = $this->sshConvertMpint($keyDetai...
php
public function getFingerprintByPublicKey($publicKeyString) { $keyResource = openssl_pkey_get_public($publicKeyString); $keyDetails = openssl_pkey_get_details($keyResource); $modulus = $this->sshConvertMpint($keyDetails['rsa']['n']); $publicExponent = $this->sshConvertMpint($keyDetai...
[ "public", "function", "getFingerprintByPublicKey", "(", "$", "publicKeyString", ")", "{", "$", "keyResource", "=", "openssl_pkey_get_public", "(", "$", "publicKeyString", ")", ";", "$", "keyDetails", "=", "openssl_pkey_get_details", "(", "$", "keyResource", ")", ";"...
Generate an OpenSSH fingerprint for a RSA public key See <http://tools.ietf.org/html/rfc4253#page-15> for reference of OpenSSH "ssh-rsa" key format. The fingerprint is obtained by applying an MD5 hash on the raw public key bytes. If you have a PEM encoded private key, you can generate the same fingerprint using this:...
[ "Generate", "an", "OpenSSH", "fingerprint", "for", "a", "RSA", "public", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L439-L449
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php
RsaWalletServicePhp.sshConvertMpint
private function sshConvertMpint($bytes) { if (empty($bytes)) { $bytes = chr(0); } if (ord($bytes[0]) & 0x80) { $bytes = chr(0) . $bytes; } return $bytes; }
php
private function sshConvertMpint($bytes) { if (empty($bytes)) { $bytes = chr(0); } if (ord($bytes[0]) & 0x80) { $bytes = chr(0) . $bytes; } return $bytes; }
[ "private", "function", "sshConvertMpint", "(", "$", "bytes", ")", "{", "if", "(", "empty", "(", "$", "bytes", ")", ")", "{", "$", "bytes", "=", "chr", "(", "0", ")", ";", "}", "if", "(", "ord", "(", "$", "bytes", "[", "0", "]", ")", "&", "0x8...
Convert a binary representation of a multiple precision integer to mpint format defined for SSH RSA key exchange (used in "ssh-rsa" format). See <http://tools.ietf.org/html/rfc4251#page-8> for mpint encoding @param string $bytes Binary representation of integer @return string The mpint encoded integer
[ "Convert", "a", "binary", "representation", "of", "a", "multiple", "precision", "integer", "to", "mpint", "format", "defined", "for", "SSH", "RSA", "key", "exchange", "(", "used", "in", "ssh", "-", "rsa", "format", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/RsaWalletServicePhp.php#L460-L470
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/RequestFilter.php
RequestFilter.filterRequest
public function filterRequest(RequestInterface $request) { if ($this->pattern->matchRequest($request)) { $this->securityInterceptor->invoke(); return true; } return false; }
php
public function filterRequest(RequestInterface $request) { if ($this->pattern->matchRequest($request)) { $this->securityInterceptor->invoke(); return true; } return false; }
[ "public", "function", "filterRequest", "(", "RequestInterface", "$", "request", ")", "{", "if", "(", "$", "this", "->", "pattern", "->", "matchRequest", "(", "$", "request", ")", ")", "{", "$", "this", "->", "securityInterceptor", "->", "invoke", "(", ")",...
Tries to match the given request against this filter and calls the set security interceptor on success. @param RequestInterface $request The request to be matched @return boolean Returns true if the filter matched, false otherwise
[ "Tries", "to", "match", "the", "given", "request", "against", "this", "filter", "and", "calls", "the", "set", "security", "interceptor", "on", "success", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/RequestFilter.php#L72-L79
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.initializeArguments
public function initializeArguments() { $this->registerTagAttribute('enctype', 'string', 'MIME type with which the form is submitted'); $this->registerTagAttribute('method', 'string', 'Transfer type (GET or POST or dialog)'); $this->registerTagAttribute('name', 'string', 'Name of form'); ...
php
public function initializeArguments() { $this->registerTagAttribute('enctype', 'string', 'MIME type with which the form is submitted'); $this->registerTagAttribute('method', 'string', 'Transfer type (GET or POST or dialog)'); $this->registerTagAttribute('name', 'string', 'Name of form'); ...
[ "public", "function", "initializeArguments", "(", ")", "{", "$", "this", "->", "registerTagAttribute", "(", "'enctype'", ",", "'string'", ",", "'MIME type with which the form is submitted'", ")", ";", "$", "this", "->", "registerTagAttribute", "(", "'method'", ",", ...
Initialize arguments. @return void
[ "Initialize", "arguments", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L103-L128
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.render
public function render() { $this->formActionUri = null; if ($this->arguments['action'] === null && $this->arguments['actionUri'] === null) { throw new ViewHelper\Exception('FormViewHelper requires "actionUri" or "action" argument to be specified', 1355243748); } $this->ta...
php
public function render() { $this->formActionUri = null; if ($this->arguments['action'] === null && $this->arguments['actionUri'] === null) { throw new ViewHelper\Exception('FormViewHelper requires "actionUri" or "action" argument to be specified', 1355243748); } $this->ta...
[ "public", "function", "render", "(", ")", "{", "$", "this", "->", "formActionUri", "=", "null", ";", "if", "(", "$", "this", "->", "arguments", "[", "'action'", "]", "===", "null", "&&", "$", "this", "->", "arguments", "[", "'actionUri'", "]", "===", ...
Render the form. @return string rendered form @api @throws ViewHelper\Exception
[ "Render", "the", "form", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L137-L191
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.getFormActionUri
protected function getFormActionUri() { if ($this->formActionUri !== null) { return $this->formActionUri; } if ($this->hasArgument('actionUri')) { $this->formActionUri = $this->arguments['actionUri']; } else { $uriBuilder = $this->controllerContext...
php
protected function getFormActionUri() { if ($this->formActionUri !== null) { return $this->formActionUri; } if ($this->hasArgument('actionUri')) { $this->formActionUri = $this->arguments['actionUri']; } else { $uriBuilder = $this->controllerContext...
[ "protected", "function", "getFormActionUri", "(", ")", "{", "if", "(", "$", "this", "->", "formActionUri", "!==", "null", ")", "{", "return", "$", "this", "->", "formActionUri", ";", "}", "if", "(", "$", "this", "->", "hasArgument", "(", "'actionUri'", "...
Returns the action URI of the form tag. If the argument "actionUri" is specified, this will be returned Otherwise this creates the action URI using the UriBuilder @return string @throws ViewHelper\Exception if the action URI could not be created
[ "Returns", "the", "action", "URI", "of", "the", "form", "tag", ".", "If", "the", "argument", "actionUri", "is", "specified", "this", "will", "be", "returned", "Otherwise", "this", "creates", "the", "action", "URI", "using", "the", "UriBuilder" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L201-L238
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.renderHiddenActionUriQueryParameters
protected function renderHiddenActionUriQueryParameters() { $result = ''; $actionUri = $this->getFormActionUri(); $query = parse_url($actionUri, PHP_URL_QUERY); if (is_string($query)) { $queryParts = explode('&', $query); foreach ($queryParts as $queryPart) {...
php
protected function renderHiddenActionUriQueryParameters() { $result = ''; $actionUri = $this->getFormActionUri(); $query = parse_url($actionUri, PHP_URL_QUERY); if (is_string($query)) { $queryParts = explode('&', $query); foreach ($queryParts as $queryPart) {...
[ "protected", "function", "renderHiddenActionUriQueryParameters", "(", ")", "{", "$", "result", "=", "''", ";", "$", "actionUri", "=", "$", "this", "->", "getFormActionUri", "(", ")", ";", "$", "query", "=", "parse_url", "(", "$", "actionUri", ",", "PHP_URL_Q...
Render hidden form fields for query parameters from action URI. This is only needed if the form method is GET. @return string Hidden fields for query parameters from action URI
[ "Render", "hidden", "form", "fields", "for", "query", "parameters", "from", "action", "URI", ".", "This", "is", "only", "needed", "if", "the", "form", "method", "is", "GET", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L246-L262
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.renderAdditionalIdentityFields
protected function renderAdditionalIdentityFields() { if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties')) { $additionalIdentityProperties = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\For...
php
protected function renderAdditionalIdentityFields() { if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties')) { $additionalIdentityProperties = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\For...
[ "protected", "function", "renderAdditionalIdentityFields", "(", ")", "{", "if", "(", "$", "this", "->", "viewHelperVariableContainer", "->", "exists", "(", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "FormViewHelper", "::", "class", ",", "'addit...
Render additional identity fields which were registered by form elements. This happens if a form field is defined like property="bla.blubb" - then we might need an identity property for the sub-object "bla". @return string HTML-string for the additional identity properties
[ "Render", "additional", "identity", "fields", "which", "were", "registered", "by", "form", "elements", ".", "This", "happens", "if", "a", "form", "field", "is", "defined", "like", "property", "=", "bla", ".", "blubb", "-", "then", "we", "might", "need", "a...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L270-L281
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.addFormObjectNameToViewHelperVariableContainer
protected function addFormObjectNameToViewHelperVariableContainer() { $formObjectName = $this->getFormObjectName(); if ($formObjectName !== null) { $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName', $formObjectName); } ...
php
protected function addFormObjectNameToViewHelperVariableContainer() { $formObjectName = $this->getFormObjectName(); if ($formObjectName !== null) { $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName', $formObjectName); } ...
[ "protected", "function", "addFormObjectNameToViewHelperVariableContainer", "(", ")", "{", "$", "formObjectName", "=", "$", "this", "->", "getFormObjectName", "(", ")", ";", "if", "(", "$", "formObjectName", "!==", "null", ")", "{", "$", "this", "->", "viewHelper...
Adds the form object name to the ViewHelperVariableContainer if "objectName" argument or "name" attribute is specified. @return void
[ "Adds", "the", "form", "object", "name", "to", "the", "ViewHelperVariableContainer", "if", "objectName", "argument", "or", "name", "attribute", "is", "specified", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L338-L344
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.removeFormObjectNameFromViewHelperVariableContainer
protected function removeFormObjectNameFromViewHelperVariableContainer() { $formObjectName = $this->getFormObjectName(); if ($formObjectName !== null) { $this->viewHelperVariableContainer->remove(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName'); } }
php
protected function removeFormObjectNameFromViewHelperVariableContainer() { $formObjectName = $this->getFormObjectName(); if ($formObjectName !== null) { $this->viewHelperVariableContainer->remove(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName'); } }
[ "protected", "function", "removeFormObjectNameFromViewHelperVariableContainer", "(", ")", "{", "$", "formObjectName", "=", "$", "this", "->", "getFormObjectName", "(", ")", ";", "if", "(", "$", "formObjectName", "!==", "null", ")", "{", "$", "this", "->", "viewH...
Removes the form object name from the ViewHelperVariableContainer. @return void
[ "Removes", "the", "form", "object", "name", "from", "the", "ViewHelperVariableContainer", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L351-L357
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.getFormObjectName
protected function getFormObjectName() { $formObjectName = null; if ($this->hasArgument('objectName')) { $formObjectName = $this->arguments['objectName']; } elseif ($this->hasArgument('name')) { $formObjectName = $this->arguments['name']; } return $for...
php
protected function getFormObjectName() { $formObjectName = null; if ($this->hasArgument('objectName')) { $formObjectName = $this->arguments['objectName']; } elseif ($this->hasArgument('name')) { $formObjectName = $this->arguments['name']; } return $for...
[ "protected", "function", "getFormObjectName", "(", ")", "{", "$", "formObjectName", "=", "null", ";", "if", "(", "$", "this", "->", "hasArgument", "(", "'objectName'", ")", ")", "{", "$", "formObjectName", "=", "$", "this", "->", "arguments", "[", "'object...
Returns the name of the object that is bound to this form. If the "objectName" argument has been specified, this is returned. Otherwise the name attribute of this form. If neither objectName nor name arguments have been set, NULL is returned. @return string specified Form name or NULL if neither $objectName nor $name ...
[ "Returns", "the", "name", "of", "the", "object", "that", "is", "bound", "to", "this", "form", ".", "If", "the", "objectName", "argument", "has", "been", "specified", "this", "is", "returned", ".", "Otherwise", "the", "name", "attribute", "of", "this", "for...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L366-L375
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.addFormObjectToViewHelperVariableContainer
protected function addFormObjectToViewHelperVariableContainer() { if ($this->hasArgument('object')) { $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObject', $this->arguments['object']); $this->viewHelperVariableContainer->add(\Neos...
php
protected function addFormObjectToViewHelperVariableContainer() { if ($this->hasArgument('object')) { $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObject', $this->arguments['object']); $this->viewHelperVariableContainer->add(\Neos...
[ "protected", "function", "addFormObjectToViewHelperVariableContainer", "(", ")", "{", "if", "(", "$", "this", "->", "hasArgument", "(", "'object'", ")", ")", "{", "$", "this", "->", "viewHelperVariableContainer", "->", "add", "(", "\\", "Neos", "\\", "FluidAdapt...
Adds the object that is bound to this form to the ViewHelperVariableContainer if the formObject attribute is specified. @return void
[ "Adds", "the", "object", "that", "is", "bound", "to", "this", "form", "to", "the", "ViewHelperVariableContainer", "if", "the", "formObject", "attribute", "is", "specified", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L382-L388
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.removeFormObjectFromViewHelperVariableContainer
protected function removeFormObjectFromViewHelperVariableContainer() { if ($this->hasArgument('object')) { $this->viewHelperVariableContainer->remove(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObject'); $this->viewHelperVariableContainer->remove(\Neos\FluidAdaptor\Vie...
php
protected function removeFormObjectFromViewHelperVariableContainer() { if ($this->hasArgument('object')) { $this->viewHelperVariableContainer->remove(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObject'); $this->viewHelperVariableContainer->remove(\Neos\FluidAdaptor\Vie...
[ "protected", "function", "removeFormObjectFromViewHelperVariableContainer", "(", ")", "{", "if", "(", "$", "this", "->", "hasArgument", "(", "'object'", ")", ")", "{", "$", "this", "->", "viewHelperVariableContainer", "->", "remove", "(", "\\", "Neos", "\\", "Fl...
Removes the form object from the ViewHelperVariableContainer. @return void
[ "Removes", "the", "form", "object", "from", "the", "ViewHelperVariableContainer", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L395-L401
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.addFieldNamePrefixToViewHelperVariableContainer
protected function addFieldNamePrefixToViewHelperVariableContainer() { $fieldNamePrefix = $this->getFieldNamePrefix(); $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix', $fieldNamePrefix); }
php
protected function addFieldNamePrefixToViewHelperVariableContainer() { $fieldNamePrefix = $this->getFieldNamePrefix(); $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix', $fieldNamePrefix); }
[ "protected", "function", "addFieldNamePrefixToViewHelperVariableContainer", "(", ")", "{", "$", "fieldNamePrefix", "=", "$", "this", "->", "getFieldNamePrefix", "(", ")", ";", "$", "this", "->", "viewHelperVariableContainer", "->", "add", "(", "\\", "Neos", "\\", ...
Adds the field name prefix to the ViewHelperVariableContainer @return void
[ "Adds", "the", "field", "name", "prefix", "to", "the", "ViewHelperVariableContainer" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L408-L412
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.getDefaultFieldNamePrefix
protected function getDefaultFieldNamePrefix() { $request = $this->controllerContext->getRequest(); if (!$request->isMainRequest()) { if ($this->arguments['useParentRequest'] === true) { return $request->getParentRequest()->getArgumentNamespace(); } else { ...
php
protected function getDefaultFieldNamePrefix() { $request = $this->controllerContext->getRequest(); if (!$request->isMainRequest()) { if ($this->arguments['useParentRequest'] === true) { return $request->getParentRequest()->getArgumentNamespace(); } else { ...
[ "protected", "function", "getDefaultFieldNamePrefix", "(", ")", "{", "$", "request", "=", "$", "this", "->", "controllerContext", "->", "getRequest", "(", ")", ";", "if", "(", "!", "$", "request", "->", "isMainRequest", "(", ")", ")", "{", "if", "(", "$"...
Retrieves the default field name prefix for this form @return string default field name prefix
[ "Retrieves", "the", "default", "field", "name", "prefix", "for", "this", "form" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L433-L444
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.renderEmptyHiddenFields
protected function renderEmptyHiddenFields() { $result = ''; if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'emptyHiddenFieldNames')) { $emptyHiddenFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\Fo...
php
protected function renderEmptyHiddenFields() { $result = ''; if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'emptyHiddenFieldNames')) { $emptyHiddenFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\Fo...
[ "protected", "function", "renderEmptyHiddenFields", "(", ")", "{", "$", "result", "=", "''", ";", "if", "(", "$", "this", "->", "viewHelperVariableContainer", "->", "exists", "(", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "FormViewHelper", ...
Renders all empty hidden fields that have been added to ViewHelperVariableContainer @see \Neos\FluidAdaptor\ViewHelpers\Form\AbstractFormFieldViewHelper::renderHiddenFieldForEmptyValue() @return string
[ "Renders", "all", "empty", "hidden", "fields", "that", "have", "been", "added", "to", "ViewHelperVariableContainer", "@see", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "Form", "\\", "AbstractFormFieldViewHelper", "::", "renderHiddenFieldForEmptyValue...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L504-L515
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.renderTrustedPropertiesField
protected function renderTrustedPropertiesField() { $formFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames'); $requestHash = $this->mvcPropertyMappingConfigurationService->generateTrustedPropertiesToken($formFieldNames, $this->...
php
protected function renderTrustedPropertiesField() { $formFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames'); $requestHash = $this->mvcPropertyMappingConfigurationService->generateTrustedPropertiesToken($formFieldNames, $this->...
[ "protected", "function", "renderTrustedPropertiesField", "(", ")", "{", "$", "formFieldNames", "=", "$", "this", "->", "viewHelperVariableContainer", "->", "get", "(", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "FormViewHelper", "::", "class", ...
Render the request hash field @return string the hmac field
[ "Render", "the", "request", "hash", "field" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L522-L527
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php
FormViewHelper.renderCsrfTokenField
protected function renderCsrfTokenField() { if (strtolower($this->arguments['method']) === 'get') { return ''; } if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) { return ''; } $csrfToken = $this->securi...
php
protected function renderCsrfTokenField() { if (strtolower($this->arguments['method']) === 'get') { return ''; } if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) { return ''; } $csrfToken = $this->securi...
[ "protected", "function", "renderCsrfTokenField", "(", ")", "{", "if", "(", "strtolower", "(", "$", "this", "->", "arguments", "[", "'method'", "]", ")", "===", "'get'", ")", "{", "return", "''", ";", "}", "if", "(", "!", "$", "this", "->", "securityCon...
Render the a hidden field with a CSRF token @return string the CSRF token field
[ "Render", "the", "a", "hidden", "field", "with", "a", "CSRF", "token" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FormViewHelper.php#L534-L544
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/Token/UsernamePasswordHttpBasic.php
UsernamePasswordHttpBasic.updateCredentials
public function updateCredentials(ActionRequest $actionRequest) { $this->credentials = ['username' => null, 'password' => null]; $this->authenticationStatus = self::NO_CREDENTIALS_GIVEN; $authorizationHeader = $actionRequest->getHttpRequest()->getHeaders()->get('Authorization'); if ...
php
public function updateCredentials(ActionRequest $actionRequest) { $this->credentials = ['username' => null, 'password' => null]; $this->authenticationStatus = self::NO_CREDENTIALS_GIVEN; $authorizationHeader = $actionRequest->getHttpRequest()->getHeaders()->get('Authorization'); if ...
[ "public", "function", "updateCredentials", "(", "ActionRequest", "$", "actionRequest", ")", "{", "$", "this", "->", "credentials", "=", "[", "'username'", "=>", "null", ",", "'password'", "=>", "null", "]", ";", "$", "this", "->", "authenticationStatus", "=", ...
Updates the username and password credentials from the HTTP authorization header. Sets the authentication status to AUTHENTICATION_NEEDED, if the header has been sent, to NO_CREDENTIALS_GIVEN if no authorization header was there. @param ActionRequest $actionRequest The current action request instance @return void
[ "Updates", "the", "username", "and", "password", "credentials", "from", "the", "HTTP", "authorization", "header", ".", "Sets", "the", "authentication", "status", "to", "AUTHENTICATION_NEEDED", "if", "the", "header", "has", "been", "sent", "to", "NO_CREDENTIALS_GIVEN...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/Token/UsernamePasswordHttpBasic.php#L29-L44
neos/flow-development-collection
Neos.Cache/Classes/CacheFactory.php
CacheFactory.create
public function create(string $cacheIdentifier, string $cacheObjectName, string $backendObjectName, array $backendOptions = []): FrontendInterface { $backend = $this->instantiateBackend($backendObjectName, $backendOptions, $this->environmentConfiguration); $cache = $this->instantiateCache($cacheIden...
php
public function create(string $cacheIdentifier, string $cacheObjectName, string $backendObjectName, array $backendOptions = []): FrontendInterface { $backend = $this->instantiateBackend($backendObjectName, $backendOptions, $this->environmentConfiguration); $cache = $this->instantiateCache($cacheIden...
[ "public", "function", "create", "(", "string", "$", "cacheIdentifier", ",", "string", "$", "cacheObjectName", ",", "string", "$", "backendObjectName", ",", "array", "$", "backendOptions", "=", "[", "]", ")", ":", "FrontendInterface", "{", "$", "backend", "=", ...
Factory method which creates the specified cache along with the specified kind of backend. After creating the cache, it will be registered at the cache manager. @param string $cacheIdentifier The name / identifier of the cache to create @param string $cacheObjectName Object name of the cache frontend @param string $ba...
[ "Factory", "method", "which", "creates", "the", "specified", "cache", "along", "with", "the", "specified", "kind", "of", "backend", ".", "After", "creating", "the", "cache", "it", "will", "be", "registered", "at", "the", "cache", "manager", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/CacheFactory.php#L58-L65
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php
GenericObjectValidator.isValid
protected function isValid($object) { if (!is_object($object)) { $this->addError('Object expected, %1$s given.', 1241099149, [gettype($object)]); return; } elseif ($this->isValidatedAlready($object) === true) { return; } foreach ($this->propertyVal...
php
protected function isValid($object) { if (!is_object($object)) { $this->addError('Object expected, %1$s given.', 1241099149, [gettype($object)]); return; } elseif ($this->isValidatedAlready($object) === true) { return; } foreach ($this->propertyVal...
[ "protected", "function", "isValid", "(", "$", "object", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "$", "this", "->", "addError", "(", "'Object expected, %1$s given.'", ",", "1241099149", ",", "[", "gettype", "(", "$", "obj...
Checks if the given value is valid according to the property validators. @param mixed $object The value that should be validated @return void @api
[ "Checks", "if", "the", "given", "value", "is", "valid", "according", "to", "the", "property", "validators", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php#L53-L68
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php
GenericObjectValidator.getPropertyValue
protected function getPropertyValue($object, $propertyName) { if ($object instanceof \Doctrine\ORM\Proxy\Proxy) { $object->__load(); } return ObjectAccess::getProperty($object, $propertyName, !ObjectAccess::isPropertyGettable($object, $propertyName)); }
php
protected function getPropertyValue($object, $propertyName) { if ($object instanceof \Doctrine\ORM\Proxy\Proxy) { $object->__load(); } return ObjectAccess::getProperty($object, $propertyName, !ObjectAccess::isPropertyGettable($object, $propertyName)); }
[ "protected", "function", "getPropertyValue", "(", "$", "object", ",", "$", "propertyName", ")", "{", "if", "(", "$", "object", "instanceof", "\\", "Doctrine", "\\", "ORM", "\\", "Proxy", "\\", "Proxy", ")", "{", "$", "object", "->", "__load", "(", ")", ...
Load the property value to be used for validation. In case the object is a doctrine proxy, we need to load the real instance first. @param object $object @param string $propertyName @return mixed
[ "Load", "the", "property", "value", "to", "be", "used", "for", "validation", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php#L97-L104
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php
GenericObjectValidator.checkProperty
protected function checkProperty($value, $validators) { $result = null; foreach ($validators as $validator) { if ($validator instanceof ObjectValidatorInterface) { $validator->setValidatedInstancesContainer($this->validatedInstancesContainer); } $c...
php
protected function checkProperty($value, $validators) { $result = null; foreach ($validators as $validator) { if ($validator instanceof ObjectValidatorInterface) { $validator->setValidatedInstancesContainer($this->validatedInstancesContainer); } $c...
[ "protected", "function", "checkProperty", "(", "$", "value", ",", "$", "validators", ")", "{", "$", "result", "=", "null", ";", "foreach", "(", "$", "validators", "as", "$", "validator", ")", "{", "if", "(", "$", "validator", "instanceof", "ObjectValidator...
Checks if the specified property of the given object is valid, and adds found errors to the $messages object. @param mixed $value The value to be validated @param array $validators The validators to be called on the value @return NULL|ErrorResult
[ "Checks", "if", "the", "specified", "property", "of", "the", "given", "object", "is", "valid", "and", "adds", "found", "errors", "to", "the", "$messages", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php#L114-L131
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php
GenericObjectValidator.addPropertyValidator
public function addPropertyValidator($propertyName, ValidatorInterface $validator) { if (!isset($this->propertyValidators[$propertyName])) { $this->propertyValidators[$propertyName] = new \SplObjectStorage(); } $this->propertyValidators[$propertyName]->attach($validator); }
php
public function addPropertyValidator($propertyName, ValidatorInterface $validator) { if (!isset($this->propertyValidators[$propertyName])) { $this->propertyValidators[$propertyName] = new \SplObjectStorage(); } $this->propertyValidators[$propertyName]->attach($validator); }
[ "public", "function", "addPropertyValidator", "(", "$", "propertyName", ",", "ValidatorInterface", "$", "validator", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "propertyValidators", "[", "$", "propertyName", "]", ")", ")", "{", "$", "this", ...
Adds the given validator for validation of the specified property. @param string $propertyName Name of the property to validate @param ValidatorInterface $validator The property validator @return void @api
[ "Adds", "the", "given", "validator", "for", "validation", "of", "the", "specified", "property", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php#L141-L147
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php
GenericObjectValidator.getPropertyValidators
public function getPropertyValidators($propertyName = null) { if ($propertyName !== null) { return $this->propertyValidators[$propertyName] ?? []; } return $this->propertyValidators; }
php
public function getPropertyValidators($propertyName = null) { if ($propertyName !== null) { return $this->propertyValidators[$propertyName] ?? []; } return $this->propertyValidators; }
[ "public", "function", "getPropertyValidators", "(", "$", "propertyName", "=", "null", ")", "{", "if", "(", "$", "propertyName", "!==", "null", ")", "{", "return", "$", "this", "->", "propertyValidators", "[", "$", "propertyName", "]", "??", "[", "]", ";", ...
Returns all property validators - or only validators of the specified property @param string $propertyName Name of the property to return validators for @return array An array of validators
[ "Returns", "all", "property", "validators", "-", "or", "only", "validators", "of", "the", "specified", "property" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/GenericObjectValidator.php#L155-L161
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.registerReconstitutedEntity
public function registerReconstitutedEntity($entity, array $entityData) { $this->reconstitutedEntities->attach($entity); $this->reconstitutedEntitiesData[$entityData['identifier']] = $entityData; }
php
public function registerReconstitutedEntity($entity, array $entityData) { $this->reconstitutedEntities->attach($entity); $this->reconstitutedEntitiesData[$entityData['identifier']] = $entityData; }
[ "public", "function", "registerReconstitutedEntity", "(", "$", "entity", ",", "array", "$", "entityData", ")", "{", "$", "this", "->", "reconstitutedEntities", "->", "attach", "(", "$", "entity", ")", ";", "$", "this", "->", "reconstitutedEntitiesData", "[", "...
Registers data for a reconstituted object. $entityData format is described in "Documentation/PersistenceFramework object data format.txt" @param object $entity @param array $entityData @return void
[ "Registers", "data", "for", "a", "reconstituted", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L86-L90
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.replaceReconstitutedEntity
public function replaceReconstitutedEntity($oldEntity, $newEntity) { $this->reconstitutedEntities->detach($oldEntity); $this->reconstitutedEntities->attach($newEntity); }
php
public function replaceReconstitutedEntity($oldEntity, $newEntity) { $this->reconstitutedEntities->detach($oldEntity); $this->reconstitutedEntities->attach($newEntity); }
[ "public", "function", "replaceReconstitutedEntity", "(", "$", "oldEntity", ",", "$", "newEntity", ")", "{", "$", "this", "->", "reconstitutedEntities", "->", "detach", "(", "$", "oldEntity", ")", ";", "$", "this", "->", "reconstitutedEntities", "->", "attach", ...
Replace a reconstituted object, leaves the clean data unchanged. @param object $oldEntity @param object $newEntity @return void
[ "Replace", "a", "reconstituted", "object", "leaves", "the", "clean", "data", "unchanged", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L99-L103
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.unregisterReconstitutedEntity
public function unregisterReconstitutedEntity($entity) { if ($this->reconstitutedEntities->contains($entity)) { $this->reconstitutedEntities->detach($entity); unset($this->reconstitutedEntitiesData[$this->getIdentifierByObject($entity)]); } }
php
public function unregisterReconstitutedEntity($entity) { if ($this->reconstitutedEntities->contains($entity)) { $this->reconstitutedEntities->detach($entity); unset($this->reconstitutedEntitiesData[$this->getIdentifierByObject($entity)]); } }
[ "public", "function", "unregisterReconstitutedEntity", "(", "$", "entity", ")", "{", "if", "(", "$", "this", "->", "reconstitutedEntities", "->", "contains", "(", "$", "entity", ")", ")", "{", "$", "this", "->", "reconstitutedEntities", "->", "detach", "(", ...
Unregisters data for a reconstituted object @param object $entity @return void
[ "Unregisters", "data", "for", "a", "reconstituted", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L111-L117
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.isDirty
public function isDirty($object, $propertyName) { if ($this->isReconstitutedEntity($object) === false) { return true; } if (property_exists($object, 'Flow_Persistence_LazyLoadingObject_thawProperties')) { return false; } $currentValue = ObjectAccess:...
php
public function isDirty($object, $propertyName) { if ($this->isReconstitutedEntity($object) === false) { return true; } if (property_exists($object, 'Flow_Persistence_LazyLoadingObject_thawProperties')) { return false; } $currentValue = ObjectAccess:...
[ "public", "function", "isDirty", "(", "$", "object", ",", "$", "propertyName", ")", "{", "if", "(", "$", "this", "->", "isReconstitutedEntity", "(", "$", "object", ")", "===", "false", ")", "{", "return", "true", ";", "}", "if", "(", "property_exists", ...
Checks whether the given property was changed in the object since it was reconstituted. Returns true for unknown objects in all cases! @param object $object @param string $propertyName @return boolean @api
[ "Checks", "whether", "the", "given", "property", "was", "changed", "in", "the", "object", "since", "it", "was", "reconstituted", ".", "Returns", "true", "for", "unknown", "objects", "in", "all", "cases!" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L149-L172
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.isMultiValuedPropertyDirty
protected function isMultiValuedPropertyDirty(array $cleanData, $currentValue) { if (count($cleanData['value']) > 0 && count($cleanData['value']) === count($currentValue)) { if ($currentValue instanceof \SplObjectStorage) { $cleanIdentifiers = []; foreach ($cleanD...
php
protected function isMultiValuedPropertyDirty(array $cleanData, $currentValue) { if (count($cleanData['value']) > 0 && count($cleanData['value']) === count($currentValue)) { if ($currentValue instanceof \SplObjectStorage) { $cleanIdentifiers = []; foreach ($cleanD...
[ "protected", "function", "isMultiValuedPropertyDirty", "(", "array", "$", "cleanData", ",", "$", "currentValue", ")", "{", "if", "(", "count", "(", "$", "cleanData", "[", "'value'", "]", ")", ">", "0", "&&", "count", "(", "$", "cleanData", "[", "'value'", ...
Checks the $currentValue against the $cleanData. @param array $cleanData @param \Traversable $currentValue @return boolean
[ "Checks", "the", "$currentValue", "against", "the", "$cleanData", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L181-L216
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.isSingleValuedPropertyDirty
protected function isSingleValuedPropertyDirty($type, $previousValue, $currentValue) { switch ($type) { case 'integer': if ($currentValue === (int) $previousValue) { return false; } break; case 'float': i...
php
protected function isSingleValuedPropertyDirty($type, $previousValue, $currentValue) { switch ($type) { case 'integer': if ($currentValue === (int) $previousValue) { return false; } break; case 'float': i...
[ "protected", "function", "isSingleValuedPropertyDirty", "(", "$", "type", ",", "$", "previousValue", ",", "$", "currentValue", ")", "{", "switch", "(", "$", "type", ")", "{", "case", "'integer'", ":", "if", "(", "$", "currentValue", "===", "(", "int", ")",...
Checks the $previousValue against the $currentValue. @param string $type @param mixed $previousValue @param mixed &$currentValue @return boolean
[ "Checks", "the", "$previousValue", "against", "the", "$currentValue", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L226-L261
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.getCleanStateOfProperty
public function getCleanStateOfProperty($object, $propertyName) { if ($this->isReconstitutedEntity($object) === false) { return null; } $identifier = $this->getIdentifierByObject($object); if (!isset($this->reconstitutedEntitiesData[$identifier]['properties'][$propertyNam...
php
public function getCleanStateOfProperty($object, $propertyName) { if ($this->isReconstitutedEntity($object) === false) { return null; } $identifier = $this->getIdentifierByObject($object); if (!isset($this->reconstitutedEntitiesData[$identifier]['properties'][$propertyNam...
[ "public", "function", "getCleanStateOfProperty", "(", "$", "object", ",", "$", "propertyName", ")", "{", "if", "(", "$", "this", "->", "isReconstitutedEntity", "(", "$", "object", ")", "===", "false", ")", "{", "return", "null", ";", "}", "$", "identifier"...
Returns the previous (last persisted) state of the property. If nothing is found, NULL is returned. @param object $object @param string $propertyName @return mixed
[ "Returns", "the", "previous", "(", "last", "persisted", ")", "state", "of", "the", "property", ".", "If", "nothing", "is", "found", "NULL", "is", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L271-L281
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.getIdentifierByObject
public function getIdentifierByObject($object) { if ($this->hasObject($object)) { return $this->objectMap[$object]; } $idPropertyNames = $this->reflectionService->getPropertyNamesByTag(get_class($object), 'id'); if (count($idPropertyNames) === 1) { $idPropert...
php
public function getIdentifierByObject($object) { if ($this->hasObject($object)) { return $this->objectMap[$object]; } $idPropertyNames = $this->reflectionService->getPropertyNamesByTag(get_class($object), 'id'); if (count($idPropertyNames) === 1) { $idPropert...
[ "public", "function", "getIdentifierByObject", "(", "$", "object", ")", "{", "if", "(", "$", "this", "->", "hasObject", "(", "$", "object", ")", ")", "{", "return", "$", "this", "->", "objectMap", "[", "$", "object", "]", ";", "}", "$", "idPropertyName...
Returns the identifier for the given object either from the session, if the object was registered, or from the object itself using a special uuid property or the internal properties set by AOP. Note: this returns an UUID even if the object has not been persisted in case of AOP-managed entities. Use isNewObject() if yo...
[ "Returns", "the", "identifier", "for", "the", "given", "object", "either", "from", "the", "session", "if", "the", "object", "was", "registered", "or", "from", "the", "object", "itself", "using", "a", "special", "uuid", "property", "or", "the", "internal", "p...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L332-L347
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.registerObject
public function registerObject($object, $identifier) { $this->objectMap[$object] = $identifier; $this->identifierMap[$identifier] = $object; }
php
public function registerObject($object, $identifier) { $this->objectMap[$object] = $identifier; $this->identifierMap[$identifier] = $object; }
[ "public", "function", "registerObject", "(", "$", "object", ",", "$", "identifier", ")", "{", "$", "this", "->", "objectMap", "[", "$", "object", "]", "=", "$", "identifier", ";", "$", "this", "->", "identifierMap", "[", "$", "identifier", "]", "=", "$...
Register an identifier for an object @param object $object @param string $identifier @api
[ "Register", "an", "identifier", "for", "an", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L356-L360
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.unregisterObject
public function unregisterObject($object) { unset($this->identifierMap[$this->objectMap[$object]]); $this->objectMap->detach($object); }
php
public function unregisterObject($object) { unset($this->identifierMap[$this->objectMap[$object]]); $this->objectMap->detach($object); }
[ "public", "function", "unregisterObject", "(", "$", "object", ")", "{", "unset", "(", "$", "this", "->", "identifierMap", "[", "$", "this", "->", "objectMap", "[", "$", "object", "]", "]", ")", ";", "$", "this", "->", "objectMap", "->", "detach", "(", ...
Unregister an object @param string $object @return void
[ "Unregister", "an", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L368-L372
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Session.php
Session.destroy
public function destroy() { $this->identifierMap = []; $this->objectMap = new \SplObjectStorage(); $this->reconstitutedEntities = new \SplObjectStorage(); $this->reconstitutedEntitiesData = []; }
php
public function destroy() { $this->identifierMap = []; $this->objectMap = new \SplObjectStorage(); $this->reconstitutedEntities = new \SplObjectStorage(); $this->reconstitutedEntitiesData = []; }
[ "public", "function", "destroy", "(", ")", "{", "$", "this", "->", "identifierMap", "=", "[", "]", ";", "$", "this", "->", "objectMap", "=", "new", "\\", "SplObjectStorage", "(", ")", ";", "$", "this", "->", "reconstitutedEntities", "=", "new", "\\", "...
Destroy the state of the persistence session and reset all internal data. @return void
[ "Destroy", "the", "state", "of", "the", "persistence", "session", "and", "reset", "all", "internal", "data", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Session.php#L380-L386
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/PersistentObjectSerializer.php
PersistentObjectSerializer.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { $identifier = $this->persistenceManager->getIdentifierByObject($source); return $identifier; }
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { $identifier = $this->persistenceManager->getIdentifierByObject($source); return $identifier; }
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "$", "identifier", "=", "$",...
Convert an entity or valueobject to a string representation (by using the identifier) @param object $source @param string $targetType @param array $convertedChildProperties @param PropertyMappingConfigurationInterface $configuration @return object the target type
[ "Convert", "an", "entity", "or", "valueobject", "to", "a", "string", "representation", "(", "by", "using", "the", "identifier", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/PersistentObjectSerializer.php#L59-L63
neos/flow-development-collection
Neos.Flow/Classes/Cli/Request.php
Request.getCommand
public function getCommand(): Command { if ($this->command === null) { $this->command = new Command($this->controllerObjectName, $this->controllerCommandName); } return $this->command; }
php
public function getCommand(): Command { if ($this->command === null) { $this->command = new Command($this->controllerObjectName, $this->controllerCommandName); } return $this->command; }
[ "public", "function", "getCommand", "(", ")", ":", "Command", "{", "if", "(", "$", "this", "->", "command", "===", "null", ")", "{", "$", "this", "->", "command", "=", "new", "Command", "(", "$", "this", "->", "controllerObjectName", ",", "$", "this", ...
Returns the command object for this request @return Command
[ "Returns", "the", "command", "object", "for", "this", "request" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Request.php#L161-L167
neos/flow-development-collection
Neos.Flow/Classes/Cli/Request.php
Request.setArgument
public function setArgument(string $argumentName, $value) { if ($argumentName === '') { throw new InvalidArgumentNameException('Invalid argument name.', 1300893885); } $this->arguments[$argumentName] = $value; }
php
public function setArgument(string $argumentName, $value) { if ($argumentName === '') { throw new InvalidArgumentNameException('Invalid argument name.', 1300893885); } $this->arguments[$argumentName] = $value; }
[ "public", "function", "setArgument", "(", "string", "$", "argumentName", ",", "$", "value", ")", "{", "if", "(", "$", "argumentName", "===", "''", ")", "{", "throw", "new", "InvalidArgumentNameException", "(", "'Invalid argument name.'", ",", "1300893885", ")", ...
Sets the value of the specified argument @param string $argumentName Name of the argument to set @param mixed $value The new value @return void @throws InvalidArgumentNameException
[ "Sets", "the", "value", "of", "the", "specified", "argument" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Request.php#L177-L183
neos/flow-development-collection
Neos.Flow/Classes/Cli/Request.php
Request.getArgument
public function getArgument(string $argumentName) { if (!isset($this->arguments[$argumentName])) { throw new NoSuchArgumentException('An argument "' . $argumentName . '" does not exist for this request.', 1300893886); } return $this->arguments[$argumentName]; }
php
public function getArgument(string $argumentName) { if (!isset($this->arguments[$argumentName])) { throw new NoSuchArgumentException('An argument "' . $argumentName . '" does not exist for this request.', 1300893886); } return $this->arguments[$argumentName]; }
[ "public", "function", "getArgument", "(", "string", "$", "argumentName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "arguments", "[", "$", "argumentName", "]", ")", ")", "{", "throw", "new", "NoSuchArgumentException", "(", "'An argument \"'",...
Returns the value of the specified argument @param string $argumentName Name of the argument @return mixed Value of the argument @throws NoSuchArgumentException if such an argument does not exist
[ "Returns", "the", "value", "of", "the", "specified", "argument" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/Request.php#L203-L209
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrRepository.php
CldrRepository.getModel
public function getModel($filename) { $filename = Files::concatenatePaths([$this->cldrBasePath, $filename . '.xml']); if (isset($this->models[$filename])) { return $this->models[$filename]; } if (!is_file($filename)) { return false; } return...
php
public function getModel($filename) { $filename = Files::concatenatePaths([$this->cldrBasePath, $filename . '.xml']); if (isset($this->models[$filename])) { return $this->models[$filename]; } if (!is_file($filename)) { return false; } return...
[ "public", "function", "getModel", "(", "$", "filename", ")", "{", "$", "filename", "=", "Files", "::", "concatenatePaths", "(", "[", "$", "this", "->", "cldrBasePath", ",", "$", "filename", ".", "'.xml'", "]", ")", ";", "if", "(", "isset", "(", "$", ...
Returns an instance of CldrModel which represents CLDR file found under specified path. Will return existing instance if a model for given $filename was already requested before. Returns false when $filename doesn't point to existing file. @param string $filename Relative (from CLDR root) path to existing CLDR file @...
[ "Returns", "an", "instance", "of", "CldrModel", "which", "represents", "CLDR", "file", "found", "under", "specified", "path", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrRepository.php#L78-L91
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrRepository.php
CldrRepository.getModelForLocale
public function getModelForLocale(I18n\Locale $locale, $directoryPath = 'main') { $directoryPath = Files::concatenatePaths([$this->cldrBasePath, $directoryPath]); if (isset($this->models[$directoryPath][(string)$locale])) { return $this->models[$directoryPath][(string)$locale]; ...
php
public function getModelForLocale(I18n\Locale $locale, $directoryPath = 'main') { $directoryPath = Files::concatenatePaths([$this->cldrBasePath, $directoryPath]); if (isset($this->models[$directoryPath][(string)$locale])) { return $this->models[$directoryPath][(string)$locale]; ...
[ "public", "function", "getModelForLocale", "(", "I18n", "\\", "Locale", "$", "locale", ",", "$", "directoryPath", "=", "'main'", ")", "{", "$", "directoryPath", "=", "Files", "::", "concatenatePaths", "(", "[", "$", "this", "->", "cldrBasePath", ",", "$", ...
Returns an instance of CldrModel which represents group of CLDR files which are related in hierarchy. This method finds a group of CLDR files within $directoryPath dir, for particular Locale. Returned model represents whole locale-chain. For example, for locale en_GB, returned model could represent 'en_GB', 'en', and...
[ "Returns", "an", "instance", "of", "CldrModel", "which", "represents", "group", "of", "CLDR", "files", "which", "are", "related", "in", "hierarchy", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrRepository.php#L109-L124
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrRepository.php
CldrRepository.findLocaleChain
protected function findLocaleChain(I18n\Locale $locale, $directoryPath) { $filesInHierarchy = [Files::concatenatePaths([$directoryPath, (string)$locale . '.xml'])]; $localeIdentifier = (string)$locale; while ($localeIdentifier = substr($localeIdentifier, 0, (int)strrpos($localeIdentifier, '...
php
protected function findLocaleChain(I18n\Locale $locale, $directoryPath) { $filesInHierarchy = [Files::concatenatePaths([$directoryPath, (string)$locale . '.xml'])]; $localeIdentifier = (string)$locale; while ($localeIdentifier = substr($localeIdentifier, 0, (int)strrpos($localeIdentifier, '...
[ "protected", "function", "findLocaleChain", "(", "I18n", "\\", "Locale", "$", "locale", ",", "$", "directoryPath", ")", "{", "$", "filesInHierarchy", "=", "[", "Files", "::", "concatenatePaths", "(", "[", "$", "directoryPath", ",", "(", "string", ")", "$", ...
Returns absolute paths to CLDR files connected in hierarchy For given locale, many CLDR files have to be merged in order to get full set of CLDR data. For example, for 'en_GB' locale, files 'root', 'en', and 'en_GB' should be merged. @param I18n\Locale $locale A locale @param string $directoryPath Relative path to ex...
[ "Returns", "absolute", "paths", "to", "CLDR", "files", "connected", "in", "hierarchy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrRepository.php#L137-L151
neos/flow-development-collection
Neos.Utility.Schema/Classes/SchemaGenerator.php
SchemaGenerator.generate
public function generate($value): array { $schema = []; switch (gettype($value)) { case 'NULL': $schema['type'] = 'null'; break; case 'boolean': $schema['type'] = 'boolean'; break; case 'integer': ...
php
public function generate($value): array { $schema = []; switch (gettype($value)) { case 'NULL': $schema['type'] = 'null'; break; case 'boolean': $schema['type'] = 'boolean'; break; case 'integer': ...
[ "public", "function", "generate", "(", "$", "value", ")", ":", "array", "{", "$", "schema", "=", "[", "]", ";", "switch", "(", "gettype", "(", "$", "value", ")", ")", "{", "case", "'NULL'", ":", "$", "schema", "[", "'type'", "]", "=", "'null'", "...
Generate a schema for the given value @param mixed $value value to create a schema for @return array schema as array structure
[ "Generate", "a", "schema", "for", "the", "given", "value" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaGenerator.php#L31-L60
neos/flow-development-collection
Neos.Utility.Schema/Classes/SchemaGenerator.php
SchemaGenerator.generateDictionarySchema
protected function generateDictionarySchema(array $dictionaryValue): array { $schema = ['type' => 'dictionary', 'properties' => []]; ksort($dictionaryValue); foreach ($dictionaryValue as $name => $subvalue) { $schema['properties'][$name] = $this->generate($subvalue); } ...
php
protected function generateDictionarySchema(array $dictionaryValue): array { $schema = ['type' => 'dictionary', 'properties' => []]; ksort($dictionaryValue); foreach ($dictionaryValue as $name => $subvalue) { $schema['properties'][$name] = $this->generate($subvalue); } ...
[ "protected", "function", "generateDictionarySchema", "(", "array", "$", "dictionaryValue", ")", ":", "array", "{", "$", "schema", "=", "[", "'type'", "=>", "'dictionary'", ",", "'properties'", "=>", "[", "]", "]", ";", "ksort", "(", "$", "dictionaryValue", "...
Create a schema for a dictionary @param array $dictionaryValue @return array
[ "Create", "a", "schema", "for", "a", "dictionary" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaGenerator.php#L68-L76
neos/flow-development-collection
Neos.Utility.Schema/Classes/SchemaGenerator.php
SchemaGenerator.generateArraySchema
protected function generateArraySchema(array $arrayValue): array { $schema = ['type' => 'array']; $subSchemas = []; foreach ($arrayValue as $subValue) { $subSchemas[] = $this->generate($subValue); } $schema['items'] = $this->filterDuplicatesFromArray($subSchemas);...
php
protected function generateArraySchema(array $arrayValue): array { $schema = ['type' => 'array']; $subSchemas = []; foreach ($arrayValue as $subValue) { $subSchemas[] = $this->generate($subValue); } $schema['items'] = $this->filterDuplicatesFromArray($subSchemas);...
[ "protected", "function", "generateArraySchema", "(", "array", "$", "arrayValue", ")", ":", "array", "{", "$", "schema", "=", "[", "'type'", "=>", "'array'", "]", ";", "$", "subSchemas", "=", "[", "]", ";", "foreach", "(", "$", "arrayValue", "as", "$", ...
Create a schema for an array structure @param array $arrayValue @return array schema
[ "Create", "a", "schema", "for", "an", "array", "structure" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaGenerator.php#L84-L93
neos/flow-development-collection
Neos.Utility.Schema/Classes/SchemaGenerator.php
SchemaGenerator.generateStringSchema
protected function generateStringSchema(string $stringValue): array { $schema = ['type' => 'string']; $schemaValidator = new SchemaValidator(); $detectedFormat = null; $detectableFormats = ['uri','email','ip-address','class-name','interface-name']; foreach ($detectableFormat...
php
protected function generateStringSchema(string $stringValue): array { $schema = ['type' => 'string']; $schemaValidator = new SchemaValidator(); $detectedFormat = null; $detectableFormats = ['uri','email','ip-address','class-name','interface-name']; foreach ($detectableFormat...
[ "protected", "function", "generateStringSchema", "(", "string", "$", "stringValue", ")", ":", "array", "{", "$", "schema", "=", "[", "'type'", "=>", "'string'", "]", ";", "$", "schemaValidator", "=", "new", "SchemaValidator", "(", ")", ";", "$", "detectedFor...
Create a schema for a given string @param string $stringValue @return array
[ "Create", "a", "schema", "for", "a", "given", "string" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaGenerator.php#L101-L119
neos/flow-development-collection
Neos.Utility.Schema/Classes/SchemaGenerator.php
SchemaGenerator.filterDuplicatesFromArray
protected function filterDuplicatesFromArray(array $values) { $uniqueItems = []; foreach ($values as $value) { $uniqueItems[md5(serialize($value))] = $value; } $result = array_values($uniqueItems); if (count($result) === 1) { return $result[0]; ...
php
protected function filterDuplicatesFromArray(array $values) { $uniqueItems = []; foreach ($values as $value) { $uniqueItems[md5(serialize($value))] = $value; } $result = array_values($uniqueItems); if (count($result) === 1) { return $result[0]; ...
[ "protected", "function", "filterDuplicatesFromArray", "(", "array", "$", "values", ")", "{", "$", "uniqueItems", "=", "[", "]", ";", "foreach", "(", "$", "values", "as", "$", "value", ")", "{", "$", "uniqueItems", "[", "md5", "(", "serialize", "(", "$", ...
Compact an array of items to avoid adding the same value more than once. If the result contains only one item, that item is returned directly. @param array $values array of values @return mixed
[ "Compact", "an", "array", "of", "items", "to", "avoid", "adding", "the", "same", "value", "more", "than", "once", ".", "If", "the", "result", "contains", "only", "one", "item", "that", "item", "is", "returned", "directly", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaGenerator.php#L128-L139
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutSettingFilter.php
PointcutSettingFilter.injectConfigurationManager
public function injectConfigurationManager(ConfigurationManager $configurationManager): void { $this->configurationManager = $configurationManager; $this->parseConfigurationOptionPath($this->settingComparisonExpression); }
php
public function injectConfigurationManager(ConfigurationManager $configurationManager): void { $this->configurationManager = $configurationManager; $this->parseConfigurationOptionPath($this->settingComparisonExpression); }
[ "public", "function", "injectConfigurationManager", "(", "ConfigurationManager", "$", "configurationManager", ")", ":", "void", "{", "$", "this", "->", "configurationManager", "=", "$", "configurationManager", ";", "$", "this", "->", "parseConfigurationOptionPath", "(",...
Injects the configuration manager @param ConfigurationManager $configurationManager @return void
[ "Injects", "the", "configuration", "manager" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutSettingFilter.php#L75-L79
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutSettingFilter.php
PointcutSettingFilter.matches
public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool { if ($this->cachedResult === null) { $this->cachedResult = (is_bool($this->actualSettingValue)) ? $this->actualSettingValue : ($this->condition === $this->actualSettingValue); } ...
php
public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool { if ($this->cachedResult === null) { $this->cachedResult = (is_bool($this->actualSettingValue)) ? $this->actualSettingValue : ($this->condition === $this->actualSettingValue); } ...
[ "public", "function", "matches", "(", "$", "className", ",", "$", "methodName", ",", "$", "methodDeclaringClassName", ",", "$", "pointcutQueryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "cachedResult", "===", "null", ")", "{", "$", "t...
Checks if the specified configuration option is set to true or false, or if it matches the specified condition @param string $className Name of the class to check against @param string $methodName Name of the method - not used here @param string $methodDeclaringClassName Name of the class the method was originally dec...
[ "Checks", "if", "the", "specified", "configuration", "option", "is", "set", "to", "true", "or", "false", "or", "if", "it", "matches", "the", "specified", "condition" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutSettingFilter.php#L91-L97
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutSettingFilter.php
PointcutSettingFilter.parseConfigurationOptionPath
protected function parseConfigurationOptionPath(string $settingComparisonExpression): void { $settingComparisonExpression = preg_split(self::PATTERN_SPLITBYEQUALSIGN, $settingComparisonExpression); if (isset($settingComparisonExpression[1])) { $matches = []; preg_match(self::...
php
protected function parseConfigurationOptionPath(string $settingComparisonExpression): void { $settingComparisonExpression = preg_split(self::PATTERN_SPLITBYEQUALSIGN, $settingComparisonExpression); if (isset($settingComparisonExpression[1])) { $matches = []; preg_match(self::...
[ "protected", "function", "parseConfigurationOptionPath", "(", "string", "$", "settingComparisonExpression", ")", ":", "void", "{", "$", "settingComparisonExpression", "=", "preg_split", "(", "self", "::", "PATTERN_SPLITBYEQUALSIGN", ",", "$", "settingComparisonExpression", ...
Parses the given configuration path expression and sets $this->actualSettingValue and $this->condition accordingly @param string $settingComparisonExpression The configuration expression (path + optional condition) @return void @throws InvalidPointcutExpressionException
[ "Parses", "the", "given", "configuration", "path", "expression", "and", "sets", "$this", "-", ">", "actualSettingValue", "and", "$this", "-", ">", "condition", "accordingly" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutSettingFilter.php#L127-L155
neos/flow-development-collection
Neos.Cache/Classes/Backend/AbstractBackend.php
AbstractBackend.setCache
public function setCache(FrontendInterface $cache) { $this->cache = $cache; $this->cacheIdentifier = $this->cache->getIdentifier(); }
php
public function setCache(FrontendInterface $cache) { $this->cache = $cache; $this->cacheIdentifier = $this->cache->getIdentifier(); }
[ "public", "function", "setCache", "(", "FrontendInterface", "$", "cache", ")", "{", "$", "this", "->", "cache", "=", "$", "cache", ";", "$", "this", "->", "cacheIdentifier", "=", "$", "this", "->", "cache", "->", "getIdentifier", "(", ")", ";", "}" ]
Sets a reference to the cache frontend which uses this backend @param FrontendInterface $cache The frontend for this backend @return void @api
[ "Sets", "a", "reference", "to", "the", "cache", "frontend", "which", "uses", "this", "backend" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/AbstractBackend.php#L108-L112
neos/flow-development-collection
Neos.Cache/Classes/Backend/AbstractBackend.php
AbstractBackend.calculateExpiryTime
protected function calculateExpiryTime(int $lifetime = null): \DateTime { if ($lifetime === self::UNLIMITED_LIFETIME || ($lifetime === null && $this->defaultLifetime === self::UNLIMITED_LIFETIME)) { return new \DateTime(self::DATETIME_EXPIRYTIME_UNLIMITED, new \DateTimeZone('UTC')); } ...
php
protected function calculateExpiryTime(int $lifetime = null): \DateTime { if ($lifetime === self::UNLIMITED_LIFETIME || ($lifetime === null && $this->defaultLifetime === self::UNLIMITED_LIFETIME)) { return new \DateTime(self::DATETIME_EXPIRYTIME_UNLIMITED, new \DateTimeZone('UTC')); } ...
[ "protected", "function", "calculateExpiryTime", "(", "int", "$", "lifetime", "=", "null", ")", ":", "\\", "DateTime", "{", "if", "(", "$", "lifetime", "===", "self", "::", "UNLIMITED_LIFETIME", "||", "(", "$", "lifetime", "===", "null", "&&", "$", "this", ...
Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used. @param integer $lifetime The lifetime in seconds @return \DateTime The expiry time
[ "Calculates", "the", "expiry", "time", "by", "the", "given", "lifetime", ".", "If", "no", "lifetime", "is", "specified", "the", "default", "lifetime", "is", "used", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/AbstractBackend.php#L158-L168
neos/flow-development-collection
Neos.Flow/Classes/Cli/CommandArgumentDefinition.php
CommandArgumentDefinition.getDashedName
public function getDashedName(): string { $dashedName = ucfirst($this->name); $dashedName = preg_replace('/([A-Z][a-z0-9]+)/', '$1-', $dashedName); return '--' . strtolower(substr($dashedName, 0, -1)); }
php
public function getDashedName(): string { $dashedName = ucfirst($this->name); $dashedName = preg_replace('/([A-Z][a-z0-9]+)/', '$1-', $dashedName); return '--' . strtolower(substr($dashedName, 0, -1)); }
[ "public", "function", "getDashedName", "(", ")", ":", "string", "{", "$", "dashedName", "=", "ucfirst", "(", "$", "this", "->", "name", ")", ";", "$", "dashedName", "=", "preg_replace", "(", "'/([A-Z][a-z0-9]+)/'", ",", "'$1-'", ",", "$", "dashedName", ")"...
Returns the lowercased name with dashes as word separator @return string
[ "Returns", "the", "lowercased", "name", "with", "dashes", "as", "word", "separator" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandArgumentDefinition.php#L62-L67