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/Core/Booting/Scripts.php | Scripts.initializeProxyClasses | public static function initializeProxyClasses(Bootstrap $bootstrap)
{
$objectConfigurationCache = $bootstrap->getEarlyInstance(CacheManager::class)->getCache('Flow_Object_Configuration');
if ($objectConfigurationCache->has('allCompiledCodeUpToDate') === true) {
return;
}
... | php | public static function initializeProxyClasses(Bootstrap $bootstrap)
{
$objectConfigurationCache = $bootstrap->getEarlyInstance(CacheManager::class)->getCache('Flow_Object_Configuration');
if ($objectConfigurationCache->has('allCompiledCodeUpToDate') === true) {
return;
}
... | [
"public",
"static",
"function",
"initializeProxyClasses",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"objectConfigurationCache",
"=",
"$",
"bootstrap",
"->",
"getEarlyInstance",
"(",
"CacheManager",
"::",
"class",
")",
"->",
"getCache",
"(",
"'Flow_Object_Co... | Runs the compile step if necessary
@param Bootstrap $bootstrap
@return void
@throws FlowException | [
"Runs",
"the",
"compile",
"step",
"if",
"necessary"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L390-L430 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.initializeObjectManagerCompileTimeCreate | public static function initializeObjectManagerCompileTimeCreate(Bootstrap $bootstrap)
{
$objectManager = new CompileTimeObjectManager($bootstrap->getContext());
$bootstrap->setEarlyInstance(ObjectManagerInterface::class, $objectManager);
$signalSlotDispatcher = $bootstrap->getEarlyInstance(... | php | public static function initializeObjectManagerCompileTimeCreate(Bootstrap $bootstrap)
{
$objectManager = new CompileTimeObjectManager($bootstrap->getContext());
$bootstrap->setEarlyInstance(ObjectManagerInterface::class, $objectManager);
$signalSlotDispatcher = $bootstrap->getEarlyInstance(... | [
"public",
"static",
"function",
"initializeObjectManagerCompileTimeCreate",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"objectManager",
"=",
"new",
"CompileTimeObjectManager",
"(",
"$",
"bootstrap",
"->",
"getContext",
"(",
")",
")",
";",
"$",
"bootstrap",
... | Initializes the Compiletime Object Manager (phase 1)
@param Bootstrap $bootstrap | [
"Initializes",
"the",
"Compiletime",
"Object",
"Manager",
"(",
"phase",
"1",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L450-L463 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.initializeObjectManagerCompileTimeFinalize | public static function initializeObjectManagerCompileTimeFinalize(Bootstrap $bootstrap)
{
/** @var CompileTimeObjectManager $objectManager */
$objectManager = $bootstrap->getObjectManager();
$configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
$reflectio... | php | public static function initializeObjectManagerCompileTimeFinalize(Bootstrap $bootstrap)
{
/** @var CompileTimeObjectManager $objectManager */
$objectManager = $bootstrap->getObjectManager();
$configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
$reflectio... | [
"public",
"static",
"function",
"initializeObjectManagerCompileTimeFinalize",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"/** @var CompileTimeObjectManager $objectManager */",
"$",
"objectManager",
"=",
"$",
"bootstrap",
"->",
"getObjectManager",
"(",
")",
";",
"$",
"c... | Initializes the Compiletime Object Manager (phase 2)
@param Bootstrap $bootstrap
@return void | [
"Initializes",
"the",
"Compiletime",
"Object",
"Manager",
"(",
"phase",
"2",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L471-L493 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.initializeObjectManager | public static function initializeObjectManager(Bootstrap $bootstrap)
{
$configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
$objectConfigurationCache = $bootstrap->getEarlyInstance(CacheManager::class)->getCache('Flow_Object_Configuration');
$objectManager = ne... | php | public static function initializeObjectManager(Bootstrap $bootstrap)
{
$configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
$objectConfigurationCache = $bootstrap->getEarlyInstance(CacheManager::class)->getCache('Flow_Object_Configuration');
$objectManager = ne... | [
"public",
"static",
"function",
"initializeObjectManager",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"configurationManager",
"=",
"$",
"bootstrap",
"->",
"getEarlyInstance",
"(",
"ConfigurationManager",
"::",
"class",
")",
";",
"$",
"objectConfigurationCache"... | Initializes the runtime Object Manager
@param Bootstrap $bootstrap
@return void | [
"Initializes",
"the",
"runtime",
"Object",
"Manager"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L501-L520 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.initializeReflectionServiceFactory | public static function initializeReflectionServiceFactory(Bootstrap $bootstrap)
{
$reflectionServiceFactory = new ReflectionServiceFactory($bootstrap);
$bootstrap->setEarlyInstance(ReflectionServiceFactory::class, $reflectionServiceFactory);
$bootstrap->getObjectManager()->setInstance(Reflec... | php | public static function initializeReflectionServiceFactory(Bootstrap $bootstrap)
{
$reflectionServiceFactory = new ReflectionServiceFactory($bootstrap);
$bootstrap->setEarlyInstance(ReflectionServiceFactory::class, $reflectionServiceFactory);
$bootstrap->getObjectManager()->setInstance(Reflec... | [
"public",
"static",
"function",
"initializeReflectionServiceFactory",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"reflectionServiceFactory",
"=",
"new",
"ReflectionServiceFactory",
"(",
"$",
"bootstrap",
")",
";",
"$",
"bootstrap",
"->",
"setEarlyInstance",
"(... | Initializes the Reflection Service Factory
@param Bootstrap $bootstrap
@return void | [
"Initializes",
"the",
"Reflection",
"Service",
"Factory"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L528-L533 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.initializeReflectionService | public static function initializeReflectionService(Bootstrap $bootstrap)
{
$reflectionService = $bootstrap->getEarlyInstance(ReflectionServiceFactory::class)->create();
$bootstrap->setEarlyInstance(ReflectionService::class, $reflectionService);
$bootstrap->getObjectManager()->setInstance(Ref... | php | public static function initializeReflectionService(Bootstrap $bootstrap)
{
$reflectionService = $bootstrap->getEarlyInstance(ReflectionServiceFactory::class)->create();
$bootstrap->setEarlyInstance(ReflectionService::class, $reflectionService);
$bootstrap->getObjectManager()->setInstance(Ref... | [
"public",
"static",
"function",
"initializeReflectionService",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"reflectionService",
"=",
"$",
"bootstrap",
"->",
"getEarlyInstance",
"(",
"ReflectionServiceFactory",
"::",
"class",
")",
"->",
"create",
"(",
")",
"... | Initializes the Reflection Service
@param Bootstrap $bootstrap
@throws FlowException | [
"Initializes",
"the",
"Reflection",
"Service"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L541-L546 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.initializeSystemFileMonitor | public static function initializeSystemFileMonitor(Bootstrap $bootstrap)
{
/** @var FileMonitor[] $fileMonitors */
$fileMonitors = [
'Flow_ClassFiles' => FileMonitor::createFileMonitorAtBoot('Flow_ClassFiles', $bootstrap),
'Flow_ConfigurationFiles' => FileMonitor::createFileM... | php | public static function initializeSystemFileMonitor(Bootstrap $bootstrap)
{
/** @var FileMonitor[] $fileMonitors */
$fileMonitors = [
'Flow_ClassFiles' => FileMonitor::createFileMonitorAtBoot('Flow_ClassFiles', $bootstrap),
'Flow_ConfigurationFiles' => FileMonitor::createFileM... | [
"public",
"static",
"function",
"initializeSystemFileMonitor",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"/** @var FileMonitor[] $fileMonitors */",
"$",
"fileMonitors",
"=",
"[",
"'Flow_ClassFiles'",
"=>",
"FileMonitor",
"::",
"createFileMonitorAtBoot",
"(",
"'Flow_Clas... | Checks if classes (i.e. php files containing classes), Policy.yaml, Objects.yaml
or localization files have been altered and if so flushes the related caches.
This function only triggers the detection of changes in the file monitors.
The actual cache flushing is handled by other functions which are triggered
by the fi... | [
"Checks",
"if",
"classes",
"(",
"i",
".",
"e",
".",
"php",
"files",
"containing",
"classes",
")",
"Policy",
".",
"yaml",
"Objects",
".",
"yaml",
"or",
"localization",
"files",
"have",
"been",
"altered",
"and",
"if",
"so",
"flushes",
"the",
"related",
"ca... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L560-L603 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.monitorDirectoryIfItExists | protected static function monitorDirectoryIfItExists(FileMonitor $fileMonitor, string $path, string $filenamePattern = null)
{
if (is_dir($path)) {
$fileMonitor->monitorDirectory($path, $filenamePattern);
}
} | php | protected static function monitorDirectoryIfItExists(FileMonitor $fileMonitor, string $path, string $filenamePattern = null)
{
if (is_dir($path)) {
$fileMonitor->monitorDirectory($path, $filenamePattern);
}
} | [
"protected",
"static",
"function",
"monitorDirectoryIfItExists",
"(",
"FileMonitor",
"$",
"fileMonitor",
",",
"string",
"$",
"path",
",",
"string",
"$",
"filenamePattern",
"=",
"null",
")",
"{",
"if",
"(",
"is_dir",
"(",
"$",
"path",
")",
")",
"{",
"$",
"f... | Let the given file monitor track changes of the specified directory if it exists.
@param FileMonitor $fileMonitor
@param string $path
@param string $filenamePattern Optional pattern for filenames to consider for file monitoring (regular expression). @see FileMonitor::monitorDirectory()
@return void | [
"Let",
"the",
"given",
"file",
"monitor",
"track",
"changes",
"of",
"the",
"specified",
"directory",
"if",
"it",
"exists",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L631-L636 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.compileDoctrineProxies | protected static function compileDoctrineProxies(Bootstrap $bootstrap)
{
$cacheManager = $bootstrap->getEarlyInstance(CacheManager::class);
$objectConfigurationCache = $cacheManager->getCache('Flow_Object_Configuration');
$coreCache = $cacheManager->getCache('Flow_Core');
$configurat... | php | protected static function compileDoctrineProxies(Bootstrap $bootstrap)
{
$cacheManager = $bootstrap->getEarlyInstance(CacheManager::class);
$objectConfigurationCache = $cacheManager->getCache('Flow_Object_Configuration');
$coreCache = $cacheManager->getCache('Flow_Core');
$configurat... | [
"protected",
"static",
"function",
"compileDoctrineProxies",
"(",
"Bootstrap",
"$",
"bootstrap",
")",
"{",
"$",
"cacheManager",
"=",
"$",
"bootstrap",
"->",
"getEarlyInstance",
"(",
"CacheManager",
"::",
"class",
")",
";",
"$",
"objectConfigurationCache",
"=",
"$"... | Update Doctrine 2 proxy classes
This is not simply bound to the finishedCompilationRun signal because it
needs the advised proxy classes to run. When that signal is fired, they
have been written, but not loaded.
@param Bootstrap $bootstrap
@return void | [
"Update",
"Doctrine",
"2",
"proxy",
"classes"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L648-L664 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.executeCommand | public static function executeCommand(string $commandIdentifier, array $settings, bool $outputResults = true, array $commandArguments = []): bool
{
$command = self::buildSubprocessCommand($commandIdentifier, $settings, $commandArguments);
$output = [];
// Output errors in response
$c... | php | public static function executeCommand(string $commandIdentifier, array $settings, bool $outputResults = true, array $commandArguments = []): bool
{
$command = self::buildSubprocessCommand($commandIdentifier, $settings, $commandArguments);
$output = [];
// Output errors in response
$c... | [
"public",
"static",
"function",
"executeCommand",
"(",
"string",
"$",
"commandIdentifier",
",",
"array",
"$",
"settings",
",",
"bool",
"$",
"outputResults",
"=",
"true",
",",
"array",
"$",
"commandArguments",
"=",
"[",
"]",
")",
":",
"bool",
"{",
"$",
"com... | Executes the given command as a sub-request to the Flow CLI system.
@param string $commandIdentifier E.g. neos.flow:cache:flush
@param array $settings The Neos.Flow settings
@param boolean $outputResults if false the output of this command is only echoed if the execution was not successful
@param array $commandArgumen... | [
"Executes",
"the",
"given",
"command",
"as",
"a",
"sub",
"-",
"request",
"to",
"the",
"Flow",
"CLI",
"system",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L688-L724 |
neos/flow-development-collection | Neos.Flow/Classes/Core/Booting/Scripts.php | Scripts.executeCommandAsync | public static function executeCommandAsync(string $commandIdentifier, array $settings, array $commandArguments = [])
{
$command = self::buildSubprocessCommand($commandIdentifier, $settings, $commandArguments);
if (DIRECTORY_SEPARATOR === '/') {
exec($command . ' > /dev/null 2>/dev/null &... | php | public static function executeCommandAsync(string $commandIdentifier, array $settings, array $commandArguments = [])
{
$command = self::buildSubprocessCommand($commandIdentifier, $settings, $commandArguments);
if (DIRECTORY_SEPARATOR === '/') {
exec($command . ' > /dev/null 2>/dev/null &... | [
"public",
"static",
"function",
"executeCommandAsync",
"(",
"string",
"$",
"commandIdentifier",
",",
"array",
"$",
"settings",
",",
"array",
"$",
"commandArguments",
"=",
"[",
"]",
")",
"{",
"$",
"command",
"=",
"self",
"::",
"buildSubprocessCommand",
"(",
"$"... | Executes the given command as a sub-request to the Flow CLI system without waiting for the output.
Note: As the command execution is done in a separate thread potential exceptions or failures will *not* be reported
@param string $commandIdentifier E.g. neos.flow:cache:flush
@param array $settings The Neos.Flow settin... | [
"Executes",
"the",
"given",
"command",
"as",
"a",
"sub",
"-",
"request",
"to",
"the",
"Flow",
"CLI",
"system",
"without",
"waiting",
"for",
"the",
"output",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Core/Booting/Scripts.php#L737-L745 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Format/DateViewHelper.php | DateViewHelper.render | public function render()
{
$date = $this->arguments['date'];
$cldrFormat = $this->arguments['cldrFormat'];
if ($date === null) {
$date = $this->renderChildren();
if ($date === null) {
return '';
}
}
if (!$date instanceof \D... | php | public function render()
{
$date = $this->arguments['date'];
$cldrFormat = $this->arguments['cldrFormat'];
if ($date === null) {
$date = $this->renderChildren();
if ($date === null) {
return '';
}
}
if (!$date instanceof \D... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"date",
"=",
"$",
"this",
"->",
"arguments",
"[",
"'date'",
"]",
";",
"$",
"cldrFormat",
"=",
"$",
"this",
"->",
"arguments",
"[",
"'cldrFormat'",
"]",
";",
"if",
"(",
"$",
"date",
"===",
"null",
... | Render the supplied DateTime object as a formatted date.
@param mixed $date either a \DateTime object or a string that is accepted by \DateTime constructor
@param string $format Format String which is taken to format the Date/Time if none of the locale options are set.
@param string $localeFormatType Whether to format... | [
"Render",
"the",
"supplied",
"DateTime",
"object",
"as",
"a",
"formatted",
"date",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/DateViewHelper.php#L131-L166 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php | ProxyMethod.render | public function render()
{
$methodDocumentation = $this->buildMethodDocumentation($this->fullOriginalClassName, $this->methodName);
$methodParametersCode = ($this->methodParametersCode !== '' ? $this->methodParametersCode : $this->buildMethodParametersCode($this->fullOriginalClassName, $this->method... | php | public function render()
{
$methodDocumentation = $this->buildMethodDocumentation($this->fullOriginalClassName, $this->methodName);
$methodParametersCode = ($this->methodParametersCode !== '' ? $this->methodParametersCode : $this->buildMethodParametersCode($this->fullOriginalClassName, $this->method... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"methodDocumentation",
"=",
"$",
"this",
"->",
"buildMethodDocumentation",
"(",
"$",
"this",
"->",
"fullOriginalClassName",
",",
"$",
"this",
"->",
"methodName",
")",
";",
"$",
"methodParametersCode",
"=",
"(... | Renders the PHP code for this Proxy Method
@return string PHP code | [
"Renders",
"the",
"PHP",
"code",
"for",
"this",
"Proxy",
"Method"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php#L145-L191 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php | ProxyMethod.buildMethodDocumentation | protected function buildMethodDocumentation($className, $methodName)
{
$methodDocumentation = " /**\n * Autogenerated Proxy Method\n";
if ($this->reflectionService->hasMethod($className, $methodName)) {
$methodTags = $this->reflectionService->getMethodTagsValues($className, $meth... | php | protected function buildMethodDocumentation($className, $methodName)
{
$methodDocumentation = " /**\n * Autogenerated Proxy Method\n";
if ($this->reflectionService->hasMethod($className, $methodName)) {
$methodTags = $this->reflectionService->getMethodTagsValues($className, $meth... | [
"protected",
"function",
"buildMethodDocumentation",
"(",
"$",
"className",
",",
"$",
"methodName",
")",
"{",
"$",
"methodDocumentation",
"=",
"\" /**\\n * Autogenerated Proxy Method\\n\"",
";",
"if",
"(",
"$",
"this",
"->",
"reflectionService",
"->",
"hasMethod"... | Builds the method documentation block for the specified method keeping the vital annotations
@param string $className Name of the class the method is declared in
@param string $methodName Name of the method to create the parameters code for
@return string $methodDocumentation DocComment for the given method | [
"Builds",
"the",
"method",
"documentation",
"block",
"for",
"the",
"specified",
"method",
"keeping",
"the",
"vital",
"annotations"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php#L211-L237 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php | ProxyMethod.buildMethodParametersCode | public function buildMethodParametersCode($fullClassName, $methodName, $addTypeAndDefaultValue = true)
{
$methodParametersCode = '';
$methodParameterTypeName = '';
$nullableSign = '';
$defaultValue = '';
$byReferenceSign = '';
if ($fullClassName === null || $methodNa... | php | public function buildMethodParametersCode($fullClassName, $methodName, $addTypeAndDefaultValue = true)
{
$methodParametersCode = '';
$methodParameterTypeName = '';
$nullableSign = '';
$defaultValue = '';
$byReferenceSign = '';
if ($fullClassName === null || $methodNa... | [
"public",
"function",
"buildMethodParametersCode",
"(",
"$",
"fullClassName",
",",
"$",
"methodName",
",",
"$",
"addTypeAndDefaultValue",
"=",
"true",
")",
"{",
"$",
"methodParametersCode",
"=",
"''",
";",
"$",
"methodParameterTypeName",
"=",
"''",
";",
"$",
"nu... | Builds the PHP code for the parameters of the specified method to be
used in a method interceptor in the proxy class
@param string $fullClassName Name of the class the method is declared in
@param string $methodName Name of the method to create the parameters code for
@param boolean $addTypeAndDefaultValue If the type... | [
"Builds",
"the",
"PHP",
"code",
"for",
"the",
"parameters",
"of",
"the",
"specified",
"method",
"to",
"be",
"used",
"in",
"a",
"method",
"interceptor",
"in",
"the",
"proxy",
"class"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php#L248-L306 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php | ProxyMethod.buildCallParentMethodCode | protected function buildCallParentMethodCode($fullClassName, $methodName)
{
if (!$this->reflectionService->hasMethod($fullClassName, $methodName)) {
return '';
}
return 'parent::' . $methodName . '(' . $this->buildMethodParametersCode($fullClassName, $methodName, false) . ");\n";... | php | protected function buildCallParentMethodCode($fullClassName, $methodName)
{
if (!$this->reflectionService->hasMethod($fullClassName, $methodName)) {
return '';
}
return 'parent::' . $methodName . '(' . $this->buildMethodParametersCode($fullClassName, $methodName, false) . ");\n";... | [
"protected",
"function",
"buildCallParentMethodCode",
"(",
"$",
"fullClassName",
",",
"$",
"methodName",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"reflectionService",
"->",
"hasMethod",
"(",
"$",
"fullClassName",
",",
"$",
"methodName",
")",
")",
"{",
"r... | Builds PHP code which calls the original (ie. parent) method after the added code has been executed.
@param string $fullClassName Fully qualified name of the original class
@param string $methodName Name of the original method
@return string PHP code | [
"Builds",
"PHP",
"code",
"which",
"calls",
"the",
"original",
"(",
"ie",
".",
"parent",
")",
"method",
"after",
"the",
"added",
"code",
"has",
"been",
"executed",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php#L315-L321 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php | ProxyMethod.buildArraySetupCode | protected function buildArraySetupCode(array $array)
{
$code = 'array(';
foreach ($array as $key => $value) {
$code .= (is_string($key)) ? "'" . $key . "'" : $key;
$code .= ' => ';
if ($value === null) {
$code .= 'NULL';
} elseif (is_bo... | php | protected function buildArraySetupCode(array $array)
{
$code = 'array(';
foreach ($array as $key => $value) {
$code .= (is_string($key)) ? "'" . $key . "'" : $key;
$code .= ' => ';
if ($value === null) {
$code .= 'NULL';
} elseif (is_bo... | [
"protected",
"function",
"buildArraySetupCode",
"(",
"array",
"$",
"array",
")",
"{",
"$",
"code",
"=",
"'array('",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"code",
".=",
"(",
"is_string",
"(",
"$",
"key... | Builds a string containing PHP code to build the array given as input.
@param array $array
@return string e.g. 'array()' or 'array(1 => 'bar') | [
"Builds",
"a",
"string",
"containing",
"PHP",
"code",
"to",
"build",
"the",
"array",
"given",
"as",
"input",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php#L329-L347 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php | ProxyMethod.getMethodVisibilityString | protected function getMethodVisibilityString()
{
if ($this->reflectionService->isMethodProtected($this->fullOriginalClassName, $this->methodName)) {
return 'protected';
} elseif ($this->reflectionService->isMethodPrivate($this->fullOriginalClassName, $this->methodName)) {
ret... | php | protected function getMethodVisibilityString()
{
if ($this->reflectionService->isMethodProtected($this->fullOriginalClassName, $this->methodName)) {
return 'protected';
} elseif ($this->reflectionService->isMethodPrivate($this->fullOriginalClassName, $this->methodName)) {
ret... | [
"protected",
"function",
"getMethodVisibilityString",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"reflectionService",
"->",
"isMethodProtected",
"(",
"$",
"this",
"->",
"fullOriginalClassName",
",",
"$",
"this",
"->",
"methodName",
")",
")",
"{",
"return",
"... | Returns the method's visibility string found by the reflection service
Note: If the reflection service has no information about this method,
'public' is returned.
@return string One of 'public', 'protected' or 'private' | [
"Returns",
"the",
"method",
"s",
"visibility",
"string",
"found",
"by",
"the",
"reflection",
"service",
"Note",
":",
"If",
"the",
"reflection",
"service",
"has",
"no",
"information",
"about",
"this",
"method",
"public",
"is",
"returned",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyMethod.php#L356-L364 |
neos/flow-development-collection | Neos.Flow/Classes/Security/RequestPattern/Uri.php | Uri.matchRequest | public function matchRequest(RequestInterface $request)
{
if (!$request instanceof ActionRequest) {
return false;
}
if (!isset($this->options['uriPattern'])) {
throw new InvalidRequestPatternException('Missing option "uriPattern" in the Uri request pattern configurati... | php | public function matchRequest(RequestInterface $request)
{
if (!$request instanceof ActionRequest) {
return false;
}
if (!isset($this->options['uriPattern'])) {
throw new InvalidRequestPatternException('Missing option "uriPattern" in the Uri request pattern configurati... | [
"public",
"function",
"matchRequest",
"(",
"RequestInterface",
"$",
"request",
")",
"{",
"if",
"(",
"!",
"$",
"request",
"instanceof",
"ActionRequest",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"options",
"["... | Matches a \Neos\Flow\Mvc\RequestInterface against its set URL pattern rules
@param RequestInterface $request The request that should be matched
@return boolean true if the pattern matched, false otherwise
@throws InvalidRequestPatternException | [
"Matches",
"a",
"\\",
"Neos",
"\\",
"Flow",
"\\",
"Mvc",
"\\",
"RequestInterface",
"against",
"its",
"set",
"URL",
"pattern",
"rules"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/RequestPattern/Uri.php#L46-L55 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/StandardsComplianceComponent.php | StandardsComplianceComponent.handle | public function handle(ComponentContext $componentContext)
{
$response = $componentContext->getHttpResponse();
$response = ResponseInformationHelper::makeStandardsCompliant($response, $componentContext->getHttpRequest());
$componentContext->replaceHttpResponse($response);
} | php | public function handle(ComponentContext $componentContext)
{
$response = $componentContext->getHttpResponse();
$response = ResponseInformationHelper::makeStandardsCompliant($response, $componentContext->getHttpRequest());
$componentContext->replaceHttpResponse($response);
} | [
"public",
"function",
"handle",
"(",
"ComponentContext",
"$",
"componentContext",
")",
"{",
"$",
"response",
"=",
"$",
"componentContext",
"->",
"getHttpResponse",
"(",
")",
";",
"$",
"response",
"=",
"ResponseInformationHelper",
"::",
"makeStandardsCompliant",
"(",... | Just call makeStandardsCompliant on the Response for now
@param ComponentContext $componentContext
@return void | [
"Just",
"call",
"makeStandardsCompliant",
"on",
"the",
"Response",
"for",
"now"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/StandardsComplianceComponent.php#L41-L46 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Format/Base64DecodeViewHelper.php | Base64DecodeViewHelper.render | public function render()
{
$value = $this->arguments['value'];
if ($value === null) {
$value = $this->renderChildren();
}
if (!is_string($value) && !(is_object($value) && method_exists($value, '__toString'))) {
return $value;
}
return base64_d... | php | public function render()
{
$value = $this->arguments['value'];
if ($value === null) {
$value = $this->renderChildren();
}
if (!is_string($value) && !(is_object($value) && method_exists($value, '__toString'))) {
return $value;
}
return base64_d... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"arguments",
"[",
"'value'",
"]",
";",
"if",
"(",
"$",
"value",
"===",
"null",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"renderChildren",
"(",
")",
";",
"... | Converts all HTML entities to their applicable characters as needed using PHPs html_entity_decode() function.
@return string the altered string
@api | [
"Converts",
"all",
"HTML",
"entities",
"to",
"their",
"applicable",
"characters",
"as",
"needed",
"using",
"PHPs",
"html_entity_decode",
"()",
"function",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/Base64DecodeViewHelper.php#L72-L83 |
neos/flow-development-collection | Neos.Flow/Classes/Error/ProductionExceptionHandler.php | ProductionExceptionHandler.echoExceptionWeb | protected function echoExceptionWeb($exception)
{
$statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500;
$statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode);
$referenceCode = ($exception instanceof WithReferenceCodeInter... | php | protected function echoExceptionWeb($exception)
{
$statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500;
$statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode);
$referenceCode = ($exception instanceof WithReferenceCodeInter... | [
"protected",
"function",
"echoExceptionWeb",
"(",
"$",
"exception",
")",
"{",
"$",
"statusCode",
"=",
"(",
"$",
"exception",
"instanceof",
"WithHttpStatusInterface",
")",
"?",
"$",
"exception",
"->",
"getStatusCode",
"(",
")",
":",
"500",
";",
"$",
"statusMess... | Echoes an exception for the web.
@param \Throwable $exception
@return void | [
"Echoes",
"an",
"exception",
"for",
"the",
"web",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/ProductionExceptionHandler.php#L30-L53 |
neos/flow-development-collection | Neos.Flow/Classes/Error/ProductionExceptionHandler.php | ProductionExceptionHandler.renderStatically | protected function renderStatically(int $statusCode, ?string $referenceCode): string
{
$statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode);
$referenceCodeMessage = ($referenceCode !== null) ? '<p>When contacting the maintainer of this application please mention the follow... | php | protected function renderStatically(int $statusCode, ?string $referenceCode): string
{
$statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode);
$referenceCodeMessage = ($referenceCode !== null) ? '<p>When contacting the maintainer of this application please mention the follow... | [
"protected",
"function",
"renderStatically",
"(",
"int",
"$",
"statusCode",
",",
"?",
"string",
"$",
"referenceCode",
")",
":",
"string",
"{",
"$",
"statusMessage",
"=",
"ResponseInformationHelper",
"::",
"getStatusMessageByCode",
"(",
"$",
"statusCode",
")",
";",... | Returns the statically rendered exception message
@param integer $statusCode
@param string $referenceCode
@return string | [
"Returns",
"the",
"statically",
"rendered",
"exception",
"message"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/ProductionExceptionHandler.php#L62-L90 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/ActionResponse.php | ActionResponse.setContentType | public function setContentType(string $contentType): void
{
$this->contentType = $contentType;
// TODO: This can be removed after the full changes are done for next major.
$this->headers->set('Content-Type', $contentType, true);
} | php | public function setContentType(string $contentType): void
{
$this->contentType = $contentType;
// TODO: This can be removed after the full changes are done for next major.
$this->headers->set('Content-Type', $contentType, true);
} | [
"public",
"function",
"setContentType",
"(",
"string",
"$",
"contentType",
")",
":",
"void",
"{",
"$",
"this",
"->",
"contentType",
"=",
"$",
"contentType",
";",
"// TODO: This can be removed after the full changes are done for next major.",
"$",
"this",
"->",
"headers"... | Set content mime type for this response.
@param string $contentType
@return void
@api | [
"Set",
"content",
"mime",
"type",
"for",
"this",
"response",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/ActionResponse.php#L53-L58 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/ActionResponse.php | ActionResponse.setRedirectUri | public function setRedirectUri(UriInterface $uri, int $statusCode = 303): void
{
$this->redirectUri = $uri;
$this->statusCode = $statusCode;
// TODO: This can be removed after the full changes are done for next major.
$this->headers->set('Location', (string)$uri, true);
$this... | php | public function setRedirectUri(UriInterface $uri, int $statusCode = 303): void
{
$this->redirectUri = $uri;
$this->statusCode = $statusCode;
// TODO: This can be removed after the full changes are done for next major.
$this->headers->set('Location', (string)$uri, true);
$this... | [
"public",
"function",
"setRedirectUri",
"(",
"UriInterface",
"$",
"uri",
",",
"int",
"$",
"statusCode",
"=",
"303",
")",
":",
"void",
"{",
"$",
"this",
"->",
"redirectUri",
"=",
"$",
"uri",
";",
"$",
"this",
"->",
"statusCode",
"=",
"$",
"statusCode",
... | Set a redirect URI and according status for this response.
@param UriInterface $uri
@param int $statusCode
@return void
@api | [
"Set",
"a",
"redirect",
"URI",
"and",
"according",
"status",
"for",
"this",
"response",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/ActionResponse.php#L68-L75 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/ActionResponse.php | ActionResponse.setComponentParameter | public function setComponentParameter(string $componentClassName, string $parameterName, $value): void
{
if (!isset($this->componentParameters[$componentClassName])) {
$this->componentParameters[$componentClassName] = [];
}
$this->componentParameters[$componentClassName][$paramet... | php | public function setComponentParameter(string $componentClassName, string $parameterName, $value): void
{
if (!isset($this->componentParameters[$componentClassName])) {
$this->componentParameters[$componentClassName] = [];
}
$this->componentParameters[$componentClassName][$paramet... | [
"public",
"function",
"setComponentParameter",
"(",
"string",
"$",
"componentClassName",
",",
"string",
"$",
"parameterName",
",",
"$",
"value",
")",
":",
"void",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"componentParameters",
"[",
"$",
"compone... | Set a (HTTP) component parameter for use later in the chain.
This can be used to adjust all aspects of the later processing if needed.
@param string $componentClassName
@param string $parameterName
@param mixed $value
@return void
@api | [
"Set",
"a",
"(",
"HTTP",
")",
"component",
"parameter",
"for",
"use",
"later",
"in",
"the",
"chain",
".",
"This",
"can",
"be",
"used",
"to",
"adjust",
"all",
"aspects",
"of",
"the",
"later",
"processing",
"if",
"needed",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/ActionResponse.php#L100-L106 |
neos/flow-development-collection | Neos.Flow/Migrations/Mysql/Version20141015125841.php | Version20141015125841.postUp | public function postUp(Schema $schema)
{
if (!$this->sm->tablesExist(['typo3_flow_resource_resource'])) {
return;
}
$resourcesResult = $this->connection->executeQuery('SELECT persistence_object_identifier, sha1, filename FROM typo3_flow_resource_resource');
while ($resour... | php | public function postUp(Schema $schema)
{
if (!$this->sm->tablesExist(['typo3_flow_resource_resource'])) {
return;
}
$resourcesResult = $this->connection->executeQuery('SELECT persistence_object_identifier, sha1, filename FROM typo3_flow_resource_resource');
while ($resour... | [
"public",
"function",
"postUp",
"(",
"Schema",
"$",
"schema",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"sm",
"->",
"tablesExist",
"(",
"[",
"'typo3_flow_resource_resource'",
"]",
")",
")",
"{",
"return",
";",
"}",
"$",
"resourcesResult",
"=",
"$",
... | Move resource files to the new locations and adjust records.
@param Schema $schema
@return void | [
"Move",
"resource",
"files",
"to",
"the",
"new",
"locations",
"and",
"adjust",
"records",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Mysql/Version20141015125841.php#L41-L80 |
neos/flow-development-collection | Neos.Flow/Migrations/Mysql/Version20141015125841.php | Version20141015125841.postDown | public function postDown(Schema $schema)
{
if (!$this->sm->tablesExist(['typo3_flow_resource_resource'])) {
return;
}
$resourcesResult = $this->connection->executeQuery('SELECT DISTINCT resourcepointer FROM typo3_flow_resource_resource');
while ($resourceInfo = $resources... | php | public function postDown(Schema $schema)
{
if (!$this->sm->tablesExist(['typo3_flow_resource_resource'])) {
return;
}
$resourcesResult = $this->connection->executeQuery('SELECT DISTINCT resourcepointer FROM typo3_flow_resource_resource');
while ($resourceInfo = $resources... | [
"public",
"function",
"postDown",
"(",
"Schema",
"$",
"schema",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"sm",
"->",
"tablesExist",
"(",
"[",
"'typo3_flow_resource_resource'",
"]",
")",
")",
"{",
"return",
";",
"}",
"$",
"resourcesResult",
"=",
"$",
... | Move resource files back to the old locations and adjust records.
@param Schema $schema
@return void | [
"Move",
"resource",
"files",
"back",
"to",
"the",
"old",
"locations",
"and",
"adjust",
"records",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Mysql/Version20141015125841.php#L103-L130 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.withoutAuthorizationChecks | public function withoutAuthorizationChecks(\Closure $callback)
{
$authorizationChecksAreAlreadyDisabled = $this->authorizationChecksDisabled;
$this->authorizationChecksDisabled = true;
try {
/** @noinspection PhpUndefinedMethodInspection */
$callback->__invoke();
... | php | public function withoutAuthorizationChecks(\Closure $callback)
{
$authorizationChecksAreAlreadyDisabled = $this->authorizationChecksDisabled;
$this->authorizationChecksDisabled = true;
try {
/** @noinspection PhpUndefinedMethodInspection */
$callback->__invoke();
... | [
"public",
"function",
"withoutAuthorizationChecks",
"(",
"\\",
"Closure",
"$",
"callback",
")",
"{",
"$",
"authorizationChecksAreAlreadyDisabled",
"=",
"$",
"this",
"->",
"authorizationChecksDisabled",
";",
"$",
"this",
"->",
"authorizationChecksDisabled",
"=",
"true",
... | Lets you switch off authorization checks (CSRF token, policies, content security, ...) for the runtime of $callback
Usage:
$this->securityContext->withoutAuthorizationChecks(function () use ($accountRepository, $username, $providerName, &$account) {
// this will disable the PersistenceQueryRewritingAspect for this one... | [
"Lets",
"you",
"switch",
"off",
"authorization",
"checks",
"(",
"CSRF",
"token",
"policies",
"content",
"security",
"...",
")",
"for",
"the",
"runtime",
"of",
"$callback"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L212-L226 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.injectSettings | public function injectSettings(array $settings)
{
if (isset($settings['security']['authentication']['authenticationStrategy'])) {
$authenticationStrategyName = $settings['security']['authentication']['authenticationStrategy'];
switch ($authenticationStrategyName) {
ca... | php | public function injectSettings(array $settings)
{
if (isset($settings['security']['authentication']['authenticationStrategy'])) {
$authenticationStrategyName = $settings['security']['authentication']['authenticationStrategy'];
switch ($authenticationStrategyName) {
ca... | [
"public",
"function",
"injectSettings",
"(",
"array",
"$",
"settings",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"settings",
"[",
"'security'",
"]",
"[",
"'authentication'",
"]",
"[",
"'authenticationStrategy'",
"]",
")",
")",
"{",
"$",
"authenticationStrategyNa... | Injects the configuration settings
@param array $settings
@return void
@throws Exception | [
"Injects",
"the",
"configuration",
"settings"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L262-L300 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.initialize | public function initialize()
{
if ($this->initialized === true) {
return;
}
if ($this->canBeInitialized() === false) {
throw new Exception('The security Context cannot be initialized yet. Please check if it can be initialized with $securityContext->canBeInitialized() ... | php | public function initialize()
{
if ($this->initialized === true) {
return;
}
if ($this->canBeInitialized() === false) {
throw new Exception('The security Context cannot be initialized yet. Please check if it can be initialized with $securityContext->canBeInitialized() ... | [
"public",
"function",
"initialize",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"true",
")",
"{",
"return",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"canBeInitialized",
"(",
")",
"===",
"false",
")",
"{",
"throw",
"new",
"Except... | Initializes the security context for the given request.
@return void
@throws Exception | [
"Initializes",
"the",
"security",
"context",
"for",
"the",
"given",
"request",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L308-L324 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.getAuthenticationTokensOfType | public function getAuthenticationTokensOfType($className)
{
if ($this->initialized === false) {
$this->initialize();
}
$activeTokens = [];
foreach ($this->activeTokens as $token) {
if ($token instanceof $className) {
$activeTokens[] = $token;
... | php | public function getAuthenticationTokensOfType($className)
{
if ($this->initialized === false) {
$this->initialize();
}
$activeTokens = [];
foreach ($this->activeTokens as $token) {
if ($token instanceof $className) {
$activeTokens[] = $token;
... | [
"public",
"function",
"getAuthenticationTokensOfType",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"initialize",
"(",
")",
";",
"}",
"$",
"activeTokens",
"=",
"[",
"]",
";",
... | Returns all Authentication\Tokens of the security context which are
active for the current request and of the given type. If a token has a request pattern that cannot match
against the current request it is determined as not active.
@param string $className The class name
@return TokenInterface[] Array of set tokens o... | [
"Returns",
"all",
"Authentication",
"\\",
"Tokens",
"of",
"the",
"security",
"context",
"which",
"are",
"active",
"for",
"the",
"current",
"request",
"and",
"of",
"the",
"given",
"type",
".",
"If",
"a",
"token",
"has",
"a",
"request",
"pattern",
"that",
"c... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L372-L386 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.getRoles | public function getRoles()
{
if ($this->initialized === false) {
$this->initialize();
}
if ($this->roles !== null) {
return $this->roles;
}
$this->roles = ['Neos.Flow:Everybody' => $this->policyService->getRole('Neos.Flow:Everybody')];
$auth... | php | public function getRoles()
{
if ($this->initialized === false) {
$this->initialize();
}
if ($this->roles !== null) {
return $this->roles;
}
$this->roles = ['Neos.Flow:Everybody' => $this->policyService->getRole('Neos.Flow:Everybody')];
$auth... | [
"public",
"function",
"getRoles",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"initialize",
"(",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"roles",
"!==",
"null",
")",
"{",
"return",
... | Returns the roles of all authenticated accounts, including inherited roles.
If no authenticated roles could be found the "Anonymous" role is returned.
The "Neos.Flow:Everybody" roles is always returned.
@return Role[]
@throws Exception
@throws Exception\NoSuchRoleException | [
"Returns",
"the",
"roles",
"of",
"all",
"authenticated",
"accounts",
"including",
"inherited",
"roles",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L399-L433 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.hasRole | public function hasRole($roleIdentifier)
{
if ($roleIdentifier === 'Neos.Flow:Everybody') {
return true;
}
$roles = $this->getRoles();
return isset($roles[$roleIdentifier]);
} | php | public function hasRole($roleIdentifier)
{
if ($roleIdentifier === 'Neos.Flow:Everybody') {
return true;
}
$roles = $this->getRoles();
return isset($roles[$roleIdentifier]);
} | [
"public",
"function",
"hasRole",
"(",
"$",
"roleIdentifier",
")",
"{",
"if",
"(",
"$",
"roleIdentifier",
"===",
"'Neos.Flow:Everybody'",
")",
"{",
"return",
"true",
";",
"}",
"$",
"roles",
"=",
"$",
"this",
"->",
"getRoles",
"(",
")",
";",
"return",
"iss... | Returns true, if at least one of the currently authenticated accounts holds
a role with the given identifier, also recursively.
@param string $roleIdentifier The string representation of the role to search for
@return boolean true, if a role with the given string representation was found
@throws Exception
@throws Exce... | [
"Returns",
"true",
"if",
"at",
"least",
"one",
"of",
"the",
"currently",
"authenticated",
"accounts",
"holds",
"a",
"role",
"with",
"the",
"given",
"identifier",
"also",
"recursively",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L444-L452 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.getAccountByAuthenticationProviderName | public function getAccountByAuthenticationProviderName($authenticationProviderName)
{
if ($this->initialized === false) {
$this->initialize();
}
if (isset($this->activeTokens[$authenticationProviderName]) && $this->activeTokens[$authenticationProviderName]->isAuthenticated() ===... | php | public function getAccountByAuthenticationProviderName($authenticationProviderName)
{
if ($this->initialized === false) {
$this->initialize();
}
if (isset($this->activeTokens[$authenticationProviderName]) && $this->activeTokens[$authenticationProviderName]->isAuthenticated() ===... | [
"public",
"function",
"getAccountByAuthenticationProviderName",
"(",
"$",
"authenticationProviderName",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"initialize",
"(",
")",
";",
"}",
"if",
"(",
"isset",
... | Returns an authenticated account for the given provider or NULL if no
account was authenticated or no token was registered for the given
authentication provider name.
@param string $authenticationProviderName Authentication provider name of the account to find
@return Account The authenticated account | [
"Returns",
"an",
"authenticated",
"account",
"for",
"the",
"given",
"provider",
"or",
"NULL",
"if",
"no",
"account",
"was",
"authenticated",
"or",
"no",
"token",
"was",
"registered",
"for",
"the",
"given",
"authentication",
"provider",
"name",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L487-L497 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.getCsrfProtectionToken | public function getCsrfProtectionToken()
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$csrfProtectionTokens = $sessionDataContainer->getCsrfProtectionTokens();
if ($this->csrfProtectionStrategy === self::CSRF_ONE_PER_SESSION && count($csrfProtectionTokens... | php | public function getCsrfProtectionToken()
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$csrfProtectionTokens = $sessionDataContainer->getCsrfProtectionTokens();
if ($this->csrfProtectionStrategy === self::CSRF_ONE_PER_SESSION && count($csrfProtectionTokens... | [
"public",
"function",
"getCsrfProtectionToken",
"(",
")",
"{",
"$",
"sessionDataContainer",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"get",
"(",
"SessionDataContainer",
"::",
"class",
")",
";",
"$",
"csrfProtectionTokens",
"=",
"$",
"sessionDataContainer",
"... | Returns the current CSRF protection token. A new one is created when needed, depending on the configured CSRF
protection strategy.
@return string
@Flow\Session(autoStart=true) | [
"Returns",
"the",
"current",
"CSRF",
"protection",
"token",
".",
"A",
"new",
"one",
"is",
"created",
"when",
"needed",
"depending",
"on",
"the",
"configured",
"CSRF",
"protection",
"strategy",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L506-L530 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.hasCsrfProtectionTokens | public function hasCsrfProtectionTokens()
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$csrfProtectionTokens = $sessionDataContainer->getCsrfProtectionTokens();
return count($csrfProtectionTokens) > 0;
} | php | public function hasCsrfProtectionTokens()
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$csrfProtectionTokens = $sessionDataContainer->getCsrfProtectionTokens();
return count($csrfProtectionTokens) > 0;
} | [
"public",
"function",
"hasCsrfProtectionTokens",
"(",
")",
"{",
"$",
"sessionDataContainer",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"get",
"(",
"SessionDataContainer",
"::",
"class",
")",
";",
"$",
"csrfProtectionTokens",
"=",
"$",
"sessionDataContainer",
... | Returns true if the context has CSRF protection tokens.
@return boolean true, if the token is valid. false otherwise. | [
"Returns",
"true",
"if",
"the",
"context",
"has",
"CSRF",
"protection",
"tokens",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L537-L542 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.isCsrfProtectionTokenValid | public function isCsrfProtectionTokenValid($csrfToken)
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$csrfProtectionTokens = $sessionDataContainer->getCsrfProtectionTokens();
if (!isset($csrfProtectionTokens[$csrfToken]) && !isset($this->csrfTokensRemoved... | php | public function isCsrfProtectionTokenValid($csrfToken)
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$csrfProtectionTokens = $sessionDataContainer->getCsrfProtectionTokens();
if (!isset($csrfProtectionTokens[$csrfToken]) && !isset($this->csrfTokensRemoved... | [
"public",
"function",
"isCsrfProtectionTokenValid",
"(",
"$",
"csrfToken",
")",
"{",
"$",
"sessionDataContainer",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"get",
"(",
"SessionDataContainer",
"::",
"class",
")",
";",
"$",
"csrfProtectionTokens",
"=",
"$",
"... | Returns true if the given string is a valid CSRF protection token. The token will be removed if the configured
csrf strategy is 'onePerUri'.
@param string $csrfToken The token string to be validated
@return boolean true, if the token is valid. false otherwise.
@throws Exception | [
"Returns",
"true",
"if",
"the",
"given",
"string",
"is",
"a",
"valid",
"CSRF",
"protection",
"token",
".",
"The",
"token",
"will",
"be",
"removed",
"if",
"the",
"configured",
"csrf",
"strategy",
"is",
"onePerUri",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L552-L572 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.setInterceptedRequest | public function setInterceptedRequest(ActionRequest $interceptedRequest = null)
{
if ($this->initialized === false) {
$this->initialize();
}
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$sessionDataContainer->setInterceptedRequest($inte... | php | public function setInterceptedRequest(ActionRequest $interceptedRequest = null)
{
if ($this->initialized === false) {
$this->initialize();
}
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$sessionDataContainer->setInterceptedRequest($inte... | [
"public",
"function",
"setInterceptedRequest",
"(",
"ActionRequest",
"$",
"interceptedRequest",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"initialize",
"(",
")",
";",
"}",
"$",
"session... | Sets an action request, to be stored for later resuming after it
has been intercepted by a security exception.
@param ActionRequest $interceptedRequest
@return void
@Flow\Session(autoStart=true) | [
"Sets",
"an",
"action",
"request",
"to",
"be",
"stored",
"for",
"later",
"resuming",
"after",
"it",
"has",
"been",
"intercepted",
"by",
"a",
"security",
"exception",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L582-L590 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.getInterceptedRequest | public function getInterceptedRequest()
{
if ($this->initialized === false) {
$this->initialize();
}
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
return $sessionDataContainer->getInterceptedRequest();
} | php | public function getInterceptedRequest()
{
if ($this->initialized === false) {
$this->initialize();
}
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
return $sessionDataContainer->getInterceptedRequest();
} | [
"public",
"function",
"getInterceptedRequest",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"initialize",
"(",
")",
";",
"}",
"$",
"sessionDataContainer",
"=",
"$",
"this",
"->",
"objectManager",
... | Returns the request, that has been stored for later resuming after it
has been intercepted by a security exception, NULL if there is none.
@return ActionRequest|null
TODO: Revisit type (ActionRequest / HTTP request) | [
"Returns",
"the",
"request",
"that",
"has",
"been",
"stored",
"for",
"later",
"resuming",
"after",
"it",
"has",
"been",
"intercepted",
"by",
"a",
"security",
"exception",
"NULL",
"if",
"there",
"is",
"none",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L599-L607 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.clearContext | public function clearContext()
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$sessionDataContainer->reset();
$this->roles = null;
$this->contextHash = null;
$this->activeTokens = [];
$this->inactiveTokens = [];
$this->reque... | php | public function clearContext()
{
$sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
$sessionDataContainer->reset();
$this->roles = null;
$this->contextHash = null;
$this->activeTokens = [];
$this->inactiveTokens = [];
$this->reque... | [
"public",
"function",
"clearContext",
"(",
")",
"{",
"$",
"sessionDataContainer",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"get",
"(",
"SessionDataContainer",
"::",
"class",
")",
";",
"$",
"sessionDataContainer",
"->",
"reset",
"(",
")",
";",
"$",
"thi... | Clears the security context.
@return void | [
"Clears",
"the",
"security",
"context",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L614-L626 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.separateActiveAndInactiveTokens | protected function separateActiveAndInactiveTokens(array $tokens)
{
if ($this->request === null) {
return;
}
/** @var $token TokenInterface */
foreach ($tokens as $token) {
if ($this->isTokenActive($token)) {
$this->activeTokens[$token->getAut... | php | protected function separateActiveAndInactiveTokens(array $tokens)
{
if ($this->request === null) {
return;
}
/** @var $token TokenInterface */
foreach ($tokens as $token) {
if ($this->isTokenActive($token)) {
$this->activeTokens[$token->getAut... | [
"protected",
"function",
"separateActiveAndInactiveTokens",
"(",
"array",
"$",
"tokens",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"request",
"===",
"null",
")",
"{",
"return",
";",
"}",
"/** @var $token TokenInterface */",
"foreach",
"(",
"$",
"tokens",
"as",
"... | Stores all active tokens in $this->activeTokens, all others in $this->inactiveTokens
@param TokenInterface[] $tokens
@return void | [
"Stores",
"all",
"active",
"tokens",
"in",
"$this",
"-",
">",
"activeTokens",
"all",
"others",
"in",
"$this",
"-",
">",
"inactiveTokens"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L664-L678 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.isTokenActive | protected function isTokenActive(TokenInterface $token)
{
if (!$token->hasRequestPatterns()) {
return true;
}
$requestPatternsByType = [];
/** @var $requestPattern RequestPatternInterface */
foreach ($token->getRequestPatterns() as $requestPattern) {
$... | php | protected function isTokenActive(TokenInterface $token)
{
if (!$token->hasRequestPatterns()) {
return true;
}
$requestPatternsByType = [];
/** @var $requestPattern RequestPatternInterface */
foreach ($token->getRequestPatterns() as $requestPattern) {
$... | [
"protected",
"function",
"isTokenActive",
"(",
"TokenInterface",
"$",
"token",
")",
"{",
"if",
"(",
"!",
"$",
"token",
"->",
"hasRequestPatterns",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"$",
"requestPatternsByType",
"=",
"[",
"]",
";",
"/** @var $... | Evaluates any RequestPatterns of the given token to determine whether it is active for the current request
- If no RequestPattern is configured for this token, it is active
- Otherwise it is active only if at least one configured RequestPattern per type matches the request
@param TokenInterface $token
@return bool tru... | [
"Evaluates",
"any",
"RequestPatterns",
"of",
"the",
"given",
"token",
"to",
"determine",
"whether",
"it",
"is",
"active",
"for",
"the",
"current",
"request",
"-",
"If",
"no",
"RequestPattern",
"is",
"configured",
"for",
"this",
"token",
"it",
"is",
"active",
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L688-L703 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.mergeTokens | protected function mergeTokens($managerTokens, $sessionTokens)
{
$resultTokens = [];
if (!is_array($managerTokens)) {
return $resultTokens;
}
$sessionTokens = $sessionTokens ?? [];
/** @var $managerToken TokenInterface */
foreach ($managerTokens as $man... | php | protected function mergeTokens($managerTokens, $sessionTokens)
{
$resultTokens = [];
if (!is_array($managerTokens)) {
return $resultTokens;
}
$sessionTokens = $sessionTokens ?? [];
/** @var $managerToken TokenInterface */
foreach ($managerTokens as $man... | [
"protected",
"function",
"mergeTokens",
"(",
"$",
"managerTokens",
",",
"$",
"sessionTokens",
")",
"{",
"$",
"resultTokens",
"=",
"[",
"]",
";",
"if",
"(",
"!",
"is_array",
"(",
"$",
"managerTokens",
")",
")",
"{",
"return",
"$",
"resultTokens",
";",
"}"... | Merges the session and manager tokens. All manager tokens types will be in the result array
If a specific type is found in the session this token replaces the one (of the same type)
given by the manager.
@param array $managerTokens Array of tokens provided by the authentication manager
@param array $sessionTokens Arra... | [
"Merges",
"the",
"session",
"and",
"manager",
"tokens",
".",
"All",
"manager",
"tokens",
"types",
"will",
"be",
"in",
"the",
"result",
"array",
"If",
"a",
"specific",
"type",
"is",
"found",
"in",
"the",
"session",
"this",
"token",
"replaces",
"the",
"one",... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L714-L730 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.findBestMatchingToken | protected function findBestMatchingToken(TokenInterface $managerToken, array $sessionTokens): TokenInterface
{
$matchingSessionTokens = array_filter($sessionTokens, function (TokenInterface $sessionToken) use ($managerToken) {
return ($sessionToken->getAuthenticationProviderName() === $managerTo... | php | protected function findBestMatchingToken(TokenInterface $managerToken, array $sessionTokens): TokenInterface
{
$matchingSessionTokens = array_filter($sessionTokens, function (TokenInterface $sessionToken) use ($managerToken) {
return ($sessionToken->getAuthenticationProviderName() === $managerTo... | [
"protected",
"function",
"findBestMatchingToken",
"(",
"TokenInterface",
"$",
"managerToken",
",",
"array",
"$",
"sessionTokens",
")",
":",
"TokenInterface",
"{",
"$",
"matchingSessionTokens",
"=",
"array_filter",
"(",
"$",
"sessionTokens",
",",
"function",
"(",
"To... | Tries to find a token matchting the given manager token in the session tokens, will return that or the manager token.
@param TokenInterface $managerToken
@param TokenInterface[] $sessionTokens
@return TokenInterface
@throws \Neos\Flow\Session\Exception\SessionNotStartedException | [
"Tries",
"to",
"find",
"a",
"token",
"matchting",
"the",
"given",
"manager",
"token",
"in",
"the",
"session",
"tokens",
"will",
"return",
"that",
"or",
"the",
"manager",
"token",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L740-L764 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.updateTokens | protected function updateTokens(array $tokens)
{
$this->roles = null;
$this->contextHash = null;
if ($this->request === null) {
return;
}
/** @var $token TokenInterface */
foreach ($tokens as $token) {
$token->updateCredentials($this->request... | php | protected function updateTokens(array $tokens)
{
$this->roles = null;
$this->contextHash = null;
if ($this->request === null) {
return;
}
/** @var $token TokenInterface */
foreach ($tokens as $token) {
$token->updateCredentials($this->request... | [
"protected",
"function",
"updateTokens",
"(",
"array",
"$",
"tokens",
")",
"{",
"$",
"this",
"->",
"roles",
"=",
"null",
";",
"$",
"this",
"->",
"contextHash",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"request",
"===",
"null",
")",
"{",
"retur... | Updates the token credentials for all tokens in the given array.
@param array $tokens Array of authentication tokens the credentials should be updated for
@return void | [
"Updates",
"the",
"token",
"credentials",
"for",
"all",
"tokens",
"in",
"the",
"given",
"array",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L772-L788 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.refreshTokens | public function refreshTokens()
{
if ($this->initialized === false) {
$this->initialize();
}
$this->updateTokens($this->activeTokens);
} | php | public function refreshTokens()
{
if ($this->initialized === false) {
$this->initialize();
}
$this->updateTokens($this->activeTokens);
} | [
"public",
"function",
"refreshTokens",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"initialize",
"(",
")",
";",
"}",
"$",
"this",
"->",
"updateTokens",
"(",
"$",
"this",
"->",
"activeTokens",... | Refreshes all active tokens by updating the credentials.
This is useful when doing an explicit authentication inside a request.
@return void | [
"Refreshes",
"all",
"active",
"tokens",
"by",
"updating",
"the",
"credentials",
".",
"This",
"is",
"useful",
"when",
"doing",
"an",
"explicit",
"authentication",
"inside",
"a",
"request",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L796-L803 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.getContextHash | public function getContextHash()
{
if ($this->areAuthorizationChecksDisabled()) {
return self::CONTEXT_HASH_UNINITIALIZED;
}
if (!$this->isInitialized()) {
if (!$this->canBeInitialized()) {
return self::CONTEXT_HASH_UNINITIALIZED;
}
... | php | public function getContextHash()
{
if ($this->areAuthorizationChecksDisabled()) {
return self::CONTEXT_HASH_UNINITIALIZED;
}
if (!$this->isInitialized()) {
if (!$this->canBeInitialized()) {
return self::CONTEXT_HASH_UNINITIALIZED;
}
... | [
"public",
"function",
"getContextHash",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"areAuthorizationChecksDisabled",
"(",
")",
")",
"{",
"return",
"self",
"::",
"CONTEXT_HASH_UNINITIALIZED",
";",
"}",
"if",
"(",
"!",
"$",
"this",
"->",
"isInitialized",
"("... | Returns a hash that is unique for the current context, depending on hash components, @see setContextHashComponent()
@return string | [
"Returns",
"a",
"hash",
"that",
"is",
"unique",
"for",
"the",
"current",
"context",
"depending",
"on",
"hash",
"components",
"@see",
"setContextHashComponent",
"()"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L839-L869 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Context.php | Context.destroySessionsForAccount | public function destroySessionsForAccount(Account $account, string $reason = ''): void
{
$this->sessionManager->destroySessionsByTag($this->getSessionTagForAccount($account), $reason);
} | php | public function destroySessionsForAccount(Account $account, string $reason = ''): void
{
$this->sessionManager->destroySessionsByTag($this->getSessionTagForAccount($account), $reason);
} | [
"public",
"function",
"destroySessionsForAccount",
"(",
"Account",
"$",
"account",
",",
"string",
"$",
"reason",
"=",
"''",
")",
":",
"void",
"{",
"$",
"this",
"->",
"sessionManager",
"->",
"destroySessionsByTag",
"(",
"$",
"this",
"->",
"getSessionTagForAccount... | destroys all sessions belonging to the given $account
@param Account $account
@param string $reason
@return void | [
"destroys",
"all",
"sessions",
"belonging",
"to",
"the",
"given",
"$account"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Context.php#L889-L892 |
neos/flow-development-collection | Neos.Flow/Classes/Validation/Validator/FloatValidator.php | FloatValidator.isValid | protected function isValid($value)
{
if (is_float($value)) {
return;
}
if (!is_string($value) || strpos($value, '.') === false || preg_match('/^[0-9.e+-]+$/', $value) !== 1) {
$this->addError('A valid float number is expected.', 1221560288);
}
} | php | protected function isValid($value)
{
if (is_float($value)) {
return;
}
if (!is_string($value) || strpos($value, '.') === false || preg_match('/^[0-9.e+-]+$/', $value) !== 1) {
$this->addError('A valid float number is expected.', 1221560288);
}
} | [
"protected",
"function",
"isValid",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"is_float",
"(",
"$",
"value",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"value",
")",
"||",
"strpos",
"(",
"$",
"value",
",",
"'.'",
")",... | The given value is valid if it is of type float or a string matching the regular expression [0-9.e+-]
@param mixed $value The value that should be validated
@return void
@api | [
"The",
"given",
"value",
"is",
"valid",
"if",
"it",
"is",
"of",
"type",
"float",
"or",
"a",
"string",
"matching",
"the",
"regular",
"expression",
"[",
"0",
"-",
"9",
".",
"e",
"+",
"-",
"]"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/FloatValidator.php#L31-L39 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php | AbstractTagBasedViewHelper.initialize | public function initialize()
{
parent::initialize();
$this->tag->reset();
$this->tag->setTagName($this->tagName);
if ($this->hasArgument('additionalAttributes') && is_array($this->arguments['additionalAttributes'])) {
$this->tag->addAttributes($this->arguments['additional... | php | public function initialize()
{
parent::initialize();
$this->tag->reset();
$this->tag->setTagName($this->tagName);
if ($this->hasArgument('additionalAttributes') && is_array($this->arguments['additionalAttributes'])) {
$this->tag->addAttributes($this->arguments['additional... | [
"public",
"function",
"initialize",
"(",
")",
"{",
"parent",
"::",
"initialize",
"(",
")",
";",
"$",
"this",
"->",
"tag",
"->",
"reset",
"(",
")",
";",
"$",
"this",
"->",
"tag",
"->",
"setTagName",
"(",
"$",
"this",
"->",
"tagName",
")",
";",
"if",... | Sets the tag name to $this->tagName.
Additionally, sets all tag attributes which were registered in
$this->tagAttributes and additionalArguments.
Will be invoked just before the render method.
@return void
@api | [
"Sets",
"the",
"tag",
"name",
"to",
"$this",
"-",
">",
"tagName",
".",
"Additionally",
"sets",
"all",
"tag",
"attributes",
"which",
"were",
"registered",
"in",
"$this",
"-",
">",
"tagAttributes",
"and",
"additionalArguments",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php#L87-L113 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php | AbstractTagBasedViewHelper.registerUniversalTagAttributes | protected function registerUniversalTagAttributes()
{
$this->registerTagAttribute('class', 'string', 'CSS class(es) for this element');
$this->registerTagAttribute('dir', 'string', 'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)');
$this->... | php | protected function registerUniversalTagAttributes()
{
$this->registerTagAttribute('class', 'string', 'CSS class(es) for this element');
$this->registerTagAttribute('dir', 'string', 'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)');
$this->... | [
"protected",
"function",
"registerUniversalTagAttributes",
"(",
")",
"{",
"$",
"this",
"->",
"registerTagAttribute",
"(",
"'class'",
",",
"'string'",
",",
"'CSS class(es) for this element'",
")",
";",
"$",
"this",
"->",
"registerTagAttribute",
"(",
"'dir'",
",",
"'s... | Registers all standard HTML universal attributes.
Should be used inside registerArguments();
@return void
@api | [
"Registers",
"all",
"standard",
"HTML",
"universal",
"attributes",
".",
"Should",
"be",
"used",
"inside",
"registerArguments",
"()",
";"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php#L139-L150 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php | AbstractTagBasedViewHelper.handleAdditionalArguments | public function handleAdditionalArguments(array $arguments)
{
$unassigned = [];
foreach ($arguments as $argumentName => $argumentValue) {
if (strpos($argumentName, 'data-') === 0) {
$this->tag->addAttribute($argumentName, $argumentValue);
} else {
... | php | public function handleAdditionalArguments(array $arguments)
{
$unassigned = [];
foreach ($arguments as $argumentName => $argumentValue) {
if (strpos($argumentName, 'data-') === 0) {
$this->tag->addAttribute($argumentName, $argumentValue);
} else {
... | [
"public",
"function",
"handleAdditionalArguments",
"(",
"array",
"$",
"arguments",
")",
"{",
"$",
"unassigned",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"arguments",
"as",
"$",
"argumentName",
"=>",
"$",
"argumentValue",
")",
"{",
"if",
"(",
"strpos",
"(",... | Handles additional arguments, sorting out any data-
prefixed tag attributes and assigning them. Then passes
the unassigned arguments to the parent class' method,
which in the default implementation will throw an error
about "undeclared argument used".
@param array $arguments
@return void | [
"Handles",
"additional",
"arguments",
"sorting",
"out",
"any",
"data",
"-",
"prefixed",
"tag",
"attributes",
"and",
"assigning",
"them",
".",
"Then",
"passes",
"the",
"unassigned",
"arguments",
"to",
"the",
"parent",
"class",
"method",
"which",
"in",
"the",
"d... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php#L162-L173 |
neos/flow-development-collection | Neos.Flow/Migrations/Postgresql/Version20130319131500.php | Version20130319131500.migrateAccountRolesUp | protected function migrateAccountRolesUp()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account'])) {
return;
}
$rolesSql = array();
$accountRolesSql = array();
$rolesToMigrate = array();
$accountsResult = $this->connection->executeQuery('SELECT DI... | php | protected function migrateAccountRolesUp()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account'])) {
return;
}
$rolesSql = array();
$accountRolesSql = array();
$rolesToMigrate = array();
$accountsResult = $this->connection->executeQuery('SELECT DI... | [
"protected",
"function",
"migrateAccountRolesUp",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"sm",
"->",
"tablesExist",
"(",
"[",
"'typo3_flow_security_account'",
"]",
")",
")",
"{",
"return",
";",
"}",
"$",
"rolesSql",
"=",
"array",
"(",
")",
";"... | Generate SQL statements to migrate accounts up to referenced roles.
@return void | [
"Generate",
"SQL",
"statements",
"to",
"migrate",
"accounts",
"up",
"to",
"referenced",
"roles",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Postgresql/Version20130319131500.php#L66-L102 |
neos/flow-development-collection | Neos.Flow/Migrations/Postgresql/Version20130319131500.php | Version20130319131500.migrateAccountRolesDown | protected function migrateAccountRolesDown()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account_roles_join', 'typo3_flow_security_policy_role'])) {
return;
}
$accountsWithRoles = array();
$accountRolesResult = $this->connection->executeQuery('SELECT j.flow_secur... | php | protected function migrateAccountRolesDown()
{
if (!$this->sm->tablesExist(['typo3_flow_security_account_roles_join', 'typo3_flow_security_policy_role'])) {
return;
}
$accountsWithRoles = array();
$accountRolesResult = $this->connection->executeQuery('SELECT j.flow_secur... | [
"protected",
"function",
"migrateAccountRolesDown",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"sm",
"->",
"tablesExist",
"(",
"[",
"'typo3_flow_security_account_roles_join'",
",",
"'typo3_flow_security_policy_role'",
"]",
")",
")",
"{",
"return",
";",
"}",... | Generate SQL statements to migrate accounts down to embedded roles.
@return void | [
"Generate",
"SQL",
"statements",
"to",
"migrate",
"accounts",
"down",
"to",
"embedded",
"roles",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Postgresql/Version20130319131500.php#L109-L126 |
neos/flow-development-collection | Neos.Flow/Migrations/Postgresql/Version20130319131500.php | Version20130319131500.getRoleIdentifierMap | protected function getRoleIdentifierMap(array $map)
{
$rolesFromPolicy = $this->loadRolesFromPolicyFiles();
foreach ($rolesFromPolicy as $newRoleIdentifier) {
$map[substr($newRoleIdentifier, strrpos($newRoleIdentifier, ':') + 1)] = $newRoleIdentifier;
}
$map['Anonymous'... | php | protected function getRoleIdentifierMap(array $map)
{
$rolesFromPolicy = $this->loadRolesFromPolicyFiles();
foreach ($rolesFromPolicy as $newRoleIdentifier) {
$map[substr($newRoleIdentifier, strrpos($newRoleIdentifier, ':') + 1)] = $newRoleIdentifier;
}
$map['Anonymous'... | [
"protected",
"function",
"getRoleIdentifierMap",
"(",
"array",
"$",
"map",
")",
"{",
"$",
"rolesFromPolicy",
"=",
"$",
"this",
"->",
"loadRolesFromPolicyFiles",
"(",
")",
";",
"foreach",
"(",
"$",
"rolesFromPolicy",
"as",
"$",
"newRoleIdentifier",
")",
"{",
"$... | Returns the given array indexed by "old" role identifiers with the
"new" identifiers added as values to their matching index.
@param array $map
@return array | [
"Returns",
"the",
"given",
"array",
"indexed",
"by",
"old",
"role",
"identifiers",
"with",
"the",
"new",
"identifiers",
"added",
"as",
"values",
"to",
"their",
"matching",
"index",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Postgresql/Version20130319131500.php#L135-L147 |
neos/flow-development-collection | Neos.Flow/Migrations/Postgresql/Version20130319131500.php | Version20130319131500.loadRolesFromPolicyFiles | protected function loadRolesFromPolicyFiles()
{
$roles = array();
$yamlPathsAndFilenames = Files::readDirectoryRecursively(__DIR__ . '/../../../../../Packages', 'yaml', true);
$configurationPathsAndFilenames = array_filter($yamlPathsAndFilenames,
function ($pathAndFileName) {
... | php | protected function loadRolesFromPolicyFiles()
{
$roles = array();
$yamlPathsAndFilenames = Files::readDirectoryRecursively(__DIR__ . '/../../../../../Packages', 'yaml', true);
$configurationPathsAndFilenames = array_filter($yamlPathsAndFilenames,
function ($pathAndFileName) {
... | [
"protected",
"function",
"loadRolesFromPolicyFiles",
"(",
")",
"{",
"$",
"roles",
"=",
"array",
"(",
")",
";",
"$",
"yamlPathsAndFilenames",
"=",
"Files",
"::",
"readDirectoryRecursively",
"(",
"__DIR__",
".",
"'/../../../../../Packages'",
",",
"'yaml'",
",",
"tru... | Reads all Policy.yaml files below Packages, extracts the roles and prepends
them with the package key "guessed" from the path.
@return array | [
"Reads",
"all",
"Policy",
".",
"yaml",
"files",
"below",
"Packages",
"extracts",
"the",
"roles",
"and",
"prepends",
"them",
"with",
"the",
"package",
"key",
"guessed",
"from",
"the",
"path",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Postgresql/Version20130319131500.php#L155-L185 |
neos/flow-development-collection | Neos.Flow.Log/Classes/PlainTextFormatter.php | PlainTextFormatter.renderVariableAsPlaintext | protected function renderVariableAsPlaintext($var, $spaces = 4, $continuationSpaces = 0)
{
$currentIndent = str_repeat(' ', $spaces + $continuationSpaces);
if ($continuationSpaces > 100) {
return null;
}
$output = '';
$output .= $currentIndent . '[' . gettype($va... | php | protected function renderVariableAsPlaintext($var, $spaces = 4, $continuationSpaces = 0)
{
$currentIndent = str_repeat(' ', $spaces + $continuationSpaces);
if ($continuationSpaces > 100) {
return null;
}
$output = '';
$output .= $currentIndent . '[' . gettype($va... | [
"protected",
"function",
"renderVariableAsPlaintext",
"(",
"$",
"var",
",",
"$",
"spaces",
"=",
"4",
",",
"$",
"continuationSpaces",
"=",
"0",
")",
"{",
"$",
"currentIndent",
"=",
"str_repeat",
"(",
"' '",
",",
"$",
"spaces",
"+",
"$",
"continuationSpaces",
... | Returns a suitable form of a variable (be it a string, array, object ...) for logfile output
@param mixed $var The variable
@param integer $spaces Indent for this var dump
@param int $continuationSpaces Running total indentation (INTERNAL)
@return string text output | [
"Returns",
"a",
"suitable",
"form",
"of",
"a",
"variable",
"(",
"be",
"it",
"a",
"string",
"array",
"object",
"...",
")",
"for",
"logfile",
"output"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/PlainTextFormatter.php#L41-L77 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Aspect/EmbeddedValueObjectPointcutFilter.php | EmbeddedValueObjectPointcutFilter.matches | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier)
{
$valueObjectAnnotation = $this->reflectionService->getClassAnnotation($className, Flow\ValueObject::class);
if ($valueObjectAnnotation !== null && $valueObjectAnnotation->embedded === true) {
... | php | public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier)
{
$valueObjectAnnotation = $this->reflectionService->getClassAnnotation($className, Flow\ValueObject::class);
if ($valueObjectAnnotation !== null && $valueObjectAnnotation->embedded === true) {
... | [
"public",
"function",
"matches",
"(",
"$",
"className",
",",
"$",
"methodName",
",",
"$",
"methodDeclaringClassName",
",",
"$",
"pointcutQueryIdentifier",
")",
"{",
"$",
"valueObjectAnnotation",
"=",
"$",
"this",
"->",
"reflectionService",
"->",
"getClassAnnotation"... | Checks if the specified class and method matches against the filter
@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
@param mixed $pointcutQueryIdenti... | [
"Checks",
"if",
"the",
"specified",
"class",
"and",
"method",
"matches",
"against",
"the",
"filter"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Aspect/EmbeddedValueObjectPointcutFilter.php#L48-L57 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Aspect/EmbeddedValueObjectPointcutFilter.php | EmbeddedValueObjectPointcutFilter.reduceTargetClassNames | public function reduceTargetClassNames(\Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex)
{
$classNames = $this->reflectionService->getClassNamesByAnnotation(Flow\ValueObject::class);
$annotatedIndex = new \Neos\Flow\Aop\Builder\ClassNameIndex();
$annotatedIndex->setClassNames($className... | php | public function reduceTargetClassNames(\Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex)
{
$classNames = $this->reflectionService->getClassNamesByAnnotation(Flow\ValueObject::class);
$annotatedIndex = new \Neos\Flow\Aop\Builder\ClassNameIndex();
$annotatedIndex->setClassNames($className... | [
"public",
"function",
"reduceTargetClassNames",
"(",
"\\",
"Neos",
"\\",
"Flow",
"\\",
"Aop",
"\\",
"Builder",
"\\",
"ClassNameIndex",
"$",
"classNameIndex",
")",
"{",
"$",
"classNames",
"=",
"$",
"this",
"->",
"reflectionService",
"->",
"getClassNamesByAnnotation... | This method is used to optimize the matching process.
@param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex
@return \Neos\Flow\Aop\Builder\ClassNameIndex | [
"This",
"method",
"is",
"used",
"to",
"optimize",
"the",
"matching",
"process",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Aspect/EmbeddedValueObjectPointcutFilter.php#L85-L91 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/TransientMemoryBackend.php | TransientMemoryBackend.set | public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null)
{
if (!$this->cache instanceof FrontendInterface) {
throw new Exception('No cache frontend has been set yet via setCache().', 1238244992);
}
$this->entries[$entryIdentifier] = $da... | php | public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null)
{
if (!$this->cache instanceof FrontendInterface) {
throw new Exception('No cache frontend has been set yet via setCache().', 1238244992);
}
$this->entries[$entryIdentifier] = $da... | [
"public",
"function",
"set",
"(",
"string",
"$",
"entryIdentifier",
",",
"string",
"$",
"data",
",",
"array",
"$",
"tags",
"=",
"[",
"]",
",",
"int",
"$",
"lifetime",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"cache",
"instanceof",
... | Saves data in the cache.
@param string $entryIdentifier An identifier for this specific cache entry
@param string $data The data to be stored
@param array $tags Tags to associate with this cache entry
@param integer $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. ... | [
"Saves",
"data",
"in",
"the",
"cache",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/TransientMemoryBackend.php#L46-L57 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/TransientMemoryBackend.php | TransientMemoryBackend.remove | public function remove(string $entryIdentifier): bool
{
if (!isset($this->entries[$entryIdentifier])) {
return false;
}
unset($this->entries[$entryIdentifier]);
foreach (array_keys($this->tagsAndEntries) as $tag) {
if (isset($this->tagsAndEntries[$tag][$entryI... | php | public function remove(string $entryIdentifier): bool
{
if (!isset($this->entries[$entryIdentifier])) {
return false;
}
unset($this->entries[$entryIdentifier]);
foreach (array_keys($this->tagsAndEntries) as $tag) {
if (isset($this->tagsAndEntries[$tag][$entryI... | [
"public",
"function",
"remove",
"(",
"string",
"$",
"entryIdentifier",
")",
":",
"bool",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"entries",
"[",
"$",
"entryIdentifier",
"]",
")",
")",
"{",
"return",
"false",
";",
"}",
"unset",
"(",
"$",... | Removes all cache entries matching the specified identifier.
@param string $entryIdentifier Specifies the cache entry to remove
@return boolean true if the entry could be removed or false if no entry was found
@api | [
"Removes",
"all",
"cache",
"entries",
"matching",
"the",
"specified",
"identifier",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/TransientMemoryBackend.php#L90-L102 |
neos/flow-development-collection | Neos.Cache/Classes/Backend/TransientMemoryBackend.php | TransientMemoryBackend.findIdentifiersByTag | public function findIdentifiersByTag(string $tag): array
{
if (isset($this->tagsAndEntries[$tag])) {
return array_keys($this->tagsAndEntries[$tag]);
}
return [];
} | php | public function findIdentifiersByTag(string $tag): array
{
if (isset($this->tagsAndEntries[$tag])) {
return array_keys($this->tagsAndEntries[$tag]);
}
return [];
} | [
"public",
"function",
"findIdentifiersByTag",
"(",
"string",
"$",
"tag",
")",
":",
"array",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"tagsAndEntries",
"[",
"$",
"tag",
"]",
")",
")",
"{",
"return",
"array_keys",
"(",
"$",
"this",
"->",
"tagsAnd... | Finds and returns all cache entry identifiers which are tagged by the
specified tag.
@param string $tag The tag to search for
@return array An array with identifiers of all matching entries. An empty array if no entries matched
@api | [
"Finds",
"and",
"returns",
"all",
"cache",
"entry",
"identifiers",
"which",
"are",
"tagged",
"by",
"the",
"specified",
"tag",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/TransientMemoryBackend.php#L112-L118 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Helper/MediaTypeHelper.php | MediaTypeHelper.determineAcceptedMediaTypes | public static function determineAcceptedMediaTypes(RequestInterface $request): array
{
$rawValues = $request->getHeader('Accept');
if (empty($rawValues) || !is_string($rawValues)) {
return ['*/*'];
}
$acceptedMediaTypes = self::parseContentNegotiationQualityValues($rawVal... | php | public static function determineAcceptedMediaTypes(RequestInterface $request): array
{
$rawValues = $request->getHeader('Accept');
if (empty($rawValues) || !is_string($rawValues)) {
return ['*/*'];
}
$acceptedMediaTypes = self::parseContentNegotiationQualityValues($rawVal... | [
"public",
"static",
"function",
"determineAcceptedMediaTypes",
"(",
"RequestInterface",
"$",
"request",
")",
":",
"array",
"{",
"$",
"rawValues",
"=",
"$",
"request",
"->",
"getHeader",
"(",
"'Accept'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"rawValues",
")... | Get accepted media types for the given request.
If no "Accept" header was found all media types are acceptable.
@param RequestInterface $request
@return array | [
"Get",
"accepted",
"media",
"types",
"for",
"the",
"given",
"request",
".",
"If",
"no",
"Accept",
"header",
"was",
"found",
"all",
"media",
"types",
"are",
"acceptable",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/MediaTypeHelper.php#L29-L38 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Helper/MediaTypeHelper.php | MediaTypeHelper.negotiateMediaType | public static function negotiateMediaType(array $acceptedMediaTypes, array $supportedMediaTypes, bool $trim = true):? string
{
$negotiatedMediaType = null;
foreach ($acceptedMediaTypes as $acceptedMediaType) {
foreach ($supportedMediaTypes as $supportedMediaType) {
if (Me... | php | public static function negotiateMediaType(array $acceptedMediaTypes, array $supportedMediaTypes, bool $trim = true):? string
{
$negotiatedMediaType = null;
foreach ($acceptedMediaTypes as $acceptedMediaType) {
foreach ($supportedMediaTypes as $supportedMediaType) {
if (Me... | [
"public",
"static",
"function",
"negotiateMediaType",
"(",
"array",
"$",
"acceptedMediaTypes",
",",
"array",
"$",
"supportedMediaTypes",
",",
"bool",
"$",
"trim",
"=",
"true",
")",
":",
"?",
"string",
"{",
"$",
"negotiatedMediaType",
"=",
"null",
";",
"foreach... | Returns the best fitting IANA media type after applying the content negotiation
rules on the accepted media types.
@param array $acceptedMediaTypes A list of accepted media types according to a request.
@param array $supportedMediaTypes A list of media types which are supported by the application / controller
@param b... | [
"Returns",
"the",
"best",
"fitting",
"IANA",
"media",
"type",
"after",
"applying",
"the",
"content",
"negotiation",
"rules",
"on",
"the",
"accepted",
"media",
"types",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/MediaTypeHelper.php#L49-L62 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Helper/MediaTypeHelper.php | MediaTypeHelper.parseContentNegotiationQualityValues | public static function parseContentNegotiationQualityValues(string $rawValues): array
{
$acceptedTypes = array_map(
function ($acceptType) {
$typeAndQuality = preg_split('/;\s*q=/', $acceptType);
return [$typeAndQuality[0], (isset($typeAndQuality[1]) ? (float)$ty... | php | public static function parseContentNegotiationQualityValues(string $rawValues): array
{
$acceptedTypes = array_map(
function ($acceptType) {
$typeAndQuality = preg_split('/;\s*q=/', $acceptType);
return [$typeAndQuality[0], (isset($typeAndQuality[1]) ? (float)$ty... | [
"public",
"static",
"function",
"parseContentNegotiationQualityValues",
"(",
"string",
"$",
"rawValues",
")",
":",
"array",
"{",
"$",
"acceptedTypes",
"=",
"array_map",
"(",
"function",
"(",
"$",
"acceptType",
")",
"{",
"$",
"typeAndQuality",
"=",
"preg_split",
... | Parses a RFC 2616 content negotiation header field by evaluating the Quality
Values and splitting the options into an array list, ordered by user preference.
@param string $rawValues The raw Accept* Header field value
@return array The parsed list of field values, ordered by user preference | [
"Parses",
"a",
"RFC",
"2616",
"content",
"negotiation",
"header",
"field",
"by",
"evaluating",
"the",
"Quality",
"Values",
"and",
"splitting",
"the",
"options",
"into",
"an",
"array",
"list",
"ordered",
"by",
"user",
"preference",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Helper/MediaTypeHelper.php#L71-L104 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Uri/ResourceViewHelper.php | ResourceViewHelper.initializeArguments | public function initializeArguments()
{
$this->registerArgument('path', 'string', 'Location of the resource, can be either a path relative to the Public resource directory of the package or a resource://... URI', false, null);
$this->registerArgument('package', 'string', 'Target package key. If not ... | php | public function initializeArguments()
{
$this->registerArgument('path', 'string', 'Location of the resource, can be either a path relative to the Public resource directory of the package or a resource://... URI', false, null);
$this->registerArgument('package', 'string', 'Target package key. If not ... | [
"public",
"function",
"initializeArguments",
"(",
")",
"{",
"$",
"this",
"->",
"registerArgument",
"(",
"'path'",
",",
"'string'",
",",
"'Location of the resource, can be either a path relative to the Public resource directory of the package or a resource://... URI'",
",",
"false",... | Initialize and register all arguments.
@return void | [
"Initialize",
"and",
"register",
"all",
"arguments",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Uri/ResourceViewHelper.php#L81-L87 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.setCacheConfigurations | public function setCacheConfigurations(array $cacheConfigurations): void
{
foreach ($cacheConfigurations as $identifier => $configuration) {
if (!is_array($configuration)) {
throw new \InvalidArgumentException('The cache configuration for cache "' . $identifier . '" was not an ar... | php | public function setCacheConfigurations(array $cacheConfigurations): void
{
foreach ($cacheConfigurations as $identifier => $configuration) {
if (!is_array($configuration)) {
throw new \InvalidArgumentException('The cache configuration for cache "' . $identifier . '" was not an ar... | [
"public",
"function",
"setCacheConfigurations",
"(",
"array",
"$",
"cacheConfigurations",
")",
":",
"void",
"{",
"foreach",
"(",
"$",
"cacheConfigurations",
"as",
"$",
"identifier",
"=>",
"$",
"configuration",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
... | Sets configurations for caches. The key of each entry specifies the
cache identifier and the value is an array of configuration options.
Possible options are:
frontend
backend
backendOptions
persistent
If one of the options is not specified, the default value is assumed.
Existing cache configurations are preserved.
... | [
"Sets",
"configurations",
"for",
"caches",
".",
"The",
"key",
"of",
"each",
"entry",
"specifies",
"the",
"cache",
"identifier",
"and",
"the",
"value",
"is",
"an",
"array",
"of",
"configuration",
"options",
".",
"Possible",
"options",
"are",
":"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L132-L140 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.registerCache | public function registerCache(FrontendInterface $cache, bool $persistent = false): void
{
$identifier = $cache->getIdentifier();
if (isset($this->caches[$identifier])) {
throw new DuplicateIdentifierException('A cache with identifier "' . $identifier . '" has already been registered.', 1... | php | public function registerCache(FrontendInterface $cache, bool $persistent = false): void
{
$identifier = $cache->getIdentifier();
if (isset($this->caches[$identifier])) {
throw new DuplicateIdentifierException('A cache with identifier "' . $identifier . '" has already been registered.', 1... | [
"public",
"function",
"registerCache",
"(",
"FrontendInterface",
"$",
"cache",
",",
"bool",
"$",
"persistent",
"=",
"false",
")",
":",
"void",
"{",
"$",
"identifier",
"=",
"$",
"cache",
"->",
"getIdentifier",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
... | Registers a cache so it can be retrieved at a later point.
@param FrontendInterface $cache The cache frontend to be registered
@param bool $persistent
@return void
@throws DuplicateIdentifierException if a cache with the given identifier has already been registered.
@api | [
"Registers",
"a",
"cache",
"so",
"it",
"can",
"be",
"retrieved",
"at",
"a",
"later",
"point",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L151-L161 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.getCache | public function getCache(string $identifier): FrontendInterface
{
if ($this->hasCache($identifier) === false) {
throw new NoSuchCacheException('A cache with identifier "' . $identifier . '" does not exist.', 1203699034);
}
if (!isset($this->caches[$identifier])) {
$th... | php | public function getCache(string $identifier): FrontendInterface
{
if ($this->hasCache($identifier) === false) {
throw new NoSuchCacheException('A cache with identifier "' . $identifier . '" does not exist.', 1203699034);
}
if (!isset($this->caches[$identifier])) {
$th... | [
"public",
"function",
"getCache",
"(",
"string",
"$",
"identifier",
")",
":",
"FrontendInterface",
"{",
"if",
"(",
"$",
"this",
"->",
"hasCache",
"(",
"$",
"identifier",
")",
"===",
"false",
")",
"{",
"throw",
"new",
"NoSuchCacheException",
"(",
"'A cache wi... | Returns the cache specified by $identifier
@param string $identifier Identifies which cache to return
@return FrontendInterface The specified cache frontend
@throws NoSuchCacheException
@api | [
"Returns",
"the",
"cache",
"specified",
"by",
"$identifier"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L171-L181 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.hasCache | public function hasCache(string $identifier): bool
{
return isset($this->caches[$identifier]) || isset($this->cacheConfigurations[$identifier]);
} | php | public function hasCache(string $identifier): bool
{
return isset($this->caches[$identifier]) || isset($this->cacheConfigurations[$identifier]);
} | [
"public",
"function",
"hasCache",
"(",
"string",
"$",
"identifier",
")",
":",
"bool",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"caches",
"[",
"$",
"identifier",
"]",
")",
"||",
"isset",
"(",
"$",
"this",
"->",
"cacheConfigurations",
"[",
"$",
"i... | Checks if the specified cache has been registered.
@param string $identifier The identifier of the cache
@return boolean true if a cache with the given identifier exists, otherwise false
@api | [
"Checks",
"if",
"the",
"specified",
"cache",
"has",
"been",
"registered",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L190-L193 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.flushCaches | public function flushCaches(bool $flushPersistentCaches = false): void
{
$this->createAllCaches();
/** @var FrontendInterface $cache */
foreach ($this->caches as $identifier => $cache) {
if (!$flushPersistentCaches && $this->isCachePersistent($identifier)) {
conti... | php | public function flushCaches(bool $flushPersistentCaches = false): void
{
$this->createAllCaches();
/** @var FrontendInterface $cache */
foreach ($this->caches as $identifier => $cache) {
if (!$flushPersistentCaches && $this->isCachePersistent($identifier)) {
conti... | [
"public",
"function",
"flushCaches",
"(",
"bool",
"$",
"flushPersistentCaches",
"=",
"false",
")",
":",
"void",
"{",
"$",
"this",
"->",
"createAllCaches",
"(",
")",
";",
"/** @var FrontendInterface $cache */",
"foreach",
"(",
"$",
"this",
"->",
"caches",
"as",
... | Flushes all registered caches
@param boolean $flushPersistentCaches If set to true, even those caches which are flagged as "persistent" will be flushed
@return void
@api | [
"Flushes",
"all",
"registered",
"caches"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L213-L226 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.flushCachesByTag | public function flushCachesByTag(string $tag, bool $flushPersistentCaches = false): void
{
$this->createAllCaches();
/** @var FrontendInterface $cache */
foreach ($this->caches as $identifier => $cache) {
if (!$flushPersistentCaches && $this->isCachePersistent($identifier)) {
... | php | public function flushCachesByTag(string $tag, bool $flushPersistentCaches = false): void
{
$this->createAllCaches();
/** @var FrontendInterface $cache */
foreach ($this->caches as $identifier => $cache) {
if (!$flushPersistentCaches && $this->isCachePersistent($identifier)) {
... | [
"public",
"function",
"flushCachesByTag",
"(",
"string",
"$",
"tag",
",",
"bool",
"$",
"flushPersistentCaches",
"=",
"false",
")",
":",
"void",
"{",
"$",
"this",
"->",
"createAllCaches",
"(",
")",
";",
"/** @var FrontendInterface $cache */",
"foreach",
"(",
"$",... | Flushes entries tagged by the specified tag of all registered
caches.
@param string $tag Tag to search for
@param boolean $flushPersistentCaches If set to true, even those caches which are flagged as "persistent" will be flushed
@return void
@api | [
"Flushes",
"entries",
"tagged",
"by",
"the",
"specified",
"tag",
"of",
"all",
"registered",
"caches",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L237-L247 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.flushSystemCachesByChangedFiles | public function flushSystemCachesByChangedFiles(string $fileMonitorIdentifier, array $changedFiles): void
{
switch ($fileMonitorIdentifier) {
case 'Flow_ClassFiles':
$this->flushClassCachesByChangedFiles($changedFiles);
break;
case 'Flow_ConfigurationF... | php | public function flushSystemCachesByChangedFiles(string $fileMonitorIdentifier, array $changedFiles): void
{
switch ($fileMonitorIdentifier) {
case 'Flow_ClassFiles':
$this->flushClassCachesByChangedFiles($changedFiles);
break;
case 'Flow_ConfigurationF... | [
"public",
"function",
"flushSystemCachesByChangedFiles",
"(",
"string",
"$",
"fileMonitorIdentifier",
",",
"array",
"$",
"changedFiles",
")",
":",
"void",
"{",
"switch",
"(",
"$",
"fileMonitorIdentifier",
")",
"{",
"case",
"'Flow_ClassFiles'",
":",
"$",
"this",
"-... | Flushes entries tagged with class names if their class source files have changed.
Also flushes AOP proxy caches if a policy was modified.
This method is used as a slot for a signal sent by the system file monitor
defined in the bootstrap scripts.
Note: Policy configuration handling is implemented here as well as othe... | [
"Flushes",
"entries",
"tagged",
"with",
"class",
"names",
"if",
"their",
"class",
"source",
"files",
"have",
"changed",
".",
"Also",
"flushes",
"AOP",
"proxy",
"caches",
"if",
"a",
"policy",
"was",
"modified",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L274-L287 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.flushClassCachesByChangedFiles | protected function flushClassCachesByChangedFiles(array $changedFiles): void
{
$objectClassesCache = $this->getCache('Flow_Object_Classes');
$objectConfigurationCache = $this->getCache('Flow_Object_Configuration');
$modifiedAspectClassNamesWithUnderscores = [];
$modifiedClassNamesWit... | php | protected function flushClassCachesByChangedFiles(array $changedFiles): void
{
$objectClassesCache = $this->getCache('Flow_Object_Classes');
$objectConfigurationCache = $this->getCache('Flow_Object_Configuration');
$modifiedAspectClassNamesWithUnderscores = [];
$modifiedClassNamesWit... | [
"protected",
"function",
"flushClassCachesByChangedFiles",
"(",
"array",
"$",
"changedFiles",
")",
":",
"void",
"{",
"$",
"objectClassesCache",
"=",
"$",
"this",
"->",
"getCache",
"(",
"'Flow_Object_Classes'",
")",
";",
"$",
"objectConfigurationCache",
"=",
"$",
"... | Flushes entries tagged with class names if their class source files have changed.
@param array $changedFiles A list of full paths to changed files
@return void
@see flushSystemCachesByChangedFiles() | [
"Flushes",
"entries",
"tagged",
"with",
"class",
"names",
"if",
"their",
"class",
"source",
"files",
"have",
"changed",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L296-L353 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.flushConfigurationCachesByChangedFiles | protected function flushConfigurationCachesByChangedFiles(array $changedFiles): void
{
$aopProxyClassRebuildIsNeeded = false;
$aopProxyClassInfluencers = '/(?:Policy|Objects|Settings)(?:\..*)*\.yaml/';
$objectClassesCache = $this->getCache('Flow_Object_Classes');
$objectConfiguratio... | php | protected function flushConfigurationCachesByChangedFiles(array $changedFiles): void
{
$aopProxyClassRebuildIsNeeded = false;
$aopProxyClassInfluencers = '/(?:Policy|Objects|Settings)(?:\..*)*\.yaml/';
$objectClassesCache = $this->getCache('Flow_Object_Classes');
$objectConfiguratio... | [
"protected",
"function",
"flushConfigurationCachesByChangedFiles",
"(",
"array",
"$",
"changedFiles",
")",
":",
"void",
"{",
"$",
"aopProxyClassRebuildIsNeeded",
"=",
"false",
";",
"$",
"aopProxyClassInfluencers",
"=",
"'/(?:Policy|Objects|Settings)(?:\\..*)*\\.yaml/'",
";",
... | Flushes caches as needed if settings, routes or policies have changed
@param array $changedFiles A list of full paths to changed files
@return void
@see flushSystemCachesByChangedFiles() | [
"Flushes",
"caches",
"as",
"needed",
"if",
"settings",
"routes",
"or",
"policies",
"have",
"changed"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L362-L403 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.flushTranslationCachesByChangedFiles | protected function flushTranslationCachesByChangedFiles(array $changedFiles): void
{
foreach ($changedFiles as $pathAndFilename => $status) {
if (preg_match('/\/Translations\/.+\.xlf/', $pathAndFilename) === 1) {
$this->logger->info('The localization files have changed, thus flus... | php | protected function flushTranslationCachesByChangedFiles(array $changedFiles): void
{
foreach ($changedFiles as $pathAndFilename => $status) {
if (preg_match('/\/Translations\/.+\.xlf/', $pathAndFilename) === 1) {
$this->logger->info('The localization files have changed, thus flus... | [
"protected",
"function",
"flushTranslationCachesByChangedFiles",
"(",
"array",
"$",
"changedFiles",
")",
":",
"void",
"{",
"foreach",
"(",
"$",
"changedFiles",
"as",
"$",
"pathAndFilename",
"=>",
"$",
"status",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/\\/Trans... | Flushes I18n caches if translation files have changed
@param array $changedFiles A list of full paths to changed files
@return void
@see flushSystemCachesByChangedFiles() | [
"Flushes",
"I18n",
"caches",
"if",
"translation",
"files",
"have",
"changed"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L412-L421 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.createAllCaches | protected function createAllCaches(): void
{
foreach (array_keys($this->cacheConfigurations) as $identifier) {
if ($identifier !== 'Default' && !isset($this->caches[$identifier])) {
$this->createCache($identifier);
}
}
} | php | protected function createAllCaches(): void
{
foreach (array_keys($this->cacheConfigurations) as $identifier) {
if ($identifier !== 'Default' && !isset($this->caches[$identifier])) {
$this->createCache($identifier);
}
}
} | [
"protected",
"function",
"createAllCaches",
"(",
")",
":",
"void",
"{",
"foreach",
"(",
"array_keys",
"(",
"$",
"this",
"->",
"cacheConfigurations",
")",
"as",
"$",
"identifier",
")",
"{",
"if",
"(",
"$",
"identifier",
"!==",
"'Default'",
"&&",
"!",
"isset... | Instantiates all registered caches.
@return void | [
"Instantiates",
"all",
"registered",
"caches",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L428-L435 |
neos/flow-development-collection | Neos.Flow/Classes/Cache/CacheManager.php | CacheManager.createCache | protected function createCache(string $identifier): void
{
$frontend = isset($this->cacheConfigurations[$identifier]['frontend']) ? $this->cacheConfigurations[$identifier]['frontend'] : $this->cacheConfigurations['Default']['frontend'];
$backend = isset($this->cacheConfigurations[$identifier]['backe... | php | protected function createCache(string $identifier): void
{
$frontend = isset($this->cacheConfigurations[$identifier]['frontend']) ? $this->cacheConfigurations[$identifier]['frontend'] : $this->cacheConfigurations['Default']['frontend'];
$backend = isset($this->cacheConfigurations[$identifier]['backe... | [
"protected",
"function",
"createCache",
"(",
"string",
"$",
"identifier",
")",
":",
"void",
"{",
"$",
"frontend",
"=",
"isset",
"(",
"$",
"this",
"->",
"cacheConfigurations",
"[",
"$",
"identifier",
"]",
"[",
"'frontend'",
"]",
")",
"?",
"$",
"this",
"->... | Instantiates the cache for $identifier.
@param string $identifier
@return void | [
"Instantiates",
"the",
"cache",
"for",
"$identifier",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Cache/CacheManager.php#L443-L451 |
neos/flow-development-collection | Neos.Flow/Migrations/Code/Version20151113161300.php | Version20151113161300.processRequestPatterns | public function processRequestPatterns(array &$configuration)
{
if (!isset($configuration['TYPO3']['Flow']['security']['authentication']['providers'])) {
return;
}
foreach ($configuration['TYPO3']['Flow']['security']['authentication']['providers'] as $providerName => &$providerOp... | php | public function processRequestPatterns(array &$configuration)
{
if (!isset($configuration['TYPO3']['Flow']['security']['authentication']['providers'])) {
return;
}
foreach ($configuration['TYPO3']['Flow']['security']['authentication']['providers'] as $providerName => &$providerOp... | [
"public",
"function",
"processRequestPatterns",
"(",
"array",
"&",
"$",
"configuration",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"configuration",
"[",
"'TYPO3'",
"]",
"[",
"'Flow'",
"]",
"[",
"'security'",
"]",
"[",
"'authentication'",
"]",
"[",
"'pro... | Adjust TYPO3.Flow.security.authentication.providers.<providerName>.requestPatterns syntax
@param array $configuration
@return void | [
"Adjust",
"TYPO3",
".",
"Flow",
".",
"security",
".",
"authentication",
".",
"providers",
".",
"<providerName",
">",
".",
"requestPatterns",
"syntax"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Code/Version20151113161300.php#L52-L106 |
neos/flow-development-collection | Neos.Flow/Migrations/Code/Version20151113161300.php | Version20151113161300.processFirewallFilters | public function processFirewallFilters(array &$configuration)
{
if (!isset($configuration['TYPO3']['Flow']['security']['firewall']['filters'])) {
return;
}
$filtersConfiguration = &$configuration['TYPO3']['Flow']['security']['firewall']['filters'];
foreach ($filtersConfig... | php | public function processFirewallFilters(array &$configuration)
{
if (!isset($configuration['TYPO3']['Flow']['security']['firewall']['filters'])) {
return;
}
$filtersConfiguration = &$configuration['TYPO3']['Flow']['security']['firewall']['filters'];
foreach ($filtersConfig... | [
"public",
"function",
"processFirewallFilters",
"(",
"array",
"&",
"$",
"configuration",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"configuration",
"[",
"'TYPO3'",
"]",
"[",
"'Flow'",
"]",
"[",
"'security'",
"]",
"[",
"'firewall'",
"]",
"[",
"'filters'"... | Adjust TYPO3.Flow.security.authentication.providers.<providerName>.requestPatterns syntax
@param array $configuration
@return void | [
"Adjust",
"TYPO3",
".",
"Flow",
".",
"security",
".",
"authentication",
".",
"providers",
".",
"<providerName",
">",
".",
"requestPatterns",
"syntax"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Migrations/Code/Version20151113161300.php#L114-L171 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/ObjectValidationAndDeDuplicationListener.php | ObjectValidationAndDeDuplicationListener.onFlush | public function onFlush(OnFlushEventArgs $eventArgs)
{
$this->entityManager = $eventArgs->getEntityManager();
$validatedInstancesContainer = new \SplObjectStorage();
$this->deduplicateValueObjectInsertions();
$unitOfWork = $this->entityManager->getUnitOfWork();
foreach ($un... | php | public function onFlush(OnFlushEventArgs $eventArgs)
{
$this->entityManager = $eventArgs->getEntityManager();
$validatedInstancesContainer = new \SplObjectStorage();
$this->deduplicateValueObjectInsertions();
$unitOfWork = $this->entityManager->getUnitOfWork();
foreach ($un... | [
"public",
"function",
"onFlush",
"(",
"OnFlushEventArgs",
"$",
"eventArgs",
")",
"{",
"$",
"this",
"->",
"entityManager",
"=",
"$",
"eventArgs",
"->",
"getEntityManager",
"(",
")",
";",
"$",
"validatedInstancesContainer",
"=",
"new",
"\\",
"SplObjectStorage",
"(... | An onFlush event listener used to act upon persistence.
@param OnFlushEventArgs $eventArgs
@return void
@throws ObjectValidationFailedException | [
"An",
"onFlush",
"event",
"listener",
"used",
"to",
"act",
"upon",
"persistence",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/ObjectValidationAndDeDuplicationListener.php#L64-L79 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/ObjectValidationAndDeDuplicationListener.php | ObjectValidationAndDeDuplicationListener.deduplicateValueObjectInsertions | private function deduplicateValueObjectInsertions()
{
$unitOfWork = $this->entityManager->getUnitOfWork();
$entityInsertions = $unitOfWork->getScheduledEntityInsertions();
$knownValueObjects = [];
foreach ($entityInsertions as $entity) {
$className = TypeHandling::getTyp... | php | private function deduplicateValueObjectInsertions()
{
$unitOfWork = $this->entityManager->getUnitOfWork();
$entityInsertions = $unitOfWork->getScheduledEntityInsertions();
$knownValueObjects = [];
foreach ($entityInsertions as $entity) {
$className = TypeHandling::getTyp... | [
"private",
"function",
"deduplicateValueObjectInsertions",
"(",
")",
"{",
"$",
"unitOfWork",
"=",
"$",
"this",
"->",
"entityManager",
"->",
"getUnitOfWork",
"(",
")",
";",
"$",
"entityInsertions",
"=",
"$",
"unitOfWork",
"->",
"getScheduledEntityInsertions",
"(",
... | Loops over scheduled insertions and checks for duplicate value objects. Any duplicates are unset from the
list of scheduled insertions.
@return void | [
"Loops",
"over",
"scheduled",
"insertions",
"and",
"checks",
"for",
"duplicate",
"value",
"objects",
".",
"Any",
"duplicates",
"are",
"unset",
"from",
"the",
"list",
"of",
"scheduled",
"insertions",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/ObjectValidationAndDeDuplicationListener.php#L87-L108 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/ObjectValidationAndDeDuplicationListener.php | ObjectValidationAndDeDuplicationListener.validateObject | private function validateObject($object, \SplObjectStorage $validatedInstancesContainer)
{
$className = $this->entityManager->getClassMetadata(get_class($object))->getName();
$validator = $this->validatorResolver->getBaseValidatorConjunction($className, ['Persistence', 'Default']);
if ($vali... | php | private function validateObject($object, \SplObjectStorage $validatedInstancesContainer)
{
$className = $this->entityManager->getClassMetadata(get_class($object))->getName();
$validator = $this->validatorResolver->getBaseValidatorConjunction($className, ['Persistence', 'Default']);
if ($vali... | [
"private",
"function",
"validateObject",
"(",
"$",
"object",
",",
"\\",
"SplObjectStorage",
"$",
"validatedInstancesContainer",
")",
"{",
"$",
"className",
"=",
"$",
"this",
"->",
"entityManager",
"->",
"getClassMetadata",
"(",
"get_class",
"(",
"$",
"object",
"... | Validates the given object and throws an exception if validation fails.
@param object $object
@param \SplObjectStorage $validatedInstancesContainer
@return void
@throws ObjectValidationFailedException | [
"Validates",
"the",
"given",
"object",
"and",
"throws",
"an",
"exception",
"if",
"validation",
"fails",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/ObjectValidationAndDeDuplicationListener.php#L118-L141 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.getBaseUri | public function getBaseUri()
{
if ($this->baseUri === null) {
$this->baseUri = $this->detectBaseUri();
}
return $this->baseUri;
} | php | public function getBaseUri()
{
if ($this->baseUri === null) {
$this->baseUri = $this->detectBaseUri();
}
return $this->baseUri;
} | [
"public",
"function",
"getBaseUri",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"baseUri",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"baseUri",
"=",
"$",
"this",
"->",
"detectBaseUri",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"baseUri",
... | Returns the detected base URI
@return UriInterface|Uri
@deprecated Since Flow 5.1, no replacement on BaseRequest, use attribute on ServerRequestInterface
@see Request::getAttribute(Request::ATTRIBUTE_BASE_URI) | [
"Returns",
"the",
"detected",
"base",
"URI"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L90-L97 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.setBaseUri | public function setBaseUri($baseUri)
{
if (is_string($baseUri)) {
$baseUri = new Uri($baseUri);
}
$this->baseUri = $baseUri;
} | php | public function setBaseUri($baseUri)
{
if (is_string($baseUri)) {
$baseUri = new Uri($baseUri);
}
$this->baseUri = $baseUri;
} | [
"public",
"function",
"setBaseUri",
"(",
"$",
"baseUri",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"baseUri",
")",
")",
"{",
"$",
"baseUri",
"=",
"new",
"Uri",
"(",
"$",
"baseUri",
")",
";",
"}",
"$",
"this",
"->",
"baseUri",
"=",
"$",
"baseUri",... | Set the base URI of this request.
@param string|UriInterface $baseUri
@deprecated Since Flow 5.1, set as an attribute on ServerRequestInterface instead.
@see Request::withAttribute(Request::ATTRIBUTE_BASE_URI) | [
"Set",
"the",
"base",
"URI",
"of",
"this",
"request",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L106-L113 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.setContent | public function setContent($content)
{
if (is_resource($content) && get_resource_type($content) === 'stream' && stream_is_local($content)) {
$streamMetaData = stream_get_meta_data($content);
$this->headers->set('Content-Length', filesize($streamMetaData['uri']));
$this->h... | php | public function setContent($content)
{
if (is_resource($content) && get_resource_type($content) === 'stream' && stream_is_local($content)) {
$streamMetaData = stream_get_meta_data($content);
$this->headers->set('Content-Length', filesize($streamMetaData['uri']));
$this->h... | [
"public",
"function",
"setContent",
"(",
"$",
"content",
")",
"{",
"if",
"(",
"is_resource",
"(",
"$",
"content",
")",
"&&",
"get_resource_type",
"(",
"$",
"content",
")",
"===",
"'stream'",
"&&",
"stream_is_local",
"(",
"$",
"content",
")",
")",
"{",
"$... | Explicitly sets the content of the request body
In most cases, content is just a string representation of the request body.
In order to reduce memory consumption for uploads and other big data, it is
also possible to pass a stream resource. The easies way to convert a local file
into a stream resource is probably: $re... | [
"Explicitly",
"sets",
"the",
"content",
"of",
"the",
"request",
"body"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L167-L176 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.getContent | public function getContent($asResource = false)
{
if ($asResource === true) {
if ($this->content !== null) {
throw new Exception('Cannot return request content as resource because it has already been retrieved.', 1332942478);
}
$this->content = '';
... | php | public function getContent($asResource = false)
{
if ($asResource === true) {
if ($this->content !== null) {
throw new Exception('Cannot return request content as resource because it has already been retrieved.', 1332942478);
}
$this->content = '';
... | [
"public",
"function",
"getContent",
"(",
"$",
"asResource",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"asResource",
"===",
"true",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"content",
"!==",
"null",
")",
"{",
"throw",
"new",
"Exception",
"(",
"'Cannot retu... | Returns the content of the request body
If the request body has not been set with setContent() previously, this method
will try to retrieve it from the input stream. If $asResource was set to true,
the stream resource will be returned instead of a string.
If the content which has been set by setContent() originally w... | [
"Returns",
"the",
"content",
"of",
"the",
"request",
"body"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L195-L211 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.renderHeaders | public function renderHeaders()
{
$headers = RequestInformationHelper::generateRequestLine($this);
$headers .= RequestInformationHelper::renderRequestHeaders($this);
return $headers;
} | php | public function renderHeaders()
{
$headers = RequestInformationHelper::generateRequestLine($this);
$headers .= RequestInformationHelper::renderRequestHeaders($this);
return $headers;
} | [
"public",
"function",
"renderHeaders",
"(",
")",
"{",
"$",
"headers",
"=",
"RequestInformationHelper",
"::",
"generateRequestLine",
"(",
"$",
"this",
")",
";",
"$",
"headers",
".=",
"RequestInformationHelper",
"::",
"renderRequestHeaders",
"(",
"$",
"this",
")",
... | Renders the HTTP headers - including the status header - of this request
@return string The HTTP headers, one per line, separated by \r\n as required by RFC 2616 sec 5
@deprecated Since Flow 5.1, use the RequestInformationHelper
@see RequestInformationHelper::generateRequestLine() and RequestInformationHelper::renderR... | [
"Renders",
"the",
"HTTP",
"headers",
"-",
"including",
"the",
"status",
"header",
"-",
"of",
"this",
"request"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L249-L255 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.getRequestTarget | public function getRequestTarget()
{
if ($this->requestTarget !== null) {
return $this->requestTarget;
}
$uri = $this->getUri();
if ($uri === null) {
return '/';
}
$requestUri = $uri->getPath() .
($uri->getQuery() ? '?' . $uri->ge... | php | public function getRequestTarget()
{
if ($this->requestTarget !== null) {
return $this->requestTarget;
}
$uri = $this->getUri();
if ($uri === null) {
return '/';
}
$requestUri = $uri->getPath() .
($uri->getQuery() ? '?' . $uri->ge... | [
"public",
"function",
"getRequestTarget",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"requestTarget",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"requestTarget",
";",
"}",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
")",
";",
"if"... | Retrieves the message's request target.
Retrieves the message's request-target either as it will appear (for
clients), as it appeared at request (for servers), or as it was
specified for the instance (see withRequestTarget()).
In most cases, this will be the origin-form of the composed URI,
unless a value was provide... | [
"Retrieves",
"the",
"message",
"s",
"request",
"target",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L273-L289 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.withUri | public function withUri(UriInterface $uri, $preserveHost = false)
{
if ((string)$this->uri === (string)$uri) {
return $this;
}
$newRequest = clone $this;
$newRequest->uri = $uri;
if ($preserveHost === false || !$this->hasHeader('Host')) {
$newReques... | php | public function withUri(UriInterface $uri, $preserveHost = false)
{
if ((string)$this->uri === (string)$uri) {
return $this;
}
$newRequest = clone $this;
$newRequest->uri = $uri;
if ($preserveHost === false || !$this->hasHeader('Host')) {
$newReques... | [
"public",
"function",
"withUri",
"(",
"UriInterface",
"$",
"uri",
",",
"$",
"preserveHost",
"=",
"false",
")",
"{",
"if",
"(",
"(",
"string",
")",
"$",
"this",
"->",
"uri",
"===",
"(",
"string",
")",
"$",
"uri",
")",
"{",
"return",
"$",
"this",
";"... | Returns an instance with the provided URI.
This method MUST update the Host header of the returned request by
default if the URI contains a host component. If the URI does not
contain a host component, any pre-existing Host header MUST be carried
over to the returned request.
You can opt-in to preserving the original... | [
"Returns",
"an",
"instance",
"with",
"the",
"provided",
"URI",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L371-L386 |
neos/flow-development-collection | Neos.Flow/Classes/Http/BaseRequest.php | BaseRequest.updateHostFromUri | private function updateHostFromUri()
{
$host = $this->uri->getHost();
if ($host == '') {
return;
}
if (($port = $this->uri->getPort()) !== null) {
$host .= ':' . $port;
}
$this->setHeader('Host', $host);
} | php | private function updateHostFromUri()
{
$host = $this->uri->getHost();
if ($host == '') {
return;
}
if (($port = $this->uri->getPort()) !== null) {
$host .= ':' . $port;
}
$this->setHeader('Host', $host);
} | [
"private",
"function",
"updateHostFromUri",
"(",
")",
"{",
"$",
"host",
"=",
"$",
"this",
"->",
"uri",
"->",
"getHost",
"(",
")",
";",
"if",
"(",
"$",
"host",
"==",
"''",
")",
"{",
"return",
";",
"}",
"if",
"(",
"(",
"$",
"port",
"=",
"$",
"thi... | Update the current Host header based on the current Uri | [
"Update",
"the",
"current",
"Host",
"header",
"based",
"on",
"the",
"current",
"Uri"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/BaseRequest.php#L391-L404 |
neos/flow-development-collection | Neos.Flow/Classes/Exception.php | Exception.getReferenceCode | public function getReferenceCode()
{
if (!isset($this->referenceCode)) {
$this->referenceCode = date('YmdHis', $_SERVER['REQUEST_TIME']) . substr(md5(rand()), 0, 6);
}
return $this->referenceCode;
} | php | public function getReferenceCode()
{
if (!isset($this->referenceCode)) {
$this->referenceCode = date('YmdHis', $_SERVER['REQUEST_TIME']) . substr(md5(rand()), 0, 6);
}
return $this->referenceCode;
} | [
"public",
"function",
"getReferenceCode",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"referenceCode",
")",
")",
"{",
"$",
"this",
"->",
"referenceCode",
"=",
"date",
"(",
"'YmdHis'",
",",
"$",
"_SERVER",
"[",
"'REQUEST_TIME'",
"]",
... | Returns a code which can be communicated publicly so that whoever experiences the exception can refer
to it and a developer can find more information about it in the system log.
@return string
@api | [
"Returns",
"a",
"code",
"which",
"can",
"be",
"communicated",
"publicly",
"so",
"that",
"whoever",
"experiences",
"the",
"exception",
"can",
"refer",
"to",
"it",
"and",
"a",
"developer",
"can",
"find",
"more",
"information",
"about",
"it",
"in",
"the",
"syst... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Exception.php#L41-L47 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Routing/RoutingComponent.php | RoutingComponent.handle | public function handle(ComponentContext $componentContext)
{
$parameters = $componentContext->getParameter(RoutingComponent::class, 'parameters');
if ($parameters === null) {
$parameters = RouteParameters::createEmpty();
}
$routeContext = new RouteContext($componentContex... | php | public function handle(ComponentContext $componentContext)
{
$parameters = $componentContext->getParameter(RoutingComponent::class, 'parameters');
if ($parameters === null) {
$parameters = RouteParameters::createEmpty();
}
$routeContext = new RouteContext($componentContex... | [
"public",
"function",
"handle",
"(",
"ComponentContext",
"$",
"componentContext",
")",
"{",
"$",
"parameters",
"=",
"$",
"componentContext",
"->",
"getParameter",
"(",
"RoutingComponent",
"::",
"class",
",",
"'parameters'",
")",
";",
"if",
"(",
"$",
"parameters"... | Resolve a route for the request
Stores the resolved route values in the ComponentContext to pass them
to other components. They can be accessed via ComponentContext::getParameter(outingComponent::class, 'matchResults');
@param ComponentContext $componentContext
@return void | [
"Resolve",
"a",
"route",
"for",
"the",
"request"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Routing/RoutingComponent.php#L54-L69 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Collection.php | Collection.importResource | public function importResource($source)
{
if (!$this->storage instanceof WritableStorageInterface) {
throw new ResourceException(sprintf('Could not import resource into collection "%s" because its storage "%s" is a read-only storage.', $this->name, $this->storage->getName()), 1375197288);
... | php | public function importResource($source)
{
if (!$this->storage instanceof WritableStorageInterface) {
throw new ResourceException(sprintf('Could not import resource into collection "%s" because its storage "%s" is a read-only storage.', $this->name, $this->storage->getName()), 1375197288);
... | [
"public",
"function",
"importResource",
"(",
"$",
"source",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"storage",
"instanceof",
"WritableStorageInterface",
")",
"{",
"throw",
"new",
"ResourceException",
"(",
"sprintf",
"(",
"'Could not import resource into collect... | Imports a resource (file) from the given URI or PHP resource stream into this collection.
On a successful import this method returns a PersistentResource object representing the newly
imported persistent resource.
Note that this collection must have a writable storage in order to import resources.
@param string | re... | [
"Imports",
"a",
"resource",
"(",
"file",
")",
"from",
"the",
"given",
"URI",
"or",
"PHP",
"resource",
"stream",
"into",
"this",
"collection",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Collection.php#L110-L116 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Collection.php | Collection.importResourceFromContent | public function importResourceFromContent($content)
{
if (!$this->storage instanceof WritableStorageInterface) {
throw new ResourceException(sprintf('Could not import resource into collection "%s" because its storage "%s" is a read-only storage.', $this->name, $this->storage->getName()), 1381155... | php | public function importResourceFromContent($content)
{
if (!$this->storage instanceof WritableStorageInterface) {
throw new ResourceException(sprintf('Could not import resource into collection "%s" because its storage "%s" is a read-only storage.', $this->name, $this->storage->getName()), 1381155... | [
"public",
"function",
"importResourceFromContent",
"(",
"$",
"content",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"storage",
"instanceof",
"WritableStorageInterface",
")",
"{",
"throw",
"new",
"ResourceException",
"(",
"sprintf",
"(",
"'Could not import resource ... | Imports a resource from the given string content into this collection.
On a successful import this method returns a PersistentResource object representing the newly
imported persistent resource.
Note that this collection must have a writable storage in order to import resources.
The specified filename will be used w... | [
"Imports",
"a",
"resource",
"from",
"the",
"given",
"string",
"content",
"into",
"this",
"collection",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Collection.php#L133-L139 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Collection.php | Collection.getObjects | public function getObjects(callable $callback = null)
{
$objects = [];
if ($this->storage instanceof PackageStorage && $this->pathPatterns !== []) {
$objects = new \AppendIterator();
foreach ($this->pathPatterns as $pathPattern) {
$objects->append($this->stora... | php | public function getObjects(callable $callback = null)
{
$objects = [];
if ($this->storage instanceof PackageStorage && $this->pathPatterns !== []) {
$objects = new \AppendIterator();
foreach ($this->pathPatterns as $pathPattern) {
$objects->append($this->stora... | [
"public",
"function",
"getObjects",
"(",
"callable",
"$",
"callback",
"=",
"null",
")",
"{",
"$",
"objects",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"this",
"->",
"storage",
"instanceof",
"PackageStorage",
"&&",
"$",
"this",
"->",
"pathPatterns",
"!==",
"[",... | Returns all internal data objects of the storage attached to this collection.
@param callable $callback Function called after each object
@return \Generator<Storage\Object> | [
"Returns",
"all",
"internal",
"data",
"objects",
"of",
"the",
"storage",
"attached",
"to",
"this",
"collection",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Collection.php#L157-L175 |
neos/flow-development-collection | Neos.Flow/Classes/ResourceManagement/Collection.php | Collection.getStreamByResource | public function getStreamByResource(PersistentResource $resource)
{
$stream = $this->getStorage()->getStreamByResource($resource);
if ($stream !== false) {
$meta = stream_get_meta_data($stream);
if ($meta['seekable']) {
rewind($stream);
}
}... | php | public function getStreamByResource(PersistentResource $resource)
{
$stream = $this->getStorage()->getStreamByResource($resource);
if ($stream !== false) {
$meta = stream_get_meta_data($stream);
if ($meta['seekable']) {
rewind($stream);
}
}... | [
"public",
"function",
"getStreamByResource",
"(",
"PersistentResource",
"$",
"resource",
")",
"{",
"$",
"stream",
"=",
"$",
"this",
"->",
"getStorage",
"(",
")",
"->",
"getStreamByResource",
"(",
"$",
"resource",
")",
";",
"if",
"(",
"$",
"stream",
"!==",
... | Returns a stream handle of the given persistent resource which allows for opening / copying the resource's
data. Note that this stream handle may only be used read-only.
@param PersistentResource $resource The resource to retrieve the stream for
@return resource | boolean The resource stream or false if the stream cou... | [
"Returns",
"a",
"stream",
"handle",
"of",
"the",
"given",
"persistent",
"resource",
"which",
"allows",
"for",
"opening",
"/",
"copying",
"the",
"resource",
"s",
"data",
".",
"Note",
"that",
"this",
"stream",
"handle",
"may",
"only",
"be",
"used",
"read",
"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Collection.php#L184-L194 |
neos/flow-development-collection | Neos.Flow.Log/Classes/Backend/FileBackend.php | FileBackend.open | public function open()
{
$this->severityLabels = [
LOG_EMERG => 'EMERGENCY',
LOG_ALERT => 'ALERT ',
LOG_CRIT => 'CRITICAL ',
LOG_ERR => 'ERROR ',
LOG_WARNING => 'WARNING ',
LOG_NOTICE => 'NOTICE ',
LOG_I... | php | public function open()
{
$this->severityLabels = [
LOG_EMERG => 'EMERGENCY',
LOG_ALERT => 'ALERT ',
LOG_CRIT => 'CRITICAL ',
LOG_ERR => 'ERROR ',
LOG_WARNING => 'WARNING ',
LOG_NOTICE => 'NOTICE ',
LOG_I... | [
"public",
"function",
"open",
"(",
")",
"{",
"$",
"this",
"->",
"severityLabels",
"=",
"[",
"LOG_EMERG",
"=>",
"'EMERGENCY'",
",",
"LOG_ALERT",
"=>",
"'ALERT '",
",",
"LOG_CRIT",
"=>",
"'CRITICAL '",
",",
"LOG_ERR",
"=>",
"'ERROR '",
",",
"LOG_WARNING",
... | Carries out all actions necessary to prepare the logging backend, such as opening
the log file or opening a database connection.
@return void
@throws CouldNotOpenResourceException
@api | [
"Carries",
"out",
"all",
"actions",
"necessary",
"to",
"prepare",
"the",
"logging",
"backend",
"such",
"as",
"opening",
"the",
"log",
"file",
"or",
"opening",
"a",
"database",
"connection",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/FileBackend.php#L137-L180 |
neos/flow-development-collection | Neos.Flow.Log/Classes/Backend/FileBackend.php | FileBackend.rotateLogFile | protected function rotateLogFile()
{
if (file_exists($this->logFileUrl . '.lock')) {
return;
} else {
touch($this->logFileUrl . '.lock');
}
if ($this->logFilesToKeep === 0) {
unlink($this->logFileUrl);
} else {
for ($logFileCou... | php | protected function rotateLogFile()
{
if (file_exists($this->logFileUrl . '.lock')) {
return;
} else {
touch($this->logFileUrl . '.lock');
}
if ($this->logFilesToKeep === 0) {
unlink($this->logFileUrl);
} else {
for ($logFileCou... | [
"protected",
"function",
"rotateLogFile",
"(",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"this",
"->",
"logFileUrl",
".",
"'.lock'",
")",
")",
"{",
"return",
";",
"}",
"else",
"{",
"touch",
"(",
"$",
"this",
"->",
"logFileUrl",
".",
"'.lock'",
")",... | Rotate the log file and make sure the configured number of files
is kept.
@return void | [
"Rotate",
"the",
"log",
"file",
"and",
"make",
"sure",
"the",
"configured",
"number",
"of",
"files",
"is",
"kept",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow.Log/Classes/Backend/FileBackend.php#L188-L213 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.