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.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.packageCommand
public function packageCommand($packageKey, $packageType = PackageInterface::DEFAULT_COMPOSER_TYPE) { $this->validatePackageKey($packageKey); if ($this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" already exists.', [$packageKey]); exit(...
php
public function packageCommand($packageKey, $packageType = PackageInterface::DEFAULT_COMPOSER_TYPE) { $this->validatePackageKey($packageKey); if ($this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" already exists.', [$packageKey]); exit(...
[ "public", "function", "packageCommand", "(", "$", "packageKey", ",", "$", "packageType", "=", "PackageInterface", "::", "DEFAULT_COMPOSER_TYPE", ")", "{", "$", "this", "->", "validatePackageKey", "(", "$", "packageKey", ")", ";", "if", "(", "$", "this", "->", ...
Kickstart a new package Creates a new package and creates a standard Action Controller and a sample template for its Index Action. For creating a new package without sample code use the package:create command. @param string $packageKey The package key, for example "MyCompany.MyPackageName" @param string $packageType...
[ "Kickstart", "a", "new", "package" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L53-L70
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.actionControllerCommand
public function actionControllerCommand($packageKey, $controllerName, $generateActions = false, $generateTemplates = true, $generateRelated = false, $force = false) { $subpackageName = ''; if (strpos($packageKey, '/') !== false) { list($packageKey, $subpackageName) = explode('/', $packag...
php
public function actionControllerCommand($packageKey, $controllerName, $generateActions = false, $generateTemplates = true, $generateRelated = false, $force = false) { $subpackageName = ''; if (strpos($packageKey, '/') !== false) { list($packageKey, $subpackageName) = explode('/', $packag...
[ "public", "function", "actionControllerCommand", "(", "$", "packageKey", ",", "$", "controllerName", ",", "$", "generateActions", "=", "false", ",", "$", "generateTemplates", "=", "true", ",", "$", "generateRelated", "=", "false", ",", "$", "force", "=", "fals...
Kickstart a new action controller Generates an Action Controller with the given name in the specified package. In its default mode it will create just the controller containing a sample indexAction. By specifying the --generate-actions flag, this command will also create a set of actions. If no model or repository ex...
[ "Kickstart", "a", "new", "action", "controller" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L104-L174
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.commandControllerCommand
public function commandControllerCommand($packageKey, $controllerName, $force = false) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); ...
php
public function commandControllerCommand($packageKey, $controllerName, $force = false) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); ...
[ "public", "function", "commandControllerCommand", "(", "$", "packageKey", ",", "$", "controllerName", ",", "$", "force", "=", "false", ")", "{", "$", "this", "->", "validatePackageKey", "(", "$", "packageKey", ")", ";", "if", "(", "!", "$", "this", "->", ...
Kickstart a new command controller Creates a new command controller with the given name in the specified package. The generated controller class already contains an example command. @param string $packageKey The package key of the package for the new controller @param string $controllerName The name for the new contr...
[ "Kickstart", "a", "new", "command", "controller" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L188-L201
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.modelCommand
public function modelCommand($packageKey, $modelName, $force = false) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); } $this...
php
public function modelCommand($packageKey, $modelName, $force = false) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); } $this...
[ "public", "function", "modelCommand", "(", "$", "packageKey", ",", "$", "modelName", ",", "$", "force", "=", "false", ")", "{", "$", "this", "->", "validatePackageKey", "(", "$", "packageKey", ")", ";", "if", "(", "!", "$", "this", "->", "packageManager"...
Kickstart a new domain model This command generates a new domain model class. The fields are specified as a variable list of arguments with field name and type separated by a colon (for example "title:string" "size:int" "type:MyType"). @param string $packageKey The package key of the package for the domain model @par...
[ "Kickstart", "a", "new", "domain", "model" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L216-L246
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.repositoryCommand
public function repositoryCommand($packageKey, $modelName, $force = false) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); } ...
php
public function repositoryCommand($packageKey, $modelName, $force = false) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); } ...
[ "public", "function", "repositoryCommand", "(", "$", "packageKey", ",", "$", "modelName", ",", "$", "force", "=", "false", ")", "{", "$", "this", "->", "validatePackageKey", "(", "$", "packageKey", ")", ";", "if", "(", "!", "$", "this", "->", "packageMan...
Kickstart a new domain repository This command generates a new domain repository class for the given model name. @param string $packageKey The package key @param string $modelName The name of the domain model class @param boolean $force Overwrite any existing repository. @return string @see neos.kickstarter:kickstart...
[ "Kickstart", "a", "new", "domain", "repository" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L259-L269
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.documentationCommand
public function documentationCommand($packageKey) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); } $generatedFiles = $this->...
php
public function documentationCommand($packageKey) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exit(2); } $generatedFiles = $this->...
[ "public", "function", "documentationCommand", "(", "$", "packageKey", ")", "{", "$", "this", "->", "validatePackageKey", "(", "$", "packageKey", ")", ";", "if", "(", "!", "$", "this", "->", "packageManager", "->", "isPackageAvailable", "(", "$", "packageKey", ...
Kickstart documentation Generates a documentation skeleton for the given package. @param string $packageKey The package key of the package for the documentation @return string
[ "Kickstart", "documentation" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L279-L290
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.translationCommand
public function translationCommand($packageKey, $sourceLanguageKey, array $targetLanguageKeys = []) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exi...
php
public function translationCommand($packageKey, $sourceLanguageKey, array $targetLanguageKeys = []) { $this->validatePackageKey($packageKey); if (!$this->packageManager->isPackageAvailable($packageKey)) { $this->outputLine('Package "%s" is not available.', [$packageKey]); exi...
[ "public", "function", "translationCommand", "(", "$", "packageKey", ",", "$", "sourceLanguageKey", ",", "array", "$", "targetLanguageKeys", "=", "[", "]", ")", "{", "$", "this", "->", "validatePackageKey", "(", "$", "packageKey", ")", ";", "if", "(", "!", ...
Kickstart translation Generates the translation files for the given package. @param string $packageKey The package key of the package for the translation @param string $sourceLanguageKey The language key of the default language @param array $targetLanguageKeys Comma separated language keys for the target translations...
[ "Kickstart", "translation" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L302-L313
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.validatePackageKey
protected function validatePackageKey($packageKey) { if (!$this->packageManager->isPackageKeyValid($packageKey)) { $this->outputLine('Package key "%s" is not valid. Only UpperCamelCase with alphanumeric characters in the format <VendorName>.<PackageKey>, please!', [$packageKey]); exi...
php
protected function validatePackageKey($packageKey) { if (!$this->packageManager->isPackageKeyValid($packageKey)) { $this->outputLine('Package key "%s" is not valid. Only UpperCamelCase with alphanumeric characters in the format <VendorName>.<PackageKey>, please!', [$packageKey]); exi...
[ "protected", "function", "validatePackageKey", "(", "$", "packageKey", ")", "{", "if", "(", "!", "$", "this", "->", "packageManager", "->", "isPackageKeyValid", "(", "$", "packageKey", ")", ")", "{", "$", "this", "->", "outputLine", "(", "'Package key \"%s\" i...
Checks the syntax of the given $packageKey and quits with an error message if it's not valid @param string $packageKey @return void
[ "Checks", "the", "syntax", "of", "the", "given", "$packageKey", "and", "quits", "with", "an", "error", "message", "if", "it", "s", "not", "valid" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L321-L327
neos/flow-development-collection
Neos.Kickstarter/Classes/Command/KickstartCommandController.php
KickstartCommandController.validateModelName
protected function validateModelName($modelName) { if (Validation::isReservedKeyword($modelName)) { $this->outputLine('The name of the model cannot be one of the reserved words of PHP!'); $this->outputLine('Have a look at: http://www.php.net/manual/en/reserved.keywords.php'); ...
php
protected function validateModelName($modelName) { if (Validation::isReservedKeyword($modelName)) { $this->outputLine('The name of the model cannot be one of the reserved words of PHP!'); $this->outputLine('Have a look at: http://www.php.net/manual/en/reserved.keywords.php'); ...
[ "protected", "function", "validateModelName", "(", "$", "modelName", ")", "{", "if", "(", "Validation", "::", "isReservedKeyword", "(", "$", "modelName", ")", ")", "{", "$", "this", "->", "outputLine", "(", "'The name of the model cannot be one of the reserved words o...
Check the given model name to be not one of the reserved words of PHP. @param string $modelName @return boolean @see http://www.php.net/manual/en/reserved.keywords.php
[ "Check", "the", "given", "model", "name", "to", "be", "not", "one", "of", "the", "reserved", "words", "of", "PHP", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Command/KickstartCommandController.php#L336-L343
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.getDescription
public function getDescription() { $reflectionClass = new \ReflectionClass($this); $lines = explode(chr(10), $reflectionClass->getDocComment()); foreach ($lines as $line) { $line = trim($line); if ($line === '' || $line === '/**' || $line === '*' || $line === '*/' || ...
php
public function getDescription() { $reflectionClass = new \ReflectionClass($this); $lines = explode(chr(10), $reflectionClass->getDocComment()); foreach ($lines as $line) { $line = trim($line); if ($line === '' || $line === '/**' || $line === '*' || $line === '*/' || ...
[ "public", "function", "getDescription", "(", ")", "{", "$", "reflectionClass", "=", "new", "\\", "ReflectionClass", "(", "$", "this", ")", ";", "$", "lines", "=", "explode", "(", "chr", "(", "10", ")", ",", "$", "reflectionClass", "->", "getDocComment", ...
Returns the first line of the migration class doc comment @return string
[ "Returns", "the", "first", "line", "of", "the", "migration", "class", "doc", "comment" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L108-L119
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.searchAndReplace
protected function searchAndReplace($search, $replacement, $filter = array('php', 'yaml', 'html')) { $this->operations['searchAndReplace'][] = array($search, $replacement, $filter, false); }
php
protected function searchAndReplace($search, $replacement, $filter = array('php', 'yaml', 'html')) { $this->operations['searchAndReplace'][] = array($search, $replacement, $filter, false); }
[ "protected", "function", "searchAndReplace", "(", "$", "search", ",", "$", "replacement", ",", "$", "filter", "=", "array", "(", "'php'", ",", "'yaml'", ",", "'html'", ")", ")", "{", "$", "this", "->", "operations", "[", "'searchAndReplace'", "]", "[", "...
Does a simple search and replace on all (textual) files. The filter array can be used to give file extensions to limit the operation to. @param string $search @param string $replacement @param array|string $filter either an array with file extensions to consider or the full path to a single file to process @return voi...
[ "Does", "a", "simple", "search", "and", "replace", "on", "all", "(", "textual", ")", "files", ".", "The", "filter", "array", "can", "be", "used", "to", "give", "file", "extensions", "to", "limit", "the", "operation", "to", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L218-L221
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.searchAndReplaceRegex
protected function searchAndReplaceRegex($search, $replacement, $filter = array('php', 'yaml', 'html')) { $this->operations['searchAndReplace'][] = array($search, $replacement, $filter, true); }
php
protected function searchAndReplaceRegex($search, $replacement, $filter = array('php', 'yaml', 'html')) { $this->operations['searchAndReplace'][] = array($search, $replacement, $filter, true); }
[ "protected", "function", "searchAndReplaceRegex", "(", "$", "search", ",", "$", "replacement", ",", "$", "filter", "=", "array", "(", "'php'", ",", "'yaml'", ",", "'html'", ")", ")", "{", "$", "this", "->", "operations", "[", "'searchAndReplace'", "]", "["...
Does a regex search and replace on all (textual) files. The filter array can be used to give file extensions to limit the operation to. The patterns are used as is, no quoting is done. A closure can be given for the $replacement variable. It should return a string and is given an array of matches as parameter. @param...
[ "Does", "a", "regex", "search", "and", "replace", "on", "all", "(", "textual", ")", "files", ".", "The", "filter", "array", "can", "be", "used", "to", "give", "file", "extensions", "to", "limit", "the", "operation", "to", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L237-L240
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.processConfiguration
protected function processConfiguration($configurationType, \Closure $processor, $saveResult = false) { if (is_dir($this->targetPackageData['path'] . '/Configuration') === false) { return; } $yamlPathsAndFilenames = Files::readDirectoryRecursively($this->targetPackageData['path'...
php
protected function processConfiguration($configurationType, \Closure $processor, $saveResult = false) { if (is_dir($this->targetPackageData['path'] . '/Configuration') === false) { return; } $yamlPathsAndFilenames = Files::readDirectoryRecursively($this->targetPackageData['path'...
[ "protected", "function", "processConfiguration", "(", "$", "configurationType", ",", "\\", "Closure", "$", "processor", ",", "$", "saveResult", "=", "false", ")", "{", "if", "(", "is_dir", "(", "$", "this", "->", "targetPackageData", "[", "'path'", "]", ".",...
Apply the given processor to the raw results of loading the given configuration type for the package from YAML. If multiple files exist (context configuration) all are processed independently. @param string $configurationType One of ConfigurationManager::CONFIGURATION_TYPE_* @param \Closure $processor @param boolean $...
[ "Apply", "the", "given", "processor", "to", "the", "raw", "results", "of", "loading", "the", "given", "configuration", "type", "for", "the", "package", "from", "YAML", ".", "If", "multiple", "files", "exist", "(", "context", "configuration", ")", "all", "are...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L313-L338
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.moveSettingsPaths
protected function moveSettingsPaths($sourcePath, $destinationPath) { $this->processConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, function (array &$configuration) use ($sourcePath, $destinationPath) { $sourceConfigurationValue = Arrays::getValueByPath($configur...
php
protected function moveSettingsPaths($sourcePath, $destinationPath) { $this->processConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, function (array &$configuration) use ($sourcePath, $destinationPath) { $sourceConfigurationValue = Arrays::getValueByPath($configur...
[ "protected", "function", "moveSettingsPaths", "(", "$", "sourcePath", ",", "$", "destinationPath", ")", "{", "$", "this", "->", "processConfiguration", "(", "ConfigurationManager", "::", "CONFIGURATION_TYPE_SETTINGS", ",", "function", "(", "array", "&", "$", "config...
Move a settings path from "source" to "destination"; best to be used when package names change. @param string $sourcePath @param string $destinationPath
[ "Move", "a", "settings", "path", "from", "source", "to", "destination", ";", "best", "to", "be", "used", "when", "package", "names", "change", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L346-L386
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.applySearchAndReplaceOperations
protected function applySearchAndReplaceOperations() { foreach (Files::getRecursiveDirectoryGenerator($this->targetPackageData['path'], null, true) as $pathAndFilename) { $pathInfo = pathinfo($pathAndFilename); if (!isset($pathInfo['filename'])) { continue; ...
php
protected function applySearchAndReplaceOperations() { foreach (Files::getRecursiveDirectoryGenerator($this->targetPackageData['path'], null, true) as $pathAndFilename) { $pathInfo = pathinfo($pathAndFilename); if (!isset($pathInfo['filename'])) { continue; ...
[ "protected", "function", "applySearchAndReplaceOperations", "(", ")", "{", "foreach", "(", "Files", "::", "getRecursiveDirectoryGenerator", "(", "$", "this", "->", "targetPackageData", "[", "'path'", "]", ",", "null", ",", "true", ")", "as", "$", "pathAndFilename"...
Applies all registered searchAndReplace operations. @return void
[ "Applies", "all", "registered", "searchAndReplace", "operations", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L393-L416
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/AbstractMigration.php
AbstractMigration.applyFileOperations
protected function applyFileOperations() { foreach ($this->operations['moveFile'] as $operation) { $oldPath = Files::concatenatePaths(array($this->targetPackageData['path'] . '/' . $operation[0])); $newPath = Files::concatenatePaths(array($this->targetPackageData['path'] . '/' . $ope...
php
protected function applyFileOperations() { foreach ($this->operations['moveFile'] as $operation) { $oldPath = Files::concatenatePaths(array($this->targetPackageData['path'] . '/' . $operation[0])); $newPath = Files::concatenatePaths(array($this->targetPackageData['path'] . '/' . $ope...
[ "protected", "function", "applyFileOperations", "(", ")", "{", "foreach", "(", "$", "this", "->", "operations", "[", "'moveFile'", "]", "as", "$", "operation", ")", "{", "$", "oldPath", "=", "Files", "::", "concatenatePaths", "(", "array", "(", "$", "this"...
Applies all registered moveFile operations. @return void
[ "Applies", "all", "registered", "moveFile", "operations", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/AbstractMigration.php#L423-L465
neos/flow-development-collection
Neos.Flow/Classes/Reflection/ParameterReflection.php
ParameterReflection.getClass
public function getClass() { try { $class = parent::getClass(); } catch (\Exception $exception) { return null; } return is_object($class) ? new ClassReflection($class->getName()) : null; }
php
public function getClass() { try { $class = parent::getClass(); } catch (\Exception $exception) { return null; } return is_object($class) ? new ClassReflection($class->getName()) : null; }
[ "public", "function", "getClass", "(", ")", "{", "try", "{", "$", "class", "=", "parent", "::", "getClass", "(", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "exception", ")", "{", "return", "null", ";", "}", "return", "is_object", "(", "$", ...
Returns the parameter class @return ClassReflection The parameter class
[ "Returns", "the", "parameter", "class" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ParameterReflection.php#L43-L52
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/Git.php
Git.isWorkingCopyRoot
public static function isWorkingCopyRoot($path) { if (!self::isWorkingCopy($path)) { return false; } chdir($path); $output = array(); exec('git rev-parse --show-cdup', $output); return implode('', $output) === ''; }
php
public static function isWorkingCopyRoot($path) { if (!self::isWorkingCopy($path)) { return false; } chdir($path); $output = array(); exec('git rev-parse --show-cdup', $output); return implode('', $output) === ''; }
[ "public", "static", "function", "isWorkingCopyRoot", "(", "$", "path", ")", "{", "if", "(", "!", "self", "::", "isWorkingCopy", "(", "$", "path", ")", ")", "{", "return", "false", ";", "}", "chdir", "(", "$", "path", ")", ";", "$", "output", "=", "...
Check whether the given $path points to the top-level of a git repository @param string $path @return boolean
[ "Check", "whether", "the", "given", "$path", "points", "to", "the", "top", "-", "level", "of", "a", "git", "repository" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Git.php#L38-L47
neos/flow-development-collection
Neos.Flow/Scripts/Migrations/Git.php
Git.getLog
public static function getLog($path, $searchTerm = null) { $output = array(); chdir($path); if ($searchTerm !== null) { exec('git log -F --grep=' . escapeshellarg($searchTerm), $output); } else { exec('git log', $output); } return $output; ...
php
public static function getLog($path, $searchTerm = null) { $output = array(); chdir($path); if ($searchTerm !== null) { exec('git log -F --grep=' . escapeshellarg($searchTerm), $output); } else { exec('git log', $output); } return $output; ...
[ "public", "static", "function", "getLog", "(", "$", "path", ",", "$", "searchTerm", "=", "null", ")", "{", "$", "output", "=", "array", "(", ")", ";", "chdir", "(", "$", "path", ")", ";", "if", "(", "$", "searchTerm", "!==", "null", ")", "{", "ex...
Returns the git log for the specified $path, optionally filtered for $searchTerm @param string $path @param string $searchTerm optional term to filter the log for @return array
[ "Returns", "the", "git", "log", "for", "the", "specified", "$path", "optionally", "filtered", "for", "$searchTerm" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Git.php#L155-L165
neos/flow-development-collection
Neos.Flow/Classes/Utility/Environment.php
Environment.getPathToTemporaryDirectory
public function getPathToTemporaryDirectory() { if ($this->temporaryDirectory !== null) { return $this->temporaryDirectory; } $this->temporaryDirectory = $this->createTemporaryDirectory($this->temporaryDirectoryBase); return $this->temporaryDirectory; }
php
public function getPathToTemporaryDirectory() { if ($this->temporaryDirectory !== null) { return $this->temporaryDirectory; } $this->temporaryDirectory = $this->createTemporaryDirectory($this->temporaryDirectoryBase); return $this->temporaryDirectory; }
[ "public", "function", "getPathToTemporaryDirectory", "(", ")", "{", "if", "(", "$", "this", "->", "temporaryDirectory", "!==", "null", ")", "{", "return", "$", "this", "->", "temporaryDirectory", ";", "}", "$", "this", "->", "temporaryDirectory", "=", "$", "...
Returns the full path to Flow's temporary directory. @return string Path to PHP's temporary directory @api
[ "Returns", "the", "full", "path", "to", "Flow", "s", "temporary", "directory", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Utility/Environment.php#L79-L88
neos/flow-development-collection
Neos.Flow/Classes/Utility/Environment.php
Environment.createTemporaryDirectory
protected function createTemporaryDirectory($temporaryDirectoryBase) { $temporaryDirectoryBase = Files::getUnixStylePath($temporaryDirectoryBase); if (substr($temporaryDirectoryBase, -1, 1) !== '/') { $temporaryDirectoryBase .= '/'; } $temporaryDirectory = $temporaryDirec...
php
protected function createTemporaryDirectory($temporaryDirectoryBase) { $temporaryDirectoryBase = Files::getUnixStylePath($temporaryDirectoryBase); if (substr($temporaryDirectoryBase, -1, 1) !== '/') { $temporaryDirectoryBase .= '/'; } $temporaryDirectory = $temporaryDirec...
[ "protected", "function", "createTemporaryDirectory", "(", "$", "temporaryDirectoryBase", ")", "{", "$", "temporaryDirectoryBase", "=", "Files", "::", "getUnixStylePath", "(", "$", "temporaryDirectoryBase", ")", ";", "if", "(", "substr", "(", "$", "temporaryDirectoryBa...
Creates Flow's temporary directory - or at least asserts that it exists and is writable. For each Flow Application Context, we create an extra temporary folder, and for nested contexts, the folders are prefixed with "SubContext" to avoid ambiguity, and look like: Data/Temporary/Production/SubContextLive @param string...
[ "Creates", "Flow", "s", "temporary", "directory", "-", "or", "at", "least", "asserts", "that", "it", "exists", "and", "is", "writable", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Utility/Environment.php#L122-L143
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/PropertyOperation.php
PropertyOperation.evaluate
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (!isset($arguments[0]) || empty($arguments[0]) || !is_string($arguments[0])) { throw new FlowQueryException('property() must be given an attribute name when used on objects, fetching all attributes is not supported.', 13324922...
php
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (!isset($arguments[0]) || empty($arguments[0]) || !is_string($arguments[0])) { throw new FlowQueryException('property() must be given an attribute name when used on objects, fetching all attributes is not supported.', 13324922...
[ "public", "function", "evaluate", "(", "FlowQuery", "$", "flowQuery", ",", "array", "$", "arguments", ")", "{", "if", "(", "!", "isset", "(", "$", "arguments", "[", "0", "]", ")", "||", "empty", "(", "$", "arguments", "[", "0", "]", ")", "||", "!",...
{@inheritdoc} @param FlowQuery $flowQuery the FlowQuery object @param array $arguments the property path to use (in index 0) @return mixed
[ "{", "@inheritdoc", "}" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/PropertyOperation.php#L49-L63
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/UriTypeConverter.php
UriTypeConverter.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { try { return new Uri($source); } catch (\InvalidArgumentException $exception) { return new Error('The given URI "%s" could no...
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { try { return new Uri($source); } catch (\InvalidArgumentException $exception) { return new Error('The given URI "%s" could no...
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "try", "{", "return", "new",...
Converts the given string to a Uri object. @param string $source The URI to be converted @param string $targetType @param array $convertedChildProperties @param PropertyMappingConfigurationInterface $configuration @return Uri|Error if the input format is not supported or could not be converted for other reasons
[ "Converts", "the", "given", "string", "to", "a", "Uri", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/UriTypeConverter.php#L52-L59
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/DependencyProxy.php
DependencyProxy._activateDependency
public function _activateDependency() { $realDependency = $this->builder->__invoke(); foreach ($this->propertyVariables as &$propertyVariable) { $propertyVariable = $realDependency; } return $realDependency; }
php
public function _activateDependency() { $realDependency = $this->builder->__invoke(); foreach ($this->propertyVariables as &$propertyVariable) { $propertyVariable = $realDependency; } return $realDependency; }
[ "public", "function", "_activateDependency", "(", ")", "{", "$", "realDependency", "=", "$", "this", "->", "builder", "->", "__invoke", "(", ")", ";", "foreach", "(", "$", "this", "->", "propertyVariables", "as", "&", "$", "propertyVariable", ")", "{", "$"...
Activate the dependency and set it in the object. @return object The real dependency object @api
[ "Activate", "the", "dependency", "and", "set", "it", "in", "the", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/DependencyProxy.php#L57-L64
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/TypedArrayConverter.php
TypedArrayConverter.getTypeOfChildProperty
public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration) { $parsedTargetType = TypeHandling::parseType($targetType); return $parsedTargetType['elementType']; }
php
public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration) { $parsedTargetType = TypeHandling::parseType($targetType); return $parsedTargetType['elementType']; }
[ "public", "function", "getTypeOfChildProperty", "(", "$", "targetType", ",", "$", "propertyName", ",", "PropertyMappingConfigurationInterface", "$", "configuration", ")", "{", "$", "parsedTargetType", "=", "TypeHandling", "::", "parseType", "(", "$", "targetType", ")"...
Return the type of a given sub-property inside the $targetType @param string $targetType @param string $propertyName @param PropertyMappingConfigurationInterface $configuration @return string
[ "Return", "the", "type", "of", "a", "given", "sub", "-", "property", "inside", "the", "$targetType" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/TypedArrayConverter.php#L90-L94
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/RegularExpressionValidator.php
RegularExpressionValidator.isValid
protected function isValid($value) { $result = preg_match($this->options['regularExpression'], $value); if ($result === 0) { $this->addError('The given subject did not match the pattern. Got: %1$s', 1221565130, [$value]); } if ($result === false) { throw new I...
php
protected function isValid($value) { $result = preg_match($this->options['regularExpression'], $value); if ($result === 0) { $this->addError('The given subject did not match the pattern. Got: %1$s', 1221565130, [$value]); } if ($result === false) { throw new I...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "$", "result", "=", "preg_match", "(", "$", "this", "->", "options", "[", "'regularExpression'", "]", ",", "$", "value", ")", ";", "if", "(", "$", "result", "===", "0", ")", "{", "$", ...
Checks if the given value matches the specified regular expression. @param mixed $value The value that should be validated @return void @throws InvalidValidationOptionsException @api
[ "Checks", "if", "the", "given", "value", "matches", "the", "specified", "regular", "expression", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/RegularExpressionValidator.php#L38-L47
neos/flow-development-collection
Neos.Flow/Classes/Command/SecurityCommandController.php
SecurityCommandController.importPublicKeyCommand
public function importPublicKeyCommand() { $keyData = ''; // no file_get_contents here because it does not work on php://stdin $fp = fopen('php://stdin', 'rb'); while (!feof($fp)) { $keyData .= fgets($fp, 4096); } fclose($fp); $fingerprint = $this...
php
public function importPublicKeyCommand() { $keyData = ''; // no file_get_contents here because it does not work on php://stdin $fp = fopen('php://stdin', 'rb'); while (!feof($fp)) { $keyData .= fgets($fp, 4096); } fclose($fp); $fingerprint = $this...
[ "public", "function", "importPublicKeyCommand", "(", ")", "{", "$", "keyData", "=", "''", ";", "// no file_get_contents here because it does not work on php://stdin", "$", "fp", "=", "fopen", "(", "'php://stdin'", ",", "'rb'", ")", ";", "while", "(", "!", "feof", ...
Import a public key Read a PEM formatted public key from stdin and import it into the RSAWalletService. @return void @see neos.flow:security:importprivatekey
[ "Import", "a", "public", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SecurityCommandController.php#L85-L98
neos/flow-development-collection
Neos.Flow/Classes/Command/SecurityCommandController.php
SecurityCommandController.generateKeyPairCommand
public function generateKeyPairCommand(bool $usedForPasswords = false) { $fingerprint = $this->rsaWalletService->generateNewKeypair($usedForPasswords); $this->outputLine('The key pair has been successfully generated. Use the following fingerprint to refer to it in the RSAWalletService: ' . PHP_EOL ...
php
public function generateKeyPairCommand(bool $usedForPasswords = false) { $fingerprint = $this->rsaWalletService->generateNewKeypair($usedForPasswords); $this->outputLine('The key pair has been successfully generated. Use the following fingerprint to refer to it in the RSAWalletService: ' . PHP_EOL ...
[ "public", "function", "generateKeyPairCommand", "(", "bool", "$", "usedForPasswords", "=", "false", ")", "{", "$", "fingerprint", "=", "$", "this", "->", "rsaWalletService", "->", "generateNewKeypair", "(", "$", "usedForPasswords", ")", ";", "$", "this", "->", ...
Generate a public/private key pair and add it to the RSAWalletService @param boolean $usedForPasswords If the private key should be used for passwords @return void @see neos.flow:security:importprivatekey
[ "Generate", "a", "public", "/", "private", "key", "pair", "and", "add", "it", "to", "the", "RSAWalletService" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SecurityCommandController.php#L107-L112
neos/flow-development-collection
Neos.Flow/Classes/Command/SecurityCommandController.php
SecurityCommandController.importPrivateKeyCommand
public function importPrivateKeyCommand(bool $usedForPasswords = false) { $keyData = ''; // no file_get_contents here because it does not work on php://stdin $fp = fopen('php://stdin', 'rb'); while (!feof($fp)) { $keyData .= fgets($fp, 4096); } fclose($fp)...
php
public function importPrivateKeyCommand(bool $usedForPasswords = false) { $keyData = ''; // no file_get_contents here because it does not work on php://stdin $fp = fopen('php://stdin', 'rb'); while (!feof($fp)) { $keyData .= fgets($fp, 4096); } fclose($fp)...
[ "public", "function", "importPrivateKeyCommand", "(", "bool", "$", "usedForPasswords", "=", "false", ")", "{", "$", "keyData", "=", "''", ";", "// no file_get_contents here because it does not work on php://stdin", "$", "fp", "=", "fopen", "(", "'php://stdin'", ",", "...
Import a private key Read a PEM formatted private key from stdin and import it into the RSAWalletService. The public key will be automatically extracted and stored together with the private key as a key pair. You can generate the same fingerprint returned from this using these commands: ssh-keygen -yf my-key.pem > m...
[ "Import", "a", "private", "key" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SecurityCommandController.php#L140-L153
neos/flow-development-collection
Neos.Flow/Classes/Command/SecurityCommandController.php
SecurityCommandController.showEffectivePolicyCommand
public function showEffectivePolicyCommand(string $privilegeType, string $roles = '') { $systemRoleIdentifiers = ['Neos.Flow:Everybody', 'Neos.Flow:Anonymous', 'Neos.Flow:AuthenticatedUser']; if (strpos($privilegeType, '\\') === false) { $privilegeType = sprintf('\Neos\Flow\Security\Aut...
php
public function showEffectivePolicyCommand(string $privilegeType, string $roles = '') { $systemRoleIdentifiers = ['Neos.Flow:Everybody', 'Neos.Flow:Anonymous', 'Neos.Flow:AuthenticatedUser']; if (strpos($privilegeType, '\\') === false) { $privilegeType = sprintf('\Neos\Flow\Security\Aut...
[ "public", "function", "showEffectivePolicyCommand", "(", "string", "$", "privilegeType", ",", "string", "$", "roles", "=", "''", ")", "{", "$", "systemRoleIdentifiers", "=", "[", "'Neos.Flow:Everybody'", ",", "'Neos.Flow:Anonymous'", ",", "'Neos.Flow:AuthenticatedUser'"...
Shows a list of all defined privilege targets and the effective permissions @param string $privilegeType The privilege type ("entity", "method" or the FQN of a class implementing PrivilegeInterface) @param string $roles A comma separated list of role identifiers. Shows policy for an unauthenticated user when left empt...
[ "Shows", "a", "list", "of", "all", "defined", "privilege", "targets", "and", "the", "effective", "permissions" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SecurityCommandController.php#L161-L246
neos/flow-development-collection
Neos.Flow/Classes/Command/SecurityCommandController.php
SecurityCommandController.showUnprotectedActionsCommand
public function showUnprotectedActionsCommand() { $methodPrivileges = []; foreach ($this->policyService->getRoles(true) as $role) { $methodPrivileges = array_merge($methodPrivileges, $role->getPrivilegesByType(MethodPrivilegeInterface::class)); } $controllerClassNames = ...
php
public function showUnprotectedActionsCommand() { $methodPrivileges = []; foreach ($this->policyService->getRoles(true) as $role) { $methodPrivileges = array_merge($methodPrivileges, $role->getPrivilegesByType(MethodPrivilegeInterface::class)); } $controllerClassNames = ...
[ "public", "function", "showUnprotectedActionsCommand", "(", ")", "{", "$", "methodPrivileges", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "policyService", "->", "getRoles", "(", "true", ")", "as", "$", "role", ")", "{", "$", "methodPrivileges", ...
Lists all public controller actions not covered by the active security policy @return void
[ "Lists", "all", "public", "controller", "actions", "not", "covered", "by", "the", "active", "security", "policy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SecurityCommandController.php#L253-L292
neos/flow-development-collection
Neos.Flow/Classes/Command/SecurityCommandController.php
SecurityCommandController.showMethodsForPrivilegeTargetCommand
public function showMethodsForPrivilegeTargetCommand(string $privilegeTarget) { $privilegeTargetInstance = $this->policyService->getPrivilegeTargetByIdentifier($privilegeTarget); if ($privilegeTargetInstance === null) { $this->outputLine('The privilegeTarget "%s" is not defined', [$privi...
php
public function showMethodsForPrivilegeTargetCommand(string $privilegeTarget) { $privilegeTargetInstance = $this->policyService->getPrivilegeTargetByIdentifier($privilegeTarget); if ($privilegeTargetInstance === null) { $this->outputLine('The privilegeTarget "%s" is not defined', [$privi...
[ "public", "function", "showMethodsForPrivilegeTargetCommand", "(", "string", "$", "privilegeTarget", ")", "{", "$", "privilegeTargetInstance", "=", "$", "this", "->", "policyService", "->", "getPrivilegeTargetByIdentifier", "(", "$", "privilegeTarget", ")", ";", "if", ...
Shows the methods represented by the given security privilege target If the privilege target has parameters those can be specified separated by a colon for example "parameter1:value1" "parameter2:value2". But be aware that this only works for parameters that have been specified in the policy @param string $privilegeT...
[ "Shows", "the", "methods", "represented", "by", "the", "given", "security", "privilege", "target" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SecurityCommandController.php#L304-L349
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/UploadedFilesHelper.php
UploadedFilesHelper.untangleFilesArray
public static function untangleFilesArray(array $convolutedFiles): array { $untangledFiles = []; $fieldPaths = []; foreach ($convolutedFiles as $firstLevelFieldName => $fieldInformation) { if (!is_array($fieldInformation['error'])) { $fieldPaths[] = [$firstLevelF...
php
public static function untangleFilesArray(array $convolutedFiles): array { $untangledFiles = []; $fieldPaths = []; foreach ($convolutedFiles as $firstLevelFieldName => $fieldInformation) { if (!is_array($fieldInformation['error'])) { $fieldPaths[] = [$firstLevelF...
[ "public", "static", "function", "untangleFilesArray", "(", "array", "$", "convolutedFiles", ")", ":", "array", "{", "$", "untangledFiles", "=", "[", "]", ";", "$", "fieldPaths", "=", "[", "]", ";", "foreach", "(", "$", "convolutedFiles", "as", "$", "firstL...
Transforms the convoluted _FILES superglobal into a manageable form. @param array $convolutedFiles The _FILES superglobal or something with the same structure @return array Untangled files
[ "Transforms", "the", "convoluted", "_FILES", "superglobal", "into", "a", "manageable", "form", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UploadedFilesHelper.php#L27-L56
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/UploadedFilesHelper.php
UploadedFilesHelper.calculateFieldPaths
protected static function calculateFieldPaths(array $structure, string $firstLevelFieldName = null): array { $fieldPaths = self::calculateFieldPathsAsArray($structure, $firstLevelFieldName); array_walk($fieldPaths, function (&$fieldPath) { $fieldPath = implode('/', $fieldPath); }...
php
protected static function calculateFieldPaths(array $structure, string $firstLevelFieldName = null): array { $fieldPaths = self::calculateFieldPathsAsArray($structure, $firstLevelFieldName); array_walk($fieldPaths, function (&$fieldPath) { $fieldPath = implode('/', $fieldPath); }...
[ "protected", "static", "function", "calculateFieldPaths", "(", "array", "$", "structure", ",", "string", "$", "firstLevelFieldName", "=", "null", ")", ":", "array", "{", "$", "fieldPaths", "=", "self", "::", "calculateFieldPathsAsArray", "(", "$", "structure", "...
Returns an array of all possible "field paths" for the given array. @param array $structure The array to walk through @param string $firstLevelFieldName @return array An array of paths (as strings) in the format "key1/key2/key3" ... @deprecated
[ "Returns", "an", "array", "of", "all", "possible", "field", "paths", "for", "the", "given", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UploadedFilesHelper.php#L66-L73
neos/flow-development-collection
Neos.Flow/Classes/Http/Helper/UploadedFilesHelper.php
UploadedFilesHelper.calculateFieldPathsAsArray
protected static function calculateFieldPathsAsArray(array $structure, string $firstLevelFieldName = null): array { $fieldPaths = []; foreach ($structure as $key => $subStructure) { $fieldPath = []; if ($firstLevelFieldName !== null) { $fieldPath[] = $firstLev...
php
protected static function calculateFieldPathsAsArray(array $structure, string $firstLevelFieldName = null): array { $fieldPaths = []; foreach ($structure as $key => $subStructure) { $fieldPath = []; if ($firstLevelFieldName !== null) { $fieldPath[] = $firstLev...
[ "protected", "static", "function", "calculateFieldPathsAsArray", "(", "array", "$", "structure", ",", "string", "$", "firstLevelFieldName", "=", "null", ")", ":", "array", "{", "$", "fieldPaths", "=", "[", "]", ";", "foreach", "(", "$", "structure", "as", "$...
Returns an array of all possible "field paths" for the given array. @param array $structure The array to walk through @param string $firstLevelFieldName @return array An array of paths (as arrays) in the format ["key1", "key2", "key3"] ...
[ "Returns", "an", "array", "of", "all", "possible", "field", "paths", "for", "the", "given", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UploadedFilesHelper.php#L82-L101
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/QueryResult.php
QueryResult.initialize
protected function initialize() { if (!is_array($this->queryResult)) { $this->queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQuery($this->query)); } }
php
protected function initialize() { if (!is_array($this->queryResult)) { $this->queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQuery($this->query)); } }
[ "protected", "function", "initialize", "(", ")", "{", "if", "(", "!", "is_array", "(", "$", "this", "->", "queryResult", ")", ")", "{", "$", "this", "->", "queryResult", "=", "$", "this", "->", "dataMapper", "->", "mapToObjects", "(", "$", "this", "->"...
Loads the objects this QueryResult is supposed to hold @return void
[ "Loads", "the", "objects", "this", "QueryResult", "is", "supposed", "to", "hold" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/QueryResult.php#L90-L95
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/QueryResult.php
QueryResult.getFirst
public function getFirst() { if (is_array($this->queryResult)) { $queryResult = &$this->queryResult; } else { $query = clone $this->query; $query->setLimit(1); $queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQue...
php
public function getFirst() { if (is_array($this->queryResult)) { $queryResult = &$this->queryResult; } else { $query = clone $this->query; $query->setLimit(1); $queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQue...
[ "public", "function", "getFirst", "(", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "queryResult", ")", ")", "{", "$", "queryResult", "=", "&", "$", "this", "->", "queryResult", ";", "}", "else", "{", "$", "query", "=", "clone", "$", "t...
Returns the first object in the result set, if any. @return mixed The first object of the result set or NULL if the result set was empty @api
[ "Returns", "the", "first", "object", "in", "the", "result", "set", "if", "any", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/QueryResult.php#L114-L124
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/QueryResult.php
QueryResult.count
public function count() { if ($this->numberOfResults === null) { if (is_array($this->queryResult)) { $this->numberOfResults = count($this->queryResult); } else { $this->numberOfResults = $this->persistenceManager->getObjectCountByQuery($this->query); ...
php
public function count() { if ($this->numberOfResults === null) { if (is_array($this->queryResult)) { $this->numberOfResults = count($this->queryResult); } else { $this->numberOfResults = $this->persistenceManager->getObjectCountByQuery($this->query); ...
[ "public", "function", "count", "(", ")", "{", "if", "(", "$", "this", "->", "numberOfResults", "===", "null", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "queryResult", ")", ")", "{", "$", "this", "->", "numberOfResults", "=", "count", "...
Returns the number of objects in the result @return integer The number of matching objects @api
[ "Returns", "the", "number", "of", "objects", "in", "the", "result" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/QueryResult.php#L132-L142
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
AbstractConditionViewHelper.renderThenChild
protected function renderThenChild() { if ($this->hasArgument('then')) { return $this->arguments['then']; } $elseViewHelperEncountered = false; foreach ($this->childNodes as $childNode) { if ($childNode instanceof ViewHelperNode && substr($chi...
php
protected function renderThenChild() { if ($this->hasArgument('then')) { return $this->arguments['then']; } $elseViewHelperEncountered = false; foreach ($this->childNodes as $childNode) { if ($childNode instanceof ViewHelperNode && substr($chi...
[ "protected", "function", "renderThenChild", "(", ")", "{", "if", "(", "$", "this", "->", "hasArgument", "(", "'then'", ")", ")", "{", "return", "$", "this", "->", "arguments", "[", "'then'", "]", ";", "}", "$", "elseViewHelperEncountered", "=", "false", ...
Returns value of "then" attribute. If then attribute is not set, iterates through child nodes and renders ThenViewHelper. If then attribute is not set and no ThenViewHelper and no ElseViewHelper is found, all child nodes are rendered @return mixed rendered ThenViewHelper or contents of <f:if> if no ThenViewHelper was ...
[ "Returns", "value", "of", "then", "attribute", ".", "If", "then", "attribute", "is", "not", "set", "iterates", "through", "child", "nodes", "and", "renders", "ThenViewHelper", ".", "If", "then", "attribute", "is", "not", "set", "and", "no", "ThenViewHelper", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractConditionViewHelper.php#L134-L161
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
AbstractConditionViewHelper.renderElseChild
protected function renderElseChild() { if ($this->hasArgument('else')) { return $this->arguments['else']; } /** @var ViewHelperNode|NULL $elseNode */ $elseNode = null; foreach ($this->childNodes as $childNode) { if ($childNode instanceof ViewHelperNod...
php
protected function renderElseChild() { if ($this->hasArgument('else')) { return $this->arguments['else']; } /** @var ViewHelperNode|NULL $elseNode */ $elseNode = null; foreach ($this->childNodes as $childNode) { if ($childNode instanceof ViewHelperNod...
[ "protected", "function", "renderElseChild", "(", ")", "{", "if", "(", "$", "this", "->", "hasArgument", "(", "'else'", ")", ")", "{", "return", "$", "this", "->", "arguments", "[", "'else'", "]", ";", "}", "/** @var ViewHelperNode|NULL $elseNode */", "$", "e...
Returns value of "else" attribute. If else attribute is not set, iterates through child nodes and renders ElseViewHelper. If else attribute is not set and no ElseViewHelper is found, an empty string will be returned. @return string rendered ElseViewHelper or an empty string if no ThenViewHelper was found @api
[ "Returns", "value", "of", "else", "attribute", ".", "If", "else", "attribute", "is", "not", "set", "iterates", "through", "child", "nodes", "and", "renders", "ElseViewHelper", ".", "If", "else", "attribute", "is", "not", "set", "and", "no", "ElseViewHelper", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractConditionViewHelper.php#L171-L193
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
AbstractConditionViewHelper.compile
public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler) { $thenViewHelperEncountered = $elseViewHelperEncountered = false; foreach ($node->getChildNodes() as $childNode) { if ($childNode instanceof ViewHelperNode) {...
php
public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler) { $thenViewHelperEncountered = $elseViewHelperEncountered = false; foreach ($node->getChildNodes() as $childNode) { if ($childNode instanceof ViewHelperNode) {...
[ "public", "function", "compile", "(", "$", "argumentsName", ",", "$", "closureName", ",", "&", "$", "initializationPhpCode", ",", "ViewHelperNode", "$", "node", ",", "TemplateCompiler", "$", "compiler", ")", "{", "$", "thenViewHelperEncountered", "=", "$", "else...
The compiled ViewHelper adds two new ViewHelper arguments: __thenClosure and __elseClosure. These contain closures which are be executed to render the then(), respectively else() case. @param string $argumentsName @param string $closureName @param string $initializationPhpCode @param ViewHelperNode $node @param Templa...
[ "The", "compiled", "ViewHelper", "adds", "two", "new", "ViewHelper", "arguments", ":", "__thenClosure", "and", "__elseClosure", ".", "These", "contain", "closures", "which", "are", "be", "executed", "to", "render", "the", "then", "()", "respectively", "else", "(...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractConditionViewHelper.php#L206-L235
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/DateTimeValidator.php
DateTimeValidator.isValid
protected function isValid($value) { if ($value instanceof \DateTimeInterface) { return; } if (!isset($this->options['locale'])) { $locale = $this->localizationService->getConfiguration()->getDefaultLocale(); } elseif (is_string($this->options['locale'])) { ...
php
protected function isValid($value) { if ($value instanceof \DateTimeInterface) { return; } if (!isset($this->options['locale'])) { $locale = $this->localizationService->getConfiguration()->getDefaultLocale(); } elseif (is_string($this->options['locale'])) { ...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "\\", "DateTimeInterface", ")", "{", "return", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "options", "[", "'locale'", "]", ")", ")...
Checks if the given value is a valid DateTime object. @param mixed $value The value that should be validated @return void @api
[ "Checks", "if", "the", "given", "value", "is", "a", "valid", "DateTime", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/DateTimeValidator.php#L54-L91
neos/flow-development-collection
Neos.Flow/Classes/Mvc/ViewConfigurationManager.php
ViewConfigurationManager.getViewConfiguration
public function getViewConfiguration(ActionRequest $request) { $cacheIdentifier = $this->createCacheIdentifier($request); $viewConfiguration = $this->cache->get($cacheIdentifier); if ($viewConfiguration === false) { $configurations = $this->configurationManager->getConfiguration...
php
public function getViewConfiguration(ActionRequest $request) { $cacheIdentifier = $this->createCacheIdentifier($request); $viewConfiguration = $this->cache->get($cacheIdentifier); if ($viewConfiguration === false) { $configurations = $this->configurationManager->getConfiguration...
[ "public", "function", "getViewConfiguration", "(", "ActionRequest", "$", "request", ")", "{", "$", "cacheIdentifier", "=", "$", "this", "->", "createCacheIdentifier", "(", "$", "request", ")", ";", "$", "viewConfiguration", "=", "$", "this", "->", "cache", "->...
This method walks through the view configuration and applies matching configurations in the order of their specifity score. Possible options are currently the viewObjectName to specify a different class that will be used to create the view and an array of options that will be set on the view object. @param ActionReque...
[ "This", "method", "walks", "through", "the", "view", "configuration", "and", "applies", "matching", "configurations", "in", "the", "order", "of", "their", "specifity", "score", ".", "Possible", "options", "are", "currently", "the", "viewObjectName", "to", "specify...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/ViewConfigurationManager.php#L58-L91
neos/flow-development-collection
Neos.Flow/Classes/Mvc/ViewConfigurationManager.php
ViewConfigurationManager.createCacheIdentifier
protected function createCacheIdentifier($request) { $cacheIdentifiersParts = []; do { $cacheIdentifiersParts[] = $request->getControllerPackageKey(); $cacheIdentifiersParts[] = $request->getControllerSubpackageKey(); $cacheIdentifiersParts[] = $request->getContro...
php
protected function createCacheIdentifier($request) { $cacheIdentifiersParts = []; do { $cacheIdentifiersParts[] = $request->getControllerPackageKey(); $cacheIdentifiersParts[] = $request->getControllerSubpackageKey(); $cacheIdentifiersParts[] = $request->getContro...
[ "protected", "function", "createCacheIdentifier", "(", "$", "request", ")", "{", "$", "cacheIdentifiersParts", "=", "[", "]", ";", "do", "{", "$", "cacheIdentifiersParts", "[", "]", "=", "$", "request", "->", "getControllerPackageKey", "(", ")", ";", "$", "c...
Create a complete cache identifier for the given request that conforms to cache identifier syntax @param RequestInterface $request @return string
[ "Create", "a", "complete", "cache", "identifier", "for", "the", "given", "request", "that", "conforms", "to", "cache", "identifier", "syntax" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/ViewConfigurationManager.php#L100-L112
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilege.php
EntityPrivilege.getSqlConstraint
public function getSqlConstraint(ClassMetadata $targetEntity, $targetTableAlias) { $this->evaluateMatcher(); /** @var EntityManager $entityManager */ $entityManager = $this->objectManager->get(EntityManagerInterface::class); $sqlFilter = new SqlFilter($entityManager); if (!...
php
public function getSqlConstraint(ClassMetadata $targetEntity, $targetTableAlias) { $this->evaluateMatcher(); /** @var EntityManager $entityManager */ $entityManager = $this->objectManager->get(EntityManagerInterface::class); $sqlFilter = new SqlFilter($entityManager); if (!...
[ "public", "function", "getSqlConstraint", "(", "ClassMetadata", "$", "targetEntity", ",", "$", "targetTableAlias", ")", "{", "$", "this", "->", "evaluateMatcher", "(", ")", ";", "/** @var EntityManager $entityManager */", "$", "entityManager", "=", "$", "this", "->"...
Note: The result of this method cannot be cached, as the target table alias might change for different query scenarios @param ClassMetadata $targetEntity @param string $targetTableAlias @return string
[ "Note", ":", "The", "result", "of", "this", "method", "cannot", "be", "cached", "as", "the", "target", "table", "alias", "might", "change", "for", "different", "query", "scenarios" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilege.php#L67-L80
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilege.php
EntityPrivilege.evaluateMatcher
protected function evaluateMatcher() { if ($this->isEvaluated) { return; } $context = new EelContext($this->getConditionGenerator()); /** @var EntityPrivilegeExpressionEvaluator $evaluator */ $evaluator = $this->objectManager->get(EntityPrivilegeExpressionEvaluat...
php
protected function evaluateMatcher() { if ($this->isEvaluated) { return; } $context = new EelContext($this->getConditionGenerator()); /** @var EntityPrivilegeExpressionEvaluator $evaluator */ $evaluator = $this->objectManager->get(EntityPrivilegeExpressionEvaluat...
[ "protected", "function", "evaluateMatcher", "(", ")", "{", "if", "(", "$", "this", "->", "isEvaluated", ")", "{", "return", ";", "}", "$", "context", "=", "new", "EelContext", "(", "$", "this", "->", "getConditionGenerator", "(", ")", ")", ";", "/** @var...
parses the matcher of this privilege using Eel and extracts "entityType" and "conditionGenerator" @return void
[ "parses", "the", "matcher", "of", "this", "privilege", "using", "Eel", "and", "extracts", "entityType", "and", "conditionGenerator" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilege.php#L87-L100
neos/flow-development-collection
Neos.Cache/Classes/Psr/Cache/CacheFactory.php
CacheFactory.create
public function create($cacheIdentifier, $backendObjectName, array $backendOptions = []): CacheItemPoolInterface { $backend = $this->instantiateBackend($backendObjectName, $backendOptions, $this->environmentConfiguration); $cache = $this->instantiateCache($cacheIdentifier, $backend); // TODO...
php
public function create($cacheIdentifier, $backendObjectName, array $backendOptions = []): CacheItemPoolInterface { $backend = $this->instantiateBackend($backendObjectName, $backendOptions, $this->environmentConfiguration); $cache = $this->instantiateCache($cacheIdentifier, $backend); // TODO...
[ "public", "function", "create", "(", "$", "cacheIdentifier", ",", "$", "backendObjectName", ",", "array", "$", "backendOptions", "=", "[", "]", ")", ":", "CacheItemPoolInterface", "{", "$", "backend", "=", "$", "this", "->", "instantiateBackend", "(", "$", "...
Factory method which creates the specified cache along with the specified kind of backend. The identifier uniquely identifiers the specific cache, so that entries inside are unique. @param string $cacheIdentifier The name / identifier of the cache to create. @param string $backendObjectName Object name of the cache ba...
[ "Factory", "method", "which", "creates", "the", "specified", "cache", "along", "with", "the", "specified", "kind", "of", "backend", ".", "The", "identifier", "uniquely", "identifiers", "the", "specific", "cache", "so", "that", "entries", "inside", "are", "unique...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/Cache/CacheFactory.php#L42-L51
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/SliceOperation.php
SliceOperation.evaluate
public function evaluate(FlowQuery $flowQuery, array $arguments) { $context = $flowQuery->getContext(); if ($context instanceof \Iterator) { $context = iterator_to_array($context); } if (isset($arguments[0]) && isset($arguments[1])) { $context = array_slice($c...
php
public function evaluate(FlowQuery $flowQuery, array $arguments) { $context = $flowQuery->getContext(); if ($context instanceof \Iterator) { $context = iterator_to_array($context); } if (isset($arguments[0]) && isset($arguments[1])) { $context = array_slice($c...
[ "public", "function", "evaluate", "(", "FlowQuery", "$", "flowQuery", ",", "array", "$", "arguments", ")", "{", "$", "context", "=", "$", "flowQuery", "->", "getContext", "(", ")", ";", "if", "(", "$", "context", "instanceof", "\\", "Iterator", ")", "{",...
{@inheritdoc} @param FlowQuery $flowQuery the FlowQuery object @param array $arguments A mandatory start and optional end index in the context, negative indices indicate an offset from the start or end respectively @return void
[ "{", "@inheritdoc", "}" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/SliceOperation.php#L38-L51
neos/flow-development-collection
Neos.Flow/Classes/Log/LoggerFactory.php
LoggerFactory.create
public function create($identifier, $loggerObjectName, $backendObjectNames, array $backendOptions = []) { if (!isset($this->logInstanceCache[$identifier])) { if (is_a($loggerObjectName, DefaultLogger::class, true)) { $logger = $this->instantiateLogger($loggerObjectName, $backendO...
php
public function create($identifier, $loggerObjectName, $backendObjectNames, array $backendOptions = []) { if (!isset($this->logInstanceCache[$identifier])) { if (is_a($loggerObjectName, DefaultLogger::class, true)) { $logger = $this->instantiateLogger($loggerObjectName, $backendO...
[ "public", "function", "create", "(", "$", "identifier", ",", "$", "loggerObjectName", ",", "$", "backendObjectNames", ",", "array", "$", "backendOptions", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "logInstanceCache", "[", ...
Factory method which creates the specified logger along with the specified backend(s). @param string $identifier An identifier for the logger @param string $loggerObjectName Object name of the log frontend @param mixed $backendObjectNames Object name (or array of object names) of the log backend(s) @param array $backe...
[ "Factory", "method", "which", "creates", "the", "specified", "logger", "along", "with", "the", "specified", "backend", "(", "s", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/LoggerFactory.php#L92-L105
neos/flow-development-collection
Neos.Flow/Classes/Log/LoggerFactory.php
LoggerFactory.instantiateLogger
protected function instantiateLogger(string $loggerObjectName, $backendObjectNames, array $backendOptions = []): LoggerInterface { $logger = new $loggerObjectName; if (is_array($backendObjectNames)) { foreach ($backendObjectNames as $i => $backendObjectName) { if (isset($...
php
protected function instantiateLogger(string $loggerObjectName, $backendObjectNames, array $backendOptions = []): LoggerInterface { $logger = new $loggerObjectName; if (is_array($backendObjectNames)) { foreach ($backendObjectNames as $i => $backendObjectName) { if (isset($...
[ "protected", "function", "instantiateLogger", "(", "string", "$", "loggerObjectName", ",", "$", "backendObjectNames", ",", "array", "$", "backendOptions", "=", "[", "]", ")", ":", "LoggerInterface", "{", "$", "logger", "=", "new", "$", "loggerObjectName", ";", ...
Create a new logger instance. @param string $loggerObjectName @param array|string $backendObjectNames @param array $backendOptions @return \Neos\Flow\Log\LoggerInterface
[ "Create", "a", "new", "logger", "instance", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/LoggerFactory.php#L128-L145
neos/flow-development-collection
Neos.Flow/Classes/Command/ServerCommandController.php
ServerCommandController.runCommand
public function runCommand(string $host = '127.0.0.1', int $port = 8081) { $command = Scripts::buildPhpCommand($this->settings); $address = sprintf('%s:%s', $host, $port); $command .= ' -S ' . escapeshellarg($address) . ' -t ' . escapeshellarg(FLOW_PATH_WEB) . ' ' . escapeshellarg(FLOW_PATH...
php
public function runCommand(string $host = '127.0.0.1', int $port = 8081) { $command = Scripts::buildPhpCommand($this->settings); $address = sprintf('%s:%s', $host, $port); $command .= ' -S ' . escapeshellarg($address) . ' -t ' . escapeshellarg(FLOW_PATH_WEB) . ' ' . escapeshellarg(FLOW_PATH...
[ "public", "function", "runCommand", "(", "string", "$", "host", "=", "'127.0.0.1'", ",", "int", "$", "port", "=", "8081", ")", "{", "$", "command", "=", "Scripts", "::", "buildPhpCommand", "(", "$", "this", "->", "settings", ")", ";", "$", "address", "...
Run a standalone development server Starts an embedded server, see http://php.net/manual/en/features.commandline.webserver.php Note: This requires PHP 5.4+ To change the context Flow will run in, you can set the <b>FLOW_CONTEXT</b> environment variable: <i>export FLOW_CONTEXT=Development && ./flow server:run</i> @pa...
[ "Run", "a", "standalone", "development", "server" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ServerCommandController.php#L44-L53
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.setParent
public function setParent(Result $parent) { if ($this->parent !== $parent) { $this->parent = $parent; if ($this->hasErrors()) { $parent->setErrorsExist(); } if ($this->hasWarnings()) { $parent->setWarningsExist(); } ...
php
public function setParent(Result $parent) { if ($this->parent !== $parent) { $this->parent = $parent; if ($this->hasErrors()) { $parent->setErrorsExist(); } if ($this->hasWarnings()) { $parent->setWarningsExist(); } ...
[ "public", "function", "setParent", "(", "Result", "$", "parent", ")", "{", "if", "(", "$", "this", "->", "parent", "!==", "$", "parent", ")", "{", "$", "this", "->", "parent", "=", "$", "parent", ";", "if", "(", "$", "this", "->", "hasErrors", "(",...
Injects the parent result and propagates the cached error states upwards @param Result $parent @return void
[ "Injects", "the", "parent", "result", "and", "propagates", "the", "cached", "error", "states", "upwards" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L73-L87
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.getFirstError
public function getFirstError(string $messageTypeFilter = null) { $matchingErrors = $this->filterMessages($this->errors, $messageTypeFilter); reset($matchingErrors); return current($matchingErrors); }
php
public function getFirstError(string $messageTypeFilter = null) { $matchingErrors = $this->filterMessages($this->errors, $messageTypeFilter); reset($matchingErrors); return current($matchingErrors); }
[ "public", "function", "getFirstError", "(", "string", "$", "messageTypeFilter", "=", "null", ")", "{", "$", "matchingErrors", "=", "$", "this", "->", "filterMessages", "(", "$", "this", "->", "errors", ",", "$", "messageTypeFilter", ")", ";", "reset", "(", ...
Get the first error object of the current Result object (non-recursive) @param string $messageTypeFilter if specified only errors implementing the given class are considered @return Error @api
[ "Get", "the", "first", "error", "object", "of", "the", "current", "Result", "object", "(", "non", "-", "recursive", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L171-L176
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.getFirstWarning
public function getFirstWarning(string $messageTypeFilter = null) { $matchingWarnings = $this->filterMessages($this->warnings, $messageTypeFilter); reset($matchingWarnings); return current($matchingWarnings); }
php
public function getFirstWarning(string $messageTypeFilter = null) { $matchingWarnings = $this->filterMessages($this->warnings, $messageTypeFilter); reset($matchingWarnings); return current($matchingWarnings); }
[ "public", "function", "getFirstWarning", "(", "string", "$", "messageTypeFilter", "=", "null", ")", "{", "$", "matchingWarnings", "=", "$", "this", "->", "filterMessages", "(", "$", "this", "->", "warnings", ",", "$", "messageTypeFilter", ")", ";", "reset", ...
Get the first warning object of the current Result object (non-recursive) @param string $messageTypeFilter if specified only warnings implementing the given class are considered @return Warning @api
[ "Get", "the", "first", "warning", "object", "of", "the", "current", "Result", "object", "(", "non", "-", "recursive", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L185-L190
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.getFirstNotice
public function getFirstNotice(string $messageTypeFilter = null) { $matchingNotices = $this->filterMessages($this->notices, $messageTypeFilter); reset($matchingNotices); return current($matchingNotices); }
php
public function getFirstNotice(string $messageTypeFilter = null) { $matchingNotices = $this->filterMessages($this->notices, $messageTypeFilter); reset($matchingNotices); return current($matchingNotices); }
[ "public", "function", "getFirstNotice", "(", "string", "$", "messageTypeFilter", "=", "null", ")", "{", "$", "matchingNotices", "=", "$", "this", "->", "filterMessages", "(", "$", "this", "->", "notices", ",", "$", "messageTypeFilter", ")", ";", "reset", "("...
Get the first notice object of the current Result object (non-recursive) @param string $messageTypeFilter if specified only notices implementing the given class are considered @return Notice @api
[ "Get", "the", "first", "notice", "object", "of", "the", "current", "Result", "object", "(", "non", "-", "recursive", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L199-L204
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.forProperty
public function forProperty(string $propertyPath = null): Result { if ($propertyPath === '' || $propertyPath === null) { return $this; } if (strpos($propertyPath, '.') !== false) { return $this->recurseThroughResult(explode('.', $propertyPath)); } if (...
php
public function forProperty(string $propertyPath = null): Result { if ($propertyPath === '' || $propertyPath === null) { return $this; } if (strpos($propertyPath, '.') !== false) { return $this->recurseThroughResult(explode('.', $propertyPath)); } if (...
[ "public", "function", "forProperty", "(", "string", "$", "propertyPath", "=", "null", ")", ":", "Result", "{", "if", "(", "$", "propertyPath", "===", "''", "||", "$", "propertyPath", "===", "null", ")", "{", "return", "$", "this", ";", "}", "if", "(", ...
Return a Result object for the given property path. This is a fluent interface, so you will probably use it like: $result->forProperty('foo.bar')->getErrors() -- to get all errors for property "foo.bar" @param string $propertyPath @return Result @api
[ "Return", "a", "Result", "object", "for", "the", "given", "property", "path", ".", "This", "is", "a", "fluent", "interface", "so", "you", "will", "probably", "use", "it", "like", ":", "$result", "-", ">", "forProperty", "(", "foo", ".", "bar", ")", "-"...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L216-L230
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.recurseThroughResult
public function recurseThroughResult(array $pathSegments): Result { if (count($pathSegments) === 0) { return $this; } $propertyName = array_shift($pathSegments); if (!isset($this->propertyResults[$propertyName])) { $newResult = new Result(); $new...
php
public function recurseThroughResult(array $pathSegments): Result { if (count($pathSegments) === 0) { return $this; } $propertyName = array_shift($pathSegments); if (!isset($this->propertyResults[$propertyName])) { $newResult = new Result(); $new...
[ "public", "function", "recurseThroughResult", "(", "array", "$", "pathSegments", ")", ":", "Result", "{", "if", "(", "count", "(", "$", "pathSegments", ")", "===", "0", ")", "{", "return", "$", "this", ";", "}", "$", "propertyName", "=", "array_shift", "...
Internal use only! @param array $pathSegments @return Result
[ "Internal", "use", "only!" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L238-L255
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.setErrorsExist
protected function setErrorsExist() { $this->errorsExist = true; if ($this->parent !== null) { $this->parent->setErrorsExist(); } }
php
protected function setErrorsExist() { $this->errorsExist = true; if ($this->parent !== null) { $this->parent->setErrorsExist(); } }
[ "protected", "function", "setErrorsExist", "(", ")", "{", "$", "this", "->", "errorsExist", "=", "true", ";", "if", "(", "$", "this", "->", "parent", "!==", "null", ")", "{", "$", "this", "->", "parent", "->", "setErrorsExist", "(", ")", ";", "}", "}...
Sets the error cache to true and propagates the information upwards the Result-Object Tree @return void
[ "Sets", "the", "error", "cache", "to", "true", "and", "propagates", "the", "information", "upwards", "the", "Result", "-", "Object", "Tree" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L274-L280
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.setWarningsExist
protected function setWarningsExist() { $this->warningsExist = true; if ($this->parent !== null) { $this->parent->setWarningsExist(); } }
php
protected function setWarningsExist() { $this->warningsExist = true; if ($this->parent !== null) { $this->parent->setWarningsExist(); } }
[ "protected", "function", "setWarningsExist", "(", ")", "{", "$", "this", "->", "warningsExist", "=", "true", ";", "if", "(", "$", "this", "->", "parent", "!==", "null", ")", "{", "$", "this", "->", "parent", "->", "setWarningsExist", "(", ")", ";", "}"...
Sets the warning cache to true and propagates the information upwards the Result-Object Tree @return void
[ "Sets", "the", "warning", "cache", "to", "true", "and", "propagates", "the", "information", "upwards", "the", "Result", "-", "Object", "Tree" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L299-L305
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.setNoticesExist
protected function setNoticesExist() { $this->noticesExist = true; if ($this->parent !== null) { $this->parent->setNoticesExist(); } }
php
protected function setNoticesExist() { $this->noticesExist = true; if ($this->parent !== null) { $this->parent->setNoticesExist(); } }
[ "protected", "function", "setNoticesExist", "(", ")", "{", "$", "this", "->", "noticesExist", "=", "true", ";", "if", "(", "$", "this", "->", "parent", "!==", "null", ")", "{", "$", "this", "->", "parent", "->", "setNoticesExist", "(", ")", ";", "}", ...
Sets the notices cache to true and propagates the information upwards the Result-Object Tree @return void
[ "Sets", "the", "notices", "cache", "to", "true", "and", "propagates", "the", "information", "upwards", "the", "Result", "-", "Object", "Tree" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L324-L330
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.flattenTree
public function flattenTree(string $propertyName, array &$result, array $level = [], string $messageTypeFilter = null) { if (count($this->$propertyName) > 0) { $propertyPath = implode('.', $level); $result[$propertyPath] = $this->filterMessages($this->$propertyName, $messageTypeFilte...
php
public function flattenTree(string $propertyName, array &$result, array $level = [], string $messageTypeFilter = null) { if (count($this->$propertyName) > 0) { $propertyPath = implode('.', $level); $result[$propertyPath] = $this->filterMessages($this->$propertyName, $messageTypeFilte...
[ "public", "function", "flattenTree", "(", "string", "$", "propertyName", ",", "array", "&", "$", "result", ",", "array", "$", "level", "=", "[", "]", ",", "string", "$", "messageTypeFilter", "=", "null", ")", "{", "if", "(", "count", "(", "$", "this", ...
Flatten a tree of Result objects, based on a certain property. @param string $propertyName @param array $result The current result to be flattened @param array $level The property path in the format array('level1', 'level2', ...) for recursion @param string $messageTypeFilter If specified only messages implementing th...
[ "Flatten", "a", "tree", "of", "Result", "objects", "based", "on", "a", "certain", "property", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L413-L425
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.merge
public function merge(Result $otherResult) { if ($otherResult->errorsExist) { $this->mergeProperty($otherResult, 'getErrors', 'addError'); } if ($otherResult->warningsExist) { $this->mergeProperty($otherResult, 'getWarnings', 'addWarning'); } if ($othe...
php
public function merge(Result $otherResult) { if ($otherResult->errorsExist) { $this->mergeProperty($otherResult, 'getErrors', 'addError'); } if ($otherResult->warningsExist) { $this->mergeProperty($otherResult, 'getWarnings', 'addWarning'); } if ($othe...
[ "public", "function", "merge", "(", "Result", "$", "otherResult", ")", "{", "if", "(", "$", "otherResult", "->", "errorsExist", ")", "{", "$", "this", "->", "mergeProperty", "(", "$", "otherResult", ",", "'getErrors'", ",", "'addError'", ")", ";", "}", "...
Merge the given Result object into this one. @param Result $otherResult @return void @api
[ "Merge", "the", "given", "Result", "object", "into", "this", "one", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L449-L470
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.mergeProperty
protected function mergeProperty(Result $otherResult, string $getterName, string $adderName) { foreach ($otherResult->$getterName() as $messageInOtherResult) { $this->$adderName($messageInOtherResult); } }
php
protected function mergeProperty(Result $otherResult, string $getterName, string $adderName) { foreach ($otherResult->$getterName() as $messageInOtherResult) { $this->$adderName($messageInOtherResult); } }
[ "protected", "function", "mergeProperty", "(", "Result", "$", "otherResult", ",", "string", "$", "getterName", ",", "string", "$", "adderName", ")", "{", "foreach", "(", "$", "otherResult", "->", "$", "getterName", "(", ")", "as", "$", "messageInOtherResult", ...
Merge a single property from the other result object. @param Result $otherResult @param string $getterName @param string $adderName @return void
[ "Merge", "a", "single", "property", "from", "the", "other", "result", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L480-L485
neos/flow-development-collection
Neos.Error.Messages/Classes/Result.php
Result.clear
public function clear() { $this->errors = []; $this->notices = []; $this->warnings = []; $this->warningsExist = false; $this->noticesExist = false; $this->errorsExist = false; $this->propertyResults = []; }
php
public function clear() { $this->errors = []; $this->notices = []; $this->warnings = []; $this->warningsExist = false; $this->noticesExist = false; $this->errorsExist = false; $this->propertyResults = []; }
[ "public", "function", "clear", "(", ")", "{", "$", "this", "->", "errors", "=", "[", "]", ";", "$", "this", "->", "notices", "=", "[", "]", ";", "$", "this", "->", "warnings", "=", "[", "]", ";", "$", "this", "->", "warningsExist", "=", "false", ...
Clears the result @return void
[ "Clears", "the", "result" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Error.Messages/Classes/Result.php#L502-L513
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilege.php
MethodPrivilege.matchesSubject
public function matchesSubject(PrivilegeSubjectInterface $subject): bool { if ($subject instanceof MethodPrivilegeSubject === false) { throw new InvalidPrivilegeTypeException(sprintf('Privileges of type "%s" only support subjects of type "%s", but we got a subject of type: "%s".', MethodPrivileg...
php
public function matchesSubject(PrivilegeSubjectInterface $subject): bool { if ($subject instanceof MethodPrivilegeSubject === false) { throw new InvalidPrivilegeTypeException(sprintf('Privileges of type "%s" only support subjects of type "%s", but we got a subject of type: "%s".', MethodPrivileg...
[ "public", "function", "matchesSubject", "(", "PrivilegeSubjectInterface", "$", "subject", ")", ":", "bool", "{", "if", "(", "$", "subject", "instanceof", "MethodPrivilegeSubject", "===", "false", ")", "{", "throw", "new", "InvalidPrivilegeTypeException", "(", "sprin...
Returns true, if this privilege covers the given subject (join point) @param PrivilegeSubjectInterface $subject @return boolean @throws InvalidPrivilegeTypeException @throws \Neos\Flow\Exception @throws \Neos\Cache\Exception\NoSuchCacheException
[ "Returns", "true", "if", "this", "privilege", "covers", "the", "given", "subject", "(", "join", "point", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilege.php#L89-L112
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilege.php
MethodPrivilege.matchesMethod
public function matchesMethod($className, $methodName): bool { $this->initialize(); $methodIdentifier = strtolower($className . '->' . $methodName); if (isset(static::$methodPermissions[$methodIdentifier][$this->getCacheEntryIdentifier()])) { return true; } retu...
php
public function matchesMethod($className, $methodName): bool { $this->initialize(); $methodIdentifier = strtolower($className . '->' . $methodName); if (isset(static::$methodPermissions[$methodIdentifier][$this->getCacheEntryIdentifier()])) { return true; } retu...
[ "public", "function", "matchesMethod", "(", "$", "className", ",", "$", "methodName", ")", ":", "bool", "{", "$", "this", "->", "initialize", "(", ")", ";", "$", "methodIdentifier", "=", "strtolower", "(", "$", "className", ".", "'->'", ".", "$", "method...
Returns true, if this privilege covers the given method @param string $className @param string $methodName @return boolean @throws \Neos\Cache\Exception\NoSuchCacheException
[ "Returns", "true", "if", "this", "privilege", "covers", "the", "given", "method" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilege.php#L122-L132
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilege.php
MethodPrivilege.getPointcutFilterComposite
public function getPointcutFilterComposite(): PointcutFilterComposite { if ($this->pointcutFilter === null) { /** @var MethodTargetExpressionParser $methodTargetExpressionParser */ $methodTargetExpressionParser = $this->objectManager->get(MethodTargetExpressionParser::class); ...
php
public function getPointcutFilterComposite(): PointcutFilterComposite { if ($this->pointcutFilter === null) { /** @var MethodTargetExpressionParser $methodTargetExpressionParser */ $methodTargetExpressionParser = $this->objectManager->get(MethodTargetExpressionParser::class); ...
[ "public", "function", "getPointcutFilterComposite", "(", ")", ":", "PointcutFilterComposite", "{", "if", "(", "$", "this", "->", "pointcutFilter", "===", "null", ")", "{", "/** @var MethodTargetExpressionParser $methodTargetExpressionParser */", "$", "methodTargetExpressionPa...
Returns the pointcut filter composite, matching all methods covered by this privilege @return PointcutFilterComposite @throws \Neos\Flow\Aop\Exception @throws \Neos\Flow\Aop\Exception\InvalidPointcutExpressionException
[ "Returns", "the", "pointcut", "filter", "composite", "matching", "all", "methods", "covered", "by", "this", "privilege" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilege.php#L141-L150
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/FilterFirewall.php
FilterFirewall.injectSettings
public function injectSettings(array $settings) { $this->rejectAll = $settings['security']['firewall']['rejectAll']; $this->filters = array_map([$this, 'createFilterFromConfiguration'], array_values($settings['security']['firewall']['filters'])); }
php
public function injectSettings(array $settings) { $this->rejectAll = $settings['security']['firewall']['rejectAll']; $this->filters = array_map([$this, 'createFilterFromConfiguration'], array_values($settings['security']['firewall']['filters'])); }
[ "public", "function", "injectSettings", "(", "array", "$", "settings", ")", "{", "$", "this", "->", "rejectAll", "=", "$", "settings", "[", "'security'", "]", "[", "'firewall'", "]", "[", "'rejectAll'", "]", ";", "$", "this", "->", "filters", "=", "array...
Injects the configuration settings @param array $settings @return void
[ "Injects", "the", "configuration", "settings" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/FilterFirewall.php#L77-L81
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/FilterFirewall.php
FilterFirewall.blockIllegalRequests
public function blockIllegalRequests(ActionRequest $request) { $filterMatched = array_reduce($this->filters, function (bool $filterMatched, RequestFilter $filter) use ($request) { return ($filter->filterRequest($request) ? true : $filterMatched); }, false); if ($this->rejectAll ...
php
public function blockIllegalRequests(ActionRequest $request) { $filterMatched = array_reduce($this->filters, function (bool $filterMatched, RequestFilter $filter) use ($request) { return ($filter->filterRequest($request) ? true : $filterMatched); }, false); if ($this->rejectAll ...
[ "public", "function", "blockIllegalRequests", "(", "ActionRequest", "$", "request", ")", "{", "$", "filterMatched", "=", "array_reduce", "(", "$", "this", "->", "filters", ",", "function", "(", "bool", "$", "filterMatched", ",", "RequestFilter", "$", "filter", ...
Analyzes a request against the configured firewall rules and blocks any illegal request. @param ActionRequest $request The request to be analyzed @return void @throws AccessDeniedException if the
[ "Analyzes", "a", "request", "against", "the", "configured", "firewall", "rules", "and", "blocks", "any", "illegal", "request", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/FilterFirewall.php#L91-L100
neos/flow-development-collection
Neos.Flow/Classes/Composer/InstallerScripts.php
InstallerScripts.postUpdateAndInstall
public static function postUpdateAndInstall(Event $event) { if (!defined('FLOW_PATH_ROOT')) { define('FLOW_PATH_ROOT', Files::getUnixStylePath(getcwd()) . '/'); } if (!defined('FLOW_PATH_PACKAGES')) { define('FLOW_PATH_PACKAGES', Files::getUnixStylePath(getcwd()) . '...
php
public static function postUpdateAndInstall(Event $event) { if (!defined('FLOW_PATH_ROOT')) { define('FLOW_PATH_ROOT', Files::getUnixStylePath(getcwd()) . '/'); } if (!defined('FLOW_PATH_PACKAGES')) { define('FLOW_PATH_PACKAGES', Files::getUnixStylePath(getcwd()) . '...
[ "public", "static", "function", "postUpdateAndInstall", "(", "Event", "$", "event", ")", "{", "if", "(", "!", "defined", "(", "'FLOW_PATH_ROOT'", ")", ")", "{", "define", "(", "'FLOW_PATH_ROOT'", ",", "Files", "::", "getUnixStylePath", "(", "getcwd", "(", ")...
Make sure required paths and files are available outside of Package Run on every Composer install or update - must be configured in root manifest @param Event $event @return void
[ "Make", "sure", "required", "paths", "and", "files", "are", "available", "outside", "of", "Package", "Run", "on", "every", "Composer", "install", "or", "update", "-", "must", "be", "configured", "in", "root", "manifest" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/InstallerScripts.php#L33-L59
neos/flow-development-collection
Neos.Flow/Classes/Composer/InstallerScripts.php
InstallerScripts.postPackageUpdateAndInstall
public static function postPackageUpdateAndInstall(PackageEvent $event) { $operation = $event->getOperation(); if (!$operation instanceof InstallOperation && !$operation instanceof UpdateOperation) { throw new Exception\UnexpectedOperationException('Handling of operation with type "' . $...
php
public static function postPackageUpdateAndInstall(PackageEvent $event) { $operation = $event->getOperation(); if (!$operation instanceof InstallOperation && !$operation instanceof UpdateOperation) { throw new Exception\UnexpectedOperationException('Handling of operation with type "' . $...
[ "public", "static", "function", "postPackageUpdateAndInstall", "(", "PackageEvent", "$", "event", ")", "{", "$", "operation", "=", "$", "event", "->", "getOperation", "(", ")", ";", "if", "(", "!", "$", "operation", "instanceof", "InstallOperation", "&&", "!",...
Calls actions and install scripts provided by installed packages. @param PackageEvent $event @return void @throws Exception\UnexpectedOperationException
[ "Calls", "actions", "and", "install", "scripts", "provided", "by", "installed", "packages", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/InstallerScripts.php#L68-L108
neos/flow-development-collection
Neos.Flow/Classes/Composer/InstallerScripts.php
InstallerScripts.copyDistributionFiles
protected static function copyDistributionFiles(string $installerResourcesDirectory) { $essentialsPath = $installerResourcesDirectory . 'Distribution/Essentials'; if (is_dir($essentialsPath)) { Files::copyDirectoryRecursively($essentialsPath, Files::getUnixStylePath(getcwd()) . '/', fals...
php
protected static function copyDistributionFiles(string $installerResourcesDirectory) { $essentialsPath = $installerResourcesDirectory . 'Distribution/Essentials'; if (is_dir($essentialsPath)) { Files::copyDirectoryRecursively($essentialsPath, Files::getUnixStylePath(getcwd()) . '/', fals...
[ "protected", "static", "function", "copyDistributionFiles", "(", "string", "$", "installerResourcesDirectory", ")", "{", "$", "essentialsPath", "=", "$", "installerResourcesDirectory", ".", "'Distribution/Essentials'", ";", "if", "(", "is_dir", "(", "$", "essentialsPath...
Copies any distribution files to their place if needed. @param string $installerResourcesDirectory Path to the installer directory that contains the Distribution/Essentials and/or Distribution/Defaults directories. @return void
[ "Copies", "any", "distribution", "files", "to", "their", "place", "if", "needed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/InstallerScripts.php#L116-L127
neos/flow-development-collection
Neos.Flow/Classes/Composer/InstallerScripts.php
InstallerScripts.runPackageScripts
protected static function runPackageScripts(string $staticMethodReference) { $className = substr($staticMethodReference, 0, strpos($staticMethodReference, '::')); $methodName = substr($staticMethodReference, strpos($staticMethodReference, '::') + 2); if (!class_exists($className)) { ...
php
protected static function runPackageScripts(string $staticMethodReference) { $className = substr($staticMethodReference, 0, strpos($staticMethodReference, '::')); $methodName = substr($staticMethodReference, strpos($staticMethodReference, '::') + 2); if (!class_exists($className)) { ...
[ "protected", "static", "function", "runPackageScripts", "(", "string", "$", "staticMethodReference", ")", "{", "$", "className", "=", "substr", "(", "$", "staticMethodReference", ",", "0", ",", "strpos", "(", "$", "staticMethodReference", ",", "'::'", ")", ")", ...
Calls a static method from it's string representation @param string $staticMethodReference @return void @throws Exception\InvalidConfigurationException
[ "Calls", "a", "static", "method", "from", "it", "s", "string", "representation" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Composer/InstallerScripts.php#L136-L148
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.renderDump
public static function renderDump($variable, int $level, bool $plaintext = false, bool $ansiColors = false): string { if ($level > self::getRecursionLimit()) { return 'RECURSION ... ' . chr(10); } if (is_string($variable)) { $croppedValue = (strlen($variable) > 2000) ...
php
public static function renderDump($variable, int $level, bool $plaintext = false, bool $ansiColors = false): string { if ($level > self::getRecursionLimit()) { return 'RECURSION ... ' . chr(10); } if (is_string($variable)) { $croppedValue = (strlen($variable) > 2000) ...
[ "public", "static", "function", "renderDump", "(", "$", "variable", ",", "int", "$", "level", ",", "bool", "$", "plaintext", "=", "false", ",", "bool", "$", "ansiColors", "=", "false", ")", ":", "string", "{", "if", "(", "$", "level", ">", "self", ":...
Renders a dump of the given variable @param mixed $variable @param integer $level @param boolean $plaintext @param boolean $ansiColors @return string
[ "Renders", "a", "dump", "of", "the", "given", "variable" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L129-L156
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.renderArrayDump
protected static function renderArrayDump(array $array, int $level, bool $plaintext = false, bool $ansiColors = false): string { if (is_array($array)) { $dump = 'array' . (count($array) ? '(' . count($array) . ')' : '(empty)'); } elseif ($array instanceof \Countable) { $dump ...
php
protected static function renderArrayDump(array $array, int $level, bool $plaintext = false, bool $ansiColors = false): string { if (is_array($array)) { $dump = 'array' . (count($array) ? '(' . count($array) . ')' : '(empty)'); } elseif ($array instanceof \Countable) { $dump ...
[ "protected", "static", "function", "renderArrayDump", "(", "array", "$", "array", ",", "int", "$", "level", ",", "bool", "$", "plaintext", "=", "false", ",", "bool", "$", "ansiColors", "=", "false", ")", ":", "string", "{", "if", "(", "is_array", "(", ...
Renders a dump of the given array @param array $array @param integer $level @param boolean $plaintext @param boolean $ansiColors @return string
[ "Renders", "a", "dump", "of", "the", "given", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L167-L182
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.renderObjectDump
protected static function renderObjectDump($object, int $level, bool $renderProperties = true, bool $plaintext = false, bool $ansiColors = false): string { $dump = ''; $scope = ''; $additionalAttributes = ''; if ($object instanceof \Doctrine\Common\Collections\Collection || $object ...
php
protected static function renderObjectDump($object, int $level, bool $renderProperties = true, bool $plaintext = false, bool $ansiColors = false): string { $dump = ''; $scope = ''; $additionalAttributes = ''; if ($object instanceof \Doctrine\Common\Collections\Collection || $object ...
[ "protected", "static", "function", "renderObjectDump", "(", "$", "object", ",", "int", "$", "level", ",", "bool", "$", "renderProperties", "=", "true", ",", "bool", "$", "plaintext", "=", "false", ",", "bool", "$", "ansiColors", "=", "false", ")", ":", "...
Renders a dump of the given object @param object $object @param integer $level @param boolean $renderProperties @param boolean $plaintext @param boolean $ansiColors @return string
[ "Renders", "a", "dump", "of", "the", "given", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L194-L311
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.getBacktraceCode
public static function getBacktraceCode(array $trace, bool $includeCode = true, bool $plaintext = false): string { if ($plaintext) { return static::getBacktraceCodePlaintext($trace, $includeCode); } $backtraceCode = '<ol class="Flow-Debug-Backtrace" reversed>'; foreach ($...
php
public static function getBacktraceCode(array $trace, bool $includeCode = true, bool $plaintext = false): string { if ($plaintext) { return static::getBacktraceCodePlaintext($trace, $includeCode); } $backtraceCode = '<ol class="Flow-Debug-Backtrace" reversed>'; foreach ($...
[ "public", "static", "function", "getBacktraceCode", "(", "array", "$", "trace", ",", "bool", "$", "includeCode", "=", "true", ",", "bool", "$", "plaintext", "=", "false", ")", ":", "string", "{", "if", "(", "$", "plaintext", ")", "{", "return", "static",...
Renders some backtrace @param array $trace The trace @param boolean $includeCode Include code snippet @param boolean $plaintext @return string Backtrace information
[ "Renders", "some", "backtrace" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L321-L372
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.getCodeSnippet
public static function getCodeSnippet(string $filePathAndName, int $lineNumber, bool $plaintext = false): string { if ($plaintext) { return static::getCodeSnippetPlaintext($filePathAndName, $lineNumber); } $codeSnippet = '<br />'; if (@file_exists($filePathAndName)) { ...
php
public static function getCodeSnippet(string $filePathAndName, int $lineNumber, bool $plaintext = false): string { if ($plaintext) { return static::getCodeSnippetPlaintext($filePathAndName, $lineNumber); } $codeSnippet = '<br />'; if (@file_exists($filePathAndName)) { ...
[ "public", "static", "function", "getCodeSnippet", "(", "string", "$", "filePathAndName", ",", "int", "$", "lineNumber", ",", "bool", "$", "plaintext", "=", "false", ")", ":", "string", "{", "if", "(", "$", "plaintext", ")", "{", "return", "static", "::", ...
Returns a code snippet from the specified file. @param string $filePathAndName Absolute path and filename of the PHP file @param integer $lineNumber Line number defining the center of the code snippet @param boolean $plaintext @return string The code snippet
[ "Returns", "a", "code", "snippet", "from", "the", "specified", "file", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L425-L461
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.ansiEscapeWrap
protected static function ansiEscapeWrap(string $string, string $ansiColors, bool $enable = true): string { if ($enable) { return "\x1B[" . $ansiColors . 'm' . $string . "\x1B[0m"; } else { return $string; } }
php
protected static function ansiEscapeWrap(string $string, string $ansiColors, bool $enable = true): string { if ($enable) { return "\x1B[" . $ansiColors . 'm' . $string . "\x1B[0m"; } else { return $string; } }
[ "protected", "static", "function", "ansiEscapeWrap", "(", "string", "$", "string", ",", "string", "$", "ansiColors", ",", "bool", "$", "enable", "=", "true", ")", ":", "string", "{", "if", "(", "$", "enable", ")", "{", "return", "\"\\x1B[\"", ".", "$", ...
Wrap a string with the ANSI escape sequence for colorful output @param string $string The string to wrap @param string $ansiColors The ansi color sequence (e.g. "1;37") @param boolean $enable If false, the raw string will be returned @return string The wrapped or raw string
[ "Wrap", "a", "string", "with", "the", "ANSI", "escape", "sequence", "for", "colorful", "output" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L518-L525
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.getIgnoredClassesRegex
public static function getIgnoredClassesRegex(): string { if (self::$ignoredClassesRegex !== '') { return self::$ignoredClassesRegex; } $ignoredClassesConfiguration = self::$ignoredClassesFallback; $ignoredClasses = []; if (self::$objectManager instanceof Object...
php
public static function getIgnoredClassesRegex(): string { if (self::$ignoredClassesRegex !== '') { return self::$ignoredClassesRegex; } $ignoredClassesConfiguration = self::$ignoredClassesFallback; $ignoredClasses = []; if (self::$objectManager instanceof Object...
[ "public", "static", "function", "getIgnoredClassesRegex", "(", ")", ":", "string", "{", "if", "(", "self", "::", "$", "ignoredClassesRegex", "!==", "''", ")", "{", "return", "self", "::", "$", "ignoredClassesRegex", ";", "}", "$", "ignoredClassesConfiguration", ...
Tries to load the 'Neos.Flow.error.debugger.ignoredClasses' setting to build a regular expression that can be used to filter ignored class names If settings can't be loaded it uses self::$ignoredClassesFallback. @return string
[ "Tries", "to", "load", "the", "Neos", ".", "Flow", ".", "error", ".", "debugger", ".", "ignoredClasses", "setting", "to", "build", "a", "regular", "expression", "that", "can", "be", "used", "to", "filter", "ignored", "class", "names", "If", "settings", "ca...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L534-L562
neos/flow-development-collection
Neos.Flow/Classes/Error/Debugger.php
Debugger.getRecursionLimit
public static function getRecursionLimit(): int { if (self::$recursionLimit) { return self::$recursionLimit; } self::$recursionLimit = self::$recursionLimitFallback; if (self::$objectManager instanceof ObjectManagerInterface) { $configurationManager = self::...
php
public static function getRecursionLimit(): int { if (self::$recursionLimit) { return self::$recursionLimit; } self::$recursionLimit = self::$recursionLimitFallback; if (self::$objectManager instanceof ObjectManagerInterface) { $configurationManager = self::...
[ "public", "static", "function", "getRecursionLimit", "(", ")", ":", "int", "{", "if", "(", "self", "::", "$", "recursionLimit", ")", "{", "return", "self", "::", "$", "recursionLimit", ";", "}", "self", "::", "$", "recursionLimit", "=", "self", "::", "$"...
Tries to load the 'Neos.Flow.error.debugger.recursionLimit' setting to determine the maximal recursions-level fgor the debugger. If settings can't be loaded it uses self::$ignoredClassesFallback. @return integer
[ "Tries", "to", "load", "the", "Neos", ".", "Flow", ".", "error", ".", "debugger", ".", "recursionLimit", "setting", "to", "determine", "the", "maximal", "recursions", "-", "level", "fgor", "the", "debugger", ".", "If", "settings", "can", "t", "be", "loaded...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/Debugger.php#L571-L590
neos/flow-development-collection
Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
LoggingAspect.logStart
public function logStart(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); if ($session->isStarted()) { $this->logger->info(sprintf('%s: Started session with id %s.', $this->getClassName($joinPoint), $session->getId()), [ 'packageKey' => 'Neos.Flow', ...
php
public function logStart(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); if ($session->isStarted()) { $this->logger->info(sprintf('%s: Started session with id %s.', $this->getClassName($joinPoint), $session->getId()), [ 'packageKey' => 'Neos.Flow', ...
[ "public", "function", "logStart", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "session", "=", "$", "joinPoint", "->", "getProxy", "(", ")", ";", "if", "(", "$", "session", "->", "isStarted", "(", ")", ")", "{", "$", "this", "->", "logge...
Logs calls of start() @Flow\After("within(Neos\Flow\Session\SessionInterface) && method(.*->start())") @param JoinPointInterface $joinPoint The current joinpoint @return mixed The result of the target method if it has not been intercepted
[ "Logs", "calls", "of", "start", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Aspect/LoggingAspect.php#L50-L60
neos/flow-development-collection
Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
LoggingAspect.logResume
public function logResume(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); if ($session->isStarted()) { $inactivityInSeconds = $joinPoint->getResult(); if ($inactivityInSeconds === 1) { $inactivityMessage = '1 second'; } elseif (...
php
public function logResume(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); if ($session->isStarted()) { $inactivityInSeconds = $joinPoint->getResult(); if ($inactivityInSeconds === 1) { $inactivityMessage = '1 second'; } elseif (...
[ "public", "function", "logResume", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "session", "=", "$", "joinPoint", "->", "getProxy", "(", ")", ";", "if", "(", "$", "session", "->", "isStarted", "(", ")", ")", "{", "$", "inactivityInSeconds", ...
Logs calls of resume() @Flow\After("within(Neos\Flow\Session\SessionInterface) && method(.*->resume())") @param JoinPointInterface $joinPoint The current joinpoint @return mixed The result of the target method if it has not been intercepted
[ "Logs", "calls", "of", "resume", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Aspect/LoggingAspect.php#L69-L87
neos/flow-development-collection
Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
LoggingAspect.logDestroy
public function logDestroy(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); if ($session->isStarted()) { $reason = $joinPoint->isMethodArgument('reason') ? $joinPoint->getMethodArgument('reason') : 'no reason given'; $this->logger->debug(sprintf('%s: Destro...
php
public function logDestroy(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); if ($session->isStarted()) { $reason = $joinPoint->isMethodArgument('reason') ? $joinPoint->getMethodArgument('reason') : 'no reason given'; $this->logger->debug(sprintf('%s: Destro...
[ "public", "function", "logDestroy", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "session", "=", "$", "joinPoint", "->", "getProxy", "(", ")", ";", "if", "(", "$", "session", "->", "isStarted", "(", ")", ")", "{", "$", "reason", "=", "$"...
Logs calls of destroy() @Flow\Before("within(Neos\Flow\Session\SessionInterface) && method(.*->destroy())") @param JoinPointInterface $joinPoint The current joinpoint @return mixed The result of the target method if it has not been intercepted
[ "Logs", "calls", "of", "destroy", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Aspect/LoggingAspect.php#L96-L103
neos/flow-development-collection
Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
LoggingAspect.logRenewId
public function logRenewId(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); $oldId = $session->getId(); $newId = $joinPoint->getAdviceChain()->proceed($joinPoint); if ($session->isStarted()) { $this->logger->info(sprintf('%s: Changed session id from %s ...
php
public function logRenewId(JoinPointInterface $joinPoint) { $session = $joinPoint->getProxy(); $oldId = $session->getId(); $newId = $joinPoint->getAdviceChain()->proceed($joinPoint); if ($session->isStarted()) { $this->logger->info(sprintf('%s: Changed session id from %s ...
[ "public", "function", "logRenewId", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "session", "=", "$", "joinPoint", "->", "getProxy", "(", ")", ";", "$", "oldId", "=", "$", "session", "->", "getId", "(", ")", ";", "$", "newId", "=", "$", ...
Logs calls of renewId() @Flow\Around("within(Neos\Flow\Session\SessionInterface) && method(.*->renewId())") @param JoinPointInterface $joinPoint The current joinpoint @return mixed The result of the target method if it has not been intercepted
[ "Logs", "calls", "of", "renewId", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Aspect/LoggingAspect.php#L112-L125
neos/flow-development-collection
Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
LoggingAspect.logCollectGarbage
public function logCollectGarbage(JoinPointInterface $joinPoint) { $logEnvironment = [ 'FLOW_LOG_ENVIRONMENT' => [ 'packageKey' => 'Neos.Flow', 'className' => $joinPoint->getClassName(), 'methodName' => $joinPoint->getMethodName() ] ...
php
public function logCollectGarbage(JoinPointInterface $joinPoint) { $logEnvironment = [ 'FLOW_LOG_ENVIRONMENT' => [ 'packageKey' => 'Neos.Flow', 'className' => $joinPoint->getClassName(), 'methodName' => $joinPoint->getMethodName() ] ...
[ "public", "function", "logCollectGarbage", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "logEnvironment", "=", "[", "'FLOW_LOG_ENVIRONMENT'", "=>", "[", "'packageKey'", "=>", "'Neos.Flow'", ",", "'className'", "=>", "$", "joinPoint", "->", "getClassNa...
Logs calls of collectGarbage() @Flow\AfterReturning("within(Neos\Flow\Session\SessionInterface) && method(.*->collectGarbage())") @param JoinPointInterface $joinPoint The current joinpoint @return void
[ "Logs", "calls", "of", "collectGarbage", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Aspect/LoggingAspect.php#L134-L152
neos/flow-development-collection
Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
LoggingAspect.getClassName
protected function getClassName(JoinPointInterface $joinPoint) { $className = $joinPoint->getClassName(); $sessionNamespace = substr(SessionInterface::class, 0, -strrpos(SessionInterface::class, '\\') + 1); if (strpos($className, $sessionNamespace) === 0) { $className = substr($c...
php
protected function getClassName(JoinPointInterface $joinPoint) { $className = $joinPoint->getClassName(); $sessionNamespace = substr(SessionInterface::class, 0, -strrpos(SessionInterface::class, '\\') + 1); if (strpos($className, $sessionNamespace) === 0) { $className = substr($c...
[ "protected", "function", "getClassName", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "$", "className", "=", "$", "joinPoint", "->", "getClassName", "(", ")", ";", "$", "sessionNamespace", "=", "substr", "(", "SessionInterface", "::", "class", ",", "...
Determines the short or full class name of the session implementation @param JoinPointInterface $joinPoint @return string
[ "Determines", "the", "short", "or", "full", "class", "name", "of", "the", "session", "implementation" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Aspect/LoggingAspect.php#L160-L168
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrParser.php
CldrParser.parseNode
protected function parseNode(\SimpleXMLElement $node) { $parsedNode = []; if ($node->count() === 0) { return (string)$node; } foreach ($node->children() as $child) { $nameOfChild = $child->getName(); $parsedChild = $this->parseNode($child); ...
php
protected function parseNode(\SimpleXMLElement $node) { $parsedNode = []; if ($node->count() === 0) { return (string)$node; } foreach ($node->children() as $child) { $nameOfChild = $child->getName(); $parsedChild = $this->parseNode($child); ...
[ "protected", "function", "parseNode", "(", "\\", "SimpleXMLElement", "$", "node", ")", "{", "$", "parsedNode", "=", "[", "]", ";", "if", "(", "$", "node", "->", "count", "(", ")", "===", "0", ")", "{", "return", "(", "string", ")", "$", "node", ";"...
Returns array representation of XML data, starting from a node pointed by $node variable. Please see the documentation of this class for details about the internal representation of XML data. @param \SimpleXMLElement $node A node to start parsing from @return mixed An array representing parsed XML node or string valu...
[ "Returns", "array", "representation", "of", "XML", "data", "starting", "from", "a", "node", "pointed", "by", "$node", "variable", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrParser.php#L77-L108
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrParser.php
CldrParser.isDistinguishingAttribute
protected function isDistinguishingAttribute($attributeName) { // Taken from SupplementalMetadata and hardcoded for now $distinguishingAttributes = ['key', 'request', 'id', '_q', 'registry', 'alt', 'iso4217', 'iso3166', 'mzone', 'from', 'to', 'type']; // These are not defined as distinguish...
php
protected function isDistinguishingAttribute($attributeName) { // Taken from SupplementalMetadata and hardcoded for now $distinguishingAttributes = ['key', 'request', 'id', '_q', 'registry', 'alt', 'iso4217', 'iso3166', 'mzone', 'from', 'to', 'type']; // These are not defined as distinguish...
[ "protected", "function", "isDistinguishingAttribute", "(", "$", "attributeName", ")", "{", "// Taken from SupplementalMetadata and hardcoded for now", "$", "distinguishingAttributes", "=", "[", "'key'", ",", "'request'", ",", "'id'", ",", "'_q'", ",", "'registry'", ",", ...
Checks if given attribute belongs to the group of distinguishing attributes Distinguishing attributes in CLDR serves to distinguish multiple elements at the same level (most notably 'type'). @param string $attributeName @return boolean
[ "Checks", "if", "given", "attribute", "belongs", "to", "the", "group", "of", "distinguishing", "attributes" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrParser.php#L119-L136
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.build
public function build(): void { $allAvailableClassNamesByPackage = $this->objectManager->getRegisteredClassNames(); $possibleTargetClassNames = $this->getProxyableClasses($allAvailableClassNamesByPackage); $actualAspectClassNames = $this->reflectionService->getClassNamesByAnnotation(Flow\Asp...
php
public function build(): void { $allAvailableClassNamesByPackage = $this->objectManager->getRegisteredClassNames(); $possibleTargetClassNames = $this->getProxyableClasses($allAvailableClassNamesByPackage); $actualAspectClassNames = $this->reflectionService->getClassNamesByAnnotation(Flow\Asp...
[ "public", "function", "build", "(", ")", ":", "void", "{", "$", "allAvailableClassNamesByPackage", "=", "$", "this", "->", "objectManager", "->", "getRegisteredClassNames", "(", ")", ";", "$", "possibleTargetClassNames", "=", "$", "this", "->", "getProxyableClasse...
Builds proxy class code which weaves advices into the respective target classes. The object configurations provided by the Compiler are searched for possible aspect annotations. If an aspect class is found, the pointcut expressions are parsed and a new aspect with one or more advisors is added to the aspect registry o...
[ "Builds", "proxy", "class", "code", "which", "weaves", "advices", "into", "the", "respective", "target", "classes", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L193-L242
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.findPointcut
public function findPointcut(string $aspectClassName, string $pointcutMethodName) { if (!isset($this->aspectContainers[$aspectClassName])) { return false; } foreach ($this->aspectContainers[$aspectClassName]->getPointcuts() as $pointcut) { if ($pointcut->getPointcutMe...
php
public function findPointcut(string $aspectClassName, string $pointcutMethodName) { if (!isset($this->aspectContainers[$aspectClassName])) { return false; } foreach ($this->aspectContainers[$aspectClassName]->getPointcuts() as $pointcut) { if ($pointcut->getPointcutMe...
[ "public", "function", "findPointcut", "(", "string", "$", "aspectClassName", ",", "string", "$", "pointcutMethodName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "aspectContainers", "[", "$", "aspectClassName", "]", ")", ")", "{", "return", ...
Traverses the aspect containers to find a pointcut from the aspect class name and pointcut method name @param string $aspectClassName Name of the aspect class where the pointcut has been declared @param string $pointcutMethodName Method name of the pointcut @return mixed The Aop\Pointcut\Pointcut or false if none was ...
[ "Traverses", "the", "aspect", "containers", "to", "find", "a", "pointcut", "from", "the", "aspect", "class", "name", "and", "pointcut", "method", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L252-L263
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getProxyableClasses
protected function getProxyableClasses(array $classNamesByPackage): array { $proxyableClasses = []; foreach ($classNamesByPackage as $classNames) { foreach ($classNames as $className) { if (in_array(substr($className, 0, 15), $this->blacklistedSubPackages)) { ...
php
protected function getProxyableClasses(array $classNamesByPackage): array { $proxyableClasses = []; foreach ($classNamesByPackage as $classNames) { foreach ($classNames as $className) { if (in_array(substr($className, 0, 15), $this->blacklistedSubPackages)) { ...
[ "protected", "function", "getProxyableClasses", "(", "array", "$", "classNamesByPackage", ")", ":", "array", "{", "$", "proxyableClasses", "=", "[", "]", ";", "foreach", "(", "$", "classNamesByPackage", "as", "$", "classNames", ")", "{", "foreach", "(", "$", ...
Determines which of the given classes are potentially proxyable and returns their names in an array. @param array $classNamesByPackage Names of the classes to check @return array Names of classes which can be proxied
[ "Determines", "which", "of", "the", "given", "classes", "are", "potentially", "proxyable", "and", "returns", "their", "names", "in", "an", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L272-L287
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.buildAspectContainers
protected function buildAspectContainers(array &$classNames): array { $aspectContainers = []; foreach ($classNames as $aspectClassName) { $aspectContainers[$aspectClassName] = $this->buildAspectContainer($aspectClassName); } return $aspectContainers; }
php
protected function buildAspectContainers(array &$classNames): array { $aspectContainers = []; foreach ($classNames as $aspectClassName) { $aspectContainers[$aspectClassName] = $this->buildAspectContainer($aspectClassName); } return $aspectContainers; }
[ "protected", "function", "buildAspectContainers", "(", "array", "&", "$", "classNames", ")", ":", "array", "{", "$", "aspectContainers", "=", "[", "]", ";", "foreach", "(", "$", "classNames", "as", "$", "aspectClassName", ")", "{", "$", "aspectContainers", "...
Checks the annotations of the specified classes for aspect tags and creates an aspect with advisors accordingly. @param array &$classNames Classes to check for aspect tags. @return array An array of Aop\AspectContainer for all aspects which were found.
[ "Checks", "the", "annotations", "of", "the", "specified", "classes", "for", "aspect", "tags", "and", "creates", "an", "aspect", "with", "advisors", "accordingly", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L296-L303
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.buildAspectContainer
protected function buildAspectContainer(string $aspectClassName): AspectContainer { $aspectContainer = new AspectContainer($aspectClassName); $methodNames = get_class_methods($aspectClassName); foreach ($methodNames as $methodName) { foreach ($this->reflectionService->getMethodA...
php
protected function buildAspectContainer(string $aspectClassName): AspectContainer { $aspectContainer = new AspectContainer($aspectClassName); $methodNames = get_class_methods($aspectClassName); foreach ($methodNames as $methodName) { foreach ($this->reflectionService->getMethodA...
[ "protected", "function", "buildAspectContainer", "(", "string", "$", "aspectClassName", ")", ":", "AspectContainer", "{", "$", "aspectContainer", "=", "new", "AspectContainer", "(", "$", "aspectClassName", ")", ";", "$", "methodNames", "=", "get_class_methods", "(",...
Creates and returns an aspect from the annotations found in a class which is tagged as an aspect. The object acting as an advice will already be fetched (and therefore instantiated if necessary). @param string $aspectClassName Name of the class which forms the aspect, contains advices etc. @return AspectContainer The...
[ "Creates", "and", "returns", "an", "aspect", "from", "the", "annotations", "found", "in", "a", "class", "which", "is", "tagged", "as", "an", "aspect", ".", "The", "object", "acting", "as", "an", "advice", "will", "already", "be", "fetched", "(", "and", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L314-L402
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.buildProxyClass
public function buildProxyClass(string $targetClassName, array &$aspectContainers): bool { $interfaceIntroductions = $this->getMatchingInterfaceIntroductions($aspectContainers, $targetClassName); $introducedInterfaces = $this->getInterfaceNamesFromIntroductions($interfaceIntroductions); $int...
php
public function buildProxyClass(string $targetClassName, array &$aspectContainers): bool { $interfaceIntroductions = $this->getMatchingInterfaceIntroductions($aspectContainers, $targetClassName); $introducedInterfaces = $this->getInterfaceNamesFromIntroductions($interfaceIntroductions); $int...
[ "public", "function", "buildProxyClass", "(", "string", "$", "targetClassName", ",", "array", "&", "$", "aspectContainers", ")", ":", "bool", "{", "$", "interfaceIntroductions", "=", "$", "this", "->", "getMatchingInterfaceIntroductions", "(", "$", "aspectContainers...
Builds methods for a single AOP proxy class for the specified class. @param string $targetClassName Name of the class to create a proxy class file for @param array &$aspectContainers The array of aspect containers from the AOP Framework @return boolean true if the proxy class could be built, false otherwise.
[ "Builds", "methods", "for", "a", "single", "AOP", "proxy", "class", "for", "the", "specified", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L411-L478
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.proxySubClassesOfClassToEnsureAdvices
protected function proxySubClassesOfClassToEnsureAdvices(string $className, ClassNameIndex $targetClassNameCandidates, ClassNameIndex $treatedSubClasses): ClassNameIndex { if ($this->reflectionService->isClassReflected($className) === false) { return $treatedSubClasses; } if (tra...
php
protected function proxySubClassesOfClassToEnsureAdvices(string $className, ClassNameIndex $targetClassNameCandidates, ClassNameIndex $treatedSubClasses): ClassNameIndex { if ($this->reflectionService->isClassReflected($className) === false) { return $treatedSubClasses; } if (tra...
[ "protected", "function", "proxySubClassesOfClassToEnsureAdvices", "(", "string", "$", "className", ",", "ClassNameIndex", "$", "targetClassNameCandidates", ",", "ClassNameIndex", "$", "treatedSubClasses", ")", ":", "ClassNameIndex", "{", "if", "(", "$", "this", "->", ...
Makes sure that any sub classes of an adviced class also build the advices array on construction. @param string $className The adviced class name @param ClassNameIndex $targetClassNameCandidates target class names for advices @param ClassNameIndex $treatedSubClasses Already treated (sub) classes to avoid duplication @...
[ "Makes", "sure", "that", "any", "sub", "classes", "of", "an", "adviced", "class", "also", "build", "the", "advices", "array", "on", "construction", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L488-L510
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.addBuildMethodsAndAdvicesCodeToClass
protected function addBuildMethodsAndAdvicesCodeToClass(string $className, ClassNameIndex $treatedSubClasses): ClassNameIndex { if ($treatedSubClasses->hasClassName($className)) { return $treatedSubClasses; } $treatedSubClasses = $treatedSubClasses->union(new ClassNameIndex([$cl...
php
protected function addBuildMethodsAndAdvicesCodeToClass(string $className, ClassNameIndex $treatedSubClasses): ClassNameIndex { if ($treatedSubClasses->hasClassName($className)) { return $treatedSubClasses; } $treatedSubClasses = $treatedSubClasses->union(new ClassNameIndex([$cl...
[ "protected", "function", "addBuildMethodsAndAdvicesCodeToClass", "(", "string", "$", "className", ",", "ClassNameIndex", "$", "treatedSubClasses", ")", ":", "ClassNameIndex", "{", "if", "(", "$", "treatedSubClasses", "->", "hasClassName", "(", "$", "className", ")", ...
Adds code to build the methods and advices array in case the parent class has some. @param string $className @param ClassNameIndex $treatedSubClasses @return ClassNameIndex
[ "Adds", "code", "to", "build", "the", "methods", "and", "advices", "array", "in", "case", "the", "parent", "class", "has", "some", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L519-L540
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.getMethodsFromTargetClass
protected function getMethodsFromTargetClass(string $targetClassName): array { $methods = []; $class = new \ReflectionClass($targetClassName); foreach (['__construct', '__clone'] as $builtInMethodName) { if (!$class->hasMethod($builtInMethodName)) { $methods[] = ...
php
protected function getMethodsFromTargetClass(string $targetClassName): array { $methods = []; $class = new \ReflectionClass($targetClassName); foreach (['__construct', '__clone'] as $builtInMethodName) { if (!$class->hasMethod($builtInMethodName)) { $methods[] = ...
[ "protected", "function", "getMethodsFromTargetClass", "(", "string", "$", "targetClassName", ")", ":", "array", "{", "$", "methods", "=", "[", "]", ";", "$", "class", "=", "new", "\\", "ReflectionClass", "(", "$", "targetClassName", ")", ";", "foreach", "(",...
Returns the methods of the target class. @param string $targetClassName Name of the target class @return array Method information with declaring class and method name pairs
[ "Returns", "the", "methods", "of", "the", "target", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L548-L564
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.buildMethodsAndAdvicesArrayCode
protected function buildMethodsAndAdvicesArrayCode(array $methodsAndGroupedAdvices): string { if (count($methodsAndGroupedAdvices) < 1) { return ''; } $methodsAndAdvicesArrayCode = "\n \$objectManager = \\Neos\\Flow\\Core\\Bootstrap::\$staticObjectManager;\n"; $me...
php
protected function buildMethodsAndAdvicesArrayCode(array $methodsAndGroupedAdvices): string { if (count($methodsAndGroupedAdvices) < 1) { return ''; } $methodsAndAdvicesArrayCode = "\n \$objectManager = \\Neos\\Flow\\Core\\Bootstrap::\$staticObjectManager;\n"; $me...
[ "protected", "function", "buildMethodsAndAdvicesArrayCode", "(", "array", "$", "methodsAndGroupedAdvices", ")", ":", "string", "{", "if", "(", "count", "(", "$", "methodsAndGroupedAdvices", ")", "<", "1", ")", "{", "return", "''", ";", "}", "$", "methodsAndAdvic...
Creates code for an array of target methods and their advices. Example: $this->Flow_Aop_Proxy_targetMethodsAndGroupedAdvices = array( 'getSomeProperty' => array( \Neos\Flow\Aop\Advice\AroundAdvice::class => array( new \Neos\Flow\Aop\Advice\AroundAdvice(\Neos\Foo\SomeAspect::class, 'aroundAdvice', \Neos\Flow\Core\Boot...
[ "Creates", "code", "for", "an", "array", "of", "target", "methods", "and", "their", "advices", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L584-L606
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php
ProxyClassBuilder.buildMethodsInterceptorCode
protected function buildMethodsInterceptorCode(string $targetClassName, array $interceptedMethods): void { foreach ($interceptedMethods as $methodName => $methodMetaInformation) { if (count($methodMetaInformation['groupedAdvices']) === 0) { throw new Aop\Exception\VoidImplementat...
php
protected function buildMethodsInterceptorCode(string $targetClassName, array $interceptedMethods): void { foreach ($interceptedMethods as $methodName => $methodMetaInformation) { if (count($methodMetaInformation['groupedAdvices']) === 0) { throw new Aop\Exception\VoidImplementat...
[ "protected", "function", "buildMethodsInterceptorCode", "(", "string", "$", "targetClassName", ",", "array", "$", "interceptedMethods", ")", ":", "void", "{", "foreach", "(", "$", "interceptedMethods", "as", "$", "methodName", "=>", "$", "methodMetaInformation", ")"...
Traverses all intercepted methods and their advices and builds PHP code to intercept methods if necessary. The generated code is added directly to the proxy class by calling the respective methods of the Compiler API. @param string $targetClassName The target class the pointcut should match with @param array $interce...
[ "Traverses", "all", "intercepted", "methods", "and", "their", "advices", "and", "builds", "PHP", "code", "to", "intercept", "methods", "if", "necessary", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php#L620-L629