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/PersistenceManager.php | PersistenceManager.tearDown | public function tearDown()
{
// "driver" is used only for Doctrine, thus we (mis-)use it here
// additionally, when no path is set, skip this step, assuming no DB is needed
if ($this->settings['backendOptions']['driver'] !== null && $this->settings['backendOptions']['path'] !== null) {
... | php | public function tearDown()
{
// "driver" is used only for Doctrine, thus we (mis-)use it here
// additionally, when no path is set, skip this step, assuming no DB is needed
if ($this->settings['backendOptions']['driver'] !== null && $this->settings['backendOptions']['path'] !== null) {
... | [
"public",
"function",
"tearDown",
"(",
")",
"{",
"// \"driver\" is used only for Doctrine, thus we (mis-)use it here",
"// additionally, when no path is set, skip this step, assuming no DB is needed",
"if",
"(",
"$",
"this",
"->",
"settings",
"[",
"'backendOptions'",
"]",
"[",
"'... | Called after a functional test in Flow, dumps everything in the database.
@return void | [
"Called",
"after",
"a",
"functional",
"test",
"in",
"Flow",
"dumps",
"everything",
"in",
"the",
"database",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php#L314-L327 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php | PersistenceManager.hasUnpersistedChanges | public function hasUnpersistedChanges()
{
$unitOfWork = $this->entityManager->getUnitOfWork();
$unitOfWork->computeChangeSets();
if ($unitOfWork->getScheduledEntityInsertions() !== []
|| $unitOfWork->getScheduledEntityUpdates() !== []
|| $unitOfWork->getScheduledEnti... | php | public function hasUnpersistedChanges()
{
$unitOfWork = $this->entityManager->getUnitOfWork();
$unitOfWork->computeChangeSets();
if ($unitOfWork->getScheduledEntityInsertions() !== []
|| $unitOfWork->getScheduledEntityUpdates() !== []
|| $unitOfWork->getScheduledEnti... | [
"public",
"function",
"hasUnpersistedChanges",
"(",
")",
"{",
"$",
"unitOfWork",
"=",
"$",
"this",
"->",
"entityManager",
"->",
"getUnitOfWork",
"(",
")",
";",
"$",
"unitOfWork",
"->",
"computeChangeSets",
"(",
")",
";",
"if",
"(",
"$",
"unitOfWork",
"->",
... | Gives feedback if the persistence Manager has unpersisted changes.
This is primarily used to inform the user if he tries to save
data in an unsafe request.
@return boolean | [
"Gives",
"feedback",
"if",
"the",
"persistence",
"Manager",
"has",
"unpersisted",
"changes",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/PersistenceManager.php#L347-L362 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/Source/YamlSource.php | YamlSource.has | public function has(string $pathAndFilename, bool $allowSplitSource = false): bool
{
if ($allowSplitSource === true) {
$pathsAndFileNames = glob($pathAndFilename . '.*.yaml');
if ($pathsAndFileNames !== false) {
foreach ($pathsAndFileNames as $pathAndFilename) {
... | php | public function has(string $pathAndFilename, bool $allowSplitSource = false): bool
{
if ($allowSplitSource === true) {
$pathsAndFileNames = glob($pathAndFilename . '.*.yaml');
if ($pathsAndFileNames !== false) {
foreach ($pathsAndFileNames as $pathAndFilename) {
... | [
"public",
"function",
"has",
"(",
"string",
"$",
"pathAndFilename",
",",
"bool",
"$",
"allowSplitSource",
"=",
"false",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"allowSplitSource",
"===",
"true",
")",
"{",
"$",
"pathsAndFileNames",
"=",
"glob",
"(",
"$",
"... | Checks for the specified configuration file and returns true if it exists.
@param string $pathAndFilename Full path and filename of the file to load, excluding the file extension (ie. ".yaml")
@param boolean $allowSplitSource If true, the type will be used as a prefix when looking for configuration files
@return boole... | [
"Checks",
"for",
"the",
"specified",
"configuration",
"file",
"and",
"returns",
"true",
"if",
"it",
"exists",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/Source/YamlSource.php#L52-L69 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/Source/YamlSource.php | YamlSource.load | public function load(string $pathAndFilename, bool $allowSplitSource = false): array
{
$this->detectFilesWithWrongExtension($pathAndFilename, $allowSplitSource);
$pathsAndFileNames = [$pathAndFilename . '.yaml'];
if ($allowSplitSource === true) {
$splitSourcePathsAndFileNames = g... | php | public function load(string $pathAndFilename, bool $allowSplitSource = false): array
{
$this->detectFilesWithWrongExtension($pathAndFilename, $allowSplitSource);
$pathsAndFileNames = [$pathAndFilename . '.yaml'];
if ($allowSplitSource === true) {
$splitSourcePathsAndFileNames = g... | [
"public",
"function",
"load",
"(",
"string",
"$",
"pathAndFilename",
",",
"bool",
"$",
"allowSplitSource",
"=",
"false",
")",
":",
"array",
"{",
"$",
"this",
"->",
"detectFilesWithWrongExtension",
"(",
"$",
"pathAndFilename",
",",
"$",
"allowSplitSource",
")",
... | Loads the specified configuration file and returns its content as an
array. If the file does not exist or could not be loaded, an empty
array is returned
@param string $pathAndFilename Full path and filename of the file to load, excluding the file extension (ie. ".yaml")
@param boolean $allowSplitSource If true, the t... | [
"Loads",
"the",
"specified",
"configuration",
"file",
"and",
"returns",
"its",
"content",
"as",
"an",
"array",
".",
"If",
"the",
"file",
"does",
"not",
"exist",
"or",
"could",
"not",
"be",
"loaded",
"an",
"empty",
"array",
"is",
"returned"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/Source/YamlSource.php#L82-L99 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/Source/YamlSource.php | YamlSource.mergeFileContent | protected function mergeFileContent(string $pathAndFilename, array $configuration): array
{
if (!is_file($pathAndFilename)) {
return $configuration;
}
try {
$yaml = file_get_contents($pathAndFilename);
if ($this->usePhpYamlExtension) {
$lo... | php | protected function mergeFileContent(string $pathAndFilename, array $configuration): array
{
if (!is_file($pathAndFilename)) {
return $configuration;
}
try {
$yaml = file_get_contents($pathAndFilename);
if ($this->usePhpYamlExtension) {
$lo... | [
"protected",
"function",
"mergeFileContent",
"(",
"string",
"$",
"pathAndFilename",
",",
"array",
"$",
"configuration",
")",
":",
"array",
"{",
"if",
"(",
"!",
"is_file",
"(",
"$",
"pathAndFilename",
")",
")",
"{",
"return",
"$",
"configuration",
";",
"}",
... | Loads the file with the given path and merge it's contents into the configuration array.
@param string $pathAndFilename
@param array $configuration
@return array
@throws ParseErrorException | [
"Loads",
"the",
"file",
"with",
"the",
"given",
"path",
"and",
"merge",
"it",
"s",
"contents",
"into",
"the",
"configuration",
"array",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/Source/YamlSource.php#L131-L157 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/Source/YamlSource.php | YamlSource.save | public function save(string $pathAndFilename, array $configuration)
{
$header = '';
if (file_exists($pathAndFilename . '.yaml')) {
$header = $this->getHeaderFromFile($pathAndFilename . '.yaml');
}
$yaml = Yaml::dump($configuration, 99, 2);
file_put_contents($pathA... | php | public function save(string $pathAndFilename, array $configuration)
{
$header = '';
if (file_exists($pathAndFilename . '.yaml')) {
$header = $this->getHeaderFromFile($pathAndFilename . '.yaml');
}
$yaml = Yaml::dump($configuration, 99, 2);
file_put_contents($pathA... | [
"public",
"function",
"save",
"(",
"string",
"$",
"pathAndFilename",
",",
"array",
"$",
"configuration",
")",
"{",
"$",
"header",
"=",
"''",
";",
"if",
"(",
"file_exists",
"(",
"$",
"pathAndFilename",
".",
"'.yaml'",
")",
")",
"{",
"$",
"header",
"=",
... | Save the specified configuration array to the given file in YAML format.
@param string $pathAndFilename Full path and filename of the file to write to, excluding the dot and file extension (i.e. ".yaml")
@param array $configuration The configuration to save
@return void | [
"Save",
"the",
"specified",
"configuration",
"array",
"to",
"the",
"given",
"file",
"in",
"YAML",
"format",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/Source/YamlSource.php#L166-L174 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/Source/YamlSource.php | YamlSource.getHeaderFromFile | protected function getHeaderFromFile(string $pathAndFilename): string
{
$header = '';
$fileHandle = fopen($pathAndFilename, 'r');
while ($line = fgets($fileHandle)) {
if (preg_match('/^#/', $line)) {
$header .= $line;
} else {
break;
... | php | protected function getHeaderFromFile(string $pathAndFilename): string
{
$header = '';
$fileHandle = fopen($pathAndFilename, 'r');
while ($line = fgets($fileHandle)) {
if (preg_match('/^#/', $line)) {
$header .= $line;
} else {
break;
... | [
"protected",
"function",
"getHeaderFromFile",
"(",
"string",
"$",
"pathAndFilename",
")",
":",
"string",
"{",
"$",
"header",
"=",
"''",
";",
"$",
"fileHandle",
"=",
"fopen",
"(",
"$",
"pathAndFilename",
",",
"'r'",
")",
";",
"while",
"(",
"$",
"line",
"=... | Read the header part from the given file. That means, every line
until the first non comment line is found.
@param string $pathAndFilename
@return string The header of the given YAML file | [
"Read",
"the",
"header",
"part",
"from",
"the",
"given",
"file",
".",
"That",
"means",
"every",
"line",
"until",
"the",
"first",
"non",
"comment",
"line",
"is",
"found",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/Source/YamlSource.php#L183-L196 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/AbstractCompositeValidator.php | AbstractCompositeValidator.addValidator | public function addValidator(ValidatorInterface $validator)
{
if ($validator instanceof ObjectValidatorInterface) {
$validator->setValidatedInstancesContainer = $this->validatedInstancesContainer;
}
$this->validators->attach($validator);
} | php | public function addValidator(ValidatorInterface $validator)
{
if ($validator instanceof ObjectValidatorInterface) {
$validator->setValidatedInstancesContainer = $this->validatedInstancesContainer;
}
$this->validators->attach($validator);
} | [
"public",
"function",
"addValidator",
"(",
"ValidatorInterface",
"$",
"validator",
")",
"{",
"if",
"(",
"$",
"validator",
"instanceof",
"ObjectValidatorInterface",
")",
"{",
"$",
"validator",
"->",
"setValidatedInstancesContainer",
"=",
"$",
"this",
"->",
"validated... | Adds a new validator to the conjunction.
@param ValidatorInterface $validator The validator that should be added
@return void
@api | [
"Adds",
"a",
"new",
"validator",
"to",
"the",
"conjunction",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AbstractCompositeValidator.php#L103-L109 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/AbstractCompositeValidator.php | AbstractCompositeValidator.removeValidator | public function removeValidator(ValidatorInterface $validator)
{
if (!$this->validators->contains($validator)) {
throw new NoSuchValidatorException('Cannot remove validator because its not in the conjunction.', 1207020177);
}
$this->validators->detach($validator);
} | php | public function removeValidator(ValidatorInterface $validator)
{
if (!$this->validators->contains($validator)) {
throw new NoSuchValidatorException('Cannot remove validator because its not in the conjunction.', 1207020177);
}
$this->validators->detach($validator);
} | [
"public",
"function",
"removeValidator",
"(",
"ValidatorInterface",
"$",
"validator",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"validators",
"->",
"contains",
"(",
"$",
"validator",
")",
")",
"{",
"throw",
"new",
"NoSuchValidatorException",
"(",
"'Cannot r... | Removes the specified validator.
@param ValidatorInterface $validator The validator to remove
@throws NoSuchValidatorException
@api | [
"Removes",
"the",
"specified",
"validator",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AbstractCompositeValidator.php#L118-L124 |
neos/flow-development-collection | Neos.Flow/Migrations/Mysql/Version20141113173712.php | Version20141113173712.migrateAccountRolesUp | protected function migrateAccountRolesUp()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account_roles_join', 'typo3_flow_security_policy_role'])) {
return;
}
$accountsWithRoles = array();
$accountRolesResult = $this->connection->executeQuery('SELECT j.flow_securit... | php | protected function migrateAccountRolesUp()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account_roles_join', 'typo3_flow_security_policy_role'])) {
return;
}
$accountsWithRoles = array();
$accountRolesResult = $this->connection->executeQuery('SELECT j.flow_securit... | [
"protected",
"function",
"migrateAccountRolesUp",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"sm",
"->",
"tablesExist",
"(",
"[",
"'typo3_flow_security_account_roles_join'",
",",
"'typo3_flow_security_policy_role'",
"]",
")",
")",
"{",
"return",
";",
"}",
... | Generate SQL statements to migrate accounts up to embedded roles.
@return void | [
"Generate",
"SQL",
"statements",
"to",
"migrate",
"accounts",
"up",
"to",
"embedded",
"roles",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Mysql/Version20141113173712.php#L65-L81 |
neos/flow-development-collection | Neos.Flow/Migrations/Mysql/Version20141113173712.php | Version20141113173712.migrateAccountRolesDown | protected function migrateAccountRolesDown()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account', 'typo3_flow_security_policy_role', 'typo3_flow_security_account_roles_join'])) {
return;
}
$allRolesAndAccounts = array();
$accountRolesResult = $this->connection->e... | php | protected function migrateAccountRolesDown()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account', 'typo3_flow_security_policy_role', 'typo3_flow_security_account_roles_join'])) {
return;
}
$allRolesAndAccounts = array();
$accountRolesResult = $this->connection->e... | [
"protected",
"function",
"migrateAccountRolesDown",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"sm",
"->",
"tablesExist",
"(",
"[",
"'typo3_flow_security_account'",
",",
"'typo3_flow_security_policy_role'",
",",
"'typo3_flow_security_account_roles_join'",
"]",
")... | Generate SQL statements to migrate accounts down to embedded roles.
@return void | [
"Generate",
"SQL",
"statements",
"to",
"migrate",
"accounts",
"down",
"to",
"embedded",
"roles",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Mysql/Version20141113173712.php#L88-L114 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Advice/AdviceChain.php | AdviceChain.proceed | public function proceed(JoinPointInterface &$joinPoint)
{
$this->adviceIndex++;
if ($this->adviceIndex < count($this->advices)) {
$result = $this->advices[$this->adviceIndex]->invoke($joinPoint);
} else {
$result = $joinPoint->getProxy()->Flow_Aop_Proxy_invokeJoinpoin... | php | public function proceed(JoinPointInterface &$joinPoint)
{
$this->adviceIndex++;
if ($this->adviceIndex < count($this->advices)) {
$result = $this->advices[$this->adviceIndex]->invoke($joinPoint);
} else {
$result = $joinPoint->getProxy()->Flow_Aop_Proxy_invokeJoinpoin... | [
"public",
"function",
"proceed",
"(",
"JoinPointInterface",
"&",
"$",
"joinPoint",
")",
"{",
"$",
"this",
"->",
"adviceIndex",
"++",
";",
"if",
"(",
"$",
"this",
"->",
"adviceIndex",
"<",
"count",
"(",
"$",
"this",
"->",
"advices",
")",
")",
"{",
"$",
... | An advice usually calls (but doesn't have to necessarily) this method
in order to proceed with the next advice in the chain. If no advice is
left in the chain, the proxy classes' method invokeJoinpoint() will finally
be called.
@param JoinPointInterface $joinPoint The current join point (ie. the context)
@return mixe... | [
"An",
"advice",
"usually",
"calls",
"(",
"but",
"doesn",
"t",
"have",
"to",
"necessarily",
")",
"this",
"method",
"in",
"order",
"to",
"proceed",
"with",
"the",
"next",
"advice",
"in",
"the",
"chain",
".",
"If",
"no",
"advice",
"is",
"left",
"in",
"the... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Advice/AdviceChain.php#L53-L62 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.initializeObject | public function initializeObject()
{
if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedSymbols')) {
$this->parsedFormats = $this->cache->get('parsedFormats');
$this->parsedFormatsIndices = $this->cache->get('parsedForma... | php | public function initializeObject()
{
if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedSymbols')) {
$this->parsedFormats = $this->cache->get('parsedFormats');
$this->parsedFormatsIndices = $this->cache->get('parsedForma... | [
"public",
"function",
"initializeObject",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cache",
"->",
"has",
"(",
"'parsedFormats'",
")",
"&&",
"$",
"this",
"->",
"cache",
"->",
"has",
"(",
"'parsedFormatsIndices'",
")",
"&&",
"$",
"this",
"->",
"cache",... | Constructs the reader, loading parsed data from cache if available.
@return void | [
"Constructs",
"the",
"reader",
"loading",
"parsed",
"data",
"from",
"cache",
"if",
"available",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L187-L194 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.shutdownObject | public function shutdownObject()
{
$this->cache->set('parsedFormats', $this->parsedFormats);
$this->cache->set('parsedFormatsIndices', $this->parsedFormatsIndices);
$this->cache->set('localizedSymbols', $this->localizedSymbols);
} | php | public function shutdownObject()
{
$this->cache->set('parsedFormats', $this->parsedFormats);
$this->cache->set('parsedFormatsIndices', $this->parsedFormatsIndices);
$this->cache->set('localizedSymbols', $this->localizedSymbols);
} | [
"public",
"function",
"shutdownObject",
"(",
")",
"{",
"$",
"this",
"->",
"cache",
"->",
"set",
"(",
"'parsedFormats'",
",",
"$",
"this",
"->",
"parsedFormats",
")",
";",
"$",
"this",
"->",
"cache",
"->",
"set",
"(",
"'parsedFormatsIndices'",
",",
"$",
"... | Shutdowns the object, saving parsed format strings to the cache.
@return void | [
"Shutdowns",
"the",
"object",
"saving",
"parsed",
"format",
"strings",
"to",
"the",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L201-L206 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.parseFormatFromCldr | public function parseFormatFromCldr(Locale $locale, $formatType, $formatLength = self::FORMAT_LENGTH_DEFAULT)
{
self::validateFormatType($formatType);
self::validateFormatLength($formatLength);
if (isset($this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength])) {
... | php | public function parseFormatFromCldr(Locale $locale, $formatType, $formatLength = self::FORMAT_LENGTH_DEFAULT)
{
self::validateFormatType($formatType);
self::validateFormatLength($formatLength);
if (isset($this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength])) {
... | [
"public",
"function",
"parseFormatFromCldr",
"(",
"Locale",
"$",
"locale",
",",
"$",
"formatType",
",",
"$",
"formatLength",
"=",
"self",
"::",
"FORMAT_LENGTH_DEFAULT",
")",
"{",
"self",
"::",
"validateFormatType",
"(",
"$",
"formatType",
")",
";",
"self",
"::... | Returns parsed number format basing on locale and desired format length
if provided.
When third parameter ($formatLength) equals 'default', default format for a
locale will be used.
@param Locale $locale
@param string $formatType A type of format (one of constant values)
@param string $formatLength A length of format... | [
"Returns",
"parsed",
"number",
"format",
"basing",
"on",
"locale",
"and",
"desired",
"format",
"length",
"if",
"provided",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L221-L247 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.parseCustomFormat | public function parseCustomFormat($format)
{
if (isset($this->parsedFormats[$format])) {
return $this->parsedFormats[$format];
}
return $this->parsedFormats[$format] = $this->parseFormat($format);
} | php | public function parseCustomFormat($format)
{
if (isset($this->parsedFormats[$format])) {
return $this->parsedFormats[$format];
}
return $this->parsedFormats[$format] = $this->parseFormat($format);
} | [
"public",
"function",
"parseCustomFormat",
"(",
"$",
"format",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"parsedFormats",
"[",
"$",
"format",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"parsedFormats",
"[",
"$",
"format",
"]",
";",
... | Returns parsed date or time format string provided as parameter.
@param string $format Format string to parse
@return array An array representing parsed format | [
"Returns",
"parsed",
"date",
"or",
"time",
"format",
"string",
"provided",
"as",
"parameter",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L255-L262 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.getLocalizedSymbolsForLocale | public function getLocalizedSymbolsForLocale(Locale $locale)
{
if (isset($this->localizedSymbols[(string)$locale])) {
return $this->localizedSymbols[(string)$locale];
}
$model = $this->cldrRepository->getModelForLocale($locale);
return $this->localizedSymbols[(string)$lo... | php | public function getLocalizedSymbolsForLocale(Locale $locale)
{
if (isset($this->localizedSymbols[(string)$locale])) {
return $this->localizedSymbols[(string)$locale];
}
$model = $this->cldrRepository->getModelForLocale($locale);
return $this->localizedSymbols[(string)$lo... | [
"public",
"function",
"getLocalizedSymbolsForLocale",
"(",
"Locale",
"$",
"locale",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"localizedSymbols",
"[",
"(",
"string",
")",
"$",
"locale",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"locali... | Returns symbols array for provided locale.
Symbols are elements defined in tag symbols from CLDR. They define
localized versions of various number-related elements, like decimal
separator, group separator or minus sign.
Symbols arrays for every requested locale are cached.
@param Locale $locale
@return array Symbols... | [
"Returns",
"symbols",
"array",
"for",
"provided",
"locale",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L276-L284 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.validateFormatType | public static function validateFormatType($formatType)
{
if (!in_array($formatType, [self::FORMAT_TYPE_DECIMAL, self::FORMAT_TYPE_PERCENT, self::FORMAT_TYPE_CURRENCY])) {
throw new Exception\InvalidFormatTypeException('Provided formatType, "' . $formatType . '", is not one of allowed values.', 1... | php | public static function validateFormatType($formatType)
{
if (!in_array($formatType, [self::FORMAT_TYPE_DECIMAL, self::FORMAT_TYPE_PERCENT, self::FORMAT_TYPE_CURRENCY])) {
throw new Exception\InvalidFormatTypeException('Provided formatType, "' . $formatType . '", is not one of allowed values.', 1... | [
"public",
"static",
"function",
"validateFormatType",
"(",
"$",
"formatType",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"formatType",
",",
"[",
"self",
"::",
"FORMAT_TYPE_DECIMAL",
",",
"self",
"::",
"FORMAT_TYPE_PERCENT",
",",
"self",
"::",
"FORMAT_TYPE... | Validates provided format type and throws exception if value is not
allowed.
@param string $formatType
@return void
@throws Exception\InvalidFormatTypeException When value is unallowed | [
"Validates",
"provided",
"format",
"type",
"and",
"throws",
"exception",
"if",
"value",
"is",
"not",
"allowed",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L294-L299 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php | NumbersReader.parseFormat | protected function parseFormat($format)
{
foreach (['E', '@', '*', '\''] as $unsupportedFeature) {
if (strpos($format, $unsupportedFeature) !== false) {
throw new Exception\UnsupportedNumberFormatException('Encountered unsupported format characters in format string.', 1280219449)... | php | protected function parseFormat($format)
{
foreach (['E', '@', '*', '\''] as $unsupportedFeature) {
if (strpos($format, $unsupportedFeature) !== false) {
throw new Exception\UnsupportedNumberFormatException('Encountered unsupported format characters in format string.', 1280219449)... | [
"protected",
"function",
"parseFormat",
"(",
"$",
"format",
")",
"{",
"foreach",
"(",
"[",
"'E'",
",",
"'@'",
",",
"'*'",
",",
"'\\''",
"]",
"as",
"$",
"unsupportedFeature",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"format",
",",
"$",
"unsupportedFeatu... | Parses a number format (with syntax defined in CLDR).
Not all features from CLDR specification are implemented. Please see the
documentation for this class for details what is missing.
@param string $format
@return array Parsed format
@throws Exception\UnsupportedNumberFormatException When unsupported format characte... | [
"Parses",
"a",
"number",
"format",
"(",
"with",
"syntax",
"defined",
"in",
"CLDR",
")",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/NumbersReader.php#L327-L417 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.processRequest | public function processRequest(RequestInterface $request, ResponseInterface $response)
{
$this->initializeController($request, $response);
$this->actionMethodName = $this->resolveActionMethodName();
$this->initializeActionMethodArguments();
$this->initializeActionMethodValidators()... | php | public function processRequest(RequestInterface $request, ResponseInterface $response)
{
$this->initializeController($request, $response);
$this->actionMethodName = $this->resolveActionMethodName();
$this->initializeActionMethodArguments();
$this->initializeActionMethodValidators()... | [
"public",
"function",
"processRequest",
"(",
"RequestInterface",
"$",
"request",
",",
"ResponseInterface",
"$",
"response",
")",
"{",
"$",
"this",
"->",
"initializeController",
"(",
"$",
"request",
",",
"$",
"response",
")",
";",
"$",
"this",
"->",
"actionMeth... | Handles a request. The result output is returned by altering the given response.
@param RequestInterface $request The request object
@param ResponseInterface|ActionResponse $response The response, modified by this handler
@return void
@throws UnsupportedRequestTypeException
@api | [
"Handles",
"a",
"request",
".",
"The",
"result",
"output",
"is",
"returned",
"by",
"altering",
"the",
"given",
"response",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L189-L217 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.resolveActionMethodName | protected function resolveActionMethodName()
{
$actionMethodName = $this->request->getControllerActionName() . 'Action';
if (!is_callable([$this, $actionMethodName])) {
throw new NoSuchActionException(sprintf('An action "%s" does not exist in controller "%s".', $actionMethodName, get_cla... | php | protected function resolveActionMethodName()
{
$actionMethodName = $this->request->getControllerActionName() . 'Action';
if (!is_callable([$this, $actionMethodName])) {
throw new NoSuchActionException(sprintf('An action "%s" does not exist in controller "%s".', $actionMethodName, get_cla... | [
"protected",
"function",
"resolveActionMethodName",
"(",
")",
"{",
"$",
"actionMethodName",
"=",
"$",
"this",
"->",
"request",
"->",
"getControllerActionName",
"(",
")",
".",
"'Action'",
";",
"if",
"(",
"!",
"is_callable",
"(",
"[",
"$",
"this",
",",
"$",
... | Resolves and checks the current action method name
@return string Method name of the current action
@throws NoSuchActionException
@throws InvalidActionVisibilityException | [
"Resolves",
"and",
"checks",
"the",
"current",
"action",
"method",
"name"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L226-L237 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.initializeActionMethodArguments | protected function initializeActionMethodArguments()
{
$actionMethodParameters = static::getActionMethodParameters($this->objectManager);
if (isset($actionMethodParameters[$this->actionMethodName])) {
$methodParameters = $actionMethodParameters[$this->actionMethodName];
} else {
... | php | protected function initializeActionMethodArguments()
{
$actionMethodParameters = static::getActionMethodParameters($this->objectManager);
if (isset($actionMethodParameters[$this->actionMethodName])) {
$methodParameters = $actionMethodParameters[$this->actionMethodName];
} else {
... | [
"protected",
"function",
"initializeActionMethodArguments",
"(",
")",
"{",
"$",
"actionMethodParameters",
"=",
"static",
"::",
"getActionMethodParameters",
"(",
"$",
"this",
"->",
"objectManager",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"actionMethodParameters",
"["... | Implementation of the arguments initialization in the action controller:
Automatically registers arguments of the current action
Don't override this method - use initializeAction() instead.
@return void
@throws InvalidArgumentTypeException
@see initializeArguments() | [
"Implementation",
"of",
"the",
"arguments",
"initialization",
"in",
"the",
"action",
"controller",
":",
"Automatically",
"registers",
"arguments",
"of",
"the",
"current",
"action"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L249-L275 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.getActionMethodParameters | public static function getActionMethodParameters($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = [];
$className = get_called_class();
$methodNames = get_class_methods($className);
foreach ($methodNames as $methodName) {
... | php | public static function getActionMethodParameters($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = [];
$className = get_called_class();
$methodNames = get_class_methods($className);
foreach ($methodNames as $methodName) {
... | [
"public",
"static",
"function",
"getActionMethodParameters",
"(",
"$",
"objectManager",
")",
"{",
"$",
"reflectionService",
"=",
"$",
"objectManager",
"->",
"get",
"(",
"ReflectionService",
"::",
"class",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"cl... | Returns a map of action method names and their parameters.
@param ObjectManagerInterface $objectManager
@return array Array of method parameters by action name
@Flow\CompileStatic | [
"Returns",
"a",
"map",
"of",
"action",
"method",
"names",
"and",
"their",
"parameters",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L284-L299 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.getInformationNeededForInitializeActionMethodValidators | protected function getInformationNeededForInitializeActionMethodValidators()
{
return [
static::getActionValidationGroups($this->objectManager),
static::getActionMethodParameters($this->objectManager),
static::getActionValidateAnnotationData($this->objectManager),
... | php | protected function getInformationNeededForInitializeActionMethodValidators()
{
return [
static::getActionValidationGroups($this->objectManager),
static::getActionMethodParameters($this->objectManager),
static::getActionValidateAnnotationData($this->objectManager),
... | [
"protected",
"function",
"getInformationNeededForInitializeActionMethodValidators",
"(",
")",
"{",
"return",
"[",
"static",
"::",
"getActionValidationGroups",
"(",
"$",
"this",
"->",
"objectManager",
")",
",",
"static",
"::",
"getActionMethodParameters",
"(",
"$",
"this... | This is a helper method purely used to make initializeActionMethodValidators()
testable without mocking static methods.
@return array | [
"This",
"is",
"a",
"helper",
"method",
"purely",
"used",
"to",
"make",
"initializeActionMethodValidators",
"()",
"testable",
"without",
"mocking",
"static",
"methods",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L307-L315 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.initializeActionMethodValidators | protected function initializeActionMethodValidators()
{
list($validateGroupAnnotations, $actionMethodParameters, $actionValidateAnnotations, $actionIgnoredArguments) = $this->getInformationNeededForInitializeActionMethodValidators();
if (isset($validateGroupAnnotations[$this->actionMethodName])) {
... | php | protected function initializeActionMethodValidators()
{
list($validateGroupAnnotations, $actionMethodParameters, $actionValidateAnnotations, $actionIgnoredArguments) = $this->getInformationNeededForInitializeActionMethodValidators();
if (isset($validateGroupAnnotations[$this->actionMethodName])) {
... | [
"protected",
"function",
"initializeActionMethodValidators",
"(",
")",
"{",
"list",
"(",
"$",
"validateGroupAnnotations",
",",
"$",
"actionMethodParameters",
",",
"$",
"actionValidateAnnotations",
",",
"$",
"actionIgnoredArguments",
")",
"=",
"$",
"this",
"->",
"getIn... | Adds the needed validators to the Arguments:
- Validators checking the data type from the @param annotation
- Custom validators specified with validate annotations.
- Model-based validators (validate annotations in the model)
- Custom model validator classes
@return void | [
"Adds",
"the",
"needed",
"validators",
"to",
"the",
"Arguments",
":"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L327-L370 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.getActionValidationGroups | public static function getActionValidationGroups($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = [];
$className = get_called_class();
$methodNames = get_class_methods($className);
foreach ($methodNames as $methodName) {
... | php | public static function getActionValidationGroups($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = [];
$className = get_called_class();
$methodNames = get_class_methods($className);
foreach ($methodNames as $methodName) {
... | [
"public",
"static",
"function",
"getActionValidationGroups",
"(",
"$",
"objectManager",
")",
"{",
"$",
"reflectionService",
"=",
"$",
"objectManager",
"->",
"get",
"(",
"ReflectionService",
"::",
"class",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"cl... | Returns a map of action method names and their validation groups.
@param ObjectManagerInterface $objectManager
@return array Array of validation groups by action method name
@Flow\CompileStatic | [
"Returns",
"a",
"map",
"of",
"action",
"method",
"names",
"and",
"their",
"validation",
"groups",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L379-L397 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.getActionValidateAnnotationData | public static function getActionValidateAnnotationData($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = [];
$className = get_called_class();
$methodNames = get_class_methods($className);
foreach ($methodNames as $methodName) {
... | php | public static function getActionValidateAnnotationData($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = [];
$className = get_called_class();
$methodNames = get_class_methods($className);
foreach ($methodNames as $methodName) {
... | [
"public",
"static",
"function",
"getActionValidateAnnotationData",
"(",
"$",
"objectManager",
")",
"{",
"$",
"reflectionService",
"=",
"$",
"objectManager",
"->",
"get",
"(",
"ReflectionService",
"::",
"class",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"$",... | Returns a map of action method names and their validation parameters.
@param ObjectManagerInterface $objectManager
@return array Array of validate annotation parameters by action method name
@Flow\CompileStatic | [
"Returns",
"a",
"map",
"of",
"action",
"method",
"names",
"and",
"their",
"validation",
"parameters",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L406-L428 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.callActionMethod | protected function callActionMethod()
{
$preparedArguments = [];
foreach ($this->arguments as $argument) {
$preparedArguments[] = $argument->getValue();
}
$validationResult = $this->arguments->getValidationResults();
if (!$validationResult->hasErrors()) {
... | php | protected function callActionMethod()
{
$preparedArguments = [];
foreach ($this->arguments as $argument) {
$preparedArguments[] = $argument->getValue();
}
$validationResult = $this->arguments->getValidationResults();
if (!$validationResult->hasErrors()) {
... | [
"protected",
"function",
"callActionMethod",
"(",
")",
"{",
"$",
"preparedArguments",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"arguments",
"as",
"$",
"argument",
")",
"{",
"$",
"preparedArguments",
"[",
"]",
"=",
"$",
"argument",
"->",
"ge... | Calls the specified action method and passes the arguments.
If the action returns a string, it is appended to the content in the
response object. If the action doesn't return anything and a valid
view exists, the view is rendered automatically.
TODO: In next major this will no longer append content and the response w... | [
"Calls",
"the",
"specified",
"action",
"method",
"and",
"passes",
"the",
"arguments",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L455-L503 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.resolveView | protected function resolveView()
{
$viewsConfiguration = $this->viewConfigurationManager->getViewConfiguration($this->request);
$viewObjectName = $this->defaultViewImplementation;
if (!empty($this->defaultViewObjectName)) {
$viewObjectName = $this->defaultViewObjectName;
... | php | protected function resolveView()
{
$viewsConfiguration = $this->viewConfigurationManager->getViewConfiguration($this->request);
$viewObjectName = $this->defaultViewImplementation;
if (!empty($this->defaultViewObjectName)) {
$viewObjectName = $this->defaultViewObjectName;
... | [
"protected",
"function",
"resolveView",
"(",
")",
"{",
"$",
"viewsConfiguration",
"=",
"$",
"this",
"->",
"viewConfigurationManager",
"->",
"getViewConfiguration",
"(",
"$",
"this",
"->",
"request",
")",
";",
"$",
"viewObjectName",
"=",
"$",
"this",
"->",
"def... | Prepares a view for the current action and stores it in $this->view.
By default, this method tries to locate a view with a name matching
the current action.
@return ViewInterface the resolved view
@throws ViewNotFoundException if no view can be resolved | [
"Prepares",
"a",
"view",
"for",
"the",
"current",
"action",
"and",
"stores",
"it",
"in",
"$this",
"-",
">",
"view",
".",
"By",
"default",
"this",
"method",
"tries",
"to",
"locate",
"a",
"view",
"with",
"a",
"name",
"matching",
"the",
"current",
"action",... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L569-L590 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.resolveViewObjectName | protected function resolveViewObjectName()
{
$possibleViewObjectName = $this->viewObjectNamePattern;
$packageKey = $this->request->getControllerPackageKey();
$subpackageKey = $this->request->getControllerSubpackageKey();
$format = $this->request->getFormat();
if ($subpackage... | php | protected function resolveViewObjectName()
{
$possibleViewObjectName = $this->viewObjectNamePattern;
$packageKey = $this->request->getControllerPackageKey();
$subpackageKey = $this->request->getControllerSubpackageKey();
$format = $this->request->getFormat();
if ($subpackage... | [
"protected",
"function",
"resolveViewObjectName",
"(",
")",
"{",
"$",
"possibleViewObjectName",
"=",
"$",
"this",
"->",
"viewObjectNamePattern",
";",
"$",
"packageKey",
"=",
"$",
"this",
"->",
"request",
"->",
"getControllerPackageKey",
"(",
")",
";",
"$",
"subp... | Determines the fully qualified view object name.
@return mixed The fully qualified view object name or false if no matching view could be found.
@api | [
"Determines",
"the",
"fully",
"qualified",
"view",
"object",
"name",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L598-L620 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.handleTargetNotFoundError | protected function handleTargetNotFoundError()
{
foreach (array_keys($this->request->getArguments()) as $argumentName) {
/** @var TargetNotFoundError $targetNotFoundError */
$targetNotFoundError = $this->arguments->getValidationResults()->forProperty($argumentName)->getFirstError(Tar... | php | protected function handleTargetNotFoundError()
{
foreach (array_keys($this->request->getArguments()) as $argumentName) {
/** @var TargetNotFoundError $targetNotFoundError */
$targetNotFoundError = $this->arguments->getValidationResults()->forProperty($argumentName)->getFirstError(Tar... | [
"protected",
"function",
"handleTargetNotFoundError",
"(",
")",
"{",
"foreach",
"(",
"array_keys",
"(",
"$",
"this",
"->",
"request",
"->",
"getArguments",
"(",
")",
")",
"as",
"$",
"argumentName",
")",
"{",
"/** @var TargetNotFoundError $targetNotFoundError */",
"$... | Checks if the arguments validation result contain errors of type TargetNotFoundError and throws a TargetNotFoundException if that's the case for a top-level object.
You can override this method (or the errorAction()) if you need a different behavior
@return void
@throws TargetNotFoundException
@api | [
"Checks",
"if",
"the",
"arguments",
"validation",
"result",
"contain",
"errors",
"of",
"type",
"TargetNotFoundError",
"and",
"throws",
"a",
"TargetNotFoundException",
"if",
"that",
"s",
"the",
"case",
"for",
"a",
"top",
"-",
"level",
"object",
".",
"You",
"can... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L663-L672 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.addErrorFlashMessage | protected function addErrorFlashMessage()
{
$errorFlashMessage = $this->getErrorFlashMessage();
if ($errorFlashMessage !== false) {
$this->flashMessageContainer->addMessage($errorFlashMessage);
}
} | php | protected function addErrorFlashMessage()
{
$errorFlashMessage = $this->getErrorFlashMessage();
if ($errorFlashMessage !== false) {
$this->flashMessageContainer->addMessage($errorFlashMessage);
}
} | [
"protected",
"function",
"addErrorFlashMessage",
"(",
")",
"{",
"$",
"errorFlashMessage",
"=",
"$",
"this",
"->",
"getErrorFlashMessage",
"(",
")",
";",
"if",
"(",
"$",
"errorFlashMessage",
"!==",
"false",
")",
"{",
"$",
"this",
"->",
"flashMessageContainer",
... | If an error occurred during this request, this adds a flash message describing the error to the flash
message container.
@return void | [
"If",
"an",
"error",
"occurred",
"during",
"this",
"request",
"this",
"adds",
"a",
"flash",
"message",
"describing",
"the",
"error",
"to",
"the",
"flash",
"message",
"container",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L680-L686 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.forwardToReferringRequest | protected function forwardToReferringRequest()
{
$referringRequest = $this->request->getReferringRequest();
if ($referringRequest === null) {
return;
}
$packageKey = $referringRequest->getControllerPackageKey();
$subpackageKey = $referringRequest->getControllerSub... | php | protected function forwardToReferringRequest()
{
$referringRequest = $this->request->getReferringRequest();
if ($referringRequest === null) {
return;
}
$packageKey = $referringRequest->getControllerPackageKey();
$subpackageKey = $referringRequest->getControllerSub... | [
"protected",
"function",
"forwardToReferringRequest",
"(",
")",
"{",
"$",
"referringRequest",
"=",
"$",
"this",
"->",
"request",
"->",
"getReferringRequest",
"(",
")",
";",
"if",
"(",
"$",
"referringRequest",
"===",
"null",
")",
"{",
"return",
";",
"}",
"$",... | If information on the request before the current request was sent, this method forwards back
to the originating request. This effectively ends processing of the current request, so do not
call this method before you have finished the necessary business logic!
@return void
@throws ForwardException | [
"If",
"information",
"on",
"the",
"request",
"before",
"the",
"current",
"request",
"was",
"sent",
"this",
"method",
"forwards",
"back",
"to",
"the",
"originating",
"request",
".",
"This",
"effectively",
"ends",
"processing",
"of",
"the",
"current",
"request",
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L696-L712 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/ActionController.php | ActionController.getFlattenedValidationErrorMessage | protected function getFlattenedValidationErrorMessage()
{
$outputMessage = 'Validation failed while trying to call ' . get_class($this) . '->' . $this->actionMethodName . '().' . PHP_EOL;
$logMessage = $outputMessage;
foreach ($this->arguments->getValidationResults()->getFlattenedErrors() a... | php | protected function getFlattenedValidationErrorMessage()
{
$outputMessage = 'Validation failed while trying to call ' . get_class($this) . '->' . $this->actionMethodName . '().' . PHP_EOL;
$logMessage = $outputMessage;
foreach ($this->arguments->getValidationResults()->getFlattenedErrors() a... | [
"protected",
"function",
"getFlattenedValidationErrorMessage",
"(",
")",
"{",
"$",
"outputMessage",
"=",
"'Validation failed while trying to call '",
".",
"get_class",
"(",
"$",
"this",
")",
".",
"'->'",
".",
"$",
"this",
"->",
"actionMethodName",
".",
"'().'",
".",... | Returns a string containing all validation errors separated by PHP_EOL.
@return string | [
"Returns",
"a",
"string",
"containing",
"all",
"validation",
"errors",
"separated",
"by",
"PHP_EOL",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/ActionController.php#L719-L732 |
neos/flow-development-collection | Neos.Flow/Classes/Security/RequestPattern/Host.php | Host.matchRequest | public function matchRequest(RequestInterface $request)
{
if (!isset($this->options['hostPattern'])) {
throw new InvalidRequestPatternException('Missing option "hostPattern" in the Host request pattern configuration', 1446224510);
}
if (!$request instanceof ActionRequest) {
... | php | public function matchRequest(RequestInterface $request)
{
if (!isset($this->options['hostPattern'])) {
throw new InvalidRequestPatternException('Missing option "hostPattern" in the Host request pattern configuration', 1446224510);
}
if (!$request instanceof ActionRequest) {
... | [
"public",
"function",
"matchRequest",
"(",
"RequestInterface",
"$",
"request",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"'hostPattern'",
"]",
")",
")",
"{",
"throw",
"new",
"InvalidRequestPatternException",
"(",
"'Missing opti... | Matches a \Neos\Flow\Mvc\RequestInterface against its set host pattern rules
@param RequestInterface $request The request that should be matched
@return boolean true if the pattern matched, false otherwise
@throws InvalidRequestPatternException | [
"Matches",
"a",
"\\",
"Neos",
"\\",
"Flow",
"\\",
"Mvc",
"\\",
"RequestInterface",
"against",
"its",
"set",
"host",
"pattern",
"rules"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/RequestPattern/Host.php#L50-L60 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Format/NumberViewHelper.php | NumberViewHelper.initializeArguments | public function initializeArguments()
{
$this->registerArgument('decimals', 'integer', 'The number of digits after the decimal point', false, 2);
$this->registerArgument('decimalSeparator', 'string', 'The decimal point character', false, '.');
$this->registerArgument('thousandsSeparator', 's... | php | public function initializeArguments()
{
$this->registerArgument('decimals', 'integer', 'The number of digits after the decimal point', false, 2);
$this->registerArgument('decimalSeparator', 'string', 'The decimal point character', false, '.');
$this->registerArgument('thousandsSeparator', 's... | [
"public",
"function",
"initializeArguments",
"(",
")",
"{",
"$",
"this",
"->",
"registerArgument",
"(",
"'decimals'",
",",
"'integer'",
",",
"'The number of digits after the decimal point'",
",",
"false",
",",
"2",
")",
";",
"$",
"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/NumberViewHelper.php#L73-L79 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Format/NumberViewHelper.php | NumberViewHelper.render | public function render()
{
$stringToFormat = $this->renderChildren();
$useLocale = $this->getLocale();
if ($useLocale !== null) {
try {
$output = $this->numberFormatter->formatDecimalNumber($stringToFormat, $useLocale, $this->arguments['localeFormatLength']);
... | php | public function render()
{
$stringToFormat = $this->renderChildren();
$useLocale = $this->getLocale();
if ($useLocale !== null) {
try {
$output = $this->numberFormatter->formatDecimalNumber($stringToFormat, $useLocale, $this->arguments['localeFormatLength']);
... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"stringToFormat",
"=",
"$",
"this",
"->",
"renderChildren",
"(",
")",
";",
"$",
"useLocale",
"=",
"$",
"this",
"->",
"getLocale",
"(",
")",
";",
"if",
"(",
"$",
"useLocale",
"!==",
"null",
")",
"{",... | Format the numeric value as a number with grouped thousands, decimal point and
precision.
@return string The formatted number
@api
@throws ViewHelperException | [
"Format",
"the",
"numeric",
"value",
"as",
"a",
"number",
"with",
"grouped",
"thousands",
"decimal",
"point",
"and",
"precision",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/NumberViewHelper.php#L89-L104 |
neos/flow-development-collection | Neos.Flow.Log/Classes/DefaultLogger.php | DefaultLogger.setBackend | public function setBackend(Backend\BackendInterface $backend)
{
if ($this->psrCompatibleLoggerWasInjected) {
throw new Exception('A PSR-3 logger was injected so setting backends is not possible. Create a new instance.', 1515342951935);
}
foreach ($this->backends as $backend) {
... | php | public function setBackend(Backend\BackendInterface $backend)
{
if ($this->psrCompatibleLoggerWasInjected) {
throw new Exception('A PSR-3 logger was injected so setting backends is not possible. Create a new instance.', 1515342951935);
}
foreach ($this->backends as $backend) {
... | [
"public",
"function",
"setBackend",
"(",
"Backend",
"\\",
"BackendInterface",
"$",
"backend",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"psrCompatibleLoggerWasInjected",
")",
"{",
"throw",
"new",
"Exception",
"(",
"'A PSR-3 logger was injected so setting backends is not p... | Sets the given backend as the only backend for this Logger.
This method allows for conveniently injecting a backend through some Objects.yaml configuration.
@param Backend\BackendInterface $backend A backend implementation
@return void
@api
@throws Exception | [
"Sets",
"the",
"given",
"backend",
"as",
"the",
"only",
"backend",
"for",
"this",
"Logger",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/DefaultLogger.php#L102-L113 |
neos/flow-development-collection | Neos.Flow.Log/Classes/DefaultLogger.php | DefaultLogger.addBackend | public function addBackend(Backend\BackendInterface $backend)
{
if ($this->psrCompatibleLoggerWasInjected) {
throw new Exception('A PSR-3 logger was injected so adding backends is not possible. Create a new instance.', 1515343013004);
}
$this->backends->attach($backend);
} | php | public function addBackend(Backend\BackendInterface $backend)
{
if ($this->psrCompatibleLoggerWasInjected) {
throw new Exception('A PSR-3 logger was injected so adding backends is not possible. Create a new instance.', 1515343013004);
}
$this->backends->attach($backend);
} | [
"public",
"function",
"addBackend",
"(",
"Backend",
"\\",
"BackendInterface",
"$",
"backend",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"psrCompatibleLoggerWasInjected",
")",
"{",
"throw",
"new",
"Exception",
"(",
"'A PSR-3 logger was injected so adding backends is not po... | Adds the backend to which the logger sends the logging data
@param Backend\BackendInterface $backend A backend implementation
@return void
@api
@throws Exception | [
"Adds",
"the",
"backend",
"to",
"which",
"the",
"logger",
"sends",
"the",
"logging",
"data"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/DefaultLogger.php#L123-L130 |
neos/flow-development-collection | Neos.Flow.Log/Classes/DefaultLogger.php | DefaultLogger.removeBackend | public function removeBackend(Backend\BackendInterface $backend)
{
if ($this->psrCompatibleLoggerWasInjected) {
throw new Exception('A PSR-3 logger was injected so removing backends is not possible. Create a new instance.', 1515343007859);
}
if (!$this->backends->contains($backe... | php | public function removeBackend(Backend\BackendInterface $backend)
{
if ($this->psrCompatibleLoggerWasInjected) {
throw new Exception('A PSR-3 logger was injected so removing backends is not possible. Create a new instance.', 1515343007859);
}
if (!$this->backends->contains($backe... | [
"public",
"function",
"removeBackend",
"(",
"Backend",
"\\",
"BackendInterface",
"$",
"backend",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"psrCompatibleLoggerWasInjected",
")",
"{",
"throw",
"new",
"Exception",
"(",
"'A PSR-3 logger was injected so removing backends is n... | Runs the close() method of a backend and removes the backend
from the logger.
@param Backend\BackendInterface $backend The backend to remove
@return void
@throws NoSuchBackendException if the given backend is unknown to this logger
@api
@throws Exception | [
"Runs",
"the",
"close",
"()",
"method",
"of",
"a",
"backend",
"and",
"removes",
"the",
"backend",
"from",
"the",
"logger",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/DefaultLogger.php#L142-L155 |
neos/flow-development-collection | Neos.Flow.Log/Classes/DefaultLogger.php | DefaultLogger.log | public function log($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null)
{
if ($this->internalPsrCompatibleLogger === null) {
$this->internalPsrCompatibleLogger = $this->createDefaultPsrLogger();
}
$psrLogLevel = self... | php | public function log($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null)
{
if ($this->internalPsrCompatibleLogger === null) {
$this->internalPsrCompatibleLogger = $this->createDefaultPsrLogger();
}
$psrLogLevel = self... | [
"public",
"function",
"log",
"(",
"$",
"message",
",",
"$",
"severity",
"=",
"LOG_INFO",
",",
"$",
"additionalData",
"=",
"null",
",",
"$",
"packageKey",
"=",
"null",
",",
"$",
"className",
"=",
"null",
",",
"$",
"methodName",
"=",
"null",
")",
"{",
... | Writes the given message along with the additional information into the log.
@param string $message The message to log
@param integer $severity An integer value, one of the LOG_* constants
@param mixed $additionalData A variable containing more information about the event to be logged
@param string $packageKey Key of ... | [
"Writes",
"the",
"given",
"message",
"along",
"with",
"the",
"additional",
"information",
"into",
"the",
"log",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/DefaultLogger.php#L169-L188 |
neos/flow-development-collection | Neos.Flow.Log/Classes/DefaultLogger.php | DefaultLogger.shutdownObject | public function shutdownObject()
{
$this->internalPsrCompatibleLogger = null;
foreach ($this->backends as $backend) {
$backend->close();
}
} | php | public function shutdownObject()
{
$this->internalPsrCompatibleLogger = null;
foreach ($this->backends as $backend) {
$backend->close();
}
} | [
"public",
"function",
"shutdownObject",
"(",
")",
"{",
"$",
"this",
"->",
"internalPsrCompatibleLogger",
"=",
"null",
";",
"foreach",
"(",
"$",
"this",
"->",
"backends",
"as",
"$",
"backend",
")",
"{",
"$",
"backend",
"->",
"close",
"(",
")",
";",
"}",
... | Cleanly closes all registered backends before destructing this Logger
@return void | [
"Cleanly",
"closes",
"all",
"registered",
"backends",
"before",
"destructing",
"this",
"Logger"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/DefaultLogger.php#L242-L248 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validate | public function validate($value, $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_array($schema)) {
foreach ($schema as $possibleTypeKey => $possibleTypeSchema) {
if (substr($possibleTypeKey, 0, 1) === '@') {
if (array_key... | php | public function validate($value, $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_array($schema)) {
foreach ($schema as $possibleTypeKey => $possibleTypeSchema) {
if (substr($possibleTypeKey, 0, 1) === '@') {
if (array_key... | [
"public",
"function",
"validate",
"(",
"$",
"value",
",",
"$",
"schema",
",",
"array",
"$",
"types",
"=",
"[",
"]",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"schema",
")... | Validate array with the given schema
The following properties are handled in given $schema:
- type : value is of given type or schema (array of schemas is allowed)
- disallow : value is NOT of given type or schema (array of schemas is allowed)
- enum : value is equal to one of the given values
@param mixed $value val... | [
"Validate",
"array",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L75-L144 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateType | protected function validateType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (isset($schema['type'])) {
if (is_array($schema['type'])) {
$type = $schema['type'][0];
if (in_array(gettype($value), $schema['type']))... | php | protected function validateType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (isset($schema['type'])) {
if (is_array($schema['type'])) {
$type = $schema['type'][0];
if (in_array(gettype($value), $schema['type']))... | [
"protected",
"function",
"validateType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
",",
"array",
"$",
"types",
"=",
"[",
"]",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
... | Validate a value for a given type
@param mixed $value
@param array $schema
@param array $types
@return ErrorResult | [
"Validate",
"a",
"value",
"for",
"a",
"given",
"type"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L154-L206 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateTypeArray | protected function validateTypeArray($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
$isValid = false;
foreach ($schema['type'] as $type) {
$partResult = $this->validate($value, $type, $types);
if ($partResult->hasErrors() === fal... | php | protected function validateTypeArray($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
$isValid = false;
foreach ($schema['type'] as $type) {
$partResult = $this->validate($value, $type, $types);
if ($partResult->hasErrors() === fal... | [
"protected",
"function",
"validateTypeArray",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
",",
"array",
"$",
"types",
"=",
"[",
"]",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"$",
"isValid",
"=",
"false"... | Validate a value with a given list of allowed types
@param mixed $value
@param array $schema
@param array $types
@return ErrorResult | [
"Validate",
"a",
"value",
"with",
"a",
"given",
"list",
"of",
"allowed",
"types"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L216-L243 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateNumberType | protected function validateNumberType($value, array $schema): ErrorResult
{
$result = new ErrorResult();
if (is_numeric($value) === false) {
$result->addError($this->createError('type=number', 'type=' . gettype($value)));
return $result;
}
if (isset($schema['... | php | protected function validateNumberType($value, array $schema): ErrorResult
{
$result = new ErrorResult();
if (is_numeric($value) === false) {
$result->addError($this->createError('type=number', 'type=' . gettype($value)));
return $result;
}
if (isset($schema['... | [
"protected",
"function",
"validateNumberType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"is_numeric",
"(",
"$",
"value",
")",
"===",
"false",
")",
... | Validate an integer value with the given schema
The following properties are handled in given $schema:
- maximum : maximum allowed value
- minimum : minimum allowed value
- exclusiveMinimum : boolean to use exclusive minimum
- exclusiveMaximum : boolean to use exclusive maximum
- divisibleBy : value is divisibleBy the... | [
"Validate",
"an",
"integer",
"value",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L259-L296 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateBooleanType | protected function validateBooleanType($value, array $schema): ErrorResult
{
$result = new ErrorResult();
if (is_bool($value) === false) {
$result->addError($this->createError('type=boolean', 'type=' . gettype($value)));
return $result;
}
return $result;
} | php | protected function validateBooleanType($value, array $schema): ErrorResult
{
$result = new ErrorResult();
if (is_bool($value) === false) {
$result->addError($this->createError('type=boolean', 'type=' . gettype($value)));
return $result;
}
return $result;
} | [
"protected",
"function",
"validateBooleanType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"is_bool",
"(",
"$",
"value",
")",
"===",
"false",
")",
"{... | Validate a boolean value with the given schema
@param mixed $value
@param array $schema
@return ErrorResult | [
"Validate",
"a",
"boolean",
"value",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L328-L336 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateArrayType | protected function validateArrayType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_array($value) === false || $this->isNumericallyIndexedArray($value) === false) {
$result->addError($this->createError('type=array', 'type=' . gettype($value))... | php | protected function validateArrayType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_array($value) === false || $this->isNumericallyIndexedArray($value) === false) {
$result->addError($this->createError('type=array', 'type=' . gettype($value))... | [
"protected",
"function",
"validateArrayType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
",",
"array",
"$",
"types",
"=",
"[",
"]",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
... | Validate an array value with the given schema
The following properties are handled in given $schema:
- minItems : minimal allowed item Number
- maxItems : maximal allowed item Number
- items : schema for all instances of the array
- uniqueItems : allow only unique values
@param mixed $value
@param array $schema
@para... | [
"Validate",
"an",
"array",
"value",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L352-L390 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateDictionaryType | protected function validateDictionaryType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_array($value) === false || $this->isDictionary($value) === false) {
$result->addError($this->createError('type=dictionary', 'type=' . gettype($value)));
... | php | protected function validateDictionaryType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_array($value) === false || $this->isDictionary($value) === false) {
$result->addError($this->createError('type=dictionary', 'type=' . gettype($value)));
... | [
"protected",
"function",
"validateDictionaryType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
",",
"array",
"$",
"types",
"=",
"[",
"]",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"is_array",
... | Validate a dictionary value with the given schema
The following properties are handled in given $schema:
- properties : array of keys and schemas that have to validate
- formatProperties : dictionary of schemas, the schemas are used to validate all keys that match the string-format
- patternProperties : dictionary of ... | [
"Validate",
"a",
"dictionary",
"value",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L406-L480 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateStringType | protected function validateStringType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_string($value) === false) {
$result->addError($this->createError('type=string', 'type=' . gettype($value)));
return $result;
}
i... | php | protected function validateStringType($value, array $schema, array $types = []): ErrorResult
{
$result = new ErrorResult();
if (is_string($value) === false) {
$result->addError($this->createError('type=string', 'type=' . gettype($value)));
return $result;
}
i... | [
"protected",
"function",
"validateStringType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
",",
"array",
"$",
"types",
"=",
"[",
"]",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"is_string",
"("... | Validate a string value with the given schema
The following properties are handled in given $schema:
- pattern : Regular expression that matches the $value
- minLength : minimal allowed string length
- maxLength : maximal allowed string length
- format : some predefined formats
[date-time|date|time|uri|email|ipv4|ipv... | [
"Validate",
"a",
"string",
"value",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L498-L596 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.validateNullType | protected function validateNullType($value, array $schema): ErrorResult
{
$result = new ErrorResult();
if ($value !== null) {
$result->addError($this->createError('type=NULL', 'type=' . gettype($value)));
}
return $result;
} | php | protected function validateNullType($value, array $schema): ErrorResult
{
$result = new ErrorResult();
if ($value !== null) {
$result->addError($this->createError('type=NULL', 'type=' . gettype($value)));
}
return $result;
} | [
"protected",
"function",
"validateNullType",
"(",
"$",
"value",
",",
"array",
"$",
"schema",
")",
":",
"ErrorResult",
"{",
"$",
"result",
"=",
"new",
"ErrorResult",
"(",
")",
";",
"if",
"(",
"$",
"value",
"!==",
"null",
")",
"{",
"$",
"result",
"->",
... | Validate a null value with the given schema
@param mixed $value
@param array $schema
@return ErrorResult | [
"Validate",
"a",
"null",
"value",
"with",
"the",
"given",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L605-L612 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.createError | protected function createError(string $expectation, $value = null): Error
{
if ($value !== null) {
$error = new Error('expected: %s found: %s', 1328557141, [$expectation, $this->renderValue($value)],
'Validation Error');
} else {
$error = new Error($expectatio... | php | protected function createError(string $expectation, $value = null): Error
{
if ($value !== null) {
$error = new Error('expected: %s found: %s', 1328557141, [$expectation, $this->renderValue($value)],
'Validation Error');
} else {
$error = new Error($expectatio... | [
"protected",
"function",
"createError",
"(",
"string",
"$",
"expectation",
",",
"$",
"value",
"=",
"null",
")",
":",
"Error",
"{",
"if",
"(",
"$",
"value",
"!==",
"null",
")",
"{",
"$",
"error",
"=",
"new",
"Error",
"(",
"'expected: %s found: %s'",
",",
... | Create Error Object
@param string $expectation
@param mixed $value
@return Error | [
"Create",
"Error",
"Object"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L644-L653 |
neos/flow-development-collection | Neos.Utility.Schema/Classes/SchemaValidator.php | SchemaValidator.isNumericallyIndexedArray | protected function isNumericallyIndexedArray(array $phpArray): bool
{
foreach (array_keys($phpArray) as $key) {
if (is_numeric($key) === false) {
return false;
}
}
return true;
} | php | protected function isNumericallyIndexedArray(array $phpArray): bool
{
foreach (array_keys($phpArray) as $key) {
if (is_numeric($key) === false) {
return false;
}
}
return true;
} | [
"protected",
"function",
"isNumericallyIndexedArray",
"(",
"array",
"$",
"phpArray",
")",
":",
"bool",
"{",
"foreach",
"(",
"array_keys",
"(",
"$",
"phpArray",
")",
"as",
"$",
"key",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"key",
")",
"===",
"false"... | Determine whether the given php array is a plain numerically indexed array
@param array $phpArray
@return boolean | [
"Determine",
"whether",
"the",
"given",
"php",
"array",
"is",
"a",
"plain",
"numerically",
"indexed",
"array"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Schema/Classes/SchemaValidator.php#L674-L682 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php | RouteTags.merge | public function merge(RouteTags $tags): self
{
$mergedTags = array_unique(array_merge($this->tags, $tags->tags));
return new static($mergedTags);
} | php | public function merge(RouteTags $tags): self
{
$mergedTags = array_unique(array_merge($this->tags, $tags->tags));
return new static($mergedTags);
} | [
"public",
"function",
"merge",
"(",
"RouteTags",
"$",
"tags",
")",
":",
"self",
"{",
"$",
"mergedTags",
"=",
"array_unique",
"(",
"array_merge",
"(",
"$",
"this",
"->",
"tags",
",",
"$",
"tags",
"->",
"tags",
")",
")",
";",
"return",
"new",
"static",
... | Merges two instances of this class combining and unifying all tags
@param RouteTags $tags
@return RouteTags | [
"Merges",
"two",
"instances",
"of",
"this",
"class",
"combining",
"and",
"unifying",
"all",
"tags"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php#L85-L89 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php | RouteTags.withTag | public function withTag(string $tag): self
{
if ($this->has($tag)) {
return $this;
}
self::validateTag($tag);
$newTags = $this->tags;
$newTags[] = $tag;
return new static($newTags);
} | php | public function withTag(string $tag): self
{
if ($this->has($tag)) {
return $this;
}
self::validateTag($tag);
$newTags = $this->tags;
$newTags[] = $tag;
return new static($newTags);
} | [
"public",
"function",
"withTag",
"(",
"string",
"$",
"tag",
")",
":",
"self",
"{",
"if",
"(",
"$",
"this",
"->",
"has",
"(",
"$",
"tag",
")",
")",
"{",
"return",
"$",
"this",
";",
"}",
"self",
"::",
"validateTag",
"(",
"$",
"tag",
")",
";",
"$"... | Creates a new instance with the given $tag added
If the $tag has been added already, this instance is returned
@param string $tag
@return RouteTags | [
"Creates",
"a",
"new",
"instance",
"with",
"the",
"given",
"$tag",
"added",
"If",
"the",
"$tag",
"has",
"been",
"added",
"already",
"this",
"instance",
"is",
"returned"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php#L98-L107 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php | RouteTags.validateTag | private static function validateTag($tag)
{
if (!is_string($tag)) {
throw new \InvalidArgumentException(sprintf('RouteTags have to be strings, %s given', is_object($tag) ? get_class($tag) : gettype($tag)), 1512553153);
}
if (preg_match(self::PATTERN_TAG, $tag) !== 1) {
... | php | private static function validateTag($tag)
{
if (!is_string($tag)) {
throw new \InvalidArgumentException(sprintf('RouteTags have to be strings, %s given', is_object($tag) ? get_class($tag) : gettype($tag)), 1512553153);
}
if (preg_match(self::PATTERN_TAG, $tag) !== 1) {
... | [
"private",
"static",
"function",
"validateTag",
"(",
"$",
"tag",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"tag",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'RouteTags have to be strings, %s given'",
",",
"is_... | Checks the format of a given $tag string and throws an exception if it does not conform to the PATTERN_TAG regex
@param string $tag
@throws \InvalidArgumentException | [
"Checks",
"the",
"format",
"of",
"a",
"given",
"$tag",
"string",
"and",
"throws",
"an",
"exception",
"if",
"it",
"does",
"not",
"conform",
"to",
"the",
"PATTERN_TAG",
"regex"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php#L115-L123 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.set | public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null)
{
$this->connect();
if (!$this->cache instanceof FrontendInterface) {
throw new Exception('No cache frontend has been set yet via setCache().', 1259515600);
}
$this->remov... | php | public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null)
{
$this->connect();
if (!$this->cache instanceof FrontendInterface) {
throw new Exception('No cache frontend has been set yet via setCache().', 1259515600);
}
$this->remov... | [
"public",
"function",
"set",
"(",
"string",
"$",
"entryIdentifier",
",",
"string",
"$",
"data",
",",
"array",
"$",
"tags",
"=",
"[",
"]",
",",
"int",
"$",
"lifetime",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"if",
"(",
... | Saves data in the cache.
@param string $entryIdentifier An identifier for this specific cache entry
@param string $data The data to be stored
@param array $tags Tags to associate with this cache entry
@param integer $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. ... | [
"Saves",
"data",
"in",
"the",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L157-L188 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.get | public function get(string $entryIdentifier)
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('SELECT "content" FROM "' . $this->cacheTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?' . $this->getNotExpiredStatement());
$statementHandle->execute([$entry... | php | public function get(string $entryIdentifier)
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('SELECT "content" FROM "' . $this->cacheTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?' . $this->getNotExpiredStatement());
$statementHandle->execute([$entry... | [
"public",
"function",
"get",
"(",
"string",
"$",
"entryIdentifier",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'SELECT \"content\" FROM \"'",
".",
"$",
"this... | Loads data from the cache.
@param string $entryIdentifier An identifier which describes the cache entry to load
@return mixed The cache entry's content as a string or false if the cache entry could not be loaded
@throws Exception
@throws FilesException
@api | [
"Loads",
"data",
"from",
"the",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L199-L214 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.has | public function has(string $entryIdentifier): bool
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('SELECT COUNT("identifier") FROM "' . $this->cacheTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?' . $this->getNotExpiredStatement());
$statementHandle-... | php | public function has(string $entryIdentifier): bool
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('SELECT COUNT("identifier") FROM "' . $this->cacheTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?' . $this->getNotExpiredStatement());
$statementHandle-... | [
"public",
"function",
"has",
"(",
"string",
"$",
"entryIdentifier",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'SELECT COUNT(\"identifier\") FROM ... | Checks if a cache entry with the specified identifier exists.
@param string $entryIdentifier An identifier specifying the cache entry
@return boolean true if such an entry exists, false if not
@throws Exception
@throws FilesException
@api | [
"Checks",
"if",
"a",
"cache",
"entry",
"with",
"the",
"specified",
"identifier",
"exists",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L225-L232 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.remove | public function remove(string $entryIdentifier): bool
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?');
$statementHandle->execute([$entryIdentifier, $this->context(), $this-... | php | public function remove(string $entryIdentifier): bool
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?');
$statementHandle->execute([$entryIdentifier, $this->context(), $this-... | [
"public",
"function",
"remove",
"(",
"string",
"$",
"entryIdentifier",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'DELETE FROM \"'",
".",
"$",... | Removes all cache entries matching the specified identifier.
Usually this only affects one entry but if - for what reason ever -
old entries for the identifier still exist, they are removed as well.
@param string $entryIdentifier Specifies the cache entry to remove
@return boolean true if (at least) an entry could be ... | [
"Removes",
"all",
"cache",
"entries",
"matching",
"the",
"specified",
"identifier",
".",
"Usually",
"this",
"only",
"affects",
"one",
"entry",
"but",
"if",
"-",
"for",
"what",
"reason",
"ever",
"-",
"old",
"entries",
"for",
"the",
"identifier",
"still",
"exi... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L245-L256 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.flush | public function flush()
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=?');
try {
$statementHandle->execute([$this->context(), $this->cacheIdentifier]);
} catch (\PDOExceptio... | php | public function flush()
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=?');
try {
$statementHandle->execute([$this->context(), $this->cacheIdentifier]);
} catch (\PDOExceptio... | [
"public",
"function",
"flush",
"(",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'DELETE FROM \"'",
".",
"$",
"this",
"->",
"tagsTableName",
".",
"'\" WHERE ... | Removes all cache entries of this cache.
@return void
@throws Exception
@throws FilesException
@api | [
"Removes",
"all",
"cache",
"entries",
"of",
"this",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L266-L281 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.flushByTag | public function flushByTag(string $tag): int
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->cacheTableName . '" WHERE "context"=? AND "cache"=? AND "identifier" IN (SELECT "identifier" FROM "tags" WHERE "context"=? AND "cache"=? AND "tag"=?)');
... | php | public function flushByTag(string $tag): int
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->cacheTableName . '" WHERE "context"=? AND "cache"=? AND "identifier" IN (SELECT "identifier" FROM "tags" WHERE "context"=? AND "cache"=? AND "tag"=?)');
... | [
"public",
"function",
"flushByTag",
"(",
"string",
"$",
"tag",
")",
":",
"int",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'DELETE FROM \"'",
".",
"$",
"this"... | Removes all cache entries of this cache which are tagged by the specified tag.
@param string $tag The tag the entries must have
@return integer
@throws Exception
@throws FilesException
@api | [
"Removes",
"all",
"cache",
"entries",
"of",
"this",
"cache",
"which",
"are",
"tagged",
"by",
"the",
"specified",
"tag",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L292-L305 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.findIdentifiersByTag | public function findIdentifiersByTag(string $tag): array
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('SELECT "identifier" FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=? AND "tag"=?');
$statementHandle->execute([$this->context(), $this->cacheId... | php | public function findIdentifiersByTag(string $tag): array
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('SELECT "identifier" FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=? AND "tag"=?');
$statementHandle->execute([$this->context(), $this->cacheId... | [
"public",
"function",
"findIdentifiersByTag",
"(",
"string",
"$",
"tag",
")",
":",
"array",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'SELECT \"identifier\" FROM \... | Finds and returns all cache entry identifiers which are tagged by the
specified tag.
@param string $tag The tag to search for
@return array An array with identifiers of all matching entries. An empty array if no entries matched
@throws Exception
@throws FilesException
@api | [
"Finds",
"and",
"returns",
"all",
"cache",
"entry",
"identifiers",
"which",
"are",
"tagged",
"by",
"the",
"specified",
"tag",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L317-L324 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.collectGarbage | public function collectGarbage()
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=? AND "identifier" IN (SELECT "identifier" FROM "cache" WHERE "context"=? AND "cache"=? AND "lifetime" > 0 AND "created" +... | php | public function collectGarbage()
{
$this->connect();
$statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=? AND "identifier" IN (SELECT "identifier" FROM "cache" WHERE "context"=? AND "cache"=? AND "lifetime" > 0 AND "created" +... | [
"public",
"function",
"collectGarbage",
"(",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"statementHandle",
"=",
"$",
"this",
"->",
"databaseHandle",
"->",
"prepare",
"(",
"'DELETE FROM \"'",
".",
"$",
"this",
"->",
"tagsTableName",
".",
"'... | Does garbage collection
@return void
@throws Exception
@throws FilesException
@api | [
"Does",
"garbage",
"collection"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L334-L343 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.connect | protected function connect()
{
if ($this->databaseHandle !== null) {
return;
}
try {
$splitdsn = explode(':', $this->dataSourceName, 2);
$this->pdoDriver = $splitdsn[0];
if ($this->pdoDriver === 'sqlite' && !file_exists($splitdsn[1])) {
... | php | protected function connect()
{
if ($this->databaseHandle !== null) {
return;
}
try {
$splitdsn = explode(':', $this->dataSourceName, 2);
$this->pdoDriver = $splitdsn[0];
if ($this->pdoDriver === 'sqlite' && !file_exists($splitdsn[1])) {
... | [
"protected",
"function",
"connect",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"databaseHandle",
"!==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"$",
"splitdsn",
"=",
"explode",
"(",
"':'",
",",
"$",
"this",
"->",
"dataSourceName",
",",
"2... | Connect to the database
@return void
@throws Exception if the connection cannot be established
@throws FilesException | [
"Connect",
"to",
"the",
"database"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L362-L388 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.createCacheTables | protected function createCacheTables()
{
$this->connect();
try {
PdoHelper::importSql($this->databaseHandle, $this->pdoDriver, __DIR__ . '/../../Resources/Private/DDL.sql');
} catch (\PDOException $exception) {
throw new Exception('Could not create cache tables with D... | php | protected function createCacheTables()
{
$this->connect();
try {
PdoHelper::importSql($this->databaseHandle, $this->pdoDriver, __DIR__ . '/../../Resources/Private/DDL.sql');
} catch (\PDOException $exception) {
throw new Exception('Could not create cache tables with D... | [
"protected",
"function",
"createCacheTables",
"(",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"try",
"{",
"PdoHelper",
"::",
"importSql",
"(",
"$",
"this",
"->",
"databaseHandle",
",",
"$",
"this",
"->",
"pdoDriver",
",",
"__DIR__",
".",
"'/.... | Creates the tables needed for the cache backend.
@return void
@throws Exception if something goes wrong
@throws FilesException | [
"Creates",
"the",
"tables",
"needed",
"for",
"the",
"cache",
"backend",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L397-L405 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.key | public function key(): string
{
if ($this->cacheEntriesIterator === null) {
$this->rewind();
}
return $this->cacheEntriesIterator->key();
} | php | public function key(): string
{
if ($this->cacheEntriesIterator === null) {
$this->rewind();
}
return $this->cacheEntriesIterator->key();
} | [
"public",
"function",
"key",
"(",
")",
":",
"string",
"{",
"if",
"(",
"$",
"this",
"->",
"cacheEntriesIterator",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"cacheEntriesIterator",
"->",
"key",... | Returns the identifier of the current cache entry pointed to by the cache
entry iterator.
@return string
@api | [
"Returns",
"the",
"identifier",
"of",
"the",
"current",
"cache",
"entry",
"pointed",
"to",
"by",
"the",
"cache",
"entry",
"iterator",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L443-L449 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.valid | public function valid(): bool
{
if ($this->cacheEntriesIterator === null) {
$this->rewind();
}
return $this->cacheEntriesIterator->valid();
} | php | public function valid(): bool
{
if ($this->cacheEntriesIterator === null) {
$this->rewind();
}
return $this->cacheEntriesIterator->valid();
} | [
"public",
"function",
"valid",
"(",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"cacheEntriesIterator",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"cacheEntriesIterator",
"->",
"valid... | Checks if the current position of the cache entry iterator is valid.
@return boolean true if the current position is valid, otherwise false
@api | [
"Checks",
"if",
"the",
"current",
"position",
"of",
"the",
"cache",
"entry",
"iterator",
"is",
"valid",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L457-L463 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.rewind | public function rewind()
{
if ($this->cacheEntriesIterator !== null) {
$this->cacheEntriesIterator->rewind();
return;
}
$cacheEntries = [];
$statementHandle = $this->databaseHandle->prepare('SELECT "identifier", "content" FROM "' . $this->cacheTableName . '"... | php | public function rewind()
{
if ($this->cacheEntriesIterator !== null) {
$this->cacheEntriesIterator->rewind();
return;
}
$cacheEntries = [];
$statementHandle = $this->databaseHandle->prepare('SELECT "identifier", "content" FROM "' . $this->cacheTableName . '"... | [
"public",
"function",
"rewind",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cacheEntriesIterator",
"!==",
"null",
")",
"{",
"$",
"this",
"->",
"cacheEntriesIterator",
"->",
"rewind",
"(",
")",
";",
"return",
";",
"}",
"$",
"cacheEntries",
"=",
"[",
"... | Rewinds the cache entry iterator to the first element
and fetches cacheEntries.
@return void
@api | [
"Rewinds",
"the",
"cache",
"entry",
"iterator",
"to",
"the",
"first",
"element",
"and",
"fetches",
"cacheEntries",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L472-L496 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.setup | public function setup(): Result
{
$result = new Result();
try {
$this->connect();
$connection = DriverManager::getConnection(['pdo' => $this->databaseHandle]);
} catch (Exception | FilesException |DBALException $exception) {
$result->addError(new Error($ex... | php | public function setup(): Result
{
$result = new Result();
try {
$this->connect();
$connection = DriverManager::getConnection(['pdo' => $this->databaseHandle]);
} catch (Exception | FilesException |DBALException $exception) {
$result->addError(new Error($ex... | [
"public",
"function",
"setup",
"(",
")",
":",
"Result",
"{",
"$",
"result",
"=",
"new",
"Result",
"(",
")",
";",
"try",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"connection",
"=",
"DriverManager",
"::",
"getConnection",
"(",
"[",
"'pdo'... | Connects to the configured PDO database and adds/updates table schema if required
@return Result
@api | [
"Connects",
"to",
"the",
"configured",
"PDO",
"database",
"and",
"adds",
"/",
"updates",
"table",
"schema",
"if",
"required"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L515-L566 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.getStatus | public function getStatus(): Result
{
$result = new Result();
try {
$this->connect();
$connection = DriverManager::getConnection(['pdo' => $this->databaseHandle]);
} catch (\Exception $exception) {
$result->addError(new Error($exception->getMessage(), $exc... | php | public function getStatus(): Result
{
$result = new Result();
try {
$this->connect();
$connection = DriverManager::getConnection(['pdo' => $this->databaseHandle]);
} catch (\Exception $exception) {
$result->addError(new Error($exception->getMessage(), $exc... | [
"public",
"function",
"getStatus",
"(",
")",
":",
"Result",
"{",
"$",
"result",
"=",
"new",
"Result",
"(",
")",
";",
"try",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"connection",
"=",
"DriverManager",
"::",
"getConnection",
"(",
"[",
"'... | Validates that configured database is accessible and schema up to date
@return Result
@api | [
"Validates",
"that",
"configured",
"database",
"is",
"accessible",
"and",
"schema",
"up",
"to",
"date"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L574-L618 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/PdoBackend.php | PdoBackend.getCacheTablesSchema | private function getCacheTablesSchema(): Schema
{
$schema = new Schema();
$cacheTable = $schema->createTable($this->cacheTableName);
$cacheTable->addColumn('identifier', Type::STRING, ['length' => 250]);
$cacheTable->addColumn('cache', Type::STRING, ['length' => 250]);
$cach... | php | private function getCacheTablesSchema(): Schema
{
$schema = new Schema();
$cacheTable = $schema->createTable($this->cacheTableName);
$cacheTable->addColumn('identifier', Type::STRING, ['length' => 250]);
$cacheTable->addColumn('cache', Type::STRING, ['length' => 250]);
$cach... | [
"private",
"function",
"getCacheTablesSchema",
"(",
")",
":",
"Schema",
"{",
"$",
"schema",
"=",
"new",
"Schema",
"(",
")",
";",
"$",
"cacheTable",
"=",
"$",
"schema",
"->",
"createTable",
"(",
"$",
"this",
"->",
"cacheTableName",
")",
";",
"$",
"cacheTa... | Returns the Doctrine DBAL schema of the configured cache and tag tables
@return Schema | [
"Returns",
"the",
"Doctrine",
"DBAL",
"schema",
"of",
"the",
"configured",
"cache",
"and",
"tag",
"tables"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/PdoBackend.php#L625-L650 |
neos/flow-development-collection | Neos.Flow/Classes/Http/ContentStream.php | ContentStream.fromContents | public static function fromContents(string $contents): self
{
$handle = fopen('php://memory', 'r+');
fwrite($handle, $contents);
rewind($handle);
return new static($handle);
} | php | public static function fromContents(string $contents): self
{
$handle = fopen('php://memory', 'r+');
fwrite($handle, $contents);
rewind($handle);
return new static($handle);
} | [
"public",
"static",
"function",
"fromContents",
"(",
"string",
"$",
"contents",
")",
":",
"self",
"{",
"$",
"handle",
"=",
"fopen",
"(",
"'php://memory'",
",",
"'r+'",
")",
";",
"fwrite",
"(",
"$",
"handle",
",",
"$",
"contents",
")",
";",
"rewind",
"(... | Creates an instance representing the given $contents string
@param string $contents
@return self | [
"Creates",
"an",
"instance",
"representing",
"the",
"given",
"$contents",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/ContentStream.php#L58-L64 |
neos/flow-development-collection | Neos.Flow/Classes/Http/ContentStream.php | ContentStream.replace | public function replace($stream, $mode = 'r')
{
$this->close();
if (!is_resource($stream)) {
$stream = @fopen($stream, $mode);
}
if (!$this->isValidResource($stream)) {
throw new \InvalidArgumentException('Invalid stream provided; must be a string or stream r... | php | public function replace($stream, $mode = 'r')
{
$this->close();
if (!is_resource($stream)) {
$stream = @fopen($stream, $mode);
}
if (!$this->isValidResource($stream)) {
throw new \InvalidArgumentException('Invalid stream provided; must be a string or stream r... | [
"public",
"function",
"replace",
"(",
"$",
"stream",
",",
"$",
"mode",
"=",
"'r'",
")",
"{",
"$",
"this",
"->",
"close",
"(",
")",
";",
"if",
"(",
"!",
"is_resource",
"(",
"$",
"stream",
")",
")",
"{",
"$",
"stream",
"=",
"@",
"fopen",
"(",
"$"... | Attach a new stream/resource to the instance.
@param string|resource $stream
@param string $mode | [
"Attach",
"a",
"new",
"stream",
"/",
"resource",
"to",
"the",
"instance",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/ContentStream.php#L102-L114 |
neos/flow-development-collection | Neos.Flow/Classes/Http/ContentStream.php | ContentStream.isSeekable | public function isSeekable()
{
if (!$this->isValidResource($this->resource)) {
return false;
}
$meta = stream_get_meta_data($this->resource);
return $meta['seekable'];
} | php | public function isSeekable()
{
if (!$this->isValidResource($this->resource)) {
return false;
}
$meta = stream_get_meta_data($this->resource);
return $meta['seekable'];
} | [
"public",
"function",
"isSeekable",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidResource",
"(",
"$",
"this",
"->",
"resource",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"meta",
"=",
"stream_get_meta_data",
"(",
"$",
"this",
"->",
... | Returns whether or not the stream is seekable.
@return bool | [
"Returns",
"whether",
"or",
"not",
"the",
"stream",
"is",
"seekable",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/ContentStream.php#L169-L178 |
neos/flow-development-collection | Neos.Flow/Classes/Http/ContentStream.php | ContentStream.isWritable | public function isWritable()
{
if (!$this->isValidResource($this->resource)) {
return false;
}
$meta = stream_get_meta_data($this->resource);
$mode = $meta['mode'];
return (
strstr($mode, 'x')
|| strstr($mode, 'w')
|| strstr($... | php | public function isWritable()
{
if (!$this->isValidResource($this->resource)) {
return false;
}
$meta = stream_get_meta_data($this->resource);
$mode = $meta['mode'];
return (
strstr($mode, 'x')
|| strstr($mode, 'w')
|| strstr($... | [
"public",
"function",
"isWritable",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidResource",
"(",
"$",
"this",
"->",
"resource",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"meta",
"=",
"stream_get_meta_data",
"(",
"$",
"this",
"->",
... | Returns whether or not the stream is writable.
@return bool | [
"Returns",
"whether",
"or",
"not",
"the",
"stream",
"is",
"writable",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/ContentStream.php#L230-L246 |
neos/flow-development-collection | Neos.Flow/Classes/Http/ContentStream.php | ContentStream.read | public function read($length)
{
$this->ensureResourceReadable();
$result = fread($this->resource, $length);
if ($result === false) {
throw new \RuntimeException('Error reading stream', 1453892260);
}
return $result;
} | php | public function read($length)
{
$this->ensureResourceReadable();
$result = fread($this->resource, $length);
if ($result === false) {
throw new \RuntimeException('Error reading stream', 1453892260);
}
return $result;
} | [
"public",
"function",
"read",
"(",
"$",
"length",
")",
"{",
"$",
"this",
"->",
"ensureResourceReadable",
"(",
")",
";",
"$",
"result",
"=",
"fread",
"(",
"$",
"this",
"->",
"resource",
",",
"$",
"length",
")",
";",
"if",
"(",
"$",
"result",
"===",
... | Read data from the stream.
@param int $length Read up to $length bytes from the object and return
them. Fewer than $length bytes may be returned if underlying stream
call returns fewer bytes.
@return string Returns the data read from the stream, or an empty string
if no bytes are available.
@throws \RuntimeException i... | [
"Read",
"data",
"from",
"the",
"stream",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/ContentStream.php#L297-L308 |
neos/flow-development-collection | Neos.Flow/Classes/Http/ContentStream.php | ContentStream.getContents | public function getContents()
{
$this->ensureResourceReadable();
$result = stream_get_contents($this->resource);
if ($result === false) {
throw new \RuntimeException('Error reading from stream', 1453892266);
}
return $result;
} | php | public function getContents()
{
$this->ensureResourceReadable();
$result = stream_get_contents($this->resource);
if ($result === false) {
throw new \RuntimeException('Error reading from stream', 1453892266);
}
return $result;
} | [
"public",
"function",
"getContents",
"(",
")",
"{",
"$",
"this",
"->",
"ensureResourceReadable",
"(",
")",
";",
"$",
"result",
"=",
"stream_get_contents",
"(",
"$",
"this",
"->",
"resource",
")",
";",
"if",
"(",
"$",
"result",
"===",
"false",
")",
"{",
... | Returns the remaining contents in a string
@return string
@throws \RuntimeException if unable to read or an error occurs while
reading. | [
"Returns",
"the",
"remaining",
"contents",
"in",
"a",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/ContentStream.php#L317-L327 |
neos/flow-development-collection | Neos.Utility.ObjectHandling/Classes/TypeHandling.php | TypeHandling.parseType | public static function parseType(string $type): array
{
$matches = [];
if (preg_match(self::PARSE_TYPE_PATTERN, $type, $matches) === 0) {
throw new InvalidTypeException('Found an invalid element type declaration in %s. A type "' . var_export($type, true) . '" does not exist.', 1264093630... | php | public static function parseType(string $type): array
{
$matches = [];
if (preg_match(self::PARSE_TYPE_PATTERN, $type, $matches) === 0) {
throw new InvalidTypeException('Found an invalid element type declaration in %s. A type "' . var_export($type, true) . '" does not exist.', 1264093630... | [
"public",
"static",
"function",
"parseType",
"(",
"string",
"$",
"type",
")",
":",
"array",
"{",
"$",
"matches",
"=",
"[",
"]",
";",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PARSE_TYPE_PATTERN",
",",
"$",
"type",
",",
"$",
"matches",
")",
"===",
... | Returns an array with type information, including element type for
collection types (array, SplObjectStorage, ...)
@param string $type Type of the property (see PARSE_TYPE_PATTERN)
@return array An array with information about the type
@throws InvalidTypeException | [
"Returns",
"an",
"array",
"with",
"type",
"information",
"including",
"element",
"type",
"for",
"collection",
"types",
"(",
"array",
"SplObjectStorage",
"...",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/TypeHandling.php#L47-L65 |
neos/flow-development-collection | Neos.Utility.ObjectHandling/Classes/TypeHandling.php | TypeHandling.isCollectionType | public static function isCollectionType(string $type): bool
{
if (in_array($type, self::$collectionTypes, true)) {
return true;
}
if (class_exists($type) === true || interface_exists($type) === true) {
foreach (self::$collectionTypes as $collectionType) {
... | php | public static function isCollectionType(string $type): bool
{
if (in_array($type, self::$collectionTypes, true)) {
return true;
}
if (class_exists($type) === true || interface_exists($type) === true) {
foreach (self::$collectionTypes as $collectionType) {
... | [
"public",
"static",
"function",
"isCollectionType",
"(",
"string",
"$",
"type",
")",
":",
"bool",
"{",
"if",
"(",
"in_array",
"(",
"$",
"type",
",",
"self",
"::",
"$",
"collectionTypes",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"... | Returns true if the $type is a collection type.
@param string $type
@return boolean | [
"Returns",
"true",
"if",
"the",
"$type",
"is",
"a",
"collection",
"type",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/TypeHandling.php#L120-L135 |
neos/flow-development-collection | Neos.Utility.ObjectHandling/Classes/TypeHandling.php | TypeHandling.truncateElementType | public static function truncateElementType(string $type): string
{
if (strpos($type, '<') === false) {
return $type;
}
return substr($type, 0, strpos($type, '<'));
} | php | public static function truncateElementType(string $type): string
{
if (strpos($type, '<') === false) {
return $type;
}
return substr($type, 0, strpos($type, '<'));
} | [
"public",
"static",
"function",
"truncateElementType",
"(",
"string",
"$",
"type",
")",
":",
"string",
"{",
"if",
"(",
"strpos",
"(",
"$",
"type",
",",
"'<'",
")",
"===",
"false",
")",
"{",
"return",
"$",
"type",
";",
"}",
"return",
"substr",
"(",
"$... | Parses a composite type like "\Foo\Collection<\Bar\Entity>" into "\Foo\Collection"
Note: If the given type does not specify an element type it is not changed
@param string $type
@return string The original type without its element type (if any) | [
"Parses",
"a",
"composite",
"type",
"like",
"\\",
"Foo",
"\\",
"Collection<",
"\\",
"Bar",
"\\",
"Entity",
">",
"into",
"\\",
"Foo",
"\\",
"Collection",
"Note",
":",
"If",
"the",
"given",
"type",
"does",
"not",
"specify",
"an",
"element",
"type",
"it",
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/TypeHandling.php#L144-L150 |
neos/flow-development-collection | Neos.Utility.ObjectHandling/Classes/TypeHandling.php | TypeHandling.getTypeForValue | public static function getTypeForValue($value): string
{
if (is_object($value)) {
if ($value instanceof Proxy) {
$type = get_parent_class($value);
} else {
$type = get_class($value);
}
} else {
$type = gettype($value);
... | php | public static function getTypeForValue($value): string
{
if (is_object($value)) {
if ($value instanceof Proxy) {
$type = get_parent_class($value);
} else {
$type = get_class($value);
}
} else {
$type = gettype($value);
... | [
"public",
"static",
"function",
"getTypeForValue",
"(",
"$",
"value",
")",
":",
"string",
"{",
"if",
"(",
"is_object",
"(",
"$",
"value",
")",
")",
"{",
"if",
"(",
"$",
"value",
"instanceof",
"Proxy",
")",
"{",
"$",
"type",
"=",
"get_parent_class",
"("... | Return simple type or class for object
@param mixed $value
@return string | [
"Return",
"simple",
"type",
"or",
"class",
"for",
"object"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/TypeHandling.php#L170-L182 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authentication/TokenAndProviderFactory.php | TokenAndProviderFactory.buildProvidersAndTokensFromConfiguration | protected function buildProvidersAndTokensFromConfiguration()
{
if ($this->isInitialized) {
return;
}
$this->tokens = [];
$this->providers = [];
foreach ($this->providerConfigurations as $providerName => $providerConfiguration) {
if (!is_array($provi... | php | protected function buildProvidersAndTokensFromConfiguration()
{
if ($this->isInitialized) {
return;
}
$this->tokens = [];
$this->providers = [];
foreach ($this->providerConfigurations as $providerName => $providerConfiguration) {
if (!is_array($provi... | [
"protected",
"function",
"buildProvidersAndTokensFromConfiguration",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isInitialized",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"tokens",
"=",
"[",
"]",
";",
"$",
"this",
"->",
"providers",
"=",
"[",
"]... | Builds the provider and token objects based on the given configuration
@return void
@throws Exception\InvalidAuthenticationProviderException
@throws Exception\InvalidRequestPatternException
@throws Exception\NoAuthenticationProviderFoundException
@throws Exception\NoEntryPointFoundException
@throws Exception\NoRequest... | [
"Builds",
"the",
"provider",
"and",
"token",
"objects",
"based",
"on",
"the",
"given",
"configuration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/TokenAndProviderFactory.php#L125-L213 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.createValidator | public function createValidator($validatorType, array $validatorOptions = [])
{
$validatorObjectName = $this->resolveValidatorObjectName($validatorType);
if ($validatorObjectName === false) {
return null;
}
switch ($this->objectManager->getScope($validatorObjectName)) {
... | php | public function createValidator($validatorType, array $validatorOptions = [])
{
$validatorObjectName = $this->resolveValidatorObjectName($validatorType);
if ($validatorObjectName === false) {
return null;
}
switch ($this->objectManager->getScope($validatorObjectName)) {
... | [
"public",
"function",
"createValidator",
"(",
"$",
"validatorType",
",",
"array",
"$",
"validatorOptions",
"=",
"[",
"]",
")",
"{",
"$",
"validatorObjectName",
"=",
"$",
"this",
"->",
"resolveValidatorObjectName",
"(",
"$",
"validatorType",
")",
";",
"if",
"("... | Get a validator for a given data type. Returns a validator implementing
the ValidatorInterface or NULL if no validator
could be resolved.
@param string $validatorType Either one of the built-in data types or fully qualified validator class name
@param array $validatorOptions Options to be passed to the validator
@retu... | [
"Get",
"a",
"validator",
"for",
"a",
"given",
"data",
"type",
".",
"Returns",
"a",
"validator",
"implementing",
"the",
"ValidatorInterface",
"or",
"NULL",
"if",
"no",
"validator",
"could",
"be",
"resolved",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L95-L121 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.getBaseValidatorConjunction | public function getBaseValidatorConjunction($targetClassName, array $validationGroups = ['Default'])
{
$targetClassName = trim($targetClassName, ' \\');
$indexKey = $targetClassName . '##' . implode('##', $validationGroups);
if (!array_key_exists($indexKey, $this->baseValidatorConjunctions))... | php | public function getBaseValidatorConjunction($targetClassName, array $validationGroups = ['Default'])
{
$targetClassName = trim($targetClassName, ' \\');
$indexKey = $targetClassName . '##' . implode('##', $validationGroups);
if (!array_key_exists($indexKey, $this->baseValidatorConjunctions))... | [
"public",
"function",
"getBaseValidatorConjunction",
"(",
"$",
"targetClassName",
",",
"array",
"$",
"validationGroups",
"=",
"[",
"'Default'",
"]",
")",
"{",
"$",
"targetClassName",
"=",
"trim",
"(",
"$",
"targetClassName",
",",
"' \\\\'",
")",
";",
"$",
"ind... | Resolves and returns the base validator conjunction for the given data type.
If no validation is necessary, the returned validator is empty.
@param string $targetClassName Fully qualified class name of the target class, ie. the class which should be validated
@param array $validationGroups The validation groups to bu... | [
"Resolves",
"and",
"returns",
"the",
"base",
"validator",
"conjunction",
"for",
"the",
"given",
"data",
"type",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L136-L145 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.buildMethodArgumentsValidatorConjunctions | public function buildMethodArgumentsValidatorConjunctions($className, $methodName, array $methodParameters = null, array $methodValidateAnnotations = null)
{
$validatorConjunctions = [];
if ($methodParameters === null) {
$methodParameters = $this->reflectionService->getMethodParameters(... | php | public function buildMethodArgumentsValidatorConjunctions($className, $methodName, array $methodParameters = null, array $methodValidateAnnotations = null)
{
$validatorConjunctions = [];
if ($methodParameters === null) {
$methodParameters = $this->reflectionService->getMethodParameters(... | [
"public",
"function",
"buildMethodArgumentsValidatorConjunctions",
"(",
"$",
"className",
",",
"$",
"methodName",
",",
"array",
"$",
"methodParameters",
"=",
"null",
",",
"array",
"$",
"methodValidateAnnotations",
"=",
"null",
")",
"{",
"$",
"validatorConjunctions",
... | Detects and registers any validators for arguments:
- by the data type specified in the param annotations
- additional validators specified in the validate annotations of a method
@param string $className
@param string $methodName
@param array $methodParameters Optional pre-compiled array of method parameters
@param a... | [
"Detects",
"and",
"registers",
"any",
"validators",
"for",
"arguments",
":",
"-",
"by",
"the",
"data",
"type",
"specified",
"in",
"the",
"param",
"annotations",
"-",
"additional",
"validators",
"specified",
"in",
"the",
"validate",
"annotations",
"of",
"a",
"m... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L162-L220 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.buildSubObjectValidator | protected function buildSubObjectValidator(array $objectPath, ValidatorInterface $propertyValidator)
{
$rootObjectValidator = new GenericObjectValidator([]);
$parentObjectValidator = $rootObjectValidator;
while (count($objectPath) > 1) {
$subObjectValidator = new GenericObjectVa... | php | protected function buildSubObjectValidator(array $objectPath, ValidatorInterface $propertyValidator)
{
$rootObjectValidator = new GenericObjectValidator([]);
$parentObjectValidator = $rootObjectValidator;
while (count($objectPath) > 1) {
$subObjectValidator = new GenericObjectVa... | [
"protected",
"function",
"buildSubObjectValidator",
"(",
"array",
"$",
"objectPath",
",",
"ValidatorInterface",
"$",
"propertyValidator",
")",
"{",
"$",
"rootObjectValidator",
"=",
"new",
"GenericObjectValidator",
"(",
"[",
"]",
")",
";",
"$",
"parentObjectValidator",... | Builds a chain of nested object validators by specification of the given
object path.
@param array $objectPath The object path
@param ValidatorInterface $propertyValidator The validator which should be added to the property specified by objectPath
@return GenericObjectValidator
@throws Exception\InvalidValidationOptio... | [
"Builds",
"a",
"chain",
"of",
"nested",
"object",
"validators",
"by",
"specification",
"of",
"the",
"given",
"object",
"path",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L242-L257 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.buildBaseValidatorConjunction | protected function buildBaseValidatorConjunction($indexKey, $targetClassName, array $validationGroups)
{
$conjunctionValidator = new ConjunctionValidator([]);
$this->baseValidatorConjunctions[$indexKey] = $conjunctionValidator;
if (!TypeHandling::isSimpleType($targetClassName) && class_exist... | php | protected function buildBaseValidatorConjunction($indexKey, $targetClassName, array $validationGroups)
{
$conjunctionValidator = new ConjunctionValidator([]);
$this->baseValidatorConjunctions[$indexKey] = $conjunctionValidator;
if (!TypeHandling::isSimpleType($targetClassName) && class_exist... | [
"protected",
"function",
"buildBaseValidatorConjunction",
"(",
"$",
"indexKey",
",",
"$",
"targetClassName",
",",
"array",
"$",
"validationGroups",
")",
"{",
"$",
"conjunctionValidator",
"=",
"new",
"ConjunctionValidator",
"(",
"[",
"]",
")",
";",
"$",
"this",
"... | Builds a base validator conjunction for the given data type.
The base validation rules are those which were declared directly in a class (typically
a model) through some validate annotations on properties.
If a property holds a class for which a base validator exists, that property will be
checked as well, regardless... | [
"Builds",
"a",
"base",
"validator",
"conjunction",
"for",
"the",
"given",
"data",
"type",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L284-L357 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.addCustomValidators | protected function addCustomValidators($targetClassName, ConjunctionValidator &$conjunctionValidator)
{
// Custom validator for the class
$addedValidatorClassName = null;
$possibleValidatorClassName = str_replace('\\Model\\', '\\Validator\\', $targetClassName) . 'Validator';
$customV... | php | protected function addCustomValidators($targetClassName, ConjunctionValidator &$conjunctionValidator)
{
// Custom validator for the class
$addedValidatorClassName = null;
$possibleValidatorClassName = str_replace('\\Model\\', '\\Validator\\', $targetClassName) . 'Validator';
$customV... | [
"protected",
"function",
"addCustomValidators",
"(",
"$",
"targetClassName",
",",
"ConjunctionValidator",
"&",
"$",
"conjunctionValidator",
")",
"{",
"// Custom validator for the class",
"$",
"addedValidatorClassName",
"=",
"null",
";",
"$",
"possibleValidatorClassName",
"=... | This adds custom validators to the passed $conjunctionValidator.
A custom validator is found if it follows the naming convention "Replace '\Model\' by '\Validator\' and
append 'Validator'". If found, it will be added to the $conjunctionValidator.
In addition canValidate() will be called on all implementations of the ... | [
"This",
"adds",
"custom",
"validators",
"to",
"the",
"passed",
"$conjunctionValidator",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L375-L404 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.getPolyTypeObjectValidatorImplementationClassNames | public static function getPolyTypeObjectValidatorImplementationClassNames($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = $reflectionService->getAllImplementationClassNamesForInterface(Validator\PolyTypeObjectValidatorInterface::class);
return ... | php | public static function getPolyTypeObjectValidatorImplementationClassNames($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$result = $reflectionService->getAllImplementationClassNamesForInterface(Validator\PolyTypeObjectValidatorInterface::class);
return ... | [
"public",
"static",
"function",
"getPolyTypeObjectValidatorImplementationClassNames",
"(",
"$",
"objectManager",
")",
"{",
"$",
"reflectionService",
"=",
"$",
"objectManager",
"->",
"get",
"(",
"ReflectionService",
"::",
"class",
")",
";",
"$",
"result",
"=",
"$",
... | Returns a map of object validator class names.
@param ObjectManagerInterface $objectManager
@return array Array of object validator class names
@Flow\CompileStatic | [
"Returns",
"a",
"map",
"of",
"object",
"validator",
"class",
"names",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L413-L418 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.resolveValidatorObjectName | protected function resolveValidatorObjectName($validatorType)
{
$validatorType = ltrim($validatorType, '\\');
$validatorClassNames = static::getValidatorImplementationClassNames($this->objectManager);
if ($this->objectManager->isRegistered($validatorType) && isset($validatorClassNames[$val... | php | protected function resolveValidatorObjectName($validatorType)
{
$validatorType = ltrim($validatorType, '\\');
$validatorClassNames = static::getValidatorImplementationClassNames($this->objectManager);
if ($this->objectManager->isRegistered($validatorType) && isset($validatorClassNames[$val... | [
"protected",
"function",
"resolveValidatorObjectName",
"(",
"$",
"validatorType",
")",
"{",
"$",
"validatorType",
"=",
"ltrim",
"(",
"$",
"validatorType",
",",
"'\\\\'",
")",
";",
"$",
"validatorClassNames",
"=",
"static",
"::",
"getValidatorImplementationClassNames",... | Returns the class name of an appropriate validator for the given type. If no
validator is available false is returned
@param string $validatorType Either the fully qualified class name of the validator or the short name of a built-in validator
@return string|boolean Class name of the validator or false if not availabl... | [
"Returns",
"the",
"class",
"name",
"of",
"an",
"appropriate",
"validator",
"for",
"the",
"given",
"type",
".",
"If",
"no",
"validator",
"is",
"available",
"false",
"is",
"returned"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L427-L448 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.getValidatorImplementationClassNames | public static function getValidatorImplementationClassNames($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$classNames = $reflectionService->getAllImplementationClassNamesForInterface(ValidatorInterface::class);
return array_flip($classNames);
} | php | public static function getValidatorImplementationClassNames($objectManager)
{
$reflectionService = $objectManager->get(ReflectionService::class);
$classNames = $reflectionService->getAllImplementationClassNamesForInterface(ValidatorInterface::class);
return array_flip($classNames);
} | [
"public",
"static",
"function",
"getValidatorImplementationClassNames",
"(",
"$",
"objectManager",
")",
"{",
"$",
"reflectionService",
"=",
"$",
"objectManager",
"->",
"get",
"(",
"ReflectionService",
"::",
"class",
")",
";",
"$",
"classNames",
"=",
"$",
"reflecti... | Returns all class names implementing the ValidatorInterface.
@param ObjectManagerInterface $objectManager
@return array Array of class names implementing ValidatorInterface indexed by class name
@Flow\CompileStatic | [
"Returns",
"all",
"class",
"names",
"implementing",
"the",
"ValidatorInterface",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L457-L462 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/ValidatorResolver.php | ValidatorResolver.getValidatorType | protected function getValidatorType($type)
{
switch ($type) {
case 'int':
$type = 'Integer';
break;
case 'bool':
$type = 'Boolean';
break;
case 'double':
$type = 'Float';
break... | php | protected function getValidatorType($type)
{
switch ($type) {
case 'int':
$type = 'Integer';
break;
case 'bool':
$type = 'Boolean';
break;
case 'double':
$type = 'Float';
break... | [
"protected",
"function",
"getValidatorType",
"(",
"$",
"type",
")",
"{",
"switch",
"(",
"$",
"type",
")",
"{",
"case",
"'int'",
":",
"$",
"type",
"=",
"'Integer'",
";",
"break",
";",
"case",
"'bool'",
":",
"$",
"type",
"=",
"'Boolean'",
";",
"break",
... | Used to map PHP types to validator types.
@param string $type Data type to unify
@return string unified data type | [
"Used",
"to",
"map",
"PHP",
"types",
"to",
"validator",
"types",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/ValidatorResolver.php#L470-L492 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/AggregateBoundaryValidator.php | AggregateBoundaryValidator.isValid | public function isValid($value)
{
/**
* The idea is that Aggregates form a consistency boundary, and an Aggregate only needs to be
* validated if it changed state. Also since all entity relations are lazy loaded by default,
* and the relation will only be initialized when it gets ... | php | public function isValid($value)
{
/**
* The idea is that Aggregates form a consistency boundary, and an Aggregate only needs to be
* validated if it changed state. Also since all entity relations are lazy loaded by default,
* and the relation will only be initialized when it gets ... | [
"public",
"function",
"isValid",
"(",
"$",
"value",
")",
"{",
"/**\n * The idea is that Aggregates form a consistency boundary, and an Aggregate only needs to be\n * validated if it changed state. Also since all entity relations are lazy loaded by default,\n * and the relatio... | Checks if the given value is valid according to the validator, and returns
the Error Messages object which occurred. Will skip validation if value is
an uninitialized lazy loading proxy.
@param mixed $value The value that should be validated
@return void
@api | [
"Checks",
"if",
"the",
"given",
"value",
"is",
"valid",
"according",
"to",
"the",
"validator",
"and",
"returns",
"the",
"Error",
"Messages",
"object",
"which",
"occurred",
".",
"Will",
"skip",
"validation",
"if",
"value",
"is",
"an",
"uninitialized",
"lazy",
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AggregateBoundaryValidator.php#L32-L46 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php | RouteConfigurationProcessor.includeSubRoutesFromSettings | protected function includeSubRoutesFromSettings($routeDefinitions)
{
if ($this->routeSettings === null) {
return;
}
$sortedRouteSettings = (new PositionalArraySorter($this->routeSettings))->toArray();
foreach ($sortedRouteSettings as $packageKey => $routeFromSettings) {
... | php | protected function includeSubRoutesFromSettings($routeDefinitions)
{
if ($this->routeSettings === null) {
return;
}
$sortedRouteSettings = (new PositionalArraySorter($this->routeSettings))->toArray();
foreach ($sortedRouteSettings as $packageKey => $routeFromSettings) {
... | [
"protected",
"function",
"includeSubRoutesFromSettings",
"(",
"$",
"routeDefinitions",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"routeSettings",
"===",
"null",
")",
"{",
"return",
";",
"}",
"$",
"sortedRouteSettings",
"=",
"(",
"new",
"PositionalArraySorter",
"("... | Merges routes from Neos.Flow.mvc.routes settings into $routeDefinitions
NOTE: Routes from settings will always be appended to existing route definitions from the main Routes configuration!
@param array $routeDefinitions
@return array | [
"Merges",
"routes",
"from",
"Neos",
".",
"Flow",
".",
"mvc",
".",
"routes",
"settings",
"into",
"$routeDefinitions",
"NOTE",
":",
"Routes",
"from",
"settings",
"will",
"always",
"be",
"appended",
"to",
"existing",
"route",
"definitions",
"from",
"the",
"main",... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php#L85-L113 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php | RouteConfigurationProcessor.mergeRoutesWithSubRoutes | protected function mergeRoutesWithSubRoutes(array $routesConfiguration)
{
$mergedRoutesConfiguration = [];
foreach ($routesConfiguration as $routeConfiguration) {
if (!isset($routeConfiguration['subRoutes'])) {
$mergedRoutesConfiguration[] = $routeConfiguration;
... | php | protected function mergeRoutesWithSubRoutes(array $routesConfiguration)
{
$mergedRoutesConfiguration = [];
foreach ($routesConfiguration as $routeConfiguration) {
if (!isset($routeConfiguration['subRoutes'])) {
$mergedRoutesConfiguration[] = $routeConfiguration;
... | [
"protected",
"function",
"mergeRoutesWithSubRoutes",
"(",
"array",
"$",
"routesConfiguration",
")",
"{",
"$",
"mergedRoutesConfiguration",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"routesConfiguration",
"as",
"$",
"routeConfiguration",
")",
"{",
"if",
"(",
"!",
... | Loads specified sub routes and builds composite routes.
@param array $routesConfiguration
@return array
@throws Exception\ParseErrorException
@throws Exception\RecursionException | [
"Loads",
"specified",
"sub",
"routes",
"and",
"builds",
"composite",
"routes",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php#L123-L165 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php | RouteConfigurationProcessor.buildSubRouteConfigurations | protected function buildSubRouteConfigurations(array $routesConfiguration, array $subRoutesConfiguration, $subRouteKey, array $subRouteOptions)
{
$variables = isset($subRouteOptions['variables']) ? $subRouteOptions['variables'] : [];
$mergedSubRoutesConfigurations = [];
foreach ($subRoutesCo... | php | protected function buildSubRouteConfigurations(array $routesConfiguration, array $subRoutesConfiguration, $subRouteKey, array $subRouteOptions)
{
$variables = isset($subRouteOptions['variables']) ? $subRouteOptions['variables'] : [];
$mergedSubRoutesConfigurations = [];
foreach ($subRoutesCo... | [
"protected",
"function",
"buildSubRouteConfigurations",
"(",
"array",
"$",
"routesConfiguration",
",",
"array",
"$",
"subRoutesConfiguration",
",",
"$",
"subRouteKey",
",",
"array",
"$",
"subRouteOptions",
")",
"{",
"$",
"variables",
"=",
"isset",
"(",
"$",
"subRo... | Merges all routes in $routesConfiguration with the sub routes in $subRoutesConfiguration
@param array $routesConfiguration
@param array $subRoutesConfiguration
@param string $subRouteKey the key of the sub route: <subRouteKey>
@param array $subRouteOptions
@return array the merged route configuration
@throws Exception... | [
"Merges",
"all",
"routes",
"in",
"$routesConfiguration",
"with",
"the",
"sub",
"routes",
"in",
"$subRoutesConfiguration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php#L177-L207 |
neos/flow-development-collection | Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php | RouteConfigurationProcessor.replacePlaceholders | protected function replacePlaceholders($string, array $variables)
{
foreach ($variables as $variableName => $variableValue) {
$string = str_replace('<' . $variableName . '>', $variableValue, $string);
}
return $string;
} | php | protected function replacePlaceholders($string, array $variables)
{
foreach ($variables as $variableName => $variableValue) {
$string = str_replace('<' . $variableName . '>', $variableValue, $string);
}
return $string;
} | [
"protected",
"function",
"replacePlaceholders",
"(",
"$",
"string",
",",
"array",
"$",
"variables",
")",
"{",
"foreach",
"(",
"$",
"variables",
"as",
"$",
"variableName",
"=>",
"$",
"variableValue",
")",
"{",
"$",
"string",
"=",
"str_replace",
"(",
"'<'",
... | Replaces placeholders in the format <variableName> with the corresponding variable of the specified $variables collection.
@param string $string
@param array $variables
@return string | [
"Replaces",
"placeholders",
"in",
"the",
"format",
"<variableName",
">",
"with",
"the",
"corresponding",
"variable",
"of",
"the",
"specified",
"$variables",
"collection",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Configuration/RouteConfigurationProcessor.php#L216-L223 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/AdvicesTrait.php | AdvicesTrait.Flow_Aop_Proxy_getAdviceChains | private function Flow_Aop_Proxy_getAdviceChains(string $methodName): array
{
if (isset($this->Flow_Aop_Proxy_groupedAdviceChains[$methodName])) {
return $this->Flow_Aop_Proxy_groupedAdviceChains[$methodName];
}
$adviceChains = [];
if (isset($this->Flow_Aop_Proxy_targetMe... | php | private function Flow_Aop_Proxy_getAdviceChains(string $methodName): array
{
if (isset($this->Flow_Aop_Proxy_groupedAdviceChains[$methodName])) {
return $this->Flow_Aop_Proxy_groupedAdviceChains[$methodName];
}
$adviceChains = [];
if (isset($this->Flow_Aop_Proxy_targetMe... | [
"private",
"function",
"Flow_Aop_Proxy_getAdviceChains",
"(",
"string",
"$",
"methodName",
")",
":",
"array",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"Flow_Aop_Proxy_groupedAdviceChains",
"[",
"$",
"methodName",
"]",
")",
")",
"{",
"return",
"$",
"thi... | Used in AOP proxies to get the advice chain for a given method.
@param string $methodName
@return array | [
"Used",
"in",
"AOP",
"proxies",
"to",
"get",
"the",
"advice",
"chain",
"for",
"a",
"given",
"method",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/AdvicesTrait.php#L26-L42 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/AdvicesTrait.php | AdvicesTrait.Flow_Aop_Proxy_invokeJoinPoint | public function Flow_Aop_Proxy_invokeJoinPoint(\Neos\Flow\Aop\JoinPointInterface $joinPoint)
{
if (__CLASS__ !== $joinPoint->getClassName()) {
return parent::Flow_Aop_Proxy_invokeJoinPoint($joinPoint);
}
if (isset($this->Flow_Aop_Proxy_methodIsInAdviceMode[$joinPoint->getMethodNa... | php | public function Flow_Aop_Proxy_invokeJoinPoint(\Neos\Flow\Aop\JoinPointInterface $joinPoint)
{
if (__CLASS__ !== $joinPoint->getClassName()) {
return parent::Flow_Aop_Proxy_invokeJoinPoint($joinPoint);
}
if (isset($this->Flow_Aop_Proxy_methodIsInAdviceMode[$joinPoint->getMethodNa... | [
"public",
"function",
"Flow_Aop_Proxy_invokeJoinPoint",
"(",
"\\",
"Neos",
"\\",
"Flow",
"\\",
"Aop",
"\\",
"JoinPointInterface",
"$",
"joinPoint",
")",
"{",
"if",
"(",
"__CLASS__",
"!==",
"$",
"joinPoint",
"->",
"getClassName",
"(",
")",
")",
"{",
"return",
... | Invokes a given join point
@param \Neos\Flow\Aop\JoinPointInterface $joinPoint
@return mixed | [
"Invokes",
"a",
"given",
"join",
"point"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/AdvicesTrait.php#L50-L58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.