repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.getMigrationDescription
protected function getMigrationDescription(Version $version, DocCommentParser $parser) { if ($version->getMigration()->getDescription()) { return $version->getMigration()->getDescription(); } else { $reflectedClass = new \ReflectionClass($version->getMigration()); ...
php
protected function getMigrationDescription(Version $version, DocCommentParser $parser) { if ($version->getMigration()->getDescription()) { return $version->getMigration()->getDescription(); } else { $reflectedClass = new \ReflectionClass($version->getMigration()); ...
[ "protected", "function", "getMigrationDescription", "(", "Version", "$", "version", ",", "DocCommentParser", "$", "parser", ")", "{", "if", "(", "$", "version", "->", "getMigration", "(", ")", "->", "getDescription", "(", ")", ")", "{", "return", "$", "versi...
Returns the description of a migration. If available it is fetched from the getDescription() method, if that returns an empty value the class docblock is used instead. @param Version $version @param DocCommentParser $parser @return string @throws \ReflectionException
[ "Returns", "the", "description", "of", "a", "migration", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L399-L408
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.executeMigrations
public function executeMigrations($version = null, $outputPathAndFilename = null, $dryRun = false, $quiet = false) { $configuration = $this->getMigrationConfiguration(); $migration = new Migration($configuration); if ($outputPathAndFilename !== null) { $migration->writeSqlFile($...
php
public function executeMigrations($version = null, $outputPathAndFilename = null, $dryRun = false, $quiet = false) { $configuration = $this->getMigrationConfiguration(); $migration = new Migration($configuration); if ($outputPathAndFilename !== null) { $migration->writeSqlFile($...
[ "public", "function", "executeMigrations", "(", "$", "version", "=", "null", ",", "$", "outputPathAndFilename", "=", "null", ",", "$", "dryRun", "=", "false", ",", "$", "quiet", "=", "false", ")", "{", "$", "configuration", "=", "$", "this", "->", "getMi...
Execute all new migrations, up to $version if given. If $outputPathAndFilename is given, the SQL statements will be written to the given file instead of executed. @param string $version The version to migrate to @param string $outputPathAndFilename A file to write SQL to, instead of executing it @param boolean $dryRu...
[ "Execute", "all", "new", "migrations", "up", "to", "$version", "if", "given", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L423-L446
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.executeMigration
public function executeMigration($version, $direction = 'up', $outputPathAndFilename = null, $dryRun = false) { $version = $this->getMigrationConfiguration()->getVersion($version); if ($outputPathAndFilename !== null) { $version->writeSqlFile($outputPathAndFilename, $direction); ...
php
public function executeMigration($version, $direction = 'up', $outputPathAndFilename = null, $dryRun = false) { $version = $this->getMigrationConfiguration()->getVersion($version); if ($outputPathAndFilename !== null) { $version->writeSqlFile($outputPathAndFilename, $direction); ...
[ "public", "function", "executeMigration", "(", "$", "version", ",", "$", "direction", "=", "'up'", ",", "$", "outputPathAndFilename", "=", "null", ",", "$", "dryRun", "=", "false", ")", "{", "$", "version", "=", "$", "this", "->", "getMigrationConfiguration"...
Execute a single migration in up or down direction. If $path is given, the SQL statements will be written to the file in $path instead of executed. @param string $version The version to migrate to @param string $direction @param string $outputPathAndFilename A file to write SQL to, instead of executing it @param boole...
[ "Execute", "a", "single", "migration", "in", "up", "or", "down", "direction", ".", "If", "$path", "is", "given", "the", "SQL", "statements", "will", "be", "written", "to", "the", "file", "in", "$path", "instead", "of", "executed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L460-L470
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.markAsMigrated
public function markAsMigrated($version, $markAsMigrated) { $configuration = $this->getMigrationConfiguration(); if ($version === 'all') { foreach ($configuration->getMigrations() as $version) { if ($markAsMigrated === true && $configuration->hasVersionMigrated($version)...
php
public function markAsMigrated($version, $markAsMigrated) { $configuration = $this->getMigrationConfiguration(); if ($version === 'all') { foreach ($configuration->getMigrations() as $version) { if ($markAsMigrated === true && $configuration->hasVersionMigrated($version)...
[ "public", "function", "markAsMigrated", "(", "$", "version", ",", "$", "markAsMigrated", ")", "{", "$", "configuration", "=", "$", "this", "->", "getMigrationConfiguration", "(", ")", ";", "if", "(", "$", "version", "===", "'all'", ")", "{", "foreach", "("...
Add a migration version to the migrations table or remove it. This does not execute any migration code but simply records a version as migrated or not. @param string $version The version to add or remove @param boolean $markAsMigrated @return void @throws MigrationException @throws \LogicException @throws DBALExcepti...
[ "Add", "a", "migration", "version", "to", "the", "migrations", "table", "or", "remove", "it", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L485-L516
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.generateMigration
public function generateMigration($diffAgainstCurrent = true, $filterExpression = null) { $configuration = $this->getMigrationConfiguration(); $up = null; $down = null; if ($diffAgainstCurrent === true) { /** @var \Doctrine\DBAL\Connection $connection */ $con...
php
public function generateMigration($diffAgainstCurrent = true, $filterExpression = null) { $configuration = $this->getMigrationConfiguration(); $up = null; $down = null; if ($diffAgainstCurrent === true) { /** @var \Doctrine\DBAL\Connection $connection */ $con...
[ "public", "function", "generateMigration", "(", "$", "diffAgainstCurrent", "=", "true", ",", "$", "filterExpression", "=", "null", ")", "{", "$", "configuration", "=", "$", "this", "->", "getMigrationConfiguration", "(", ")", ";", "$", "up", "=", "null", ";"...
Generates a new migration file and returns the path to it. If $diffAgainstCurrent is true, it generates a migration file with the diff between current DB structure and the found mapping metadata. Only include tables/sequences matching the $filterExpression regexp when diffing models and existing schema. Otherwise an...
[ "Generates", "a", "new", "migration", "file", "and", "returns", "the", "path", "to", "it", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L536-L587
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.resolveTableName
private function resolveTableName(string $name): string { $pos = strpos($name, '.'); return false === $pos ? $name : substr($name, $pos + 1); }
php
private function resolveTableName(string $name): string { $pos = strpos($name, '.'); return false === $pos ? $name : substr($name, $pos + 1); }
[ "private", "function", "resolveTableName", "(", "string", "$", "name", ")", ":", "string", "{", "$", "pos", "=", "strpos", "(", "$", "name", ",", "'.'", ")", ";", "return", "false", "===", "$", "pos", "?", "$", "name", ":", "substr", "(", "$", "nam...
Resolve a table name from its fully qualified name. The `$name` argument comes from Doctrine\DBAL\Schema\Table#getName which can sometimes return a namespaced name with the form `{namespace}.{tableName}`. This extracts the table name from that. @param string $name @return string
[ "Resolve", "a", "table", "name", "from", "its", "fully", "qualified", "name", ".", "The", "$name", "argument", "comes", "from", "Doctrine", "\\", "DBAL", "\\", "Schema", "\\", "Table#getName", "which", "can", "sometimes", "return", "a", "namespaced", "name", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L598-L603
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.buildCodeFromSql
protected function buildCodeFromSql(Configuration $configuration, array $sql): string { $currentPlatform = $configuration->getConnection()->getDatabasePlatform()->getName(); $code = []; foreach ($sql as $query) { if (stripos($query, $configuration->getMigrationsTableName()) !== f...
php
protected function buildCodeFromSql(Configuration $configuration, array $sql): string { $currentPlatform = $configuration->getConnection()->getDatabasePlatform()->getName(); $code = []; foreach ($sql as $query) { if (stripos($query, $configuration->getMigrationsTableName()) !== f...
[ "protected", "function", "buildCodeFromSql", "(", "Configuration", "$", "configuration", ",", "array", "$", "sql", ")", ":", "string", "{", "$", "currentPlatform", "=", "$", "configuration", "->", "getConnection", "(", ")", "->", "getDatabasePlatform", "(", ")",...
Returns PHP code for a migration file that "executes" the given array of SQL statements. @param Configuration $configuration @param array $sql @return string @throws DBALException
[ "Returns", "PHP", "code", "for", "a", "migration", "file", "that", "executes", "the", "given", "array", "of", "SQL", "statements", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L684-L708
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/Service.php
Service.getForeignKeyHandlingSql
public static function getForeignKeyHandlingSql(Schema $schema, AbstractPlatform $platform, $tableNames, $search, $replace) { $foreignKeyHandlingSql = ['drop' => [], 'add' => []]; $tables = $schema->getTables(); foreach ($tables as $table) { $foreignKeys = $table->getForeignKeys(...
php
public static function getForeignKeyHandlingSql(Schema $schema, AbstractPlatform $platform, $tableNames, $search, $replace) { $foreignKeyHandlingSql = ['drop' => [], 'add' => []]; $tables = $schema->getTables(); foreach ($tables as $table) { $foreignKeys = $table->getForeignKeys(...
[ "public", "static", "function", "getForeignKeyHandlingSql", "(", "Schema", "$", "schema", ",", "AbstractPlatform", "$", "platform", ",", "$", "tableNames", ",", "$", "search", ",", "$", "replace", ")", "{", "$", "foreignKeyHandlingSql", "=", "[", "'drop'", "=>...
This serves a rather strange use case: renaming columns used in FK constraints. For a column that is used in a FK constraint to be renamed, the FK constraint has to be dropped first, then the column can be renamed and last the FK constraint needs to be added back (using the new name, of course). This method helps wit...
[ "This", "serves", "a", "rather", "strange", "use", "case", ":", "renaming", "columns", "used", "in", "FK", "constraints", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L757-L808
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
FilterOperation.evaluate
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (!isset($arguments[0]) || empty($arguments[0])) { return; } if (!is_string($arguments[0])) { throw new FizzleException('filter operation expects string argument', 1332489625); } $fil...
php
public function evaluate(FlowQuery $flowQuery, array $arguments) { if (!isset($arguments[0]) || empty($arguments[0])) { return; } if (!is_string($arguments[0])) { throw new FizzleException('filter operation expects string argument', 1332489625); } $fil...
[ "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 filter expression to use (in index 0) @return void @throws FizzleException
[ "{", "@inheritdoc", "}" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php#L84-L104
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
FilterOperation.matchesFilterGroup
protected function matchesFilterGroup($element, array $parsedFilter) { foreach ($parsedFilter['Filters'] as $filter) { if ($this->matchesFilter($element, $filter)) { return true; } } return false; }
php
protected function matchesFilterGroup($element, array $parsedFilter) { foreach ($parsedFilter['Filters'] as $filter) { if ($this->matchesFilter($element, $filter)) { return true; } } return false; }
[ "protected", "function", "matchesFilterGroup", "(", "$", "element", ",", "array", "$", "parsedFilter", ")", "{", "foreach", "(", "$", "parsedFilter", "[", "'Filters'", "]", "as", "$", "filter", ")", "{", "if", "(", "$", "this", "->", "matchesFilter", "(", ...
Evaluate Filter Group. An element matches the filter group if it matches at least one part of the filter group. Filter Group is something like "[foo], [bar]" @param object $element @param array $parsedFilter @return boolean true if $element matches filter group, false otherwise
[ "Evaluate", "Filter", "Group", ".", "An", "element", "matches", "the", "filter", "group", "if", "it", "matches", "at", "least", "one", "part", "of", "the", "filter", "group", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php#L116-L125
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
FilterOperation.matchesFilter
protected function matchesFilter($element, $filter) { if (isset($filter['IdentifierFilter']) && !$this->matchesIdentifierFilter($element, $filter['IdentifierFilter'])) { return false; } if (isset($filter['PropertyNameFilter']) && !$this->matchesPropertyNameFilter($element, $filte...
php
protected function matchesFilter($element, $filter) { if (isset($filter['IdentifierFilter']) && !$this->matchesIdentifierFilter($element, $filter['IdentifierFilter'])) { return false; } if (isset($filter['PropertyNameFilter']) && !$this->matchesPropertyNameFilter($element, $filte...
[ "protected", "function", "matchesFilter", "(", "$", "element", ",", "$", "filter", ")", "{", "if", "(", "isset", "(", "$", "filter", "[", "'IdentifierFilter'", "]", ")", "&&", "!", "$", "this", "->", "matchesIdentifierFilter", "(", "$", "element", ",", "...
Match a single filter, i.e. [foo]. It matches only if all filter parts match. @param object $element @param string $filter @return boolean true if $element matches filter, false otherwise
[ "Match", "a", "single", "filter", "i", ".", "e", ".", "[", "foo", "]", ".", "It", "matches", "only", "if", "all", "filter", "parts", "match", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php#L134-L151
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
FilterOperation.matchesAttributeFilter
protected function matchesAttributeFilter($element, array $attributeFilter) { if ($attributeFilter['PropertyPath'] !== null) { $value = $this->getPropertyPath($element, $attributeFilter['PropertyPath']); } else { $value = $element; } $operand = null; i...
php
protected function matchesAttributeFilter($element, array $attributeFilter) { if ($attributeFilter['PropertyPath'] !== null) { $value = $this->getPropertyPath($element, $attributeFilter['PropertyPath']); } else { $value = $element; } $operand = null; i...
[ "protected", "function", "matchesAttributeFilter", "(", "$", "element", ",", "array", "$", "attributeFilter", ")", "{", "if", "(", "$", "attributeFilter", "[", "'PropertyPath'", "]", "!==", "null", ")", "{", "$", "value", "=", "$", "this", "->", "getProperty...
Match a single attribute filter @param mixed $element @param array $attributeFilter @return boolean
[ "Match", "a", "single", "attribute", "filter" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php#L173-L186
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
FilterOperation.evaluateOperator
protected function evaluateOperator($value, $operator, $operand) { switch ($operator) { case '=': return $value === $operand; case '!=': return $value !== $operand; case '<': return $value < $operand; case '<=': ...
php
protected function evaluateOperator($value, $operator, $operand) { switch ($operator) { case '=': return $value === $operand; case '!=': return $value !== $operand; case '<': return $value < $operand; case '<=': ...
[ "protected", "function", "evaluateOperator", "(", "$", "value", ",", "$", "operator", ",", "$", "operand", ")", "{", "switch", "(", "$", "operator", ")", "{", "case", "'='", ":", "return", "$", "value", "===", "$", "operand", ";", "case", "'!='", ":", ...
Evaluate an operator @param mixed $value @param string $operator @param mixed $operand @return boolean
[ "Evaluate", "an", "operator" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php#L221-L280
neos/flow-development-collection
Neos.Flow/Classes/Security/RequestPatternResolver.php
RequestPatternResolver.resolveRequestPatternClass
public function resolveRequestPatternClass($name) { $resolvedClassName = $this->objectManager->getClassNameByObjectName($name); if ($resolvedClassName !== false) { return $resolvedClassName; } $resolvedClassName = $this->objectManager->getClassNameByObjectName('Neos\Flow...
php
public function resolveRequestPatternClass($name) { $resolvedClassName = $this->objectManager->getClassNameByObjectName($name); if ($resolvedClassName !== false) { return $resolvedClassName; } $resolvedClassName = $this->objectManager->getClassNameByObjectName('Neos\Flow...
[ "public", "function", "resolveRequestPatternClass", "(", "$", "name", ")", "{", "$", "resolvedClassName", "=", "$", "this", "->", "objectManager", "->", "getClassNameByObjectName", "(", "$", "name", ")", ";", "if", "(", "$", "resolvedClassName", "!==", "false", ...
Resolves the class name of a request pattern. If a valid request pattern class name is given, it is just returned. @param string $name The (short) name of the pattern @return string The class name of the request pattern, NULL if no class was found. @throws Exception\NoRequestPatternFoundException
[ "Resolves", "the", "class", "name", "of", "a", "request", "pattern", ".", "If", "a", "valid", "request", "pattern", "class", "name", "is", "given", "it", "is", "just", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/RequestPatternResolver.php#L46-L59
neos/flow-development-collection
Neos.Flow/Classes/Command/ConfigurationCommandController.php
ConfigurationCommandController.showCommand
public function showCommand(string $type = 'Settings', string $path = null) { $availableConfigurationTypes = $this->configurationManager->getAvailableConfigurationTypes(); if (in_array($type, $availableConfigurationTypes)) { $configuration = $this->configurationManager->getConfiguration(...
php
public function showCommand(string $type = 'Settings', string $path = null) { $availableConfigurationTypes = $this->configurationManager->getAvailableConfigurationTypes(); if (in_array($type, $availableConfigurationTypes)) { $configuration = $this->configurationManager->getConfiguration(...
[ "public", "function", "showCommand", "(", "string", "$", "type", "=", "'Settings'", ",", "string", "$", "path", "=", "null", ")", "{", "$", "availableConfigurationTypes", "=", "$", "this", "->", "configurationManager", "->", "getAvailableConfigurationTypes", "(", ...
Show the active configuration settings The command shows the configuration of the current context as it is used by Flow itself. You can specify the configuration type and path if you want to show parts of the configuration. Display all settings: ./flow configuration:show Display Flow persistence settings: ./flow con...
[ "Show", "the", "active", "configuration", "settings" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ConfigurationCommandController.php#L69-L96
neos/flow-development-collection
Neos.Flow/Classes/Command/ConfigurationCommandController.php
ConfigurationCommandController.listTypesCommand
public function listTypesCommand() { $this->outputLine('The following configuration types are registered:'); $this->outputLine(); foreach ($this->configurationManager->getAvailableConfigurationTypes() as $type) { $this->outputFormatted('- %s', [$type]); } }
php
public function listTypesCommand() { $this->outputLine('The following configuration types are registered:'); $this->outputLine(); foreach ($this->configurationManager->getAvailableConfigurationTypes() as $type) { $this->outputFormatted('- %s', [$type]); } }
[ "public", "function", "listTypesCommand", "(", ")", "{", "$", "this", "->", "outputLine", "(", "'The following configuration types are registered:'", ")", ";", "$", "this", "->", "outputLine", "(", ")", ";", "foreach", "(", "$", "this", "->", "configurationManager...
List registered configuration types @return void
[ "List", "registered", "configuration", "types" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ConfigurationCommandController.php#L103-L111
neos/flow-development-collection
Neos.Flow/Classes/Command/ConfigurationCommandController.php
ConfigurationCommandController.validateCommand
public function validateCommand(string $type = null, string $path = null, bool $verbose = false) { if ($type === null) { $this->outputLine('Validating <b>all</b> configuration'); } else { $this->outputLine('Validating <b>' . $type . '</b> configuration' . ($path !== null ? ' ...
php
public function validateCommand(string $type = null, string $path = null, bool $verbose = false) { if ($type === null) { $this->outputLine('Validating <b>all</b> configuration'); } else { $this->outputLine('Validating <b>' . $type . '</b> configuration' . ($path !== null ? ' ...
[ "public", "function", "validateCommand", "(", "string", "$", "type", "=", "null", ",", "string", "$", "path", "=", "null", ",", "bool", "$", "verbose", "=", "false", ")", "{", "if", "(", "$", "type", "===", "null", ")", "{", "$", "this", "->", "out...
Validate the given configuration <b>Validate all configuration</b> ./flow configuration:validate <b>Validate configuration at a certain subtype</b> ./flow configuration:validate --type Settings --path Neos.Flow.persistence You can retrieve the available configuration types with: ./flow configuration:listtypes @para...
[ "Validate", "the", "given", "configuration" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ConfigurationCommandController.php#L130-L181
neos/flow-development-collection
Neos.Flow/Classes/Command/ConfigurationCommandController.php
ConfigurationCommandController.generateSchemaCommand
public function generateSchemaCommand(string $type = null, string $path = null, string $yaml = null) { $data = null; if ($yaml !== null && is_file($yaml) && is_readable($yaml)) { $data = Yaml::parseFile($yaml); } elseif ($type !== null) { $data = $this->configurationM...
php
public function generateSchemaCommand(string $type = null, string $path = null, string $yaml = null) { $data = null; if ($yaml !== null && is_file($yaml) && is_readable($yaml)) { $data = Yaml::parseFile($yaml); } elseif ($type !== null) { $data = $this->configurationM...
[ "public", "function", "generateSchemaCommand", "(", "string", "$", "type", "=", "null", ",", "string", "$", "path", "=", "null", ",", "string", "$", "yaml", "=", "null", ")", "{", "$", "data", "=", "null", ";", "if", "(", "$", "yaml", "!==", "null", ...
Generate a schema for the given configuration or YAML file. ./flow configuration:generateschema --type Settings --path Neos.Flow.persistence The schema will be output to standard output. @param string $type Configuration type to create a schema for @param string $path path to the subconfiguration separated by "." li...
[ "Generate", "a", "schema", "for", "the", "given", "configuration", "or", "YAML", "file", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/ConfigurationCommandController.php#L195-L213
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.initializeObject
public function initializeObject() { foreach ($this->options as $key => $value) { $isOptionSet = $this->setOption($key, $value); if (!$isOptionSet) { throw new TargetException(sprintf('An unknown option "%s" was specified in the configuration of a resource FileSystemT...
php
public function initializeObject() { foreach ($this->options as $key => $value) { $isOptionSet = $this->setOption($key, $value); if (!$isOptionSet) { throw new TargetException(sprintf('An unknown option "%s" was specified in the configuration of a resource FileSystemT...
[ "public", "function", "initializeObject", "(", ")", "{", "foreach", "(", "$", "this", "->", "options", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "isOptionSet", "=", "$", "this", "->", "setOption", "(", "$", "key", ",", "$", "value", ")", ...
Initializes this resource publishing target @return void @throws TargetException
[ "Initializes", "this", "resource", "publishing", "target" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L147-L165
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.checkAndRemovePackageSymlinks
protected function checkAndRemovePackageSymlinks(StorageInterface $storage) { if (!$storage instanceof PackageStorage) { return; } foreach ($storage->getPublicResourcePaths() as $packageKey => $path) { $targetPathAndFilename = $this->path . $packageKey; if...
php
protected function checkAndRemovePackageSymlinks(StorageInterface $storage) { if (!$storage instanceof PackageStorage) { return; } foreach ($storage->getPublicResourcePaths() as $packageKey => $path) { $targetPathAndFilename = $this->path . $packageKey; if...
[ "protected", "function", "checkAndRemovePackageSymlinks", "(", "StorageInterface", "$", "storage", ")", "{", "if", "(", "!", "$", "storage", "instanceof", "PackageStorage", ")", "{", "return", ";", "}", "foreach", "(", "$", "storage", "->", "getPublicResourcePaths...
Checks if the PackageStorage has been previously initialized with symlinks and clears them. Otherwise the original sources would be overwritten. @param StorageInterface $storage @return void
[ "Checks", "if", "the", "PackageStorage", "has", "been", "previously", "initialized", "with", "symlinks", "and", "clears", "them", ".", "Otherwise", "the", "original", "sources", "would", "be", "overwritten", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L184-L195
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.publishCollection
public function publishCollection(CollectionInterface $collection, callable $callback = null) { $storage = $collection->getStorage(); $this->checkAndRemovePackageSymlinks($storage); foreach ($collection->getObjects($callback) as $object) { /** @var StorageObject $object */ ...
php
public function publishCollection(CollectionInterface $collection, callable $callback = null) { $storage = $collection->getStorage(); $this->checkAndRemovePackageSymlinks($storage); foreach ($collection->getObjects($callback) as $object) { /** @var StorageObject $object */ ...
[ "public", "function", "publishCollection", "(", "CollectionInterface", "$", "collection", ",", "callable", "$", "callback", "=", "null", ")", "{", "$", "storage", "=", "$", "collection", "->", "getStorage", "(", ")", ";", "$", "this", "->", "checkAndRemovePack...
Publishes the whole collection to this target @param CollectionInterface $collection The collection to publish @param callable $callback Function called after each resource publishing @return void
[ "Publishes", "the", "whole", "collection", "to", "this", "target" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L204-L218
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.publishResource
public function publishResource(PersistentResource $resource, CollectionInterface $collection) { $sourceStream = $resource->getStream(); if ($sourceStream === false) { $this->handleMissingData($resource, $collection); return; } $this->publishFile($sourceStream...
php
public function publishResource(PersistentResource $resource, CollectionInterface $collection) { $sourceStream = $resource->getStream(); if ($sourceStream === false) { $this->handleMissingData($resource, $collection); return; } $this->publishFile($sourceStream...
[ "public", "function", "publishResource", "(", "PersistentResource", "$", "resource", ",", "CollectionInterface", "$", "collection", ")", "{", "$", "sourceStream", "=", "$", "resource", "->", "getStream", "(", ")", ";", "if", "(", "$", "sourceStream", "===", "f...
Publishes the given persistent resource from the given storage @param PersistentResource $resource The resource to publish @param CollectionInterface $collection The collection the given resource belongs to @return void
[ "Publishes", "the", "given", "persistent", "resource", "from", "the", "given", "storage" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L227-L236
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.handleMissingData
protected function handleMissingData(ResourceMetaDataInterface $resource, CollectionInterface $collection) { $message = sprintf('Could not publish resource %s with SHA1 hash %s of collection %s because there seems to be no corresponding data in the storage.', $resource->getFilename(), $resource->getSha1(), ...
php
protected function handleMissingData(ResourceMetaDataInterface $resource, CollectionInterface $collection) { $message = sprintf('Could not publish resource %s with SHA1 hash %s of collection %s because there seems to be no corresponding data in the storage.', $resource->getFilename(), $resource->getSha1(), ...
[ "protected", "function", "handleMissingData", "(", "ResourceMetaDataInterface", "$", "resource", ",", "CollectionInterface", "$", "collection", ")", "{", "$", "message", "=", "sprintf", "(", "'Could not publish resource %s with SHA1 hash %s of collection %s because there seems to...
Handle missing data notification @param CollectionInterface $collection @param ResourceMetaDataInterface $resource
[ "Handle", "missing", "data", "notification" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L244-L248
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.unpublishResource
public function unpublishResource(PersistentResource $resource) { $resources = $this->resourceRepository->findSimilarResources($resource); if (count($resources) > 1) { $message = sprintf('Did not unpublish resource %s with SHA1 hash %s because it is used by other Resource objects.', $res...
php
public function unpublishResource(PersistentResource $resource) { $resources = $this->resourceRepository->findSimilarResources($resource); if (count($resources) > 1) { $message = sprintf('Did not unpublish resource %s with SHA1 hash %s because it is used by other Resource objects.', $res...
[ "public", "function", "unpublishResource", "(", "PersistentResource", "$", "resource", ")", "{", "$", "resources", "=", "$", "this", "->", "resourceRepository", "->", "findSimilarResources", "(", "$", "resource", ")", ";", "if", "(", "count", "(", "$", "resour...
Unpublishes the given persistent resource @param PersistentResource $resource The resource to unpublish @return void
[ "Unpublishes", "the", "given", "persistent", "resource" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L256-L265
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.getPublicPersistentResourceUri
public function getPublicPersistentResourceUri(PersistentResource $resource) { return $this->getResourcesBaseUri() . $this->encodeRelativePathAndFilenameForUri($this->getRelativePublicationPathAndFilename($resource)); }
php
public function getPublicPersistentResourceUri(PersistentResource $resource) { return $this->getResourcesBaseUri() . $this->encodeRelativePathAndFilenameForUri($this->getRelativePublicationPathAndFilename($resource)); }
[ "public", "function", "getPublicPersistentResourceUri", "(", "PersistentResource", "$", "resource", ")", "{", "return", "$", "this", "->", "getResourcesBaseUri", "(", ")", ".", "$", "this", "->", "encodeRelativePathAndFilenameForUri", "(", "$", "this", "->", "getRel...
Returns the web accessible URI pointing to the specified persistent resource @param PersistentResource $resource PersistentResource object @return string The URI @throws Exception
[ "Returns", "the", "web", "accessible", "URI", "pointing", "to", "the", "specified", "persistent", "resource" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L285-L288
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.publishFile
protected function publishFile($sourceStream, $relativeTargetPathAndFilename) { $pathInfo = UnicodeFunctions::pathinfo($relativeTargetPathAndFilename); if (isset($pathInfo['extension']) && array_key_exists(strtolower($pathInfo['extension']), $this->extensionBlacklist) && $this->extensionBlacklist[st...
php
protected function publishFile($sourceStream, $relativeTargetPathAndFilename) { $pathInfo = UnicodeFunctions::pathinfo($relativeTargetPathAndFilename); if (isset($pathInfo['extension']) && array_key_exists(strtolower($pathInfo['extension']), $this->extensionBlacklist) && $this->extensionBlacklist[st...
[ "protected", "function", "publishFile", "(", "$", "sourceStream", ",", "$", "relativeTargetPathAndFilename", ")", "{", "$", "pathInfo", "=", "UnicodeFunctions", "::", "pathinfo", "(", "$", "relativeTargetPathAndFilename", ")", ";", "if", "(", "isset", "(", "$", ...
Publishes the given source stream to this target, with the given relative path. @param resource $sourceStream Stream of the source to publish @param string $relativeTargetPathAndFilename relative path and filename in the target directory @return void @throws TargetException
[ "Publishes", "the", "given", "source", "stream", "to", "this", "target", "with", "the", "given", "relative", "path", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L309-L350
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.getResourcesBaseUri
protected function getResourcesBaseUri() { if ($this->absoluteBaseUri === null) { $this->absoluteBaseUri = $this->detectResourcesBaseUri(); } return $this->absoluteBaseUri; }
php
protected function getResourcesBaseUri() { if ($this->absoluteBaseUri === null) { $this->absoluteBaseUri = $this->detectResourcesBaseUri(); } return $this->absoluteBaseUri; }
[ "protected", "function", "getResourcesBaseUri", "(", ")", "{", "if", "(", "$", "this", "->", "absoluteBaseUri", "===", "null", ")", "{", "$", "this", "->", "absoluteBaseUri", "=", "$", "this", "->", "detectResourcesBaseUri", "(", ")", ";", "}", "return", "...
Returns the resolved absolute base URI for resources of this target. @return string The absolute base URI for resources in this target
[ "Returns", "the", "resolved", "absolute", "base", "URI", "for", "resources", "of", "this", "target", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L381-L388
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.detectResourcesBaseUri
protected function detectResourcesBaseUri() { if ($this->baseUri !== '' && ($this->baseUri[0] === '/' || strpos($this->baseUri, '://') !== false)) { return $this->baseUri; } $requestHandler = $this->bootstrap->getActiveRequestHandler(); if ($requestHandler instanceof Htt...
php
protected function detectResourcesBaseUri() { if ($this->baseUri !== '' && ($this->baseUri[0] === '/' || strpos($this->baseUri, '://') !== false)) { return $this->baseUri; } $requestHandler = $this->bootstrap->getActiveRequestHandler(); if ($requestHandler instanceof Htt...
[ "protected", "function", "detectResourcesBaseUri", "(", ")", "{", "if", "(", "$", "this", "->", "baseUri", "!==", "''", "&&", "(", "$", "this", "->", "baseUri", "[", "0", "]", "===", "'/'", "||", "strpos", "(", "$", "this", "->", "baseUri", ",", "':/...
Detects and returns the website's absolute base URI @return string The resolved resource base URI, @see getResourcesBaseUri() @throws TargetException if the baseUri can't be resolved
[ "Detects", "and", "returns", "the", "website", "s", "absolute", "base", "URI" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L396-L411
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.getRelativePublicationPathAndFilename
protected function getRelativePublicationPathAndFilename(ResourceMetaDataInterface $object) { if ($object->getRelativePublicationPath() !== '') { $pathAndFilename = $object->getRelativePublicationPath() . $object->getFilename(); } else { if ($this->subdivideHashPathSegment) {...
php
protected function getRelativePublicationPathAndFilename(ResourceMetaDataInterface $object) { if ($object->getRelativePublicationPath() !== '') { $pathAndFilename = $object->getRelativePublicationPath() . $object->getFilename(); } else { if ($this->subdivideHashPathSegment) {...
[ "protected", "function", "getRelativePublicationPathAndFilename", "(", "ResourceMetaDataInterface", "$", "object", ")", "{", "if", "(", "$", "object", "->", "getRelativePublicationPath", "(", ")", "!==", "''", ")", "{", "$", "pathAndFilename", "=", "$", "object", ...
Determines and returns the relative path and filename for the given Storage Object or PersistentResource. If the given object represents a persistent resource, its own relative publication path will be empty. If the given object represents a static resources, it will contain a relative path. No matter which kind of re...
[ "Determines", "and", "returns", "the", "relative", "path", "and", "filename", "for", "the", "given", "Storage", "Object", "or", "PersistentResource", ".", "If", "the", "given", "object", "represents", "a", "persistent", "resource", "its", "own", "relative", "pub...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L424-L437
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php
FileSystemTarget.setOption
protected function setOption($key, $value) { switch ($key) { case 'baseUri': case 'path': case 'extensionBlacklist': $this->$key = $value; break; case 'subdivideHashPathSegment': $this->subdivideHashPathSegment =...
php
protected function setOption($key, $value) { switch ($key) { case 'baseUri': case 'path': case 'extensionBlacklist': $this->$key = $value; break; case 'subdivideHashPathSegment': $this->subdivideHashPathSegment =...
[ "protected", "function", "setOption", "(", "$", "key", ",", "$", "value", ")", "{", "switch", "(", "$", "key", ")", "{", "case", "'baseUri'", ":", "case", "'path'", ":", "case", "'extensionBlacklist'", ":", "$", "this", "->", "$", "key", "=", "$", "v...
Set an option value and return if it was set. @param string $key @param mixed $value @return boolean
[ "Set", "an", "option", "value", "and", "return", "if", "it", "was", "set", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemTarget.php#L446-L462
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Format/CurrencyViewHelper.php
CurrencyViewHelper.initializeArguments
public function initializeArguments() { $this->registerArgument('currencySign', 'string', '(optional) The currency sign, eg $ or €.', false, ''); $this->registerArgument('decimalSeparator', 'string', '(optional) The separator for the decimal point.', false, ','); $this->registerArgument('tho...
php
public function initializeArguments() { $this->registerArgument('currencySign', 'string', '(optional) The currency sign, eg $ or €.', false, ''); $this->registerArgument('decimalSeparator', 'string', '(optional) The separator for the decimal point.', false, ','); $this->registerArgument('tho...
[ "public", "function", "initializeArguments", "(", ")", "{", "$", "this", "->", "registerArgument", "(", "'currencySign'", ",", "'string'", ",", "'(optional) The currency sign, eg $ or €.', ", "f", "lse, ", "'", ");", "", "", "$", "this", "->", "registerArgument", ...
Initialize the arguments. @return void @api
[ "Initialize", "the", "arguments", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/CurrencyViewHelper.php#L108-L117
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/ObjectPathMappingRepository.php
ObjectPathMappingRepository.persistEntities
public function persistEntities() { foreach ($this->entityManager->getUnitOfWork()->getIdentityMap() as $className => $entities) { if ($className === $this->entityClassName) { $this->entityManager->flush($entities); return; } } }
php
public function persistEntities() { foreach ($this->entityManager->getUnitOfWork()->getIdentityMap() as $className => $entities) { if ($className === $this->entityClassName) { $this->entityManager->flush($entities); return; } } }
[ "public", "function", "persistEntities", "(", ")", "{", "foreach", "(", "$", "this", "->", "entityManager", "->", "getUnitOfWork", "(", ")", "->", "getIdentityMap", "(", ")", "as", "$", "className", "=>", "$", "entities", ")", "{", "if", "(", "$", "class...
Persists all entities managed by the repository and all cascading dependencies @return void
[ "Persists", "all", "entities", "managed", "by", "the", "repository", "and", "all", "cascading", "dependencies" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/ObjectPathMappingRepository.php#L95-L103
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Format/HtmlentitiesDecodeViewHelper.php
HtmlentitiesDecodeViewHelper.renderStatic
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $value = $arguments['value']; if ($value === null) { $value = $renderChildrenClosure(); } if (!is_string($value) && !(is_object($value) &&...
php
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $value = $arguments['value']; if ($value === null) { $value = $renderChildrenClosure(); } if (!is_string($value) && !(is_object($value) &&...
[ "public", "static", "function", "renderStatic", "(", "array", "$", "arguments", ",", "\\", "Closure", "$", "renderChildrenClosure", ",", "RenderingContextInterface", "$", "renderingContext", ")", "{", "$", "value", "=", "$", "arguments", "[", "'value'", "]", ";"...
Applies html_entity_decode() on the specified value. @param array $arguments @param \Closure $renderChildrenClosure @param RenderingContextInterface $renderingContext @return string
[ "Applies", "html_entity_decode", "()", "on", "the", "specified", "value", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/HtmlentitiesDecodeViewHelper.php#L87-L99
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/Pbkdf2HashingStrategy.php
Pbkdf2HashingStrategy.hashPassword
public function hashPassword($password, $staticSalt = null) { $dynamicSalt = UtilityAlgorithms::generateRandomBytes($this->dynamicSaltLength); $result = CryptographyAlgorithms::pbkdf2($password, $dynamicSalt . $staticSalt, $this->iterationCount, $this->derivedKeyLength, $this->algorithm); re...
php
public function hashPassword($password, $staticSalt = null) { $dynamicSalt = UtilityAlgorithms::generateRandomBytes($this->dynamicSaltLength); $result = CryptographyAlgorithms::pbkdf2($password, $dynamicSalt . $staticSalt, $this->iterationCount, $this->derivedKeyLength, $this->algorithm); re...
[ "public", "function", "hashPassword", "(", "$", "password", ",", "$", "staticSalt", "=", "null", ")", "{", "$", "dynamicSalt", "=", "UtilityAlgorithms", "::", "generateRandomBytes", "(", "$", "this", "->", "dynamicSaltLength", ")", ";", "$", "result", "=", "...
Hash a password for storage using PBKDF2 and the configured parameters. Will use a combination of a random dynamic salt and the given static salt. @param string $password Cleartext password that should be hashed @param string $staticSalt Static salt that will be appended to the random dynamic salt @return string A Bas...
[ "Hash", "a", "password", "for", "storage", "using", "PBKDF2", "and", "the", "configured", "parameters", ".", "Will", "use", "a", "combination", "of", "a", "random", "dynamic", "salt", "and", "the", "given", "static", "salt", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/Pbkdf2HashingStrategy.php#L71-L76
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/Pbkdf2HashingStrategy.php
Pbkdf2HashingStrategy.validatePassword
public function validatePassword($password, $hashedPasswordAndSalt, $staticSalt = null) { $parts = explode(',', $hashedPasswordAndSalt); if (count($parts) !== 2) { throw new \InvalidArgumentException('The derived key with salt must contain a salt, separated with a comma from the derived ...
php
public function validatePassword($password, $hashedPasswordAndSalt, $staticSalt = null) { $parts = explode(',', $hashedPasswordAndSalt); if (count($parts) !== 2) { throw new \InvalidArgumentException('The derived key with salt must contain a salt, separated with a comma from the derived ...
[ "public", "function", "validatePassword", "(", "$", "password", ",", "$", "hashedPasswordAndSalt", ",", "$", "staticSalt", "=", "null", ")", "{", "$", "parts", "=", "explode", "(", "','", ",", "$", "hashedPasswordAndSalt", ")", ";", "if", "(", "count", "("...
Validate a password against a derived key (hashed password) and salt using PBKDF2. Iteration count and algorithm have to match the parameters when generating the derived key. @param string $password The cleartext password @param string $hashedPasswordAndSalt The derived key and salt in Base64 encoding as returned by h...
[ "Validate", "a", "password", "against", "a", "derived", "key", "(", "hashed", "password", ")", "and", "salt", "using", "PBKDF2", ".", "Iteration", "count", "and", "algorithm", "have", "to", "match", "the", "parameters", "when", "generating", "the", "derived", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/Pbkdf2HashingStrategy.php#L88-L98
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php
Compiler.getProxyClass
public function getProxyClass($fullClassName) { if (interface_exists($fullClassName) || in_array(BaseTestCase::class, class_parents($fullClassName))) { return false; } if (class_exists($fullClassName) === false) { return false; } $classReflection = n...
php
public function getProxyClass($fullClassName) { if (interface_exists($fullClassName) || in_array(BaseTestCase::class, class_parents($fullClassName))) { return false; } if (class_exists($fullClassName) === false) { return false; } $classReflection = n...
[ "public", "function", "getProxyClass", "(", "$", "fullClassName", ")", "{", "if", "(", "interface_exists", "(", "$", "fullClassName", ")", "||", "in_array", "(", "BaseTestCase", "::", "class", ",", "class_parents", "(", "$", "fullClassName", ")", ")", ")", "...
Returns a proxy class object for the specified original class. If no such proxy class has been created yet by this renderer, this function will create one and register it for later use. If the class is not proxable, false will be returned @param string $fullClassName Name of the original class @return ProxyClass|boo...
[ "Returns", "a", "proxy", "class", "object", "for", "the", "specified", "original", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php#L124-L157
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php
Compiler.hasCacheEntryForClass
public function hasCacheEntryForClass($fullClassName) { if (isset($this->proxyClasses[$fullClassName])) { return false; } return $this->classesCache->has(str_replace('\\', '_', $fullClassName)); }
php
public function hasCacheEntryForClass($fullClassName) { if (isset($this->proxyClasses[$fullClassName])) { return false; } return $this->classesCache->has(str_replace('\\', '_', $fullClassName)); }
[ "public", "function", "hasCacheEntryForClass", "(", "$", "fullClassName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "proxyClasses", "[", "$", "fullClassName", "]", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "clas...
Checks if the specified class still exists in the code cache. If that is the case, it means that obviously the proxy class doesn't have to be rebuilt because otherwise the cache would have been flushed by the file monitor or some other mechanism. @param string $fullClassName Name of the original class @return boolean ...
[ "Checks", "if", "the", "specified", "class", "still", "exists", "in", "the", "code", "cache", ".", "If", "that", "is", "the", "case", "it", "means", "that", "obviously", "the", "proxy", "class", "doesn", "t", "have", "to", "be", "rebuilt", "because", "ot...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php#L167-L173
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php
Compiler.compile
public function compile() { $classCount = 0; foreach ($this->objectManager->getRegisteredClassNames() as $fullOriginalClassNames) { foreach ($fullOriginalClassNames as $fullOriginalClassName) { if (isset($this->proxyClasses[$fullOriginalClassName])) { ...
php
public function compile() { $classCount = 0; foreach ($this->objectManager->getRegisteredClassNames() as $fullOriginalClassNames) { foreach ($fullOriginalClassNames as $fullOriginalClassName) { if (isset($this->proxyClasses[$fullOriginalClassName])) { ...
[ "public", "function", "compile", "(", ")", "{", "$", "classCount", "=", "0", ";", "foreach", "(", "$", "this", "->", "objectManager", "->", "getRegisteredClassNames", "(", ")", "as", "$", "fullOriginalClassNames", ")", "{", "foreach", "(", "$", "fullOriginal...
Compiles the configured proxy classes and methods as static PHP code and stores it in the proxy class code cache. Also builds the static object container which acts as a registry for non-prototype objects during runtime. @return integer Number of classes which have been compiled
[ "Compiles", "the", "configured", "proxy", "classes", "and", "methods", "as", "static", "PHP", "code", "and", "stores", "it", "in", "the", "proxy", "class", "code", "cache", ".", "Also", "builds", "the", "static", "object", "container", "which", "acts", "as",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php#L181-L203
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php
Compiler.cacheOriginalClassFileAndProxyCode
protected function cacheOriginalClassFileAndProxyCode($className, $pathAndFilename, $proxyClassCode) { $classCode = file_get_contents($pathAndFilename); $classCode = $this->stripOpeningPhpTag($classCode); $classNameSuffix = self::ORIGINAL_CLASSNAME_SUFFIX; $classCode = preg_replace_...
php
protected function cacheOriginalClassFileAndProxyCode($className, $pathAndFilename, $proxyClassCode) { $classCode = file_get_contents($pathAndFilename); $classCode = $this->stripOpeningPhpTag($classCode); $classNameSuffix = self::ORIGINAL_CLASSNAME_SUFFIX; $classCode = preg_replace_...
[ "protected", "function", "cacheOriginalClassFileAndProxyCode", "(", "$", "className", ",", "$", "pathAndFilename", ",", "$", "proxyClassCode", ")", "{", "$", "classCode", "=", "file_get_contents", "(", "$", "pathAndFilename", ")", ";", "$", "classCode", "=", "$", ...
Reads the specified class file, appends ORIGINAL_CLASSNAME_SUFFIX to its class name and stores the result in the proxy classes cache. @param string $className Short class name of the class to copy @param string $pathAndFilename Full path and filename of the original class file @param string $proxyClassCode The code th...
[ "Reads", "the", "specified", "class", "file", "appends", "ORIGINAL_CLASSNAME_SUFFIX", "to", "its", "class", "name", "and", "stores", "the", "result", "in", "the", "proxy", "classes", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php#L231-L265
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php
Compiler.renderAnnotation
public static function renderAnnotation($annotation) { $annotationAsString = '@\\' . get_class($annotation); $optionNames = get_class_vars(get_class($annotation)); $optionsAsStrings = []; foreach ($optionNames as $optionName => $optionDefault) { $optionValue = $annotatio...
php
public static function renderAnnotation($annotation) { $annotationAsString = '@\\' . get_class($annotation); $optionNames = get_class_vars(get_class($annotation)); $optionsAsStrings = []; foreach ($optionNames as $optionName => $optionDefault) { $optionValue = $annotatio...
[ "public", "static", "function", "renderAnnotation", "(", "$", "annotation", ")", "{", "$", "annotationAsString", "=", "'@\\\\'", ".", "get_class", "(", "$", "annotation", ")", ";", "$", "optionNames", "=", "get_class_vars", "(", "get_class", "(", "$", "annotat...
Render the source (string) form of an Annotation instance. @param \Doctrine\Common\Annotations\Annotation $annotation @return string
[ "Render", "the", "source", "(", "string", ")", "form", "of", "an", "Annotation", "instance", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php#L285-L317
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php
Compiler.renderOptionArrayValueAsString
protected static function renderOptionArrayValueAsString(array $optionValue) { $values = []; foreach ($optionValue as $k => $v) { $value = ''; if (is_string($k)) { $value .= '"' . $k . '"='; } if (is_object($v)) { $value...
php
protected static function renderOptionArrayValueAsString(array $optionValue) { $values = []; foreach ($optionValue as $k => $v) { $value = ''; if (is_string($k)) { $value .= '"' . $k . '"='; } if (is_object($v)) { $value...
[ "protected", "static", "function", "renderOptionArrayValueAsString", "(", "array", "$", "optionValue", ")", "{", "$", "values", "=", "[", "]", ";", "foreach", "(", "$", "optionValue", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "value", "=", "''", "...
Render an array value as string for an annotation. @param array $optionValue @return string
[ "Render", "an", "array", "value", "as", "string", "for", "an", "annotation", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/Compiler.php#L325-L347
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.flushCommand
public function flushCommand(bool $force = false) { // Internal note: the $force option is evaluated early in the Flow // bootstrap in order to reliably flush the temporary data before any // other code can cause fatal errors. $this->cacheManager->flushCaches(); $this->out...
php
public function flushCommand(bool $force = false) { // Internal note: the $force option is evaluated early in the Flow // bootstrap in order to reliably flush the temporary data before any // other code can cause fatal errors. $this->cacheManager->flushCaches(); $this->out...
[ "public", "function", "flushCommand", "(", "bool", "$", "force", "=", "false", ")", "{", "// Internal note: the $force option is evaluated early in the Flow", "// bootstrap in order to reliably flush the temporary data before any", "// other code can cause fatal errors.", "$", "this", ...
Flush all caches The flush command flushes all caches (including code caches) which have been registered with Flow's Cache Manager. It will NOT remove any session data, unless you specifically configure the session caches to not be persistent. If fatal errors caused by a package prevent the compile time bootstrap fro...
[ "Flush", "all", "caches" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L147-L179
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.flushOneCommand
public function flushOneCommand(string $identifier) { if (!$this->cacheManager->hasCache($identifier)) { $this->outputLine('The cache "%s" does not exist.', [$identifier]); $cacheConfigurations = $this->cacheManager->getCacheConfigurations(); $shortestDistance = -1; ...
php
public function flushOneCommand(string $identifier) { if (!$this->cacheManager->hasCache($identifier)) { $this->outputLine('The cache "%s" does not exist.', [$identifier]); $cacheConfigurations = $this->cacheManager->getCacheConfigurations(); $shortestDistance = -1; ...
[ "public", "function", "flushOneCommand", "(", "string", "$", "identifier", ")", "{", "if", "(", "!", "$", "this", "->", "cacheManager", "->", "hasCache", "(", "$", "identifier", ")", ")", "{", "$", "this", "->", "outputLine", "(", "'The cache \"%s\" does not...
Flushes a particular cache by its identifier Given a cache identifier, this flushes just that one cache. To find the cache identifiers, you can use the configuration:show command with the type set to "Caches". Note that this does not have a force-flush option since it's not meant to remove temporary code data, result...
[ "Flushes", "a", "particular", "cache", "by", "its", "identifier" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L197-L221
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.listCommand
public function listCommand(bool $quiet = false) { $cacheConfigurations = $this->cacheManager->getCacheConfigurations(); $defaultConfiguration = $cacheConfigurations['Default']; unset($cacheConfigurations['Default']); ksort($cacheConfigurations); $headers = ['Cache', 'Backen...
php
public function listCommand(bool $quiet = false) { $cacheConfigurations = $this->cacheManager->getCacheConfigurations(); $defaultConfiguration = $cacheConfigurations['Default']; unset($cacheConfigurations['Default']); ksort($cacheConfigurations); $headers = ['Cache', 'Backen...
[ "public", "function", "listCommand", "(", "bool", "$", "quiet", "=", "false", ")", "{", "$", "cacheConfigurations", "=", "$", "this", "->", "cacheManager", "->", "getCacheConfigurations", "(", ")", ";", "$", "defaultConfiguration", "=", "$", "cacheConfigurations...
List all configured caches and their status if available This command will exit with a code 1 if at least one cache status contains errors or warnings This allows the command to be easily integrated in CI setups (the --quiet flag can be used to reduce verbosity) @param bool $quiet If set, this command only outputs er...
[ "List", "all", "configured", "caches", "and", "their", "status", "if", "available" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L252-L300
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.showCommand
public function showCommand(string $cacheIdentifier) { try { $cache = $this->cacheManager->getCache($cacheIdentifier); } catch (NoSuchCacheException $exception) { $this->outputLine('<error>A Cache with id "%s" is not configured.</error>', [$cacheIdentifier]); $thi...
php
public function showCommand(string $cacheIdentifier) { try { $cache = $this->cacheManager->getCache($cacheIdentifier); } catch (NoSuchCacheException $exception) { $this->outputLine('<error>A Cache with id "%s" is not configured.</error>', [$cacheIdentifier]); $thi...
[ "public", "function", "showCommand", "(", "string", "$", "cacheIdentifier", ")", "{", "try", "{", "$", "cache", "=", "$", "this", "->", "cacheManager", "->", "getCache", "(", "$", "cacheIdentifier", ")", ";", "}", "catch", "(", "NoSuchCacheException", "$", ...
Display details of a cache including a detailed status if available @param string $cacheIdentifier identifier of the cache (for example "Flow_Core") @return void @see neos.flow:cache:list @throws StopActionException
[ "Display", "details", "of", "a", "cache", "including", "a", "detailed", "status", "if", "available" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L310-L343
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.setupCommand
public function setupCommand(string $cacheIdentifier) { try { $cache = $this->cacheManager->getCache($cacheIdentifier); } catch (NoSuchCacheException $exception) { $this->outputLine('<error>A Cache with id "%s" is not configured.</error>', [$cacheIdentifier]); $th...
php
public function setupCommand(string $cacheIdentifier) { try { $cache = $this->cacheManager->getCache($cacheIdentifier); } catch (NoSuchCacheException $exception) { $this->outputLine('<error>A Cache with id "%s" is not configured.</error>', [$cacheIdentifier]); $th...
[ "public", "function", "setupCommand", "(", "string", "$", "cacheIdentifier", ")", "{", "try", "{", "$", "cache", "=", "$", "this", "->", "cacheManager", "->", "getCache", "(", "$", "cacheIdentifier", ")", ";", "}", "catch", "(", "NoSuchCacheException", "$", ...
Setup the given Cache if possible Invokes the setup() method on the configured CacheBackend (if it implements the WithSetupInterface) which should setup and validate the backend (i.e. create required database tables, directories, ...) @param string $cacheIdentifier @return void @see neos.flow:cache:list @see neos.flo...
[ "Setup", "the", "given", "Cache", "if", "possible" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L357-L380
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.setupAllCommand
public function setupAllCommand(bool $quiet = false) { $cacheConfigurations = $this->cacheManager->getCacheConfigurations(); unset($cacheConfigurations['Default']); $hasErrorsOrWarnings = false; foreach (array_keys($cacheConfigurations) as $cacheIdentifier) { $cache = $th...
php
public function setupAllCommand(bool $quiet = false) { $cacheConfigurations = $this->cacheManager->getCacheConfigurations(); unset($cacheConfigurations['Default']); $hasErrorsOrWarnings = false; foreach (array_keys($cacheConfigurations) as $cacheIdentifier) { $cache = $th...
[ "public", "function", "setupAllCommand", "(", "bool", "$", "quiet", "=", "false", ")", "{", "$", "cacheConfigurations", "=", "$", "this", "->", "cacheManager", "->", "getCacheConfigurations", "(", ")", ";", "unset", "(", "$", "cacheConfigurations", "[", "'Defa...
Setup all Caches Invokes the setup() method on all configured CacheBackend that implement the WithSetupInterface interface which should setup and validate the backend (i.e. create required database tables, directories, ...) This command will exit with a code 1 if at least one cache setup failed This allows the comman...
[ "Setup", "all", "Caches" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L396-L419
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.sysCommand
public function sysCommand(int $address) { if ($address === 64738) { $this->cacheManager->flushCaches(); $content = 'G1syShtbMkobWzE7MzdtG1sxOzQ0bSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAbWzBtChtbMTszN20bWzE7NDRtICAgICAgKioqKiBDT01NT0RPUkUgNjQgQkFTSUMgVjIgKioqKiAgICA...
php
public function sysCommand(int $address) { if ($address === 64738) { $this->cacheManager->flushCaches(); $content = 'G1syShtbMkobWzE7MzdtG1sxOzQ0bSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAbWzBtChtbMTszN20bWzE7NDRtICAgICAgKioqKiBDT01NT0RPUkUgNjQgQkFTSUMgVjIgKioqKiAgICA...
[ "public", "function", "sysCommand", "(", "int", "$", "address", ")", "{", "if", "(", "$", "address", "===", "64738", ")", "{", "$", "this", "->", "cacheManager", "->", "flushCaches", "(", ")", ";", "$", "content", "=", "'G1syShtbMkobWzE7MzdtG1sxOzQ0bSAgICAgI...
Call system function @Flow\Internal @param integer $address @return void
[ "Call", "system", "function" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L428-L440
neos/flow-development-collection
Neos.Flow/Classes/Command/CacheCommandController.php
CacheCommandController.renderResult
private function renderResult(Result $result) { if ($result->hasNotices()) { /** @var Notice $notice */ foreach ($result->getNotices() as $notice) { if (!empty($notice->getTitle())) { $this->outputLine('<b>%s</b>: %s', [$notice->getTitle(), $notice...
php
private function renderResult(Result $result) { if ($result->hasNotices()) { /** @var Notice $notice */ foreach ($result->getNotices() as $notice) { if (!empty($notice->getTitle())) { $this->outputLine('<b>%s</b>: %s', [$notice->getTitle(), $notice...
[ "private", "function", "renderResult", "(", "Result", "$", "result", ")", "{", "if", "(", "$", "result", "->", "hasNotices", "(", ")", ")", "{", "/** @var Notice $notice */", "foreach", "(", "$", "result", "->", "getNotices", "(", ")", "as", "$", "notice",...
Outputs the given Result object in a human-readable way @param Result $result @return void
[ "Outputs", "the", "given", "Result", "object", "in", "a", "human", "-", "readable", "way" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/CacheCommandController.php#L448-L480
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Controller/StandardController.php
StandardController.resolveView
protected function resolveView() { $view = new SimpleTemplateView(['templateSource' => file_get_contents(FLOW_PATH_FLOW . 'Resources/Private/Mvc/StandardView_Template.html')]); $view->setControllerContext($this->controllerContext); return $view; }
php
protected function resolveView() { $view = new SimpleTemplateView(['templateSource' => file_get_contents(FLOW_PATH_FLOW . 'Resources/Private/Mvc/StandardView_Template.html')]); $view->setControllerContext($this->controllerContext); return $view; }
[ "protected", "function", "resolveView", "(", ")", "{", "$", "view", "=", "new", "SimpleTemplateView", "(", "[", "'templateSource'", "=>", "file_get_contents", "(", "FLOW_PATH_FLOW", ".", "'Resources/Private/Mvc/StandardView_Template.html'", ")", "]", ")", ";", "$", ...
Overrides the standard resolveView method @return ViewInterface $view The view
[ "Overrides", "the", "standard", "resolveView", "method" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/StandardController.php#L30-L35
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parse
public function parse(string $pointcutExpression, string $sourceHint): PointcutFilterComposite { $this->sourceHint = $sourceHint; if (!is_string($pointcutExpression) || strlen($pointcutExpression) === 0) { throw new InvalidPointcutExpressionException(sprintf('Pointcut expression must be...
php
public function parse(string $pointcutExpression, string $sourceHint): PointcutFilterComposite { $this->sourceHint = $sourceHint; if (!is_string($pointcutExpression) || strlen($pointcutExpression) === 0) { throw new InvalidPointcutExpressionException(sprintf('Pointcut expression must be...
[ "public", "function", "parse", "(", "string", "$", "pointcutExpression", ",", "string", "$", "sourceHint", ")", ":", "PointcutFilterComposite", "{", "$", "this", "->", "sourceHint", "=", "$", "sourceHint", ";", "if", "(", "!", "is_string", "(", "$", "pointcu...
Parses a string pointcut expression and returns the pointcut objects accordingly @param string $pointcutExpression The expression defining the pointcut @param string $sourceHint A message giving a hint on where the expression was defined. This is used in error messages. @return PointcutFilterComposite A composite of c...
[ "Parses", "a", "string", "pointcut", "expression", "and", "returns", "the", "pointcut", "objects", "accordingly" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L122-L172
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorClassAnnotatedWith
protected function parseDesignatorClassAnnotatedWith(string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite): void { $annotationPropertyConstraints = []; $this->parseAnnotationPattern($annotationPattern, $annotationPropertyConstraints); $filter = new P...
php
protected function parseDesignatorClassAnnotatedWith(string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite): void { $annotationPropertyConstraints = []; $this->parseAnnotationPattern($annotationPattern, $annotationPropertyConstraints); $filter = new P...
[ "protected", "function", "parseDesignatorClassAnnotatedWith", "(", "string", "$", "operator", ",", "string", "$", "annotationPattern", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "$", "annotationPropertyConstraints", "=", "[", ...
Takes a class annotation filter pattern and adds a so configured class annotation filter to the filter composite object. @param string $operator The operator @param string $annotationPattern The pattern expression as configuration for the class annotation filter @param PointcutFilterComposite $pointcutFilterComposite ...
[ "Takes", "a", "class", "annotation", "filter", "pattern", "and", "adds", "a", "so", "configured", "class", "annotation", "filter", "to", "the", "filter", "composite", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L183-L192
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorClass
protected function parseDesignatorClass(string $operator, string $classPattern, PointcutFilterComposite $pointcutFilterComposite): void { $filter = new PointcutClassNameFilter($classPattern); $filter->injectReflectionService($this->reflectionService); $pointcutFilterComposite->addFilter($ope...
php
protected function parseDesignatorClass(string $operator, string $classPattern, PointcutFilterComposite $pointcutFilterComposite): void { $filter = new PointcutClassNameFilter($classPattern); $filter->injectReflectionService($this->reflectionService); $pointcutFilterComposite->addFilter($ope...
[ "protected", "function", "parseDesignatorClass", "(", "string", "$", "operator", ",", "string", "$", "classPattern", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "$", "filter", "=", "new", "PointcutClassNameFilter", "(", "$"...
Takes a class filter pattern and adds a so configured class filter to the filter composite object. @param string $operator The operator @param string $classPattern The pattern expression as configuration for the class filter @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter com...
[ "Takes", "a", "class", "filter", "pattern", "and", "adds", "a", "so", "configured", "class", "filter", "to", "the", "filter", "composite", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L203-L208
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseAnnotationPattern
protected function parseAnnotationPattern(string &$annotationPattern, array &$annotationPropertyConstraints): void { if (strpos($annotationPattern, '(') !== false) { $matches = []; preg_match(self::PATTERN_MATCHMETHODNAMEANDARGUMENTS, $annotationPattern, $matches); $anno...
php
protected function parseAnnotationPattern(string &$annotationPattern, array &$annotationPropertyConstraints): void { if (strpos($annotationPattern, '(') !== false) { $matches = []; preg_match(self::PATTERN_MATCHMETHODNAMEANDARGUMENTS, $annotationPattern, $matches); $anno...
[ "protected", "function", "parseAnnotationPattern", "(", "string", "&", "$", "annotationPattern", ",", "array", "&", "$", "annotationPropertyConstraints", ")", ":", "void", "{", "if", "(", "strpos", "(", "$", "annotationPattern", ",", "'('", ")", "!==", "false", ...
Parse an annotation pattern and adjust $annotationPattern and $annotationPropertyConstraints as needed. @param string $annotationPattern @param array $annotationPropertyConstraints @return void
[ "Parse", "an", "annotation", "pattern", "and", "adjust", "$annotationPattern", "and", "$annotationPropertyConstraints", "as", "needed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L238-L248
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorMethod
protected function parseDesignatorMethod(string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite): void { if (strpos($signaturePattern, '->') === false) { throw new InvalidPointcutExpressionException('Syntax error: "->" expected in "' . $signaturePattern . '"...
php
protected function parseDesignatorMethod(string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite): void { if (strpos($signaturePattern, '->') === false) { throw new InvalidPointcutExpressionException('Syntax error: "->" expected in "' . $signaturePattern . '"...
[ "protected", "function", "parseDesignatorMethod", "(", "string", "$", "operator", ",", "string", "$", "signaturePattern", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "if", "(", "strpos", "(", "$", "signaturePattern", ",", ...
Splits the parameters of the pointcut designator "method" into a class and a method part and adds the appropriately configured filters to the filter composite object. @param string $operator The operator @param string $signaturePattern The pattern expression defining the class and method - the "signature" @param Point...
[ "Splits", "the", "parameters", "of", "the", "pointcut", "designator", "method", "into", "a", "class", "and", "a", "method", "part", "and", "adds", "the", "appropriately", "configured", "filters", "to", "the", "filter", "composite", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L261-L297
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorWithin
protected function parseDesignatorWithin(string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite): void { $filter = new PointcutClassTypeFilter($signaturePattern); $filter->injectReflectionService($this->reflectionService); $pointcutFilterComposite->addFi...
php
protected function parseDesignatorWithin(string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite): void { $filter = new PointcutClassTypeFilter($signaturePattern); $filter->injectReflectionService($this->reflectionService); $pointcutFilterComposite->addFi...
[ "protected", "function", "parseDesignatorWithin", "(", "string", "$", "operator", ",", "string", "$", "signaturePattern", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "$", "filter", "=", "new", "PointcutClassTypeFilter", "(", ...
Adds a class type filter to the pointcut filter composite @param string $operator @param string $signaturePattern The pattern expression defining the class type @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the class type filter) will be added to ...
[ "Adds", "a", "class", "type", "filter", "to", "the", "pointcut", "filter", "composite" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L307-L312
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorPointcut
protected function parseDesignatorPointcut(string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite): void { if (strpos($pointcutExpression, '->') === false) { throw new InvalidPointcutExpressionException('Syntax error: "->" expected in "' . $pointcutExpress...
php
protected function parseDesignatorPointcut(string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite): void { if (strpos($pointcutExpression, '->') === false) { throw new InvalidPointcutExpressionException('Syntax error: "->" expected in "' . $pointcutExpress...
[ "protected", "function", "parseDesignatorPointcut", "(", "string", "$", "operator", ",", "string", "$", "pointcutExpression", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "if", "(", "strpos", "(", "$", "pointcutExpression", ...
Splits the value of the pointcut designator "pointcut" into an aspect class- and a pointcut method part and adds the appropriately configured filter to the composite object. @param string $operator The operator @param string $pointcutExpression The pointcut expression (value of the designator) @param PointcutFilterCom...
[ "Splits", "the", "value", "of", "the", "pointcut", "designator", "pointcut", "into", "an", "aspect", "class", "-", "and", "a", "pointcut", "method", "part", "and", "adds", "the", "appropriately", "configured", "filter", "to", "the", "composite", "object", "." ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L325-L334
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorFilter
protected function parseDesignatorFilter(string $operator, string $filterObjectName, PointcutFilterComposite $pointcutFilterComposite): void { $customFilter = $this->objectManager->get($filterObjectName); if (!$customFilter instanceof PointcutFilterInterface) { throw new InvalidPointcutE...
php
protected function parseDesignatorFilter(string $operator, string $filterObjectName, PointcutFilterComposite $pointcutFilterComposite): void { $customFilter = $this->objectManager->get($filterObjectName); if (!$customFilter instanceof PointcutFilterInterface) { throw new InvalidPointcutE...
[ "protected", "function", "parseDesignatorFilter", "(", "string", "$", "operator", ",", "string", "$", "filterObjectName", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "$", "customFilter", "=", "$", "this", "->", "objectManag...
Adds a custom filter to the pointcut filter composite @param string $operator The operator @param string $filterObjectName Object Name of the custom filter (value of the designator) @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the custom filter) ...
[ "Adds", "a", "custom", "filter", "to", "the", "pointcut", "filter", "composite" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L345-L352
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseDesignatorSetting
protected function parseDesignatorSetting(string $operator, string $configurationPath, PointcutFilterComposite $pointcutFilterComposite): void { $filter = new PointcutSettingFilter($configurationPath); /** @var ConfigurationManager $configurationManager */ $configurationManager = $this->obje...
php
protected function parseDesignatorSetting(string $operator, string $configurationPath, PointcutFilterComposite $pointcutFilterComposite): void { $filter = new PointcutSettingFilter($configurationPath); /** @var ConfigurationManager $configurationManager */ $configurationManager = $this->obje...
[ "protected", "function", "parseDesignatorSetting", "(", "string", "$", "operator", ",", "string", "$", "configurationPath", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "$", "filter", "=", "new", "PointcutSettingFilter", "(", ...
Adds a setting filter to the pointcut filter composite @param string $operator The operator @param string $configurationPath The path to the settings option, that should be used @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the custom filter) will...
[ "Adds", "a", "setting", "filter", "to", "the", "pointcut", "filter", "composite" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L362-L370
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.parseRuntimeEvaluations
protected function parseRuntimeEvaluations(string $operator, string $runtimeEvaluations, PointcutFilterComposite $pointcutFilterComposite): void { $runtimeEvaluationsDefinition = [ $operator => [ 'evaluateConditions' => $this->getRuntimeEvaluationConditionsFromEvaluateString($run...
php
protected function parseRuntimeEvaluations(string $operator, string $runtimeEvaluations, PointcutFilterComposite $pointcutFilterComposite): void { $runtimeEvaluationsDefinition = [ $operator => [ 'evaluateConditions' => $this->getRuntimeEvaluationConditionsFromEvaluateString($run...
[ "protected", "function", "parseRuntimeEvaluations", "(", "string", "$", "operator", ",", "string", "$", "runtimeEvaluations", ",", "PointcutFilterComposite", "$", "pointcutFilterComposite", ")", ":", "void", "{", "$", "runtimeEvaluationsDefinition", "=", "[", "$", "op...
Adds runtime evaluations to the pointcut filter composite @param string $operator The operator @param string $runtimeEvaluations The runtime evaluations string @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the custom filter) will be added to this ...
[ "Adds", "runtime", "evaluations", "to", "the", "pointcut", "filter", "composite" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L380-L389
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.getSubstringBetweenParentheses
protected function getSubstringBetweenParentheses(string $string): string { $startingPosition = 0; $openParentheses = 0; $substring = ''; $length = strlen($string); for ($i = $startingPosition; $i < $length; $i++) { if ($string[$i] === ')') { $ope...
php
protected function getSubstringBetweenParentheses(string $string): string { $startingPosition = 0; $openParentheses = 0; $substring = ''; $length = strlen($string); for ($i = $startingPosition; $i < $length; $i++) { if ($string[$i] === ')') { $ope...
[ "protected", "function", "getSubstringBetweenParentheses", "(", "string", "$", "string", ")", ":", "string", "{", "$", "startingPosition", "=", "0", ";", "$", "openParentheses", "=", "0", ";", "$", "substring", "=", "''", ";", "$", "length", "=", "strlen", ...
Returns the substring of $string which is enclosed by parentheses of the first level. @param string $string The string to parse @return string The inner part between the first level of parentheses @throws InvalidPointcutExpressionException
[ "Returns", "the", "substring", "of", "$string", "which", "is", "enclosed", "by", "parentheses", "of", "the", "first", "level", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L399-L424
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.getVisibilityFromSignaturePattern
protected function getVisibilityFromSignaturePattern(string &$signaturePattern) { $visibility = null; $matches = []; $numberOfMatches = preg_match_all(self::PATTERN_MATCHVISIBILITYMODIFIER, $signaturePattern, $matches, PREG_SET_ORDER); if ($numberOfMatches > 1) { throw ne...
php
protected function getVisibilityFromSignaturePattern(string &$signaturePattern) { $visibility = null; $matches = []; $numberOfMatches = preg_match_all(self::PATTERN_MATCHVISIBILITYMODIFIER, $signaturePattern, $matches, PREG_SET_ORDER); if ($numberOfMatches > 1) { throw ne...
[ "protected", "function", "getVisibilityFromSignaturePattern", "(", "string", "&", "$", "signaturePattern", ")", "{", "$", "visibility", "=", "null", ";", "$", "matches", "=", "[", "]", ";", "$", "numberOfMatches", "=", "preg_match_all", "(", "self", "::", "PAT...
Parses the signature pattern and returns the visibility modifier if any. If a modifier was found, it will be removed from the $signaturePattern. @param string &$signaturePattern The regular expression for matching the method() signature @return string|null Visibility modifier or NULL of none was found @throws InvalidP...
[ "Parses", "the", "signature", "pattern", "and", "returns", "the", "visibility", "modifier", "if", "any", ".", "If", "a", "modifier", "was", "found", "it", "will", "be", "removed", "from", "the", "$signaturePattern", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L434-L450
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.getArgumentConstraintsFromMethodArgumentsPattern
protected function getArgumentConstraintsFromMethodArgumentsPattern(string $methodArgumentsPattern): array { $matches = []; $argumentConstraints = []; preg_match_all(self::PATTERN_MATCHRUNTIMEEVALUATIONSDEFINITION, $methodArgumentsPattern, $matches); $matchesCount = count($matches[...
php
protected function getArgumentConstraintsFromMethodArgumentsPattern(string $methodArgumentsPattern): array { $matches = []; $argumentConstraints = []; preg_match_all(self::PATTERN_MATCHRUNTIMEEVALUATIONSDEFINITION, $methodArgumentsPattern, $matches); $matchesCount = count($matches[...
[ "protected", "function", "getArgumentConstraintsFromMethodArgumentsPattern", "(", "string", "$", "methodArgumentsPattern", ")", ":", "array", "{", "$", "matches", "=", "[", "]", ";", "$", "argumentConstraints", "=", "[", "]", ";", "preg_match_all", "(", "self", ":...
Parses the method arguments pattern and returns the corresponding constraints array @param string $methodArgumentsPattern The arguments pattern defined in the pointcut expression @return array The corresponding constraints array
[ "Parses", "the", "method", "arguments", "pattern", "and", "returns", "the", "corresponding", "constraints", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L458-L481
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php
PointcutExpressionParser.getRuntimeEvaluationConditionsFromEvaluateString
protected function getRuntimeEvaluationConditionsFromEvaluateString(string $evaluateString): array { $matches = []; $runtimeEvaluationConditions = []; preg_match_all(self::PATTERN_MATCHRUNTIMEEVALUATIONSDEFINITION, $evaluateString, $matches); $matchesCount = count($matches[0]); ...
php
protected function getRuntimeEvaluationConditionsFromEvaluateString(string $evaluateString): array { $matches = []; $runtimeEvaluationConditions = []; preg_match_all(self::PATTERN_MATCHRUNTIMEEVALUATIONSDEFINITION, $evaluateString, $matches); $matchesCount = count($matches[0]); ...
[ "protected", "function", "getRuntimeEvaluationConditionsFromEvaluateString", "(", "string", "$", "evaluateString", ")", ":", "array", "{", "$", "matches", "=", "[", "]", ";", "$", "runtimeEvaluationConditions", "=", "[", "]", ";", "preg_match_all", "(", "self", ":...
Parses the evaluate string for runtime evaluations and returns the corresponding conditions array @param string $evaluateString The evaluate string defined in the pointcut expression @return array The corresponding constraints array
[ "Parses", "the", "evaluate", "string", "for", "runtime", "evaluations", "and", "returns", "the", "corresponding", "conditions", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutExpressionParser.php#L489-L515
neos/flow-development-collection
Neos.Flow/Classes/Session/SessionManager.php
SessionManager.getSession
public function getSession($sessionIdentifier) { if ($this->currentSession !== null && $this->currentSession->isStarted() && $this->currentSession->getId() === $sessionIdentifier) { return $this->currentSession; } if (isset($this->remoteSessions[$sessionIdentifier])) { ...
php
public function getSession($sessionIdentifier) { if ($this->currentSession !== null && $this->currentSession->isStarted() && $this->currentSession->getId() === $sessionIdentifier) { return $this->currentSession; } if (isset($this->remoteSessions[$sessionIdentifier])) { ...
[ "public", "function", "getSession", "(", "$", "sessionIdentifier", ")", "{", "if", "(", "$", "this", "->", "currentSession", "!==", "null", "&&", "$", "this", "->", "currentSession", "->", "isStarted", "(", ")", "&&", "$", "this", "->", "currentSession", "...
Returns the specified session. If no session with the given identifier exists, NULL is returned. @param string $sessionIdentifier The session identifier @return SessionInterface @api
[ "Returns", "the", "specified", "session", ".", "If", "no", "session", "with", "the", "given", "identifier", "exists", "NULL", "is", "returned", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/SessionManager.php#L103-L116
neos/flow-development-collection
Neos.Flow/Classes/Session/SessionManager.php
SessionManager.getActiveSessions
public function getActiveSessions() { $activeSessions = []; foreach ($this->metaDataCache->getByTag('session') as $sessionIdentifier => $sessionInfo) { $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags'...
php
public function getActiveSessions() { $activeSessions = []; foreach ($this->metaDataCache->getByTag('session') as $sessionIdentifier => $sessionInfo) { $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags'...
[ "public", "function", "getActiveSessions", "(", ")", "{", "$", "activeSessions", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "metaDataCache", "->", "getByTag", "(", "'session'", ")", "as", "$", "sessionIdentifier", "=>", "$", "sessionInfo", ")", ...
Returns all active sessions, even remote ones. @return array<SessionInterface> @api
[ "Returns", "all", "active", "sessions", "even", "remote", "ones", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/SessionManager.php#L124-L132
neos/flow-development-collection
Neos.Flow/Classes/Session/SessionManager.php
SessionManager.getSessionsByTag
public function getSessionsByTag($tag) { $taggedSessions = []; foreach ($this->metaDataCache->getByTag(Session::TAG_PREFIX . $tag) as $sessionIdentifier => $sessionInfo) { $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'],...
php
public function getSessionsByTag($tag) { $taggedSessions = []; foreach ($this->metaDataCache->getByTag(Session::TAG_PREFIX . $tag) as $sessionIdentifier => $sessionInfo) { $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'],...
[ "public", "function", "getSessionsByTag", "(", "$", "tag", ")", "{", "$", "taggedSessions", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "metaDataCache", "->", "getByTag", "(", "Session", "::", "TAG_PREFIX", ".", "$", "tag", ")", "as", "$", "...
Returns all sessions which are tagged by the specified tag. @param string $tag A valid Cache Frontend tag @return array A collection of Session objects or an empty array if tag did not match @api
[ "Returns", "all", "sessions", "which", "are", "tagged", "by", "the", "specified", "tag", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/SessionManager.php#L141-L149
neos/flow-development-collection
Neos.Flow/Classes/Session/SessionManager.php
SessionManager.destroySessionsByTag
public function destroySessionsByTag($tag, $reason = '') { $sessions = $this->getSessionsByTag($tag); foreach ($sessions as $session) { /** @var SessionInterface $session */ $session->destroy($reason); } return count($sessions); }
php
public function destroySessionsByTag($tag, $reason = '') { $sessions = $this->getSessionsByTag($tag); foreach ($sessions as $session) { /** @var SessionInterface $session */ $session->destroy($reason); } return count($sessions); }
[ "public", "function", "destroySessionsByTag", "(", "$", "tag", ",", "$", "reason", "=", "''", ")", "{", "$", "sessions", "=", "$", "this", "->", "getSessionsByTag", "(", "$", "tag", ")", ";", "foreach", "(", "$", "sessions", "as", "$", "session", ")", ...
Destroys all sessions which are tagged with the specified tag. @param string $tag A valid Cache Frontend tag @param string $reason A reason to mention in log output for why the sessions have been destroyed. For example: "The corresponding account was deleted" @return integer Number of sessions which have been destroye...
[ "Destroys", "all", "sessions", "which", "are", "tagged", "with", "the", "specified", "tag", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/SessionManager.php#L158-L166
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/FlashMessagesViewHelper.php
FlashMessagesViewHelper.initializeArguments
public function initializeArguments() { $this->registerUniversalTagAttributes(); $this->registerArgument('as', 'string', 'The name of the current flashMessage variable for rendering inside', false, null); $this->registerArgument('severity', 'string', 'severity of the messages (One of the \Ne...
php
public function initializeArguments() { $this->registerUniversalTagAttributes(); $this->registerArgument('as', 'string', 'The name of the current flashMessage variable for rendering inside', false, null); $this->registerArgument('severity', 'string', 'severity of the messages (One of the \Ne...
[ "public", "function", "initializeArguments", "(", ")", "{", "$", "this", "->", "registerUniversalTagAttributes", "(", ")", ";", "$", "this", "->", "registerArgument", "(", "'as'", ",", "'string'", ",", "'The name of the current flashMessage variable for rendering inside'"...
Initialize arguments @return void @api
[ "Initialize", "arguments" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/FlashMessagesViewHelper.php#L75-L80
neos/flow-development-collection
Neos.Flow/Classes/Aop/JoinPoint.php
JoinPoint.getMethodArgument
public function getMethodArgument($argumentName) { if (!array_key_exists($argumentName, $this->methodArguments)) { throw new InvalidArgumentException('The argument "' . $argumentName . '" does not exist in method ' . $this->className . '->' . $this->methodName, 1172750905); } ret...
php
public function getMethodArgument($argumentName) { if (!array_key_exists($argumentName, $this->methodArguments)) { throw new InvalidArgumentException('The argument "' . $argumentName . '" does not exist in method ' . $this->className . '->' . $this->methodName, 1172750905); } ret...
[ "public", "function", "getMethodArgument", "(", "$", "argumentName", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "argumentName", ",", "$", "this", "->", "methodArguments", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'The argument...
Returns the value of the specified method argument @param string $argumentName Name of the argument @return mixed Value of the argument @throws Exception\InvalidArgumentException @api
[ "Returns", "the", "value", "of", "the", "specified", "method", "argument" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/JoinPoint.php#L140-L146
neos/flow-development-collection
Neos.Flow/Classes/Aop/JoinPoint.php
JoinPoint.setMethodArgument
public function setMethodArgument($argumentName, $argumentValue): void { if (!array_key_exists($argumentName, $this->methodArguments)) { throw new InvalidArgumentException('The argument "' . $argumentName . '" does not exist in method ' . $this->className . '->' . $this->methodName, 1309260269);...
php
public function setMethodArgument($argumentName, $argumentValue): void { if (!array_key_exists($argumentName, $this->methodArguments)) { throw new InvalidArgumentException('The argument "' . $argumentName . '" does not exist in method ' . $this->className . '->' . $this->methodName, 1309260269);...
[ "public", "function", "setMethodArgument", "(", "$", "argumentName", ",", "$", "argumentValue", ")", ":", "void", "{", "if", "(", "!", "array_key_exists", "(", "$", "argumentName", ",", "$", "this", "->", "methodArguments", ")", ")", "{", "throw", "new", "...
Sets the value of the specified method argument @param string $argumentName Name of the argument @param mixed $argumentValue Value of the argument @return void @throws Exception\InvalidArgumentException @api
[ "Sets", "the", "value", "of", "the", "specified", "method", "argument" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/JoinPoint.php#L157-L163
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/Parser/SyntaxTree/Expression/LegacyNamespaceExpressionNode.php
LegacyNamespaceExpressionNode.evaluateExpression
public static function evaluateExpression(RenderingContextInterface $renderingContext, $expression, array $matches) { $renderingContext->getViewHelperResolver()->addNamespace($matches[1], $matches[2]); }
php
public static function evaluateExpression(RenderingContextInterface $renderingContext, $expression, array $matches) { $renderingContext->getViewHelperResolver()->addNamespace($matches[1], $matches[2]); }
[ "public", "static", "function", "evaluateExpression", "(", "RenderingContextInterface", "$", "renderingContext", ",", "$", "expression", ",", "array", "$", "matches", ")", "{", "$", "renderingContext", "->", "getViewHelperResolver", "(", ")", "->", "addNamespace", "...
Evaluates the expression stored in this node, in the context of $renderingcontext. @param RenderingContextInterface $renderingContext @param string $expression @param array $matches @return mixed
[ "Evaluates", "the", "expression", "stored", "in", "this", "node", "in", "the", "context", "of", "$renderingcontext", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/SyntaxTree/Expression/LegacyNamespaceExpressionNode.php#L37-L40
neos/flow-development-collection
Neos.Flow/Classes/I18n/Detector.php
Detector.detectLocaleFromHttpHeader
public function detectLocaleFromHttpHeader($acceptLanguageHeader) { $acceptableLanguages = I18n\Utility::parseAcceptLanguageHeader($acceptLanguageHeader); if ($acceptableLanguages === false) { return $this->localizationService->getConfiguration()->getDefaultLocale(); } ...
php
public function detectLocaleFromHttpHeader($acceptLanguageHeader) { $acceptableLanguages = I18n\Utility::parseAcceptLanguageHeader($acceptLanguageHeader); if ($acceptableLanguages === false) { return $this->localizationService->getConfiguration()->getDefaultLocale(); } ...
[ "public", "function", "detectLocaleFromHttpHeader", "(", "$", "acceptLanguageHeader", ")", "{", "$", "acceptableLanguages", "=", "I18n", "\\", "Utility", "::", "parseAcceptLanguageHeader", "(", "$", "acceptLanguageHeader", ")", ";", "if", "(", "$", "acceptableLanguage...
Returns best-matching Locale object based on the Accept-Language header provided as parameter. System default locale will be returned if no successful matches were done. @param string $acceptLanguageHeader The Accept-Language HTTP header @return Locale Best-matching existing Locale instance @api
[ "Returns", "best", "-", "matching", "Locale", "object", "based", "on", "the", "Accept", "-", "Language", "header", "provided", "as", "parameter", ".", "System", "default", "locale", "will", "be", "returned", "if", "no", "successful", "matches", "were", "done",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Detector.php#L65-L92
neos/flow-development-collection
Neos.Flow/Classes/I18n/Detector.php
Detector.detectLocaleFromLocaleTag
public function detectLocaleFromLocaleTag($localeIdentifier) { try { return $this->detectLocaleFromTemplateLocale(new Locale($localeIdentifier)); } catch (Exception\InvalidLocaleIdentifierException $exception) { return $this->localizationService->getConfiguration()->getDefaul...
php
public function detectLocaleFromLocaleTag($localeIdentifier) { try { return $this->detectLocaleFromTemplateLocale(new Locale($localeIdentifier)); } catch (Exception\InvalidLocaleIdentifierException $exception) { return $this->localizationService->getConfiguration()->getDefaul...
[ "public", "function", "detectLocaleFromLocaleTag", "(", "$", "localeIdentifier", ")", "{", "try", "{", "return", "$", "this", "->", "detectLocaleFromTemplateLocale", "(", "new", "Locale", "(", "$", "localeIdentifier", ")", ")", ";", "}", "catch", "(", "Exception...
Returns best-matching Locale object based on the locale identifier provided as parameter. System default locale will be returned if no successful matches were done. @param string $localeIdentifier The locale identifier as used in Locale class @return Locale Best-matching existing Locale instance @api
[ "Returns", "best", "-", "matching", "Locale", "object", "based", "on", "the", "locale", "identifier", "provided", "as", "parameter", ".", "System", "default", "locale", "will", "be", "returned", "if", "no", "successful", "matches", "were", "done", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Detector.php#L103-L110
neos/flow-development-collection
Neos.Flow/Classes/I18n/Detector.php
Detector.detectLocaleFromTemplateLocale
public function detectLocaleFromTemplateLocale(Locale $locale) { $bestMatchingLocale = $this->localeCollection->findBestMatchingLocale($locale); if ($bestMatchingLocale !== null) { return $bestMatchingLocale; } return $this->localizationService->getConfiguration()->getD...
php
public function detectLocaleFromTemplateLocale(Locale $locale) { $bestMatchingLocale = $this->localeCollection->findBestMatchingLocale($locale); if ($bestMatchingLocale !== null) { return $bestMatchingLocale; } return $this->localizationService->getConfiguration()->getD...
[ "public", "function", "detectLocaleFromTemplateLocale", "(", "Locale", "$", "locale", ")", "{", "$", "bestMatchingLocale", "=", "$", "this", "->", "localeCollection", "->", "findBestMatchingLocale", "(", "$", "locale", ")", ";", "if", "(", "$", "bestMatchingLocale...
Returns best-matching Locale object based on the template Locale object provided as parameter. System default locale will be returned if no successful matches were done. @param Locale $locale The template Locale object @return Locale Best-matching existing Locale instance @api
[ "Returns", "best", "-", "matching", "Locale", "object", "based", "on", "the", "template", "Locale", "object", "provided", "as", "parameter", ".", "System", "default", "locale", "will", "be", "returned", "if", "no", "successful", "matches", "were", "done", "." ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Detector.php#L121-L130
neos/flow-development-collection
Neos.Flow/Classes/Security/DummyContext.php
DummyContext.getAuthenticationTokensOfType
public function getAuthenticationTokensOfType($className) { $tokens = []; foreach ($this->tokens as $token) { if ($token instanceof $className) { $tokens[] = $token; } } return $tokens; }
php
public function getAuthenticationTokensOfType($className) { $tokens = []; foreach ($this->tokens as $token) { if ($token instanceof $className) { $tokens[] = $token; } } return $tokens; }
[ "public", "function", "getAuthenticationTokensOfType", "(", "$", "className", ")", "{", "$", "tokens", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "tokens", "as", "$", "token", ")", "{", "if", "(", "$", "token", "instanceof", "$", "className",...
Returns all Authentication\Tokens of the security context which are active for the current request and of the given type. If a token has a request pattern that cannot match against the current request it is determined as not active. @param string $className The class name @return TokenInterface[] Array of set tokens o...
[ "Returns", "all", "Authentication", "\\", "Tokens", "of", "the", "security", "context", "which", "are", "active", "for", "the", "current", "request", "and", "of", "the", "given", "type", ".", "If", "a", "token", "has", "a", "request", "pattern", "that", "c...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/DummyContext.php#L117-L127
neos/flow-development-collection
Neos.Flow/Classes/Security/DummyContext.php
DummyContext.hasRole
public function hasRole($roleIdentifier) { if ($roleIdentifier === 'Neos.Flow:Everybody') { return true; } if ($roleIdentifier === 'Neos.Flow:Anonymous') { return (!empty($this->roles)); } if ($roleIdentifier === 'Neos.Flow:AuthenticatedUser') { ...
php
public function hasRole($roleIdentifier) { if ($roleIdentifier === 'Neos.Flow:Everybody') { return true; } if ($roleIdentifier === 'Neos.Flow:Anonymous') { return (!empty($this->roles)); } if ($roleIdentifier === 'Neos.Flow:AuthenticatedUser') { ...
[ "public", "function", "hasRole", "(", "$", "roleIdentifier", ")", "{", "if", "(", "$", "roleIdentifier", "===", "'Neos.Flow:Everybody'", ")", "{", "return", "true", ";", "}", "if", "(", "$", "roleIdentifier", "===", "'Neos.Flow:Anonymous'", ")", "{", "return",...
Returns true, if at least one of the currently authenticated accounts holds a role with the given identifier, also recursively. @param string $roleIdentifier The string representation of the role to search for @return boolean true, if a role with the given string representation was found
[ "Returns", "true", "if", "at", "least", "one", "of", "the", "currently", "authenticated", "accounts", "holds", "a", "role", "with", "the", "given", "identifier", "also", "recursively", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/DummyContext.php#L161-L174
neos/flow-development-collection
Neos.Flow/Classes/Security/DummyContext.php
DummyContext.clearContext
public function clearContext() { $this->roles = null; $this->tokens = []; $this->csrfProtectionToken = null; $this->interceptedRequest = null; $this->initialized = false; }
php
public function clearContext() { $this->roles = null; $this->tokens = []; $this->csrfProtectionToken = null; $this->interceptedRequest = null; $this->initialized = false; }
[ "public", "function", "clearContext", "(", ")", "{", "$", "this", "->", "roles", "=", "null", ";", "$", "this", "->", "tokens", "=", "[", "]", ";", "$", "this", "->", "csrfProtectionToken", "=", "null", ";", "$", "this", "->", "interceptedRequest", "="...
Clears the security context. @return void
[ "Clears", "the", "security", "context", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/DummyContext.php#L247-L254
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.getCachedMatchResults
public function getCachedMatchResults(RouteContext $routeContext) { $cachedResult = $this->routeCache->get($routeContext->getCacheEntryIdentifier()); if ($cachedResult !== false) { $this->logger->debug(sprintf('Router route(): A cached Route with the cache identifier "%s" matched the req...
php
public function getCachedMatchResults(RouteContext $routeContext) { $cachedResult = $this->routeCache->get($routeContext->getCacheEntryIdentifier()); if ($cachedResult !== false) { $this->logger->debug(sprintf('Router route(): A cached Route with the cache identifier "%s" matched the req...
[ "public", "function", "getCachedMatchResults", "(", "RouteContext", "$", "routeContext", ")", "{", "$", "cachedResult", "=", "$", "this", "->", "routeCache", "->", "get", "(", "$", "routeContext", "->", "getCacheEntryIdentifier", "(", ")", ")", ";", "if", "(",...
Checks the cache for the given RouteContext and returns the result or false if no matching ache entry was found @param RouteContext $routeContext @return array|boolean the cached route values or false if no cache entry was found
[ "Checks", "the", "cache", "for", "the", "given", "RouteContext", "and", "returns", "the", "result", "or", "false", "if", "no", "matching", "ache", "entry", "was", "found" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L95-L103
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.storeMatchResults
public function storeMatchResults(RouteContext $routeContext, array $matchResults, RouteTags $matchedTags = null) { if ($this->containsObject($matchResults)) { return; } $tags = $this->generateRouteTags($routeContext->getHttpRequest()->getRelativePath(), $matchResults); i...
php
public function storeMatchResults(RouteContext $routeContext, array $matchResults, RouteTags $matchedTags = null) { if ($this->containsObject($matchResults)) { return; } $tags = $this->generateRouteTags($routeContext->getHttpRequest()->getRelativePath(), $matchResults); i...
[ "public", "function", "storeMatchResults", "(", "RouteContext", "$", "routeContext", ",", "array", "$", "matchResults", ",", "RouteTags", "$", "matchedTags", "=", "null", ")", "{", "if", "(", "$", "this", "->", "containsObject", "(", "$", "matchResults", ")", ...
Stores the $matchResults in the cache @param RouteContext $routeContext @param array $matchResults @param RouteTags|null $matchedTags @return void
[ "Stores", "the", "$matchResults", "in", "the", "cache" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L113-L123
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.getCachedResolvedUriConstraints
public function getCachedResolvedUriConstraints(ResolveContext $resolveContext) { $routeValues = $this->convertObjectsToHashes($resolveContext->getRouteValues()); if ($routeValues === null) { return false; } return $this->resolveCache->get($this->buildResolveCacheIdentifi...
php
public function getCachedResolvedUriConstraints(ResolveContext $resolveContext) { $routeValues = $this->convertObjectsToHashes($resolveContext->getRouteValues()); if ($routeValues === null) { return false; } return $this->resolveCache->get($this->buildResolveCacheIdentifi...
[ "public", "function", "getCachedResolvedUriConstraints", "(", "ResolveContext", "$", "resolveContext", ")", "{", "$", "routeValues", "=", "$", "this", "->", "convertObjectsToHashes", "(", "$", "resolveContext", "->", "getRouteValues", "(", ")", ")", ";", "if", "("...
Checks the cache for the given ResolveContext and returns the cached UriConstraints if a cache entry is found @param ResolveContext $resolveContext @return UriConstraints|boolean the cached URI or false if no cache entry was found
[ "Checks", "the", "cache", "for", "the", "given", "ResolveContext", "and", "returns", "the", "cached", "UriConstraints", "if", "a", "cache", "entry", "is", "found" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L131-L138
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.storeResolvedUriConstraints
public function storeResolvedUriConstraints(ResolveContext $resolveContext, UriConstraints $uriConstraints, RouteTags $resolvedTags = null) { $routeValues = $this->convertObjectsToHashes($resolveContext->getRouteValues()); if ($routeValues === null) { return; } $cacheIde...
php
public function storeResolvedUriConstraints(ResolveContext $resolveContext, UriConstraints $uriConstraints, RouteTags $resolvedTags = null) { $routeValues = $this->convertObjectsToHashes($resolveContext->getRouteValues()); if ($routeValues === null) { return; } $cacheIde...
[ "public", "function", "storeResolvedUriConstraints", "(", "ResolveContext", "$", "resolveContext", ",", "UriConstraints", "$", "uriConstraints", ",", "RouteTags", "$", "resolvedTags", "=", "null", ")", "{", "$", "routeValues", "=", "$", "this", "->", "convertObjects...
Stores the resolved UriConstraints in the cache together with the $routeValues @param ResolveContext $resolveContext @param UriConstraints $uriConstraints @param RouteTags|null $resolvedTags @return void
[ "Stores", "the", "resolved", "UriConstraints", "in", "the", "cache", "together", "with", "the", "$routeValues" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L148-L161
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.flushCachesByTag
public function flushCachesByTag($tag) { $this->routeCache->flushByTag($tag); $this->resolveCache->flushByTag($tag); }
php
public function flushCachesByTag($tag) { $this->routeCache->flushByTag($tag); $this->resolveCache->flushByTag($tag); }
[ "public", "function", "flushCachesByTag", "(", "$", "tag", ")", "{", "$", "this", "->", "routeCache", "->", "flushByTag", "(", "$", "tag", ")", ";", "$", "this", "->", "resolveCache", "->", "flushByTag", "(", "$", "tag", ")", ";", "}" ]
Flushes 'findMatchResults' and 'resolve' caches for the given $tag @param string $tag @return void
[ "Flushes", "findMatchResults", "and", "resolve", "caches", "for", "the", "given", "$tag" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L200-L204
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.convertObjectsToHashes
protected function convertObjectsToHashes(array $routeValues) { foreach ($routeValues as &$value) { if (is_object($value)) { if ($value instanceof CacheAwareInterface) { $identifier = $value->getCacheEntryIdentifier(); } else { ...
php
protected function convertObjectsToHashes(array $routeValues) { foreach ($routeValues as &$value) { if (is_object($value)) { if ($value instanceof CacheAwareInterface) { $identifier = $value->getCacheEntryIdentifier(); } else { ...
[ "protected", "function", "convertObjectsToHashes", "(", "array", "$", "routeValues", ")", "{", "foreach", "(", "$", "routeValues", "as", "&", "$", "value", ")", "{", "if", "(", "is_object", "(", "$", "value", ")", ")", "{", "if", "(", "$", "value", "in...
Recursively converts objects in an array to their identifiers @param array $routeValues the array to be processed @return array the modified array or NULL if $routeValues contain an object and its identifier could not be determined
[ "Recursively", "converts", "objects", "in", "an", "array", "to", "their", "identifiers" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L246-L267
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.buildResolveCacheIdentifier
protected function buildResolveCacheIdentifier(ResolveContext $resolveContext, array $routeValues) { Arrays::sortKeysRecursively($routeValues); return md5(sprintf('abs:%s|prefix:%s|routeValues:%s', $resolveContext->isForceAbsoluteUri() ? 1 : 0, $resolveContext->getUriPathPrefix(), trim(http_build_q...
php
protected function buildResolveCacheIdentifier(ResolveContext $resolveContext, array $routeValues) { Arrays::sortKeysRecursively($routeValues); return md5(sprintf('abs:%s|prefix:%s|routeValues:%s', $resolveContext->isForceAbsoluteUri() ? 1 : 0, $resolveContext->getUriPathPrefix(), trim(http_build_q...
[ "protected", "function", "buildResolveCacheIdentifier", "(", "ResolveContext", "$", "resolveContext", ",", "array", "$", "routeValues", ")", "{", "Arrays", "::", "sortKeysRecursively", "(", "$", "routeValues", ")", ";", "return", "md5", "(", "sprintf", "(", "'abs:...
Generates the Resolve cache identifier for the given Request @param ResolveContext $resolveContext @param array $routeValues @return string
[ "Generates", "the", "Resolve", "cache", "identifier", "for", "the", "given", "Request" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L276-L281
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
RouterCachingService.extractUuids
protected function extractUuids(array $values) { $uuids = []; foreach ($values as $value) { if (is_string($value)) { if (preg_match(UuidValidator::PATTERN_MATCH_UUID, $value) !== 0) { $uuids[] = $value; } } elseif (is_array(...
php
protected function extractUuids(array $values) { $uuids = []; foreach ($values as $value) { if (is_string($value)) { if (preg_match(UuidValidator::PATTERN_MATCH_UUID, $value) !== 0) { $uuids[] = $value; } } elseif (is_array(...
[ "protected", "function", "extractUuids", "(", "array", "$", "values", ")", "{", "$", "uuids", "=", "[", "]", ";", "foreach", "(", "$", "values", "as", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "value", ")", ")", "{", "if", "(", "p...
Helper method to generate tags by taking all UUIDs contained in the given $routeValues or $matchResults @param array $values @return array
[ "Helper", "method", "to", "generate", "tags", "by", "taking", "all", "UUIDs", "contained", "in", "the", "given", "$routeValues", "or", "$matchResults" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php#L290-L303
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/FlowQuery.php
FlowQuery.evaluateOperations
protected function evaluateOperations() { while ($op = array_shift($this->operations)) { $operation = $this->operationResolver->resolveOperation($op['name'], $this->context); $lastOperationResult = $operation->evaluate($this, $op['arguments']); } return $lastOperation...
php
protected function evaluateOperations() { while ($op = array_shift($this->operations)) { $operation = $this->operationResolver->resolveOperation($op['name'], $this->context); $lastOperationResult = $operation->evaluate($this, $op['arguments']); } return $lastOperation...
[ "protected", "function", "evaluateOperations", "(", ")", "{", "while", "(", "$", "op", "=", "array_shift", "(", "$", "this", "->", "operations", ")", ")", "{", "$", "operation", "=", "$", "this", "->", "operationResolver", "->", "resolveOperation", "(", "$...
Evaluate operations @return mixed the last operation result if the operation is a final operation, NULL otherwise
[ "Evaluate", "operations" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/FlowQuery.php#L199-L206
neos/flow-development-collection
Neos.Flow/Classes/Mvc/Routing/Dto/RouteParameters.php
RouteParameters.withParameter
public function withParameter(string $parameterName, $parameterValue): self { if (!TypeHandling::isLiteral(gettype($parameterValue)) && (!$parameterValue instanceof CacheAwareInterface)) { throw new \InvalidArgumentException(sprintf('Parameter values must be literal types or implement the CacheA...
php
public function withParameter(string $parameterName, $parameterValue): self { if (!TypeHandling::isLiteral(gettype($parameterValue)) && (!$parameterValue instanceof CacheAwareInterface)) { throw new \InvalidArgumentException(sprintf('Parameter values must be literal types or implement the CacheA...
[ "public", "function", "withParameter", "(", "string", "$", "parameterName", ",", "$", "parameterValue", ")", ":", "self", "{", "if", "(", "!", "TypeHandling", "::", "isLiteral", "(", "gettype", "(", "$", "parameterValue", ")", ")", "&&", "(", "!", "$", "...
Create a new instance adding the given parameter @param string $parameterName name of the parameter to add @param bool|float|int|string|CacheAwareInterface $parameterValue value of the parameter, has to be a literal or an object implementing CacheAwareInterface @return RouteParameters a new instance with the given par...
[ "Create", "a", "new", "instance", "adding", "the", "given", "parameter" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/RouteParameters.php#L62-L70
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/SaltedMd5HashingStrategy.php
SaltedMd5HashingStrategy.generateSaltedMd5
public static function generateSaltedMd5($clearString) { $salt = substr(md5(rand() . Utility\Algorithms::generateRandomString(23)), 0, rand(6, 10)); return (md5(md5($clearString) . $salt) . ',' . $salt); }
php
public static function generateSaltedMd5($clearString) { $salt = substr(md5(rand() . Utility\Algorithms::generateRandomString(23)), 0, rand(6, 10)); return (md5(md5($clearString) . $salt) . ',' . $salt); }
[ "public", "static", "function", "generateSaltedMd5", "(", "$", "clearString", ")", "{", "$", "salt", "=", "substr", "(", "md5", "(", "rand", "(", ")", ".", "Utility", "\\", "Algorithms", "::", "generateRandomString", "(", "23", ")", ")", ",", "0", ",", ...
Generates a salted md5 hash over the given string. @param string $clearString The unencrypted string which is the subject to be hashed @return string Salted hash and the salt, separated by a comma ","
[ "Generates", "a", "salted", "md5", "hash", "over", "the", "given", "string", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/SaltedMd5HashingStrategy.php#L28-L32
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/SaltedMd5HashingStrategy.php
SaltedMd5HashingStrategy.validateSaltedMd5
public static function validateSaltedMd5($clearString, $hashedStringAndSalt) { if (strpos($hashedStringAndSalt, ',') === false) { throw new \InvalidArgumentException('The hashed string must contain a salt, separated with comma from the hashed.', 1269872776); } list($passwordHash,...
php
public static function validateSaltedMd5($clearString, $hashedStringAndSalt) { if (strpos($hashedStringAndSalt, ',') === false) { throw new \InvalidArgumentException('The hashed string must contain a salt, separated with comma from the hashed.', 1269872776); } list($passwordHash,...
[ "public", "static", "function", "validateSaltedMd5", "(", "$", "clearString", ",", "$", "hashedStringAndSalt", ")", "{", "if", "(", "strpos", "(", "$", "hashedStringAndSalt", ",", "','", ")", "===", "false", ")", "{", "throw", "new", "\\", "InvalidArgumentExce...
Tests if the given string would produce the same hash given the specified salt. Use this method to validate hashes generated with generateSlatedMd5(). @param string $clearString @param string $hashedStringAndSalt @return boolean true if the clear string matches, otherwise false @throws \InvalidArgumentException
[ "Tests", "if", "the", "given", "string", "would", "produce", "the", "same", "hash", "given", "the", "specified", "salt", ".", "Use", "this", "method", "to", "validate", "hashes", "generated", "with", "generateSlatedMd5", "()", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/SaltedMd5HashingStrategy.php#L43-L50
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.output
public function output(string $text, array $arguments = []): void { if ($arguments !== []) { $text = vsprintf($text, $arguments); } $this->output->write($text); }
php
public function output(string $text, array $arguments = []): void { if ($arguments !== []) { $text = vsprintf($text, $arguments); } $this->output->write($text); }
[ "public", "function", "output", "(", "string", "$", "text", ",", "array", "$", "arguments", "=", "[", "]", ")", ":", "void", "{", "if", "(", "$", "arguments", "!==", "[", "]", ")", "{", "$", "text", "=", "vsprintf", "(", "$", "text", ",", "$", ...
Outputs specified text to the console window You can specify arguments that will be passed to the text via sprintf @see http://www.php.net/sprintf @param string $text Text to output @param array $arguments Optional arguments to use for sprintf @return void
[ "Outputs", "specified", "text", "to", "the", "console", "window", "You", "can", "specify", "arguments", "that", "will", "be", "passed", "to", "the", "text", "via", "sprintf", "@see", "http", ":", "//", "www", ".", "php", ".", "net", "/", "sprintf" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L95-L101
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.outputLine
public function outputLine(string $text = '', array $arguments = []): void { $this->output($text . PHP_EOL, $arguments); }
php
public function outputLine(string $text = '', array $arguments = []): void { $this->output($text . PHP_EOL, $arguments); }
[ "public", "function", "outputLine", "(", "string", "$", "text", "=", "''", ",", "array", "$", "arguments", "=", "[", "]", ")", ":", "void", "{", "$", "this", "->", "output", "(", "$", "text", ".", "PHP_EOL", ",", "$", "arguments", ")", ";", "}" ]
Outputs specified text to the console window and appends a line break @param string $text Text to output @param array $arguments Optional arguments to use for sprintf @return void @see output() @see outputLines()
[ "Outputs", "specified", "text", "to", "the", "console", "window", "and", "appends", "a", "line", "break" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L112-L115
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.outputFormatted
public function outputFormatted(string $text = '', array $arguments = [], int $leftPadding = 0): void { $lines = explode(PHP_EOL, $text); foreach ($lines as $line) { $formattedText = str_repeat(' ', $leftPadding) . wordwrap($line, $this->getMaximumLineLength() - $leftPadding, PHP_EOL . s...
php
public function outputFormatted(string $text = '', array $arguments = [], int $leftPadding = 0): void { $lines = explode(PHP_EOL, $text); foreach ($lines as $line) { $formattedText = str_repeat(' ', $leftPadding) . wordwrap($line, $this->getMaximumLineLength() - $leftPadding, PHP_EOL . s...
[ "public", "function", "outputFormatted", "(", "string", "$", "text", "=", "''", ",", "array", "$", "arguments", "=", "[", "]", ",", "int", "$", "leftPadding", "=", "0", ")", ":", "void", "{", "$", "lines", "=", "explode", "(", "PHP_EOL", ",", "$", ...
Formats the given text to fit into the maximum line length and outputs it to the console window @param string $text Text to output @param array $arguments Optional arguments to use for sprintf @param integer $leftPadding The number of spaces to use for indentation @return void @see outputLine()
[ "Formats", "the", "given", "text", "to", "fit", "into", "the", "maximum", "line", "length", "and", "outputs", "it", "to", "the", "console", "window" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L127-L134
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.select
public function select($question, array $choices, $default = null, bool $multiSelect = false, int $attempts = null) { $question = new ChoiceQuestion($this->combineQuestion($question), $choices, $default); $question ->setMaxAttempts($attempts) ->setMultiselect($multiSelect) ...
php
public function select($question, array $choices, $default = null, bool $multiSelect = false, int $attempts = null) { $question = new ChoiceQuestion($this->combineQuestion($question), $choices, $default); $question ->setMaxAttempts($attempts) ->setMultiselect($multiSelect) ...
[ "public", "function", "select", "(", "$", "question", ",", "array", "$", "choices", ",", "$", "default", "=", "null", ",", "bool", "$", "multiSelect", "=", "false", ",", "int", "$", "attempts", "=", "null", ")", "{", "$", "question", "=", "new", "Cho...
Asks the user to select a value @param string|array $question The question to ask. If an array each array item is turned into one line of a multi-line question @param array $choices List of choices to pick from @param mixed|null $default The default answer if the user enters nothing @param boolean $multiSelect If true...
[ "Asks", "the", "user", "to", "select", "a", "value" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L163-L172
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.ask
public function ask($question, string $default = null) { $question = new Question($this->combineQuestion($question), $default); return $this->getQuestionHelper()->ask($this->input, $this->output, $question); }
php
public function ask($question, string $default = null) { $question = new Question($this->combineQuestion($question), $default); return $this->getQuestionHelper()->ask($this->input, $this->output, $question); }
[ "public", "function", "ask", "(", "$", "question", ",", "string", "$", "default", "=", "null", ")", "{", "$", "question", "=", "new", "Question", "(", "$", "this", "->", "combineQuestion", "(", "$", "question", ")", ",", "$", "default", ")", ";", "re...
Asks a question to the user @param string|array $question The question to ask. If an array each array item is turned into one line of a multi-line question @param string $default The default answer if none is given by the user @return mixed The user answer @throws \RuntimeException If there is no data to read in the i...
[ "Asks", "a", "question", "to", "the", "user" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L182-L187
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.askConfirmation
public function askConfirmation($question, bool $default = true): bool { $question = new ConfirmationQuestion($this->combineQuestion($question), $default); return $this->getQuestionHelper()->ask($this->input, $this->output, $question); }
php
public function askConfirmation($question, bool $default = true): bool { $question = new ConfirmationQuestion($this->combineQuestion($question), $default); return $this->getQuestionHelper()->ask($this->input, $this->output, $question); }
[ "public", "function", "askConfirmation", "(", "$", "question", ",", "bool", "$", "default", "=", "true", ")", ":", "bool", "{", "$", "question", "=", "new", "ConfirmationQuestion", "(", "$", "this", "->", "combineQuestion", "(", "$", "question", ")", ",", ...
Asks a confirmation to the user. The question will be asked until the user answers by nothing, yes, or no. @param string|array $question The question to ask. If an array each array item is turned into one line of a multi-line question @param boolean $default The default answer if the user enters nothing @return boole...
[ "Asks", "a", "confirmation", "to", "the", "user", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L198-L203
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.askHiddenResponse
public function askHiddenResponse($question, bool $fallback = true) { $question = new Question($this->combineQuestion($question)); $question ->setHidden(true) ->setHiddenFallback($fallback); return $this->getQuestionHelper()->ask($this->input, $this->output, $questio...
php
public function askHiddenResponse($question, bool $fallback = true) { $question = new Question($this->combineQuestion($question)); $question ->setHidden(true) ->setHiddenFallback($fallback); return $this->getQuestionHelper()->ask($this->input, $this->output, $questio...
[ "public", "function", "askHiddenResponse", "(", "$", "question", ",", "bool", "$", "fallback", "=", "true", ")", "{", "$", "question", "=", "new", "Question", "(", "$", "this", "->", "combineQuestion", "(", "$", "question", ")", ")", ";", "$", "question"...
Asks a question to the user, the response is hidden @param string|array $question The question. If an array each array item is turned into one line of a multi-line question @param Boolean $fallback In case the response can not be hidden, whether to fallback on non-hidden question or not @return mixed The answer @throw...
[ "Asks", "a", "question", "to", "the", "user", "the", "response", "is", "hidden" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L213-L221
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.askAndValidate
public function askAndValidate($question, callable $validator, int $attempts = null, string $default = null) { $question = new Question($this->combineQuestion($question), $default); $question ->setValidator($validator) ->setMaxAttempts($attempts); return $this->getQu...
php
public function askAndValidate($question, callable $validator, int $attempts = null, string $default = null) { $question = new Question($this->combineQuestion($question), $default); $question ->setValidator($validator) ->setMaxAttempts($attempts); return $this->getQu...
[ "public", "function", "askAndValidate", "(", "$", "question", ",", "callable", "$", "validator", ",", "int", "$", "attempts", "=", "null", ",", "string", "$", "default", "=", "null", ")", "{", "$", "question", "=", "new", "Question", "(", "$", "this", ...
Asks for a value and validates the response The validator receives the data to validate. It must return the validated data when the data is valid and throw an exception otherwise. @see https://symfony.com/doc/current/components/console/helpers/questionhelper.html#validating-the-answer @param string|array $question Th...
[ "Asks", "for", "a", "value", "and", "validates", "the", "response" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L238-L246
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.askHiddenResponseAndValidate
public function askHiddenResponseAndValidate($question, callable $validator, int $attempts = null, bool $fallback = true) { $question = new Question($this->combineQuestion($question)); $question ->setHidden(true) ->setHiddenFallback($fallback) ->setValidator($vali...
php
public function askHiddenResponseAndValidate($question, callable $validator, int $attempts = null, bool $fallback = true) { $question = new Question($this->combineQuestion($question)); $question ->setHidden(true) ->setHiddenFallback($fallback) ->setValidator($vali...
[ "public", "function", "askHiddenResponseAndValidate", "(", "$", "question", ",", "callable", "$", "validator", ",", "int", "$", "attempts", "=", "null", ",", "bool", "$", "fallback", "=", "true", ")", "{", "$", "question", "=", "new", "Question", "(", "$",...
Asks for a value, hide and validates the response The validator receives the data to validate. It must return the validated data when the data is valid and throw an exception otherwise. @param string|array $question The question to ask. If an array each array item is turned into one line of a multi-line question @par...
[ "Asks", "for", "a", "value", "hide", "and", "validates", "the", "response" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L263-L273
neos/flow-development-collection
Neos.Flow/Classes/Cli/ConsoleOutput.php
ConsoleOutput.getQuestionHelper
protected function getQuestionHelper(): QuestionHelper { if ($this->questionHelper === null) { $this->questionHelper = new QuestionHelper(); $helperSet = new HelperSet([new FormatterHelper()]); $this->questionHelper->setHelperSet($helperSet); } return $thi...
php
protected function getQuestionHelper(): QuestionHelper { if ($this->questionHelper === null) { $this->questionHelper = new QuestionHelper(); $helperSet = new HelperSet([new FormatterHelper()]); $this->questionHelper->setHelperSet($helperSet); } return $thi...
[ "protected", "function", "getQuestionHelper", "(", ")", ":", "QuestionHelper", "{", "if", "(", "$", "this", "->", "questionHelper", "===", "null", ")", "{", "$", "this", "->", "questionHelper", "=", "new", "QuestionHelper", "(", ")", ";", "$", "helperSet", ...
Returns or initializes the symfony/console QuestionHelper @return QuestionHelper
[ "Returns", "or", "initializes", "the", "symfony", "/", "console", "QuestionHelper" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/ConsoleOutput.php#L358-L366