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.Log/Classes/Backend/FileBackend.php
FileBackend.append
public function append($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null) { if ($severity > $this->severityThreshold) { return; } if (function_exists('posix_getpid')) { $processId = ' ' . str_pad(posix_g...
php
public function append($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null) { if ($severity > $this->severityThreshold) { return; } if (function_exists('posix_getpid')) { $processId = ' ' . str_pad(posix_g...
[ "public", "function", "append", "(", "$", "message", ",", "$", "severity", "=", "LOG_INFO", ",", "$", "additionalData", "=", "null", ",", "$", "packageKey", "=", "null", ",", "$", "className", "=", "null", ",", "$", "methodName", "=", "null", ")", "{",...
Appends the given message along with the additional information into the log. @param string $message The message to log @param integer $severity One of the LOG_* constants @param mixed $additionalData A variable containing more information about the event to be logged @param string $packageKey Key of the package trigg...
[ "Appends", "the", "given", "message", "along", "with", "the", "additional", "information", "into", "the", "log", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/FileBackend.php#L227-L251
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php
CacheAdaptor.get
public function get($name) { if ($this->flowCache->has($name)) { $this->flowCache->requireOnce($name); } return $this->flowCache->getWrapped($name); }
php
public function get($name) { if ($this->flowCache->has($name)) { $this->flowCache->requireOnce($name); } return $this->flowCache->getWrapped($name); }
[ "public", "function", "get", "(", "$", "name", ")", "{", "if", "(", "$", "this", "->", "flowCache", "->", "has", "(", "$", "name", ")", ")", "{", "$", "this", "->", "flowCache", "->", "requireOnce", "(", "$", "name", ")", ";", "}", "return", "$",...
Gets an entry from the cache or NULL if the entry does not exist. @param string $name @return string
[ "Gets", "an", "entry", "from", "the", "cache", "or", "NULL", "if", "the", "entry", "does", "not", "exist", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php#L37-L44
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php
CacheAdaptor.set
public function set($name, $value) { // we need to strip the first line with the php header as the flow cache adds that again. return $this->flowCache->set($name, substr($value, strpos($value, "\n") + 1)); }
php
public function set($name, $value) { // we need to strip the first line with the php header as the flow cache adds that again. return $this->flowCache->set($name, substr($value, strpos($value, "\n") + 1)); }
[ "public", "function", "set", "(", "$", "name", ",", "$", "value", ")", "{", "// we need to strip the first line with the php header as the flow cache adds that again.", "return", "$", "this", "->", "flowCache", "->", "set", "(", "$", "name", ",", "substr", "(", "$",...
Set or updates an entry identified by $name into the cache. @param string $name @param string $value
[ "Set", "or", "updates", "an", "entry", "identified", "by", "$name", "into", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php#L53-L57
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php
CacheAdaptor.flush
public function flush($name = null) { if ($name !== null) { return $this->flowCache->remove($name); } else { return $this->flowCache->flush(); } }
php
public function flush($name = null) { if ($name !== null) { return $this->flowCache->remove($name); } else { return $this->flowCache->flush(); } }
[ "public", "function", "flush", "(", "$", "name", "=", "null", ")", "{", "if", "(", "$", "name", "!==", "null", ")", "{", "return", "$", "this", "->", "flowCache", "->", "remove", "(", "$", "name", ")", ";", "}", "else", "{", "return", "$", "this"...
Flushes the cache either by entry or flushes the entire cache if no entry is provided. @param string|null $name @return bool|void
[ "Flushes", "the", "cache", "either", "by", "entry", "or", "flushes", "the", "entire", "cache", "if", "no", "entry", "is", "provided", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php#L66-L73
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/HashService.php
HashService.generateHmac
public function generateHmac($string) { if (!is_string($string)) { throw new InvalidArgumentForHashGenerationException('A hash can only be generated for a string, but "' . gettype($string) . '" was given.', 1255069587); } return hash_hmac('sha1', $string, $this->getEncryptionKey...
php
public function generateHmac($string) { if (!is_string($string)) { throw new InvalidArgumentForHashGenerationException('A hash can only be generated for a string, but "' . gettype($string) . '" was given.', 1255069587); } return hash_hmac('sha1', $string, $this->getEncryptionKey...
[ "public", "function", "generateHmac", "(", "$", "string", ")", "{", "if", "(", "!", "is_string", "(", "$", "string", ")", ")", "{", "throw", "new", "InvalidArgumentForHashGenerationException", "(", "'A hash can only be generated for a string, but \"'", ".", "gettype",...
Generate a hash (HMAC) for a given string @param string $string The string for which a hash should be generated @return string The hash of the string @throws InvalidArgumentForHashGenerationException if something else than a string was given as parameter
[ "Generate", "a", "hash", "(", "HMAC", ")", "for", "a", "given", "string" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/HashService.php#L75-L82
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/HashService.php
HashService.validateAndStripHmac
public function validateAndStripHmac($string) { if (!is_string($string)) { throw new InvalidArgumentForHashGenerationException('A hash can only be validated for a string, but "' . gettype($string) . '" was given.', 1320829762); } if (strlen($string) < 40) { throw new ...
php
public function validateAndStripHmac($string) { if (!is_string($string)) { throw new InvalidArgumentForHashGenerationException('A hash can only be validated for a string, but "' . gettype($string) . '" was given.', 1320829762); } if (strlen($string) < 40) { throw new ...
[ "public", "function", "validateAndStripHmac", "(", "$", "string", ")", "{", "if", "(", "!", "is_string", "(", "$", "string", ")", ")", "{", "throw", "new", "InvalidArgumentForHashGenerationException", "(", "'A hash can only be validated for a string, but \"'", ".", "g...
Tests if the last 40 characters of a given string $string matches the HMAC of the rest of the string and, if true, returns the string without the HMAC. In case of a HMAC validation error, an exception is thrown. @param string $string The string with the HMAC appended (in the format 'string<HMAC>') @return string the o...
[ "Tests", "if", "the", "last", "40", "characters", "of", "a", "given", "string", "$string", "matches", "the", "HMAC", "of", "the", "rest", "of", "the", "string", "and", "if", "true", "returns", "the", "string", "without", "the", "HMAC", ".", "In", "case",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/HashService.php#L124-L137
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/HashService.php
HashService.hashPassword
public function hashPassword($password, $strategyIdentifier = 'default') { /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */ list($passwordHashingStrategy, $strategyIdentifier) = $this->getPasswordHashingStrategyAndIdentifier($strategyIdentifier); $hashedPasswordAndSalt =...
php
public function hashPassword($password, $strategyIdentifier = 'default') { /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */ list($passwordHashingStrategy, $strategyIdentifier) = $this->getPasswordHashingStrategyAndIdentifier($strategyIdentifier); $hashedPasswordAndSalt =...
[ "public", "function", "hashPassword", "(", "$", "password", ",", "$", "strategyIdentifier", "=", "'default'", ")", "{", "/** @var $passwordHashingStrategy PasswordHashingStrategyInterface */", "list", "(", "$", "passwordHashingStrategy", ",", "$", "strategyIdentifier", ")",...
Hash a password using the configured password hashing strategy @param string $password The cleartext password @param string $strategyIdentifier An identifier for a configured strategy, uses default strategy if not specified @return string A hashed password with salt (if used) @api
[ "Hash", "a", "password", "using", "the", "configured", "password", "hashing", "strategy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/HashService.php#L146-L152
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/HashService.php
HashService.validatePassword
public function validatePassword($password, $hashedPasswordAndSalt) { $strategyIdentifier = 'default'; if (strpos($hashedPasswordAndSalt, '=>') !== false) { list($strategyIdentifier, $hashedPasswordAndSalt) = explode('=>', $hashedPasswordAndSalt, 2); } /** @var $password...
php
public function validatePassword($password, $hashedPasswordAndSalt) { $strategyIdentifier = 'default'; if (strpos($hashedPasswordAndSalt, '=>') !== false) { list($strategyIdentifier, $hashedPasswordAndSalt) = explode('=>', $hashedPasswordAndSalt, 2); } /** @var $password...
[ "public", "function", "validatePassword", "(", "$", "password", ",", "$", "hashedPasswordAndSalt", ")", "{", "$", "strategyIdentifier", "=", "'default'", ";", "if", "(", "strpos", "(", "$", "hashedPasswordAndSalt", ",", "'=>'", ")", "!==", "false", ")", "{", ...
Validate a hashed password using the configured password hashing strategy @param string $password The cleartext password @param string $hashedPasswordAndSalt The hashed password with salt (if used) and an optional strategy identifier @return boolean true if the given password matches the hashed password @api
[ "Validate", "a", "hashed", "password", "using", "the", "configured", "password", "hashing", "strategy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/HashService.php#L162-L172
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/HashService.php
HashService.getPasswordHashingStrategyAndIdentifier
protected function getPasswordHashingStrategyAndIdentifier($strategyIdentifier = 'default') { if (isset($this->passwordHashingStrategies[$strategyIdentifier])) { return [$this->passwordHashingStrategies[$strategyIdentifier], $strategyIdentifier]; } if ($strategyIdentifier === 'd...
php
protected function getPasswordHashingStrategyAndIdentifier($strategyIdentifier = 'default') { if (isset($this->passwordHashingStrategies[$strategyIdentifier])) { return [$this->passwordHashingStrategies[$strategyIdentifier], $strategyIdentifier]; } if ($strategyIdentifier === 'd...
[ "protected", "function", "getPasswordHashingStrategyAndIdentifier", "(", "$", "strategyIdentifier", "=", "'default'", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "passwordHashingStrategies", "[", "$", "strategyIdentifier", "]", ")", ")", "{", "return", "...
Get a password hashing strategy @param string $strategyIdentifier @return array<PasswordHashingStrategyInterface> and string @throws MissingConfigurationException
[ "Get", "a", "password", "hashing", "strategy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/HashService.php#L181-L200
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/HashService.php
HashService.getEncryptionKey
protected function getEncryptionKey() { if ($this->encryptionKey === null) { $this->encryptionKey = $this->cache->get('encryptionKey'); } if ($this->encryptionKey === false && file_exists(FLOW_PATH_DATA . 'Persistent/EncryptionKey')) { $this->encryptionKey = file_get_...
php
protected function getEncryptionKey() { if ($this->encryptionKey === null) { $this->encryptionKey = $this->cache->get('encryptionKey'); } if ($this->encryptionKey === false && file_exists(FLOW_PATH_DATA . 'Persistent/EncryptionKey')) { $this->encryptionKey = file_get_...
[ "protected", "function", "getEncryptionKey", "(", ")", "{", "if", "(", "$", "this", "->", "encryptionKey", "===", "null", ")", "{", "$", "this", "->", "encryptionKey", "=", "$", "this", "->", "cache", "->", "get", "(", "'encryptionKey'", ")", ";", "}", ...
Returns the encryption key from the persistent cache or Data/Persistent directory. If none exists, a new encryption key will be generated and stored in the cache. @return string The configured encryption key stored in Data/Persistent/EncryptionKey
[ "Returns", "the", "encryption", "key", "from", "the", "persistent", "cache", "or", "Data", "/", "Persistent", "directory", ".", "If", "none", "exists", "a", "new", "encryption", "key", "will", "be", "generated", "and", "stored", "in", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/HashService.php#L208-L221
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.handleException
public function handleException($exception) { // Ignore if the error is suppressed by using the shut-up operator @ if (error_reporting() === 0) { return; } $this->renderingOptions = $this->resolveCustomRenderingOptions($exception); if ($this->throwableStorage in...
php
public function handleException($exception) { // Ignore if the error is suppressed by using the shut-up operator @ if (error_reporting() === 0) { return; } $this->renderingOptions = $this->resolveCustomRenderingOptions($exception); if ($this->throwableStorage in...
[ "public", "function", "handleException", "(", "$", "exception", ")", "{", "// Ignore if the error is suppressed by using the shut-up operator @", "if", "(", "error_reporting", "(", ")", "===", "0", ")", "{", "return", ";", "}", "$", "this", "->", "renderingOptions", ...
Handles the given exception @param \Throwable $exception The exception object @return void
[ "Handles", "the", "given", "exception" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L119-L140
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.buildView
protected function buildView(\Throwable $exception, array $renderingOptions): ViewInterface { $statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500; $referenceCode = ($exception instanceof WithReferenceCodeInterface) ? $exception->getReferenceCode() : null...
php
protected function buildView(\Throwable $exception, array $renderingOptions): ViewInterface { $statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500; $referenceCode = ($exception instanceof WithReferenceCodeInterface) ? $exception->getReferenceCode() : null...
[ "protected", "function", "buildView", "(", "\\", "Throwable", "$", "exception", ",", "array", "$", "renderingOptions", ")", ":", "ViewInterface", "{", "$", "statusCode", "=", "(", "$", "exception", "instanceof", "WithHttpStatusInterface", ")", "?", "$", "excepti...
Prepares a Fluid view for rendering the custom error page. @param \Throwable $exception @param array $renderingOptions Rendering options as defined in the settings @return ViewInterface
[ "Prepares", "a", "Fluid", "view", "for", "rendering", "the", "custom", "error", "page", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L158-L194
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.applyLegacyViewOptions
protected function applyLegacyViewOptions(ViewInterface $view, array $renderingOptions): ViewInterface { if (isset($renderingOptions['templatePathAndFilename'])) { ObjectAccess::setProperty($view, 'templatePathAndFilename', $renderingOptions['templatePathAndFilename']); } if (iss...
php
protected function applyLegacyViewOptions(ViewInterface $view, array $renderingOptions): ViewInterface { if (isset($renderingOptions['templatePathAndFilename'])) { ObjectAccess::setProperty($view, 'templatePathAndFilename', $renderingOptions['templatePathAndFilename']); } if (iss...
[ "protected", "function", "applyLegacyViewOptions", "(", "ViewInterface", "$", "view", ",", "array", "$", "renderingOptions", ")", ":", "ViewInterface", "{", "if", "(", "isset", "(", "$", "renderingOptions", "[", "'templatePathAndFilename'", "]", ")", ")", "{", "...
Sets legacy "option" properties to the view for backwards compatibility. @param ViewInterface $view @param array $renderingOptions @return ViewInterface
[ "Sets", "legacy", "option", "properties", "to", "the", "view", "for", "backwards", "compatibility", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L203-L219
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.resolveCustomRenderingOptions
protected function resolveCustomRenderingOptions(\Throwable $exception): array { $renderingOptions = []; if (isset($this->options['defaultRenderingOptions'])) { $renderingOptions = $this->options['defaultRenderingOptions']; } $renderingGroup = $this->resolveRenderingGroup...
php
protected function resolveCustomRenderingOptions(\Throwable $exception): array { $renderingOptions = []; if (isset($this->options['defaultRenderingOptions'])) { $renderingOptions = $this->options['defaultRenderingOptions']; } $renderingGroup = $this->resolveRenderingGroup...
[ "protected", "function", "resolveCustomRenderingOptions", "(", "\\", "Throwable", "$", "exception", ")", ":", "array", "{", "$", "renderingOptions", "=", "[", "]", ";", "if", "(", "isset", "(", "$", "this", "->", "options", "[", "'defaultRenderingOptions'", "]...
Checks if custom rendering rules apply to the given $exception and returns those. @param \Throwable $exception @return array the custom rendering options, or NULL if no custom rendering is defined for this exception
[ "Checks", "if", "custom", "rendering", "rules", "apply", "to", "the", "given", "$exception", "and", "returns", "those", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L227-L239
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.echoExceptionCli
protected function echoExceptionCli(\Throwable $exception) { $response = new CliResponse(); $exceptionMessage = $this->renderSingleExceptionCli($exception); $exceptionMessage = $this->renderNestedExceptonsCli($exception, $exceptionMessage); if ($exception instanceof FlowException) ...
php
protected function echoExceptionCli(\Throwable $exception) { $response = new CliResponse(); $exceptionMessage = $this->renderSingleExceptionCli($exception); $exceptionMessage = $this->renderNestedExceptonsCli($exception, $exceptionMessage); if ($exception instanceof FlowException) ...
[ "protected", "function", "echoExceptionCli", "(", "\\", "Throwable", "$", "exception", ")", "{", "$", "response", "=", "new", "CliResponse", "(", ")", ";", "$", "exceptionMessage", "=", "$", "this", "->", "renderSingleExceptionCli", "(", "$", "exception", ")",...
Formats and echoes the exception and its previous exceptions (if any) for the command line @param \Throwable $exception @return void
[ "Formats", "and", "echoes", "the", "exception", "and", "its", "previous", "exceptions", "(", "if", "any", ")", "for", "the", "command", "line" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L273-L287
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.renderSingleExceptionCli
protected function renderSingleExceptionCli(\Throwable $exception): string { $exceptionMessageParts = $this->splitExceptionMessage($exception->getMessage()); $exceptionMessage = '<error><b>' . $exceptionMessageParts['subject'] . '</b></error>' . PHP_EOL; if ($exceptionMessageParts['body'] !=...
php
protected function renderSingleExceptionCli(\Throwable $exception): string { $exceptionMessageParts = $this->splitExceptionMessage($exception->getMessage()); $exceptionMessage = '<error><b>' . $exceptionMessageParts['subject'] . '</b></error>' . PHP_EOL; if ($exceptionMessageParts['body'] !=...
[ "protected", "function", "renderSingleExceptionCli", "(", "\\", "Throwable", "$", "exception", ")", ":", "string", "{", "$", "exceptionMessageParts", "=", "$", "this", "->", "splitExceptionMessage", "(", "$", "exception", "->", "getMessage", "(", ")", ")", ";", ...
Renders a single exception including message, code and affected file @param \Throwable $exception @return string
[ "Renders", "a", "single", "exception", "including", "message", "code", "and", "affected", "file" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L314-L331
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.renderExceptionDetailCli
protected function renderExceptionDetailCli(string $label, string $value): string { $result = ' <b>' . $label . ': </b>'; $result .= wordwrap($value, 75, PHP_EOL . str_repeat(' ', strlen($label) + 4), true); $result .= PHP_EOL; return $result; }
php
protected function renderExceptionDetailCli(string $label, string $value): string { $result = ' <b>' . $label . ': </b>'; $result .= wordwrap($value, 75, PHP_EOL . str_repeat(' ', strlen($label) + 4), true); $result .= PHP_EOL; return $result; }
[ "protected", "function", "renderExceptionDetailCli", "(", "string", "$", "label", ",", "string", "$", "value", ")", ":", "string", "{", "$", "result", "=", "' <b>'", ".", "$", "label", ".", "': </b>'", ";", "$", "result", ".=", "wordwrap", "(", "$", "va...
Renders the given $value word-wrapped and prefixed with $label @param string $label @param string $value @return string
[ "Renders", "the", "given", "$value", "word", "-", "wrapped", "and", "prefixed", "with", "$label" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L341-L347
neos/flow-development-collection
Neos.Flow/Classes/Error/AbstractExceptionHandler.php
AbstractExceptionHandler.splitExceptionMessage
protected function splitExceptionMessage(string $exceptionMessage): array { $body = ''; $pattern = '/ (?<= # Begin positive lookbehind. [.!?]\s # Either an end of sentence punct, | \n # or line break ) (?<! # Begin negative look...
php
protected function splitExceptionMessage(string $exceptionMessage): array { $body = ''; $pattern = '/ (?<= # Begin positive lookbehind. [.!?]\s # Either an end of sentence punct, | \n # or line break ) (?<! # Begin negative look...
[ "protected", "function", "splitExceptionMessage", "(", "string", "$", "exceptionMessage", ")", ":", "array", "{", "$", "body", "=", "''", ";", "$", "pattern", "=", "'/\n\t\t\t(?<= # Begin positive lookbehind.\n\t\t\t [.!?]\\s # Either an end of sentenc...
Splits the given string into subject and body according to following rules: - If the string is empty or does not contain more than one sentence nor line breaks, the subject will be equal to the string and body will be an empty string - Otherwise the subject is everything until the first line break or end of sentence, t...
[ "Splits", "the", "given", "string", "into", "subject", "and", "body", "according", "to", "following", "rules", ":", "-", "If", "the", "string", "is", "empty", "or", "does", "not", "contain", "more", "than", "one", "sentence", "nor", "line", "breaks", "the"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/AbstractExceptionHandler.php#L357-L380
neos/flow-development-collection
Neos.Flow/Classes/Property/Exception.php
Exception.getStatusCode
public function getStatusCode() { $nestedException = $this->getPrevious(); if ($nestedException !== null && $nestedException instanceof \Neos\Flow\Exception) { return $nestedException->getStatusCode(); } return parent::getStatusCode(); }
php
public function getStatusCode() { $nestedException = $this->getPrevious(); if ($nestedException !== null && $nestedException instanceof \Neos\Flow\Exception) { return $nestedException->getStatusCode(); } return parent::getStatusCode(); }
[ "public", "function", "getStatusCode", "(", ")", "{", "$", "nestedException", "=", "$", "this", "->", "getPrevious", "(", ")", ";", "if", "(", "$", "nestedException", "!==", "null", "&&", "$", "nestedException", "instanceof", "\\", "Neos", "\\", "Flow", "\...
Return the status code of the nested exception, if any. @return integer
[ "Return", "the", "status", "code", "of", "the", "nested", "exception", "if", "any", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/Exception.php#L26-L33
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Parser/Interceptor/ResourceInterceptor.php
ResourceInterceptor.setDefaultPackageKey
public function setDefaultPackageKey($defaultPackageKey) { if (!preg_match(Package::PATTERN_MATCH_PACKAGEKEY, $defaultPackageKey)) { throw new \InvalidArgumentException('The given argument was not a valid package key.', 1277287099); } $this->defaultPackageKey = $defaultPackageKey...
php
public function setDefaultPackageKey($defaultPackageKey) { if (!preg_match(Package::PATTERN_MATCH_PACKAGEKEY, $defaultPackageKey)) { throw new \InvalidArgumentException('The given argument was not a valid package key.', 1277287099); } $this->defaultPackageKey = $defaultPackageKey...
[ "public", "function", "setDefaultPackageKey", "(", "$", "defaultPackageKey", ")", "{", "if", "(", "!", "preg_match", "(", "Package", "::", "PATTERN_MATCH_PACKAGEKEY", ",", "$", "defaultPackageKey", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "...
Set the default package key to use for resource URIs. @param string $defaultPackageKey @return void @throws \InvalidArgumentException
[ "Set", "the", "default", "package", "key", "to", "use", "for", "resource", "URIs", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/Interceptor/ResourceInterceptor.php#L76-L82
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Parser/Interceptor/ResourceInterceptor.php
ResourceInterceptor.process
public function process(NodeInterface $node, $interceptorPosition, ParsingState $parsingState) { /** @var $node TextNode */ if (strpos($node->getText(), 'Public/') === false) { return $node; } $textParts = preg_split(self::PATTERN_SPLIT_AT_RESOURCE_URIS, $node->getText(),...
php
public function process(NodeInterface $node, $interceptorPosition, ParsingState $parsingState) { /** @var $node TextNode */ if (strpos($node->getText(), 'Public/') === false) { return $node; } $textParts = preg_split(self::PATTERN_SPLIT_AT_RESOURCE_URIS, $node->getText(),...
[ "public", "function", "process", "(", "NodeInterface", "$", "node", ",", "$", "interceptorPosition", ",", "ParsingState", "$", "parsingState", ")", "{", "/** @var $node TextNode */", "if", "(", "strpos", "(", "$", "node", "->", "getText", "(", ")", ",", "'Publ...
Looks for URIs pointing to package resources and in place of those adds ViewHelperNode instances using the ResourceViewHelper. @param NodeInterface $node @param integer $interceptorPosition One of the INTERCEPT_* constants for the current interception point @param ParsingState $parsingState the current parsing state. ...
[ "Looks", "for", "URIs", "pointing", "to", "package", "resources", "and", "in", "place", "of", "those", "adds", "ViewHelperNode", "instances", "using", "the", "ResourceViewHelper", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/Interceptor/ResourceInterceptor.php#L93-L124
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/RenderChildrenViewHelper.php
RenderChildrenViewHelper.addArgumentsToTemplateVariableContainer
protected function addArgumentsToTemplateVariableContainer(array $arguments) { $templateVariableContainer = $this->getWidgetRenderingContext()->getVariableProvider(); foreach ($arguments as $identifier => $value) { $templateVariableContainer->add($identifier, $value); } }
php
protected function addArgumentsToTemplateVariableContainer(array $arguments) { $templateVariableContainer = $this->getWidgetRenderingContext()->getVariableProvider(); foreach ($arguments as $identifier => $value) { $templateVariableContainer->add($identifier, $value); } }
[ "protected", "function", "addArgumentsToTemplateVariableContainer", "(", "array", "$", "arguments", ")", "{", "$", "templateVariableContainer", "=", "$", "this", "->", "getWidgetRenderingContext", "(", ")", "->", "getVariableProvider", "(", ")", ";", "foreach", "(", ...
Add the given arguments to the TemplateVariableContainer of the widget. @param array $arguments @return void
[ "Add", "the", "given", "arguments", "to", "the", "TemplateVariableContainer", "of", "the", "widget", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/RenderChildrenViewHelper.php#L115-L121
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/AuthenticationProviderResolver.php
AuthenticationProviderResolver.resolveProviderClass
public function resolveProviderClass($providerName) { $className = $this->objectManager->getClassNameByObjectName($providerName); if ($className !== false) { return $className; } $className = $this->objectManager->getClassNameByObjectName('Neos\Flow\Security\Authenticati...
php
public function resolveProviderClass($providerName) { $className = $this->objectManager->getClassNameByObjectName($providerName); if ($className !== false) { return $className; } $className = $this->objectManager->getClassNameByObjectName('Neos\Flow\Security\Authenticati...
[ "public", "function", "resolveProviderClass", "(", "$", "providerName", ")", "{", "$", "className", "=", "$", "this", "->", "objectManager", "->", "getClassNameByObjectName", "(", "$", "providerName", ")", ";", "if", "(", "$", "className", "!==", "false", ")",...
Resolves the class name of an authentication provider. If a valid provider class name is given, it is just returned. @param string $providerName The (short) name of the provider @return string The object name of the authentication provider @throws NoAuthenticationProviderFoundException
[ "Resolves", "the", "class", "name", "of", "an", "authentication", "provider", ".", "If", "a", "valid", "provider", "class", "name", "is", "given", "it", "is", "just", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/AuthenticationProviderResolver.php#L47-L60
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.compileCommand
public function compileCommand(bool $force = false) { /** @var VariableFrontend $objectConfigurationCache */ $objectConfigurationCache = $this->cacheManager->getCache('Flow_Object_Configuration'); if ($force === false) { if ($objectConfigurationCache->has('allCompiledCodeUpToDate...
php
public function compileCommand(bool $force = false) { /** @var VariableFrontend $objectConfigurationCache */ $objectConfigurationCache = $this->cacheManager->getCache('Flow_Object_Configuration'); if ($force === false) { if ($objectConfigurationCache->has('allCompiledCodeUpToDate...
[ "public", "function", "compileCommand", "(", "bool", "$", "force", "=", "false", ")", "{", "/** @var VariableFrontend $objectConfigurationCache */", "$", "objectConfigurationCache", "=", "$", "this", "->", "cacheManager", "->", "getCache", "(", "'Flow_Object_Configuration...
Explicitly compile proxy classes The compile command triggers the proxy class compilation. Although a compilation run is triggered automatically by Flow, there might be cases in a production context where a manual compile run is needed. @Flow\Internal @param boolean $force If set, classes will be compiled even though...
[ "Explicitly", "compile", "proxy", "classes" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L181-L219
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.migrateCommand
public function migrateCommand(string $package, bool $status = false, string $packagesPath = null, string $version = null, bool $verbose = false, bool $force = false) { // This command will never be really called. It rather acts as a stub for rendering the // documentation for this command. In reali...
php
public function migrateCommand(string $package, bool $status = false, string $packagesPath = null, string $version = null, bool $verbose = false, bool $force = false) { // This command will never be really called. It rather acts as a stub for rendering the // documentation for this command. In reali...
[ "public", "function", "migrateCommand", "(", "string", "$", "package", ",", "bool", "$", "status", "=", "false", ",", "string", "$", "packagesPath", "=", "null", ",", "string", "$", "version", "=", "null", ",", "bool", "$", "verbose", "=", "false", ",", ...
Migrate source files as needed This will apply pending code migrations defined in packages to the specified package. For every migration that has been run, it will create a commit in the package. This allows for easy inspection, rollback and use of the fixed code. If the affected package contains local changes or is ...
[ "Migrate", "source", "files", "as", "needed" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L263-L269
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.shellCommand
public function shellCommand() { if (!function_exists('readline_read_history')) { $this->outputLine('Interactive Shell is not available on this system!'); $this->quit(1); } $subProcess = false; $pipes = []; $historyPathAndFilename = getenv('HOME') . '...
php
public function shellCommand() { if (!function_exists('readline_read_history')) { $this->outputLine('Interactive Shell is not available on this system!'); $this->quit(1); } $subProcess = false; $pipes = []; $historyPathAndFilename = getenv('HOME') . '...
[ "public", "function", "shellCommand", "(", ")", "{", "if", "(", "!", "function_exists", "(", "'readline_read_history'", ")", ")", "{", "$", "this", "->", "outputLine", "(", "'Interactive Shell is not available on this system!'", ")", ";", "$", "this", "->", "quit"...
Run the interactive Shell The shell command runs Flow's interactive shell. This shell allows for entering commands like through the regular command line interface but additionally supports autocompletion and a user-based command history. @return void
[ "Run", "the", "interactive", "Shell" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L280-L350
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.launchSubProcess
protected function launchSubProcess(): array { $systemCommand = 'FLOW_ROOTPATH=' . FLOW_PATH_ROOT . ' FLOW_PATH_TEMPORARY_BASE=' . FLOW_PATH_TEMPORARY_BASE . ' ' . 'FLOW_CONTEXT=' . $this->bootstrap->getContext() . ' ' . PHP_BINARY . ' -c ' . php_ini_loaded_file() . ' ' . FLOW_PATH_FLOW . 'Scripts/flow.php'...
php
protected function launchSubProcess(): array { $systemCommand = 'FLOW_ROOTPATH=' . FLOW_PATH_ROOT . ' FLOW_PATH_TEMPORARY_BASE=' . FLOW_PATH_TEMPORARY_BASE . ' ' . 'FLOW_CONTEXT=' . $this->bootstrap->getContext() . ' ' . PHP_BINARY . ' -c ' . php_ini_loaded_file() . ' ' . FLOW_PATH_FLOW . 'Scripts/flow.php'...
[ "protected", "function", "launchSubProcess", "(", ")", ":", "array", "{", "$", "systemCommand", "=", "'FLOW_ROOTPATH='", ".", "FLOW_PATH_ROOT", ".", "' FLOW_PATH_TEMPORARY_BASE='", ".", "FLOW_PATH_TEMPORARY_BASE", ".", "' '", ".", "'FLOW_CONTEXT='", ".", "$", "this", ...
Launch sub process @return array The new sub process and its STDIN, STDOUT, STDERR pipes – or false if an error occurred. @throws \RuntimeException
[ "Launch", "sub", "process" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L370-L388
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.echoSubProcessResponse
protected function echoSubProcessResponse(array $pipes) { while (feof($pipes[1]) === false) { $responseLine = fgets($pipes[1]); if (trim($responseLine) === 'READY' || $responseLine === false) { break; } echo($responseLine); } }
php
protected function echoSubProcessResponse(array $pipes) { while (feof($pipes[1]) === false) { $responseLine = fgets($pipes[1]); if (trim($responseLine) === 'READY' || $responseLine === false) { break; } echo($responseLine); } }
[ "protected", "function", "echoSubProcessResponse", "(", "array", "$", "pipes", ")", "{", "while", "(", "feof", "(", "$", "pipes", "[", "1", "]", ")", "===", "false", ")", "{", "$", "responseLine", "=", "fgets", "(", "$", "pipes", "[", "1", "]", ")", ...
Echoes the currently pending response from the sub process @param array $pipes @return void
[ "Echoes", "the", "currently", "pending", "response", "from", "the", "sub", "process" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L396-L405
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.quitSubProcess
protected function quitSubProcess($subProcess, array $pipes) { fwrite($pipes[0], "QUIT\n"); fclose($pipes[0]); fclose($pipes[1]); fclose($pipes[2]); proc_close($subProcess); }
php
protected function quitSubProcess($subProcess, array $pipes) { fwrite($pipes[0], "QUIT\n"); fclose($pipes[0]); fclose($pipes[1]); fclose($pipes[2]); proc_close($subProcess); }
[ "protected", "function", "quitSubProcess", "(", "$", "subProcess", ",", "array", "$", "pipes", ")", "{", "fwrite", "(", "$", "pipes", "[", "0", "]", ",", "\"QUIT\\n\"", ")", ";", "fclose", "(", "$", "pipes", "[", "0", "]", ")", ";", "fclose", "(", ...
Cleanly terminates the given sub process @param resource $subProcess The sub process to quite @param array $pipes The current STDIN, STDOUT and STDERR pipes @return void
[ "Cleanly", "terminates", "the", "given", "sub", "process" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L414-L421
neos/flow-development-collection
Neos.Flow/Classes/Command/CoreCommandController.php
CoreCommandController.autocomplete
protected function autocomplete(string $partialCommand, int $index): array { // @TODO Add more functionality by parsing the current buffer with readline_info() // @TODO Filter file system elements (if possible at all) $suggestions = []; $availableCommands = $this->bootstrap->getObj...
php
protected function autocomplete(string $partialCommand, int $index): array { // @TODO Add more functionality by parsing the current buffer with readline_info() // @TODO Filter file system elements (if possible at all) $suggestions = []; $availableCommands = $this->bootstrap->getObj...
[ "protected", "function", "autocomplete", "(", "string", "$", "partialCommand", ",", "int", "$", "index", ")", ":", "array", "{", "// @TODO Add more functionality by parsing the current buffer with readline_info()", "// @TODO Filter file system elements (if possible at all)", "$", ...
Returns autocomplete suggestions on hitting the TAB key. @param string $partialCommand The current (partial) command where the TAB key was hit @param integer $index The cursor index at the current (partial) command @return array
[ "Returns", "autocomplete", "suggestions", "on", "hitting", "the", "TAB", "key", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CoreCommandController.php#L430-L449
neos/flow-development-collection
Neos.Eel/Classes/ProtectedContext.php
ProtectedContext.call
public function call($method, array $arguments = []) { if ($this->value === null || isset($this->whitelist[$method]) || isset($this->whitelist['*']) || ($this->value instanceof ProtectedContextAwareInterface && $this->value->allowsCallOfMethod($method))) { return parent::call($method, $arguments...
php
public function call($method, array $arguments = []) { if ($this->value === null || isset($this->whitelist[$method]) || isset($this->whitelist['*']) || ($this->value instanceof ProtectedContextAwareInterface && $this->value->allowsCallOfMethod($method))) { return parent::call($method, $arguments...
[ "public", "function", "call", "(", "$", "method", ",", "array", "$", "arguments", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "value", "===", "null", "||", "isset", "(", "$", "this", "->", "whitelist", "[", "$", "method", "]", ")", "||...
Call a method if in whitelist @param string $method @param array $arguments @return mixed|void @throws NotAllowedException
[ "Call", "a", "method", "if", "in", "whitelist" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/ProtectedContext.php#L39-L45
neos/flow-development-collection
Neos.Eel/Classes/ProtectedContext.php
ProtectedContext.getAndWrap
public function getAndWrap($path = null) { // There are some cases where the $path is a ProtectedContext, especially when doing s.th. like // foo()[myOffset]. In this case we need to unwrap it. if ($path instanceof ProtectedContext) { $path = $path->unwrap(); } $...
php
public function getAndWrap($path = null) { // There are some cases where the $path is a ProtectedContext, especially when doing s.th. like // foo()[myOffset]. In this case we need to unwrap it. if ($path instanceof ProtectedContext) { $path = $path->unwrap(); } $...
[ "public", "function", "getAndWrap", "(", "$", "path", "=", "null", ")", "{", "// There are some cases where the $path is a ProtectedContext, especially when doing s.th. like", "// foo()[myOffset]. In this case we need to unwrap it.", "if", "(", "$", "path", "instanceof", "Protected...
Get a value by path and wrap it into another context The whitelist for the given path is applied to the new context. @param string $path @return Context The wrapped value
[ "Get", "a", "value", "by", "path", "and", "wrap", "it", "into", "another", "context" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/ProtectedContext.php#L55-L68
neos/flow-development-collection
Neos.Eel/Classes/ProtectedContext.php
ProtectedContext.whitelist
public function whitelist($pathOrMethods) { if (!is_array($pathOrMethods)) { $pathOrMethods = [$pathOrMethods]; } foreach ($pathOrMethods as $pathOrMethod) { $parts = explode('.', $pathOrMethod); $current = &$this->whitelist; $count = count($pa...
php
public function whitelist($pathOrMethods) { if (!is_array($pathOrMethods)) { $pathOrMethods = [$pathOrMethods]; } foreach ($pathOrMethods as $pathOrMethod) { $parts = explode('.', $pathOrMethod); $current = &$this->whitelist; $count = count($pa...
[ "public", "function", "whitelist", "(", "$", "pathOrMethods", ")", "{", "if", "(", "!", "is_array", "(", "$", "pathOrMethods", ")", ")", "{", "$", "pathOrMethods", "=", "[", "$", "pathOrMethods", "]", ";", "}", "foreach", "(", "$", "pathOrMethods", "as",...
Whitelist the given method (or array of methods) for calls Method can be whitelisted on the root level of the context or for arbitrary paths. A special method "*" will allow all methods to be called. Examples: $context->whitelist('myMethod'); $context->whitelist('*'); $context->whitelist(array('String.*', 'Array.r...
[ "Whitelist", "the", "given", "method", "(", "or", "array", "of", "methods", ")", "for", "calls" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/ProtectedContext.php#L88-L106
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php
DynamicRoutePart.matchWithParameters
final public function matchWithParameters(&$routePath, RouteParameters $parameters) { $this->value = null; $this->parameters = $parameters; if ($this->name === null || $this->name === '') { return false; } $valueToMatch = $this->findValueToMatch($routePath); ...
php
final public function matchWithParameters(&$routePath, RouteParameters $parameters) { $this->value = null; $this->parameters = $parameters; if ($this->name === null || $this->name === '') { return false; } $valueToMatch = $this->findValueToMatch($routePath); ...
[ "final", "public", "function", "matchWithParameters", "(", "&", "$", "routePath", ",", "RouteParameters", "$", "parameters", ")", "{", "$", "this", "->", "value", "=", "null", ";", "$", "this", "->", "parameters", "=", "$", "parameters", ";", "if", "(", ...
Checks whether this Dynamic Route Part corresponds to the given $routePath. On successful match this method sets $this->value to the corresponding uriPart and shortens $routePath respectively. @param string $routePath The request path to be matched - without query parameters, host and fragment. @param RouteParameters...
[ "Checks", "whether", "this", "Dynamic", "Route", "Part", "corresponds", "to", "the", "given", "$routePath", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php#L86-L100
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php
DynamicRoutePart.findValueToMatch
protected function findValueToMatch($routePath) { if (!isset($routePath) || $routePath === '' || $routePath[0] === '/') { return ''; } $valueToMatch = $routePath; if ($this->splitString !== '') { $splitStringPosition = strpos($valueToMatch, $this->splitString)...
php
protected function findValueToMatch($routePath) { if (!isset($routePath) || $routePath === '' || $routePath[0] === '/') { return ''; } $valueToMatch = $routePath; if ($this->splitString !== '') { $splitStringPosition = strpos($valueToMatch, $this->splitString)...
[ "protected", "function", "findValueToMatch", "(", "$", "routePath", ")", "{", "if", "(", "!", "isset", "(", "$", "routePath", ")", "||", "$", "routePath", "===", "''", "||", "$", "routePath", "[", "0", "]", "===", "'/'", ")", "{", "return", "''", ";"...
Returns the first part of $routePath. If a split string is set, only the first part of the value until location of the splitString is returned. This method can be overridden by custom RoutePartHandlers to implement custom matching mechanisms. @param string $routePath The request path to be matched @return string value...
[ "Returns", "the", "first", "part", "of", "$routePath", ".", "If", "a", "split", "string", "is", "set", "only", "the", "first", "part", "of", "the", "value", "until", "location", "of", "the", "splitString", "is", "returned", ".", "This", "method", "can", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php#L111-L127
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php
DynamicRoutePart.removeMatchingPortionFromRequestPath
protected function removeMatchingPortionFromRequestPath(&$routePath, $valueToMatch) { if ($valueToMatch !== null && $valueToMatch !== '') { $routePath = substr($routePath, strlen($valueToMatch)); } }
php
protected function removeMatchingPortionFromRequestPath(&$routePath, $valueToMatch) { if ($valueToMatch !== null && $valueToMatch !== '') { $routePath = substr($routePath, strlen($valueToMatch)); } }
[ "protected", "function", "removeMatchingPortionFromRequestPath", "(", "&", "$", "routePath", ",", "$", "valueToMatch", ")", "{", "if", "(", "$", "valueToMatch", "!==", "null", "&&", "$", "valueToMatch", "!==", "''", ")", "{", "$", "routePath", "=", "substr", ...
Removes matching part from $routePath. This method can be overridden by custom RoutePartHandlers to implement custom matching mechanisms. @param string $routePath The request path to be matched @param string $valueToMatch The matching value @return void @api
[ "Removes", "matching", "part", "from", "$routePath", ".", "This", "method", "can", "be", "overridden", "by", "custom", "RoutePartHandlers", "to", "implement", "custom", "matching", "mechanisms", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php#L155-L160
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php
DynamicRoutePart.resolve
final public function resolve(array &$routeValues) { $this->value = null; if ($this->name === null || $this->name === '') { return false; } $valueToResolve = $this->findValueToResolve($routeValues); $resolveResult = $this->resolveValue($valueToResolve); if...
php
final public function resolve(array &$routeValues) { $this->value = null; if ($this->name === null || $this->name === '') { return false; } $valueToResolve = $this->findValueToResolve($routeValues); $resolveResult = $this->resolveValue($valueToResolve); if...
[ "final", "public", "function", "resolve", "(", "array", "&", "$", "routeValues", ")", "{", "$", "this", "->", "value", "=", "null", ";", "if", "(", "$", "this", "->", "name", "===", "null", "||", "$", "this", "->", "name", "===", "''", ")", "{", ...
Checks whether $routeValues contains elements which correspond to this Dynamic Route Part. If a corresponding element is found in $routeValues, this element is removed from the array. @param array $routeValues An array with key/value pairs to be resolved by Dynamic Route Parts. @return bool|ResolveResult true or an in...
[ "Checks", "whether", "$routeValues", "contains", "elements", "which", "correspond", "to", "this", "Dynamic", "Route", "Part", ".", "If", "a", "corresponding", "element", "is", "found", "in", "$routeValues", "this", "element", "is", "removed", "from", "the", "arr...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php#L169-L182
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php
DynamicRoutePart.findValueToResolve
protected function findValueToResolve(array $routeValues) { if ($this->name === null || $this->name === '') { return null; } return ObjectAccess::getPropertyPath($routeValues, $this->name); }
php
protected function findValueToResolve(array $routeValues) { if ($this->name === null || $this->name === '') { return null; } return ObjectAccess::getPropertyPath($routeValues, $this->name); }
[ "protected", "function", "findValueToResolve", "(", "array", "$", "routeValues", ")", "{", "if", "(", "$", "this", "->", "name", "===", "null", "||", "$", "this", "->", "name", "===", "''", ")", "{", "return", "null", ";", "}", "return", "ObjectAccess", ...
Returns the route value of the current route part. This method can be overridden by custom RoutePartHandlers to implement custom resolving mechanisms. @param array $routeValues An array with key/value pairs to be resolved by Dynamic Route Parts. @return string|array value to resolve. @api
[ "Returns", "the", "route", "value", "of", "the", "current", "route", "part", ".", "This", "method", "can", "be", "overridden", "by", "custom", "RoutePartHandlers", "to", "implement", "custom", "resolving", "mechanisms", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php#L192-L198
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php
DynamicRoutePart.resolveValue
protected function resolveValue($value) { if ($value === null) { return false; } if (is_object($value)) { $value = $this->persistenceManager->getIdentifierByObject($value); if ($value === null || (!is_string($value) && !is_integer($value))) { ...
php
protected function resolveValue($value) { if ($value === null) { return false; } if (is_object($value)) { $value = $this->persistenceManager->getIdentifierByObject($value); if ($value === null || (!is_string($value) && !is_integer($value))) { ...
[ "protected", "function", "resolveValue", "(", "$", "value", ")", "{", "if", "(", "$", "value", "===", "null", ")", "{", "return", "false", ";", "}", "if", "(", "is_object", "(", "$", "value", ")", ")", "{", "$", "value", "=", "$", "this", "->", "...
Checks, whether given value can be resolved and if so, sets $this->value to the resolved value. If $value is empty, this method checks whether a default value exists. This method can be overridden by custom RoutePartHandlers to implement custom resolving mechanisms. @param mixed $value value to resolve @return boolean...
[ "Checks", "whether", "given", "value", "can", "be", "resolved", "and", "if", "so", "sets", "$this", "-", ">", "value", "to", "the", "resolved", "value", ".", "If", "$value", "is", "empty", "this", "method", "checks", "whether", "a", "default", "value", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/DynamicRoutePart.php#L209-L225
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Format/IdentifierViewHelper.php
IdentifierViewHelper.render
public function render() { $value = $this->arguments['value']; if ($value === null) { $value = $this->renderChildren(); } if ($value === null) { return null; } if (!is_object($value)) { throw new ViewHelper\Exception('f:format.iden...
php
public function render() { $value = $this->arguments['value']; if ($value === null) { $value = $this->renderChildren(); } if ($value === null) { return null; } if (!is_object($value)) { throw new ViewHelper\Exception('f:format.iden...
[ "public", "function", "render", "(", ")", "{", "$", "value", "=", "$", "this", "->", "arguments", "[", "'value'", "]", ";", "if", "(", "$", "value", "===", "null", ")", "{", "$", "value", "=", "$", "this", "->", "renderChildren", "(", ")", ";", "...
Outputs the identifier of the specified object @return mixed the identifier of $value, usually the UUID @throws ViewHelper\Exception if the given value is no object @api
[ "Outputs", "the", "identifier", "of", "the", "specified", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/IdentifierViewHelper.php#L81-L95
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Format/IdentifierViewHelper.php
IdentifierViewHelper.compile
public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler) { $valueVariableName = $compiler->variableName('value'); $initializationPhpCode .= sprintf('%1$s = (%2$s[\'value\'] !== null ? %2$s[\'value\'] : %3$s());', $valueVariableN...
php
public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler) { $valueVariableName = $compiler->variableName('value'); $initializationPhpCode .= sprintf('%1$s = (%2$s[\'value\'] !== null ? %2$s[\'value\'] : %3$s());', $valueVariableN...
[ "public", "function", "compile", "(", "$", "argumentsName", ",", "$", "closureName", ",", "&", "$", "initializationPhpCode", ",", "ViewHelperNode", "$", "node", ",", "TemplateCompiler", "$", "compiler", ")", "{", "$", "valueVariableName", "=", "$", "compiler", ...
Directly compile to code for the template cache. @param string $argumentsName @param string $closureName @param string $initializationPhpCode @param ViewHelperNode $node @param TemplateCompiler $compiler @return string
[ "Directly", "compile", "to", "code", "for", "the", "template", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/IdentifierViewHelper.php#L107-L117
neos/flow-development-collection
Neos.Flow/Classes/Http/Response.php
Response.setStatus
public function setStatus($code, $message = null) { if (!is_int($code)) { throw new \InvalidArgumentException('The HTTP status code must be of type integer, ' . gettype($code) . ' given.', 1220526013); } if ($message === null) { $message = ResponseInformationHelper::g...
php
public function setStatus($code, $message = null) { if (!is_int($code)) { throw new \InvalidArgumentException('The HTTP status code must be of type integer, ' . gettype($code) . ' given.', 1220526013); } if ($message === null) { $message = ResponseInformationHelper::g...
[ "public", "function", "setStatus", "(", "$", "code", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_int", "(", "$", "code", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The HTTP status code must be of type integer, '...
Sets the HTTP status code and (optionally) a customized message. @param integer $code The status code @param string $message If specified, this message is sent instead of the standard message @return Response This response, for method chaining @throws \InvalidArgumentException if the specified status code is not valid...
[ "Sets", "the", "HTTP", "status", "code", "and", "(", "optionally", ")", "a", "customized", "message", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Response.php#L140-L151
neos/flow-development-collection
Neos.Flow/Classes/Http/Response.php
Response.setNow
public function setNow(\DateTime $now) { $this->now = clone $now; $this->now->setTimezone(new \DateTimeZone('UTC')); $this->headers->set('Date', $this->now); }
php
public function setNow(\DateTime $now) { $this->now = clone $now; $this->now->setTimezone(new \DateTimeZone('UTC')); $this->headers->set('Date', $this->now); }
[ "public", "function", "setNow", "(", "\\", "DateTime", "$", "now", ")", "{", "$", "this", "->", "now", "=", "clone", "$", "now", ";", "$", "this", "->", "now", "->", "setTimezone", "(", "new", "\\", "DateTimeZone", "(", "'UTC'", ")", ")", ";", "$",...
Sets the current point in time. This date / time is used internally for comparisons in order to determine the freshness of this response. By default this DateTime object is set automatically through dependency injection, configured in the Objects.yaml of the Flow package. Unless you are mocking the current time in a ...
[ "Sets", "the", "current", "point", "in", "time", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Response.php#L204-L209
neos/flow-development-collection
Neos.Flow/Classes/Http/Response.php
Response.getAge
public function getAge() { if ($this->headers->has('Age')) { return $this->headers->get('Age'); } else { $dateTimestamp = $this->headers->get('Date')->getTimestamp(); $nowTimestamp = $this->now->getTimestamp(); return ($nowTimestamp > $dateTimestamp) ?...
php
public function getAge() { if ($this->headers->has('Age')) { return $this->headers->get('Age'); } else { $dateTimestamp = $this->headers->get('Date')->getTimestamp(); $nowTimestamp = $this->now->getTimestamp(); return ($nowTimestamp > $dateTimestamp) ?...
[ "public", "function", "getAge", "(", ")", "{", "if", "(", "$", "this", "->", "headers", "->", "has", "(", "'Age'", ")", ")", "{", "return", "$", "this", "->", "headers", "->", "get", "(", "'Age'", ")", ";", "}", "else", "{", "$", "dateTimestamp", ...
Returns the age of this responds in seconds. The age is determined either by an explicitly set Age header or by the difference between Date and "now". Note that, according to RFC 2616 / 13.2.3, the presence of an Age header implies that the response is not first-hand. You should therefore only explicitly set an Age h...
[ "Returns", "the", "age", "of", "this", "responds", "in", "seconds", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Response.php#L330-L339
neos/flow-development-collection
Neos.Flow/Classes/Http/Response.php
Response.makeStandardsCompliant
public function makeStandardsCompliant(Request $request) { if ($request->hasHeader('If-Modified-Since') && $this->headers->has('Last-Modified') && $this->statusCode === 200) { $ifModifiedSinceDate = $request->getHeader('If-Modified-Since'); $lastModifiedDate = $this->headers->get('La...
php
public function makeStandardsCompliant(Request $request) { if ($request->hasHeader('If-Modified-Since') && $this->headers->has('Last-Modified') && $this->statusCode === 200) { $ifModifiedSinceDate = $request->getHeader('If-Modified-Since'); $lastModifiedDate = $this->headers->get('La...
[ "public", "function", "makeStandardsCompliant", "(", "Request", "$", "request", ")", "{", "if", "(", "$", "request", "->", "hasHeader", "(", "'If-Modified-Since'", ")", "&&", "$", "this", "->", "headers", "->", "has", "(", "'Last-Modified'", ")", "&&", "$", ...
Analyzes this response, considering the given request and makes additions or removes certain headers in order to make the response compliant to RFC 2616 and related standards. It is recommended to call this method before the response is sent and Flow does so by default in its built-in HTTP request handler. @param Req...
[ "Analyzes", "this", "response", "considering", "the", "given", "request", "and", "makes", "additions", "or", "removes", "certain", "headers", "in", "order", "to", "make", "the", "response", "compliant", "to", "RFC", "2616", "and", "related", "standards", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Response.php#L462-L503
neos/flow-development-collection
Neos.Flow/Classes/Http/Response.php
Response.sendHeaders
public function sendHeaders() { if (headers_sent() === true) { return; } foreach ($this->renderHeaders() as $header) { header($header, false); } foreach ($this->headers->getCookies() as $cookie) { header('Set-Cookie: ' . $cookie, false); ...
php
public function sendHeaders() { if (headers_sent() === true) { return; } foreach ($this->renderHeaders() as $header) { header($header, false); } foreach ($this->headers->getCookies() as $cookie) { header('Set-Cookie: ' . $cookie, false); ...
[ "public", "function", "sendHeaders", "(", ")", "{", "if", "(", "headers_sent", "(", ")", "===", "true", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "renderHeaders", "(", ")", "as", "$", "header", ")", "{", "header", "(", "$", "...
Sends the HTTP headers. If headers have been sent previously, this method fails silently. @return void @codeCoverageIgnore @deprecated Since Flow 5.1, without replacement TODO: Make private after deprecation period
[ "Sends", "the", "HTTP", "headers", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Response.php#L515-L526
neos/flow-development-collection
Neos.Flow/Classes/Http/Response.php
Response.withStatus
public function withStatus($code, $reasonPhrase = '') { $newResponse = clone $this; $newResponse->setStatus($code, ($reasonPhrase === '' ? null : $reasonPhrase)); return $newResponse; }
php
public function withStatus($code, $reasonPhrase = '') { $newResponse = clone $this; $newResponse->setStatus($code, ($reasonPhrase === '' ? null : $reasonPhrase)); return $newResponse; }
[ "public", "function", "withStatus", "(", "$", "code", ",", "$", "reasonPhrase", "=", "''", ")", "{", "$", "newResponse", "=", "clone", "$", "this", ";", "$", "newResponse", "->", "setStatus", "(", "$", "code", ",", "(", "$", "reasonPhrase", "===", "''"...
Return an instance with the specified status code and, optionally, reason phrase. If no reason phrase is specified, implementations MAY choose to default to the RFC 7231 or IANA recommended reason phrase for the response's status code. This method MUST be implemented in such a way as to retain the immutability of the...
[ "Return", "an", "instance", "with", "the", "specified", "status", "code", "and", "optionally", "reason", "phrase", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Response.php#L591-L596
neos/flow-development-collection
Neos.Flow/Classes/Core/Booting/Sequence.php
Sequence.removeStep
public function removeStep(string $stepIdentifier) { $removedOccurrences = 0; foreach ($this->steps as $previousStepIdentifier => $steps) { foreach ($steps as $step) { if ($step->getIdentifier() === $stepIdentifier) { unset($this->steps[$previousStepId...
php
public function removeStep(string $stepIdentifier) { $removedOccurrences = 0; foreach ($this->steps as $previousStepIdentifier => $steps) { foreach ($steps as $step) { if ($step->getIdentifier() === $stepIdentifier) { unset($this->steps[$previousStepId...
[ "public", "function", "removeStep", "(", "string", "$", "stepIdentifier", ")", "{", "$", "removedOccurrences", "=", "0", ";", "foreach", "(", "$", "this", "->", "steps", "as", "$", "previousStepIdentifier", "=>", "$", "steps", ")", "{", "foreach", "(", "$"...
Removes all occurrences of the specified step from this sequence @param string $stepIdentifier @return void @throws FlowException
[ "Removes", "all", "occurrences", "of", "the", "specified", "step", "from", "this", "sequence" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Sequence.php#L64-L78
neos/flow-development-collection
Neos.Flow/Classes/Core/Booting/Sequence.php
Sequence.invokeStep
protected function invokeStep(Step $step, Bootstrap $bootstrap) { $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', [$step, $this->identifier]); $identifier = $step->getIdentifier(); $step($bootstrap); $bootstrap->getSignalSlotDispatcher()->dispatch(__CLA...
php
protected function invokeStep(Step $step, Bootstrap $bootstrap) { $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', [$step, $this->identifier]); $identifier = $step->getIdentifier(); $step($bootstrap); $bootstrap->getSignalSlotDispatcher()->dispatch(__CLA...
[ "protected", "function", "invokeStep", "(", "Step", "$", "step", ",", "Bootstrap", "$", "bootstrap", ")", "{", "$", "bootstrap", "->", "getSignalSlotDispatcher", "(", ")", "->", "dispatch", "(", "__CLASS__", ",", "'beforeInvokeStep'", ",", "[", "$", "step", ...
Invokes a single step of this sequence and also invokes all steps registered to be executed after the given step. @param Step $step The step to invoke @param \Neos\Flow\Core\Bootstrap $bootstrap @return void
[ "Invokes", "a", "single", "step", "of", "this", "sequence", "and", "also", "invokes", "all", "steps", "registered", "to", "be", "executed", "after", "the", "given", "step", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Sequence.php#L103-L114
neos/flow-development-collection
Neos.Flow/Classes/Package.php
Package.boot
public function boot(Core\Bootstrap $bootstrap) { $context = $bootstrap->getContext(); if (PHP_SAPI === 'cli') { $bootstrap->registerRequestHandler(new Cli\SlaveRequestHandler($bootstrap)); $bootstrap->registerRequestHandler(new Cli\CommandRequestHandler($bootstrap)); ...
php
public function boot(Core\Bootstrap $bootstrap) { $context = $bootstrap->getContext(); if (PHP_SAPI === 'cli') { $bootstrap->registerRequestHandler(new Cli\SlaveRequestHandler($bootstrap)); $bootstrap->registerRequestHandler(new Cli\CommandRequestHandler($bootstrap)); ...
[ "public", "function", "boot", "(", "Core", "\\", "Bootstrap", "$", "bootstrap", ")", "{", "$", "context", "=", "$", "bootstrap", "->", "getContext", "(", ")", ";", "if", "(", "PHP_SAPI", "===", "'cli'", ")", "{", "$", "bootstrap", "->", "registerRequestH...
Invokes custom PHP code directly after the package manager has been initialized. @param Core\Bootstrap $bootstrap The current bootstrap @return void
[ "Invokes", "custom", "PHP", "code", "directly", "after", "the", "package", "manager", "has", "been", "initialized", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package.php#L39-L140
neos/flow-development-collection
Neos.Flow/Classes/Command/ResourceCommandController.php
ResourceCommandController.publishCommand
public function publishCommand(string $collection = null) { try { if ($collection === null) { $collections = $this->resourceManager->getCollections(); } else { $collections = []; $collections[$collection] = $this->resourceManager->getCo...
php
public function publishCommand(string $collection = null) { try { if ($collection === null) { $collections = $this->resourceManager->getCollections(); } else { $collections = []; $collections[$collection] = $this->resourceManager->getCo...
[ "public", "function", "publishCommand", "(", "string", "$", "collection", "=", "null", ")", "{", "try", "{", "if", "(", "$", "collection", "===", "null", ")", "{", "$", "collections", "=", "$", "this", "->", "resourceManager", "->", "getCollections", "(", ...
Publish resources This command publishes the resources of the given or - if none was specified, all - resource collections to their respective configured publishing targets. @param string $collection If specified, only resources of this collection are published. Example: 'persistent' @return void
[ "Publish", "resources" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ResourceCommandController.php#L82-L130
neos/flow-development-collection
Neos.Flow/Classes/Command/ResourceCommandController.php
ResourceCommandController.copyCommand
public function copyCommand(string $sourceCollection, string $targetCollection, bool $publish = false) { $sourceCollectionName = $sourceCollection; $sourceCollection = $this->resourceManager->getCollection($sourceCollectionName); if ($sourceCollection === null) { $this->outputLin...
php
public function copyCommand(string $sourceCollection, string $targetCollection, bool $publish = false) { $sourceCollectionName = $sourceCollection; $sourceCollection = $this->resourceManager->getCollection($sourceCollectionName); if ($sourceCollection === null) { $this->outputLin...
[ "public", "function", "copyCommand", "(", "string", "$", "sourceCollection", ",", "string", "$", "targetCollection", ",", "bool", "$", "publish", "=", "false", ")", "{", "$", "sourceCollectionName", "=", "$", "sourceCollection", ";", "$", "sourceCollection", "="...
Copy resources This command copies all resources from one collection to another storage identified by name. The target storage must be empty and must not be identical to the current storage of the collection. This command merely copies the binary data from one storage to another, it does not change the related Persis...
[ "Copy", "resources" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ResourceCommandController.php#L148-L188
neos/flow-development-collection
Neos.Flow/Classes/Command/ResourceCommandController.php
ResourceCommandController.cleanCommand
public function cleanCommand() { $this->outputLine('Checking if resource data exists for all known resource objects ...'); $this->outputLine(); $mediaPackagePresent = $this->packageManager->isPackageAvailable('Neos.Media'); $resourcesCount = $this->resourceRepository->countAll(); ...
php
public function cleanCommand() { $this->outputLine('Checking if resource data exists for all known resource objects ...'); $this->outputLine(); $mediaPackagePresent = $this->packageManager->isPackageAvailable('Neos.Media'); $resourcesCount = $this->resourceRepository->countAll(); ...
[ "public", "function", "cleanCommand", "(", ")", "{", "$", "this", "->", "outputLine", "(", "'Checking if resource data exists for all known resource objects ...'", ")", ";", "$", "this", "->", "outputLine", "(", ")", ";", "$", "mediaPackagePresent", "=", "$", "this"...
Clean up resource registry This command checks the resource registry (that is the database tables) for orphaned resource objects which don't seem to have any corresponding data anymore (for example: the file in Data/Persistent/Resources has been deleted without removing the related PersistentResource object). If the ...
[ "Clean", "up", "resource", "registry" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ResourceCommandController.php#L204-L315
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetController.php
AbstractWidgetController.processRequest
public function processRequest(RequestInterface $request, ResponseInterface $response) { /** @var $request \Neos\Flow\Mvc\ActionRequest */ /** @var $widgetContext WidgetContext */ $widgetContext = $request->getInternalArgument('__widgetContext'); if ($widgetContext === null) { ...
php
public function processRequest(RequestInterface $request, ResponseInterface $response) { /** @var $request \Neos\Flow\Mvc\ActionRequest */ /** @var $widgetContext WidgetContext */ $widgetContext = $request->getInternalArgument('__widgetContext'); if ($widgetContext === null) { ...
[ "public", "function", "processRequest", "(", "RequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", ")", "{", "/** @var $request \\Neos\\Flow\\Mvc\\ActionRequest */", "/** @var $widgetContext WidgetContext */", "$", "widgetContext", "=", "$", "request", ...
Handles a request. The result output is returned by altering the given response. @param RequestInterface $request The request object @param ResponseInterface $response The response, modified by this handler @return void @throws WidgetContextNotFoundException @api
[ "Handles", "a", "request", ".", "The", "result", "output", "is", "returned", "by", "altering", "the", "given", "response", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Widget/AbstractWidgetController.php#L45-L55
neos/flow-development-collection
Neos.Flow/Classes/Http/RequestHandler.php
RequestHandler.handleRequest
public function handleRequest() { // Create the request very early so the ResourceManagement has a chance to grab it: $request = Request::createFromEnvironment(); $response = new Response(); $this->componentContext = new ComponentContext($request, $response); $this->boot(); ...
php
public function handleRequest() { // Create the request very early so the ResourceManagement has a chance to grab it: $request = Request::createFromEnvironment(); $response = new Response(); $this->componentContext = new ComponentContext($request, $response); $this->boot(); ...
[ "public", "function", "handleRequest", "(", ")", "{", "// Create the request very early so the ResourceManagement has a chance to grab it:", "$", "request", "=", "Request", "::", "createFromEnvironment", "(", ")", ";", "$", "response", "=", "new", "Response", "(", ")", ...
Handles a HTTP request @return void
[ "Handles", "a", "HTTP", "request" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/RequestHandler.php#L91-L116
neos/flow-development-collection
Neos.Flow/Classes/Http/RequestHandler.php
RequestHandler.resolveDependencies
protected function resolveDependencies() { $objectManager = $this->bootstrap->getObjectManager(); $this->baseComponentChain = $objectManager->get(ComponentChain::class); }
php
protected function resolveDependencies() { $objectManager = $this->bootstrap->getObjectManager(); $this->baseComponentChain = $objectManager->get(ComponentChain::class); }
[ "protected", "function", "resolveDependencies", "(", ")", "{", "$", "objectManager", "=", "$", "this", "->", "bootstrap", "->", "getObjectManager", "(", ")", ";", "$", "this", "->", "baseComponentChain", "=", "$", "objectManager", "->", "get", "(", "ComponentC...
Resolves a few dependencies of this request handler which can't be resolved automatically due to the early stage of the boot process this request handler is invoked at. @return void
[ "Resolves", "a", "few", "dependencies", "of", "this", "request", "handler", "which", "can", "t", "be", "resolved", "automatically", "due", "to", "the", "early", "stage", "of", "the", "boot", "process", "this", "request", "handler", "is", "invoked", "at", "."...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/RequestHandler.php#L158-L162
neos/flow-development-collection
Neos.Flow/Classes/Http/RequestHandler.php
RequestHandler.addPoweredByHeader
protected function addPoweredByHeader(ResponseInterface $response): ResponseInterface { $token = static::prepareApplicationToken($this->bootstrap->getObjectManager()); if ($token === '') { return $response; } return $response->withAddedHeader('X-Flow-Powered', $token); ...
php
protected function addPoweredByHeader(ResponseInterface $response): ResponseInterface { $token = static::prepareApplicationToken($this->bootstrap->getObjectManager()); if ($token === '') { return $response; } return $response->withAddedHeader('X-Flow-Powered', $token); ...
[ "protected", "function", "addPoweredByHeader", "(", "ResponseInterface", "$", "response", ")", ":", "ResponseInterface", "{", "$", "token", "=", "static", "::", "prepareApplicationToken", "(", "$", "this", "->", "bootstrap", "->", "getObjectManager", "(", ")", ")"...
Adds an HTTP header to the Response which indicates that the application is powered by Flow. @param ResponseInterface $response @return ResponseInterface @throws \Neos\Flow\Exception
[ "Adds", "an", "HTTP", "header", "to", "the", "Response", "which", "indicates", "that", "the", "application", "is", "powered", "by", "Flow", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/RequestHandler.php#L171-L179
neos/flow-development-collection
Neos.Flow/Classes/Http/RequestHandler.php
RequestHandler.prepareApplicationToken
public static function prepareApplicationToken(ObjectManagerInterface $objectManager): string { $configurationManager = $objectManager->get(ConfigurationManager::class); $tokenSetting = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow.http.applica...
php
public static function prepareApplicationToken(ObjectManagerInterface $objectManager): string { $configurationManager = $objectManager->get(ConfigurationManager::class); $tokenSetting = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow.http.applica...
[ "public", "static", "function", "prepareApplicationToken", "(", "ObjectManagerInterface", "$", "objectManager", ")", ":", "string", "{", "$", "configurationManager", "=", "$", "objectManager", "->", "get", "(", "ConfigurationManager", "::", "class", ")", ";", "$", ...
Generate an application information header for the response based on settings and package versions. Will statically compile in production for performance benefits. @param ObjectManagerInterface $objectManager @return string @throws \Neos\Flow\Configuration\Exception\InvalidConfigurationTypeException @Flow\CompileStati...
[ "Generate", "an", "application", "information", "header", "for", "the", "response", "based", "on", "settings", "and", "package", "versions", ".", "Will", "statically", "compile", "in", "production", "for", "performance", "benefits", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/RequestHandler.php#L214-L242
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/SessionConverter.php
SessionConverter.canConvertFrom
public function canConvertFrom($source, $targetType) { return (preg_match(self::PATTERN_MATCH_SESSIONIDENTIFIER, $source) === 1) && ($targetType === $this->targetType); }
php
public function canConvertFrom($source, $targetType) { return (preg_match(self::PATTERN_MATCH_SESSIONIDENTIFIER, $source) === 1) && ($targetType === $this->targetType); }
[ "public", "function", "canConvertFrom", "(", "$", "source", ",", "$", "targetType", ")", "{", "return", "(", "preg_match", "(", "self", "::", "PATTERN_MATCH_SESSIONIDENTIFIER", ",", "$", "source", ")", "===", "1", ")", "&&", "(", "$", "targetType", "===", ...
This implementation always returns true for this method. @param mixed $source the source data @param string $targetType the type to convert to. @return boolean true if this TypeConverter can convert from $source to $targetType, false otherwise. @api
[ "This", "implementation", "always", "returns", "true", "for", "this", "method", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/SessionConverter.php#L64-L67
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/SessionConverter.php
SessionConverter.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { return $this->sessionManager->getSession($source); }
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { return $this->sessionManager->getSession($source); }
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "return", "$", "this", "->",...
Convert a session identifier from $source to a Session object @param string $source @param string $targetType @param array $convertedChildProperties @param PropertyMappingConfigurationInterface $configuration @return object the target type @throws InvalidTargetException @throws \InvalidArgumentException
[ "Convert", "a", "session", "identifier", "from", "$source", "to", "a", "Session", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/SessionConverter.php#L80-L83
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.setObjects
public function setObjects(array $objects) { $this->objects = $objects; $this->objects[ObjectManagerInterface::class]['i'] = $this; $this->objects[get_class($this)]['i'] = $this; }
php
public function setObjects(array $objects) { $this->objects = $objects; $this->objects[ObjectManagerInterface::class]['i'] = $this; $this->objects[get_class($this)]['i'] = $this; }
[ "public", "function", "setObjects", "(", "array", "$", "objects", ")", "{", "$", "this", "->", "objects", "=", "$", "objects", ";", "$", "this", "->", "objects", "[", "ObjectManagerInterface", "::", "class", "]", "[", "'i'", "]", "=", "$", "this", ";",...
Sets the objects array @param array $objects An array of object names and some information about each registered object (scope, lower cased name etc.) @return void
[ "Sets", "the", "objects", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L100-L105
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.isRegistered
public function isRegistered($objectName) { if (isset($this->objects[$objectName])) { return true; } if ($objectName[0] === '\\') { throw new \InvalidArgumentException('Object names must not start with a backslash ("' . $objectName . '")', 1270827335); } ...
php
public function isRegistered($objectName) { if (isset($this->objects[$objectName])) { return true; } if ($objectName[0] === '\\') { throw new \InvalidArgumentException('Object names must not start with a backslash ("' . $objectName . '")', 1270827335); } ...
[ "public", "function", "isRegistered", "(", "$", "objectName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", ")", ")", "{", "return", "true", ";", "}", "if", "(", "$", "objectName", "[", "0", "]", "===...
Returns true if an object with the given name is registered @param string $objectName Name of the object @return boolean true if the object has been registered, otherwise false @throws \InvalidArgumentException @api
[ "Returns", "true", "if", "an", "object", "with", "the", "given", "name", "is", "registered" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L137-L147
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.registerShutdownObject
public function registerShutdownObject($object, $shutdownLifecycleMethodName) { if (strpos(get_class($object), 'Neos\Flow\\') === 0) { $this->internalShutdownObjects[$object] = $shutdownLifecycleMethodName; } else { $this->shutdownObjects[$object] = $shutdownLifecycleMethodNa...
php
public function registerShutdownObject($object, $shutdownLifecycleMethodName) { if (strpos(get_class($object), 'Neos\Flow\\') === 0) { $this->internalShutdownObjects[$object] = $shutdownLifecycleMethodName; } else { $this->shutdownObjects[$object] = $shutdownLifecycleMethodNa...
[ "public", "function", "registerShutdownObject", "(", "$", "object", ",", "$", "shutdownLifecycleMethodName", ")", "{", "if", "(", "strpos", "(", "get_class", "(", "$", "object", ")", ",", "'Neos\\Flow\\\\'", ")", "===", "0", ")", "{", "$", "this", "->", "i...
Registers the passed shutdown lifecycle method for the given object @param object $object The object to register the shutdown method for @param string $shutdownLifecycleMethodName The method name of the shutdown method to be called @return void @api
[ "Registers", "the", "passed", "shutdown", "lifecycle", "method", "for", "the", "given", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L169-L176
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.get
public function get($objectName) { // XXX: This is a b/c fix for the deprecation of doctrine ObjectManager. Remove this with Flow 6.0 if ($objectName === \Doctrine\Common\Persistence\ObjectManager::class) { $objectName = \Doctrine\ORM\EntityManagerInterface::class; } if ...
php
public function get($objectName) { // XXX: This is a b/c fix for the deprecation of doctrine ObjectManager. Remove this with Flow 6.0 if ($objectName === \Doctrine\Common\Persistence\ObjectManager::class) { $objectName = \Doctrine\ORM\EntityManagerInterface::class; } if ...
[ "public", "function", "get", "(", "$", "objectName", ")", "{", "// XXX: This is a b/c fix for the deprecation of doctrine ObjectManager. Remove this with Flow 6.0", "if", "(", "$", "objectName", "===", "\\", "Doctrine", "\\", "Common", "\\", "Persistence", "\\", "ObjectMana...
Returns a fresh or existing instance of the object specified by $objectName. @param string $objectName The name of the object to return an instance of @return object The object instance @throws Exception\UnknownObjectException if an object with the given name does not exist @throws \InvalidArgumentException @api
[ "Returns", "a", "fresh", "or", "existing", "instance", "of", "the", "object", "specified", "by", "$objectName", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L187-L223
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getScope
public function getScope($objectName) { if (!isset($this->objects[$objectName])) { $hint = ($objectName[0] === '\\') ? ' Hint: You specified an object name with a leading backslash!' : ''; throw new Exception\UnknownObjectException('Object "' . $objectName . '" is not registered.' . ...
php
public function getScope($objectName) { if (!isset($this->objects[$objectName])) { $hint = ($objectName[0] === '\\') ? ' Hint: You specified an object name with a leading backslash!' : ''; throw new Exception\UnknownObjectException('Object "' . $objectName . '" is not registered.' . ...
[ "public", "function", "getScope", "(", "$", "objectName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", ")", ")", "{", "$", "hint", "=", "(", "$", "objectName", "[", "0", "]", "===", "'\\\\'", ...
Returns the scope of the specified object. @param string $objectName The object name @return integer One of the Configuration::SCOPE_ constants @throws Exception\UnknownObjectException @api
[ "Returns", "the", "scope", "of", "the", "specified", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L233-L240
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getCaseSensitiveObjectName
public function getCaseSensitiveObjectName($caseInsensitiveObjectName) { $lowerCasedObjectName = ltrim(strtolower($caseInsensitiveObjectName), '\\'); if (isset($this->cachedLowerCasedObjectNames[$lowerCasedObjectName])) { return $this->cachedLowerCasedObjectNames[$lowerCasedObjectName]; ...
php
public function getCaseSensitiveObjectName($caseInsensitiveObjectName) { $lowerCasedObjectName = ltrim(strtolower($caseInsensitiveObjectName), '\\'); if (isset($this->cachedLowerCasedObjectNames[$lowerCasedObjectName])) { return $this->cachedLowerCasedObjectNames[$lowerCasedObjectName]; ...
[ "public", "function", "getCaseSensitiveObjectName", "(", "$", "caseInsensitiveObjectName", ")", "{", "$", "lowerCasedObjectName", "=", "ltrim", "(", "strtolower", "(", "$", "caseInsensitiveObjectName", ")", ",", "'\\\\'", ")", ";", "if", "(", "isset", "(", "$", ...
Returns the case sensitive object name of an object specified by a case insensitive object name. If no object of that name exists, false is returned. In general, the case sensitive variant is used everywhere in Flow, however there might be special situations in which the case sensitive name is not available. This meth...
[ "Returns", "the", "case", "sensitive", "object", "name", "of", "an", "object", "specified", "by", "a", "case", "insensitive", "object", "name", ".", "If", "no", "object", "of", "that", "name", "exists", "false", "is", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L256-L271
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getObjectNameByClassName
public function getObjectNameByClassName($className) { if (isset($this->objects[$className]) && (!isset($this->objects[$className]['c']) || $this->objects[$className]['c'] === $className)) { return $className; } foreach ($this->objects as $objectName => $information) { ...
php
public function getObjectNameByClassName($className) { if (isset($this->objects[$className]) && (!isset($this->objects[$className]['c']) || $this->objects[$className]['c'] === $className)) { return $className; } foreach ($this->objects as $objectName => $information) { ...
[ "public", "function", "getObjectNameByClassName", "(", "$", "className", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "objects", "[", "$", "className", "]", ")", "&&", "(", "!", "isset", "(", "$", "this", "->", "objects", "[", "$", "className"...
Returns the object name corresponding to a given class name. @param string $className The class name @return string The object name corresponding to the given class name or false if no object is configured to use that class @throws \InvalidArgumentException @api
[ "Returns", "the", "object", "name", "corresponding", "to", "a", "given", "class", "name", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L281-L297
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getClassNameByObjectName
public function getClassNameByObjectName($objectName) { if (!isset($this->objects[$objectName])) { return (class_exists($objectName)) ? $objectName : false; } return (isset($this->objects[$objectName]['c']) ? $this->objects[$objectName]['c'] : $objectName); }
php
public function getClassNameByObjectName($objectName) { if (!isset($this->objects[$objectName])) { return (class_exists($objectName)) ? $objectName : false; } return (isset($this->objects[$objectName]['c']) ? $this->objects[$objectName]['c'] : $objectName); }
[ "public", "function", "getClassNameByObjectName", "(", "$", "objectName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", ")", ")", "{", "return", "(", "class_exists", "(", "$", "objectName", ")", ")", ...
Returns the implementation class name for the specified object @param string $objectName The object name @return string The class name corresponding to the given object name or false if no such object is registered @api
[ "Returns", "the", "implementation", "class", "name", "for", "the", "specified", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L306-L312
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getPackageKeyByObjectName
public function getPackageKeyByObjectName($objectName) { return (isset($this->objects[$objectName]) ? $this->objects[$objectName]['p'] : false); }
php
public function getPackageKeyByObjectName($objectName) { return (isset($this->objects[$objectName]) ? $this->objects[$objectName]['p'] : false); }
[ "public", "function", "getPackageKeyByObjectName", "(", "$", "objectName", ")", "{", "return", "(", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", ")", "?", "$", "this", "->", "objects", "[", "$", "objectName", "]", "[", "'p'", ...
Returns the key of the package the specified object is contained in. @param string $objectName The object name @return string The package key or false if no such object exists @api
[ "Returns", "the", "key", "of", "the", "package", "the", "specified", "object", "is", "contained", "in", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L321-L324
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.setInstance
public function setInstance($objectName, $instance) { if (!isset($this->objects[$objectName])) { if (!class_exists($objectName, false)) { throw new Exception\UnknownObjectException('Cannot set instance of object "' . $objectName . '" because the object or class name is unknown to...
php
public function setInstance($objectName, $instance) { if (!isset($this->objects[$objectName])) { if (!class_exists($objectName, false)) { throw new Exception\UnknownObjectException('Cannot set instance of object "' . $objectName . '" because the object or class name is unknown to...
[ "public", "function", "setInstance", "(", "$", "objectName", ",", "$", "instance", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", ")", ")", "{", "if", "(", "!", "class_exists", "(", "$", "objectName...
Sets the instance of the given object Objects of scope sessions are assumed to be the real session object, not the lazy loading proxy. @param string $objectName The object name @param object $instance A prebuilt instance @return void @throws Exception\WrongScopeException @throws Exception\UnknownObjectException
[ "Sets", "the", "instance", "of", "the", "given", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L338-L351
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getInstance
public function getInstance($objectName) { return isset($this->objects[$objectName]['i']) ? $this->objects[$objectName]['i'] : null; }
php
public function getInstance($objectName) { return isset($this->objects[$objectName]['i']) ? $this->objects[$objectName]['i'] : null; }
[ "public", "function", "getInstance", "(", "$", "objectName", ")", "{", "return", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", "[", "'i'", "]", ")", "?", "$", "this", "->", "objects", "[", "$", "objectName", "]", "[", "'i'"...
Returns the instance of the specified object or NULL if no instance has been registered yet. @param string $objectName The object name @return object The object or NULL
[ "Returns", "the", "instance", "of", "the", "specified", "object", "or", "NULL", "if", "no", "instance", "has", "been", "registered", "yet", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L372-L375
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getLazyDependencyByHash
public function getLazyDependencyByHash($hash, &$propertyReferenceVariable) { if (!isset($this->dependencyProxies[$hash])) { return null; } $this->dependencyProxies[$hash]->_addPropertyVariable($propertyReferenceVariable); return $this->dependencyProxies[$hash]; }
php
public function getLazyDependencyByHash($hash, &$propertyReferenceVariable) { if (!isset($this->dependencyProxies[$hash])) { return null; } $this->dependencyProxies[$hash]->_addPropertyVariable($propertyReferenceVariable); return $this->dependencyProxies[$hash]; }
[ "public", "function", "getLazyDependencyByHash", "(", "$", "hash", ",", "&", "$", "propertyReferenceVariable", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "dependencyProxies", "[", "$", "hash", "]", ")", ")", "{", "return", "null", ";", "}...
This method is used internally to retrieve either an actual (singleton) instance of the specified dependency or, if no instance exists yet, a Dependency Proxy object which automatically triggers the creation of an instance as soon as it is used the first time. Internally used by the injectProperties method of generate...
[ "This", "method", "is", "used", "internally", "to", "retrieve", "either", "an", "actual", "(", "singleton", ")", "instance", "of", "the", "specified", "dependency", "or", "if", "no", "instance", "exists", "yet", "a", "Dependency", "Proxy", "object", "which", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L389-L396
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.createLazyDependency
public function createLazyDependency($hash, &$propertyReferenceVariable, $className, \Closure $builder) { $this->dependencyProxies[$hash] = new DependencyProxy($className, $builder); $this->dependencyProxies[$hash]->_addPropertyVariable($propertyReferenceVariable); return $this->dependencyPr...
php
public function createLazyDependency($hash, &$propertyReferenceVariable, $className, \Closure $builder) { $this->dependencyProxies[$hash] = new DependencyProxy($className, $builder); $this->dependencyProxies[$hash]->_addPropertyVariable($propertyReferenceVariable); return $this->dependencyPr...
[ "public", "function", "createLazyDependency", "(", "$", "hash", ",", "&", "$", "propertyReferenceVariable", ",", "$", "className", ",", "\\", "Closure", "$", "builder", ")", "{", "$", "this", "->", "dependencyProxies", "[", "$", "hash", "]", "=", "new", "D...
Creates a new DependencyProxy class for a dependency built through code identified through "hash" for a dependency of class $className. The closure in $builder contains code for actually creating the dependency instance once it needs to be materialized. Internally used by the injectProperties method of generated proxy...
[ "Creates", "a", "new", "DependencyProxy", "class", "for", "a", "dependency", "built", "through", "code", "identified", "through", "hash", "for", "a", "dependency", "of", "class", "$className", ".", "The", "closure", "in", "$builder", "contains", "code", "for", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L412-L417
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.getSessionInstances
public function getSessionInstances() { $sessionObjects = []; foreach ($this->objects as $information) { if (isset($information['i']) && $information['s'] === ObjectConfiguration::SCOPE_SESSION) { $sessionObjects[] = $information['i']; } } retu...
php
public function getSessionInstances() { $sessionObjects = []; foreach ($this->objects as $information) { if (isset($information['i']) && $information['s'] === ObjectConfiguration::SCOPE_SESSION) { $sessionObjects[] = $information['i']; } } retu...
[ "public", "function", "getSessionInstances", "(", ")", "{", "$", "sessionObjects", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "objects", "as", "$", "information", ")", "{", "if", "(", "isset", "(", "$", "information", "[", "'i'", "]", ")", ...
Returns all instances of objects with scope session @return array
[ "Returns", "all", "instances", "of", "objects", "with", "scope", "session" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L440-L449
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.shutdown
public function shutdown() { $this->callShutdownMethods($this->shutdownObjects); $securityContext = $this->get(Context::class); /** @var Context $securityContext */ if ($securityContext->isInitialized()) { $this->get(Context::class)->withoutAuthorizationChecks(function (...
php
public function shutdown() { $this->callShutdownMethods($this->shutdownObjects); $securityContext = $this->get(Context::class); /** @var Context $securityContext */ if ($securityContext->isInitialized()) { $this->get(Context::class)->withoutAuthorizationChecks(function (...
[ "public", "function", "shutdown", "(", ")", "{", "$", "this", "->", "callShutdownMethods", "(", "$", "this", "->", "shutdownObjects", ")", ";", "$", "securityContext", "=", "$", "this", "->", "get", "(", "Context", "::", "class", ")", ";", "/** @var Contex...
Shuts down this Object Container by calling the shutdown methods of all object instances which were configured to be shut down. @return void
[ "Shuts", "down", "this", "Object", "Container", "by", "calling", "the", "shutdown", "methods", "of", "all", "object", "instances", "which", "were", "configured", "to", "be", "shut", "down", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L457-L470
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.buildObjectByFactory
protected function buildObjectByFactory($objectName) { $configurationManager = $this->get(ConfigurationManager::class); $factory = $this->get($this->objects[$objectName]['f'][0]); $factoryMethodName = $this->objects[$objectName]['f'][1]; $factoryMethodArguments = []; foreach...
php
protected function buildObjectByFactory($objectName) { $configurationManager = $this->get(ConfigurationManager::class); $factory = $this->get($this->objects[$objectName]['f'][0]); $factoryMethodName = $this->objects[$objectName]['f'][1]; $factoryMethodArguments = []; foreach...
[ "protected", "function", "buildObjectByFactory", "(", "$", "objectName", ")", "{", "$", "configurationManager", "=", "$", "this", "->", "get", "(", "ConfigurationManager", "::", "class", ")", ";", "$", "factory", "=", "$", "this", "->", "get", "(", "$", "t...
Invokes the Factory defined in the object configuration of the specified object in order to build an instance. Arguments which were defined in the object configuration are passed to the factory method. @param string $objectName Name of the object to build @return object The built object
[ "Invokes", "the", "Factory", "defined", "in", "the", "object", "configuration", "of", "the", "specified", "object", "in", "order", "to", "build", "an", "instance", ".", "Arguments", "which", "were", "defined", "in", "the", "object", "configuration", "are", "pa...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L503-L529
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.instantiateClass
protected function instantiateClass($className, array $arguments) { if (isset($this->classesBeingInstantiated[$className])) { throw new Exception\CannotBuildObjectException('Circular dependency detected while trying to instantiate class "' . $className . '".', 1168505928); } try...
php
protected function instantiateClass($className, array $arguments) { if (isset($this->classesBeingInstantiated[$className])) { throw new Exception\CannotBuildObjectException('Circular dependency detected while trying to instantiate class "' . $className . '".', 1168505928); } try...
[ "protected", "function", "instantiateClass", "(", "$", "className", ",", "array", "$", "arguments", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "classesBeingInstantiated", "[", "$", "className", "]", ")", ")", "{", "throw", "new", "Exception", "\...
Speed optimized alternative to ReflectionClass::newInstanceArgs() @param string $className Name of the class to instantiate @param array $arguments Arguments to pass to the constructor @return object The object @throws Exception\CannotBuildObjectException @throws \Exception
[ "Speed", "optimized", "alternative", "to", "ReflectionClass", "::", "newInstanceArgs", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L540-L554
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/ObjectManager.php
ObjectManager.callShutdownMethods
protected function callShutdownMethods(\SplObjectStorage $shutdownObjects) { foreach ($shutdownObjects as $object) { $methodName = $shutdownObjects[$object]; $object->$methodName(); } }
php
protected function callShutdownMethods(\SplObjectStorage $shutdownObjects) { foreach ($shutdownObjects as $object) { $methodName = $shutdownObjects[$object]; $object->$methodName(); } }
[ "protected", "function", "callShutdownMethods", "(", "\\", "SplObjectStorage", "$", "shutdownObjects", ")", "{", "foreach", "(", "$", "shutdownObjects", "as", "$", "object", ")", "{", "$", "methodName", "=", "$", "shutdownObjects", "[", "$", "object", "]", ";"...
Executes the methods of the provided objects. @param \SplObjectStorage $shutdownObjects @return void
[ "Executes", "the", "methods", "of", "the", "provided", "objects", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/ObjectManager.php#L562-L568
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Repository.php
Repository.add
public function add($object) { if (!is_object($object) || !($object instanceof $this->objectType)) { $type = (is_object($object) ? get_class($object) : gettype($object)); throw new IllegalObjectTypeException('The value given to add() was ' . $type . ' , however the ' . get_class($thi...
php
public function add($object) { if (!is_object($object) || !($object instanceof $this->objectType)) { $type = (is_object($object) ? get_class($object) : gettype($object)); throw new IllegalObjectTypeException('The value given to add() was ' . $type . ' , however the ' . get_class($thi...
[ "public", "function", "add", "(", "$", "object", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", "||", "!", "(", "$", "object", "instanceof", "$", "this", "->", "objectType", ")", ")", "{", "$", "type", "=", "(", "is_object", "(", ...
Adds an object to this repository. @param object $object The object to add @return void @throws IllegalObjectTypeException @api
[ "Adds", "an", "object", "to", "this", "repository", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Repository.php#L94-L101
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Repository.php
Repository.remove
public function remove($object) { if (!is_object($object) || !($object instanceof $this->objectType)) { $type = (is_object($object) ? get_class($object) : gettype($object)); throw new IllegalObjectTypeException('The value given to remove() was ' . $type . ' , however the ' . get_clas...
php
public function remove($object) { if (!is_object($object) || !($object instanceof $this->objectType)) { $type = (is_object($object) ? get_class($object) : gettype($object)); throw new IllegalObjectTypeException('The value given to remove() was ' . $type . ' , however the ' . get_clas...
[ "public", "function", "remove", "(", "$", "object", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", "||", "!", "(", "$", "object", "instanceof", "$", "this", "->", "objectType", ")", ")", "{", "$", "type", "=", "(", "is_object", "("...
Removes an object from this repository. @param object $object The object to remove @return void @throws IllegalObjectTypeException @api
[ "Removes", "an", "object", "from", "this", "repository", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Repository.php#L111-L118
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Repository.php
Repository.createQuery
public function createQuery() { $query = new Query($this->objectType); if ($this->defaultOrderings) { $query->setOrderings($this->defaultOrderings); } return $query; }
php
public function createQuery() { $query = new Query($this->objectType); if ($this->defaultOrderings) { $query->setOrderings($this->defaultOrderings); } return $query; }
[ "public", "function", "createQuery", "(", ")", "{", "$", "query", "=", "new", "Query", "(", "$", "this", "->", "objectType", ")", ";", "if", "(", "$", "this", "->", "defaultOrderings", ")", "{", "$", "query", "->", "setOrderings", "(", "$", "this", "...
Returns a query for objects of this repository @return Query @api
[ "Returns", "a", "query", "for", "objects", "of", "this", "repository" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Repository.php#L187-L194
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Repository.php
Repository.update
public function update($object) { if (!($object instanceof $this->objectType)) { throw new IllegalObjectTypeException('The modified object given to update() was not of the type (' . $this->objectType . ') this repository manages.', 1249479625); } $this->persistenceManager->update...
php
public function update($object) { if (!($object instanceof $this->objectType)) { throw new IllegalObjectTypeException('The modified object given to update() was not of the type (' . $this->objectType . ') this repository manages.', 1249479625); } $this->persistenceManager->update...
[ "public", "function", "update", "(", "$", "object", ")", "{", "if", "(", "!", "(", "$", "object", "instanceof", "$", "this", "->", "objectType", ")", ")", "{", "throw", "new", "IllegalObjectTypeException", "(", "'The modified object given to update() was not of th...
Schedules a modified object for persistence. @param object $object The modified object @return void @throws IllegalObjectTypeException @api
[ "Schedules", "a", "modified", "object", "for", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Repository.php#L258-L264
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.initialize
public function initialize(array $packages) { $this->registeredClassNames = $this->registerClassFiles($packages); $this->reflectionService->buildReflectionData($this->registeredClassNames); $rawCustomObjectConfigurations = $this->configurationManager->getConfiguration(ConfigurationManager::...
php
public function initialize(array $packages) { $this->registeredClassNames = $this->registerClassFiles($packages); $this->reflectionService->buildReflectionData($this->registeredClassNames); $rawCustomObjectConfigurations = $this->configurationManager->getConfiguration(ConfigurationManager::...
[ "public", "function", "initialize", "(", "array", "$", "packages", ")", "{", "$", "this", "->", "registeredClassNames", "=", "$", "this", "->", "registerClassFiles", "(", "$", "packages", ")", ";", "$", "this", "->", "reflectionService", "->", "buildReflection...
Initializes the the object configurations and some other parts of this Object Manager. @param PackageInterface[] $packages An array of active packages to consider @return void
[ "Initializes", "the", "the", "object", "configurations", "and", "some", "other", "parts", "of", "this", "Object", "Manager", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L125-L139
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.setInstance
public function setInstance($objectName, $instance) { if ($this->registeredClassNames === []) { $this->objects[$objectName]['i'] = $instance; } else { parent::setInstance($objectName, $instance); } }
php
public function setInstance($objectName, $instance) { if ($this->registeredClassNames === []) { $this->objects[$objectName]['i'] = $instance; } else { parent::setInstance($objectName, $instance); } }
[ "public", "function", "setInstance", "(", "$", "objectName", ",", "$", "instance", ")", "{", "if", "(", "$", "this", "->", "registeredClassNames", "===", "[", "]", ")", "{", "$", "this", "->", "objects", "[", "$", "objectName", "]", "[", "'i'", "]", ...
Sets the instance of the given object In the Compile Time Object Manager it is even allowed to set instances of not-yet-known objects as long as the Object Manager is not initialized, because some few parts need an object registry even before the Object Manager is fully functional. @param string $objectName The objec...
[ "Sets", "the", "instance", "of", "the", "given", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L152-L159
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.getClassNamesByScope
public function getClassNamesByScope($scope) { if (!isset($this->cachedClassNamesByScope[$scope])) { foreach ($this->objects as $objectName => $information) { if ($information['s'] === $scope) { if (isset($information['c'])) { $this->ca...
php
public function getClassNamesByScope($scope) { if (!isset($this->cachedClassNamesByScope[$scope])) { foreach ($this->objects as $objectName => $information) { if ($information['s'] === $scope) { if (isset($information['c'])) { $this->ca...
[ "public", "function", "getClassNamesByScope", "(", "$", "scope", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "cachedClassNamesByScope", "[", "$", "scope", "]", ")", ")", "{", "foreach", "(", "$", "this", "->", "objects", "as", "$", "obje...
Returns a list of class names, which are configured with the given scope @param integer $scope One of the ObjectConfiguration::SCOPE_ constants @return array An array of class names configured with the given scope
[ "Returns", "a", "list", "of", "class", "names", "which", "are", "configured", "with", "the", "given", "scope" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L177-L191
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.registerClassFiles
protected function registerClassFiles(array $packages) { $includeClassesConfiguration = []; if (isset($this->allSettings['Neos']['Flow']['object']['includeClasses'])) { if (!is_array($this->allSettings['Neos']['Flow']['object']['includeClasses'])) { throw new InvalidConfi...
php
protected function registerClassFiles(array $packages) { $includeClassesConfiguration = []; if (isset($this->allSettings['Neos']['Flow']['object']['includeClasses'])) { if (!is_array($this->allSettings['Neos']['Flow']['object']['includeClasses'])) { throw new InvalidConfi...
[ "protected", "function", "registerClassFiles", "(", "array", "$", "packages", ")", "{", "$", "includeClassesConfiguration", "=", "[", "]", ";", "if", "(", "isset", "(", "$", "this", "->", "allSettings", "[", "'Neos'", "]", "[", "'Flow'", "]", "[", "'object...
Traverses through all class files of the active packages and registers collects the class names as "all available class names". If the respective Flow settings say so, also function test classes are registered. For performance reasons this function ignores classes whose name ends with "Exception". @param array $packa...
[ "Traverses", "through", "all", "class", "files", "of", "the", "active", "packages", "and", "registers", "collects", "the", "class", "names", "as", "all", "available", "class", "names", ".", "If", "the", "respective", "Flow", "settings", "say", "so", "also", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L205-L242
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.applyClassFilterConfiguration
protected function applyClassFilterConfiguration($classNames, $filterConfiguration) { foreach ($filterConfiguration as $packageKey => $filterExpressions) { if (!array_key_exists($packageKey, $classNames)) { $this->logger->debug('The package "' . $packageKey . '" specified in the ...
php
protected function applyClassFilterConfiguration($classNames, $filterConfiguration) { foreach ($filterConfiguration as $packageKey => $filterExpressions) { if (!array_key_exists($packageKey, $classNames)) { $this->logger->debug('The package "' . $packageKey . '" specified in the ...
[ "protected", "function", "applyClassFilterConfiguration", "(", "$", "classNames", ",", "$", "filterConfiguration", ")", "{", "foreach", "(", "$", "filterConfiguration", "as", "$", "packageKey", "=>", "$", "filterExpressions", ")", "{", "if", "(", "!", "array_key_e...
Filters the classnames available for object management by filter expressions that includes classes. @param array $classNames All classnames per package @param array $filterConfiguration The filter configuration to apply @return array the remaining class @throws InvalidConfigurationTypeException
[ "Filters", "the", "classnames", "available", "for", "object", "management", "by", "filter", "expressions", "that", "includes", "classes", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L268-L300
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.buildObjectsArray
protected function buildObjectsArray() { $objects = []; foreach ($this->objectConfigurations as $objectConfiguration) { $objectName = $objectConfiguration->getObjectName(); $objects[$objectName] = [ 'l' => strtolower($objectName), 's' => $objec...
php
protected function buildObjectsArray() { $objects = []; foreach ($this->objectConfigurations as $objectConfiguration) { $objectName = $objectConfiguration->getObjectName(); $objects[$objectName] = [ 'l' => strtolower($objectName), 's' => $objec...
[ "protected", "function", "buildObjectsArray", "(", ")", "{", "$", "objects", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "objectConfigurations", "as", "$", "objectConfiguration", ")", "{", "$", "objectName", "=", "$", "objectConfiguration", "->", ...
Builds the objects array which contains information about the registered objects, their scope, class, built method etc. @return array
[ "Builds", "the", "objects", "array", "which", "contains", "information", "about", "the", "registered", "objects", "their", "scope", "class", "built", "method", "etc", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L308-L341
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php
CompileTimeObjectManager.get
public function get($objectName) { if (isset($this->objects[$objectName]['i'])) { return $this->objects[$objectName]['i']; } if (isset($this->objectConfigurations[$objectName]) && count($this->objectConfigurations[$objectName]->getArguments()) > 0) { throw new Except...
php
public function get($objectName) { if (isset($this->objects[$objectName]['i'])) { return $this->objects[$objectName]['i']; } if (isset($this->objectConfigurations[$objectName]) && count($this->objectConfigurations[$objectName]->getArguments()) > 0) { throw new Except...
[ "public", "function", "get", "(", "$", "objectName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "objects", "[", "$", "objectName", "]", "[", "'i'", "]", ")", ")", "{", "return", "$", "this", "->", "objects", "[", "$", "objectName", "]", ...
Returns a fresh or existing instance of the object specified by $objectName. This specialized get() method is able to do setter injection for properties defined in the object configuration of the specified object. @param string $objectName The name of the object to return an instance of @return object The object inst...
[ "Returns", "a", "fresh", "or", "existing", "instance", "of", "the", "object", "specified", "by", "$objectName", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/CompileTimeObjectManager.php#L365-L432
neos/flow-development-collection
Neos.Eel/Resources/Private/PHP/php-peg/Compiler.php
TokenLiteral.match_code
function match_code($value = NULL) { // We inline single-character matches for speed if (!$this->contains_expression() && strlen(eval('return ' . $this->value . ';')) == 1) { return $this->match_fail_conditional('substr($this->string,$this->pos,1) == ' . $this->value, PHPBuilder::build() ->l( '$th...
php
function match_code($value = NULL) { // We inline single-character matches for speed if (!$this->contains_expression() && strlen(eval('return ' . $this->value . ';')) == 1) { return $this->match_fail_conditional('substr($this->string,$this->pos,1) == ' . $this->value, PHPBuilder::build() ->l( '$th...
[ "function", "match_code", "(", "$", "value", "=", "NULL", ")", "{", "// We inline single-character matches for speed", "if", "(", "!", "$", "this", "->", "contains_expression", "(", ")", "&&", "strlen", "(", "eval", "(", "'return '", ".", "$", "this", "->", ...
The $value default parameter is NOT used, it is just added to conform to interface
[ "The", "$value", "default", "parameter", "is", "NOT", "used", "it", "is", "just", "added", "to", "conform", "to", "interface" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Resources/Private/PHP/php-peg/Compiler.php#L288-L300
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/IsOperation.php
IsOperation.evaluate
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (count($arguments) == 0) { return count($flowQuery->getContext()) > 0; } else { $flowQuery->pushOperation('is', []); $flowQuery->pushOperation('filter', $arguments); } }
php
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (count($arguments) == 0) { return count($flowQuery->getContext()) > 0; } else { $flowQuery->pushOperation('is', []); $flowQuery->pushOperation('filter', $arguments); } }
[ "public", "function", "evaluate", "(", "FlowQuery", "$", "flowQuery", ",", "array", "$", "arguments", ")", "{", "if", "(", "count", "(", "$", "arguments", ")", "==", "0", ")", "{", "return", "count", "(", "$", "flowQuery", "->", "getContext", "(", ")",...
{@inheritdoc} @param FlowQuery $flowQuery the FlowQuery object @param array $arguments the filter arguments @return void|boolean
[ "{", "@inheritdoc", "}" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/IsOperation.php#L45-L53
neos/flow-development-collection
Neos.Flow/Classes/I18n/Configuration.php
Configuration.getCurrentLocale
public function getCurrentLocale() { if (!$this->currentLocale instanceof Locale || $this->currentLocale->getLanguage() === 'mul') { return $this->defaultLocale; } return $this->currentLocale; }
php
public function getCurrentLocale() { if (!$this->currentLocale instanceof Locale || $this->currentLocale->getLanguage() === 'mul') { return $this->defaultLocale; } return $this->currentLocale; }
[ "public", "function", "getCurrentLocale", "(", ")", "{", "if", "(", "!", "$", "this", "->", "currentLocale", "instanceof", "Locale", "||", "$", "this", "->", "currentLocale", "->", "getLanguage", "(", ")", "===", "'mul'", ")", "{", "return", "$", "this", ...
Returns the current locale. This is the default locale if no current locale has been set or the set current locale has a language code of "mul". @return Locale
[ "Returns", "the", "current", "locale", ".", "This", "is", "the", "default", "locale", "if", "no", "current", "locale", "has", "been", "set", "or", "the", "set", "current", "locale", "has", "a", "language", "code", "of", "mul", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Configuration.php#L80-L87
neos/flow-development-collection
Neos.Flow/Classes/I18n/Configuration.php
Configuration.setFallbackRule
public function setFallbackRule(array $fallbackRule) { if (!array_key_exists('order', $fallbackRule)) { throw new \InvalidArgumentException('The given fallback rule did not contain an order element.', 1406710671); } if (!array_key_exists('strict', $fallbackRule)) { $f...
php
public function setFallbackRule(array $fallbackRule) { if (!array_key_exists('order', $fallbackRule)) { throw new \InvalidArgumentException('The given fallback rule did not contain an order element.', 1406710671); } if (!array_key_exists('strict', $fallbackRule)) { $f...
[ "public", "function", "setFallbackRule", "(", "array", "$", "fallbackRule", ")", "{", "if", "(", "!", "array_key_exists", "(", "'order'", ",", "$", "fallbackRule", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The given fallback rule did ...
Allows to set a fallback order for locale resolving. If not set, the implicit inheritance of locales will be used. That is, if a locale of en_UK is requested, matches will be searched for in en_UK and en before trying the default locale configured in Flow. If this is given an order of [dk, za, fr_CA] a request for en_...
[ "Allows", "to", "set", "a", "fallback", "order", "for", "locale", "resolving", ".", "If", "not", "set", "the", "implicit", "inheritance", "of", "locales", "will", "be", "used", ".", "That", "is", "if", "a", "locale", "of", "en_UK", "is", "requested", "ma...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Configuration.php#L108-L117
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.persistAll
public function persistAll($onlyWhitelistedObjects = false) { if ($onlyWhitelistedObjects) { $unitOfWork = $this->entityManager->getUnitOfWork(); /** @var \Doctrine\ORM\UnitOfWork $unitOfWork */ $unitOfWork->computeChangeSets(); $objectsToBePersisted = $unitOf...
php
public function persistAll($onlyWhitelistedObjects = false) { if ($onlyWhitelistedObjects) { $unitOfWork = $this->entityManager->getUnitOfWork(); /** @var \Doctrine\ORM\UnitOfWork $unitOfWork */ $unitOfWork->computeChangeSets(); $objectsToBePersisted = $unitOf...
[ "public", "function", "persistAll", "(", "$", "onlyWhitelistedObjects", "=", "false", ")", "{", "if", "(", "$", "onlyWhitelistedObjects", ")", "{", "$", "unitOfWork", "=", "$", "this", "->", "entityManager", "->", "getUnitOfWork", "(", ")", ";", "/** @var \\Do...
Commits new objects and changes to objects in the current persistence session into the backend @param boolean $onlyWhitelistedObjects If true an exception will be thrown if there are scheduled updates/deletes or insertions for objects that are not "whitelisted" (see AbstractPersistenceManager::whitelistObject()) @retu...
[ "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/Doctrine/PersistenceManager.php#L87-L119
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.isNewObject
public function isNewObject($object) { return ($this->entityManager->getUnitOfWork()->getEntityState($object, \Doctrine\ORM\UnitOfWork::STATE_NEW) === \Doctrine\ORM\UnitOfWork::STATE_NEW); }
php
public function isNewObject($object) { return ($this->entityManager->getUnitOfWork()->getEntityState($object, \Doctrine\ORM\UnitOfWork::STATE_NEW) === \Doctrine\ORM\UnitOfWork::STATE_NEW); }
[ "public", "function", "isNewObject", "(", "$", "object", ")", "{", "return", "(", "$", "this", "->", "entityManager", "->", "getUnitOfWork", "(", ")", "->", "getEntityState", "(", "$", "object", ",", "\\", "Doctrine", "\\", "ORM", "\\", "UnitOfWork", "::",...
Checks if the given object has ever been persisted. @param object $object The object to check @return boolean true if the object is new, false if the object exists in the repository @api
[ "Checks", "if", "the", "given", "object", "has", "ever", "been", "persisted", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php#L142-L145
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.getIdentifierByObject
public function getIdentifierByObject($object) { if (property_exists($object, 'Persistence_Object_Identifier')) { $identifierCandidate = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true); if ($identifierCandidate !== null) { return $identifierC...
php
public function getIdentifierByObject($object) { if (property_exists($object, 'Persistence_Object_Identifier')) { $identifierCandidate = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true); if ($identifierCandidate !== null) { return $identifierC...
[ "public", "function", "getIdentifierByObject", "(", "$", "object", ")", "{", "if", "(", "property_exists", "(", "$", "object", ",", "'Persistence_Object_Identifier'", ")", ")", "{", "$", "identifierCandidate", "=", "ObjectAccess", "::", "getProperty", "(", "$", ...
Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned. Note: this returns an identifier even if the object has not been persisted in case of AOP-managed entities. Use isNewObject() if you need to distinguish those cases. @param object $object @return mixed The ide...
[ "Returns", "the", "(", "internal", ")", "identifier", "for", "the", "object", "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/Doctrine/PersistenceManager.php#L160-L175
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.getObjectByIdentifier
public function getObjectByIdentifier($identifier, $objectType = null, $useLazyLoading = false) { if ($objectType === null) { throw new \RuntimeException('Using only the identifier is not supported by Doctrine 2. Give classname as well or use repository to query identifier.', 1296646103); ...
php
public function getObjectByIdentifier($identifier, $objectType = null, $useLazyLoading = false) { if ($objectType === null) { throw new \RuntimeException('Using only the identifier is not supported by Doctrine 2. Give classname as well or use repository to query identifier.', 1296646103); ...
[ "public", "function", "getObjectByIdentifier", "(", "$", "identifier", ",", "$", "objectType", "=", "null", ",", "$", "useLazyLoading", "=", "false", ")", "{", "if", "(", "$", "objectType", "===", "null", ")", "{", "throw", "new", "\\", "RuntimeException", ...
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 Set to true if you want to use lazy loading for this object @return object The object for the identifier if it is known, or NUL...
[ "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/Doctrine/PersistenceManager.php#L188-L201
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.add
public function add($object) { if (!$this->isNewObject($object)) { throw new KnownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->add() is not a new object. Check the code which adds...
php
public function add($object) { if (!$this->isNewObject($object)) { throw new KnownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->add() is not a new object. Check the code which adds...
[ "public", "function", "add", "(", "$", "object", ")", "{", "if", "(", "!", "$", "this", "->", "isNewObject", "(", "$", "object", ")", ")", "{", "throw", "new", "KnownObjectException", "(", "'The object of type \"'", ".", "get_class", "(", "$", "object", ...
Adds an object to the persistence. @param object $object The object to add @return void @throws KnownObjectException if the given $object is not new @throws PersistenceException if another error occurs @api
[ "Adds", "an", "object", "to", "the", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php#L223-L234
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.update
public function update($object) { if ($this->isNewObject($object)) { throw new UnknownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->update() is not a previously persisted object. C...
php
public function update($object) { if ($this->isNewObject($object)) { throw new UnknownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->update() is not a previously persisted object. C...
[ "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 if the given $object is new @throws PersistenceException if another error occurs @api
[ "Update", "an", "object", "in", "the", "persistence", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php#L257-L267
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php
PersistenceManager.compile
public function compile() { // "driver" is used only for Doctrine, thus we (mis-)use it here // additionally, when no path is set, skip this step, assuming no DB is needed if ($this->settings['backendOptions']['driver'] !== null && $this->settings['backendOptions']['path'] !== null) { ...
php
public function compile() { // "driver" is used only for Doctrine, thus we (mis-)use it here // additionally, when no path is set, skip this step, assuming no DB is needed if ($this->settings['backendOptions']['driver'] !== null && $this->settings['backendOptions']['path'] !== null) { ...
[ "public", "function", "compile", "(", ")", "{", "// \"driver\" is used only for Doctrine, thus we (mis-)use it here", "// additionally, when no path is set, skip this step, assuming no DB is needed", "if", "(", "$", "this", "->", "settings", "[", "'backendOptions'", "]", "[", "'d...
Called from functional tests, creates/updates database tables and compiles proxies. @return boolean
[ "Called", "from", "functional", "tests", "creates", "/", "updates", "database", "tables", "and", "compiles", "proxies", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php#L286-L307