repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.withHostPrefix | public function withHostPrefix(string $prefix, array $replacePrefixes = []): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_HOST_PREFIX] = [
'prefix' => $prefix,
'replacePrefixes' => $replacePrefixes,
];
return new static($newCon... | php | public function withHostPrefix(string $prefix, array $replacePrefixes = []): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_HOST_PREFIX] = [
'prefix' => $prefix,
'replacePrefixes' => $replacePrefixes,
];
return new static($newCon... | [
"public",
"function",
"withHostPrefix",
"(",
"string",
"$",
"prefix",
",",
"array",
"$",
"replacePrefixes",
"=",
"[",
"]",
")",
":",
"self",
"{",
"$",
"newConstraints",
"=",
"$",
"this",
"->",
"constraints",
";",
"$",
"newConstraints",
"[",
"self",
"::",
... | Create a new instance with the host prefix constraint added
@param string $prefix The URI host prefix to force, for example "en."
@param string[] $replacePrefixes a list of prefixes that should be replaced with the given prefix. if the list is empty or does not match the current host $prefix will be prepended as is
@r... | [
"Create",
"a",
"new",
"instance",
"with",
"the",
"host",
"prefix",
"constraint",
"added"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L114-L122 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.withHostSuffix | public function withHostSuffix(string $suffix, array $replaceSuffixes = []): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_HOST_SUFFIX] = [
'suffix' => $suffix,
'replaceSuffixes' => $replaceSuffixes,
];
return new static($newCon... | php | public function withHostSuffix(string $suffix, array $replaceSuffixes = []): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_HOST_SUFFIX] = [
'suffix' => $suffix,
'replaceSuffixes' => $replaceSuffixes,
];
return new static($newCon... | [
"public",
"function",
"withHostSuffix",
"(",
"string",
"$",
"suffix",
",",
"array",
"$",
"replaceSuffixes",
"=",
"[",
"]",
")",
":",
"self",
"{",
"$",
"newConstraints",
"=",
"$",
"this",
"->",
"constraints",
";",
"$",
"newConstraints",
"[",
"self",
"::",
... | Create a new instance with the host suffix constraint added
@param string $suffix The URI host suffix to force, for example ".com"
@param string[] $replaceSuffixes a list of prefixes that should be replaced with the given prefix. if the list is empty or does not match the current host $prefix will be prepended as is
@... | [
"Create",
"a",
"new",
"instance",
"with",
"the",
"host",
"suffix",
"constraint",
"added"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L131-L139 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.withPort | public function withPort(int $port): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_PORT] = $port;
return new static($newConstraints);
} | php | public function withPort(int $port): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_PORT] = $port;
return new static($newConstraints);
} | [
"public",
"function",
"withPort",
"(",
"int",
"$",
"port",
")",
":",
"self",
"{",
"$",
"newConstraints",
"=",
"$",
"this",
"->",
"constraints",
";",
"$",
"newConstraints",
"[",
"self",
"::",
"CONSTRAINT_PORT",
"]",
"=",
"$",
"port",
";",
"return",
"new",... | Create a new instance with the port constraint added
@param int $port The URI port to force, for example 80
@return UriConstraints | [
"Create",
"a",
"new",
"instance",
"with",
"the",
"port",
"constraint",
"added"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L147-L152 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.withPath | public function withPath(string $path): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_PATH] = $path;
return new static($newConstraints);
} | php | public function withPath(string $path): self
{
$newConstraints = $this->constraints;
$newConstraints[self::CONSTRAINT_PATH] = $path;
return new static($newConstraints);
} | [
"public",
"function",
"withPath",
"(",
"string",
"$",
"path",
")",
":",
"self",
"{",
"$",
"newConstraints",
"=",
"$",
"this",
"->",
"constraints",
";",
"$",
"newConstraints",
"[",
"self",
"::",
"CONSTRAINT_PATH",
"]",
"=",
"$",
"path",
";",
"return",
"ne... | Create a new instance with the path constraint added
@param string $path The URI path to force, for example "some/path/"
@return UriConstraints | [
"Create",
"a",
"new",
"instance",
"with",
"the",
"path",
"constraint",
"added"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L160-L165 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.withPathPrefix | public function withPathPrefix(string $pathPrefix, bool $append = false): self
{
if ($pathPrefix === '') {
return $this;
}
$newConstraints = $this->constraints;
if (isset($newConstraints[self::CONSTRAINT_PATH_PREFIX])) {
$pathPrefix = $append ? $newConstraints... | php | public function withPathPrefix(string $pathPrefix, bool $append = false): self
{
if ($pathPrefix === '') {
return $this;
}
$newConstraints = $this->constraints;
if (isset($newConstraints[self::CONSTRAINT_PATH_PREFIX])) {
$pathPrefix = $append ? $newConstraints... | [
"public",
"function",
"withPathPrefix",
"(",
"string",
"$",
"pathPrefix",
",",
"bool",
"$",
"append",
"=",
"false",
")",
":",
"self",
"{",
"if",
"(",
"$",
"pathPrefix",
"===",
"''",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$",
"newConstraints",
"=",... | Create a new instance with the path prefix constraint added
This can be applied multiple times, later prefixes will be prepended to the start
@param string $pathPrefix The URI path prefix to force, for example "some-prefix/"
@param bool $append If true the $pathPrefix will be added *after* previous path prefix constra... | [
"Create",
"a",
"new",
"instance",
"with",
"the",
"path",
"prefix",
"constraint",
"added",
"This",
"can",
"be",
"applied",
"multiple",
"times",
"later",
"prefixes",
"will",
"be",
"prepended",
"to",
"the",
"start"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L175-L186 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.withPathSuffix | public function withPathSuffix(string $pathSuffix, bool $prepend = false): self
{
$newConstraints = $this->constraints;
if (isset($newConstraints[self::CONSTRAINT_PATH_SUFFIX])) {
$pathSuffix = $prepend ? $pathSuffix . $newConstraints[self::CONSTRAINT_PATH_SUFFIX] : $newConstraints[self:... | php | public function withPathSuffix(string $pathSuffix, bool $prepend = false): self
{
$newConstraints = $this->constraints;
if (isset($newConstraints[self::CONSTRAINT_PATH_SUFFIX])) {
$pathSuffix = $prepend ? $pathSuffix . $newConstraints[self::CONSTRAINT_PATH_SUFFIX] : $newConstraints[self:... | [
"public",
"function",
"withPathSuffix",
"(",
"string",
"$",
"pathSuffix",
",",
"bool",
"$",
"prepend",
"=",
"false",
")",
":",
"self",
"{",
"$",
"newConstraints",
"=",
"$",
"this",
"->",
"constraints",
";",
"if",
"(",
"isset",
"(",
"$",
"newConstraints",
... | Create a new instance with the path suffix constraint added
This can be applied multiple times, later suffixes will be appended to the end
@param string $pathSuffix The URI path suffix to force, for example ".html"
@param bool $prepend If true the $pathSuffix will be added *before* previous path suffix constraints. By... | [
"Create",
"a",
"new",
"instance",
"with",
"the",
"path",
"suffix",
"constraint",
"added",
"This",
"can",
"be",
"applied",
"multiple",
"times",
"later",
"suffixes",
"will",
"be",
"appended",
"to",
"the",
"end"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L196-L204 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.applyTo | public function applyTo(UriInterface $templateUri, bool $forceAbsoluteUri): UriInterface
{
$uri = new Uri('');
if (isset($this->constraints[self::CONSTRAINT_SCHEME]) && $this->constraints[self::CONSTRAINT_SCHEME] !== $templateUri->getScheme()) {
$forceAbsoluteUri = true;
$uri... | php | public function applyTo(UriInterface $templateUri, bool $forceAbsoluteUri): UriInterface
{
$uri = new Uri('');
if (isset($this->constraints[self::CONSTRAINT_SCHEME]) && $this->constraints[self::CONSTRAINT_SCHEME] !== $templateUri->getScheme()) {
$forceAbsoluteUri = true;
$uri... | [
"public",
"function",
"applyTo",
"(",
"UriInterface",
"$",
"templateUri",
",",
"bool",
"$",
"forceAbsoluteUri",
")",
":",
"UriInterface",
"{",
"$",
"uri",
"=",
"new",
"Uri",
"(",
"''",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"constraints",
... | Applies all constraints of this instance to the given $templateUri and returns a new UriInterface instance
satisfying all of the constraints (see example above)
@param UriInterface $templateUri The base URI to transform, usually the current request URI
@param bool $forceAbsoluteUri Whether or not to enforce the result... | [
"Applies",
"all",
"constraints",
"of",
"this",
"instance",
"to",
"the",
"given",
"$templateUri",
"and",
"returns",
"a",
"new",
"UriInterface",
"instance",
"satisfying",
"all",
"of",
"the",
"constraints",
"(",
"see",
"example",
"above",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L224-L295 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.stringStartsWith | private function stringStartsWith(string $string, string $prefix): bool
{
return substr($string, 0, strlen($prefix)) === $prefix;
} | php | private function stringStartsWith(string $string, string $prefix): bool
{
return substr($string, 0, strlen($prefix)) === $prefix;
} | [
"private",
"function",
"stringStartsWith",
"(",
"string",
"$",
"string",
",",
"string",
"$",
"prefix",
")",
":",
"bool",
"{",
"return",
"substr",
"(",
"$",
"string",
",",
"0",
",",
"strlen",
"(",
"$",
"prefix",
")",
")",
"===",
"$",
"prefix",
";",
"}... | Whether the given $string starts with the specified $prefix
@param string $string
@param string $prefix
@return bool | [
"Whether",
"the",
"given",
"$string",
"starts",
"with",
"the",
"specified",
"$prefix"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L304-L307 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php | UriConstraints.stringEndsWith | private function stringEndsWith(string $string, string $suffix): bool
{
return substr($string, -strlen($suffix)) === $suffix;
} | php | private function stringEndsWith(string $string, string $suffix): bool
{
return substr($string, -strlen($suffix)) === $suffix;
} | [
"private",
"function",
"stringEndsWith",
"(",
"string",
"$",
"string",
",",
"string",
"$",
"suffix",
")",
":",
"bool",
"{",
"return",
"substr",
"(",
"$",
"string",
",",
"-",
"strlen",
"(",
"$",
"suffix",
")",
")",
"===",
"$",
"suffix",
";",
"}"
] | Whether the given $string ends with the specified $suffix
@param string $string
@param string $suffix
@return bool | [
"Whether",
"the",
"given",
"$string",
"ends",
"with",
"the",
"specified",
"$suffix"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/Dto/UriConstraints.php#L316-L319 |
neos/flow-development-collection | Neos.Cache/Classes/Psr/Cache/CachePool.php | CachePool.getItem | public function getItem($key)
{
if (!$this->isValidEntryIdentifier($key)) {
throw new InvalidArgumentException('"' . $key . '" is not a valid cache entry identifier.', 1514738649629);
}
$rawResult = $this->backend->get($key);
if ($rawResult === false) {
retur... | php | public function getItem($key)
{
if (!$this->isValidEntryIdentifier($key)) {
throw new InvalidArgumentException('"' . $key . '" is not a valid cache entry identifier.', 1514738649629);
}
$rawResult = $this->backend->get($key);
if ($rawResult === false) {
retur... | [
"public",
"function",
"getItem",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidEntryIdentifier",
"(",
"$",
"key",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"key",
".",
"'\" is not a valid cach... | Returns a Cache Item representing the specified key.
@param string $key
@return CacheItemInterface
@throws InvalidArgumentException | [
"Returns",
"a",
"Cache",
"Item",
"representing",
"the",
"specified",
"key",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/Cache/CachePool.php#L72-L85 |
neos/flow-development-collection | Neos.Cache/Classes/Psr/Cache/CachePool.php | CachePool.hasItem | public function hasItem($key)
{
if (!$this->isValidEntryIdentifier($key)) {
throw new InvalidArgumentException('"' . $key . '" is not a valid cache entry identifier.', 1514738924982);
}
return $this->backend->has($key);
} | php | public function hasItem($key)
{
if (!$this->isValidEntryIdentifier($key)) {
throw new InvalidArgumentException('"' . $key . '" is not a valid cache entry identifier.', 1514738924982);
}
return $this->backend->has($key);
} | [
"public",
"function",
"hasItem",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidEntryIdentifier",
"(",
"$",
"key",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"key",
".",
"'\" is not a valid cach... | Confirms if the cache contains specified cache item.
@param string $key
@return bool
@throws InvalidArgumentException | [
"Confirms",
"if",
"the",
"cache",
"contains",
"specified",
"cache",
"item",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/Cache/CachePool.php#L108-L115 |
neos/flow-development-collection | Neos.Cache/Classes/Psr/Cache/CachePool.php | CachePool.deleteItem | public function deleteItem($key)
{
if (!$this->isValidEntryIdentifier($key)) {
throw new InvalidArgumentException('"' . $key . '" is not a valid cache entry identifier.', 1514741469583);
}
return $this->backend->remove($key);
} | php | public function deleteItem($key)
{
if (!$this->isValidEntryIdentifier($key)) {
throw new InvalidArgumentException('"' . $key . '" is not a valid cache entry identifier.', 1514741469583);
}
return $this->backend->remove($key);
} | [
"public",
"function",
"deleteItem",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidEntryIdentifier",
"(",
"$",
"key",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"key",
".",
"'\" is not a valid c... | Removes the item from the pool.
@param string $key
@return bool
@throws InvalidArgumentException | [
"Removes",
"the",
"item",
"from",
"the",
"pool",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/Cache/CachePool.php#L135-L142 |
neos/flow-development-collection | Neos.Cache/Classes/Psr/Cache/CachePool.php | CachePool.save | public function save(CacheItemInterface $item)
{
$lifetime = null;
$expiresAt = null;
if ($item instanceof CacheItem) {
$expiresAt = $item->getExpirationDate();
}
if ($expiresAt instanceof \DateTimeInterface) {
$lifetime = $expiresAt->getTimestamp() -... | php | public function save(CacheItemInterface $item)
{
$lifetime = null;
$expiresAt = null;
if ($item instanceof CacheItem) {
$expiresAt = $item->getExpirationDate();
}
if ($expiresAt instanceof \DateTimeInterface) {
$lifetime = $expiresAt->getTimestamp() -... | [
"public",
"function",
"save",
"(",
"CacheItemInterface",
"$",
"item",
")",
"{",
"$",
"lifetime",
"=",
"null",
";",
"$",
"expiresAt",
"=",
"null",
";",
"if",
"(",
"$",
"item",
"instanceof",
"CacheItem",
")",
"{",
"$",
"expiresAt",
"=",
"$",
"item",
"->"... | Persists a cache item immediately.
@param CacheItemInterface $item
@return bool | [
"Persists",
"a",
"cache",
"item",
"immediately",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/Cache/CachePool.php#L167-L181 |
neos/flow-development-collection | Neos.Cache/Classes/Psr/Cache/CachePool.php | CachePool.commit | public function commit()
{
foreach ($this->deferredItems as $item) {
$this->save($item);
}
$this->deferredItems = [];
return true;
} | php | public function commit()
{
foreach ($this->deferredItems as $item) {
$this->save($item);
}
$this->deferredItems = [];
return true;
} | [
"public",
"function",
"commit",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"deferredItems",
"as",
"$",
"item",
")",
"{",
"$",
"this",
"->",
"save",
"(",
"$",
"item",
")",
";",
"}",
"$",
"this",
"->",
"deferredItems",
"=",
"[",
"]",
";",
"r... | Persists any deferred cache items.
@return bool | [
"Persists",
"any",
"deferred",
"cache",
"items",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Psr/Cache/CachePool.php#L200-L209 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/EntityManagerFactory.php | EntityManagerFactory.injectSettings | public function injectSettings(array $settings)
{
$this->settings = $settings['persistence'];
if (!is_array($this->settings['backendOptions'])) {
throw new InvalidConfigurationException(sprintf('The Neos.Flow.persistence.backendOptions settings need to be an array, %s given.', gettype($t... | php | public function injectSettings(array $settings)
{
$this->settings = $settings['persistence'];
if (!is_array($this->settings['backendOptions'])) {
throw new InvalidConfigurationException(sprintf('The Neos.Flow.persistence.backendOptions settings need to be an array, %s given.', gettype($t... | [
"public",
"function",
"injectSettings",
"(",
"array",
"$",
"settings",
")",
"{",
"$",
"this",
"->",
"settings",
"=",
"$",
"settings",
"[",
"'persistence'",
"]",
";",
"if",
"(",
"!",
"is_array",
"(",
"$",
"this",
"->",
"settings",
"[",
"'backendOptions'",
... | Injects the Flow settings, the persistence part is kept
for further use.
@param array $settings
@return void
@throws InvalidConfigurationException | [
"Injects",
"the",
"Flow",
"settings",
"the",
"persistence",
"part",
"is",
"kept",
"for",
"further",
"use",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/EntityManagerFactory.php#L66-L75 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/EntityManagerFactory.php | EntityManagerFactory.create | public function create()
{
$config = new Configuration();
$config->setClassMetadataFactoryName(Mapping\ClassMetadataFactory::class);
$eventManager = new EventManager();
$flowAnnotationDriver = $this->objectManager->get(FlowAnnotationDriver::class);
$config->setMetadataDrive... | php | public function create()
{
$config = new Configuration();
$config->setClassMetadataFactoryName(Mapping\ClassMetadataFactory::class);
$eventManager = new EventManager();
$flowAnnotationDriver = $this->objectManager->get(FlowAnnotationDriver::class);
$config->setMetadataDrive... | [
"public",
"function",
"create",
"(",
")",
"{",
"$",
"config",
"=",
"new",
"Configuration",
"(",
")",
";",
"$",
"config",
"->",
"setClassMetadataFactoryName",
"(",
"Mapping",
"\\",
"ClassMetadataFactory",
"::",
"class",
")",
";",
"$",
"eventManager",
"=",
"ne... | Factory method which creates an EntityManager.
@return EntityManager
@throws InvalidConfigurationException | [
"Factory",
"method",
"which",
"creates",
"an",
"EntityManager",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/EntityManagerFactory.php#L83-L124 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/Rendering/RenderingContext.php | RenderingContext.buildParserConfiguration | public function buildParserConfiguration()
{
if ($this->parserConfiguration === null) {
$this->parserConfiguration = parent::buildParserConfiguration();
$this->parserConfiguration->addInterceptor(new ResourceInterceptor());
}
return $this->parserConfiguration;
} | php | public function buildParserConfiguration()
{
if ($this->parserConfiguration === null) {
$this->parserConfiguration = parent::buildParserConfiguration();
$this->parserConfiguration->addInterceptor(new ResourceInterceptor());
}
return $this->parserConfiguration;
} | [
"public",
"function",
"buildParserConfiguration",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"parserConfiguration",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"parserConfiguration",
"=",
"parent",
"::",
"buildParserConfiguration",
"(",
")",
";",
"$",
"this"... | Build parser configuration
@return Configuration | [
"Build",
"parser",
"configuration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Rendering/RenderingContext.php#L151-L159 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/Rendering/RenderingContext.php | RenderingContext.setOption | public function setOption($optionName, $value)
{
if ($this->templatePaths instanceof TemplatePaths) {
$this->templatePaths->setOption($optionName, $value);
}
} | php | public function setOption($optionName, $value)
{
if ($this->templatePaths instanceof TemplatePaths) {
$this->templatePaths->setOption($optionName, $value);
}
} | [
"public",
"function",
"setOption",
"(",
"$",
"optionName",
",",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"templatePaths",
"instanceof",
"TemplatePaths",
")",
"{",
"$",
"this",
"->",
"templatePaths",
"->",
"setOption",
"(",
"$",
"optionName",
"... | 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/Core/Rendering/RenderingContext.php#L169-L174 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php | WritableFileSystemStorage.initializeObject | public function initializeObject()
{
if (!is_writable($this->path)) {
Files::createDirectoryRecursively($this->path);
}
if (!is_dir($this->path) && !is_link($this->path)) {
throw new StorageException('The directory "' . $this->path . '" which was configured as a resou... | php | public function initializeObject()
{
if (!is_writable($this->path)) {
Files::createDirectoryRecursively($this->path);
}
if (!is_dir($this->path) && !is_link($this->path)) {
throw new StorageException('The directory "' . $this->path . '" which was configured as a resou... | [
"public",
"function",
"initializeObject",
"(",
")",
"{",
"if",
"(",
"!",
"is_writable",
"(",
"$",
"this",
"->",
"path",
")",
")",
"{",
"Files",
"::",
"createDirectoryRecursively",
"(",
"$",
"this",
"->",
"path",
")",
";",
"}",
"if",
"(",
"!",
"is_dir",... | Initializes this resource storage
@return void
@throws StorageException | [
"Initializes",
"this",
"resource",
"storage"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php#L30-L41 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php | WritableFileSystemStorage.importResource | public function importResource($source, $collectionName)
{
$temporaryTargetPathAndFilename = $this->environment->getPathToTemporaryDirectory() . 'Neos_Flow_ResourceImport_' . Algorithms::generateRandomString(13);
if (is_resource($source)) {
try {
$target = fopen($tempora... | php | public function importResource($source, $collectionName)
{
$temporaryTargetPathAndFilename = $this->environment->getPathToTemporaryDirectory() . 'Neos_Flow_ResourceImport_' . Algorithms::generateRandomString(13);
if (is_resource($source)) {
try {
$target = fopen($tempora... | [
"public",
"function",
"importResource",
"(",
"$",
"source",
",",
"$",
"collectionName",
")",
"{",
"$",
"temporaryTargetPathAndFilename",
"=",
"$",
"this",
"->",
"environment",
"->",
"getPathToTemporaryDirectory",
"(",
")",
".",
"'Neos_Flow_ResourceImport_'",
".",
"A... | Imports a resource (file) from the given URI or PHP resource stream into this storage.
On a successful import this method returns a PersistentResource object representing the newly imported persistent resource.
@param string | resource $source The URI (or local path and filename) or the PHP resource stream to import ... | [
"Imports",
"a",
"resource",
"(",
"file",
")",
"from",
"the",
"given",
"URI",
"or",
"PHP",
"resource",
"stream",
"into",
"this",
"storage",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php#L53-L74 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php | WritableFileSystemStorage.importResourceFromContent | public function importResourceFromContent($content, $collectionName)
{
$temporaryTargetPathAndFilename = $this->environment->getPathToTemporaryDirectory() . 'Neos_Flow_ResourceImport_' . Algorithms::generateRandomString(13);
try {
file_put_contents($temporaryTargetPathAndFilename, $conte... | php | public function importResourceFromContent($content, $collectionName)
{
$temporaryTargetPathAndFilename = $this->environment->getPathToTemporaryDirectory() . 'Neos_Flow_ResourceImport_' . Algorithms::generateRandomString(13);
try {
file_put_contents($temporaryTargetPathAndFilename, $conte... | [
"public",
"function",
"importResourceFromContent",
"(",
"$",
"content",
",",
"$",
"collectionName",
")",
"{",
"$",
"temporaryTargetPathAndFilename",
"=",
"$",
"this",
"->",
"environment",
"->",
"getPathToTemporaryDirectory",
"(",
")",
".",
"'Neos_Flow_ResourceImport_'",... | Imports a resource from the given string content into this storage.
On a successful import this method returns a PersistentResource object representing the newly
imported persistent resource.
The specified filename will be used when presenting the resource to a user. Its file extension is
important because the resour... | [
"Imports",
"a",
"resource",
"from",
"the",
"given",
"string",
"content",
"into",
"this",
"storage",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php#L90-L100 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php | WritableFileSystemStorage.deleteResource | public function deleteResource(PersistentResource $resource)
{
$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());
if (!file_exists($pathAndFilename)) {
return true;
}
if (unlink($pathAndFilename) === false) {
return false;
... | php | public function deleteResource(PersistentResource $resource)
{
$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());
if (!file_exists($pathAndFilename)) {
return true;
}
if (unlink($pathAndFilename) === false) {
return false;
... | [
"public",
"function",
"deleteResource",
"(",
"PersistentResource",
"$",
"resource",
")",
"{",
"$",
"pathAndFilename",
"=",
"$",
"this",
"->",
"getStoragePathAndFilenameByHash",
"(",
"$",
"resource",
"->",
"getSha1",
"(",
")",
")",
";",
"if",
"(",
"!",
"file_ex... | Deletes the storage data related to the given PersistentResource object
@param PersistentResource $resource The PersistentResource to delete the storage data of
@return boolean true if removal was successful | [
"Deletes",
"the",
"storage",
"data",
"related",
"to",
"the",
"given",
"PersistentResource",
"object"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php#L108-L119 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php | WritableFileSystemStorage.importTemporaryFile | protected function importTemporaryFile($temporaryPathAndFileName, $collectionName)
{
$this->fixFilePermissions($temporaryPathAndFileName);
$sha1Hash = sha1_file($temporaryPathAndFileName);
$targetPathAndFilename = $this->getStoragePathAndFilenameByHash($sha1Hash);
if (!is_file($targ... | php | protected function importTemporaryFile($temporaryPathAndFileName, $collectionName)
{
$this->fixFilePermissions($temporaryPathAndFileName);
$sha1Hash = sha1_file($temporaryPathAndFileName);
$targetPathAndFilename = $this->getStoragePathAndFilenameByHash($sha1Hash);
if (!is_file($targ... | [
"protected",
"function",
"importTemporaryFile",
"(",
"$",
"temporaryPathAndFileName",
",",
"$",
"collectionName",
")",
"{",
"$",
"this",
"->",
"fixFilePermissions",
"(",
"$",
"temporaryPathAndFileName",
")",
";",
"$",
"sha1Hash",
"=",
"sha1_file",
"(",
"$",
"tempo... | Imports the given temporary file into the storage and creates the new resource object.
Note: the temporary file is (re-)moved by this method.
@param string $temporaryPathAndFileName
@param string $collectionName
@return PersistentResource
@throws StorageException | [
"Imports",
"the",
"given",
"temporary",
"file",
"into",
"the",
"storage",
"and",
"creates",
"the",
"new",
"resource",
"object",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php#L131-L150 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php | WritableFileSystemStorage.moveTemporaryFileToFinalDestination | protected function moveTemporaryFileToFinalDestination($temporaryFile, $finalTargetPathAndFilename)
{
if (!file_exists(dirname($finalTargetPathAndFilename))) {
Files::createDirectoryRecursively(dirname($finalTargetPathAndFilename));
}
if (copy($temporaryFile, $finalTargetPathAndF... | php | protected function moveTemporaryFileToFinalDestination($temporaryFile, $finalTargetPathAndFilename)
{
if (!file_exists(dirname($finalTargetPathAndFilename))) {
Files::createDirectoryRecursively(dirname($finalTargetPathAndFilename));
}
if (copy($temporaryFile, $finalTargetPathAndF... | [
"protected",
"function",
"moveTemporaryFileToFinalDestination",
"(",
"$",
"temporaryFile",
",",
"$",
"finalTargetPathAndFilename",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"dirname",
"(",
"$",
"finalTargetPathAndFilename",
")",
")",
")",
"{",
"Files",
"::",
"... | Move a temporary file to the final destination, creating missing path segments on the way.
@param string $temporaryFile
@param string $finalTargetPathAndFilename
@return void
@throws StorageException | [
"Move",
"a",
"temporary",
"file",
"to",
"the",
"final",
"destination",
"creating",
"missing",
"path",
"segments",
"on",
"the",
"way",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/WritableFileSystemStorage.php#L160-L171 |
neos/flow-development-collection | Neos.Eel/Resources/Private/PHP/php-peg/Parser.php | ConservativePackrat.packhas | function packhas($key, $value = NULL) {
return isset($this->packres[$key]) && $this->packres[$key] !== NULL;
} | php | function packhas($key, $value = NULL) {
return isset($this->packres[$key]) && $this->packres[$key] !== NULL;
} | [
"function",
"packhas",
"(",
"$",
"key",
",",
"$",
"value",
"=",
"NULL",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"packres",
"[",
"$",
"key",
"]",
")",
"&&",
"$",
"this",
"->",
"packres",
"[",
"$",
"key",
"]",
"!==",
"NULL",
";",
"}"... | The $value default parameter is NOT used, it is just added to conform to interface | [
"The",
"$value",
"default",
"parameter",
"is",
"NOT",
"used",
"it",
"is",
"just",
"added",
"to",
"conform",
"to",
"interface"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Resources/Private/PHP/php-peg/Parser.php#L312-L314 |
neos/flow-development-collection | Neos.Eel/Resources/Private/PHP/php-peg/Parser.php | ConservativePackrat.packread | function packread($key, $value = NULL) {
$this->pos = $this->packpos[$key];
return $this->packres[$key];
} | php | function packread($key, $value = NULL) {
$this->pos = $this->packpos[$key];
return $this->packres[$key];
} | [
"function",
"packread",
"(",
"$",
"key",
",",
"$",
"value",
"=",
"NULL",
")",
"{",
"$",
"this",
"->",
"pos",
"=",
"$",
"this",
"->",
"packpos",
"[",
"$",
"key",
"]",
";",
"return",
"$",
"this",
"->",
"packres",
"[",
"$",
"key",
"]",
";",
"}"
] | The $value default parameter is NOT used, it is just added to conform to interface | [
"The",
"$value",
"default",
"parameter",
"is",
"NOT",
"used",
"it",
"is",
"just",
"added",
"to",
"conform",
"to",
"interface"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Resources/Private/PHP/php-peg/Parser.php#L317-L320 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutClassAnnotatedWithFilter.php | PointcutClassAnnotatedWithFilter.matches | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
$designatedAnnotations = $this->reflectionService->getClassAnnotations($className, $this->annotation);
if ($designatedAnnotations !== [] || $this->annotationValueConstraints === []) {
... | php | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
$designatedAnnotations = $this->reflectionService->getClassAnnotations($className, $this->annotation);
if ($designatedAnnotations !== [] || $this->annotationValueConstraints === []) {
... | [
"public",
"function",
"matches",
"(",
"$",
"className",
",",
"$",
"methodName",
",",
"$",
"methodDeclaringClassName",
",",
"$",
"pointcutQueryIdentifier",
")",
":",
"bool",
"{",
"$",
"designatedAnnotations",
"=",
"$",
"this",
"->",
"reflectionService",
"->",
"ge... | Checks if the specified class matches with the class tag filter pattern
@param string $className Name of the class to check against
@param string $methodName Name of the method - not used here
@param string $methodDeclaringClassName Name of the class the method was originally declared in - not used here
@param mixed $... | [
"Checks",
"if",
"the",
"specified",
"class",
"matches",
"with",
"the",
"class",
"tag",
"filter",
"pattern"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutClassAnnotatedWithFilter.php#L89-L113 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Form/TextareaViewHelper.php | TextareaViewHelper.render | public function render()
{
$name = $this->getName();
$this->registerFieldNameForFormTokenGeneration($name);
$this->tag->forceClosingTag(true);
$this->tag->addAttribute('name', $name);
$this->tag->setContent(htmlspecialchars($this->getValueAttribute()));
$this->addAd... | php | public function render()
{
$name = $this->getName();
$this->registerFieldNameForFormTokenGeneration($name);
$this->tag->forceClosingTag(true);
$this->tag->addAttribute('name', $name);
$this->tag->setContent(htmlspecialchars($this->getValueAttribute()));
$this->addAd... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"getName",
"(",
")",
";",
"$",
"this",
"->",
"registerFieldNameForFormTokenGeneration",
"(",
"$",
"name",
")",
";",
"$",
"this",
"->",
"tag",
"->",
"forceClosingTag",
"("... | Renders the textarea.
@return string
@api | [
"Renders",
"the",
"textarea",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/TextareaViewHelper.php#L63-L76 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.validateCommand | public function validateCommand()
{
$this->outputLine();
$classesAndErrors = $this->doctrineService->validateMapping();
if (count($classesAndErrors) === 0) {
$this->outputLine('Mapping validation passed, no errors were found.');
} else {
$this->outputLine('Map... | php | public function validateCommand()
{
$this->outputLine();
$classesAndErrors = $this->doctrineService->validateMapping();
if (count($classesAndErrors) === 0) {
$this->outputLine('Mapping validation passed, no errors were found.');
} else {
$this->outputLine('Map... | [
"public",
"function",
"validateCommand",
"(",
")",
"{",
"$",
"this",
"->",
"outputLine",
"(",
")",
";",
"$",
"classesAndErrors",
"=",
"$",
"this",
"->",
"doctrineService",
"->",
"validateMapping",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"classesAndErr... | Validate the class/table mappings
Checks if the current class model schema is valid. Any inconsistencies
in the relations between models (for example caused by wrong or
missing annotations) will be reported.
Note that this does not check the table structure in the database in
any way.
@return void
@see neos.flow:doc... | [
"Validate",
"the",
"class",
"/",
"table",
"mappings"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L108-L124 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.createCommand | public function createCommand(string $output = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Database schema creation has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->quit(1);
}
$this->doc... | php | public function createCommand(string $output = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Database schema creation has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->quit(1);
}
$this->doc... | [
"public",
"function",
"createCommand",
"(",
"string",
"$",
"output",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isDatabaseConfigured",
"(",
")",
")",
"{",
"$",
"this",
"->",
"outputLine",
"(",
"'Database schema creation has been SKIPPED, the driv... | Create the database schema
Creates a new database schema based on the current mapping information.
It expects the database to be empty, if tables that are to be created already
exist, this will lead to errors.
@param string $output A file to write SQL to, instead of executing it
@return void
@see neos.flow:doctrine:... | [
"Create",
"the",
"database",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L140-L153 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.updateCommand | public function updateCommand(bool $unsafeMode = false, string $output = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Database schema update has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->quit(1);
... | php | public function updateCommand(bool $unsafeMode = false, string $output = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Database schema update has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->quit(1);
... | [
"public",
"function",
"updateCommand",
"(",
"bool",
"$",
"unsafeMode",
"=",
"false",
",",
"string",
"$",
"output",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isDatabaseConfigured",
"(",
")",
")",
"{",
"$",
"this",
"->",
"outputLine",
"(... | Update the database schema
Updates the database schema without using existing migrations.
It will not drop foreign keys, sequences and tables, unless <u>--unsafe-mode</u> is set.
@param boolean $unsafeMode If set, foreign keys, sequences and tables can potentially be dropped.
@param string $output A file to write SQ... | [
"Update",
"the",
"database",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L169-L182 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.entityStatusCommand | public function entityStatusCommand(bool $dumpMappingData = false, string $entityClassName = null)
{
$info = $this->doctrineService->getEntityStatus();
if ($info === []) {
$this->output('You do not have any mapped Doctrine ORM entities according to the current configuration. ');
... | php | public function entityStatusCommand(bool $dumpMappingData = false, string $entityClassName = null)
{
$info = $this->doctrineService->getEntityStatus();
if ($info === []) {
$this->output('You do not have any mapped Doctrine ORM entities according to the current configuration. ');
... | [
"public",
"function",
"entityStatusCommand",
"(",
"bool",
"$",
"dumpMappingData",
"=",
"false",
",",
"string",
"$",
"entityClassName",
"=",
"null",
")",
"{",
"$",
"info",
"=",
"$",
"this",
"->",
"doctrineService",
"->",
"getEntityStatus",
"(",
")",
";",
"if"... | Show the current status of entities and mappings
Shows basic information about which entities exist and possibly if their
mapping information contains errors or not.
To run a full validation, use the validate command.
@param boolean $dumpMappingData If set, the mapping data will be output
@param string $entityClassN... | [
"Show",
"the",
"current",
"status",
"of",
"entities",
"and",
"mappings"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L197-L236 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.dqlCommand | public function dqlCommand(int $depth = 3, string $hydrationMode = 'array', int $offset = null, int $limit = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('DQL query is not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
... | php | public function dqlCommand(int $depth = 3, string $hydrationMode = 'array', int $offset = null, int $limit = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('DQL query is not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
... | [
"public",
"function",
"dqlCommand",
"(",
"int",
"$",
"depth",
"=",
"3",
",",
"string",
"$",
"hydrationMode",
"=",
"'array'",
",",
"int",
"$",
"offset",
"=",
"null",
",",
"int",
"$",
"limit",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",... | Run arbitrary DQL and display results
Any DQL queries passed after the parameters will be executed, the results will be output:
doctrine:dql --limit 10 'SELECT a FROM Neos\Flow\Security\Account a'
@param integer $depth How many levels deep the result should be dumped
@param string $hydrationMode One of: object, arra... | [
"Run",
"arbitrary",
"DQL",
"and",
"display",
"results"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L253-L270 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.migrationStatusCommand | public function migrationStatusCommand(bool $showMigrations = false, bool $showDescriptions = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration status not available, the driver and host backend options are not set in /Configuration/Settings.yaml.');
... | php | public function migrationStatusCommand(bool $showMigrations = false, bool $showDescriptions = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration status not available, the driver and host backend options are not set in /Configuration/Settings.yaml.');
... | [
"public",
"function",
"migrationStatusCommand",
"(",
"bool",
"$",
"showMigrations",
"=",
"false",
",",
"bool",
"$",
"showDescriptions",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isDatabaseConfigured",
"(",
")",
")",
"{",
"$",
"this",
"->"... | Show the current migration status
Displays the migration configuration as well as the number of
available, executed and pending migrations.
@param boolean $showMigrations Output a list of all migrations and their status
@param boolean $showDescriptions Show descriptions for the migrations (enables versions display)
@... | [
"Show",
"the",
"current",
"migration",
"status"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L287-L299 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.migrateCommand | public function migrateCommand(string $version = null, string $output = null, bool $dryRun = false, bool $quiet = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');... | php | public function migrateCommand(string $version = null, string $output = null, bool $dryRun = false, bool $quiet = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');... | [
"public",
"function",
"migrateCommand",
"(",
"string",
"$",
"version",
"=",
"null",
",",
"string",
"$",
"output",
"=",
"null",
",",
"bool",
"$",
"dryRun",
"=",
"false",
",",
"bool",
"$",
"quiet",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"this",
... | Migrate the database schema
Adjusts the database structure by applying the pending
migrations provided by currently active packages.
@param string $version The version to migrate to
@param string $output A file to write SQL to, instead of executing it
@param boolean $dryRun Whether to do a dry run or not
@param boole... | [
"Migrate",
"the",
"database",
"schema"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L318-L343 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.migrationExecuteCommand | public function migrationExecuteCommand(string $version, string $direction = 'up', string $output = null, bool $dryRun = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.y... | php | public function migrationExecuteCommand(string $version, string $direction = 'up', string $output = null, bool $dryRun = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.y... | [
"public",
"function",
"migrationExecuteCommand",
"(",
"string",
"$",
"version",
",",
"string",
"$",
"direction",
"=",
"'up'",
",",
"string",
"$",
"output",
"=",
"null",
",",
"bool",
"$",
"dryRun",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"-... | Execute a single migration
Manually runs a single migration in the given direction.
@param string $version The migration to execute
@param string $direction Whether to execute the migration up (default) or down
@param string $output A file to write SQL to, instead of executing it
@param boolean $dryRun Whether to do ... | [
"Execute",
"a",
"single",
"migration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L369-L381 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.migrationVersionCommand | public function migrationVersionCommand(string $version, bool $add = false, bool $delete = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->qui... | php | public function migrationVersionCommand(string $version, bool $add = false, bool $delete = false)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->qui... | [
"public",
"function",
"migrationVersionCommand",
"(",
"string",
"$",
"version",
",",
"bool",
"$",
"add",
"=",
"false",
",",
"bool",
"$",
"delete",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isDatabaseConfigured",
"(",
")",
")",
"{",
"$... | Mark/unmark migrations as migrated
If <u>all</u> is given as version, all available migrations are marked
as requested.
@param string $version The migration to execute
@param boolean $add The migration to mark as migrated
@param boolean $delete The migration to mark as not migrated
@return void
@throws \InvalidArgume... | [
"Mark",
"/",
"unmark",
"migrations",
"as",
"migrated"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L400-L416 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.migrationGenerateCommand | public function migrationGenerateCommand(bool $diffAgainstCurrent = true, string $filterExpression = null, bool $force = false)
{
// "driver" is used only for Doctrine, thus we (mis-)use it here
// additionally, when no host is set, skip this step, assuming no DB is needed
if (!$this->isData... | php | public function migrationGenerateCommand(bool $diffAgainstCurrent = true, string $filterExpression = null, bool $force = false)
{
// "driver" is used only for Doctrine, thus we (mis-)use it here
// additionally, when no host is set, skip this step, assuming no DB is needed
if (!$this->isData... | [
"public",
"function",
"migrationGenerateCommand",
"(",
"bool",
"$",
"diffAgainstCurrent",
"=",
"true",
",",
"string",
"$",
"filterExpression",
"=",
"null",
",",
"bool",
"$",
"force",
"=",
"false",
")",
"{",
"// \"driver\" is used only for Doctrine, thus we (mis-)use it ... | Generate a new migration
If $diffAgainstCurrent is true (the default), it generates a migration file
with the diff between current DB structure and the found mapping metadata.
Otherwise an empty migration skeleton is generated.
Only includes tables/sequences matching the $filterExpression regexp when
diffing models ... | [
"Generate",
"a",
"new",
"migration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L448-L508 |
neos/flow-development-collection | Neos.Flow/Classes/Command/DoctrineCommandController.php | DoctrineCommandController.handleException | protected function handleException(\Exception $exception)
{
$this->outputLine('<error>%s</error>', [$exception->getMessage()]);
$this->outputLine();
$this->outputLine('The exception details have been logged to the Flow system log.');
$message = $this->throwableStorage->logThrowable($... | php | protected function handleException(\Exception $exception)
{
$this->outputLine('<error>%s</error>', [$exception->getMessage()]);
$this->outputLine();
$this->outputLine('The exception details have been logged to the Flow system log.');
$message = $this->throwableStorage->logThrowable($... | [
"protected",
"function",
"handleException",
"(",
"\\",
"Exception",
"$",
"exception",
")",
"{",
"$",
"this",
"->",
"outputLine",
"(",
"'<error>%s</error>'",
",",
"[",
"$",
"exception",
"->",
"getMessage",
"(",
")",
"]",
")",
";",
"$",
"this",
"->",
"output... | Output an error message and log the exception.
@param \Exception $exception
@return void
@throws StopActionException | [
"Output",
"an",
"error",
"message",
"and",
"log",
"the",
"exception",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/DoctrineCommandController.php#L517-L526 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/NumberRangeValidator.php | NumberRangeValidator.isValid | protected function isValid($value)
{
if (!is_numeric($value)) {
$this->addError('A valid number is expected.', 1221563685);
return;
}
$minimum = $this->options['minimum'];
$maximum = $this->options['maximum'];
if ($minimum > $maximum) {
$x... | php | protected function isValid($value)
{
if (!is_numeric($value)) {
$this->addError('A valid number is expected.', 1221563685);
return;
}
$minimum = $this->options['minimum'];
$maximum = $this->options['maximum'];
if ($minimum > $maximum) {
$x... | [
"protected",
"function",
"isValid",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"is_numeric",
"(",
"$",
"value",
")",
")",
"{",
"$",
"this",
"->",
"addError",
"(",
"'A valid number is expected.'",
",",
"1221563685",
")",
";",
"return",
";",
"}",
"$",
... | The given value is valid if it is a number in the specified range.
@param mixed $value The value that should be validated
@return void
@api | [
"The",
"given",
"value",
"is",
"valid",
"if",
"it",
"is",
"a",
"number",
"in",
"the",
"specified",
"range",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/NumberRangeValidator.php#L37-L54 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/PropertyConditionGenerator.php | PropertyConditionGenerator.getValueForOperand | public function getValueForOperand($expression)
{
if (is_array($expression)) {
$result = [];
foreach ($expression as $expressionEntry) {
$result[] = $this->getValueForOperand($expressionEntry);
}
return $result;
} elseif (is_numeric($ex... | php | public function getValueForOperand($expression)
{
if (is_array($expression)) {
$result = [];
foreach ($expression as $expressionEntry) {
$result[] = $this->getValueForOperand($expressionEntry);
}
return $result;
} elseif (is_numeric($ex... | [
"public",
"function",
"getValueForOperand",
"(",
"$",
"expression",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"expression",
")",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"expression",
"as",
"$",
"expressionEntry",
")",
"{",
"$... | Returns the static value of the given operand, this might be also a global object
@param mixed $expression The expression string representing the operand
@return mixed The calculated value | [
"Returns",
"the",
"static",
"value",
"of",
"the",
"given",
"operand",
"this",
"might",
"be",
"also",
"a",
"global",
"object"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/PropertyConditionGenerator.php#L523-L551 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.matches | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
$this->runtimeEvaluationsDefinition = [];
$matches = true;
foreach ($this->filters as &$operatorAndFilter) {
list($operator, $filter) = $operatorAndFilter;
$... | php | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
$this->runtimeEvaluationsDefinition = [];
$matches = true;
foreach ($this->filters as &$operatorAndFilter) {
list($operator, $filter) = $operatorAndFilter;
$... | [
"public",
"function",
"matches",
"(",
"$",
"className",
",",
"$",
"methodName",
",",
"$",
"methodDeclaringClassName",
",",
"$",
"pointcutQueryIdentifier",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"runtimeEvaluationsDefinition",
"=",
"[",
"]",
";",
"$",
"match... | Checks if the specified class and method match the registered class-
and method filter patterns.
@param string $className Name of the class to check against
@param string $methodName Name of the method to check against
@param string $methodDeclaringClassName Name of the class the method was originally declared in
@par... | [
"Checks",
"if",
"the",
"specified",
"class",
"and",
"method",
"match",
"the",
"registered",
"class",
"-",
"and",
"method",
"filter",
"patterns",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L57-L116 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.addFilter | public function addFilter($operator, PointcutFilterInterface $filter): void
{
$this->filters[] = [$operator, $filter];
if ($operator !== '&&' && $operator !== '&&!') {
$this->earlyReturn = false;
}
} | php | public function addFilter($operator, PointcutFilterInterface $filter): void
{
$this->filters[] = [$operator, $filter];
if ($operator !== '&&' && $operator !== '&&!') {
$this->earlyReturn = false;
}
} | [
"public",
"function",
"addFilter",
"(",
"$",
"operator",
",",
"PointcutFilterInterface",
"$",
"filter",
")",
":",
"void",
"{",
"$",
"this",
"->",
"filters",
"[",
"]",
"=",
"[",
"$",
"operator",
",",
"$",
"filter",
"]",
";",
"if",
"(",
"$",
"operator",
... | Adds a class filter to the composite
@param string $operator The operator for this filter
@param PointcutFilterInterface $filter A configured class filter
@return void | [
"Adds",
"a",
"class",
"filter",
"to",
"the",
"composite"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L125-L131 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.getRuntimeEvaluationsClosureCode | public function getRuntimeEvaluationsClosureCode()
{
$useGlobalObjects = false;
$conditionCode = $this->buildRuntimeEvaluationsConditionCode('', $this->getRuntimeEvaluationsDefinition(), $useGlobalObjects);
if ($conditionCode !== '') {
$code = "function(\\Neos\\Flow\\Aop\\JoinPo... | php | public function getRuntimeEvaluationsClosureCode()
{
$useGlobalObjects = false;
$conditionCode = $this->buildRuntimeEvaluationsConditionCode('', $this->getRuntimeEvaluationsDefinition(), $useGlobalObjects);
if ($conditionCode !== '') {
$code = "function(\\Neos\\Flow\\Aop\\JoinPo... | [
"public",
"function",
"getRuntimeEvaluationsClosureCode",
"(",
")",
"{",
"$",
"useGlobalObjects",
"=",
"false",
";",
"$",
"conditionCode",
"=",
"$",
"this",
"->",
"buildRuntimeEvaluationsConditionCode",
"(",
"''",
",",
"$",
"this",
"->",
"getRuntimeEvaluationsDefiniti... | Returns the PHP code (closure) that can evaluate the runtime evaluations
@return string The closure code | [
"Returns",
"the",
"PHP",
"code",
"(",
"closure",
")",
"that",
"can",
"evaluate",
"the",
"runtime",
"evaluations"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L170-L188 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.reduceTargetClassNames | public function reduceTargetClassNames(ClassNameIndex $classNameIndex)
{
$result = clone $classNameIndex;
foreach ($this->filters as &$operatorAndFilter) {
list($operator, $filter) = $operatorAndFilter;
switch ($operator) {
case '&&':
$res... | php | public function reduceTargetClassNames(ClassNameIndex $classNameIndex)
{
$result = clone $classNameIndex;
foreach ($this->filters as &$operatorAndFilter) {
list($operator, $filter) = $operatorAndFilter;
switch ($operator) {
case '&&':
$res... | [
"public",
"function",
"reduceTargetClassNames",
"(",
"ClassNameIndex",
"$",
"classNameIndex",
")",
"{",
"$",
"result",
"=",
"clone",
"$",
"classNameIndex",
";",
"foreach",
"(",
"$",
"this",
"->",
"filters",
"as",
"&",
"$",
"operatorAndFilter",
")",
"{",
"list"... | 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/Aop/Pointcut/PointcutFilterComposite.php#L196-L213 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.buildRuntimeEvaluationsConditionCode | protected function buildRuntimeEvaluationsConditionCode($operator, array $conditions, &$useGlobalObjects = false)
{
$conditionsCode = [];
if (count($conditions) === 0) {
return '';
}
if (isset($conditions['evaluateConditions']) && is_array($conditions['evaluateCondition... | php | protected function buildRuntimeEvaluationsConditionCode($operator, array $conditions, &$useGlobalObjects = false)
{
$conditionsCode = [];
if (count($conditions) === 0) {
return '';
}
if (isset($conditions['evaluateConditions']) && is_array($conditions['evaluateCondition... | [
"protected",
"function",
"buildRuntimeEvaluationsConditionCode",
"(",
"$",
"operator",
",",
"array",
"$",
"conditions",
",",
"&",
"$",
"useGlobalObjects",
"=",
"false",
")",
"{",
"$",
"conditionsCode",
"=",
"[",
"]",
";",
"if",
"(",
"count",
"(",
"$",
"condi... | Returns the PHP code of the conditions used for runtime evaluations
@param string $operator The operator for the given condition
@param array $conditions Condition array
@param boolean &$useGlobalObjects Set to true if global objects are used by the condition
@return string The condition code | [
"Returns",
"the",
"PHP",
"code",
"of",
"the",
"conditions",
"used",
"for",
"runtime",
"evaluations"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L223-L289 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.buildMethodArgumentsEvaluationConditionCode | protected function buildMethodArgumentsEvaluationConditionCode(array $conditions, &$useGlobalObjects = false)
{
$argumentConstraintsConditionsCode = '';
$isFirst = true;
foreach ($conditions as $argumentName => $argumentConstraint) {
$objectAccess = explode('.', $argumentName, 2... | php | protected function buildMethodArgumentsEvaluationConditionCode(array $conditions, &$useGlobalObjects = false)
{
$argumentConstraintsConditionsCode = '';
$isFirst = true;
foreach ($conditions as $argumentName => $argumentConstraint) {
$objectAccess = explode('.', $argumentName, 2... | [
"protected",
"function",
"buildMethodArgumentsEvaluationConditionCode",
"(",
"array",
"$",
"conditions",
",",
"&",
"$",
"useGlobalObjects",
"=",
"false",
")",
"{",
"$",
"argumentConstraintsConditionsCode",
"=",
"''",
";",
"$",
"isFirst",
"=",
"true",
";",
"foreach",... | Returns the PHP code of the conditions used argument runtime evaluations
@param array $conditions Condition array
@param boolean &$useGlobalObjects Set to true if global objects are used by the condition
@return string The arguments condition code | [
"Returns",
"the",
"PHP",
"code",
"of",
"the",
"conditions",
"used",
"argument",
"runtime",
"evaluations"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L298-L329 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.buildGlobalRuntimeEvaluationsConditionCode | protected function buildGlobalRuntimeEvaluationsConditionCode(array $conditions, &$useGlobalObjects = false)
{
$evaluateConditionsCode = '';
$isFirst = true;
foreach ($conditions as $constraint) {
$leftValue = $this->buildArgumentEvaluationAccessCode($constraint['leftValue'], $u... | php | protected function buildGlobalRuntimeEvaluationsConditionCode(array $conditions, &$useGlobalObjects = false)
{
$evaluateConditionsCode = '';
$isFirst = true;
foreach ($conditions as $constraint) {
$leftValue = $this->buildArgumentEvaluationAccessCode($constraint['leftValue'], $u... | [
"protected",
"function",
"buildGlobalRuntimeEvaluationsConditionCode",
"(",
"array",
"$",
"conditions",
",",
"&",
"$",
"useGlobalObjects",
"=",
"false",
")",
"{",
"$",
"evaluateConditionsCode",
"=",
"''",
";",
"$",
"isFirst",
"=",
"true",
";",
"foreach",
"(",
"$... | Returns the PHP code of the conditions used for global runtime evaluations
@param array $conditions Condition array
@param boolean &$useGlobalObjects Set to true if global objects are used by the condition
@return string The condition code | [
"Returns",
"the",
"PHP",
"code",
"of",
"the",
"conditions",
"used",
"for",
"global",
"runtime",
"evaluations"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L338-L361 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php | PointcutFilterComposite.buildArgumentEvaluationAccessCode | protected function buildArgumentEvaluationAccessCode($argumentAccess, &$useGlobalObjects = false)
{
if (is_array($argumentAccess)) {
$valuesAccessCodes = [];
foreach ($argumentAccess as $singleValue) {
$valuesAccessCodes[] = $this->buildArgumentEvaluationAccessCode($s... | php | protected function buildArgumentEvaluationAccessCode($argumentAccess, &$useGlobalObjects = false)
{
if (is_array($argumentAccess)) {
$valuesAccessCodes = [];
foreach ($argumentAccess as $singleValue) {
$valuesAccessCodes[] = $this->buildArgumentEvaluationAccessCode($s... | [
"protected",
"function",
"buildArgumentEvaluationAccessCode",
"(",
"$",
"argumentAccess",
",",
"&",
"$",
"useGlobalObjects",
"=",
"false",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"argumentAccess",
")",
")",
"{",
"$",
"valuesAccessCodes",
"=",
"[",
"]",
";",... | Returns the PHP code used to access one argument of a runtime evaluation
@param mixed $argumentAccess The unparsed argument access, might be string or array
@param boolean &$useGlobalObjects Set to true if global objects are used by the condition
@return string The condition code | [
"Returns",
"the",
"PHP",
"code",
"used",
"to",
"access",
"one",
"argument",
"of",
"a",
"runtime",
"evaluation"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutFilterComposite.php#L370-L397 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/BooleanConverter.php | BooleanConverter.convertFrom | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if (is_bool($source)) {
return $source;
}
if (is_int($source) || is_float(($source))) {
return (boolean)$source;
... | php | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if (is_bool($source)) {
return $source;
}
if (is_int($source) || is_float(($source))) {
return (boolean)$source;
... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"convertedChildProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"if",
"(",
"is_bool",
"(",
... | Actually convert from $source to $targetType
@param mixed $source
@param string $targetType
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface $configuration
@return boolean
@api | [
"Actually",
"convert",
"from",
"$source",
"to",
"$targetType"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/BooleanConverter.php#L54-L65 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/StorageObject.php | StorageObject.setStream | public function setStream($stream)
{
if (!is_resource($stream) && !$stream instanceof \Closure) {
throw new \InvalidArgumentException(sprintf('setStream() expects a stream or Closure, %s given.', gettype($stream)), 1416311979);
}
$this->stream = $stream;
} | php | public function setStream($stream)
{
if (!is_resource($stream) && !$stream instanceof \Closure) {
throw new \InvalidArgumentException(sprintf('setStream() expects a stream or Closure, %s given.', gettype($stream)), 1416311979);
}
$this->stream = $stream;
} | [
"public",
"function",
"setStream",
"(",
"$",
"stream",
")",
"{",
"if",
"(",
"!",
"is_resource",
"(",
"$",
"stream",
")",
"&&",
"!",
"$",
"stream",
"instanceof",
"\\",
"Closure",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
... | Sets the data stream which can deliver the content of this storage object
Instead of providing a stream (PHP resource), you can also pass a Closure which returns a stream when it is
evaluated.
@param resource|\Closure $stream The data stream, or a Closure which returns one
@return void | [
"Sets",
"the",
"data",
"stream",
"which",
"can",
"deliver",
"the",
"content",
"of",
"this",
"storage",
"object"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/StorageObject.php#L216-L222 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Storage/StorageObject.php | StorageObject.getStream | public function getStream()
{
if ($this->stream instanceof \Closure) {
$this->stream = $this->stream->__invoke();
}
if (is_resource($this->stream)) {
$meta = stream_get_meta_data($this->stream);
if ($meta['seekable']) {
rewind($this->stream... | php | public function getStream()
{
if ($this->stream instanceof \Closure) {
$this->stream = $this->stream->__invoke();
}
if (is_resource($this->stream)) {
$meta = stream_get_meta_data($this->stream);
if ($meta['seekable']) {
rewind($this->stream... | [
"public",
"function",
"getStream",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"stream",
"instanceof",
"\\",
"Closure",
")",
"{",
"$",
"this",
"->",
"stream",
"=",
"$",
"this",
"->",
"stream",
"->",
"__invoke",
"(",
")",
";",
"}",
"if",
"(",
"is_r... | Returns the data stream which can deliver the content of this storage object
@return resource A data stream resource; if the stream is seekable, it is rewound to the start | [
"Returns",
"the",
"data",
"stream",
"which",
"can",
"deliver",
"the",
"content",
"of",
"this",
"storage",
"object"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Storage/StorageObject.php#L229-L241 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageFactory.php | PackageFactory.create | public function create($packagesBasePath, $packagePath, $packageKey, $composerName, array $autoloadConfiguration = [], array $packageClassInformation = null)
{
$absolutePackagePath = Files::concatenatePaths([$packagesBasePath, $packagePath]) . '/';
if ($packageClassInformation === null) {
... | php | public function create($packagesBasePath, $packagePath, $packageKey, $composerName, array $autoloadConfiguration = [], array $packageClassInformation = null)
{
$absolutePackagePath = Files::concatenatePaths([$packagesBasePath, $packagePath]) . '/';
if ($packageClassInformation === null) {
... | [
"public",
"function",
"create",
"(",
"$",
"packagesBasePath",
",",
"$",
"packagePath",
",",
"$",
"packageKey",
",",
"$",
"composerName",
",",
"array",
"$",
"autoloadConfiguration",
"=",
"[",
"]",
",",
"array",
"$",
"packageClassInformation",
"=",
"null",
")",
... | Returns a package instance.
@param string $packagesBasePath the base install path of packages,
@param string $packagePath path to package, relative to base path
@param string $packageKey key / name of the package
@param string $composerName
@param array $autoloadConfiguration Autoload configuration as defined in compo... | [
"Returns",
"a",
"package",
"instance",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageFactory.php#L35-L59 |
neos/flow-development-collection | Neos.Flow/Classes/Package/PackageFactory.php | PackageFactory.detectFlowPackageFilePath | public function detectFlowPackageFilePath($packageKey, $absolutePackagePath)
{
if (!is_dir($absolutePackagePath)) {
throw new Exception\InvalidPackagePathException(sprintf('The given package path "%s" is not a readable directory.', $absolutePackagePath), 1445904440);
}
$composer... | php | public function detectFlowPackageFilePath($packageKey, $absolutePackagePath)
{
if (!is_dir($absolutePackagePath)) {
throw new Exception\InvalidPackagePathException(sprintf('The given package path "%s" is not a readable directory.', $absolutePackagePath), 1445904440);
}
$composer... | [
"public",
"function",
"detectFlowPackageFilePath",
"(",
"$",
"packageKey",
",",
"$",
"absolutePackagePath",
")",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"absolutePackagePath",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidPackagePathException",
"(",
... | Detects if the package contains a package file and returns the path and classname.
@param string $packageKey The package key
@param string $absolutePackagePath Absolute path to the package
@return array The path to the package file and classname for this package or an empty array if none was found.
@throws Exception\C... | [
"Detects",
"if",
"the",
"package",
"contains",
"a",
"package",
"file",
"and",
"returns",
"the",
"path",
"and",
"classname",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageFactory.php#L70-L109 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Builder/AdvicedMethodInterceptorBuilder.php | AdvicedMethodInterceptorBuilder.build | public function build(string $methodName, array $interceptedMethods, string $targetClassName): void
{
if ($methodName === '__construct') {
throw new Exception('The ' . __CLASS__ . ' cannot build constructor interceptor code.', 1173107446);
}
$declaringClassName = $interceptedMet... | php | public function build(string $methodName, array $interceptedMethods, string $targetClassName): void
{
if ($methodName === '__construct') {
throw new Exception('The ' . __CLASS__ . ' cannot build constructor interceptor code.', 1173107446);
}
$declaringClassName = $interceptedMet... | [
"public",
"function",
"build",
"(",
"string",
"$",
"methodName",
",",
"array",
"$",
"interceptedMethods",
",",
"string",
"$",
"targetClassName",
")",
":",
"void",
"{",
"if",
"(",
"$",
"methodName",
"===",
"'__construct'",
")",
"{",
"throw",
"new",
"Exception... | Builds interception PHP code for an adviced method
@param string $methodName Name of the method to build an interceptor for
@param array $interceptedMethods An array of method names and their meta information, including advices for the method (if any)
@param string $targetClassName Name of the target class to build th... | [
"Builds",
"interception",
"PHP",
"code",
"for",
"an",
"adviced",
"method"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/AdvicedMethodInterceptorBuilder.php#L33-L65 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/Pointcut.php | Pointcut.matches | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
if ($this->pointcutQueryIdentifier === $pointcutQueryIdentifier) {
$this->recursionLevel ++;
if ($this->recursionLevel > self::MAXIMUM_RECURSIONS) {
throw new... | php | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool
{
if ($this->pointcutQueryIdentifier === $pointcutQueryIdentifier) {
$this->recursionLevel ++;
if ($this->recursionLevel > self::MAXIMUM_RECURSIONS) {
throw new... | [
"public",
"function",
"matches",
"(",
"$",
"className",
",",
"$",
"methodName",
",",
"$",
"methodDeclaringClassName",
",",
"$",
"pointcutQueryIdentifier",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"pointcutQueryIdentifier",
"===",
"$",
"pointcutQueryI... | Checks if the given class and method match this pointcut.
Before each match run, reset() must be called to reset the circular references guard.
@param string $className Class to check against
@param string $methodName Method to check against
@param string $methodDeclaringClassName Name of the class the method was orig... | [
"Checks",
"if",
"the",
"given",
"class",
"and",
"method",
"match",
"this",
"pointcut",
".",
"Before",
"each",
"match",
"run",
"reset",
"()",
"must",
"be",
"called",
"to",
"reset",
"the",
"circular",
"references",
"guard",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/Pointcut.php#L93-L106 |
neos/flow-development-collection | Neos.Flow/Classes/Command/HelpCommandController.php | HelpCommandController.helpStubCommand | public function helpStubCommand()
{
$context = $this->bootstrap->getContext();
$applicationPackage = $this->packageManager->getPackage($this->applicationPackageKey);
$this->outputLine('<b>%s %s ("%s" context)</b>', [$this->applicationName, $applicationPackage->getInstalledVersion() ?: 'dev',... | php | public function helpStubCommand()
{
$context = $this->bootstrap->getContext();
$applicationPackage = $this->packageManager->getPackage($this->applicationPackageKey);
$this->outputLine('<b>%s %s ("%s" context)</b>', [$this->applicationName, $applicationPackage->getInstalledVersion() ?: 'dev',... | [
"public",
"function",
"helpStubCommand",
"(",
")",
"{",
"$",
"context",
"=",
"$",
"this",
"->",
"bootstrap",
"->",
"getContext",
"(",
")",
";",
"$",
"applicationPackage",
"=",
"$",
"this",
"->",
"packageManager",
"->",
"getPackage",
"(",
"$",
"this",
"->",... | Displays a short, general help message
This only outputs the Flow version number, context and some hint about how to
get more help about commands.
@return void
@Flow\Internal | [
"Displays",
"a",
"short",
"general",
"help",
"message"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/HelpCommandController.php#L64-L73 |
neos/flow-development-collection | Neos.Flow/Classes/Command/HelpCommandController.php | HelpCommandController.helpCommand | public function helpCommand(string $commandIdentifier = null)
{
$exceedingArguments = $this->request->getExceedingArguments();
if (count($exceedingArguments) > 0 && $commandIdentifier === null) {
$commandIdentifier = $exceedingArguments[0];
}
if ($commandIdentifier === n... | php | public function helpCommand(string $commandIdentifier = null)
{
$exceedingArguments = $this->request->getExceedingArguments();
if (count($exceedingArguments) > 0 && $commandIdentifier === null) {
$commandIdentifier = $exceedingArguments[0];
}
if ($commandIdentifier === n... | [
"public",
"function",
"helpCommand",
"(",
"string",
"$",
"commandIdentifier",
"=",
"null",
")",
"{",
"$",
"exceedingArguments",
"=",
"$",
"this",
"->",
"request",
"->",
"getExceedingArguments",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"exceedingArguments",... | Display help for a command
The help command displays help for a given command:
./flow help <commandIdentifier>
@param string $commandIdentifier Identifier of a command for more details
@return void
@throws StopActionException | [
"Display",
"help",
"for",
"a",
"command"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/HelpCommandController.php#L85-L108 |
neos/flow-development-collection | Neos.Flow/Classes/Command/HelpCommandController.php | HelpCommandController.displayHelpForCommand | protected function displayHelpForCommand(Command $command)
{
$this->outputLine();
$this->outputLine('<u>' . $command->getShortDescription() . '</u>');
$this->outputLine();
$this->outputLine('<b>COMMAND:</b>');
$name = '<i>' . $command->getCommandIdentifier() . '</i>';
... | php | protected function displayHelpForCommand(Command $command)
{
$this->outputLine();
$this->outputLine('<u>' . $command->getShortDescription() . '</u>');
$this->outputLine();
$this->outputLine('<b>COMMAND:</b>');
$name = '<i>' . $command->getCommandIdentifier() . '</i>';
... | [
"protected",
"function",
"displayHelpForCommand",
"(",
"Command",
"$",
"command",
")",
"{",
"$",
"this",
"->",
"outputLine",
"(",
")",
";",
"$",
"this",
"->",
"outputLine",
"(",
"'<u>'",
".",
"$",
"command",
"->",
"getShortDescription",
"(",
")",
".",
"'</... | Render help text for a single command
@param Command $command
@return void | [
"Render",
"help",
"text",
"for",
"a",
"single",
"command"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/HelpCommandController.php#L161-L244 |
neos/flow-development-collection | Neos.Flow/Classes/Command/HelpCommandController.php | HelpCommandController.errorCommand | public function errorCommand(CommandException $exception)
{
$this->outputLine('<error>%s</error>', [$exception->getMessage()]);
if ($exception instanceof AmbiguousCommandIdentifierException) {
$this->outputLine('Please specify the complete command identifier. Matched commands:');
... | php | public function errorCommand(CommandException $exception)
{
$this->outputLine('<error>%s</error>', [$exception->getMessage()]);
if ($exception instanceof AmbiguousCommandIdentifierException) {
$this->outputLine('Please specify the complete command identifier. Matched commands:');
... | [
"public",
"function",
"errorCommand",
"(",
"CommandException",
"$",
"exception",
")",
"{",
"$",
"this",
"->",
"outputLine",
"(",
"'<error>%s</error>'",
",",
"[",
"$",
"exception",
"->",
"getMessage",
"(",
")",
"]",
")",
";",
"if",
"(",
"$",
"exception",
"i... | Displays an error message
@Flow\Internal
@param CommandException $exception
@return void
@throws StopActionException | [
"Displays",
"an",
"error",
"message"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/HelpCommandController.php#L254-L265 |
neos/flow-development-collection | Neos.Flow/Classes/Command/HelpCommandController.php | HelpCommandController.buildCommandsIndex | protected function buildCommandsIndex(array $commands)
{
$commandsByPackagesAndControllers = [];
/** @var Command $command */
foreach ($commands as $command) {
if ($command->isInternal()) {
continue;
}
$commandIdentifier = $command->getComm... | php | protected function buildCommandsIndex(array $commands)
{
$commandsByPackagesAndControllers = [];
/** @var Command $command */
foreach ($commands as $command) {
if ($command->isInternal()) {
continue;
}
$commandIdentifier = $command->getComm... | [
"protected",
"function",
"buildCommandsIndex",
"(",
"array",
"$",
"commands",
")",
"{",
"$",
"commandsByPackagesAndControllers",
"=",
"[",
"]",
";",
"/** @var Command $command */",
"foreach",
"(",
"$",
"commands",
"as",
"$",
"command",
")",
"{",
"if",
"(",
"$",
... | Builds an index of available commands. For each of them a Command object is
added to the commands array of this class.
@param array<Command> $commands
@return array in the format array('<packageKey>' => array('<CommandControllerClassName>', array('<command1>' => $command1, '<command2>' => $command2))) | [
"Builds",
"an",
"index",
"of",
"available",
"commands",
".",
"For",
"each",
"of",
"them",
"a",
"Command",
"object",
"is",
"added",
"to",
"the",
"commands",
"array",
"of",
"this",
"class",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/HelpCommandController.php#L274-L289 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Uri/ActionViewHelper.php | ActionViewHelper.initializeArguments | public function initializeArguments()
{
$this->registerArgument('action', 'string', 'Target action', true);
$this->registerArgument('arguments', 'array', 'Arguments', false, []);
$this->registerArgument('controller', 'string', 'Target controller. If NULL current controllerName is used', fals... | php | public function initializeArguments()
{
$this->registerArgument('action', 'string', 'Target action', true);
$this->registerArgument('arguments', 'array', 'Arguments', false, []);
$this->registerArgument('controller', 'string', 'Target controller. If NULL current controllerName is used', fals... | [
"public",
"function",
"initializeArguments",
"(",
")",
"{",
"$",
"this",
"->",
"registerArgument",
"(",
"'action'",
",",
"'string'",
",",
"'Target action'",
",",
"true",
")",
";",
"$",
"this",
"->",
"registerArgument",
"(",
"'arguments'",
",",
"'array'",
",",
... | Initialize arguments
@return void
@api | [
"Initialize",
"arguments"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Uri/ActionViewHelper.php#L49-L64 |
neos/flow-development-collection | Neos.Eel/Classes/FlowQuery/Operations/RemoveOperation.php | RemoveOperation.evaluate | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$valuesToRemove = [];
if (isset($arguments[0])) {
if (is_array($arguments[0])) {
$valuesToRemove = $arguments[0];
} elseif ($arguments[0] instanceof \Traversable) {
$valuesToRem... | php | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$valuesToRemove = [];
if (isset($arguments[0])) {
if (is_array($arguments[0])) {
$valuesToRemove = $arguments[0];
} elseif ($arguments[0] instanceof \Traversable) {
$valuesToRem... | [
"public",
"function",
"evaluate",
"(",
"FlowQuery",
"$",
"flowQuery",
",",
"array",
"$",
"arguments",
")",
"{",
"$",
"valuesToRemove",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"arguments",
"[",
"0",
"]",
")",
")",
"{",
"if",
"(",
"is_array",... | {@inheritdoc}
@param FlowQuery $flowQuery the FlowQuery object
@param array $arguments the elements to remove (as array in index 0)
@return void | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/RemoveOperation.php#L37-L56 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilegeExpressionEvaluator.php | EntityPrivilegeExpressionEvaluator.evaluate | public function evaluate($expression, Context $context)
{
$expression = trim($expression);
$identifier = md5($expression);
$functionName = 'expression_' . $identifier;
if (!function_exists($functionName)) {
$code = $this->generateEvaluatorCode($expression);
$... | php | public function evaluate($expression, Context $context)
{
$expression = trim($expression);
$identifier = md5($expression);
$functionName = 'expression_' . $identifier;
if (!function_exists($functionName)) {
$code = $this->generateEvaluatorCode($expression);
$... | [
"public",
"function",
"evaluate",
"(",
"$",
"expression",
",",
"Context",
"$",
"context",
")",
"{",
"$",
"expression",
"=",
"trim",
"(",
"$",
"expression",
")",
";",
"$",
"identifier",
"=",
"md5",
"(",
"$",
"expression",
")",
";",
"$",
"functionName",
... | Evaluate an expression under a given context
@param string $expression
@param Context $context
@return mixed | [
"Evaluate",
"an",
"expression",
"under",
"a",
"given",
"context"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilegeExpressionEvaluator.php#L36-L52 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilegeExpressionEvaluator.php | EntityPrivilegeExpressionEvaluator.generateEvaluatorCode | protected function generateEvaluatorCode($expression)
{
$parser = new EntityPrivilegeExpressionParser($expression);
/** @var boolean|array $result */
$result = $parser->match_Expression();
if ($result === false) {
throw new ParserException(sprintf('Expression "%s" could ... | php | protected function generateEvaluatorCode($expression)
{
$parser = new EntityPrivilegeExpressionParser($expression);
/** @var boolean|array $result */
$result = $parser->match_Expression();
if ($result === false) {
throw new ParserException(sprintf('Expression "%s" could ... | [
"protected",
"function",
"generateEvaluatorCode",
"(",
"$",
"expression",
")",
"{",
"$",
"parser",
"=",
"new",
"EntityPrivilegeExpressionParser",
"(",
"$",
"expression",
")",
";",
"/** @var boolean|array $result */",
"$",
"result",
"=",
"$",
"parser",
"->",
"match_E... | Internal generator method
Used by unit tests to debug generated PHP code.
@param string $expression
@return string
@throws ParserException | [
"Internal",
"generator",
"method"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/EntityPrivilegeExpressionEvaluator.php#L63-L77 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/StringConverter.php | StringConverter.convertFrom | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if ($source instanceof \DateTimeInterface) {
$dateFormat = $this->getDateFormat($configuration);
return $source->format($dateFormat)... | php | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if ($source instanceof \DateTimeInterface) {
$dateFormat = $this->getDateFormat($configuration);
return $source->format($dateFormat)... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"convertedChildProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"source",
... | Actually convert from $source to $targetType, taking into account the fully
built $convertedChildProperties and $configuration.
@param mixed $source
@param string $targetType
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface $configuration
@return string
@throws InvalidPropertyMapping... | [
"Actually",
"convert",
"from",
"$source",
"to",
"$targetType",
"taking",
"into",
"account",
"the",
"fully",
"built",
"$convertedChildProperties",
"and",
"$configuration",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/StringConverter.php#L103-L123 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/StringConverter.php | StringConverter.getDateFormat | protected function getDateFormat(PropertyMappingConfigurationInterface $configuration = null)
{
if ($configuration === null) {
return self::DEFAULT_DATE_FORMAT;
}
$dateFormat = $configuration->getConfigurationValue(StringConverter::class, self::CONFIGURATION_DATE_FORMAT);
... | php | protected function getDateFormat(PropertyMappingConfigurationInterface $configuration = null)
{
if ($configuration === null) {
return self::DEFAULT_DATE_FORMAT;
}
$dateFormat = $configuration->getConfigurationValue(StringConverter::class, self::CONFIGURATION_DATE_FORMAT);
... | [
"protected",
"function",
"getDateFormat",
"(",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"configuration",
"===",
"null",
")",
"{",
"return",
"self",
"::",
"DEFAULT_DATE_FORMAT",
";",
"}",
"$",
"dateFormat... | Determines the date format to use for the conversion.
If no format is specified in the mapping configuration DEFAULT_DATE_FORMAT is used.
@param PropertyMappingConfigurationInterface $configuration
@return string
@throws InvalidPropertyMappingConfigurationException | [
"Determines",
"the",
"date",
"format",
"to",
"use",
"for",
"the",
"conversion",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/StringConverter.php#L134-L148 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/StringConverter.php | StringConverter.getCsvDelimiter | protected function getCsvDelimiter(PropertyMappingConfigurationInterface $configuration = null)
{
if ($configuration === null) {
return self::DEFAULT_CSV_DELIMITER;
}
$csvDelimiter = $configuration->getConfigurationValue(StringConverter::class, self::CONFIGURATION_CSV_DELIMITER)... | php | protected function getCsvDelimiter(PropertyMappingConfigurationInterface $configuration = null)
{
if ($configuration === null) {
return self::DEFAULT_CSV_DELIMITER;
}
$csvDelimiter = $configuration->getConfigurationValue(StringConverter::class, self::CONFIGURATION_CSV_DELIMITER)... | [
"protected",
"function",
"getCsvDelimiter",
"(",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"configuration",
"===",
"null",
")",
"{",
"return",
"self",
"::",
"DEFAULT_CSV_DELIMITER",
";",
"}",
"$",
"csvDel... | Determines the delimiter to use for the conversion from array to CSV format.
If no delimiter is specified in the mapping configuration DEFAULT_CSV_DELIMITER is used.
@param PropertyMappingConfigurationInterface $configuration
@return string
@throws InvalidPropertyMappingConfigurationException | [
"Determines",
"the",
"delimiter",
"to",
"use",
"for",
"the",
"conversion",
"from",
"array",
"to",
"CSV",
"format",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/StringConverter.php#L159-L173 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/StringConverter.php | StringConverter.getArrayFormat | protected function getArrayFormat(PropertyMappingConfigurationInterface $configuration = null)
{
if ($configuration === null) {
return self::DEFAULT_ARRAY_FORMAT;
}
$arrayFormat = $configuration->getConfigurationValue(StringConverter::class, self::CONFIGURATION_ARRAY_FORMAT);
... | php | protected function getArrayFormat(PropertyMappingConfigurationInterface $configuration = null)
{
if ($configuration === null) {
return self::DEFAULT_ARRAY_FORMAT;
}
$arrayFormat = $configuration->getConfigurationValue(StringConverter::class, self::CONFIGURATION_ARRAY_FORMAT);
... | [
"protected",
"function",
"getArrayFormat",
"(",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"configuration",
"===",
"null",
")",
"{",
"return",
"self",
"::",
"DEFAULT_ARRAY_FORMAT",
";",
"}",
"$",
"arrayFor... | Determines the format to use for the conversion from array to string.
If no format is specified in the mapping configuration DEFAULT_ARRAY_FORMAT is used.
@param PropertyMappingConfigurationInterface $configuration
@return string
@throws InvalidPropertyMappingConfigurationException | [
"Determines",
"the",
"format",
"to",
"use",
"for",
"the",
"conversion",
"from",
"array",
"to",
"string",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/StringConverter.php#L184-L198 |
neos/flow-development-collection | Neos.Cache/Classes/Frontend/VariableFrontend.php | VariableFrontend.set | public function set(string $entryIdentifier, $variable, array $tags = [], int $lifetime = null)
{
if (!$this->isValidEntryIdentifier($entryIdentifier)) {
throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058264);
}
foreac... | php | public function set(string $entryIdentifier, $variable, array $tags = [], int $lifetime = null)
{
if (!$this->isValidEntryIdentifier($entryIdentifier)) {
throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058264);
}
foreac... | [
"public",
"function",
"set",
"(",
"string",
"$",
"entryIdentifier",
",",
"$",
"variable",
",",
"array",
"$",
"tags",
"=",
"[",
"]",
",",
"int",
"$",
"lifetime",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidEntryIdentifier",
"(",
... | Saves the value of a PHP variable in the cache. Note that the variable
will be serialized if necessary.
@param string $entryIdentifier An identifier used for this cache entry
@param mixed $variable The variable to cache
@param array $tags Tags to associate with this cache entry
@param integer $lifetime Lifetime of thi... | [
"Saves",
"the",
"value",
"of",
"a",
"PHP",
"variable",
"in",
"the",
"cache",
".",
"Note",
"that",
"the",
"variable",
"will",
"be",
"serialized",
"if",
"necessary",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/VariableFrontend.php#L57-L72 |
neos/flow-development-collection | Neos.Cache/Classes/Frontend/VariableFrontend.php | VariableFrontend.get | public function get(string $entryIdentifier)
{
if (!$this->isValidEntryIdentifier($entryIdentifier)) {
throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058294);
}
$rawResult = $this->backend->get($entryIdentifier);
... | php | public function get(string $entryIdentifier)
{
if (!$this->isValidEntryIdentifier($entryIdentifier)) {
throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058294);
}
$rawResult = $this->backend->get($entryIdentifier);
... | [
"public",
"function",
"get",
"(",
"string",
"$",
"entryIdentifier",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidEntryIdentifier",
"(",
"$",
"entryIdentifier",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
... | Finds and returns a variable value from the cache.
@param string $entryIdentifier Identifier of the cache entry to fetch
@return mixed The value
@throws \InvalidArgumentException
@api | [
"Finds",
"and",
"returns",
"a",
"variable",
"value",
"from",
"the",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/VariableFrontend.php#L82-L93 |
neos/flow-development-collection | Neos.Cache/Classes/Frontend/VariableFrontend.php | VariableFrontend.getByTag | public function getByTag(string $tag): array
{
if (!$this->backend instanceof TaggableBackendInterface) {
throw new NotSupportedByBackendException('The backend must implement TaggableBackendInterface. Please choose a different cache backend or adjust the code using this cache.', 1483487409);
... | php | public function getByTag(string $tag): array
{
if (!$this->backend instanceof TaggableBackendInterface) {
throw new NotSupportedByBackendException('The backend must implement TaggableBackendInterface. Please choose a different cache backend or adjust the code using this cache.', 1483487409);
... | [
"public",
"function",
"getByTag",
"(",
"string",
"$",
"tag",
")",
":",
"array",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"backend",
"instanceof",
"TaggableBackendInterface",
")",
"{",
"throw",
"new",
"NotSupportedByBackendException",
"(",
"'The backend must impleme... | Finds and returns all cache entries which are tagged by the specified tag.
@param string $tag The tag to search for
@return array An array with the identifier (key) and content (value) of all matching entries. An empty array if no entries matched
@throws NotSupportedByBackendException
@throws \InvalidArgumentException... | [
"Finds",
"and",
"returns",
"all",
"cache",
"entries",
"which",
"are",
"tagged",
"by",
"the",
"specified",
"tag",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/VariableFrontend.php#L104-L122 |
neos/flow-development-collection | Neos.Cache/Classes/Frontend/VariableFrontend.php | VariableFrontend.getIterator | public function getIterator(): CacheEntryIterator
{
if (!$this->backend instanceof IterableBackendInterface) {
throw new NotSupportedByBackendException('The cache backend (%s) configured for cache "%s" cannot be used as an iterator. Please choose a different cache backend or adjust the code usin... | php | public function getIterator(): CacheEntryIterator
{
if (!$this->backend instanceof IterableBackendInterface) {
throw new NotSupportedByBackendException('The cache backend (%s) configured for cache "%s" cannot be used as an iterator. Please choose a different cache backend or adjust the code usin... | [
"public",
"function",
"getIterator",
"(",
")",
":",
"CacheEntryIterator",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"backend",
"instanceof",
"IterableBackendInterface",
")",
"{",
"throw",
"new",
"NotSupportedByBackendException",
"(",
"'The cache backend (%s) configured fo... | Returns an iterator over the entries of this cache
@return \Neos\Cache\Frontend\CacheEntryIterator
@throws NotSupportedByBackendException | [
"Returns",
"an",
"iterator",
"over",
"the",
"entries",
"of",
"this",
"cache"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Frontend/VariableFrontend.php#L130-L136 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php | ObjectConverter.canConvertFrom | public function canConvertFrom($source, $targetType)
{
return !(
$this->reflectionService->isClassAnnotatedWith($targetType, Flow\Entity::class) ||
$this->reflectionService->isClassAnnotatedWith($targetType, Flow\ValueObject::class) ||
$this->reflectionService->isClassAnn... | php | public function canConvertFrom($source, $targetType)
{
return !(
$this->reflectionService->isClassAnnotatedWith($targetType, Flow\Entity::class) ||
$this->reflectionService->isClassAnnotatedWith($targetType, Flow\ValueObject::class) ||
$this->reflectionService->isClassAnn... | [
"public",
"function",
"canConvertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
")",
"{",
"return",
"!",
"(",
"$",
"this",
"->",
"reflectionService",
"->",
"isClassAnnotatedWith",
"(",
"$",
"targetType",
",",
"Flow",
"\\",
"Entity",
"::",
"class",
")",
... | Only convert non-persistent types
@param mixed $source
@param string $targetType
@return boolean | [
"Only",
"convert",
"non",
"-",
"persistent",
"types"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php#L93-L100 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php | ObjectConverter.getTypeOfChildProperty | public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration)
{
$configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue(ObjectConverter::class, self::CONFIGURATION_TARGET_TYPE);
if ($configuredTarget... | php | public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration)
{
$configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue(ObjectConverter::class, self::CONFIGURATION_TARGET_TYPE);
if ($configuredTarget... | [
"public",
"function",
"getTypeOfChildProperty",
"(",
"$",
"targetType",
",",
"$",
"propertyName",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
")",
"{",
"$",
"configuredTargetType",
"=",
"$",
"configuration",
"->",
"getConfigurationFor",
"(",
"$",... | The type of a property is determined by the reflection service.
@param string $targetType
@param string $propertyName
@param PropertyMappingConfigurationInterface $configuration
@return string
@throws InvalidTargetException | [
"The",
"type",
"of",
"a",
"property",
"is",
"determined",
"by",
"the",
"reflection",
"service",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php#L125-L169 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php | ObjectConverter.convertFrom | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
$object = $this->buildObject($convertedChildProperties, $targetType);
foreach ($convertedChildProperties as $propertyName => $propertyValue) {
... | php | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
$object = $this->buildObject($convertedChildProperties, $targetType);
foreach ($convertedChildProperties as $propertyName => $propertyValue) {
... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"convertedChildProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"$",
"object",
"=",
"$",
"... | Convert an object from $source to an object.
@param mixed $source
@param string $targetType
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface $configuration
@return object the target type
@throws InvalidTargetException
@throws InvalidDataTypeException
@throws InvalidPropertyMappingCon... | [
"Convert",
"an",
"object",
"from",
"$source",
"to",
"an",
"object",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php#L183-L200 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php | ObjectConverter.buildObject | protected function buildObject(array &$possibleConstructorArgumentValues, $objectType)
{
$constructorArguments = [];
$className = $this->objectManager->getClassNameByObjectName($objectType);
$constructorSignature = $this->getConstructorArgumentsForClass($className);
if (count($constr... | php | protected function buildObject(array &$possibleConstructorArgumentValues, $objectType)
{
$constructorArguments = [];
$className = $this->objectManager->getClassNameByObjectName($objectType);
$constructorSignature = $this->getConstructorArgumentsForClass($className);
if (count($constr... | [
"protected",
"function",
"buildObject",
"(",
"array",
"&",
"$",
"possibleConstructorArgumentValues",
",",
"$",
"objectType",
")",
"{",
"$",
"constructorArguments",
"=",
"[",
"]",
";",
"$",
"className",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"getClassName... | Builds a new instance of $objectType with the given $possibleConstructorArgumentValues.
If constructor argument values are missing from the given array the method looks for a
default value in the constructor signature.
Furthermore, the constructor arguments are removed from $possibleConstructorArgumentValues
@param a... | [
"Builds",
"a",
"new",
"instance",
"of",
"$objectType",
"with",
"the",
"given",
"$possibleConstructorArgumentValues",
".",
"If",
"constructor",
"argument",
"values",
"are",
"missing",
"from",
"the",
"given",
"array",
"the",
"method",
"looks",
"for",
"a",
"default",... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php#L247-L270 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php | ObjectConverter.getConstructorArgumentsForClass | protected function getConstructorArgumentsForClass($className)
{
if (!isset($this->constructorReflectionFirstLevelCache[$className])) {
$constructorSignature = [];
// TODO: Check if we can get rid of this reflection service usage, directly reflecting doesn't work as the proxy class ... | php | protected function getConstructorArgumentsForClass($className)
{
if (!isset($this->constructorReflectionFirstLevelCache[$className])) {
$constructorSignature = [];
// TODO: Check if we can get rid of this reflection service usage, directly reflecting doesn't work as the proxy class ... | [
"protected",
"function",
"getConstructorArgumentsForClass",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"constructorReflectionFirstLevelCache",
"[",
"$",
"className",
"]",
")",
")",
"{",
"$",
"constructorSignature",
"=",
"["... | Get the constructor argument reflection for the given object type.
@param string $className
@return array<array> | [
"Get",
"the",
"constructor",
"argument",
"reflection",
"for",
"the",
"given",
"object",
"type",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/ObjectConverter.php#L278-L292 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setScheme | public function setScheme($scheme)
{
if (preg_match(self::PATTERN_MATCH_SCHEME, $scheme) === 1) {
$this->scheme = strtolower($scheme);
} else {
throw new \InvalidArgumentException('"' . $scheme . '" is not a valid scheme.', 1184071237);
}
} | php | public function setScheme($scheme)
{
if (preg_match(self::PATTERN_MATCH_SCHEME, $scheme) === 1) {
$this->scheme = strtolower($scheme);
} else {
throw new \InvalidArgumentException('"' . $scheme . '" is not a valid scheme.', 1184071237);
}
} | [
"public",
"function",
"setScheme",
"(",
"$",
"scheme",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_SCHEME",
",",
"$",
"scheme",
")",
"===",
"1",
")",
"{",
"$",
"this",
"->",
"scheme",
"=",
"strtolower",
"(",
"$",
"scheme",
")",... | Sets the URI's scheme / protocol
@param string $scheme The scheme. Allowed values are "http" and "https"
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withScheme
@see withScheme() | [
"Sets",
"the",
"URI",
"s",
"scheme",
"/",
"protocol"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L160-L167 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setUsername | public function setUsername($username)
{
if (preg_match(self::PATTERN_MATCH_USERNAME, $username) !== 1) {
throw new \InvalidArgumentException('"' . $username . '" is not a valid username.', 1184071238);
}
$this->username = $username;
} | php | public function setUsername($username)
{
if (preg_match(self::PATTERN_MATCH_USERNAME, $username) !== 1) {
throw new \InvalidArgumentException('"' . $username . '" is not a valid username.', 1184071238);
}
$this->username = $username;
} | [
"public",
"function",
"setUsername",
"(",
"$",
"username",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_USERNAME",
",",
"$",
"username",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
... | Sets the URI's username
@param string $username User name of the login
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withUserInfo instead
@see withUserInfo() | [
"Sets",
"the",
"URI",
"s",
"username"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L191-L198 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setPassword | public function setPassword($password)
{
if (preg_match(self::PATTERN_MATCH_PASSWORD, $password) !== 1) {
throw new \InvalidArgumentException('The specified password is not valid as part of a URI.', 1184071239);
}
$this->password = $password;
} | php | public function setPassword($password)
{
if (preg_match(self::PATTERN_MATCH_PASSWORD, $password) !== 1) {
throw new \InvalidArgumentException('The specified password is not valid as part of a URI.', 1184071239);
}
$this->password = $password;
} | [
"public",
"function",
"setPassword",
"(",
"$",
"password",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_PASSWORD",
",",
"$",
"password",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'The specified p... | Sets the URI's password
@param string $password Password of the login
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withUserInfo instead
@see withUserInfo() | [
"Sets",
"the",
"URI",
"s",
"password"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L222-L229 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setHost | public function setHost($host)
{
if (preg_match(self::PATTERN_MATCH_HOST, $host) !== 1) {
throw new \InvalidArgumentException('"' . $host . '" is not valid host as part of a URI.', 1184071240);
}
$this->host = $host;
} | php | public function setHost($host)
{
if (preg_match(self::PATTERN_MATCH_HOST, $host) !== 1) {
throw new \InvalidArgumentException('"' . $host . '" is not valid host as part of a URI.', 1184071240);
}
$this->host = $host;
} | [
"public",
"function",
"setHost",
"(",
"$",
"host",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_HOST",
",",
"$",
"host",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"host",
... | Sets the host(s) of the URI
@param string $host The hostname(s)
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withHost instead
@see withHost() | [
"Sets",
"the",
"host",
"(",
"s",
")",
"of",
"the",
"URI"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L251-L258 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setPort | public function setPort($port)
{
if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
}
$this->port = (integer)$port;
} | php | public function setPort($port)
{
if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
}
$this->port = (integer)$port;
} | [
"public",
"function",
"setPort",
"(",
"$",
"port",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_PORT",
",",
"$",
"port",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"port",
... | Sets the port in the URI
@param string $port The port number
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withPort instead
@see withPort() | [
"Sets",
"the",
"port",
"in",
"the",
"URI"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L280-L287 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setPath | public function setPath($path)
{
if (preg_match(self::PATTERN_MATCH_PATH, $path) !== 1) {
throw new \InvalidArgumentException('"' . $path . '" is not valid path as part of a URI.', 1184071242);
}
$this->path = $path;
} | php | public function setPath($path)
{
if (preg_match(self::PATTERN_MATCH_PATH, $path) !== 1) {
throw new \InvalidArgumentException('"' . $path . '" is not valid path as part of a URI.', 1184071242);
}
$this->path = $path;
} | [
"public",
"function",
"setPath",
"(",
"$",
"path",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_PATH",
",",
"$",
"path",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"path",
... | Sets the path of the URI
@param string $path The path
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withPath instead
@see withPath() | [
"Sets",
"the",
"path",
"of",
"the",
"URI"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L309-L316 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.getArguments | public function getArguments()
{
if ($this->arguments === null) {
$this->arguments = UriHelper::parseQueryIntoArguments($this);
}
return $this->arguments;
} | php | public function getArguments()
{
if ($this->arguments === null) {
$this->arguments = UriHelper::parseQueryIntoArguments($this);
}
return $this->arguments;
} | [
"public",
"function",
"getArguments",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"arguments",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"arguments",
"=",
"UriHelper",
"::",
"parseQueryIntoArguments",
"(",
"$",
"this",
")",
";",
"}",
"return",
"$",
... | Returns the arguments from the URI's query part
@return array Associative array of arguments and values of the URI's query part
@deprecated Since Flow 5.1, use UriHelper::parseQueryIntoArguments
@see UriHelper::parseQueryIntoArguments() | [
"Returns",
"the",
"arguments",
"from",
"the",
"URI",
"s",
"query",
"part"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L349-L355 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.setFragment | public function setFragment($fragment)
{
if (preg_match(self::PATTERN_MATCH_FRAGMENT, $fragment) !== 1) {
throw new \InvalidArgumentException('"' . $fragment . '" is not valid fragment as part of a URI.', 1184071252);
}
$this->fragment = $fragment;
} | php | public function setFragment($fragment)
{
if (preg_match(self::PATTERN_MATCH_FRAGMENT, $fragment) !== 1) {
throw new \InvalidArgumentException('"' . $fragment . '" is not valid fragment as part of a URI.', 1184071252);
}
$this->fragment = $fragment;
} | [
"public",
"function",
"setFragment",
"(",
"$",
"fragment",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_FRAGMENT",
",",
"$",
"fragment",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
... | Sets the fragment in the URI
@param string $fragment The fragment (aka "anchor")
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withFragment instead
@see withFragment() | [
"Sets",
"the",
"fragment",
"in",
"the",
"URI"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L377-L384 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.getAuthority | public function getAuthority()
{
$result = '';
$host = $this->getHostAndOptionalPort();
if (empty($host)) {
return $result;
}
$result = $host;
$userInfo = $this->getUserInfo();
if (empty($userInfo)) {
return $result;
}
... | php | public function getAuthority()
{
$result = '';
$host = $this->getHostAndOptionalPort();
if (empty($host)) {
return $result;
}
$result = $host;
$userInfo = $this->getUserInfo();
if (empty($userInfo)) {
return $result;
}
... | [
"public",
"function",
"getAuthority",
"(",
")",
"{",
"$",
"result",
"=",
"''",
";",
"$",
"host",
"=",
"$",
"this",
"->",
"getHostAndOptionalPort",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"host",
")",
")",
"{",
"return",
"$",
"result",
";",
"}"... | Retrieve the authority component of the URI.
If no authority information is present, this method MUST return an empty
string.
The authority syntax of the URI is:
<pre>
[user-info@]host[:port]
</pre>
If the port component is not set or is the standard port for the current
scheme, it SHOULD NOT be included.
@see htt... | [
"Retrieve",
"the",
"authority",
"component",
"of",
"the",
"URI",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L421-L438 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.getUserInfo | public function getUserInfo()
{
$result = '';
$username = $this->username;
if (empty($username)) {
return $result;
}
$result .= $username;
$password = $this->password;
if (empty($password)) {
return $result;
}
$resul... | php | public function getUserInfo()
{
$result = '';
$username = $this->username;
if (empty($username)) {
return $result;
}
$result .= $username;
$password = $this->password;
if (empty($password)) {
return $result;
}
$resul... | [
"public",
"function",
"getUserInfo",
"(",
")",
"{",
"$",
"result",
"=",
"''",
";",
"$",
"username",
"=",
"$",
"this",
"->",
"username",
";",
"if",
"(",
"empty",
"(",
"$",
"username",
")",
")",
"{",
"return",
"$",
"result",
";",
"}",
"$",
"result",
... | Retrieve the user information component of the URI.
If no user information is present, this method MUST return an empty
string.
If a user is present in the URI, this will return that value;
additionally, if the password is also present, it will be appended to the
user value, with a colon (":") separating the values.
... | [
"Retrieve",
"the",
"user",
"information",
"component",
"of",
"the",
"URI",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L456-L474 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.withScheme | public function withScheme($scheme)
{
if (preg_match(self::PATTERN_MATCH_SCHEME, $scheme) !== 1) {
throw new \InvalidArgumentException('"' . $scheme . '" is not a valid scheme.', 1184071237);
}
$newUri = clone $this;
$newUri->scheme = strtolower($scheme);
return ... | php | public function withScheme($scheme)
{
if (preg_match(self::PATTERN_MATCH_SCHEME, $scheme) !== 1) {
throw new \InvalidArgumentException('"' . $scheme . '" is not a valid scheme.', 1184071237);
}
$newUri = clone $this;
$newUri->scheme = strtolower($scheme);
return ... | [
"public",
"function",
"withScheme",
"(",
"$",
"scheme",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_SCHEME",
",",
"$",
"scheme",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
... | Return an instance with the specified scheme.
This method MUST retain the state of the current instance, and return
an instance that contains the specified scheme.
Implementations MUST support the schemes "http" and "https" case
insensitively, and MAY accommodate other schemes if required.
An empty scheme is equival... | [
"Return",
"an",
"instance",
"with",
"the",
"specified",
"scheme",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L492-L501 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.withUserInfo | public function withUserInfo($user, $password = null)
{
$newUri = clone $this;
$newUri->username = $user;
$newUri->password = $password;
return $newUri;
} | php | public function withUserInfo($user, $password = null)
{
$newUri = clone $this;
$newUri->username = $user;
$newUri->password = $password;
return $newUri;
} | [
"public",
"function",
"withUserInfo",
"(",
"$",
"user",
",",
"$",
"password",
"=",
"null",
")",
"{",
"$",
"newUri",
"=",
"clone",
"$",
"this",
";",
"$",
"newUri",
"->",
"username",
"=",
"$",
"user",
";",
"$",
"newUri",
"->",
"password",
"=",
"$",
"... | Return an instance with the specified user information.
This method MUST retain the state of the current instance, and return
an instance that contains the specified user information.
Password is optional, but the user information MUST include the
user; an empty string for the user is equivalent to removing user
info... | [
"Return",
"an",
"instance",
"with",
"the",
"specified",
"user",
"information",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L518-L524 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.withHost | public function withHost($host)
{
if (preg_match(self::PATTERN_MATCH_HOST, $host) !== 1) {
throw new \InvalidArgumentException('"' . $host . '" is not valid host as part of a URI.', 1184071240);
}
$newUri = clone $this;
$newUri->host = $host;
return $newUri;
} | php | public function withHost($host)
{
if (preg_match(self::PATTERN_MATCH_HOST, $host) !== 1) {
throw new \InvalidArgumentException('"' . $host . '" is not valid host as part of a URI.', 1184071240);
}
$newUri = clone $this;
$newUri->host = $host;
return $newUri;
} | [
"public",
"function",
"withHost",
"(",
"$",
"host",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_HOST",
",",
"$",
"host",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
"$",
"host",
... | Return an instance with the specified host.
This method MUST retain the state of the current instance, and return
an instance that contains the specified host.
An empty host value is equivalent to removing the host.
@param string $host The hostname to use with the new instance.
@return self A new instance with the s... | [
"Return",
"an",
"instance",
"with",
"the",
"specified",
"host",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L539-L547 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.withPort | public function withPort($port = null)
{
if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
}
$newUri = clone $this;
$newUri->port = ($port !== null ? (int... | php | public function withPort($port = null)
{
if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
}
$newUri = clone $this;
$newUri->port = ($port !== null ? (int... | [
"public",
"function",
"withPort",
"(",
"$",
"port",
"=",
"null",
")",
"{",
"if",
"(",
"preg_match",
"(",
"self",
"::",
"PATTERN_MATCH_PORT",
",",
"$",
"port",
")",
"!==",
"1",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'\"'",
".",
... | Return an instance with the specified port.
This method MUST retain the state of the current instance, and return
an instance that contains the specified port.
Implementations MUST raise an exception for ports outside the
established TCP and UDP port ranges.
A null value provided for the port is equivalent to removi... | [
"Return",
"an",
"instance",
"with",
"the",
"specified",
"port",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L567-L575 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Uri.php | Uri.withQuery | public function withQuery($query)
{
$newUri = clone $this;
$newUri->arguments = null;
$newUri->query = $query;
return $newUri;
} | php | public function withQuery($query)
{
$newUri = clone $this;
$newUri->arguments = null;
$newUri->query = $query;
return $newUri;
} | [
"public",
"function",
"withQuery",
"(",
"$",
"query",
")",
"{",
"$",
"newUri",
"=",
"clone",
"$",
"this",
";",
"$",
"newUri",
"->",
"arguments",
"=",
"null",
";",
"$",
"newUri",
"->",
"query",
"=",
"$",
"query",
";",
"return",
"$",
"newUri",
";",
"... | Return an instance with the specified query string.
This method MUST retain the state of the current instance, and return
an instance that contains the specified query string.
Users can provide both encoded and decoded query characters.
Implementations ensure the correct encoding as outlined in getQuery().
An empty ... | [
"Return",
"an",
"instance",
"with",
"the",
"specified",
"query",
"string",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Uri.php#L623-L629 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/MediaTypeConverter.php | MediaTypeConverter.convertFrom | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
$mediaType = null;
if ($configuration !== null) {
$mediaType = $configuration->getConfigurationValue(MediaTypeConverterInterface::class, ... | php | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
$mediaType = null;
if ($configuration !== null) {
$mediaType = $configuration->getConfigurationValue(MediaTypeConverterInterface::class, ... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"convertedChildProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"$",
"mediaType",
"=",
"null... | Convert the given $source to $targetType depending on the MediaTypeConverterInterface::CONFIGURATION_MEDIA_TYPE property mapping configuration
@param string $source the raw request body
@param string $targetType must be "array"
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface $config... | [
"Convert",
"the",
"given",
"$source",
"to",
"$targetType",
"depending",
"on",
"the",
"MediaTypeConverterInterface",
"::",
"CONFIGURATION_MEDIA_TYPE",
"property",
"mapping",
"configuration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/MediaTypeConverter.php#L56-L66 |
neos/flow-development-collection | Neos.Flow/Classes/Property/TypeConverter/MediaTypeConverter.php | MediaTypeConverter.convertMediaType | protected function convertMediaType($requestBody, $mediaType)
{
$mediaTypeParts = MediaTypes::parseMediaType($mediaType);
if (!isset($mediaTypeParts['subtype']) || $mediaTypeParts['subtype'] === '') {
return [];
}
$result = [];
switch ($mediaTypeParts['subtype']) ... | php | protected function convertMediaType($requestBody, $mediaType)
{
$mediaTypeParts = MediaTypes::parseMediaType($mediaType);
if (!isset($mediaTypeParts['subtype']) || $mediaTypeParts['subtype'] === '') {
return [];
}
$result = [];
switch ($mediaTypeParts['subtype']) ... | [
"protected",
"function",
"convertMediaType",
"(",
"$",
"requestBody",
",",
"$",
"mediaType",
")",
"{",
"$",
"mediaTypeParts",
"=",
"MediaTypes",
"::",
"parseMediaType",
"(",
"$",
"mediaType",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"mediaTypeParts",
"["... | Converts the given request body according to the specified media type
Override this method in your custom TypeConverter to support additional media types
@param string $requestBody the raw request body
@param string $mediaType the configured media type (for example "application/json")
@return array
@api | [
"Converts",
"the",
"given",
"request",
"body",
"according",
"to",
"the",
"specified",
"media",
"type",
"Override",
"this",
"method",
"in",
"your",
"custom",
"TypeConverter",
"to",
"support",
"additional",
"media",
"types"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/MediaTypeConverter.php#L77-L111 |
neos/flow-development-collection | Neos.Flow/Classes/Security/AccountFactory.php | AccountFactory.createAccountWithPassword | public function createAccountWithPassword($identifier, $password, $roleIdentifiers = [], $authenticationProviderName = 'DefaultProvider', $passwordHashingStrategy = 'default')
{
$account = new Account();
$account->setAccountIdentifier($identifier);
$account->setCredentialsSource($this->hashS... | php | public function createAccountWithPassword($identifier, $password, $roleIdentifiers = [], $authenticationProviderName = 'DefaultProvider', $passwordHashingStrategy = 'default')
{
$account = new Account();
$account->setAccountIdentifier($identifier);
$account->setCredentialsSource($this->hashS... | [
"public",
"function",
"createAccountWithPassword",
"(",
"$",
"identifier",
",",
"$",
"password",
",",
"$",
"roleIdentifiers",
"=",
"[",
"]",
",",
"$",
"authenticationProviderName",
"=",
"'DefaultProvider'",
",",
"$",
"passwordHashingStrategy",
"=",
"'default'",
")",... | Creates a new account and sets the given password and roles
@param string $identifier Identifier of the account, must be unique
@param string $password The clear text password
@param array $roleIdentifiers Optionally an array of role identifiers to assign to the new account
@param string $authenticationProviderName Op... | [
"Creates",
"a",
"new",
"account",
"and",
"sets",
"the",
"given",
"password",
"and",
"roles"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/AccountFactory.php#L45-L59 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Policy/RoleConverter.php | RoleConverter.convertFrom | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
try {
$role = $this->policyService->getRole($source);
} catch (NoSuchRoleException $exception) {
return new Error('Could not ... | php | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
try {
$role = $this->policyService->getRole($source);
} catch (NoSuchRoleException $exception) {
return new Error('Could not ... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"convertedChildProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"try",
"{",
"$",
"role",
"... | Convert an object from $source to an object.
@param mixed $source
@param string $targetType
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface $configuration
@return object the target type | [
"Convert",
"an",
"object",
"from",
"$source",
"to",
"an",
"object",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/RoleConverter.php#L57-L65 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Helper/UriHelper.php | UriHelper.getUsername | public static function getUsername(UriInterface $uri): string
{
$userInfo = explode(':', $uri->getUserInfo());
return (isset($userInfo[0]) ? $userInfo[0] : '');
} | php | public static function getUsername(UriInterface $uri): string
{
$userInfo = explode(':', $uri->getUserInfo());
return (isset($userInfo[0]) ? $userInfo[0] : '');
} | [
"public",
"static",
"function",
"getUsername",
"(",
"UriInterface",
"$",
"uri",
")",
":",
"string",
"{",
"$",
"userInfo",
"=",
"explode",
"(",
"':'",
",",
"$",
"uri",
"->",
"getUserInfo",
"(",
")",
")",
";",
"return",
"(",
"isset",
"(",
"$",
"userInfo"... | Get the username component of the given Uri
@param UriInterface $uri
@return string If the URI had no username an empty string is returned. | [
"Get",
"the",
"username",
"component",
"of",
"the",
"given",
"Uri"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UriHelper.php#L27-L31 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Helper/UriHelper.php | UriHelper.getPassword | public static function getPassword(UriInterface $uri): string
{
$userInfo = explode(':', $uri->getUserInfo());
return (isset($userInfo[1]) ? $userInfo[1] : '');
} | php | public static function getPassword(UriInterface $uri): string
{
$userInfo = explode(':', $uri->getUserInfo());
return (isset($userInfo[1]) ? $userInfo[1] : '');
} | [
"public",
"static",
"function",
"getPassword",
"(",
"UriInterface",
"$",
"uri",
")",
":",
"string",
"{",
"$",
"userInfo",
"=",
"explode",
"(",
"':'",
",",
"$",
"uri",
"->",
"getUserInfo",
"(",
")",
")",
";",
"return",
"(",
"isset",
"(",
"$",
"userInfo"... | Get the password component of the given Uri
@param UriInterface $uri
@return string If the URI had no password an empty string is returned. | [
"Get",
"the",
"password",
"component",
"of",
"the",
"given",
"Uri"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UriHelper.php#L39-L44 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Helper/UriHelper.php | UriHelper.getRelativePath | public static function getRelativePath(UriInterface $baseUri, UriInterface $uri): string
{
// FIXME: We should probably do a strpos === 0 instead to make sure the baseUri actually matches the start of the Uri.
$baseUriLength = strlen($baseUri->getPath());
if ($baseUriLength >= strlen($uri->g... | php | public static function getRelativePath(UriInterface $baseUri, UriInterface $uri): string
{
// FIXME: We should probably do a strpos === 0 instead to make sure the baseUri actually matches the start of the Uri.
$baseUriLength = strlen($baseUri->getPath());
if ($baseUriLength >= strlen($uri->g... | [
"public",
"static",
"function",
"getRelativePath",
"(",
"UriInterface",
"$",
"baseUri",
",",
"UriInterface",
"$",
"uri",
")",
":",
"string",
"{",
"// FIXME: We should probably do a strpos === 0 instead to make sure the baseUri actually matches the start of the Uri.",
"$",
"baseUr... | Returns the path relative to the $baseUri
@param UriInterface $baseUri The base URI to start from
@param UriInterface $uri The URI in quesiton
@return string | [
"Returns",
"the",
"path",
"relative",
"to",
"the",
"$baseUri"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/UriHelper.php#L53-L62 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.