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.Cache/Classes/Backend/ApcuBackend.php | ApcuBackend.findTagsByIdentifier | protected function findTagsByIdentifier(string $identifier): array
{
$success = false;
$tags = apcu_fetch($this->identifierPrefix . 'ident_' . $identifier, $success);
return ($success ? (array)$tags : []);
} | php | protected function findTagsByIdentifier(string $identifier): array
{
$success = false;
$tags = apcu_fetch($this->identifierPrefix . 'ident_' . $identifier, $success);
return ($success ? (array)$tags : []);
} | [
"protected",
"function",
"findTagsByIdentifier",
"(",
"string",
"$",
"identifier",
")",
":",
"array",
"{",
"$",
"success",
"=",
"false",
";",
"$",
"tags",
"=",
"apcu_fetch",
"(",
"$",
"this",
"->",
"identifierPrefix",
".",
"'ident_'",
".",
"$",
"identifier",... | Finds all tags for the given identifier. This function uses reverse tag
index to search for tags.
@param string $identifier Identifier to find tags by
@return array Array with tags | [
"Finds",
"all",
"tags",
"for",
"the",
"given",
"identifier",
".",
"This",
"function",
"uses",
"reverse",
"tag",
"index",
"to",
"search",
"for",
"tags",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/ApcuBackend.php#L204-L209 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/ApcuBackend.php | ApcuBackend.removeIdentifierFromAllTags | protected function removeIdentifierFromAllTags(string $entryIdentifier)
{
// Get tags for this identifier
$tags = $this->findTagsByIdentifier($entryIdentifier);
// Deassociate tags with this identifier
foreach ($tags as $tag) {
$identifiers = $this->findIdentifiersByTag($... | php | protected function removeIdentifierFromAllTags(string $entryIdentifier)
{
// Get tags for this identifier
$tags = $this->findTagsByIdentifier($entryIdentifier);
// Deassociate tags with this identifier
foreach ($tags as $tag) {
$identifiers = $this->findIdentifiersByTag($... | [
"protected",
"function",
"removeIdentifierFromAllTags",
"(",
"string",
"$",
"entryIdentifier",
")",
"{",
"// Get tags for this identifier",
"$",
"tags",
"=",
"$",
"this",
"->",
"findTagsByIdentifier",
"(",
"$",
"entryIdentifier",
")",
";",
"// Deassociate tags with this i... | Removes association of the identifier with the given tags
@param string $entryIdentifier
@return void | [
"Removes",
"association",
"of",
"the",
"identifier",
"with",
"the",
"given",
"tags"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/ApcuBackend.php#L273-L297 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/ApcuBackend.php | ApcuBackend.key | public function key(): string
{
if ($this->cacheEntriesIterator === null) {
$this->rewind();
}
return substr($this->cacheEntriesIterator->key(), strlen($this->identifierPrefix . 'entry_'));
} | php | public function key(): string
{
if ($this->cacheEntriesIterator === null) {
$this->rewind();
}
return substr($this->cacheEntriesIterator->key(), strlen($this->identifierPrefix . 'entry_'));
} | [
"public",
"function",
"key",
"(",
")",
":",
"string",
"{",
"if",
"(",
"$",
"this",
"->",
"cacheEntriesIterator",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"}",
"return",
"substr",
"(",
"$",
"this",
"->",
"cacheEntriesIterator... | 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/ApcuBackend.php#L345-L351 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/ApcuBackend.php | ApcuBackend.rewind | public function rewind()
{
if ($this->cacheEntriesIterator === null) {
$this->cacheEntriesIterator = new \APCUIterator('/^' . $this->identifierPrefix . 'entry_.*/');
} else {
$this->cacheEntriesIterator->rewind();
}
} | php | public function rewind()
{
if ($this->cacheEntriesIterator === null) {
$this->cacheEntriesIterator = new \APCUIterator('/^' . $this->identifierPrefix . 'entry_.*/');
} else {
$this->cacheEntriesIterator->rewind();
}
} | [
"public",
"function",
"rewind",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cacheEntriesIterator",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"cacheEntriesIterator",
"=",
"new",
"\\",
"APCUIterator",
"(",
"'/^'",
".",
"$",
"this",
"->",
"identifierPrefi... | Rewinds the cache entry iterator to the first element
@return void
@api | [
"Rewinds",
"the",
"cache",
"entry",
"iterator",
"to",
"the",
"first",
"element"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/ApcuBackend.php#L373-L380 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/View/SimpleTemplateView.php | SimpleTemplateView.render | public function render()
{
$source = $this->getOption('templateSource');
$templatePathAndFilename = $this->getOption('templatePathAndFilename');
if ($templatePathAndFilename !== null) {
$source = file_get_contents($templatePathAndFilename);
}
return preg_replace_... | php | public function render()
{
$source = $this->getOption('templateSource');
$templatePathAndFilename = $this->getOption('templatePathAndFilename');
if ($templatePathAndFilename !== null) {
$source = file_get_contents($templatePathAndFilename);
}
return preg_replace_... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"source",
"=",
"$",
"this",
"->",
"getOption",
"(",
"'templateSource'",
")",
";",
"$",
"templatePathAndFilename",
"=",
"$",
"this",
"->",
"getOption",
"(",
"'templatePathAndFilename'",
")",
";",
"if",
"(",
... | Renders the view
@return string The rendered view
@api | [
"Renders",
"the",
"view"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/SimpleTemplateView.php#L37-L48 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php | MethodPrivilegePointcutFilter.injectObjectManager | public function injectObjectManager(ObjectManagerInterface $objectManager)
{
$this->objectManager = $objectManager;
/** @var CacheManager $cacheManager */
$cacheManager = $this->objectManager->get(CacheManager::class);
$this->methodPermissionCache = $cacheManager->getCache('Flow_Secu... | php | public function injectObjectManager(ObjectManagerInterface $objectManager)
{
$this->objectManager = $objectManager;
/** @var CacheManager $cacheManager */
$cacheManager = $this->objectManager->get(CacheManager::class);
$this->methodPermissionCache = $cacheManager->getCache('Flow_Secu... | [
"public",
"function",
"injectObjectManager",
"(",
"ObjectManagerInterface",
"$",
"objectManager",
")",
"{",
"$",
"this",
"->",
"objectManager",
"=",
"$",
"objectManager",
";",
"/** @var CacheManager $cacheManager */",
"$",
"cacheManager",
"=",
"$",
"this",
"->",
"obje... | This object is created very early so we can't rely on AOP for the property injection
@param ObjectManagerInterface $objectManager
@return void
@throws \Neos\Cache\Exception\NoSuchCacheException | [
"This",
"object",
"is",
"created",
"very",
"early",
"so",
"we",
"can",
"t",
"rely",
"on",
"AOP",
"for",
"the",
"property",
"injection"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php#L63-L70 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php | MethodPrivilegePointcutFilter.matches | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
if ($this->filters === null) {
$this->buildPointcutFilters();
}
$matchingFilters = array_filter($this->filters, $this->getFilterEvaluator($className, $methodName, $metho... | php | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
if ($this->filters === null) {
$this->buildPointcutFilters();
}
$matchingFilters = array_filter($this->filters, $this->getFilterEvaluator($className, $methodName, $metho... | [
"public",
"function",
"matches",
"(",
"$",
"className",
",",
"$",
"methodName",
",",
"$",
"methodDeclaringClassName",
",",
"$",
"pointcutQueryIdentifier",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"filters",
"===",
"null",
")",
"{",
"$",
"this",... | Checks if the specified class and method matches against the filter, i.e. if there is a policy entry to intercept this method.
This method also creates a cache entry for every method, to cache the associated roles and privileges.
@param string $className Name of the class to check the name of
@param string $methodName... | [
"Checks",
"if",
"the",
"specified",
"class",
"and",
"method",
"matches",
"against",
"the",
"filter",
"i",
".",
"e",
".",
"if",
"there",
"is",
"a",
"policy",
"entry",
"to",
"intercept",
"this",
"method",
".",
"This",
"method",
"also",
"creates",
"a",
"cac... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php#L92-L119 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php | MethodPrivilegePointcutFilter.reduceTargetClassNames | public function reduceTargetClassNames(ClassNameIndex $classNameIndex): ClassNameIndex
{
if ($this->filters === null) {
$this->buildPointcutFilters();
}
$result = new ClassNameIndex();
foreach ($this->filters as $filter) {
$result->applyUnion($filter->reduceT... | php | public function reduceTargetClassNames(ClassNameIndex $classNameIndex): ClassNameIndex
{
if ($this->filters === null) {
$this->buildPointcutFilters();
}
$result = new ClassNameIndex();
foreach ($this->filters as $filter) {
$result->applyUnion($filter->reduceT... | [
"public",
"function",
"reduceTargetClassNames",
"(",
"ClassNameIndex",
"$",
"classNameIndex",
")",
":",
"ClassNameIndex",
"{",
"if",
"(",
"$",
"this",
"->",
"filters",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"buildPointcutFilters",
"(",
")",
";",
"}",
"$... | This method is used to optimize the matching process.
@param ClassNameIndex $classNameIndex
@return ClassNameIndex | [
"This",
"method",
"is",
"used",
"to",
"optimize",
"the",
"matching",
"process",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php#L147-L158 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php | MethodPrivilegePointcutFilter.buildPointcutFilters | protected function buildPointcutFilters()
{
$this->filters = [];
/** @var PolicyService $policyService */
$policyService = $this->objectManager->get(PolicyService::class);
/** @var MethodPrivilegeInterface[] $methodPrivileges */
$methodPrivileges = $policyService->getAllPrivi... | php | protected function buildPointcutFilters()
{
$this->filters = [];
/** @var PolicyService $policyService */
$policyService = $this->objectManager->get(PolicyService::class);
/** @var MethodPrivilegeInterface[] $methodPrivileges */
$methodPrivileges = $policyService->getAllPrivi... | [
"protected",
"function",
"buildPointcutFilters",
"(",
")",
"{",
"$",
"this",
"->",
"filters",
"=",
"[",
"]",
";",
"/** @var PolicyService $policyService */",
"$",
"policyService",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"get",
"(",
"PolicyService",
"::",
... | Builds the needed pointcut filters for matching the policy privileges
@return void | [
"Builds",
"the",
"needed",
"pointcut",
"filters",
"for",
"matching",
"the",
"policy",
"privileges"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php#L179-L189 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php | MethodPrivilegePointcutFilter.savePolicyCache | public function savePolicyCache()
{
$tags = ['Neos_Flow_Aop'];
if (!$this->methodPermissionCache->has('methodPermission')) {
$this->methodPermissionCache->set('methodPermission', $this->methodPermissions, $tags);
}
} | php | public function savePolicyCache()
{
$tags = ['Neos_Flow_Aop'];
if (!$this->methodPermissionCache->has('methodPermission')) {
$this->methodPermissionCache->set('methodPermission', $this->methodPermissions, $tags);
}
} | [
"public",
"function",
"savePolicyCache",
"(",
")",
"{",
"$",
"tags",
"=",
"[",
"'Neos_Flow_Aop'",
"]",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"methodPermissionCache",
"->",
"has",
"(",
"'methodPermission'",
")",
")",
"{",
"$",
"this",
"->",
"methodPermiss... | Save the found matches to the cache.
@return void | [
"Save",
"the",
"found",
"matches",
"to",
"the",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Method/MethodPrivilegePointcutFilter.php#L196-L202 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.shouldMap | public function shouldMap($propertyName)
{
if (isset($this->propertiesNotToBeMapped[$propertyName])) {
return false;
}
if (isset($this->propertiesToBeMapped[$propertyName])) {
return true;
}
if (isset($this->subConfigurationForProperty[self::PROPERTY... | php | public function shouldMap($propertyName)
{
if (isset($this->propertiesNotToBeMapped[$propertyName])) {
return false;
}
if (isset($this->propertiesToBeMapped[$propertyName])) {
return true;
}
if (isset($this->subConfigurationForProperty[self::PROPERTY... | [
"public",
"function",
"shouldMap",
"(",
"$",
"propertyName",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"propertiesNotToBeMapped",
"[",
"$",
"propertyName",
"]",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"this... | The behavior is as follows:
- if a property has been explicitly forbidden using allowAllPropertiesExcept(...), it is directly rejected
- if a property has been allowed using allowProperties(...), it is directly allowed.
- if allowAllProperties* has been called, we allow unknown properties
- else, return false.
@param... | [
"The",
"behavior",
"is",
"as",
"follows",
":"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L101-L116 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.allowProperties | public function allowProperties(string ...$propertyNames)
{
foreach ($propertyNames as $propertyName) {
$this->propertiesToBeMapped[$propertyName] = $propertyName;
}
return $this;
} | php | public function allowProperties(string ...$propertyNames)
{
foreach ($propertyNames as $propertyName) {
$this->propertiesToBeMapped[$propertyName] = $propertyName;
}
return $this;
} | [
"public",
"function",
"allowProperties",
"(",
"string",
"...",
"$",
"propertyNames",
")",
"{",
"foreach",
"(",
"$",
"propertyNames",
"as",
"$",
"propertyName",
")",
"{",
"$",
"this",
"->",
"propertiesToBeMapped",
"[",
"$",
"propertyName",
"]",
"=",
"$",
"pro... | Allow a list of specific properties. All arguments of
allowProperties are used here (varargs).
Example: allowProperties('title', 'content', 'author')
@param string ...$propertyNames
@return PropertyMappingConfiguration this
@api | [
"Allow",
"a",
"list",
"of",
"specific",
"properties",
".",
"All",
"arguments",
"of",
"allowProperties",
"are",
"used",
"here",
"(",
"varargs",
")",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L152-L158 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.skipProperties | public function skipProperties(string ...$propertyNames)
{
foreach ($propertyNames as $propertyName) {
$this->propertiesToSkip[$propertyName] = $propertyName;
}
return $this;
} | php | public function skipProperties(string ...$propertyNames)
{
foreach ($propertyNames as $propertyName) {
$this->propertiesToSkip[$propertyName] = $propertyName;
}
return $this;
} | [
"public",
"function",
"skipProperties",
"(",
"string",
"...",
"$",
"propertyNames",
")",
"{",
"foreach",
"(",
"$",
"propertyNames",
"as",
"$",
"propertyName",
")",
"{",
"$",
"this",
"->",
"propertiesToSkip",
"[",
"$",
"propertyName",
"]",
"=",
"$",
"property... | Skip a list of specific properties. All arguments of
skipProperties are used here (varargs).
Example: skipProperties('unused', 'dummy')
@param string ...$propertyNames
@return PropertyMappingConfiguration this
@api | [
"Skip",
"a",
"list",
"of",
"specific",
"properties",
".",
"All",
"arguments",
"of",
"skipProperties",
"are",
"used",
"here",
"(",
"varargs",
")",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L170-L176 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.allowAllPropertiesExcept | public function allowAllPropertiesExcept(string ...$propertyNames)
{
$this->mapUnknownProperties = true;
foreach ($propertyNames as $propertyName) {
$this->propertiesNotToBeMapped[$propertyName] = $propertyName;
}
return $this;
} | php | public function allowAllPropertiesExcept(string ...$propertyNames)
{
$this->mapUnknownProperties = true;
foreach ($propertyNames as $propertyName) {
$this->propertiesNotToBeMapped[$propertyName] = $propertyName;
}
return $this;
} | [
"public",
"function",
"allowAllPropertiesExcept",
"(",
"string",
"...",
"$",
"propertyNames",
")",
"{",
"$",
"this",
"->",
"mapUnknownProperties",
"=",
"true",
";",
"foreach",
"(",
"$",
"propertyNames",
"as",
"$",
"propertyName",
")",
"{",
"$",
"this",
"->",
... | Allow all properties during property mapping, but reject a few
selected ones (blacklist).
Example: allowAllPropertiesExcept('password', 'userGroup')
@param string ...$propertyNames
@return PropertyMappingConfiguration this
@api | [
"Allow",
"all",
"properties",
"during",
"property",
"mapping",
"but",
"reject",
"a",
"few",
"selected",
"ones",
"(",
"blacklist",
")",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L188-L196 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.getConfigurationFor | public function getConfigurationFor($propertyName)
{
if (isset($this->subConfigurationForProperty[$propertyName])) {
return $this->subConfigurationForProperty[$propertyName];
} elseif (isset($this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER])) {
return $this-... | php | public function getConfigurationFor($propertyName)
{
if (isset($this->subConfigurationForProperty[$propertyName])) {
return $this->subConfigurationForProperty[$propertyName];
} elseif (isset($this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER])) {
return $this-... | [
"public",
"function",
"getConfigurationFor",
"(",
"$",
"propertyName",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"subConfigurationForProperty",
"[",
"$",
"propertyName",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"subConfigurationForProperty",
... | Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
@param string $propertyName
@return PropertyMappingConfigurationInterface the property mapping configuration for the given $propertyName.
@api | [
"Returns",
"the",
"sub",
"-",
"configuration",
"for",
"the",
"passed",
"$propertyName",
".",
"Must",
"ALWAYS",
"return",
"a",
"valid",
"configuration",
"object!"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L230-L239 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.getTargetPropertyName | public function getTargetPropertyName($sourcePropertyName)
{
if (isset($this->mapping[$sourcePropertyName])) {
return $this->mapping[$sourcePropertyName];
}
return $sourcePropertyName;
} | php | public function getTargetPropertyName($sourcePropertyName)
{
if (isset($this->mapping[$sourcePropertyName])) {
return $this->mapping[$sourcePropertyName];
}
return $sourcePropertyName;
} | [
"public",
"function",
"getTargetPropertyName",
"(",
"$",
"sourcePropertyName",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"mapping",
"[",
"$",
"sourcePropertyName",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"mapping",
"[",
"$",
"sourcePro... | Maps the given $sourcePropertyName to a target property name.
@param string $sourcePropertyName
@return string property name of target
@api | [
"Maps",
"the",
"given",
"$sourcePropertyName",
"to",
"a",
"target",
"property",
"name",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L248-L254 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.setTypeConverterOptions | public function setTypeConverterOptions($typeConverter, array $options)
{
foreach ($this->getTypeConvertersWithParentClasses($typeConverter) as $typeConverter) {
$this->configuration[$typeConverter] = $options;
}
return $this;
} | php | public function setTypeConverterOptions($typeConverter, array $options)
{
foreach ($this->getTypeConvertersWithParentClasses($typeConverter) as $typeConverter) {
$this->configuration[$typeConverter] = $options;
}
return $this;
} | [
"public",
"function",
"setTypeConverterOptions",
"(",
"$",
"typeConverter",
",",
"array",
"$",
"options",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getTypeConvertersWithParentClasses",
"(",
"$",
"typeConverter",
")",
"as",
"$",
"typeConverter",
")",
"{",
"$"... | Set all options for the given $typeConverter.
@param string $typeConverter class name of type converter
@param array $options
@return PropertyMappingConfiguration this
@api | [
"Set",
"all",
"options",
"for",
"the",
"given",
"$typeConverter",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L293-L299 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.setTypeConverterOption | public function setTypeConverterOption($typeConverter, $optionKey, $optionValue)
{
foreach ($this->getTypeConvertersWithParentClasses($typeConverter) as $typeConverter) {
$this->configuration[$typeConverter][$optionKey] = $optionValue;
}
return $this;
} | php | public function setTypeConverterOption($typeConverter, $optionKey, $optionValue)
{
foreach ($this->getTypeConvertersWithParentClasses($typeConverter) as $typeConverter) {
$this->configuration[$typeConverter][$optionKey] = $optionValue;
}
return $this;
} | [
"public",
"function",
"setTypeConverterOption",
"(",
"$",
"typeConverter",
",",
"$",
"optionKey",
",",
"$",
"optionValue",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getTypeConvertersWithParentClasses",
"(",
"$",
"typeConverter",
")",
"as",
"$",
"typeConverter"... | Set a single option (denoted by $optionKey) for the given $typeConverter.
@param string $typeConverter class name of type converter
@param string $optionKey
@param mixed $optionValue
@return PropertyMappingConfiguration this
@api | [
"Set",
"a",
"single",
"option",
"(",
"denoted",
"by",
"$optionKey",
")",
"for",
"the",
"given",
"$typeConverter",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L310-L316 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.getTypeConvertersWithParentClasses | protected function getTypeConvertersWithParentClasses($typeConverter)
{
$typeConverterClasses = class_parents($typeConverter);
$typeConverterClasses = $typeConverterClasses === false ? [] : $typeConverterClasses;
$typeConverterClasses[] = $typeConverter;
return $typeConverterClasses;... | php | protected function getTypeConvertersWithParentClasses($typeConverter)
{
$typeConverterClasses = class_parents($typeConverter);
$typeConverterClasses = $typeConverterClasses === false ? [] : $typeConverterClasses;
$typeConverterClasses[] = $typeConverter;
return $typeConverterClasses;... | [
"protected",
"function",
"getTypeConvertersWithParentClasses",
"(",
"$",
"typeConverter",
")",
"{",
"$",
"typeConverterClasses",
"=",
"class_parents",
"(",
"$",
"typeConverter",
")",
";",
"$",
"typeConverterClasses",
"=",
"$",
"typeConverterClasses",
"===",
"false",
"... | Get type converter classes including parents for the given type converter
When setting an option on a subclassed type converter, this option must also be set on
all its parent type converters.
@param string $typeConverter The type converter class
@return array Class names of type converters | [
"Get",
"type",
"converter",
"classes",
"including",
"parents",
"for",
"the",
"given",
"type",
"converter"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L327-L333 |
neos/flow-development-collection | Neos.Flow/Classes/Property/PropertyMappingConfiguration.php | PropertyMappingConfiguration.traverseProperties | public function traverseProperties(array $splittedPropertyPath)
{
if (count($splittedPropertyPath) === 0) {
return $this;
}
$currentProperty = array_shift($splittedPropertyPath);
if (!isset($this->subConfigurationForProperty[$currentProperty])) {
$type = get_... | php | public function traverseProperties(array $splittedPropertyPath)
{
if (count($splittedPropertyPath) === 0) {
return $this;
}
$currentProperty = array_shift($splittedPropertyPath);
if (!isset($this->subConfigurationForProperty[$currentProperty])) {
$type = get_... | [
"public",
"function",
"traverseProperties",
"(",
"array",
"$",
"splittedPropertyPath",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"splittedPropertyPath",
")",
"===",
"0",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$",
"currentProperty",
"=",
"array_shift",
"("... | Traverse the property configuration. Only used by forProperty().
@param array $splittedPropertyPath
@return PropertyMappingConfiguration (or a subclass thereof) | [
"Traverse",
"the",
"property",
"configuration",
".",
"Only",
"used",
"by",
"forProperty",
"()",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/PropertyMappingConfiguration.php#L356-L372 |
neos/flow-development-collection | Neos.Flow/Classes/Error/ErrorHandler.php | ErrorHandler.handleError | public function handleError(int $errorLevel, string $errorMessage, string $errorFile, int $errorLine)
{
if (error_reporting() === 0) {
return;
}
$errorLevels = [
E_WARNING => 'Warning',
E_NOTICE => 'Notice',
E_USER_ERROR... | php | public function handleError(int $errorLevel, string $errorMessage, string $errorFile, int $errorLine)
{
if (error_reporting() === 0) {
return;
}
$errorLevels = [
E_WARNING => 'Warning',
E_NOTICE => 'Notice',
E_USER_ERROR... | [
"public",
"function",
"handleError",
"(",
"int",
"$",
"errorLevel",
",",
"string",
"$",
"errorMessage",
",",
"string",
"$",
"errorFile",
",",
"int",
"$",
"errorLine",
")",
"{",
"if",
"(",
"error_reporting",
"(",
")",
"===",
"0",
")",
"{",
"return",
";",
... | Handles an error by converting it into an exception.
If error reporting is disabled, either in the php.ini or temporarily through
the shut-up operator "@", no exception will be thrown.
@param integer $errorLevel The error level - one of the E_* constants
@param string $errorMessage The error message
@param string $er... | [
"Handles",
"an",
"error",
"by",
"converting",
"it",
"into",
"an",
"exception",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/ErrorHandler.php#L63-L86 |
neos/flow-development-collection | Neos.Kickstarter/Classes/Utility/Inflector.php | Inflector.humanizeCamelCase | public function humanizeCamelCase($camelCased, $lowercase = false)
{
$spacified = $this->spacify($camelCased);
$result = strtolower($spacified);
if (!$lowercase) {
$result = ucfirst($result);
}
return $result;
} | php | public function humanizeCamelCase($camelCased, $lowercase = false)
{
$spacified = $this->spacify($camelCased);
$result = strtolower($spacified);
if (!$lowercase) {
$result = ucfirst($result);
}
return $result;
} | [
"public",
"function",
"humanizeCamelCase",
"(",
"$",
"camelCased",
",",
"$",
"lowercase",
"=",
"false",
")",
"{",
"$",
"spacified",
"=",
"$",
"this",
"->",
"spacify",
"(",
"$",
"camelCased",
")",
";",
"$",
"result",
"=",
"strtolower",
"(",
"$",
"spacifie... | Convert a model class name like "BlogAuthor" or a field name like
"blogAuthor" to a humanized version like "Blog author" for better readability.
@param string $camelCased The camel cased value
@param boolean $lowercase Return lowercase value
@return string The humanized value | [
"Convert",
"a",
"model",
"class",
"name",
"like",
"BlogAuthor",
"or",
"a",
"field",
"name",
"like",
"blogAuthor",
"to",
"a",
"humanized",
"version",
"like",
"Blog",
"author",
"for",
"better",
"readability",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Kickstarter/Classes/Utility/Inflector.php#L38-L46 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php | StaticRoutePart.match | public function match(&$routePath)
{
$this->value = null;
if ($this->name === null || $this->name === '') {
return false;
}
if ($routePath === '') {
return false;
}
$valueToMatch = substr($routePath, 0, strlen($this->name));
if ($valueT... | php | public function match(&$routePath)
{
$this->value = null;
if ($this->name === null || $this->name === '') {
return false;
}
if ($routePath === '') {
return false;
}
$valueToMatch = substr($routePath, 0, strlen($this->name));
if ($valueT... | [
"public",
"function",
"match",
"(",
"&",
"$",
"routePath",
")",
"{",
"$",
"this",
"->",
"value",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"name",
"===",
"null",
"||",
"$",
"this",
"->",
"name",
"===",
"''",
")",
"{",
"return",
"false",
";"... | Checks whether this Static Route Part correspond to the given $routePath.
This is true if $routePath is not empty and the first part is equal to the Route Part name.
@param string $routePath The request path to be matched - without query parameters, host and fragment.
@return boolean true if Route Part matched $routeP... | [
"Checks",
"whether",
"this",
"Static",
"Route",
"Part",
"correspond",
"to",
"the",
"given",
"$routePath",
".",
"This",
"is",
"true",
"if",
"$routePath",
"is",
"not",
"empty",
"and",
"the",
"first",
"part",
"is",
"equal",
"to",
"the",
"Route",
"Part",
"name... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php#L38-L55 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php | StaticRoutePart.resolve | public function resolve(array &$routeValues)
{
if ($this->name === null || $this->name === '') {
return false;
}
$this->value = $this->name;
if ($this->lowerCase) {
$this->value = strtolower($this->value);
}
return true;
} | php | public function resolve(array &$routeValues)
{
if ($this->name === null || $this->name === '') {
return false;
}
$this->value = $this->name;
if ($this->lowerCase) {
$this->value = strtolower($this->value);
}
return true;
} | [
"public",
"function",
"resolve",
"(",
"array",
"&",
"$",
"routeValues",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"name",
"===",
"null",
"||",
"$",
"this",
"->",
"name",
"===",
"''",
")",
"{",
"return",
"false",
";",
"}",
"$",
"this",
"->",
"value",
... | Sets the Route Part value to the Route Part name and returns true if successful.
@param array $routeValues not used but needed to implement \Neos\Flow\Mvc\Routing\AbstractRoutePart
@return boolean | [
"Sets",
"the",
"Route",
"Part",
"value",
"to",
"the",
"Route",
"Part",
"name",
"and",
"returns",
"true",
"if",
"successful",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php#L63-L73 |
neos/flow-development-collection | Neos.Flow/Classes/Command/SchemaCommandController.php | SchemaCommandController.validateCommand | public function validateCommand(string $configurationFile = null, string $schemaFile = 'resource://Neos.Flow/Private/Schema/Schema.schema.yaml', bool $verbose = false)
{
$this->outputLine('Validating <b>' . $configurationFile . '</b> with schema <b>' . $schemaFile . '</b>');
$this->outputLine();
... | php | public function validateCommand(string $configurationFile = null, string $schemaFile = 'resource://Neos.Flow/Private/Schema/Schema.schema.yaml', bool $verbose = false)
{
$this->outputLine('Validating <b>' . $configurationFile . '</b> with schema <b>' . $schemaFile . '</b>');
$this->outputLine();
... | [
"public",
"function",
"validateCommand",
"(",
"string",
"$",
"configurationFile",
"=",
"null",
",",
"string",
"$",
"schemaFile",
"=",
"'resource://Neos.Flow/Private/Schema/Schema.schema.yaml'",
",",
"bool",
"$",
"verbose",
"=",
"false",
")",
"{",
"$",
"this",
"->",
... | Validate the given configurationfile againt a schema file
@param string $configurationFile path to the validated configuration file
@param string $schemaFile path to the schema file
@param boolean $verbose if true, output more verbose information on the schema files which were used
@return void | [
"Validate",
"the",
"given",
"configurationfile",
"againt",
"a",
"schema",
"file"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SchemaCommandController.php#L52-L107 |
neos/flow-development-collection | Neos.Flow/Classes/Command/SchemaCommandController.php | SchemaCommandController.validateSchemaCommand | public function validateSchemaCommand(string $configurationFile, string $schemaFile = 'resource://Neos.Flow/Private/Schema/Schema.schema.yaml', bool $verbose = false)
{
$this->outputLine('Validating <b>' . $configurationFile . '</b> with schema <b>' . $schemaFile . '</b>');
$this->outputLine();
... | php | public function validateSchemaCommand(string $configurationFile, string $schemaFile = 'resource://Neos.Flow/Private/Schema/Schema.schema.yaml', bool $verbose = false)
{
$this->outputLine('Validating <b>' . $configurationFile . '</b> with schema <b>' . $schemaFile . '</b>');
$this->outputLine();
... | [
"public",
"function",
"validateSchemaCommand",
"(",
"string",
"$",
"configurationFile",
",",
"string",
"$",
"schemaFile",
"=",
"'resource://Neos.Flow/Private/Schema/Schema.schema.yaml'",
",",
"bool",
"$",
"verbose",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"outputLi... | Validate the given configurationfile againt a schema file
@param string $configurationFile path to the validated configuration file
@param string $schemaFile path to the schema file
@param boolean $verbose if true, output more verbose information on the schema files which were used
@return void | [
"Validate",
"the",
"given",
"configurationfile",
"againt",
"a",
"schema",
"file"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/SchemaCommandController.php#L117-L155 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/DependencyInjection/PropertyInjectionTrait.php | PropertyInjectionTrait.Flow_Proxy_LazyPropertyInjection | private function Flow_Proxy_LazyPropertyInjection($propertyObjectName, $propertyClassName, $propertyName, $setterArgumentHash, callable $lazyInjectionResolver)
{
$injection_reference = &$this->$propertyName;
$this->$propertyName = \Neos\Flow\Core\Bootstrap::$staticObjectManager->getInstance($propert... | php | private function Flow_Proxy_LazyPropertyInjection($propertyObjectName, $propertyClassName, $propertyName, $setterArgumentHash, callable $lazyInjectionResolver)
{
$injection_reference = &$this->$propertyName;
$this->$propertyName = \Neos\Flow\Core\Bootstrap::$staticObjectManager->getInstance($propert... | [
"private",
"function",
"Flow_Proxy_LazyPropertyInjection",
"(",
"$",
"propertyObjectName",
",",
"$",
"propertyClassName",
",",
"$",
"propertyName",
",",
"$",
"setterArgumentHash",
",",
"callable",
"$",
"lazyInjectionResolver",
")",
"{",
"$",
"injection_reference",
"=",
... | Does a property injection lazily with fallbacks.
Used in proxy classes.
@param string $propertyObjectName
@param string $propertyClassName
@param string $propertyName
@param string $setterArgumentHash
@param callable $lazyInjectionResolver
@return void | [
"Does",
"a",
"property",
"injection",
"lazily",
"with",
"fallbacks",
".",
"Used",
"in",
"proxy",
"classes",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/PropertyInjectionTrait.php#L30-L40 |
neos/flow-development-collection | Neos.Flow.Log/Classes/Backend/AnsiConsoleBackend.php | AnsiConsoleBackend.open | public function open()
{
parent::open();
$this->tagFormats = [
'emergency' => self::FG_BLACK . self::BG_RED . '|' . self::END,
'alert' => self::FG_BLACK . self::BG_YELLOW . '|' . self::END,
'critical' => self::FG_BLACK . self::BG_CYAN . '|' . self::END,
... | php | public function open()
{
parent::open();
$this->tagFormats = [
'emergency' => self::FG_BLACK . self::BG_RED . '|' . self::END,
'alert' => self::FG_BLACK . self::BG_YELLOW . '|' . self::END,
'critical' => self::FG_BLACK . self::BG_CYAN . '|' . self::END,
... | [
"public",
"function",
"open",
"(",
")",
"{",
"parent",
"::",
"open",
"(",
")",
";",
"$",
"this",
"->",
"tagFormats",
"=",
"[",
"'emergency'",
"=>",
"self",
"::",
"FG_BLACK",
".",
"self",
"::",
"BG_RED",
".",
"'|'",
".",
"self",
"::",
"END",
",",
"'... | Open the log backend
Initializes tag formats.
@return void | [
"Open",
"the",
"log",
"backend"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/AnsiConsoleBackend.php#L55-L68 |
neos/flow-development-collection | Neos.Flow.Log/Classes/Backend/AnsiConsoleBackend.php | AnsiConsoleBackend.append | public function append($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null)
{
if ($severity > $this->severityThreshold) {
return;
}
$severityName = strtolower(trim($this->severityLabels[$severity]));
$output =... | php | public function append($message, $severity = LOG_INFO, $additionalData = null, $packageKey = null, $className = null, $methodName = null)
{
if ($severity > $this->severityThreshold) {
return;
}
$severityName = strtolower(trim($this->severityLabels[$severity]));
$output =... | [
"public",
"function",
"append",
"(",
"$",
"message",
",",
"$",
"severity",
"=",
"LOG_INFO",
",",
"$",
"additionalData",
"=",
"null",
",",
"$",
"packageKey",
"=",
"null",
",",
"$",
"className",
"=",
"null",
",",
"$",
"methodName",
"=",
"null",
")",
"{",... | Appends the given message along with the additional information into the log.
@param string $message
@param integer $severity
@param array $additionalData
@param string $packageKey
@param string $className
@param string $methodName
@return void | [
"Appends",
"the",
"given",
"message",
"along",
"with",
"the",
"additional",
"information",
"into",
"the",
"log",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/AnsiConsoleBackend.php#L81-L95 |
neos/flow-development-collection | Neos.Flow.Log/Classes/Backend/AnsiConsoleBackend.php | AnsiConsoleBackend.formatOutput | protected function formatOutput($output)
{
$tagFormats = $this->tagFormats;
$disableAnsi = $this->disableAnsi;
do {
$lastOutput = $output;
$output = preg_replace_callback('|(<([^>]+?)>(.*?)</\2>)|s', function ($matches) use ($tagFormats, $disableAnsi) {
... | php | protected function formatOutput($output)
{
$tagFormats = $this->tagFormats;
$disableAnsi = $this->disableAnsi;
do {
$lastOutput = $output;
$output = preg_replace_callback('|(<([^>]+?)>(.*?)</\2>)|s', function ($matches) use ($tagFormats, $disableAnsi) {
... | [
"protected",
"function",
"formatOutput",
"(",
"$",
"output",
")",
"{",
"$",
"tagFormats",
"=",
"$",
"this",
"->",
"tagFormats",
";",
"$",
"disableAnsi",
"=",
"$",
"this",
"->",
"disableAnsi",
";",
"do",
"{",
"$",
"lastOutput",
"=",
"$",
"output",
";",
... | Apply ansi formatting to output according to tags
@param string $output
@return string | [
"Apply",
"ansi",
"formatting",
"to",
"output",
"according",
"to",
"tags"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/AnsiConsoleBackend.php#L103-L119 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandManager.php | CommandManager.getAvailableCommands | public function getAvailableCommands(): array
{
if ($this->availableCommands === null) {
$this->availableCommands = [];
foreach (static::getCommandControllerMethodArguments($this->objectManager) as $className => $methods) {
foreach (array_keys($methods) as $methodNam... | php | public function getAvailableCommands(): array
{
if ($this->availableCommands === null) {
$this->availableCommands = [];
foreach (static::getCommandControllerMethodArguments($this->objectManager) as $className => $methods) {
foreach (array_keys($methods) as $methodNam... | [
"public",
"function",
"getAvailableCommands",
"(",
")",
":",
"array",
"{",
"if",
"(",
"$",
"this",
"->",
"availableCommands",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"availableCommands",
"=",
"[",
"]",
";",
"foreach",
"(",
"static",
"::",
"getCommandCo... | Returns an array of all commands
@return array<Command>
@api | [
"Returns",
"an",
"array",
"of",
"all",
"commands"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandManager.php#L73-L86 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandManager.php | CommandManager.getCommandByIdentifier | public function getCommandByIdentifier(string $commandIdentifier): Command
{
$commandIdentifier = strtolower(trim($commandIdentifier));
if ($commandIdentifier === 'help') {
$commandIdentifier = 'neos.flow:help:help';
}
if ($commandIdentifier === 'sys') {
$comm... | php | public function getCommandByIdentifier(string $commandIdentifier): Command
{
$commandIdentifier = strtolower(trim($commandIdentifier));
if ($commandIdentifier === 'help') {
$commandIdentifier = 'neos.flow:help:help';
}
if ($commandIdentifier === 'sys') {
$comm... | [
"public",
"function",
"getCommandByIdentifier",
"(",
"string",
"$",
"commandIdentifier",
")",
":",
"Command",
"{",
"$",
"commandIdentifier",
"=",
"strtolower",
"(",
"trim",
"(",
"$",
"commandIdentifier",
")",
")",
";",
"if",
"(",
"$",
"commandIdentifier",
"===",... | Returns a Command that matches the given identifier.
If no Command could be found a CommandNotFoundException is thrown
If more than one Command matches an AmbiguousCommandIdentifierException is thrown that contains the matched Commands
@param string $commandIdentifier command identifier in the format foo:bar:baz
@retu... | [
"Returns",
"a",
"Command",
"that",
"matches",
"the",
"given",
"identifier",
".",
"If",
"no",
"Command",
"could",
"be",
"found",
"a",
"CommandNotFoundException",
"is",
"thrown",
"If",
"more",
"than",
"one",
"Command",
"matches",
"an",
"AmbiguousCommandIdentifierExc... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandManager.php#L99-L118 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandManager.php | CommandManager.getCommandsByIdentifier | public function getCommandsByIdentifier(string $commandIdentifier): array
{
$availableCommands = $this->getAvailableCommands();
$matchedCommands = [];
foreach ($availableCommands as $command) {
if ($this->commandMatchesIdentifier($command, $commandIdentifier)) {
$... | php | public function getCommandsByIdentifier(string $commandIdentifier): array
{
$availableCommands = $this->getAvailableCommands();
$matchedCommands = [];
foreach ($availableCommands as $command) {
if ($this->commandMatchesIdentifier($command, $commandIdentifier)) {
$... | [
"public",
"function",
"getCommandsByIdentifier",
"(",
"string",
"$",
"commandIdentifier",
")",
":",
"array",
"{",
"$",
"availableCommands",
"=",
"$",
"this",
"->",
"getAvailableCommands",
"(",
")",
";",
"$",
"matchedCommands",
"=",
"[",
"]",
";",
"foreach",
"(... | Returns an array of Commands that matches the given identifier.
If no Command could be found, an empty array is returned
@param string $commandIdentifier command identifier in the format foo:bar:baz
@return array<Command>
@api | [
"Returns",
"an",
"array",
"of",
"Commands",
"that",
"matches",
"the",
"given",
"identifier",
".",
"If",
"no",
"Command",
"could",
"be",
"found",
"an",
"empty",
"array",
"is",
"returned"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandManager.php#L128-L139 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandManager.php | CommandManager.getShortCommandIdentifiers | protected function getShortCommandIdentifiers(): array
{
if ($this->shortCommandIdentifiers === null) {
$this->shortCommandIdentifiers = [];
$commandsByCommandName = [];
/** @var Command $availableCommand */
foreach ($this->getAvailableCommands() as $available... | php | protected function getShortCommandIdentifiers(): array
{
if ($this->shortCommandIdentifiers === null) {
$this->shortCommandIdentifiers = [];
$commandsByCommandName = [];
/** @var Command $availableCommand */
foreach ($this->getAvailableCommands() as $available... | [
"protected",
"function",
"getShortCommandIdentifiers",
"(",
")",
":",
"array",
"{",
"if",
"(",
"$",
"this",
"->",
"shortCommandIdentifiers",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"shortCommandIdentifiers",
"=",
"[",
"]",
";",
"$",
"commandsByCommandName",
... | Returns an array that contains all available command identifiers and their shortest non-ambiguous alias
@return array in the format array('full.command:identifier1' => 'alias1', 'full.command:identifier2' => 'alias2') | [
"Returns",
"an",
"array",
"that",
"contains",
"all",
"available",
"command",
"identifiers",
"and",
"their",
"shortest",
"non",
"-",
"ambiguous",
"alias"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandManager.php#L166-L202 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandManager.php | CommandManager.commandMatchesIdentifier | protected function commandMatchesIdentifier(Command $command, string $commandIdentifier): bool
{
$commandIdentifierParts = explode(':', $command->getCommandIdentifier());
$searchedCommandIdentifierParts = explode(':', $commandIdentifier);
$packageKey = array_shift($commandIdentifierParts);
... | php | protected function commandMatchesIdentifier(Command $command, string $commandIdentifier): bool
{
$commandIdentifierParts = explode(':', $command->getCommandIdentifier());
$searchedCommandIdentifierParts = explode(':', $commandIdentifier);
$packageKey = array_shift($commandIdentifierParts);
... | [
"protected",
"function",
"commandMatchesIdentifier",
"(",
"Command",
"$",
"command",
",",
"string",
"$",
"commandIdentifier",
")",
":",
"bool",
"{",
"$",
"commandIdentifierParts",
"=",
"explode",
"(",
"':'",
",",
"$",
"command",
"->",
"getCommandIdentifier",
"(",
... | Returns true if the specified command identifier matches the identifier of the specified command.
This is the case, if
- the identifiers are the same
- if at least the last two command parts match (case sensitive) or
- if only the package key is specified and matches the commands package key
The first part (package key... | [
"Returns",
"true",
"if",
"the",
"specified",
"command",
"identifier",
"matches",
"the",
"identifier",
"of",
"the",
"specified",
"command",
".",
"This",
"is",
"the",
"case",
"if",
"-",
"the",
"identifiers",
"are",
"the",
"same",
"-",
"if",
"at",
"least",
"t... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandManager.php#L216-L237 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandManager.php | CommandManager.getCommandMethodParameters | public function getCommandMethodParameters(string $controllerObjectName, string $commandMethodName): array
{
$commandControllerMethodArgumentMap = static::getCommandControllerMethodArguments($this->objectManager);
return isset($commandControllerMethodArgumentMap[$controllerObjectName][$commandMetho... | php | public function getCommandMethodParameters(string $controllerObjectName, string $commandMethodName): array
{
$commandControllerMethodArgumentMap = static::getCommandControllerMethodArguments($this->objectManager);
return isset($commandControllerMethodArgumentMap[$controllerObjectName][$commandMetho... | [
"public",
"function",
"getCommandMethodParameters",
"(",
"string",
"$",
"controllerObjectName",
",",
"string",
"$",
"commandMethodName",
")",
":",
"array",
"{",
"$",
"commandControllerMethodArgumentMap",
"=",
"static",
"::",
"getCommandControllerMethodArguments",
"(",
"$"... | Get the possible parameters for the command specified by CommandController and method name.
@param string $controllerObjectName
@param string $commandMethodName
@return array | [
"Get",
"the",
"possible",
"parameters",
"for",
"the",
"command",
"specified",
"by",
"CommandController",
"and",
"method",
"name",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandManager.php#L246-L251 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/DateTimeRangeValidator.php | DateTimeRangeValidator.isValid | protected function isValid($dateTime)
{
if (!$dateTime instanceof \DateTimeInterface) {
$this->addError('The given value was not a valid date', 1324314378);
return;
}
$earliestDate = isset($this->options['earliestDate']) ? $this->parseReferenceDate($this->options['ear... | php | protected function isValid($dateTime)
{
if (!$dateTime instanceof \DateTimeInterface) {
$this->addError('The given value was not a valid date', 1324314378);
return;
}
$earliestDate = isset($this->options['earliestDate']) ? $this->parseReferenceDate($this->options['ear... | [
"protected",
"function",
"isValid",
"(",
"$",
"dateTime",
")",
"{",
"if",
"(",
"!",
"$",
"dateTime",
"instanceof",
"\\",
"DateTimeInterface",
")",
"{",
"$",
"this",
"->",
"addError",
"(",
"'The given value was not a valid date'",
",",
"1324314378",
")",
";",
"... | Adds errors if the given DateTime does not match the set boundaries.
latestDate and earliestDate may be each <time>, <start>/<duration> or <duration>/<end>, where <duration> is an
ISO 8601 duration and <start> or <end> or <time> may be 'now' or a PHP supported format. (1)
In general, you are able to provide a timesta... | [
"Adds",
"errors",
"if",
"the",
"given",
"DateTime",
"does",
"not",
"match",
"the",
"set",
"boundaries",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/DateTimeRangeValidator.php#L72-L94 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/DateTimeRangeValidator.php | DateTimeRangeValidator.parseReferenceDate | protected function parseReferenceDate($referenceDateString)
{
$referenceDateParts = explode('/', $referenceDateString, 2);
if (count($referenceDateParts) === 1) {
// assume a valid Date/Time string
return new \DateTime($referenceDateParts[0]);
}
// check if t... | php | protected function parseReferenceDate($referenceDateString)
{
$referenceDateParts = explode('/', $referenceDateString, 2);
if (count($referenceDateParts) === 1) {
// assume a valid Date/Time string
return new \DateTime($referenceDateParts[0]);
}
// check if t... | [
"protected",
"function",
"parseReferenceDate",
"(",
"$",
"referenceDateString",
")",
"{",
"$",
"referenceDateParts",
"=",
"explode",
"(",
"'/'",
",",
"$",
"referenceDateString",
",",
"2",
")",
";",
"if",
"(",
"count",
"(",
"$",
"referenceDateParts",
")",
"==="... | Calculates a DateTime object from a given Time interval
@param string $referenceDateString being one of <time>, <start>/<offset> or <offset>/<end>
@return \DateTime
@throws InvalidValidationOptionsException
@see isValid() | [
"Calculates",
"a",
"DateTime",
"object",
"from",
"a",
"given",
"Time",
"interval"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/DateTimeRangeValidator.php#L104-L124 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.substr | public function substr($string, $start, $length = null)
{
$string = (string)$string;
if ($length === null) {
$length = mb_strlen($string, 'UTF-8');
}
$length = max(0, $length);
return mb_substr($string, $start, $length, 'UTF-8');
} | php | public function substr($string, $start, $length = null)
{
$string = (string)$string;
if ($length === null) {
$length = mb_strlen($string, 'UTF-8');
}
$length = max(0, $length);
return mb_substr($string, $start, $length, 'UTF-8');
} | [
"public",
"function",
"substr",
"(",
"$",
"string",
",",
"$",
"start",
",",
"$",
"length",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"$",
"length",
"===",
"null",
")",
"{",
"$",
"length",
"=",
... | Return the characters in a string from start up to the given length
This implementation follows the JavaScript specification for "substr".
Examples::
String.substr('Hello, World!', 7, 5) == 'World'
String.substr('Hello, World!', 7) == 'World!'
String.substr('Hello, World!', -6) == 'World!'
@param string $string A s... | [
"Return",
"the",
"characters",
"in",
"a",
"string",
"from",
"start",
"up",
"to",
"the",
"given",
"length"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L43-L52 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.substring | public function substring($string, $start, $end = null)
{
$string = (string)$string;
if ($end === null) {
$end = mb_strlen($string, 'UTF-8');
}
$start = max(0, $start);
$end = max(0, $end);
if ($start > $end) {
$temp = $start;
$sta... | php | public function substring($string, $start, $end = null)
{
$string = (string)$string;
if ($end === null) {
$end = mb_strlen($string, 'UTF-8');
}
$start = max(0, $start);
$end = max(0, $end);
if ($start > $end) {
$temp = $start;
$sta... | [
"public",
"function",
"substring",
"(",
"$",
"string",
",",
"$",
"start",
",",
"$",
"end",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"$",
"end",
"===",
"null",
")",
"{",
"$",
"end",
"=",
"mb_s... | Return the characters in a string from a start index to an end index
This implementation follows the JavaScript specification for "substring".
Examples::
String.substring('Hello, World!', 7, 12) == 'World'
String.substring('Hello, World!', 7) == 'World!'
@param string $string
@param integer $start Start index
@para... | [
"Return",
"the",
"characters",
"in",
"a",
"string",
"from",
"a",
"start",
"index",
"to",
"an",
"end",
"index"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L69-L85 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.endsWith | public function endsWith($string, $search, $position = null)
{
$string = (string)$string;
$position = $position !== null ? $position : mb_strlen($string, 'UTF-8');
$position = $position - mb_strlen($search, 'UTF-8');
return mb_strrpos($string, $search, null, 'UTF-8') === $position;
... | php | public function endsWith($string, $search, $position = null)
{
$string = (string)$string;
$position = $position !== null ? $position : mb_strlen($string, 'UTF-8');
$position = $position - mb_strlen($search, 'UTF-8');
return mb_strrpos($string, $search, null, 'UTF-8') === $position;
... | [
"public",
"function",
"endsWith",
"(",
"$",
"string",
",",
"$",
"search",
",",
"$",
"position",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"$",
"position",
"=",
"$",
"position",
"!==",
"null",
"?",
"$",
"posi... | Test if a string ends with the given search string
Example::
String.endsWith('Hello, World!', 'World!') == true
@param string $string The string
@param string $search A string to search
@param integer $position Optional position for limiting the string
@return boolean true if the string ends with the given search | [
"Test",
"if",
"a",
"string",
"ends",
"with",
"the",
"given",
"search",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L118-L125 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.indexOf | public function indexOf($string, $search, $fromIndex = null)
{
$string = (string)$string;
$fromIndex = max(0, $fromIndex);
if ($search === '') {
return min(mb_strlen($string, 'UTF-8'), $fromIndex);
}
$index = mb_strpos($string, $search, $fromIndex, 'UTF-8');
... | php | public function indexOf($string, $search, $fromIndex = null)
{
$string = (string)$string;
$fromIndex = max(0, $fromIndex);
if ($search === '') {
return min(mb_strlen($string, 'UTF-8'), $fromIndex);
}
$index = mb_strpos($string, $search, $fromIndex, 'UTF-8');
... | [
"public",
"function",
"indexOf",
"(",
"$",
"string",
",",
"$",
"search",
",",
"$",
"fromIndex",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"$",
"fromIndex",
"=",
"max",
"(",
"0",
",",
"$",
"fromIndex",
")",
... | Find the first position of a substring in the given string
Example::
String.indexOf("Blue Whale", "Blue") == 0
@param string $string The input string
@param string $search The substring to search for
@param integer $fromIndex The index where the search should start, defaults to the beginning
@return integer The inde... | [
"Find",
"the",
"first",
"position",
"of",
"a",
"substring",
"in",
"the",
"given",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L175-L188 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.lastIndexOf | public function lastIndexOf($string, $search, $toIndex = null)
{
$string = (string)$string;
$length = mb_strlen($string, 'UTF-8');
if ($toIndex === null) {
$toIndex = $length;
}
$toIndex = max(0, $toIndex);
if ($search === '') {
return min($le... | php | public function lastIndexOf($string, $search, $toIndex = null)
{
$string = (string)$string;
$length = mb_strlen($string, 'UTF-8');
if ($toIndex === null) {
$toIndex = $length;
}
$toIndex = max(0, $toIndex);
if ($search === '') {
return min($le... | [
"public",
"function",
"lastIndexOf",
"(",
"$",
"string",
",",
"$",
"search",
",",
"$",
"toIndex",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"$",
"length",
"=",
"mb_strlen",
"(",
"$",
"string",
",",
"'UTF-8'",
... | Find the last position of a substring in the given string
Example::
String.lastIndexOf("Developers Developers Developers!", "Developers") == 22
@param string $string The input string
@param string $search The substring to search for
@param integer $toIndex The position where the backwards search should start, defaul... | [
"Find",
"the",
"last",
"position",
"of",
"a",
"substring",
"in",
"the",
"given",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L202-L220 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.pregMatch | public function pregMatch($string, $pattern)
{
$number = preg_match($pattern, (string)$string, $matches);
if ($number === false) {
throw new EvaluationException('Error evaluating regular expression ' . $pattern . ': ' . preg_last_error(), 1372793595);
}
if ($number === 0)... | php | public function pregMatch($string, $pattern)
{
$number = preg_match($pattern, (string)$string, $matches);
if ($number === false) {
throw new EvaluationException('Error evaluating regular expression ' . $pattern . ': ' . preg_last_error(), 1372793595);
}
if ($number === 0)... | [
"public",
"function",
"pregMatch",
"(",
"$",
"string",
",",
"$",
"pattern",
")",
"{",
"$",
"number",
"=",
"preg_match",
"(",
"$",
"pattern",
",",
"(",
"string",
")",
"$",
"string",
",",
"$",
"matches",
")",
";",
"if",
"(",
"$",
"number",
"===",
"fa... | Match a string with a regular expression (PREG style)
Example::
String.pregMatch("For more information, see Chapter 3.4.5.1", "/(chapter \d+(\.\d)*)/i")
== ['Chapter 3.4.5.1', 'Chapter 3.4.5.1', '.1']
@param string $string The input string
@param string $pattern A PREG pattern
@return array The matches as array or N... | [
"Match",
"a",
"string",
"with",
"a",
"regular",
"expression",
"(",
"PREG",
"style",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L235-L245 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.pregMatchAll | public function pregMatchAll($string, $pattern)
{
$number = preg_match_all($pattern, (string)$string, $matches);
if ($number === false) {
throw new EvaluationException('Error evaluating regular expression ' . $pattern . ': ' . preg_last_error(), 1372793595);
}
if ($number... | php | public function pregMatchAll($string, $pattern)
{
$number = preg_match_all($pattern, (string)$string, $matches);
if ($number === false) {
throw new EvaluationException('Error evaluating regular expression ' . $pattern . ': ' . preg_last_error(), 1372793595);
}
if ($number... | [
"public",
"function",
"pregMatchAll",
"(",
"$",
"string",
",",
"$",
"pattern",
")",
"{",
"$",
"number",
"=",
"preg_match_all",
"(",
"$",
"pattern",
",",
"(",
"string",
")",
"$",
"string",
",",
"$",
"matches",
")",
";",
"if",
"(",
"$",
"number",
"==="... | Perform a global regular expression match (PREG style)
Example::
String.pregMatchAll("<hr id="icon-one" /><hr id="icon-two" />", '/id="icon-(.+?)"/')
== [['id="icon-one"', 'id="icon-two"'],['one','two']]
@param string $string The input string
@param string $pattern A PREG pattern
@return array The matches as array o... | [
"Perform",
"a",
"global",
"regular",
"expression",
"match",
"(",
"PREG",
"style",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L260-L270 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.pregSplit | public function pregSplit($string, $pattern, $limit = null)
{
return preg_split($pattern, (string)$string, $limit);
} | php | public function pregSplit($string, $pattern, $limit = null)
{
return preg_split($pattern, (string)$string, $limit);
} | [
"public",
"function",
"pregSplit",
"(",
"$",
"string",
",",
"$",
"pattern",
",",
"$",
"limit",
"=",
"null",
")",
"{",
"return",
"preg_split",
"(",
"$",
"pattern",
",",
"(",
"string",
")",
"$",
"string",
",",
"$",
"limit",
")",
";",
"}"
] | Split a string by a separator using regular expression matching (PREG style)
Examples::
String.pregSplit("foo bar baz", "/\s+/") == ['foo', 'bar', 'baz']
String.pregSplit("first second third", "/\s+/", 2) == ['first', 'second third']
@param string $string The input string
@param string $pattern A PREG pattern
@par... | [
"Split",
"a",
"string",
"by",
"a",
"separator",
"using",
"regular",
"expression",
"matching",
"(",
"PREG",
"style",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L303-L306 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.split | public function split($string, $separator = null, $limit = null)
{
$string = (string)$string;
if ($separator === null) {
return [$string];
}
if ($separator === '') {
$result = str_split($string);
if ($limit !== null) {
$result = ar... | php | public function split($string, $separator = null, $limit = null)
{
$string = (string)$string;
if ($separator === null) {
return [$string];
}
if ($separator === '') {
$result = str_split($string);
if ($limit !== null) {
$result = ar... | [
"public",
"function",
"split",
"(",
"$",
"string",
",",
"$",
"separator",
"=",
"null",
",",
"$",
"limit",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"$",
"separator",
"===",
"null",
")",
"{",
"re... | Split a string by a separator
Example::
String.split("My hovercraft is full of eels", " ") == ['My', 'hovercraft', 'is', 'full', 'of', 'eels']
String.split("Foo", "", 2) == ['F', 'o']
Node: This implementation follows JavaScript semantics without support of regular expressions.
@param string $string The string to s... | [
"Split",
"a",
"string",
"by",
"a",
"separator"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L342-L362 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.startsWith | public function startsWith($string, $search, $position = null)
{
$position = $position !== null ? $position : 0;
return mb_strpos((string)$string, $search, null, 'UTF-8') === $position;
} | php | public function startsWith($string, $search, $position = null)
{
$position = $position !== null ? $position : 0;
return mb_strpos((string)$string, $search, null, 'UTF-8') === $position;
} | [
"public",
"function",
"startsWith",
"(",
"$",
"string",
",",
"$",
"search",
",",
"$",
"position",
"=",
"null",
")",
"{",
"$",
"position",
"=",
"$",
"position",
"!==",
"null",
"?",
"$",
"position",
":",
"0",
";",
"return",
"mb_strpos",
"(",
"(",
"stri... | Test if a string starts with the given search string
Examples::
String.startsWith('Hello world!', 'Hello') == true
String.startsWith('My hovercraft is full of...', 'Hello') == false
String.startsWith('My hovercraft is full of...', 'hovercraft', 3) == true
@param string $string The input string
@param string $search ... | [
"Test",
"if",
"a",
"string",
"starts",
"with",
"the",
"given",
"search",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L378-L382 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.trim | public function trim($string, $charlist = null)
{
$string = (string)$string;
if ($charlist === null) {
return trim($string);
} else {
return trim($string, $charlist);
}
} | php | public function trim($string, $charlist = null)
{
$string = (string)$string;
if ($charlist === null) {
return trim($string);
} else {
return trim($string, $charlist);
}
} | [
"public",
"function",
"trim",
"(",
"$",
"string",
",",
"$",
"charlist",
"=",
"null",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"$",
"charlist",
"===",
"null",
")",
"{",
"return",
"trim",
"(",
"$",
"string",
... | Trim whitespace at the beginning and end of a string
@param string $string The string to trim
@param string $charlist List of characters that should be trimmed, defaults to whitespace
@return string The trimmed string | [
"Trim",
"whitespace",
"at",
"the",
"beginning",
"and",
"end",
"of",
"a",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L494-L503 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.htmlSpecialChars | public function htmlSpecialChars($string, $preserveEntities = false)
{
return htmlspecialchars((string)$string, null, null, !$preserveEntities);
} | php | public function htmlSpecialChars($string, $preserveEntities = false)
{
return htmlspecialchars((string)$string, null, null, !$preserveEntities);
} | [
"public",
"function",
"htmlSpecialChars",
"(",
"$",
"string",
",",
"$",
"preserveEntities",
"=",
"false",
")",
"{",
"return",
"htmlspecialchars",
"(",
"(",
"string",
")",
"$",
"string",
",",
"null",
",",
"null",
",",
"!",
"$",
"preserveEntities",
")",
";",... | Convert special characters to HTML entities
@param string $string The string to convert
@param boolean $preserveEntities ``true`` if entities should not be double encoded
@return string The converted string | [
"Convert",
"special",
"characters",
"to",
"HTML",
"entities"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L580-L583 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.crop | public function crop($string, $maximumCharacters, $suffix = '')
{
$string = (string)$string;
if (UnicodeFunctions::strlen($string) > $maximumCharacters) {
$string = UnicodeFunctions::substr($string, 0, $maximumCharacters);
$string .= $suffix;
}
return $strin... | php | public function crop($string, $maximumCharacters, $suffix = '')
{
$string = (string)$string;
if (UnicodeFunctions::strlen($string) > $maximumCharacters) {
$string = UnicodeFunctions::substr($string, 0, $maximumCharacters);
$string .= $suffix;
}
return $strin... | [
"public",
"function",
"crop",
"(",
"$",
"string",
",",
"$",
"maximumCharacters",
",",
"$",
"suffix",
"=",
"''",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"UnicodeFunctions",
"::",
"strlen",
"(",
"$",
"string",
"... | Crop a string to ``maximumCharacters`` length, optionally appending ``suffix`` if cropping was necessary.
@param string $string The input string
@param integer $maximumCharacters Number of characters where cropping should happen
@param string $suffix Suffix to be appended if cropping was necessary
@return string The c... | [
"Crop",
"a",
"string",
"to",
"maximumCharacters",
"length",
"optionally",
"appending",
"suffix",
"if",
"cropping",
"was",
"necessary",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L593-L603 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.cropAtWord | public function cropAtWord($string, $maximumCharacters, $suffix = '')
{
$string = (string)$string;
if (UnicodeFunctions::strlen($string) > $maximumCharacters) {
$iterator = new TextIterator($string, TextIterator::WORD);
$string = UnicodeFunctions::substr($string, 0, $iterato... | php | public function cropAtWord($string, $maximumCharacters, $suffix = '')
{
$string = (string)$string;
if (UnicodeFunctions::strlen($string) > $maximumCharacters) {
$iterator = new TextIterator($string, TextIterator::WORD);
$string = UnicodeFunctions::substr($string, 0, $iterato... | [
"public",
"function",
"cropAtWord",
"(",
"$",
"string",
",",
"$",
"maximumCharacters",
",",
"$",
"suffix",
"=",
"''",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"UnicodeFunctions",
"::",
"strlen",
"(",
"$",
"string... | Crop a string to ``maximumCharacters`` length, taking words into account,
optionally appending ``suffix`` if cropping was necessary.
@param string $string The input string
@param integer $maximumCharacters Number of characters where cropping should happen
@param string $suffix Suffix to be appended if cropping was nec... | [
"Crop",
"a",
"string",
"to",
"maximumCharacters",
"length",
"taking",
"words",
"into",
"account",
"optionally",
"appending",
"suffix",
"if",
"cropping",
"was",
"necessary",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L614-L625 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.cropAtSentence | public function cropAtSentence($string, $maximumCharacters, $suffix = '')
{
$string = (string)$string;
if (UnicodeFunctions::strlen($string) > $maximumCharacters) {
$iterator = new TextIterator($string, TextIterator::SENTENCE);
$string = UnicodeFunctions::substr($string, 0, ... | php | public function cropAtSentence($string, $maximumCharacters, $suffix = '')
{
$string = (string)$string;
if (UnicodeFunctions::strlen($string) > $maximumCharacters) {
$iterator = new TextIterator($string, TextIterator::SENTENCE);
$string = UnicodeFunctions::substr($string, 0, ... | [
"public",
"function",
"cropAtSentence",
"(",
"$",
"string",
",",
"$",
"maximumCharacters",
",",
"$",
"suffix",
"=",
"''",
")",
"{",
"$",
"string",
"=",
"(",
"string",
")",
"$",
"string",
";",
"if",
"(",
"UnicodeFunctions",
"::",
"strlen",
"(",
"$",
"st... | Crop a string to ``maximumCharacters`` length, taking sentences into account,
optionally appending ``suffix`` if cropping was necessary.
@param string $string The input string
@param integer $maximumCharacters Number of characters where cropping should happen
@param string $suffix Suffix to be appended if cropping was... | [
"Crop",
"a",
"string",
"to",
"maximumCharacters",
"length",
"taking",
"sentences",
"into",
"account",
"optionally",
"appending",
"suffix",
"if",
"cropping",
"was",
"necessary",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L636-L647 |
neos/flow-development-collection | Neos.Eel/Classes/Helper/StringHelper.php | StringHelper.wordCount | public function wordCount($unicodeString)
{
$unicodeString = (string)$unicodeString;
$unicodeString = preg_replace('/[[:punct:][:digit:]]/', '', $unicodeString);
return count(preg_split('/[[:space:]]+/', $unicodeString, 0, PREG_SPLIT_NO_EMPTY));
} | php | public function wordCount($unicodeString)
{
$unicodeString = (string)$unicodeString;
$unicodeString = preg_replace('/[[:punct:][:digit:]]/', '', $unicodeString);
return count(preg_split('/[[:space:]]+/', $unicodeString, 0, PREG_SPLIT_NO_EMPTY));
} | [
"public",
"function",
"wordCount",
"(",
"$",
"unicodeString",
")",
"{",
"$",
"unicodeString",
"=",
"(",
"string",
")",
"$",
"unicodeString",
";",
"$",
"unicodeString",
"=",
"preg_replace",
"(",
"'/[[:punct:][:digit:]]/'",
",",
"''",
",",
"$",
"unicodeString",
... | Return the count of words for a given string. Remove marks & digits and
flatten all kind of whitespaces (tabs, new lines and multiple spaces)
For example this helper can be utilized to calculate the reading time of an article.
@param string $unicodeString The input string
@return integer Number of words | [
"Return",
"the",
"count",
"of",
"words",
"for",
"a",
"given",
"string",
".",
"Remove",
"marks",
"&",
"digits",
"and",
"flatten",
"all",
"kind",
"of",
"whitespaces",
"(",
"tabs",
"new",
"lines",
"and",
"multiple",
"spaces",
")",
"For",
"example",
"this",
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/StringHelper.php#L698-L705 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php | AbstractTemplateView.renderSection | public function renderSection($sectionName, array $variables = [], $ignoreUnknown = false)
{
// FIXME: We should probably give variables explicitly to this method.
if ($variables === []) {
$variables = $this->getRenderingContext()->getVariableProvider()->getAll();
}
retu... | php | public function renderSection($sectionName, array $variables = [], $ignoreUnknown = false)
{
// FIXME: We should probably give variables explicitly to this method.
if ($variables === []) {
$variables = $this->getRenderingContext()->getVariableProvider()->getAll();
}
retu... | [
"public",
"function",
"renderSection",
"(",
"$",
"sectionName",
",",
"array",
"$",
"variables",
"=",
"[",
"]",
",",
"$",
"ignoreUnknown",
"=",
"false",
")",
"{",
"// FIXME: We should probably give variables explicitly to this method.",
"if",
"(",
"$",
"variables",
"... | Renders a given section.
@param string $sectionName Name of section to render
@param array $variables The variables to use
@param boolean $ignoreUnknown Ignore an unknown section and just return an empty string
@return string rendered template for the section
@throws \Neos\FluidAdaptor\View\Exception\InvalidSectionExc... | [
"Renders",
"a",
"given",
"section",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php#L197-L205 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php | AbstractTemplateView.validateOptions | protected function validateOptions(array $options)
{
// check for options given but not supported
if (($unsupportedOptions = array_diff_key($options, $this->supportedOptions)) !== []) {
throw new Exception(sprintf('The view options "%s" you\'re trying to set don\'t exist in class "%s".',... | php | protected function validateOptions(array $options)
{
// check for options given but not supported
if (($unsupportedOptions = array_diff_key($options, $this->supportedOptions)) !== []) {
throw new Exception(sprintf('The view options "%s" you\'re trying to set don\'t exist in class "%s".',... | [
"protected",
"function",
"validateOptions",
"(",
"array",
"$",
"options",
")",
"{",
"// check for options given but not supported",
"if",
"(",
"(",
"$",
"unsupportedOptions",
"=",
"array_diff_key",
"(",
"$",
"options",
",",
"$",
"this",
"->",
"supportedOptions",
")"... | Validate options given to this view.
@param array $options
@return void
@throws Exception | [
"Validate",
"options",
"given",
"to",
"this",
"view",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php#L214-L231 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php | AbstractTemplateView.setOptions | protected function setOptions(array $options)
{
$this->options = array_merge(
array_map(
function ($value) {
return $value[0];
},
$this->supportedOptions
),
$options
);
} | php | protected function setOptions(array $options)
{
$this->options = array_merge(
array_map(
function ($value) {
return $value[0];
},
$this->supportedOptions
),
$options
);
} | [
"protected",
"function",
"setOptions",
"(",
"array",
"$",
"options",
")",
"{",
"$",
"this",
"->",
"options",
"=",
"array_merge",
"(",
"array_map",
"(",
"function",
"(",
"$",
"value",
")",
"{",
"return",
"$",
"value",
"[",
"0",
"]",
";",
"}",
",",
"$"... | Merges the given options with the default values
and sets the resulting options in this object.
@param array $options
@return void | [
"Merges",
"the",
"given",
"options",
"with",
"the",
"default",
"values",
"and",
"sets",
"the",
"resulting",
"options",
"in",
"this",
"object",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php#L240-L251 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php | AbstractTemplateView.getOption | public function getOption($optionName)
{
if (!array_key_exists($optionName, $this->supportedOptions)) {
throw new \Neos\Flow\Mvc\Exception(sprintf('The view option "%s" you\'re trying to get doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876);
}
return $t... | php | public function getOption($optionName)
{
if (!array_key_exists($optionName, $this->supportedOptions)) {
throw new \Neos\Flow\Mvc\Exception(sprintf('The view option "%s" you\'re trying to get doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876);
}
return $t... | [
"public",
"function",
"getOption",
"(",
"$",
"optionName",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"optionName",
",",
"$",
"this",
"->",
"supportedOptions",
")",
")",
"{",
"throw",
"new",
"\\",
"Neos",
"\\",
"Flow",
"\\",
"Mvc",
"\\",
"... | Get a specific option of this View
@param string $optionName
@return mixed
@throws \Neos\Flow\Mvc\Exception | [
"Get",
"a",
"specific",
"option",
"of",
"this",
"View"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php#L260-L267 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php | AbstractTemplateView.setOption | public function setOption($optionName, $value)
{
if (!array_key_exists($optionName, $this->supportedOptions)) {
throw new \Neos\Flow\Mvc\Exception(sprintf('The view option "%s" you\'re trying to set doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876);
}
$... | php | public function setOption($optionName, $value)
{
if (!array_key_exists($optionName, $this->supportedOptions)) {
throw new \Neos\Flow\Mvc\Exception(sprintf('The view option "%s" you\'re trying to set doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876);
}
$... | [
"public",
"function",
"setOption",
"(",
"$",
"optionName",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"optionName",
",",
"$",
"this",
"->",
"supportedOptions",
")",
")",
"{",
"throw",
"new",
"\\",
"Neos",
"\\",
"Flow",
"... | Set a specific option of this View
@param string $optionName
@param mixed $value
@return void
@throws \Neos\Flow\Mvc\Exception | [
"Set",
"a",
"specific",
"option",
"of",
"this",
"View"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/AbstractTemplateView.php#L277-L287 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authentication/Token/AbstractToken.php | AbstractToken.setRequestPatterns | public function setRequestPatterns(array $requestPatterns)
{
foreach ($requestPatterns as $requestPattern) {
if (!$requestPattern instanceof RequestPatternInterface) {
throw new \InvalidArgumentException(sprintf('Invalid request pattern passed to token of type "%s"', get_class($t... | php | public function setRequestPatterns(array $requestPatterns)
{
foreach ($requestPatterns as $requestPattern) {
if (!$requestPattern instanceof RequestPatternInterface) {
throw new \InvalidArgumentException(sprintf('Invalid request pattern passed to token of type "%s"', get_class($t... | [
"public",
"function",
"setRequestPatterns",
"(",
"array",
"$",
"requestPatterns",
")",
"{",
"foreach",
"(",
"$",
"requestPatterns",
"as",
"$",
"requestPattern",
")",
"{",
"if",
"(",
"!",
"$",
"requestPattern",
"instanceof",
"RequestPatternInterface",
")",
"{",
"... | Sets request patterns
@param array $requestPatterns Array of RequestPatternInterface to be set
@return void
@throws \InvalidArgumentException | [
"Sets",
"request",
"patterns"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/Token/AbstractToken.php#L129-L137 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authentication/Token/AbstractToken.php | AbstractToken.setAuthenticationStatus | public function setAuthenticationStatus($authenticationStatus)
{
if (!in_array($authenticationStatus, [self::NO_CREDENTIALS_GIVEN, self::WRONG_CREDENTIALS, self::AUTHENTICATION_SUCCESSFUL, self::AUTHENTICATION_NEEDED])) {
throw new InvalidAuthenticationStatusException('Invalid authentication sta... | php | public function setAuthenticationStatus($authenticationStatus)
{
if (!in_array($authenticationStatus, [self::NO_CREDENTIALS_GIVEN, self::WRONG_CREDENTIALS, self::AUTHENTICATION_SUCCESSFUL, self::AUTHENTICATION_NEEDED])) {
throw new InvalidAuthenticationStatusException('Invalid authentication sta... | [
"public",
"function",
"setAuthenticationStatus",
"(",
"$",
"authenticationStatus",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"authenticationStatus",
",",
"[",
"self",
"::",
"NO_CREDENTIALS_GIVEN",
",",
"self",
"::",
"WRONG_CREDENTIALS",
",",
"self",
"::",
... | Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
@param integer $authenticationStatus One of NO_CREDENTIALS_GIVEN, WRONG_CREDENTIALS, AUTHENTICATION_SUCCESSFUL, AUTHENTICATION_NEEDED
@return void
@throws InvalidAuthenticationStatusExcep... | [
"Sets",
"the",
"authentication",
"status",
".",
"Usually",
"called",
"by",
"the",
"responsible",
"\\",
"Neos",
"\\",
"Flow",
"\\",
"Security",
"\\",
"Authentication",
"\\",
"AuthenticationManagerInterface"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/Token/AbstractToken.php#L188-L194 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandRequestHandler.php | CommandRequestHandler.handleRequest | public function handleRequest()
{
$runLevel = $this->bootstrap->isCompiletimeCommand(isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : '') ? Bootstrap::RUNLEVEL_COMPILETIME : Bootstrap::RUNLEVEL_RUNTIME;
$this->boot($runLevel);
$commandLine = isset($_SERVER['argv']) ? $_SERVER['argv'] : []... | php | public function handleRequest()
{
$runLevel = $this->bootstrap->isCompiletimeCommand(isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : '') ? Bootstrap::RUNLEVEL_COMPILETIME : Bootstrap::RUNLEVEL_RUNTIME;
$this->boot($runLevel);
$commandLine = isset($_SERVER['argv']) ? $_SERVER['argv'] : []... | [
"public",
"function",
"handleRequest",
"(",
")",
"{",
"$",
"runLevel",
"=",
"$",
"this",
"->",
"bootstrap",
"->",
"isCompiletimeCommand",
"(",
"isset",
"(",
"$",
"_SERVER",
"[",
"'argv'",
"]",
"[",
"1",
"]",
")",
"?",
"$",
"_SERVER",
"[",
"'argv'",
"]"... | Handles a command line request.
While booting, the Object Manager is not yet available for retrieving the CommandExceptionHandler.
For this purpose, possible occurring exceptions at this stage are caught manually and treated the
same way the CommandExceptionHandler treats exceptions on itself anyways.
@return void | [
"Handles",
"a",
"command",
"line",
"request",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandRequestHandler.php#L93-L117 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandRequestHandler.php | CommandRequestHandler.exitIfCompiletimeCommandWasNotCalledCorrectly | public function exitIfCompiletimeCommandWasNotCalledCorrectly(string $runlevel)
{
if ($runlevel === Bootstrap::RUNLEVEL_COMPILETIME) {
return;
}
$command = $this->request->getCommand();
if ($this->bootstrap->isCompiletimeCommand($command->getCommandIdentifier())) {
... | php | public function exitIfCompiletimeCommandWasNotCalledCorrectly(string $runlevel)
{
if ($runlevel === Bootstrap::RUNLEVEL_COMPILETIME) {
return;
}
$command = $this->request->getCommand();
if ($this->bootstrap->isCompiletimeCommand($command->getCommandIdentifier())) {
... | [
"public",
"function",
"exitIfCompiletimeCommandWasNotCalledCorrectly",
"(",
"string",
"$",
"runlevel",
")",
"{",
"if",
"(",
"$",
"runlevel",
"===",
"Bootstrap",
"::",
"RUNLEVEL_COMPILETIME",
")",
"{",
"return",
";",
"}",
"$",
"command",
"=",
"$",
"this",
"->",
... | Checks if compile time command was not recognized as such, then runlevel was
booted but it turned out that in fact the command is a compile time command.
This happens if the user doesn't specify the full command identifier.
@param string $runlevel one of the Bootstrap::RUNLEVEL_* constants
@return void | [
"Checks",
"if",
"compile",
"time",
"command",
"was",
"not",
"recognized",
"as",
"such",
"then",
"runlevel",
"was",
"booted",
"but",
"it",
"turned",
"out",
"that",
"in",
"fact",
"the",
"command",
"is",
"a",
"compile",
"time",
"command",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandRequestHandler.php#L128-L146 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandRequestHandler.php | CommandRequestHandler.boot | protected function boot(string $runlevel)
{
$sequence = ($runlevel === Bootstrap::RUNLEVEL_COMPILETIME) ? $this->bootstrap->buildCompiletimeSequence() : $this->bootstrap->buildRuntimeSequence();
$sequence->invoke($this->bootstrap);
$this->objectManager = $this->bootstrap->getObjectManager()... | php | protected function boot(string $runlevel)
{
$sequence = ($runlevel === Bootstrap::RUNLEVEL_COMPILETIME) ? $this->bootstrap->buildCompiletimeSequence() : $this->bootstrap->buildRuntimeSequence();
$sequence->invoke($this->bootstrap);
$this->objectManager = $this->bootstrap->getObjectManager()... | [
"protected",
"function",
"boot",
"(",
"string",
"$",
"runlevel",
")",
"{",
"$",
"sequence",
"=",
"(",
"$",
"runlevel",
"===",
"Bootstrap",
"::",
"RUNLEVEL_COMPILETIME",
")",
"?",
"$",
"this",
"->",
"bootstrap",
"->",
"buildCompiletimeSequence",
"(",
")",
":"... | Initializes the matching boot sequence depending on the type of the command
(RUNLEVEL_RUNTIME or RUNLEVEL_COMPILETIME) and manually injects the necessary dependencies of
this request handler.
@param string $runlevel one of the Bootstrap::RUNLEVEL_* constants
@return void | [
"Initializes",
"the",
"matching",
"boot",
"sequence",
"depending",
"on",
"the",
"type",
"of",
"the",
"command",
"(",
"RUNLEVEL_RUNTIME",
"or",
"RUNLEVEL_COMPILETIME",
")",
"and",
"manually",
"injects",
"the",
"necessary",
"dependencies",
"of",
"this",
"request",
"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandRequestHandler.php#L156-L163 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/CommandRequestHandler.php | CommandRequestHandler.shutdown | protected function shutdown(string $runlevel)
{
$this->bootstrap->shutdown($runlevel);
if ($runlevel === Bootstrap::RUNLEVEL_COMPILETIME) {
$this->objectManager->get(LockManager::class)->unlockSite();
}
exit($this->response->getExitCode());
} | php | protected function shutdown(string $runlevel)
{
$this->bootstrap->shutdown($runlevel);
if ($runlevel === Bootstrap::RUNLEVEL_COMPILETIME) {
$this->objectManager->get(LockManager::class)->unlockSite();
}
exit($this->response->getExitCode());
} | [
"protected",
"function",
"shutdown",
"(",
"string",
"$",
"runlevel",
")",
"{",
"$",
"this",
"->",
"bootstrap",
"->",
"shutdown",
"(",
"$",
"runlevel",
")",
";",
"if",
"(",
"$",
"runlevel",
"===",
"Bootstrap",
"::",
"RUNLEVEL_COMPILETIME",
")",
"{",
"$",
... | Starts the shutdown sequence
@param string $runlevel one of the Bootstrap::RUNLEVEL_* constants
@return void | [
"Starts",
"the",
"shutdown",
"sequence"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/CommandRequestHandler.php#L171-L178 |
neos/flow-development-collection | Neos.Flow/Classes/Reflection/DocCommentParser.php | DocCommentParser.parseDocComment | public function parseDocComment($docComment)
{
$this->description = '';
$this->tags = [];
$lines = explode(chr(10), $docComment);
foreach ($lines as $line) {
$line = trim($line);
if ($line === '*/') {
break;
}
if ($line... | php | public function parseDocComment($docComment)
{
$this->description = '';
$this->tags = [];
$lines = explode(chr(10), $docComment);
foreach ($lines as $line) {
$line = trim($line);
if ($line === '*/') {
break;
}
if ($line... | [
"public",
"function",
"parseDocComment",
"(",
"$",
"docComment",
")",
"{",
"$",
"this",
"->",
"description",
"=",
"''",
";",
"$",
"this",
"->",
"tags",
"=",
"[",
"]",
";",
"$",
"lines",
"=",
"explode",
"(",
"chr",
"(",
"10",
")",
",",
"$",
"docComm... | Parses the given doc comment and saves the result (description and
tags) in the parser's object. They can be retrieved by the
getTags() getTagValues() and getDescription() methods.
@param string $docComment A doc comment as returned by the reflection getDocComment() method
@return void | [
"Parses",
"the",
"given",
"doc",
"comment",
"and",
"saves",
"the",
"result",
"(",
"description",
"and",
"tags",
")",
"in",
"the",
"parser",
"s",
"object",
".",
"They",
"can",
"be",
"retrieved",
"by",
"the",
"getTags",
"()",
"getTagValues",
"()",
"and",
"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/DocCommentParser.php#L43-L61 |
neos/flow-development-collection | Neos.Flow/Classes/Reflection/DocCommentParser.php | DocCommentParser.getTagValues | public function getTagValues($tagName)
{
if (!$this->isTaggedWith($tagName)) {
throw new Exception('Tag "' . $tagName . '" does not exist.', 1169128255);
}
return $this->tags[$tagName];
} | php | public function getTagValues($tagName)
{
if (!$this->isTaggedWith($tagName)) {
throw new Exception('Tag "' . $tagName . '" does not exist.', 1169128255);
}
return $this->tags[$tagName];
} | [
"public",
"function",
"getTagValues",
"(",
"$",
"tagName",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isTaggedWith",
"(",
"$",
"tagName",
")",
")",
"{",
"throw",
"new",
"Exception",
"(",
"'Tag \"'",
".",
"$",
"tagName",
".",
"'\" does not exist.'",
",... | Returns the values of the specified tag. The doc comment
must be parsed with parseDocComment() before tags are
available.
@param string $tagName The tag name to retrieve the values for
@return array The tag's values
@throws Exception | [
"Returns",
"the",
"values",
"of",
"the",
"specified",
"tag",
".",
"The",
"doc",
"comment",
"must",
"be",
"parsed",
"with",
"parseDocComment",
"()",
"before",
"tags",
"are",
"available",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/DocCommentParser.php#L82-L88 |
neos/flow-development-collection | Neos.Flow/Classes/Reflection/DocCommentParser.php | DocCommentParser.parseTag | protected function parseTag($line)
{
$tagAndValue = [];
if (preg_match('/@[A-Za-z0-9\\\\]+\\\\([A-Za-z0-9]+)(?:\\((.*)\\))?$/', $line, $tagAndValue) === 0) {
$tagAndValue = preg_split('/\s/', $line, 2);
} else {
array_shift($tagAndValue);
}
$tag = strt... | php | protected function parseTag($line)
{
$tagAndValue = [];
if (preg_match('/@[A-Za-z0-9\\\\]+\\\\([A-Za-z0-9]+)(?:\\((.*)\\))?$/', $line, $tagAndValue) === 0) {
$tagAndValue = preg_split('/\s/', $line, 2);
} else {
array_shift($tagAndValue);
}
$tag = strt... | [
"protected",
"function",
"parseTag",
"(",
"$",
"line",
")",
"{",
"$",
"tagAndValue",
"=",
"[",
"]",
";",
"if",
"(",
"preg_match",
"(",
"'/@[A-Za-z0-9\\\\\\\\]+\\\\\\\\([A-Za-z0-9]+)(?:\\\\((.*)\\\\))?$/'",
",",
"$",
"line",
",",
"$",
"tagAndValue",
")",
"===",
"... | Parses a line of a doc comment for a tag and its value.
The result is stored in the internal tags array.
@param string $line A line of a doc comment which starts with an @-sign
@return void | [
"Parses",
"a",
"line",
"of",
"a",
"doc",
"comment",
"for",
"a",
"tag",
"and",
"its",
"value",
".",
"The",
"result",
"is",
"stored",
"in",
"the",
"internal",
"tags",
"array",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/DocCommentParser.php#L118-L132 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.initialize | public function initialize(Bootstrap $bootstrap)
{
$this->bootstrap = $bootstrap;
$this->packageStatesConfiguration = $this->getCurrentPackageStates();
$this->registerPackagesFromConfiguration($this->packageStatesConfiguration);
/** @var PackageInterface $package */
foreach ... | php | public function initialize(Bootstrap $bootstrap)
{
$this->bootstrap = $bootstrap;
$this->packageStatesConfiguration = $this->getCurrentPackageStates();
$this->registerPackagesFromConfiguration($this->packageStatesConfiguration);
/** @var PackageInterface $package */
foreach ... | [
"public",
"function",
"initialize",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"this",
"->",
"bootstrap",
"=",
"$",
"bootstrap",
";",
"$",
"this",
"->",
"packageStatesConfiguration",
"=",
"$",
"this",
"->",
"getCurrentPackageStates",
"(",
")",
";",
"... | Initializes the package manager
@param Bootstrap $bootstrap The current bootstrap
@return void | [
"Initializes",
"the",
"package",
"manager"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L133-L149 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getPackage | public function getPackage($packageKey)
{
if (!$this->isPackageAvailable($packageKey)) {
throw new Exception\UnknownPackageException('Package "' . $packageKey . '" is not available. Please check if the package exists and that the package key is correct (package keys are case sensitive).', 116654... | php | public function getPackage($packageKey)
{
if (!$this->isPackageAvailable($packageKey)) {
throw new Exception\UnknownPackageException('Package "' . $packageKey . '" is not available. Please check if the package exists and that the package key is correct (package keys are case sensitive).', 116654... | [
"public",
"function",
"getPackage",
"(",
"$",
"packageKey",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isPackageAvailable",
"(",
"$",
"packageKey",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"UnknownPackageException",
"(",
"'Package \"'",
".",
"$",... | Returns a PackageInterface object for the specified package.
@param string $packageKey
@return PackageInterface The requested package object
@throws Exception\UnknownPackageException if the specified package is not known
@api | [
"Returns",
"a",
"PackageInterface",
"object",
"for",
"the",
"specified",
"package",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L194-L201 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getFrozenPackages | public function getFrozenPackages()
{
$frozenPackages = [];
if ($this->bootstrap->getContext()->isDevelopment()) {
/** @var PackageInterface $package */
foreach ($this->packages as $packageKey => $package) {
if (isset($this->packageStatesConfiguration['package... | php | public function getFrozenPackages()
{
$frozenPackages = [];
if ($this->bootstrap->getContext()->isDevelopment()) {
/** @var PackageInterface $package */
foreach ($this->packages as $packageKey => $package) {
if (isset($this->packageStatesConfiguration['package... | [
"public",
"function",
"getFrozenPackages",
"(",
")",
"{",
"$",
"frozenPackages",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"this",
"->",
"bootstrap",
"->",
"getContext",
"(",
")",
"->",
"isDevelopment",
"(",
")",
")",
"{",
"/** @var PackageInterface $package */",
... | Returns an array of PackageInterface objects of all frozen packages.
A frozen package is not considered by file monitoring and provides some
precompiled reflection data in order to improve performance.
@return array<PackageInterface> | [
"Returns",
"an",
"array",
"of",
"PackageInterface",
"objects",
"of",
"all",
"frozen",
"packages",
".",
"A",
"frozen",
"package",
"is",
"not",
"considered",
"by",
"file",
"monitoring",
"and",
"provides",
"some",
"precompiled",
"reflection",
"data",
"in",
"order",... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L222-L237 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getFilteredPackages | public function getFilteredPackages($packageState = 'available', $packagePath = null, $packageType = null)
{
switch (strtolower($packageState)) {
case 'available':
$packages = $this->getAvailablePackages();
break;
case 'frozen':
$packag... | php | public function getFilteredPackages($packageState = 'available', $packagePath = null, $packageType = null)
{
switch (strtolower($packageState)) {
case 'available':
$packages = $this->getAvailablePackages();
break;
case 'frozen':
$packag... | [
"public",
"function",
"getFilteredPackages",
"(",
"$",
"packageState",
"=",
"'available'",
",",
"$",
"packagePath",
"=",
"null",
",",
"$",
"packageType",
"=",
"null",
")",
"{",
"switch",
"(",
"strtolower",
"(",
"$",
"packageState",
")",
")",
"{",
"case",
"... | Returns an array of PackageInterface objects of all packages that match
the given package state, path, and type filters. All three filters must match, if given.
@param string $packageState defaults to available
@param string $packagePath DEPRECATED since Flow 5.0
@param string $packageType
@return array<PackageInterf... | [
"Returns",
"an",
"array",
"of",
"PackageInterface",
"objects",
"of",
"all",
"packages",
"that",
"match",
"the",
"given",
"package",
"state",
"path",
"and",
"type",
"filters",
".",
"All",
"three",
"filters",
"must",
"match",
"if",
"given",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L251-L272 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.filterPackagesByPath | protected function filterPackagesByPath($packages, $filterPath)
{
$filteredPackages = [];
/** @var $package Package */
foreach ($packages as $package) {
$packagePath = substr($package->getPackagePath(), strlen($this->packagesBasePath));
$packageGroup = substr($package... | php | protected function filterPackagesByPath($packages, $filterPath)
{
$filteredPackages = [];
/** @var $package Package */
foreach ($packages as $package) {
$packagePath = substr($package->getPackagePath(), strlen($this->packagesBasePath));
$packageGroup = substr($package... | [
"protected",
"function",
"filterPackagesByPath",
"(",
"$",
"packages",
",",
"$",
"filterPath",
")",
"{",
"$",
"filteredPackages",
"=",
"[",
"]",
";",
"/** @var $package Package */",
"foreach",
"(",
"$",
"packages",
"as",
"$",
"package",
")",
"{",
"$",
"package... | Returns an array of PackageInterface objects in the given array of packages
that are in the specified Package Path
@param array $packages Array of PackageInterface to be filtered
@param string $filterPath Filter out anything that's not in this path
@return array<PackageInterface> | [
"Returns",
"an",
"array",
"of",
"PackageInterface",
"objects",
"in",
"the",
"given",
"array",
"of",
"packages",
"that",
"are",
"in",
"the",
"specified",
"Package",
"Path"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L282-L295 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.filterPackagesByType | protected function filterPackagesByType($packages, $packageType)
{
$filteredPackages = [];
/** @var $package Package */
foreach ($packages as $package) {
if ($package->getComposerManifest('type') === $packageType) {
$filteredPackages[$package->getPackageKey()] = $... | php | protected function filterPackagesByType($packages, $packageType)
{
$filteredPackages = [];
/** @var $package Package */
foreach ($packages as $package) {
if ($package->getComposerManifest('type') === $packageType) {
$filteredPackages[$package->getPackageKey()] = $... | [
"protected",
"function",
"filterPackagesByType",
"(",
"$",
"packages",
",",
"$",
"packageType",
")",
"{",
"$",
"filteredPackages",
"=",
"[",
"]",
";",
"/** @var $package Package */",
"foreach",
"(",
"$",
"packages",
"as",
"$",
"package",
")",
"{",
"if",
"(",
... | Returns an array of PackageInterface objects in the given array of packages
that are of the specified package type.
@param array $packages Array of PackageInterface objects to be filtered
@param string $packageType Filter out anything that's not of this packageType
@return array<PackageInterface> | [
"Returns",
"an",
"array",
"of",
"PackageInterface",
"objects",
"in",
"the",
"given",
"array",
"of",
"packages",
"that",
"are",
"of",
"the",
"specified",
"package",
"type",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L305-L316 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.createPackage | public function createPackage($packageKey, array $manifest = [], $packagesPath = null)
{
if (!$this->isPackageKeyValid($packageKey)) {
throw new Exception\InvalidPackageKeyException('The package key "' . $packageKey . '" is invalid', 1220722210);
}
if ($this->isPackageAvailable($... | php | public function createPackage($packageKey, array $manifest = [], $packagesPath = null)
{
if (!$this->isPackageKeyValid($packageKey)) {
throw new Exception\InvalidPackageKeyException('The package key "' . $packageKey . '" is invalid', 1220722210);
}
if ($this->isPackageAvailable($... | [
"public",
"function",
"createPackage",
"(",
"$",
"packageKey",
",",
"array",
"$",
"manifest",
"=",
"[",
"]",
",",
"$",
"packagesPath",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isPackageKeyValid",
"(",
"$",
"packageKey",
")",
")",
"{",... | Create a package, given the package key
@param string $packageKey The package key of the new package
@param array $manifest A composer manifest as associative array.
@param string $packagesPath If specified, the package will be created in this path, otherwise the default "Application" directory is used
@return Package... | [
"Create",
"a",
"package",
"given",
"the",
"package",
"key"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L331-L398 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.movePackage | protected function movePackage($fromAbsolutePath, $toAbsolutePath)
{
Files::createDirectoryRecursively($toAbsolutePath);
Files::copyDirectoryRecursively($fromAbsolutePath, $toAbsolutePath, false, true);
Files::removeDirectoryRecursively($fromAbsolutePath);
} | php | protected function movePackage($fromAbsolutePath, $toAbsolutePath)
{
Files::createDirectoryRecursively($toAbsolutePath);
Files::copyDirectoryRecursively($fromAbsolutePath, $toAbsolutePath, false, true);
Files::removeDirectoryRecursively($fromAbsolutePath);
} | [
"protected",
"function",
"movePackage",
"(",
"$",
"fromAbsolutePath",
",",
"$",
"toAbsolutePath",
")",
"{",
"Files",
"::",
"createDirectoryRecursively",
"(",
"$",
"toAbsolutePath",
")",
";",
"Files",
"::",
"copyDirectoryRecursively",
"(",
"$",
"fromAbsolutePath",
",... | Moves a package from one path to another.
@param string $fromAbsolutePath
@param string $toAbsolutePath
@return void | [
"Moves",
"a",
"package",
"from",
"one",
"path",
"to",
"another",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L407-L412 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.freezePackage | public function freezePackage($packageKey)
{
if (!$this->bootstrap->getContext()->isDevelopment()) {
throw new \LogicException('Package freezing is only supported in Development context.', 1338810870);
}
if (!$this->isPackageAvailable($packageKey)) {
throw new Except... | php | public function freezePackage($packageKey)
{
if (!$this->bootstrap->getContext()->isDevelopment()) {
throw new \LogicException('Package freezing is only supported in Development context.', 1338810870);
}
if (!$this->isPackageAvailable($packageKey)) {
throw new Except... | [
"public",
"function",
"freezePackage",
"(",
"$",
"packageKey",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"bootstrap",
"->",
"getContext",
"(",
")",
"->",
"isDevelopment",
"(",
")",
")",
"{",
"throw",
"new",
"\\",
"LogicException",
"(",
"'Package freezin... | Freezes a package
@param string $packageKey The package to freeze
@return void
@throws \LogicException
@throws Exception\UnknownPackageException | [
"Freezes",
"a",
"package"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L422-L440 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.isPackageFrozen | public function isPackageFrozen($packageKey)
{
if (!isset($this->packages[$packageKey])) {
return false;
}
$composerName = $this->packages[$packageKey]->getComposerName();
return (
$this->bootstrap->getContext()->isDevelopment()
&& isset($this->pa... | php | public function isPackageFrozen($packageKey)
{
if (!isset($this->packages[$packageKey])) {
return false;
}
$composerName = $this->packages[$packageKey]->getComposerName();
return (
$this->bootstrap->getContext()->isDevelopment()
&& isset($this->pa... | [
"public",
"function",
"isPackageFrozen",
"(",
"$",
"packageKey",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"packages",
"[",
"$",
"packageKey",
"]",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"composerName",
"=",
"$",
"this",
"-... | Tells if a package is frozen
@param string $packageKey The package to check
@return boolean | [
"Tells",
"if",
"a",
"package",
"is",
"frozen"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L448-L460 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.unfreezePackage | public function unfreezePackage($packageKey)
{
if (!$this->isPackageFrozen($packageKey)) {
return;
}
if (!isset($this->packages[$packageKey])) {
return;
}
$composerName = $this->packages[$packageKey]->getComposerName();
$this->bootstrap->getOb... | php | public function unfreezePackage($packageKey)
{
if (!$this->isPackageFrozen($packageKey)) {
return;
}
if (!isset($this->packages[$packageKey])) {
return;
}
$composerName = $this->packages[$packageKey]->getComposerName();
$this->bootstrap->getOb... | [
"public",
"function",
"unfreezePackage",
"(",
"$",
"packageKey",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isPackageFrozen",
"(",
"$",
"packageKey",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"packages",
"... | Unfreezes a package
@param string $packageKey The package to unfreeze
@return void | [
"Unfreezes",
"a",
"package"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L468-L482 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.refreezePackage | public function refreezePackage($packageKey)
{
if (!$this->isPackageFrozen($packageKey)) {
return;
}
$this->bootstrap->getObjectManager()->get(ReflectionService::class)->unfreezePackageReflection($packageKey);
} | php | public function refreezePackage($packageKey)
{
if (!$this->isPackageFrozen($packageKey)) {
return;
}
$this->bootstrap->getObjectManager()->get(ReflectionService::class)->unfreezePackageReflection($packageKey);
} | [
"public",
"function",
"refreezePackage",
"(",
"$",
"packageKey",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isPackageFrozen",
"(",
"$",
"packageKey",
")",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"bootstrap",
"->",
"getObjectManager",
"(",
")"... | Refreezes a package
@param string $packageKey The package to refreeze
@return void | [
"Refreezes",
"a",
"package"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L490-L497 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getCurrentPackageStates | protected function getCurrentPackageStates()
{
$savePackageStates = false;
$loadedPackageStates = $this->loadPackageStates();
if (
empty($loadedPackageStates)
|| !isset($loadedPackageStates['version'])
|| $loadedPackageStates['version'] < self::PACKAGESTAT... | php | protected function getCurrentPackageStates()
{
$savePackageStates = false;
$loadedPackageStates = $this->loadPackageStates();
if (
empty($loadedPackageStates)
|| !isset($loadedPackageStates['version'])
|| $loadedPackageStates['version'] < self::PACKAGESTAT... | [
"protected",
"function",
"getCurrentPackageStates",
"(",
")",
"{",
"$",
"savePackageStates",
"=",
"false",
";",
"$",
"loadedPackageStates",
"=",
"$",
"this",
"->",
"loadPackageStates",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"loadedPackageStates",
")",
"|... | Loads the states of available packages from the PackageStates.php file and
initialises a package scan if the file was not found or the configuration format
was not current.
@return array | [
"Loads",
"the",
"states",
"of",
"available",
"packages",
"from",
"the",
"PackageStates",
".",
"php",
"file",
"and",
"initialises",
"a",
"package",
"scan",
"if",
"the",
"file",
"was",
"not",
"found",
"or",
"the",
"configuration",
"format",
"was",
"not",
"curr... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L519-L537 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.scanAvailablePackages | protected function scanAvailablePackages()
{
$newPackageStatesConfiguration = ['packages' => []];
foreach ($this->findComposerPackagesInPath($this->packagesBasePath) as $packagePath) {
$composerManifest = ComposerUtility::getComposerManifest($packagePath);
if (!isset($compose... | php | protected function scanAvailablePackages()
{
$newPackageStatesConfiguration = ['packages' => []];
foreach ($this->findComposerPackagesInPath($this->packagesBasePath) as $packagePath) {
$composerManifest = ComposerUtility::getComposerManifest($packagePath);
if (!isset($compose... | [
"protected",
"function",
"scanAvailablePackages",
"(",
")",
"{",
"$",
"newPackageStatesConfiguration",
"=",
"[",
"'packages'",
"=>",
"[",
"]",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"findComposerPackagesInPath",
"(",
"$",
"this",
"->",
"packagesBasePath",
... | Scans all directories in the packages directories for available packages.
For each package a Package object is created and stored in $this->packages.
@return array
@throws Exception
@throws InvalidConfigurationException | [
"Scans",
"all",
"directories",
"in",
"the",
"packages",
"directories",
"for",
"available",
"packages",
".",
"For",
"each",
"package",
"a",
"Package",
"object",
"is",
"created",
"and",
"stored",
"in",
"$this",
"-",
">",
"packages",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L557-L589 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.findComposerPackagesInPath | protected function findComposerPackagesInPath($startingDirectory)
{
$directories = [$startingDirectory];
while ($directories !== []) {
$currentDirectory = array_pop($directories);
if ($handle = opendir($currentDirectory)) {
while (false !== ($filename = readdi... | php | protected function findComposerPackagesInPath($startingDirectory)
{
$directories = [$startingDirectory];
while ($directories !== []) {
$currentDirectory = array_pop($directories);
if ($handle = opendir($currentDirectory)) {
while (false !== ($filename = readdi... | [
"protected",
"function",
"findComposerPackagesInPath",
"(",
"$",
"startingDirectory",
")",
"{",
"$",
"directories",
"=",
"[",
"$",
"startingDirectory",
"]",
";",
"while",
"(",
"$",
"directories",
"!==",
"[",
"]",
")",
"{",
"$",
"currentDirectory",
"=",
"array_... | Recursively traverses directories from the given starting points and returns all folder paths that contain a composer.json and
which does NOT have the key "extra.neos.is-merged-repository" set, as that indicates a composer package that joins several "real" packages together.
In case a "is-merged-repository" is found th... | [
"Recursively",
"traverses",
"directories",
"from",
"the",
"given",
"starting",
"points",
"and",
"returns",
"all",
"folder",
"paths",
"that",
"contain",
"a",
"composer",
".",
"json",
"and",
"which",
"does",
"NOT",
"have",
"the",
"key",
"extra",
".",
"neos",
"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L599-L628 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.registerPackagesFromConfiguration | protected function registerPackagesFromConfiguration($packageStatesConfiguration)
{
foreach ($packageStatesConfiguration['packages'] as $composerName => $packageStateConfiguration) {
$this->registerPackageFromStateConfiguration($composerName, $packageStateConfiguration);
}
} | php | protected function registerPackagesFromConfiguration($packageStatesConfiguration)
{
foreach ($packageStatesConfiguration['packages'] as $composerName => $packageStateConfiguration) {
$this->registerPackageFromStateConfiguration($composerName, $packageStateConfiguration);
}
} | [
"protected",
"function",
"registerPackagesFromConfiguration",
"(",
"$",
"packageStatesConfiguration",
")",
"{",
"foreach",
"(",
"$",
"packageStatesConfiguration",
"[",
"'packages'",
"]",
"as",
"$",
"composerName",
"=>",
"$",
"packageStateConfiguration",
")",
"{",
"$",
... | Requires and registers all packages which were defined in packageStatesConfiguration
@param array $packageStatesConfiguration
@throws Exception\CorruptPackageException | [
"Requires",
"and",
"registers",
"all",
"packages",
"which",
"were",
"defined",
"in",
"packageStatesConfiguration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L656-L661 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.registerPackageFromStateConfiguration | protected function registerPackageFromStateConfiguration($composerName, $packageStateConfiguration)
{
$packagePath = isset($packageStateConfiguration['packagePath']) ? $packageStateConfiguration['packagePath'] : null;
$packageClassInformation = isset($packageStateConfiguration['packageClassInformati... | php | protected function registerPackageFromStateConfiguration($composerName, $packageStateConfiguration)
{
$packagePath = isset($packageStateConfiguration['packagePath']) ? $packageStateConfiguration['packagePath'] : null;
$packageClassInformation = isset($packageStateConfiguration['packageClassInformati... | [
"protected",
"function",
"registerPackageFromStateConfiguration",
"(",
"$",
"composerName",
",",
"$",
"packageStateConfiguration",
")",
"{",
"$",
"packagePath",
"=",
"isset",
"(",
"$",
"packageStateConfiguration",
"[",
"'packagePath'",
"]",
")",
"?",
"$",
"packageStat... | Registers a package under the given composer name with the configuration.
This uses the PackageFactory to create the Package instance and sets it
to all relevant data arrays.
@param string $composerName
@param array $packageStateConfiguration
@return void | [
"Registers",
"a",
"package",
"under",
"the",
"given",
"composer",
"name",
"with",
"the",
"configuration",
".",
"This",
"uses",
"the",
"PackageFactory",
"to",
"create",
"the",
"Package",
"instance",
"and",
"sets",
"it",
"to",
"all",
"relevant",
"data",
"arrays"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L672-L679 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.sortAndSavePackageStates | protected function sortAndSavePackageStates(array $packageStates)
{
$orderedPackageStates = $this->sortAvailablePackagesByDependencies($packageStates);
$this->savePackageStates($orderedPackageStates);
return $orderedPackageStates;
} | php | protected function sortAndSavePackageStates(array $packageStates)
{
$orderedPackageStates = $this->sortAvailablePackagesByDependencies($packageStates);
$this->savePackageStates($orderedPackageStates);
return $orderedPackageStates;
} | [
"protected",
"function",
"sortAndSavePackageStates",
"(",
"array",
"$",
"packageStates",
")",
"{",
"$",
"orderedPackageStates",
"=",
"$",
"this",
"->",
"sortAvailablePackagesByDependencies",
"(",
"$",
"packageStates",
")",
";",
"$",
"this",
"->",
"savePackageStates",
... | Takes the given packageStatesConfiguration, sorts it by dependencies, saves it and returns
the ordered list
@param array $packageStates
@return array | [
"Takes",
"the",
"given",
"packageStatesConfiguration",
"sorts",
"it",
"by",
"dependencies",
"saves",
"it",
"and",
"returns",
"the",
"ordered",
"list"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L688-L694 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.savePackageStates | protected function savePackageStates(array $orderedPackageStates)
{
$orderedPackageStates['version'] = static::PACKAGESTATE_FORMAT_VERSION;
$fileDescription = "# PackageStates.php\n\n";
$fileDescription .= "# This file is maintained by Flow's package management. You shouldn't edit it manual... | php | protected function savePackageStates(array $orderedPackageStates)
{
$orderedPackageStates['version'] = static::PACKAGESTATE_FORMAT_VERSION;
$fileDescription = "# PackageStates.php\n\n";
$fileDescription .= "# This file is maintained by Flow's package management. You shouldn't edit it manual... | [
"protected",
"function",
"savePackageStates",
"(",
"array",
"$",
"orderedPackageStates",
")",
"{",
"$",
"orderedPackageStates",
"[",
"'version'",
"]",
"=",
"static",
"::",
"PACKAGESTATE_FORMAT_VERSION",
";",
"$",
"fileDescription",
"=",
"\"# PackageStates.php\\n\\n\"",
... | Save the given (ordered) array of package states data
@param array $orderedPackageStates
@throws Exception\PackageStatesFileNotWritableException | [
"Save",
"the",
"given",
"(",
"ordered",
")",
"array",
"of",
"package",
"states",
"data"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L702-L729 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.sortAvailablePackagesByDependencies | protected function sortAvailablePackagesByDependencies(array $packageStates)
{
$packageOrderResolver = new PackageOrderResolver($packageStates['packages'], $this->collectPackageManifestData($packageStates));
$packageStates['packages'] = $packageOrderResolver->sort();
return $packageStates;
... | php | protected function sortAvailablePackagesByDependencies(array $packageStates)
{
$packageOrderResolver = new PackageOrderResolver($packageStates['packages'], $this->collectPackageManifestData($packageStates));
$packageStates['packages'] = $packageOrderResolver->sort();
return $packageStates;
... | [
"protected",
"function",
"sortAvailablePackagesByDependencies",
"(",
"array",
"$",
"packageStates",
")",
"{",
"$",
"packageOrderResolver",
"=",
"new",
"PackageOrderResolver",
"(",
"$",
"packageStates",
"[",
"'packages'",
"]",
",",
"$",
"this",
"->",
"collectPackageMan... | Orders all packages by comparing their dependencies. By this, the packages
and package configurations arrays holds all packages in the correct
initialization order.
@param array $packageStates The unordered package states
@return array ordered package states. | [
"Orders",
"all",
"packages",
"by",
"comparing",
"their",
"dependencies",
".",
"By",
"this",
"the",
"packages",
"and",
"package",
"configurations",
"arrays",
"holds",
"all",
"packages",
"in",
"the",
"correct",
"initialization",
"order",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L739-L745 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.collectPackageManifestData | protected function collectPackageManifestData(array $packageStates)
{
return array_map(function ($packageState) {
return ComposerUtility::getComposerManifest(Files::getNormalizedPath(Files::concatenatePaths([$this->packagesBasePath, $packageState['packagePath']])));
}, $packageStates['pa... | php | protected function collectPackageManifestData(array $packageStates)
{
return array_map(function ($packageState) {
return ComposerUtility::getComposerManifest(Files::getNormalizedPath(Files::concatenatePaths([$this->packagesBasePath, $packageState['packagePath']])));
}, $packageStates['pa... | [
"protected",
"function",
"collectPackageManifestData",
"(",
"array",
"$",
"packageStates",
")",
"{",
"return",
"array_map",
"(",
"function",
"(",
"$",
"packageState",
")",
"{",
"return",
"ComposerUtility",
"::",
"getComposerManifest",
"(",
"Files",
"::",
"getNormali... | Collects the manifest data for all packages in the given package states array
@param array $packageStates
@return array | [
"Collects",
"the",
"manifest",
"data",
"for",
"all",
"packages",
"in",
"the",
"given",
"package",
"states",
"array"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L753-L758 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getCaseSensitivePackageKey | public function getCaseSensitivePackageKey($unknownCasedPackageKey)
{
$lowerCasedPackageKey = strtolower($unknownCasedPackageKey);
return (isset($this->packageKeys[$lowerCasedPackageKey])) ? $this->packageKeys[$lowerCasedPackageKey] : false;
} | php | public function getCaseSensitivePackageKey($unknownCasedPackageKey)
{
$lowerCasedPackageKey = strtolower($unknownCasedPackageKey);
return (isset($this->packageKeys[$lowerCasedPackageKey])) ? $this->packageKeys[$lowerCasedPackageKey] : false;
} | [
"public",
"function",
"getCaseSensitivePackageKey",
"(",
"$",
"unknownCasedPackageKey",
")",
"{",
"$",
"lowerCasedPackageKey",
"=",
"strtolower",
"(",
"$",
"unknownCasedPackageKey",
")",
";",
"return",
"(",
"isset",
"(",
"$",
"this",
"->",
"packageKeys",
"[",
"$",... | Returns the correctly cased version of the given package key or false
if no such package is available.
@param string $unknownCasedPackageKey The package key to convert
@return mixed The upper camel cased package key or false if no such package exists
@api | [
"Returns",
"the",
"correctly",
"cased",
"version",
"of",
"the",
"given",
"package",
"key",
"or",
"false",
"if",
"no",
"such",
"package",
"is",
"available",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L768-L773 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getPackageKeyFromComposerName | public function getPackageKeyFromComposerName($composerName)
{
if ($this->composerNameToPackageKeyMap === []) {
foreach ($this->packageStatesConfiguration['packages'] as $packageStateConfiguration) {
$this->composerNameToPackageKeyMap[$packageStateConfiguration['composerName']] =... | php | public function getPackageKeyFromComposerName($composerName)
{
if ($this->composerNameToPackageKeyMap === []) {
foreach ($this->packageStatesConfiguration['packages'] as $packageStateConfiguration) {
$this->composerNameToPackageKeyMap[$packageStateConfiguration['composerName']] =... | [
"public",
"function",
"getPackageKeyFromComposerName",
"(",
"$",
"composerName",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"composerNameToPackageKeyMap",
"===",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"packageStatesConfiguration",
"[",
"'packages'",
... | Resolves a Flow package key from a composer package name.
@param string $composerName
@return string
@throws Exception\InvalidPackageStateException | [
"Resolves",
"a",
"Flow",
"package",
"key",
"from",
"a",
"composer",
"package",
"name",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L782-L796 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.getPackageKeyFromManifest | protected function getPackageKeyFromManifest(array $manifest, $packagePath)
{
if (isset($manifest['extra']['neos']['package-key']) && $this->isPackageKeyValid($manifest['extra']['neos']['package-key'])) {
return $manifest['extra']['neos']['package-key'];
}
$composerName = $manif... | php | protected function getPackageKeyFromManifest(array $manifest, $packagePath)
{
if (isset($manifest['extra']['neos']['package-key']) && $this->isPackageKeyValid($manifest['extra']['neos']['package-key'])) {
return $manifest['extra']['neos']['package-key'];
}
$composerName = $manif... | [
"protected",
"function",
"getPackageKeyFromManifest",
"(",
"array",
"$",
"manifest",
",",
"$",
"packagePath",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"manifest",
"[",
"'extra'",
"]",
"[",
"'neos'",
"]",
"[",
"'package-key'",
"]",
")",
"&&",
"$",
"this",
... | Resolves package key from Composer manifest
If it is a Flow package the name of the containing directory will be used.
Else if the composer name of the package matches the first part of the lowercased namespace of the package, the mixed
case version of the composer name / namespace will be used, with backslashes repl... | [
"Resolves",
"package",
"key",
"from",
"Composer",
"manifest"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L824-L843 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.derivePackageKey | protected function derivePackageKey($composerName, $packageType = null, $packagePath = null, $autoloadNamespace = null)
{
$packageKey = '';
if ($packageType !== null && ComposerUtility::isFlowPackageType($packageType)) {
$lastSegmentOfPackagePath = substr(trim($packagePath, '/'), strrpo... | php | protected function derivePackageKey($composerName, $packageType = null, $packagePath = null, $autoloadNamespace = null)
{
$packageKey = '';
if ($packageType !== null && ComposerUtility::isFlowPackageType($packageType)) {
$lastSegmentOfPackagePath = substr(trim($packagePath, '/'), strrpo... | [
"protected",
"function",
"derivePackageKey",
"(",
"$",
"composerName",
",",
"$",
"packageType",
"=",
"null",
",",
"$",
"packagePath",
"=",
"null",
",",
"$",
"autoloadNamespace",
"=",
"null",
")",
"{",
"$",
"packageKey",
"=",
"''",
";",
"if",
"(",
"$",
"p... | Derive a flow package key from the given information.
The order of importance is:
- package install path
- first found autoload namespace
- composer name
@param string $composerName
@param string $packageType
@param string $packagePath
@param string $autoloadNamespace
@return string | [
"Derive",
"a",
"flow",
"package",
"key",
"from",
"the",
"given",
"information",
".",
"The",
"order",
"of",
"importance",
"is",
":"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L859-L882 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageManager.php | PackageManager.emitPackageStatesUpdated | protected function emitPackageStatesUpdated()
{
if ($this->bootstrap === null) {
return;
}
if ($this->dispatcher === null) {
$this->dispatcher = $this->bootstrap->getEarlyInstance(Dispatcher::class);
}
$this->dispatcher->dispatch(PackageManager::clas... | php | protected function emitPackageStatesUpdated()
{
if ($this->bootstrap === null) {
return;
}
if ($this->dispatcher === null) {
$this->dispatcher = $this->bootstrap->getEarlyInstance(Dispatcher::class);
}
$this->dispatcher->dispatch(PackageManager::clas... | [
"protected",
"function",
"emitPackageStatesUpdated",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"bootstrap",
"===",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"dispatcher",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"dispatc... | Emits a signal when package states have been changed (e.g. when a package was created)
The advice is not proxyable, so the signal is dispatched manually here.
@return void
@Flow\Signal | [
"Emits",
"a",
"signal",
"when",
"package",
"states",
"have",
"been",
"changed",
"(",
"e",
".",
"g",
".",
"when",
"a",
"package",
"was",
"created",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageManager.php#L892-L903 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/RequestBuilder.php | RequestBuilder.build | public function build($commandLine): Request
{
$request = new Request();
$request->setControllerObjectName(HelpCommandController::class);
if (is_array($commandLine) === true) {
$rawCommandLineArguments = $commandLine;
} else {
preg_match_all(self::ARGUMENT_MA... | php | public function build($commandLine): Request
{
$request = new Request();
$request->setControllerObjectName(HelpCommandController::class);
if (is_array($commandLine) === true) {
$rawCommandLineArguments = $commandLine;
} else {
preg_match_all(self::ARGUMENT_MA... | [
"public",
"function",
"build",
"(",
"$",
"commandLine",
")",
":",
"Request",
"{",
"$",
"request",
"=",
"new",
"Request",
"(",
")",
";",
"$",
"request",
"->",
"setControllerObjectName",
"(",
"HelpCommandController",
"::",
"class",
")",
";",
"if",
"(",
"is_a... | Builds a CLI request object from a command line.
The given command line may be a string (e.g. "mypackage:foo do-that-thing --force") or
an array consisting of the individual parts. The array must not include the script
name (like in $argv) but start with command right away.
@param mixed $commandLine The command line,... | [
"Builds",
"a",
"CLI",
"request",
"object",
"from",
"a",
"command",
"line",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/RequestBuilder.php#L116-L167 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/RequestBuilder.php | RequestBuilder.parseRawCommandLineArguments | protected function parseRawCommandLineArguments(array $rawCommandLineArguments, string $controllerObjectName, string $controllerCommandName): array
{
$commandLineArguments = [];
$exceedingArguments = [];
$commandMethodName = $controllerCommandName . 'Command';
$commandMethodParameter... | php | protected function parseRawCommandLineArguments(array $rawCommandLineArguments, string $controllerObjectName, string $controllerCommandName): array
{
$commandLineArguments = [];
$exceedingArguments = [];
$commandMethodName = $controllerCommandName . 'Command';
$commandMethodParameter... | [
"protected",
"function",
"parseRawCommandLineArguments",
"(",
"array",
"$",
"rawCommandLineArguments",
",",
"string",
"$",
"controllerObjectName",
",",
"string",
"$",
"controllerCommandName",
")",
":",
"array",
"{",
"$",
"commandLineArguments",
"=",
"[",
"]",
";",
"... | Takes an array of unparsed command line arguments and options and converts it separated
by named arguments, options and unnamed arguments.
@param array $rawCommandLineArguments The unparsed command parts (such as "--foo") as an array
@param string $controllerObjectName Object name of the designated command controller
... | [
"Takes",
"an",
"array",
"of",
"unparsed",
"command",
"line",
"arguments",
"and",
"options",
"and",
"converts",
"it",
"separated",
"by",
"named",
"arguments",
"options",
"and",
"unnamed",
"arguments",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/RequestBuilder.php#L179-L242 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/RequestBuilder.php | RequestBuilder.extractArgumentNameFromCommandLinePart | protected function extractArgumentNameFromCommandLinePart(string $commandLinePart): string
{
$nameAndValue = explode('=', $commandLinePart, 2);
return strtolower(str_replace('-', '', $nameAndValue[0]));
} | php | protected function extractArgumentNameFromCommandLinePart(string $commandLinePart): string
{
$nameAndValue = explode('=', $commandLinePart, 2);
return strtolower(str_replace('-', '', $nameAndValue[0]));
} | [
"protected",
"function",
"extractArgumentNameFromCommandLinePart",
"(",
"string",
"$",
"commandLinePart",
")",
":",
"string",
"{",
"$",
"nameAndValue",
"=",
"explode",
"(",
"'='",
",",
"$",
"commandLinePart",
",",
"2",
")",
";",
"return",
"strtolower",
"(",
"str... | Extracts the option or argument name from the name / value pair of a command line.
@param string $commandLinePart Part of the command line, e.g. "my-important-option=SomeInterestingValue"
@return string The lowercased argument name, e.g. "myimportantoption" | [
"Extracts",
"the",
"option",
"or",
"argument",
"name",
"from",
"the",
"name",
"/",
"value",
"pair",
"of",
"a",
"command",
"line",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/RequestBuilder.php#L250-L255 |
neos/flow-development-collection | Neos.Flow/Classes/Cli/RequestBuilder.php | RequestBuilder.getValueOfCurrentCommandLineOption | protected function getValueOfCurrentCommandLineOption(string $currentArgument, array &$rawCommandLineArguments, string $expectedArgumentType)
{
if ((!isset($rawCommandLineArguments[0]) && (strpos($currentArgument, '=') === false)) || (isset($rawCommandLineArguments[0]) && $rawCommandLineArguments[0][0] === ... | php | protected function getValueOfCurrentCommandLineOption(string $currentArgument, array &$rawCommandLineArguments, string $expectedArgumentType)
{
if ((!isset($rawCommandLineArguments[0]) && (strpos($currentArgument, '=') === false)) || (isset($rawCommandLineArguments[0]) && $rawCommandLineArguments[0][0] === ... | [
"protected",
"function",
"getValueOfCurrentCommandLineOption",
"(",
"string",
"$",
"currentArgument",
",",
"array",
"&",
"$",
"rawCommandLineArguments",
",",
"string",
"$",
"expectedArgumentType",
")",
"{",
"if",
"(",
"(",
"!",
"isset",
"(",
"$",
"rawCommandLineArgu... | Returns the value of the first argument of the given input array. Shifts the parsed argument off the array.
@param string $currentArgument The current argument
@param array &$rawCommandLineArguments Array of the remaining command line arguments
@param string $expectedArgumentType The expected type of the current argum... | [
"Returns",
"the",
"value",
"of",
"the",
"first",
"argument",
"of",
"the",
"given",
"input",
"array",
".",
"Shifts",
"the",
"parsed",
"argument",
"off",
"the",
"array",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cli/RequestBuilder.php#L265-L297 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/ViewHelper/TemplateVariableContainer.php | TemplateVariableContainer.getByPath | public function getByPath($path, array $accessors = [])
{
$propertyPathSegments = explode('.', $path);
$subject = $this->variables;
foreach ($propertyPathSegments as $propertyName) {
if ($subject === null) {
break;
}
try {
... | php | public function getByPath($path, array $accessors = [])
{
$propertyPathSegments = explode('.', $path);
$subject = $this->variables;
foreach ($propertyPathSegments as $propertyName) {
if ($subject === null) {
break;
}
try {
... | [
"public",
"function",
"getByPath",
"(",
"$",
"path",
",",
"array",
"$",
"accessors",
"=",
"[",
"]",
")",
"{",
"$",
"propertyPathSegments",
"=",
"explode",
"(",
"'.'",
",",
"$",
"path",
")",
";",
"$",
"subject",
"=",
"$",
"this",
"->",
"variables",
";... | Get a variable by dotted path expression, retrieving the
variable from nested arrays/objects one segment at a time.
If the second argument is provided, it must be an array of
accessor names which can be used to extract each value in
the dotted path.
@param string $path
@param array $accessors
@return mixed | [
"Get",
"a",
"variable",
"by",
"dotted",
"path",
"expression",
"retrieving",
"the",
"variable",
"from",
"nested",
"arrays",
"/",
"objects",
"one",
"segment",
"at",
"a",
"time",
".",
"If",
"the",
"second",
"argument",
"is",
"provided",
"it",
"must",
"be",
"a... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/TemplateVariableContainer.php#L51-L77 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/ViewHelper/TemplateVariableContainer.php | TemplateVariableContainer.getBooleanValue | protected function getBooleanValue($path)
{
$normalizedPath = strtolower($path);
if (in_array($normalizedPath, ['true', 'on', 'yes'])) {
return true;
}
if (in_array($normalizedPath, ['false', 'off', 'no'])) {
return false;
}
return null;
... | php | protected function getBooleanValue($path)
{
$normalizedPath = strtolower($path);
if (in_array($normalizedPath, ['true', 'on', 'yes'])) {
return true;
}
if (in_array($normalizedPath, ['false', 'off', 'no'])) {
return false;
}
return null;
... | [
"protected",
"function",
"getBooleanValue",
"(",
"$",
"path",
")",
"{",
"$",
"normalizedPath",
"=",
"strtolower",
"(",
"$",
"path",
")",
";",
"if",
"(",
"in_array",
"(",
"$",
"normalizedPath",
",",
"[",
"'true'",
",",
"'on'",
",",
"'yes'",
"]",
")",
")... | Tries to interpret the given path as boolean value, either returns the boolean value or null.
@param $path
@return boolean|null | [
"Tries",
"to",
"interpret",
"the",
"given",
"path",
"as",
"boolean",
"value",
"either",
"returns",
"the",
"boolean",
"value",
"or",
"null",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/TemplateVariableContainer.php#L85-L98 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.