repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
neos/flow-development-collection | Neos.Cache/Classes/Backend/MemcachedBackend.php | MemcachedBackend.removeIdentifierFromAllTags | protected function removeIdentifierFromAllTags(string $entryIdentifier)
{
// Get tags for this identifier
$tags = $this->findTagsByIdentifier($entryIdentifier);
// Deassociate tags with this identifier
foreach ($tags as $tag) {
$identifiers = $this->findIdentifiersByTag($... | php | protected function removeIdentifierFromAllTags(string $entryIdentifier)
{
// Get tags for this identifier
$tags = $this->findTagsByIdentifier($entryIdentifier);
// Deassociate tags with this identifier
foreach ($tags as $tag) {
$identifiers = $this->findIdentifiersByTag($... | [
"protected",
"function",
"removeIdentifierFromAllTags",
"(",
"string",
"$",
"entryIdentifier",
")",
"{",
"// Get tags for this identifier",
"$",
"tags",
"=",
"$",
"this",
"->",
"findTagsByIdentifier",
"(",
"$",
"entryIdentifier",
")",
";",
"// Deassociate tags with this i... | Removes association of the identifier with the given tags
@param string $entryIdentifier
@return void | [
"Removes",
"association",
"of",
"the",
"identifier",
"with",
"the",
"given",
"tags"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Cache/Classes/Backend/MemcachedBackend.php#L393-L416 |
neos/flow-development-collection | Neos.Flow/Classes/Reflection/ReflectionServiceFactory.php | ReflectionServiceFactory.create | public function create()
{
if ($this->reflectionService !== null) {
return $this->reflectionService;
}
$cacheManager = $this->bootstrap->getEarlyInstance(CacheManager::class);
$configurationManager = $this->bootstrap->getEarlyInstance(ConfigurationManager::class);
... | php | public function create()
{
if ($this->reflectionService !== null) {
return $this->reflectionService;
}
$cacheManager = $this->bootstrap->getEarlyInstance(CacheManager::class);
$configurationManager = $this->bootstrap->getEarlyInstance(ConfigurationManager::class);
... | [
"public",
"function",
"create",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"reflectionService",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"reflectionService",
";",
"}",
"$",
"cacheManager",
"=",
"$",
"this",
"->",
"bootstrap",
"->",
"getEar... | Get reflection service instance | [
"Get",
"reflection",
"service",
"instance"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Reflection/ReflectionServiceFactory.php#L54-L76 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.integerExplode | public static function integerExplode(string $delimiter, string $string): array
{
$chunksArr = explode($delimiter, $string);
foreach ($chunksArr as $key => $value) {
$chunks[$key] = (int)$value;
}
reset($chunks);
return $chunks;
} | php | public static function integerExplode(string $delimiter, string $string): array
{
$chunksArr = explode($delimiter, $string);
foreach ($chunksArr as $key => $value) {
$chunks[$key] = (int)$value;
}
reset($chunks);
return $chunks;
} | [
"public",
"static",
"function",
"integerExplode",
"(",
"string",
"$",
"delimiter",
",",
"string",
"$",
"string",
")",
":",
"array",
"{",
"$",
"chunksArr",
"=",
"explode",
"(",
"$",
"delimiter",
",",
"$",
"string",
")",
";",
"foreach",
"(",
"$",
"chunksAr... | Explodes a $string delimited by $delimiter and passes each item in the array through intval().
Corresponds to explode(), but with conversion to integers for all values.
@param string $delimiter Delimiter string to explode with
@param string $string The string to explode
@return array Exploded values, all converted to ... | [
"Explodes",
"a",
"$string",
"delimited",
"by",
"$delimiter",
"and",
"passes",
"each",
"item",
"in",
"the",
"array",
"through",
"intval",
"()",
".",
"Corresponds",
"to",
"explode",
"()",
"but",
"with",
"conversion",
"to",
"integers",
"for",
"all",
"values",
"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L28-L36 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.trimExplode | public static function trimExplode(string $delimiter, string $string, bool $onlyNonEmptyValues = true): array
{
$chunksArr = explode($delimiter, $string);
$newChunksArr = [];
foreach ($chunksArr as $value) {
if ($onlyNonEmptyValues === false || strcmp('', trim($value))) {
... | php | public static function trimExplode(string $delimiter, string $string, bool $onlyNonEmptyValues = true): array
{
$chunksArr = explode($delimiter, $string);
$newChunksArr = [];
foreach ($chunksArr as $value) {
if ($onlyNonEmptyValues === false || strcmp('', trim($value))) {
... | [
"public",
"static",
"function",
"trimExplode",
"(",
"string",
"$",
"delimiter",
",",
"string",
"$",
"string",
",",
"bool",
"$",
"onlyNonEmptyValues",
"=",
"true",
")",
":",
"array",
"{",
"$",
"chunksArr",
"=",
"explode",
"(",
"$",
"delimiter",
",",
"$",
... | Explodes a string and trims all values for whitespace in the ends.
If $onlyNonEmptyValues is set, then all blank ('') values are removed.
@param string $delimiter Delimiter string to explode with
@param string $string The string to explode
@param boolean $onlyNonEmptyValues If disabled, even empty values (='') will be... | [
"Explodes",
"a",
"string",
"and",
"trims",
"all",
"values",
"for",
"whitespace",
"in",
"the",
"ends",
".",
"If",
"$onlyNonEmptyValues",
"is",
"set",
"then",
"all",
"blank",
"(",
")",
"values",
"are",
"removed",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L47-L58 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.arrayMergeRecursiveOverrule | public static function arrayMergeRecursiveOverrule(array $firstArray, array $secondArray, bool $dontAddNewKeys = false, bool $emptyValuesOverride = true): array
{
$data = [&$firstArray, $secondArray];
$entryCount = 1;
for ($i = 0; $i < $entryCount; $i++) {
$firstArrayInner = &$da... | php | public static function arrayMergeRecursiveOverrule(array $firstArray, array $secondArray, bool $dontAddNewKeys = false, bool $emptyValuesOverride = true): array
{
$data = [&$firstArray, $secondArray];
$entryCount = 1;
for ($i = 0; $i < $entryCount; $i++) {
$firstArrayInner = &$da... | [
"public",
"static",
"function",
"arrayMergeRecursiveOverrule",
"(",
"array",
"$",
"firstArray",
",",
"array",
"$",
"secondArray",
",",
"bool",
"$",
"dontAddNewKeys",
"=",
"false",
",",
"bool",
"$",
"emptyValuesOverride",
"=",
"true",
")",
":",
"array",
"{",
"$... | Merges two arrays recursively and "binary safe" (integer keys are overridden as well), overruling similar values
in the first array ($firstArray) with the values of the second array ($secondArray) in case of identical keys,
ie. keeping the values of the second.
@param array $firstArray First array
@param array $second... | [
"Merges",
"two",
"arrays",
"recursively",
"and",
"binary",
"safe",
"(",
"integer",
"keys",
"are",
"overridden",
"as",
"well",
")",
"overruling",
"similar",
"values",
"in",
"the",
"first",
"array",
"(",
"$firstArray",
")",
"with",
"the",
"values",
"of",
"the"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L71-L104 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.arrayMergeRecursiveOverruleWithCallback | public static function arrayMergeRecursiveOverruleWithCallback(array $firstArray, array $secondArray, \Closure $toArray): array
{
$data = [&$firstArray, $secondArray];
$entryCount = 1;
for ($i = 0; $i < $entryCount; $i++) {
$firstArrayInner = &$data[$i * 2];
$secondAr... | php | public static function arrayMergeRecursiveOverruleWithCallback(array $firstArray, array $secondArray, \Closure $toArray): array
{
$data = [&$firstArray, $secondArray];
$entryCount = 1;
for ($i = 0; $i < $entryCount; $i++) {
$firstArrayInner = &$data[$i * 2];
$secondAr... | [
"public",
"static",
"function",
"arrayMergeRecursiveOverruleWithCallback",
"(",
"array",
"$",
"firstArray",
",",
"array",
"$",
"secondArray",
",",
"\\",
"Closure",
"$",
"toArray",
")",
":",
"array",
"{",
"$",
"data",
"=",
"[",
"&",
"$",
"firstArray",
",",
"$... | Merges two arrays recursively and "binary safe" (integer keys are overridden as well), overruling similar values in the first array ($firstArray) with the values of the second array ($secondArray)
In case of identical keys, ie. keeping the values of the second. The given $toArray closure will be used if one of the two ... | [
"Merges",
"two",
"arrays",
"recursively",
"and",
"binary",
"safe",
"(",
"integer",
"keys",
"are",
"overridden",
"as",
"well",
")",
"overruling",
"similar",
"values",
"in",
"the",
"first",
"array",
"(",
"$firstArray",
")",
"with",
"the",
"values",
"of",
"the"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L115-L145 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.containsMultipleTypes | public static function containsMultipleTypes(array $array): bool
{
if (count($array) > 0) {
reset($array);
$previousType = gettype(current($array));
next($array);
foreach ($array as $value) {
if ($previousType !== gettype($value)) {
... | php | public static function containsMultipleTypes(array $array): bool
{
if (count($array) > 0) {
reset($array);
$previousType = gettype(current($array));
next($array);
foreach ($array as $value) {
if ($previousType !== gettype($value)) {
... | [
"public",
"static",
"function",
"containsMultipleTypes",
"(",
"array",
"$",
"array",
")",
":",
"bool",
"{",
"if",
"(",
"count",
"(",
"$",
"array",
")",
">",
"0",
")",
"{",
"reset",
"(",
"$",
"array",
")",
";",
"$",
"previousType",
"=",
"gettype",
"("... | Returns true if the given array contains elements of varying types
@param array $array
@return boolean | [
"Returns",
"true",
"if",
"the",
"given",
"array",
"contains",
"elements",
"of",
"varying",
"types"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L153-L166 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.array_reduce | public static function array_reduce(array $array, string $function, $initial = null)
{
$accumulator = $initial;
foreach ($array as $value) {
$accumulator = $function($accumulator, $value);
}
return $accumulator;
} | php | public static function array_reduce(array $array, string $function, $initial = null)
{
$accumulator = $initial;
foreach ($array as $value) {
$accumulator = $function($accumulator, $value);
}
return $accumulator;
} | [
"public",
"static",
"function",
"array_reduce",
"(",
"array",
"$",
"array",
",",
"string",
"$",
"function",
",",
"$",
"initial",
"=",
"null",
")",
"{",
"$",
"accumulator",
"=",
"$",
"initial",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"value",
")",... | Replacement for array_reduce that allows any type for $initial (instead
of only integer)
@param array $array the array to reduce
@param string $function the reduce function with the same order of parameters as in the native array_reduce (i.e. accumulator first, then current array element)
@param mixed $initial the ini... | [
"Replacement",
"for",
"array_reduce",
"that",
"allows",
"any",
"type",
"for",
"$initial",
"(",
"instead",
"of",
"only",
"integer",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L177-L184 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.getValueByPath | public static function getValueByPath(array &$array, $path)
{
if (is_string($path)) {
$path = explode('.', $path);
} elseif (!is_array($path)) {
throw new \InvalidArgumentException('getValueByPath() expects $path to be string or array, "' . gettype($path) . '" given.', 130495... | php | public static function getValueByPath(array &$array, $path)
{
if (is_string($path)) {
$path = explode('.', $path);
} elseif (!is_array($path)) {
throw new \InvalidArgumentException('getValueByPath() expects $path to be string or array, "' . gettype($path) . '" given.', 130495... | [
"public",
"static",
"function",
"getValueByPath",
"(",
"array",
"&",
"$",
"array",
",",
"$",
"path",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"path",
")",
")",
"{",
"$",
"path",
"=",
"explode",
"(",
"'.'",
",",
"$",
"path",
")",
";",
"}",
"els... | Returns the value of a nested array by following the specifed path.
@param array &$array The array to traverse as a reference
@param array|string $path The path to follow. Either a simple array of keys or a string in the format 'foo.bar.baz'
@return mixed The value found, NULL if the path didn't exist (note there is n... | [
"Returns",
"the",
"value",
"of",
"a",
"nested",
"array",
"by",
"following",
"the",
"specifed",
"path",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L194-L211 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.setValueByPath | public static function setValueByPath($subject, $path, $value)
{
if (!is_array($subject) && !($subject instanceof \ArrayAccess)) {
throw new \InvalidArgumentException('setValueByPath() expects $subject to be array or an object implementing \ArrayAccess, "' . (is_object($subject) ? get_class($sub... | php | public static function setValueByPath($subject, $path, $value)
{
if (!is_array($subject) && !($subject instanceof \ArrayAccess)) {
throw new \InvalidArgumentException('setValueByPath() expects $subject to be array or an object implementing \ArrayAccess, "' . (is_object($subject) ? get_class($sub... | [
"public",
"static",
"function",
"setValueByPath",
"(",
"$",
"subject",
",",
"$",
"path",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"subject",
")",
"&&",
"!",
"(",
"$",
"subject",
"instanceof",
"\\",
"ArrayAccess",
")",
")",
"... | Sets the given value in a nested array or object by following the specified path.
@param array|\ArrayAccess $subject The array or ArrayAccess instance to work on
@param array|string $path The path to follow. Either a simple array of keys or a string in the format 'foo.bar.baz'
@param mixed $value The value to set
@ret... | [
"Sets",
"the",
"given",
"value",
"in",
"a",
"nested",
"array",
"or",
"object",
"by",
"following",
"the",
"specified",
"path",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L222-L242 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.unsetValueByPath | public static function unsetValueByPath(array $array, $path): array
{
if (is_string($path)) {
$path = explode('.', $path);
} elseif (!is_array($path)) {
throw new \InvalidArgumentException('unsetValueByPath() expects $path to be string or array, "' . gettype($path) . '" given... | php | public static function unsetValueByPath(array $array, $path): array
{
if (is_string($path)) {
$path = explode('.', $path);
} elseif (!is_array($path)) {
throw new \InvalidArgumentException('unsetValueByPath() expects $path to be string or array, "' . gettype($path) . '" given... | [
"public",
"static",
"function",
"unsetValueByPath",
"(",
"array",
"$",
"array",
",",
"$",
"path",
")",
":",
"array",
"{",
"if",
"(",
"is_string",
"(",
"$",
"path",
")",
")",
"{",
"$",
"path",
"=",
"explode",
"(",
"'.'",
",",
"$",
"path",
")",
";",
... | Unsets an element/part of a nested array by following the specified path.
@param array $array The array
@param array|string $path The path to follow. Either a simple array of keys or a string in the format 'foo.bar.baz'
@return array The modified array
@throws \InvalidArgumentException | [
"Unsets",
"an",
"element",
"/",
"part",
"of",
"a",
"nested",
"array",
"by",
"following",
"the",
"specified",
"path",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L252-L269 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.sortKeysRecursively | public static function sortKeysRecursively(array &$array, int $sortFlags = null): bool
{
foreach ($array as &$value) {
if (is_array($value)) {
if (self::sortKeysRecursively($value, $sortFlags) === false) {
return false;
}
}
... | php | public static function sortKeysRecursively(array &$array, int $sortFlags = null): bool
{
foreach ($array as &$value) {
if (is_array($value)) {
if (self::sortKeysRecursively($value, $sortFlags) === false) {
return false;
}
}
... | [
"public",
"static",
"function",
"sortKeysRecursively",
"(",
"array",
"&",
"$",
"array",
",",
"int",
"$",
"sortFlags",
"=",
"null",
")",
":",
"bool",
"{",
"foreach",
"(",
"$",
"array",
"as",
"&",
"$",
"value",
")",
"{",
"if",
"(",
"is_array",
"(",
"$"... | Sorts multidimensional arrays by recursively calling ksort on its elements.
@param array $array the array to sort
@param integer $sortFlags may be used to modify the sorting behavior using these values (see http://www.php.net/manual/en/function.sort.php)
@return boolean true on success, false on failure
@see asort() | [
"Sorts",
"multidimensional",
"arrays",
"by",
"recursively",
"calling",
"ksort",
"on",
"its",
"elements",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L279-L289 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.convertObjectToArray | public static function convertObjectToArray($subject): array
{
if (!is_object($subject) && !is_array($subject)) {
throw new \InvalidArgumentException('convertObjectToArray expects either array or object as input, ' . gettype($subject) . ' given.', 1287059709);
}
if (is_object($su... | php | public static function convertObjectToArray($subject): array
{
if (!is_object($subject) && !is_array($subject)) {
throw new \InvalidArgumentException('convertObjectToArray expects either array or object as input, ' . gettype($subject) . ' given.', 1287059709);
}
if (is_object($su... | [
"public",
"static",
"function",
"convertObjectToArray",
"(",
"$",
"subject",
")",
":",
"array",
"{",
"if",
"(",
"!",
"is_object",
"(",
"$",
"subject",
")",
"&&",
"!",
"is_array",
"(",
"$",
"subject",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentE... | Recursively convert an object hierarchy into an associative array.
@param mixed $subject An object or array of objects
@return array The subject represented as an array
@throws \InvalidArgumentException | [
"Recursively",
"convert",
"an",
"object",
"hierarchy",
"into",
"an",
"associative",
"array",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L298-L312 |
neos/flow-development-collection | Neos.Utility.Arrays/Classes/Arrays.php | Arrays.removeEmptyElementsRecursively | public static function removeEmptyElementsRecursively(array $array): array
{
$result = $array;
foreach ($result as $key => $value) {
if (is_array($value)) {
$result[$key] = self::removeEmptyElementsRecursively($value);
if ($result[$key] === []) {
... | php | public static function removeEmptyElementsRecursively(array $array): array
{
$result = $array;
foreach ($result as $key => $value) {
if (is_array($value)) {
$result[$key] = self::removeEmptyElementsRecursively($value);
if ($result[$key] === []) {
... | [
"public",
"static",
"function",
"removeEmptyElementsRecursively",
"(",
"array",
"$",
"array",
")",
":",
"array",
"{",
"$",
"result",
"=",
"$",
"array",
";",
"foreach",
"(",
"$",
"result",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"is_a... | Recursively removes empty array elements.
@param array $array
@return array the modified array | [
"Recursively",
"removes",
"empty",
"array",
"elements",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Arrays/Classes/Arrays.php#L320-L334 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/TranslationProvider/XliffTranslationProvider.php | XliffTranslationProvider.getTranslationByOriginalLabel | public function getTranslationByOriginalLabel($originalLabel, I18n\Locale $locale, $pluralForm = null, $sourceName = 'Main', $packageKey = 'Neos.Flow')
{
if ($pluralForm !== null) {
$pluralFormsForProvidedLocale = $this->pluralsReader->getPluralForms($locale);
if (!is_array($pluralF... | php | public function getTranslationByOriginalLabel($originalLabel, I18n\Locale $locale, $pluralForm = null, $sourceName = 'Main', $packageKey = 'Neos.Flow')
{
if ($pluralForm !== null) {
$pluralFormsForProvidedLocale = $this->pluralsReader->getPluralForms($locale);
if (!is_array($pluralF... | [
"public",
"function",
"getTranslationByOriginalLabel",
"(",
"$",
"originalLabel",
",",
"I18n",
"\\",
"Locale",
"$",
"locale",
",",
"$",
"pluralForm",
"=",
"null",
",",
"$",
"sourceName",
"=",
"'Main'",
",",
"$",
"packageKey",
"=",
"'Neos.Flow'",
")",
"{",
"i... | Returns translated label of $originalLabel from a file defined by $sourceName.
Chooses particular form of label if available and defined in $pluralForm.
@param string $originalLabel Label used as a key in order to find translation
@param I18n\Locale $locale Locale to use
@param string $pluralForm One of RULE constant... | [
"Returns",
"translated",
"label",
"of",
"$originalLabel",
"from",
"a",
"file",
"defined",
"by",
"$sourceName",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/TranslationProvider/XliffTranslationProvider.php#L66-L83 |
neos/flow-development-collection | Neos.Flow/Classes/I18n/TranslationProvider/XliffTranslationProvider.php | XliffTranslationProvider.getTranslationById | public function getTranslationById($labelId, I18n\Locale $locale, $pluralForm = null, $sourceName = 'Main', $packageKey = 'Neos.Flow')
{
if ($pluralForm !== null) {
$pluralFormsForProvidedLocale = $this->pluralsReader->getPluralForms($locale);
if (!in_array($pluralForm, $pluralForms... | php | public function getTranslationById($labelId, I18n\Locale $locale, $pluralForm = null, $sourceName = 'Main', $packageKey = 'Neos.Flow')
{
if ($pluralForm !== null) {
$pluralFormsForProvidedLocale = $this->pluralsReader->getPluralForms($locale);
if (!in_array($pluralForm, $pluralForms... | [
"public",
"function",
"getTranslationById",
"(",
"$",
"labelId",
",",
"I18n",
"\\",
"Locale",
"$",
"locale",
",",
"$",
"pluralForm",
"=",
"null",
",",
"$",
"sourceName",
"=",
"'Main'",
",",
"$",
"packageKey",
"=",
"'Neos.Flow'",
")",
"{",
"if",
"(",
"$",... | Returns label for a key ($labelId) from a file defined by $sourceName.
Chooses particular form of label if available and defined in $pluralForm.
@param string $labelId Key used to find translated label
@param I18n\Locale $locale Locale to use
@param string $pluralForm One of RULE constants of PluralsReader
@param str... | [
"Returns",
"label",
"for",
"a",
"key",
"(",
"$labelId",
")",
"from",
"a",
"file",
"defined",
"by",
"$sourceName",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/TranslationProvider/XliffTranslationProvider.php#L98-L115 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php | Configuration.setProperties | public function setProperties(array $properties)
{
if ($properties === []) {
$this->properties = [];
} else {
foreach ($properties as $value) {
if ($value instanceof ConfigurationProperty) {
$this->setProperty($value);
} els... | php | public function setProperties(array $properties)
{
if ($properties === []) {
$this->properties = [];
} else {
foreach ($properties as $value) {
if ($value instanceof ConfigurationProperty) {
$this->setProperty($value);
} els... | [
"public",
"function",
"setProperties",
"(",
"array",
"$",
"properties",
")",
"{",
"if",
"(",
"$",
"properties",
"===",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"properties",
"=",
"[",
"]",
";",
"}",
"else",
"{",
"foreach",
"(",
"$",
"properties",
"as",... | Setter function for injection properties. If an empty array is passed to this
method, all (possibly) defined properties are removed from the configuration.
@param array $properties Array of ConfigurationProperty
@throws InvalidConfigurationException
@return void | [
"Setter",
"function",
"for",
"injection",
"properties",
".",
"If",
"an",
"empty",
"array",
"is",
"passed",
"to",
"this",
"method",
"all",
"(",
"possibly",
")",
"defined",
"properties",
"are",
"removed",
"from",
"the",
"configuration",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php#L333-L346 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php | Configuration.setArguments | public function setArguments(array $arguments)
{
if ($arguments === []) {
$this->arguments = [];
} else {
foreach ($arguments as $argument) {
if ($argument !== null && $argument instanceof ConfigurationArgument) {
$this->setArgument($argume... | php | public function setArguments(array $arguments)
{
if ($arguments === []) {
$this->arguments = [];
} else {
foreach ($arguments as $argument) {
if ($argument !== null && $argument instanceof ConfigurationArgument) {
$this->setArgument($argume... | [
"public",
"function",
"setArguments",
"(",
"array",
"$",
"arguments",
")",
"{",
"if",
"(",
"$",
"arguments",
"===",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"arguments",
"=",
"[",
"]",
";",
"}",
"else",
"{",
"foreach",
"(",
"$",
"arguments",
"as",
"$... | Setter function for injection constructor arguments. If an empty array is passed to this
method, all (possibly) defined constructor arguments are removed from the configuration.
@param array<ConfigurationArgument> $arguments
@throws InvalidConfigurationException
@return void | [
"Setter",
"function",
"for",
"injection",
"constructor",
"arguments",
".",
"If",
"an",
"empty",
"array",
"is",
"passed",
"to",
"this",
"method",
"all",
"(",
"possibly",
")",
"defined",
"constructor",
"arguments",
"are",
"removed",
"from",
"the",
"configuration",... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php#L377-L390 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php | Configuration.getArguments | public function getArguments()
{
if (count($this->arguments) < 1) {
return [];
}
asort($this->arguments);
$lastArgument = end($this->arguments);
$argumentsCount = $lastArgument->getIndex();
$sortedArguments = [];
for ($index = 1; $index <= $argume... | php | public function getArguments()
{
if (count($this->arguments) < 1) {
return [];
}
asort($this->arguments);
$lastArgument = end($this->arguments);
$argumentsCount = $lastArgument->getIndex();
$sortedArguments = [];
for ($index = 1; $index <= $argume... | [
"public",
"function",
"getArguments",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"arguments",
")",
"<",
"1",
")",
"{",
"return",
"[",
"]",
";",
"}",
"asort",
"(",
"$",
"this",
"->",
"arguments",
")",
";",
"$",
"lastArgument",
"=",
... | Returns a sorted array of constructor arguments indexed by position (starting with "1")
@return array<ConfigurationArgument> A sorted array of ConfigurationArgument objects with the argument position as index | [
"Returns",
"a",
"sorted",
"array",
"of",
"constructor",
"arguments",
"indexed",
"by",
"position",
"(",
"starting",
"with",
"1",
")"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php#L408-L422 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php | TrustedProxiesComponent.getTrustedProxyHeaderValues | protected function getTrustedProxyHeaderValues($type, ServerRequestInterface $request)
{
if (isset($this->settings['headers']) && is_string($this->settings['headers'])) {
$trustedHeaders = $this->settings['headers'];
} else {
$trustedHeaders = $this->settings['headers'][$type... | php | protected function getTrustedProxyHeaderValues($type, ServerRequestInterface $request)
{
if (isset($this->settings['headers']) && is_string($this->settings['headers'])) {
$trustedHeaders = $this->settings['headers'];
} else {
$trustedHeaders = $this->settings['headers'][$type... | [
"protected",
"function",
"getTrustedProxyHeaderValues",
"(",
"$",
"type",
",",
"ServerRequestInterface",
"$",
"request",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"settings",
"[",
"'headers'",
"]",
")",
"&&",
"is_string",
"(",
"$",
"this",
"->",
... | Get the values of trusted proxy header.
@param string $type One of the HEADER_* constants
@param ServerRequestInterface $request The request to get the trusted proxy header from
@return \Iterator An array of the values for this header type or NULL if this header type should not be trusted | [
"Get",
"the",
"values",
"of",
"trusted",
"proxy",
"header",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php#L125-L153 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php | TrustedProxiesComponent.getFirstTrustedProxyHeaderValue | protected function getFirstTrustedProxyHeaderValue($type, Request $request)
{
$values = $this->getTrustedProxyHeaderValues($type, $request)->current();
return $values !== null ? reset($values) : null;
} | php | protected function getFirstTrustedProxyHeaderValue($type, Request $request)
{
$values = $this->getTrustedProxyHeaderValues($type, $request)->current();
return $values !== null ? reset($values) : null;
} | [
"protected",
"function",
"getFirstTrustedProxyHeaderValue",
"(",
"$",
"type",
",",
"Request",
"$",
"request",
")",
"{",
"$",
"values",
"=",
"$",
"this",
"->",
"getTrustedProxyHeaderValues",
"(",
"$",
"type",
",",
"$",
"request",
")",
"->",
"current",
"(",
")... | Convenience getter for the first value of a given trusted proxy header.
@param string $type One of the HEADER_* constants
@param Request $request The request to get the trusted proxy header from
@return mixed|null The first value of this header type or NULL if this header type should not be trusted | [
"Convenience",
"getter",
"for",
"the",
"first",
"value",
"of",
"a",
"given",
"trusted",
"proxy",
"header",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php#L162-L166 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php | TrustedProxiesComponent.ipIsTrustedProxy | protected function ipIsTrustedProxy($ipAddress)
{
if (filter_var($ipAddress, FILTER_VALIDATE_IP) === false) {
return false;
}
$allowedProxies = $this->settings['proxies'];
if ($allowedProxies === '*') {
return true;
}
if (is_string($allowedProx... | php | protected function ipIsTrustedProxy($ipAddress)
{
if (filter_var($ipAddress, FILTER_VALIDATE_IP) === false) {
return false;
}
$allowedProxies = $this->settings['proxies'];
if ($allowedProxies === '*') {
return true;
}
if (is_string($allowedProx... | [
"protected",
"function",
"ipIsTrustedProxy",
"(",
"$",
"ipAddress",
")",
"{",
"if",
"(",
"filter_var",
"(",
"$",
"ipAddress",
",",
"FILTER_VALIDATE_IP",
")",
"===",
"false",
")",
"{",
"return",
"false",
";",
"}",
"$",
"allowedProxies",
"=",
"$",
"this",
"-... | Check if the given IP address is from a trusted proxy.
@param string $ipAddress
@return bool | [
"Check",
"if",
"the",
"given",
"IP",
"address",
"is",
"from",
"a",
"trusted",
"proxy",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php#L174-L195 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php | TrustedProxiesComponent.isFromTrustedProxy | protected function isFromTrustedProxy(Request $request)
{
$server = $request->getServerParams();
if (!isset($server['REMOTE_ADDR'])) {
return false;
}
return $this->ipIsTrustedProxy($server['REMOTE_ADDR']);
} | php | protected function isFromTrustedProxy(Request $request)
{
$server = $request->getServerParams();
if (!isset($server['REMOTE_ADDR'])) {
return false;
}
return $this->ipIsTrustedProxy($server['REMOTE_ADDR']);
} | [
"protected",
"function",
"isFromTrustedProxy",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"server",
"=",
"$",
"request",
"->",
"getServerParams",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"server",
"[",
"'REMOTE_ADDR'",
"]",
")",
")",
"{",
... | Check if the given request is from a trusted proxy.
@param Request $request
@return bool If the server REMOTE_ADDR is from a trusted proxy | [
"Check",
"if",
"the",
"given",
"request",
"is",
"from",
"a",
"trusted",
"proxy",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php#L203-L210 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php | TrustedProxiesComponent.getTrustedClientIpAddress | protected function getTrustedClientIpAddress(ServerRequestInterface $request)
{
$server = $request->getServerParams();
if (!isset($server['REMOTE_ADDR'])) {
return false;
}
$ipAddress = $server['REMOTE_ADDR'];
$trustedIpHeaders = $this->getTrustedProxyHeaderValue... | php | protected function getTrustedClientIpAddress(ServerRequestInterface $request)
{
$server = $request->getServerParams();
if (!isset($server['REMOTE_ADDR'])) {
return false;
}
$ipAddress = $server['REMOTE_ADDR'];
$trustedIpHeaders = $this->getTrustedProxyHeaderValue... | [
"protected",
"function",
"getTrustedClientIpAddress",
"(",
"ServerRequestInterface",
"$",
"request",
")",
"{",
"$",
"server",
"=",
"$",
"request",
"->",
"getServerParams",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"server",
"[",
"'REMOTE_ADDR'",
"]",
... | Get the most trusted client's IP address.
This is the right-most address in the trusted client IP header, that is not a trusted proxy address.
If all proxies are trusted, this is the left-most address in the header.
If no proxies are trusted or no client IP header is trusted, this is the remote address of the machine
... | [
"Get",
"the",
"most",
"trusted",
"client",
"s",
"IP",
"address",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/TrustedProxiesComponent.php#L223-L259 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/EscapingFlagProcessor.php | EscapingFlagProcessor.preProcessSource | public function preProcessSource($templateSource)
{
$matches = [];
preg_match_all(self::$SCAN_PATTERN_ESCAPINGMODIFIER, $templateSource, $matches, PREG_SET_ORDER);
if ($matches === []) {
return $templateSource;
}
if (count($matches) > 1) {
throw new Ex... | php | public function preProcessSource($templateSource)
{
$matches = [];
preg_match_all(self::$SCAN_PATTERN_ESCAPINGMODIFIER, $templateSource, $matches, PREG_SET_ORDER);
if ($matches === []) {
return $templateSource;
}
if (count($matches) > 1) {
throw new Ex... | [
"public",
"function",
"preProcessSource",
"(",
"$",
"templateSource",
")",
"{",
"$",
"matches",
"=",
"[",
"]",
";",
"preg_match_all",
"(",
"self",
"::",
"$",
"SCAN_PATTERN_ESCAPINGMODIFIER",
",",
"$",
"templateSource",
",",
"$",
"matches",
",",
"PREG_SET_ORDER",... | Pre-process the template source before it is
returned to the TemplateParser or passed to
the next TemplateProcessorInterface instance.
@param string $templateSource
@return string | [
"Pre",
"-",
"process",
"the",
"template",
"source",
"before",
"it",
"is",
"returned",
"to",
"the",
"TemplateParser",
"or",
"passed",
"to",
"the",
"next",
"TemplateProcessorInterface",
"instance",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/Parser/TemplateProcessor/EscapingFlagProcessor.php#L46-L62 |
neos/flow-development-collection | Neos.Eel/Classes/FlowQuery/Operations/AddOperation.php | AddOperation.evaluate | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$output = [];
foreach ($flowQuery->getContext() as $element) {
$output[] = $element;
}
if (isset($arguments[0])) {
if (is_array($arguments[0]) || $arguments[0] instanceof \Traversable) {
... | php | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$output = [];
foreach ($flowQuery->getContext() as $element) {
$output[] = $element;
}
if (isset($arguments[0])) {
if (is_array($arguments[0]) || $arguments[0] instanceof \Traversable) {
... | [
"public",
"function",
"evaluate",
"(",
"FlowQuery",
"$",
"flowQuery",
",",
"array",
"$",
"arguments",
")",
"{",
"$",
"output",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"flowQuery",
"->",
"getContext",
"(",
")",
"as",
"$",
"element",
")",
"{",
"$",
"o... | {@inheritdoc}
@param FlowQuery $flowQuery the FlowQuery object
@param array $arguments the elements to add (as array in index 0)
@return void | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/AddOperation.php#L37-L53 |
neos/flow-development-collection | Neos.Flow/Classes/SignalSlot/SignalAspect.php | SignalAspect.forwardSignalToDispatcher | public function forwardSignalToDispatcher(JoinPointInterface $joinPoint)
{
$signalName = lcfirst(str_replace('emit', '', $joinPoint->getMethodName()));
$this->dispatcher->dispatch($joinPoint->getClassName(), $signalName, $joinPoint->getMethodArguments());
} | php | public function forwardSignalToDispatcher(JoinPointInterface $joinPoint)
{
$signalName = lcfirst(str_replace('emit', '', $joinPoint->getMethodName()));
$this->dispatcher->dispatch($joinPoint->getClassName(), $signalName, $joinPoint->getMethodArguments());
} | [
"public",
"function",
"forwardSignalToDispatcher",
"(",
"JoinPointInterface",
"$",
"joinPoint",
")",
"{",
"$",
"signalName",
"=",
"lcfirst",
"(",
"str_replace",
"(",
"'emit'",
",",
"''",
",",
"$",
"joinPoint",
"->",
"getMethodName",
"(",
")",
")",
")",
";",
... | Passes the signal over to the Dispatcher
@Flow\AfterReturning("methodAnnotatedWith(Neos\Flow\Annotations\Signal)")
@param JoinPointInterface $joinPoint The current join point
@return void | [
"Passes",
"the",
"signal",
"over",
"to",
"the",
"Dispatcher"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/SignalSlot/SignalAspect.php#L38-L42 |
neos/flow-development-collection | Neos.Flow/Classes/Http/Component/ComponentChain.php | ComponentChain.handle | public function handle(ComponentContext $componentContext)
{
if (!isset($this->options['components'])) {
return;
}
/** @var ComponentInterface $component */
foreach ($this->options['components'] as $component) {
if ($component === null) {
conti... | php | public function handle(ComponentContext $componentContext)
{
if (!isset($this->options['components'])) {
return;
}
/** @var ComponentInterface $component */
foreach ($this->options['components'] as $component) {
if ($component === null) {
conti... | [
"public",
"function",
"handle",
"(",
"ComponentContext",
"$",
"componentContext",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"'components'",
"]",
")",
")",
"{",
"return",
";",
"}",
"/** @var ComponentInterface $component */",
"f... | Handle the configured components in the order of the chain
@param ComponentContext $componentContext
@return void | [
"Handle",
"the",
"configured",
"components",
"in",
"the",
"order",
"of",
"the",
"chain"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/Component/ComponentChain.php#L51-L68 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.injectSettings | public function injectSettings(array $settings)
{
$this->sessionCookieName = $settings['session']['name'];
$this->sessionCookieLifetime = (integer)$settings['session']['cookie']['lifetime'];
$this->sessionCookieDomain = $settings['session']['cookie']['domain'];
$this->sessionCookiePa... | php | public function injectSettings(array $settings)
{
$this->sessionCookieName = $settings['session']['name'];
$this->sessionCookieLifetime = (integer)$settings['session']['cookie']['lifetime'];
$this->sessionCookieDomain = $settings['session']['cookie']['domain'];
$this->sessionCookiePa... | [
"public",
"function",
"injectSettings",
"(",
"array",
"$",
"settings",
")",
"{",
"$",
"this",
"->",
"sessionCookieName",
"=",
"$",
"settings",
"[",
"'session'",
"]",
"[",
"'name'",
"]",
";",
"$",
"this",
"->",
"sessionCookieLifetime",
"=",
"(",
"integer",
... | Injects the Flow settings
@param array $settings Settings of the Flow package
@return void | [
"Injects",
"the",
"Flow",
"settings"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L227-L238 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.start | public function start()
{
if ($this->started === false) {
$this->sessionIdentifier = Algorithms::generateRandomString(32);
$this->storageIdentifier = Algorithms::generateUUID();
$this->sessionCookie = new Cookie($this->sessionCookieName, $this->sessionIdentifier, 0, $this... | php | public function start()
{
if ($this->started === false) {
$this->sessionIdentifier = Algorithms::generateRandomString(32);
$this->storageIdentifier = Algorithms::generateUUID();
$this->sessionCookie = new Cookie($this->sessionCookieName, $this->sessionIdentifier, 0, $this... | [
"public",
"function",
"start",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"===",
"false",
")",
"{",
"$",
"this",
"->",
"sessionIdentifier",
"=",
"Algorithms",
"::",
"generateRandomString",
"(",
"32",
")",
";",
"$",
"this",
"->",
"storageIden... | Starts the session, if it has not been already started
@return void
@api
@deprecated This method is not deprecated, but be aware that from next major a cookie will no longer be auto generated.
@see CookieEnabledInterface | [
"Starts",
"the",
"session",
"if",
"it",
"has",
"not",
"been",
"already",
"started"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L304-L315 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.canBeResumed | public function canBeResumed()
{
if ($this->sessionCookie === null || $this->started === true) {
return false;
}
$sessionMetaData = $this->metaDataCache->get($this->sessionCookie->getValue());
if ($sessionMetaData === false) {
return false;
}
$... | php | public function canBeResumed()
{
if ($this->sessionCookie === null || $this->started === true) {
return false;
}
$sessionMetaData = $this->metaDataCache->get($this->sessionCookie->getValue());
if ($sessionMetaData === false) {
return false;
}
$... | [
"public",
"function",
"canBeResumed",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"sessionCookie",
"===",
"null",
"||",
"$",
"this",
"->",
"started",
"===",
"true",
")",
"{",
"return",
"false",
";",
"}",
"$",
"sessionMetaData",
"=",
"$",
"this",
"->",... | Returns true if there is a session that can be resumed.
If a to-be-resumed session was inactive for too long, this function will
trigger the expiration of that session. An expired session cannot be resumed.
NOTE that this method does a bit more than the name implies: Because the
session info data needs to be loaded, ... | [
"Returns",
"true",
"if",
"there",
"is",
"a",
"session",
"that",
"can",
"be",
"resumed",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L330-L343 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.resume | public function resume()
{
if ($this->started === false && $this->canBeResumed()) {
$this->started = true;
$sessionObjects = $this->storageCache->get($this->storageIdentifier . md5('Neos_Flow_Object_ObjectManager'));
if (is_array($sessionObjects)) {
forea... | php | public function resume()
{
if ($this->started === false && $this->canBeResumed()) {
$this->started = true;
$sessionObjects = $this->storageCache->get($this->storageIdentifier . md5('Neos_Flow_Object_ObjectManager'));
if (is_array($sessionObjects)) {
forea... | [
"public",
"function",
"resume",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"===",
"false",
"&&",
"$",
"this",
"->",
"canBeResumed",
"(",
")",
")",
"{",
"$",
"this",
"->",
"started",
"=",
"true",
";",
"$",
"sessionObjects",
"=",
"$",
"t... | Resumes an existing session, if any.
@return integer If a session was resumed, the inactivity of this session since the last request is returned
@api | [
"Resumes",
"an",
"existing",
"session",
"if",
"any",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L351-L377 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.renewId | public function renewId()
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to renew the session identifier, but the session has not been started yet.', 1351182429);
}
if ($this->remote === true) {
throw new Exception\OperationNotS... | php | public function renewId()
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to renew the session identifier, but the session has not been started yet.', 1351182429);
}
if ($this->remote === true) {
throw new Exception\OperationNotS... | [
"public",
"function",
"renewId",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to renew the session identifier, but the session has not been started yet.'",
... | Generates and propagates a new session ID and transfers all existing data
to the new session.
@return string The new session ID
@throws Exception\SessionNotStartedException
@throws Exception\OperationNotSupportedException
@api | [
"Generates",
"and",
"propagates",
"a",
"new",
"session",
"ID",
"and",
"transfers",
"all",
"existing",
"data",
"to",
"the",
"new",
"session",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L403-L418 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.getData | public function getData($key)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to get session data, but the session has not been started yet.', 1351162255);
}
return $this->storageCache->get($this->storageIdentifier . md5($key));
} | php | public function getData($key)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to get session data, but the session has not been started yet.', 1351162255);
}
return $this->storageCache->get($this->storageIdentifier . md5($key));
} | [
"public",
"function",
"getData",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to get session data, but the session has not been started yet.'"... | Returns the data associated with the given key.
@param string $key An identifier for the content stored in the session.
@return mixed The contents associated with the given key
@throws Exception\SessionNotStartedException | [
"Returns",
"the",
"data",
"associated",
"with",
"the",
"given",
"key",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L427-L433 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.hasKey | public function hasKey($key)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to check a session data entry, but the session has not been started yet.', 1352488661);
}
return $this->storageCache->has($this->storageIdentifier . md5($key));
... | php | public function hasKey($key)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to check a session data entry, but the session has not been started yet.', 1352488661);
}
return $this->storageCache->has($this->storageIdentifier . md5($key));
... | [
"public",
"function",
"hasKey",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to check a session data entry, but the session has not been start... | Returns true if a session data entry $key is available.
@param string $key Entry identifier of the session data
@return boolean
@throws Exception\SessionNotStartedException | [
"Returns",
"true",
"if",
"a",
"session",
"data",
"entry",
"$key",
"is",
"available",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L442-L448 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.putData | public function putData($key, $data)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to create a session data entry, but the session has not been started yet.', 1351162259);
}
if (is_resource($data)) {
throw new Exception\DataNot... | php | public function putData($key, $data)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to create a session data entry, but the session has not been started yet.', 1351162259);
}
if (is_resource($data)) {
throw new Exception\DataNot... | [
"public",
"function",
"putData",
"(",
"$",
"key",
",",
"$",
"data",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to create a session data entry, but the ... | Stores the given data under the given key in the session
@param string $key The key under which the data should be stored
@param mixed $data The data to be stored
@return void
@throws Exception\DataNotSerializableException
@throws Exception\SessionNotStartedException
@api | [
"Stores",
"the",
"given",
"data",
"under",
"the",
"given",
"key",
"in",
"the",
"session"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L460-L469 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.addTag | public function addTag($tag)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to tag a session which has not been started yet.', 1355143533);
}
if (!$this->metaDataCache->isValidTag($tag)) {
throw new \InvalidArgumentException(spr... | php | public function addTag($tag)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to tag a session which has not been started yet.', 1355143533);
}
if (!$this->metaDataCache->isValidTag($tag)) {
throw new \InvalidArgumentException(spr... | [
"public",
"function",
"addTag",
"(",
"$",
"tag",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to tag a session which has not been started yet.'",
",",
"135... | Tags this session with the given tag.
Note that third-party libraries might also tag your session. Therefore it is
recommended to use namespaced tags such as "Acme-Demo-MySpecialTag".
@param string $tag The tag – must match be a valid cache frontend tag
@return void
@throws Exception\SessionNotStartedException
@throw... | [
"Tags",
"this",
"session",
"with",
"the",
"given",
"tag",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L502-L513 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.removeTag | public function removeTag($tag)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to tag a session which has not been started yet.', 1355150140);
}
$index = array_search($tag, $this->tags);
if ($index !== false) {
unset($th... | php | public function removeTag($tag)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to tag a session which has not been started yet.', 1355150140);
}
$index = array_search($tag, $this->tags);
if ($index !== false) {
unset($th... | [
"public",
"function",
"removeTag",
"(",
"$",
"tag",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to tag a session which has not been started yet.'",
",",
"... | Removes the specified tag from this session.
@param string $tag The tag – must match be a valid cache frontend tag
@return void
@throws Exception\SessionNotStartedException
@api | [
"Removes",
"the",
"specified",
"tag",
"from",
"this",
"session",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L523-L532 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.touch | public function touch()
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to touch a session, but the session has not been started yet.', 1354284318);
}
// Only makes sense for remote sessions because the currently active session
// w... | php | public function touch()
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to touch a session, but the session has not been started yet.', 1354284318);
}
// Only makes sense for remote sessions because the currently active session
// w... | [
"public",
"function",
"touch",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to touch a session, but the session has not been started yet.'",
",",
"1354284... | Updates the last activity time to "now".
@return void
@throws Exception\SessionNotStartedException | [
"Updates",
"the",
"last",
"activity",
"time",
"to",
"now",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L556-L568 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.destroy | public function destroy($reason = null)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to destroy a session which has not been started yet.', 1351162668);
}
if ($this->remote !== true) {
$this->sessionCookie->expire();
... | php | public function destroy($reason = null)
{
if ($this->started !== true) {
throw new Exception\SessionNotStartedException('Tried to destroy a session which has not been started yet.', 1351162668);
}
if ($this->remote !== true) {
$this->sessionCookie->expire();
... | [
"public",
"function",
"destroy",
"(",
"$",
"reason",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"!==",
"true",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"SessionNotStartedException",
"(",
"'Tried to destroy a session which has not been star... | Explicitly destroys all session data
@param string $reason A reason for destroying the session – used by the LoggingAspect
@return void
@throws Exception\SessionNotStartedException
@api | [
"Explicitly",
"destroys",
"all",
"session",
"data"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L589-L606 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.collectGarbage | public function collectGarbage()
{
if ($this->inactivityTimeout === 0) {
return 0;
}
if ($this->metaDataCache->has('_garbage-collection-running')) {
return false;
}
$sessionRemovalCount = 0;
$this->metaDataCache->set('_garbage-collection-runni... | php | public function collectGarbage()
{
if ($this->inactivityTimeout === 0) {
return 0;
}
if ($this->metaDataCache->has('_garbage-collection-running')) {
return false;
}
$sessionRemovalCount = 0;
$this->metaDataCache->set('_garbage-collection-runni... | [
"public",
"function",
"collectGarbage",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"inactivityTimeout",
"===",
"0",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"metaDataCache",
"->",
"has",
"(",
"'_garbage-collection-running'",
")",
... | Iterates over all existing sessions and removes their data if the inactivity
timeout was reached.
@return integer The number of outdated entries removed
@throws \Neos\Cache\Exception
@throws NotSupportedByBackendException
@api | [
"Iterates",
"over",
"all",
"existing",
"sessions",
"and",
"removes",
"their",
"data",
"if",
"the",
"inactivity",
"timeout",
"was",
"reached",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L617-L650 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.shutdownObject | public function shutdownObject()
{
if ($this->started === true && $this->remote === false) {
if ($this->metaDataCache->has($this->sessionIdentifier)) {
// Security context can't be injected and must be retrieved manually
// because it relies on this very session o... | php | public function shutdownObject()
{
if ($this->started === true && $this->remote === false) {
if ($this->metaDataCache->has($this->sessionIdentifier)) {
// Security context can't be injected and must be retrieved manually
// because it relies on this very session o... | [
"public",
"function",
"shutdownObject",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
"===",
"true",
"&&",
"$",
"this",
"->",
"remote",
"===",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"metaDataCache",
"->",
"has",
"(",
"$",
"this",
... | Shuts down this session
This method must not be called manually – it is invoked by Flow's object
management.
@return void
@throws Exception\DataNotSerializableException
@throws Exception\SessionNotStartedException
@throws NotSupportedByBackendException
@throws \Neos\Cache\Exception | [
"Shuts",
"down",
"this",
"session"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L664-L686 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.autoExpire | protected function autoExpire()
{
$lastActivitySecondsAgo = $this->now - $this->lastActivityTimestamp;
$expired = false;
if ($this->inactivityTimeout !== 0 && $lastActivitySecondsAgo > $this->inactivityTimeout) {
$this->started = true;
$this->sessionIdentifier = $this... | php | protected function autoExpire()
{
$lastActivitySecondsAgo = $this->now - $this->lastActivityTimestamp;
$expired = false;
if ($this->inactivityTimeout !== 0 && $lastActivitySecondsAgo > $this->inactivityTimeout) {
$this->started = true;
$this->sessionIdentifier = $this... | [
"protected",
"function",
"autoExpire",
"(",
")",
"{",
"$",
"lastActivitySecondsAgo",
"=",
"$",
"this",
"->",
"now",
"-",
"$",
"this",
"->",
"lastActivityTimestamp",
";",
"$",
"expired",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"inactivityTimeout",
... | Automatically expires the session if the user has been inactive for too long.
@return boolean true if the session expired, false if not | [
"Automatically",
"expires",
"the",
"session",
"if",
"the",
"user",
"has",
"been",
"inactive",
"for",
"too",
"long",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L693-L704 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.storeAuthenticatedAccountsInfo | protected function storeAuthenticatedAccountsInfo(array $tokens)
{
$accountProviderAndIdentifierPairs = [];
/** @var TokenInterface $token */
foreach ($tokens as $token) {
$account = $token->getAccount();
if ($token->isAuthenticated() && $account !== null) {
... | php | protected function storeAuthenticatedAccountsInfo(array $tokens)
{
$accountProviderAndIdentifierPairs = [];
/** @var TokenInterface $token */
foreach ($tokens as $token) {
$account = $token->getAccount();
if ($token->isAuthenticated() && $account !== null) {
... | [
"protected",
"function",
"storeAuthenticatedAccountsInfo",
"(",
"array",
"$",
"tokens",
")",
"{",
"$",
"accountProviderAndIdentifierPairs",
"=",
"[",
"]",
";",
"/** @var TokenInterface $token */",
"foreach",
"(",
"$",
"tokens",
"as",
"$",
"token",
")",
"{",
"$",
"... | Stores some information about the authenticated accounts in the session data.
This method will check if a session has already been started, which is
the case after tokens relying on a session have been authenticated: the
UsernamePasswordToken does, for example, start a session in its authenticate()
method.
Because mo... | [
"Stores",
"some",
"information",
"about",
"the",
"authenticated",
"accounts",
"in",
"the",
"session",
"data",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L723-L736 |
neos/flow-development-collection | Neos.Flow/Classes/Session/Session.php | Session.writeSessionMetaDataCacheEntry | protected function writeSessionMetaDataCacheEntry()
{
$sessionInfo = [
'lastActivityTimestamp' => $this->lastActivityTimestamp,
'storageIdentifier' => $this->storageIdentifier,
'tags' => $this->tags
];
$tagsForCacheEntry = array_map(function ($tag) {
... | php | protected function writeSessionMetaDataCacheEntry()
{
$sessionInfo = [
'lastActivityTimestamp' => $this->lastActivityTimestamp,
'storageIdentifier' => $this->storageIdentifier,
'tags' => $this->tags
];
$tagsForCacheEntry = array_map(function ($tag) {
... | [
"protected",
"function",
"writeSessionMetaDataCacheEntry",
"(",
")",
"{",
"$",
"sessionInfo",
"=",
"[",
"'lastActivityTimestamp'",
"=>",
"$",
"this",
"->",
"lastActivityTimestamp",
",",
"'storageIdentifier'",
"=>",
"$",
"this",
"->",
"storageIdentifier",
",",
"'tags'"... | Writes the cache entry containing information about the session, such as the
last activity time and the storage identifier.
This function does not write the whole session _data_ into the storage cache,
but only the "head" cache entry containing meta information.
The session cache entry is also tagged with "session", ... | [
"Writes",
"the",
"cache",
"entry",
"containing",
"information",
"about",
"the",
"session",
"such",
"as",
"the",
"last",
"activity",
"time",
"and",
"the",
"storage",
"identifier",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Session/Session.php#L750-L765 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Configuration/ConfigurationProperty.php | ConfigurationProperty.set | public function set($name, $value, $type = self::PROPERTY_TYPES_STRAIGHTVALUE, $objectConfiguration = null, $lazyLoading = true)
{
$this->name = $name;
$this->value = $value;
$this->type = $type;
$this->objectConfiguration = $objectConfiguration;
$this->lazyLoading = $lazyLoa... | php | public function set($name, $value, $type = self::PROPERTY_TYPES_STRAIGHTVALUE, $objectConfiguration = null, $lazyLoading = true)
{
$this->name = $name;
$this->value = $value;
$this->type = $type;
$this->objectConfiguration = $objectConfiguration;
$this->lazyLoading = $lazyLoa... | [
"public",
"function",
"set",
"(",
"$",
"name",
",",
"$",
"value",
",",
"$",
"type",
"=",
"self",
"::",
"PROPERTY_TYPES_STRAIGHTVALUE",
",",
"$",
"objectConfiguration",
"=",
"null",
",",
"$",
"lazyLoading",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"name"... | Sets the name, type and value of the property
@param string $name Name of the property
@param mixed $value Value of the property
@param integer $type Type of the property - one of the PROPERTY_TYPE_* constants
@param Configuration $objectConfiguration If $type is OBJECT, a custom object configuration may be specified
... | [
"Sets",
"the",
"name",
"type",
"and",
"value",
"of",
"the",
"property"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Configuration/ConfigurationProperty.php#L84-L91 |
neos/flow-development-collection | Neos.Flow/Classes/Log/LoggerBackendConfigurationHelper.php | LoggerBackendConfigurationHelper.getNormalizedLegacyConfiguration | public function getNormalizedLegacyConfiguration(): array
{
$normalizedConfiguration = [];
foreach ($this->legacyConfiguration as $logIdentifier => $configuration) {
// Skip everything that is not an actual log configuration.
if (!isset($configuration['backend'])) {
... | php | public function getNormalizedLegacyConfiguration(): array
{
$normalizedConfiguration = [];
foreach ($this->legacyConfiguration as $logIdentifier => $configuration) {
// Skip everything that is not an actual log configuration.
if (!isset($configuration['backend'])) {
... | [
"public",
"function",
"getNormalizedLegacyConfiguration",
"(",
")",
":",
"array",
"{",
"$",
"normalizedConfiguration",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"legacyConfiguration",
"as",
"$",
"logIdentifier",
"=>",
"$",
"configuration",
")",
"{",... | Normalize a backend configuration to a unified format.
@return array | [
"Normalize",
"a",
"backend",
"configuration",
"to",
"a",
"unified",
"format",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Log/LoggerBackendConfigurationHelper.php#L29-L44 |
neos/flow-development-collection | Neos.FluidAdaptor/Classes/ViewHelpers/Validation/IfHasErrorsViewHelper.php | IfHasErrorsViewHelper.render | public function render()
{
if (self::evaluateCondition($this->arguments, $this->renderingContext)) {
return $this->renderThenChild();
} else {
return $this->renderElseChild();
}
} | php | public function render()
{
if (self::evaluateCondition($this->arguments, $this->renderingContext)) {
return $this->renderThenChild();
} else {
return $this->renderElseChild();
}
} | [
"public",
"function",
"render",
"(",
")",
"{",
"if",
"(",
"self",
"::",
"evaluateCondition",
"(",
"$",
"this",
"->",
"arguments",
",",
"$",
"this",
"->",
"renderingContext",
")",
")",
"{",
"return",
"$",
"this",
"->",
"renderThenChild",
"(",
")",
";",
... | Renders <f:then> child if there are validation errors. The check can be narrowed down to
specific property paths.
If no errors are there, it renders the <f:else>-child.
@return mixed
@api | [
"Renders",
"<f",
":",
"then",
">",
"child",
"if",
"there",
"are",
"validation",
"errors",
".",
"The",
"check",
"can",
"be",
"narrowed",
"down",
"to",
"specific",
"property",
"paths",
".",
"If",
"no",
"errors",
"are",
"there",
"it",
"renders",
"the",
"<f"... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Validation/IfHasErrorsViewHelper.php#L64-L71 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/QueryResult.php | QueryResult.getFirst | public function getFirst()
{
if (is_array($this->rows)) {
$rows = &$this->rows;
} else {
$query = clone $this->query;
$query->setLimit(1);
$rows = $query->getResult();
}
return (isset($rows[0])) ? $rows[0] : null;
} | php | public function getFirst()
{
if (is_array($this->rows)) {
$rows = &$this->rows;
} else {
$query = clone $this->query;
$query->setLimit(1);
$rows = $query->getResult();
}
return (isset($rows[0])) ? $rows[0] : null;
} | [
"public",
"function",
"getFirst",
"(",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"this",
"->",
"rows",
")",
")",
"{",
"$",
"rows",
"=",
"&",
"$",
"this",
"->",
"rows",
";",
"}",
"else",
"{",
"$",
"query",
"=",
"clone",
"$",
"this",
"->",
"quer... | Returns the first object in the result set
@return object
@api | [
"Returns",
"the",
"first",
"object",
"in",
"the",
"result",
"set"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/QueryResult.php#L78-L89 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/QueryResult.php | QueryResult.count | public function count()
{
if ($this->numberOfRows === null) {
if (is_array($this->rows)) {
$this->numberOfRows = count($this->rows);
} else {
$this->numberOfRows = $this->query->count();
}
}
return $this->numberOfRows;
} | php | public function count()
{
if ($this->numberOfRows === null) {
if (is_array($this->rows)) {
$this->numberOfRows = count($this->rows);
} else {
$this->numberOfRows = $this->query->count();
}
}
return $this->numberOfRows;
} | [
"public",
"function",
"count",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"numberOfRows",
"===",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"this",
"->",
"rows",
")",
")",
"{",
"$",
"this",
"->",
"numberOfRows",
"=",
"count",
"(",
"$",
... | Returns the number of objects in the result
@return integer The number of matching objects
@api | [
"Returns",
"the",
"number",
"of",
"objects",
"in",
"the",
"result"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/QueryResult.php#L97-L107 |
neos/flow-development-collection | Neos.Flow/Classes/Http/UploadedFile.php | UploadedFile.getStream | public function getStream()
{
$this->throwExceptionIfNotAccessible();
if ($this->stream instanceof StreamInterface) {
return $this->stream;
}
return new ContentStream($this->file, 'r+');
} | php | public function getStream()
{
$this->throwExceptionIfNotAccessible();
if ($this->stream instanceof StreamInterface) {
return $this->stream;
}
return new ContentStream($this->file, 'r+');
} | [
"public",
"function",
"getStream",
"(",
")",
"{",
"$",
"this",
"->",
"throwExceptionIfNotAccessible",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"stream",
"instanceof",
"StreamInterface",
")",
"{",
"return",
"$",
"this",
"->",
"stream",
";",
"}",
"return... | Retrieve a stream representing the uploaded file.
This method MUST return a StreamInterface instance, representing the
uploaded file. The purpose of this method is to allow utilizing native PHP
stream functionality to manipulate the file upload, such as
stream_copy_to_stream() (though the result will need to be decora... | [
"Retrieve",
"a",
"stream",
"representing",
"the",
"uploaded",
"file",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/UploadedFile.php#L125-L134 |
neos/flow-development-collection | Neos.Flow/Classes/Http/UploadedFile.php | UploadedFile.moveTo | public function moveTo($targetPath)
{
$this->throwExceptionIfNotAccessible();
if (!is_string($targetPath) || empty($targetPath)) {
throw new InvalidArgumentException('Invalid path provided to move uploaded file to. Must be a non-empty string', 1479747624);
}
if ($this->... | php | public function moveTo($targetPath)
{
$this->throwExceptionIfNotAccessible();
if (!is_string($targetPath) || empty($targetPath)) {
throw new InvalidArgumentException('Invalid path provided to move uploaded file to. Must be a non-empty string', 1479747624);
}
if ($this->... | [
"public",
"function",
"moveTo",
"(",
"$",
"targetPath",
")",
"{",
"$",
"this",
"->",
"throwExceptionIfNotAccessible",
"(",
")",
";",
"if",
"(",
"!",
"is_string",
"(",
"$",
"targetPath",
")",
"||",
"empty",
"(",
"$",
"targetPath",
")",
")",
"{",
"throw",
... | Move the uploaded file to a new location.
Use this method as an alternative to move_uploaded_file(). This method is
guaranteed to work in both SAPI and non-SAPI environments.
Implementations must determine which environment they are in, and use the
appropriate method (move_uploaded_file(), rename(), or a stream
operat... | [
"Move",
"the",
"uploaded",
"file",
"to",
"a",
"new",
"location",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/UploadedFile.php#L170-L189 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php | MvcPropertyMappingConfigurationService.generateTrustedPropertiesToken | public function generateTrustedPropertiesToken($formFieldNames, $fieldNamePrefix = '')
{
$formFieldArray = [];
foreach ($formFieldNames as $formField) {
$formFieldParts = explode('[', $formField);
$currentPosition =& $formFieldArray;
$formFieldPartsCount = count($... | php | public function generateTrustedPropertiesToken($formFieldNames, $fieldNamePrefix = '')
{
$formFieldArray = [];
foreach ($formFieldNames as $formField) {
$formFieldParts = explode('[', $formField);
$currentPosition =& $formFieldArray;
$formFieldPartsCount = count($... | [
"public",
"function",
"generateTrustedPropertiesToken",
"(",
"$",
"formFieldNames",
",",
"$",
"fieldNamePrefix",
"=",
"''",
")",
"{",
"$",
"formFieldArray",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"formFieldNames",
"as",
"$",
"formField",
")",
"{",
"$",
"fo... | Generate a request hash for a list of form fields
@param array $formFieldNames Array of form fields
@param string $fieldNamePrefix
@return string trusted properties token
@throws InvalidArgumentForHashGenerationException | [
"Generate",
"a",
"request",
"hash",
"for",
"a",
"list",
"of",
"form",
"fields"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php#L55-L95 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php | MvcPropertyMappingConfigurationService.initializePropertyMappingConfigurationFromRequest | public function initializePropertyMappingConfigurationFromRequest(ActionRequest $request, Arguments $controllerArguments)
{
$trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
if (!is_string($trustedPropertiesToken)) {
return;
}
$serializedTrus... | php | public function initializePropertyMappingConfigurationFromRequest(ActionRequest $request, Arguments $controllerArguments)
{
$trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
if (!is_string($trustedPropertiesToken)) {
return;
}
$serializedTrus... | [
"public",
"function",
"initializePropertyMappingConfigurationFromRequest",
"(",
"ActionRequest",
"$",
"request",
",",
"Arguments",
"$",
"controllerArguments",
")",
"{",
"$",
"trustedPropertiesToken",
"=",
"$",
"request",
"->",
"getInternalArgument",
"(",
"'__trustedProperti... | Initialize the property mapping configuration in $controllerArguments if
the trusted properties are set inside the request.
@param ActionRequest $request
@param Arguments $controllerArguments
@return void | [
"Initialize",
"the",
"property",
"mapping",
"configuration",
"in",
"$controllerArguments",
"if",
"the",
"trusted",
"properties",
"are",
"set",
"inside",
"the",
"request",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php#L118-L134 |
neos/flow-development-collection | Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php | MvcPropertyMappingConfigurationService.modifyPropertyMappingConfiguration | protected function modifyPropertyMappingConfiguration($propertyConfiguration, PropertyMappingConfiguration $propertyMappingConfiguration)
{
if (!is_array($propertyConfiguration)) {
return;
}
if (isset($propertyConfiguration['__identity'])) {
$propertyMappingConfigurat... | php | protected function modifyPropertyMappingConfiguration($propertyConfiguration, PropertyMappingConfiguration $propertyMappingConfiguration)
{
if (!is_array($propertyConfiguration)) {
return;
}
if (isset($propertyConfiguration['__identity'])) {
$propertyMappingConfigurat... | [
"protected",
"function",
"modifyPropertyMappingConfiguration",
"(",
"$",
"propertyConfiguration",
",",
"PropertyMappingConfiguration",
"$",
"propertyMappingConfiguration",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"propertyConfiguration",
")",
")",
"{",
"return",
... | Modify the passed $propertyMappingConfiguration according to the $propertyConfiguration which
has been generated by Fluid. In detail, if the $propertyConfiguration contains
an __identity field, we allow modification of objects; else we allow creation.
All other properties are specified as allowed properties.
@param a... | [
"Modify",
"the",
"passed",
"$propertyMappingConfiguration",
"according",
"to",
"the",
"$propertyConfiguration",
"which",
"has",
"been",
"generated",
"by",
"Fluid",
".",
"In",
"detail",
"if",
"the",
"$propertyConfiguration",
"contains",
"an",
"__identity",
"field",
"we... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php#L147-L165 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.valid | public function valid(): bool
{
if ($this->getCurrentElement() !== null && $this->getCurrentElement()->getValue() !== self::DONE && $this->getCurrentElement()->getOffset() !== -1) {
return true;
}
return false;
} | php | public function valid(): bool
{
if ($this->getCurrentElement() !== null && $this->getCurrentElement()->getValue() !== self::DONE && $this->getCurrentElement()->getOffset() !== -1) {
return true;
}
return false;
} | [
"public",
"function",
"valid",
"(",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"getCurrentElement",
"(",
")",
"!==",
"null",
"&&",
"$",
"this",
"->",
"getCurrentElement",
"(",
")",
"->",
"getValue",
"(",
")",
"!==",
"self",
"::",
"DONE",
"&... | Returns true, if the current element is not the end of the iterator
@return boolean True if the iterator has not reached it's end | [
"Returns",
"true",
"if",
"the",
"current",
"element",
"is",
"not",
"the",
"end",
"of",
"the",
"iterator"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L143-L149 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.last | public function last(): string
{
$this->rewind();
$previousElement = $this->getCurrentElement();
while ($this->valid()) {
$previousElement = $this->getCurrentElement();
$this->next();
}
return $previousElement->getValue();
} | php | public function last(): string
{
$this->rewind();
$previousElement = $this->getCurrentElement();
while ($this->valid()) {
$previousElement = $this->getCurrentElement();
$this->next();
}
return $previousElement->getValue();
} | [
"public",
"function",
"last",
"(",
")",
":",
"string",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"$",
"previousElement",
"=",
"$",
"this",
"->",
"getCurrentElement",
"(",
")",
";",
"while",
"(",
"$",
"this",
"->",
"valid",
"(",
")",
")",
"{"... | Returns the last element of the iterator
@return string the last element of the iterator | [
"Returns",
"the",
"last",
"element",
"of",
"the",
"iterator"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L186-L195 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.following | public function following(int $offset): string
{
$this->rewind();
while ($this->valid()) {
$this->next();
$nextElement = $this->getCurrentElement();
if ($nextElement->getOffset() >= $offset) {
return $nextElement->getOffset();
}
... | php | public function following(int $offset): string
{
$this->rewind();
while ($this->valid()) {
$this->next();
$nextElement = $this->getCurrentElement();
if ($nextElement->getOffset() >= $offset) {
return $nextElement->getOffset();
}
... | [
"public",
"function",
"following",
"(",
"int",
"$",
"offset",
")",
":",
"string",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"while",
"(",
"$",
"this",
"->",
"valid",
"(",
")",
")",
"{",
"$",
"this",
"->",
"next",
"(",
")",
";",
"$",
"nex... | Returns the next elment following the character of the original string
given by its offset
@param integer $offset The offset of the character
@return string The element following this character | [
"Returns",
"the",
"next",
"elment",
"following",
"the",
"character",
"of",
"the",
"original",
"string",
"given",
"by",
"its",
"offset"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L204-L215 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.preceding | public function preceding(int $offset): string
{
$this->rewind();
while ($this->valid()) {
$previousElement = $this->getCurrentElement();
$this->next();
$currentElement = $this->getCurrentElement();
if (($currentElement->getOffset() + $currentElement->... | php | public function preceding(int $offset): string
{
$this->rewind();
while ($this->valid()) {
$previousElement = $this->getCurrentElement();
$this->next();
$currentElement = $this->getCurrentElement();
if (($currentElement->getOffset() + $currentElement->... | [
"public",
"function",
"preceding",
"(",
"int",
"$",
"offset",
")",
":",
"string",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"while",
"(",
"$",
"this",
"->",
"valid",
"(",
")",
")",
"{",
"$",
"previousElement",
"=",
"$",
"this",
"->",
"getCur... | Returns the element preceding the character of the original string given by its offset
@param integer $offset The offset of the character
@return string The element preceding this character | [
"Returns",
"the",
"element",
"preceding",
"the",
"character",
"of",
"the",
"original",
"string",
"given",
"by",
"its",
"offset"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L223-L235 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.getAll | public function getAll(): array
{
$this->rewind();
$allValues = [];
while ($this->valid()) {
$allValues[] = $this->getCurrentElement()->getValue();
$this->next();
}
return $allValues;
} | php | public function getAll(): array
{
$this->rewind();
$allValues = [];
while ($this->valid()) {
$allValues[] = $this->getCurrentElement()->getValue();
$this->next();
}
return $allValues;
} | [
"public",
"function",
"getAll",
"(",
")",
":",
"array",
"{",
"$",
"this",
"->",
"rewind",
"(",
")",
";",
"$",
"allValues",
"=",
"[",
"]",
";",
"while",
"(",
"$",
"this",
"->",
"valid",
"(",
")",
")",
"{",
"$",
"allValues",
"[",
"]",
"=",
"$",
... | Returns all elements of the iterator in an array
@return array All elements of the iterator | [
"Returns",
"all",
"elements",
"of",
"the",
"iterator",
"in",
"an",
"array"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L258-L267 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.generateIteratorElements | private function generateIteratorElements()
{
if ($this->subject === '') {
$this->iteratorCache->append(new TextIteratorElement(self::DONE, -1));
return;
}
if ($this->iteratorType === self::CODE_POINT) {
throw new UnsupportedFeatureException('Unsupported ... | php | private function generateIteratorElements()
{
if ($this->subject === '') {
$this->iteratorCache->append(new TextIteratorElement(self::DONE, -1));
return;
}
if ($this->iteratorType === self::CODE_POINT) {
throw new UnsupportedFeatureException('Unsupported ... | [
"private",
"function",
"generateIteratorElements",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"subject",
"===",
"''",
")",
"{",
"$",
"this",
"->",
"iteratorCache",
"->",
"append",
"(",
"new",
"TextIteratorElement",
"(",
"self",
"::",
"DONE",
",",
"-",
... | Helper function to coordinate the "string splitting"
@return void
@throws UnsupportedFeatureException | [
"Helper",
"function",
"to",
"coordinate",
"the",
"string",
"splitting"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L310-L333 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.parseSubjectByCharacter | private function parseSubjectByCharacter()
{
$i = 0;
foreach (preg_split('//u', $this->subject) as $currentCharacter) {
if ($currentCharacter === '') {
continue;
}
$this->iteratorCache->append(new TextIteratorElement($currentCharacter, $i, 1, false... | php | private function parseSubjectByCharacter()
{
$i = 0;
foreach (preg_split('//u', $this->subject) as $currentCharacter) {
if ($currentCharacter === '') {
continue;
}
$this->iteratorCache->append(new TextIteratorElement($currentCharacter, $i, 1, false... | [
"private",
"function",
"parseSubjectByCharacter",
"(",
")",
"{",
"$",
"i",
"=",
"0",
";",
"foreach",
"(",
"preg_split",
"(",
"'//u'",
",",
"$",
"this",
"->",
"subject",
")",
"as",
"$",
"currentCharacter",
")",
"{",
"if",
"(",
"$",
"currentCharacter",
"==... | Helper function to do the splitting by character | [
"Helper",
"function",
"to",
"do",
"the",
"splitting",
"by",
"character"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L339-L349 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.parseSubjectByWord | private function parseSubjectByWord()
{
$i = 0;
$isFirstIteration = true;
foreach (explode(' ', $this->subject) as $currentWord) {
$delimitersMatches = [];
$haveProcessedCurrentWord = false;
if (preg_match_all('/' . self::REGEXP_SENTENCE_DELIMITERS . '/',... | php | private function parseSubjectByWord()
{
$i = 0;
$isFirstIteration = true;
foreach (explode(' ', $this->subject) as $currentWord) {
$delimitersMatches = [];
$haveProcessedCurrentWord = false;
if (preg_match_all('/' . self::REGEXP_SENTENCE_DELIMITERS . '/',... | [
"private",
"function",
"parseSubjectByWord",
"(",
")",
"{",
"$",
"i",
"=",
"0",
";",
"$",
"isFirstIteration",
"=",
"true",
";",
"foreach",
"(",
"explode",
"(",
"' '",
",",
"$",
"this",
"->",
"subject",
")",
"as",
"$",
"currentWord",
")",
"{",
"$",
"d... | Helper function to do the splitting by word. Note: punctuation marks are
treated as words, spaces as boundary elements
@return void | [
"Helper",
"function",
"to",
"do",
"the",
"splitting",
"by",
"word",
".",
"Note",
":",
"punctuation",
"marks",
"are",
"treated",
"as",
"words",
"spaces",
"as",
"boundary",
"elements"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L357-L398 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.parseSubjectByLine | private function parseSubjectByLine()
{
$i = 0;
$j = 0;
$lines = explode("\n", $this->subject);
foreach ($lines as $currentLine) {
$this->iteratorCache->append(new TextIteratorElement($currentLine, $i, Unicode\Functions::strlen($currentLine), false));
$i += Un... | php | private function parseSubjectByLine()
{
$i = 0;
$j = 0;
$lines = explode("\n", $this->subject);
foreach ($lines as $currentLine) {
$this->iteratorCache->append(new TextIteratorElement($currentLine, $i, Unicode\Functions::strlen($currentLine), false));
$i += Un... | [
"private",
"function",
"parseSubjectByLine",
"(",
")",
"{",
"$",
"i",
"=",
"0",
";",
"$",
"j",
"=",
"0",
";",
"$",
"lines",
"=",
"explode",
"(",
"\"\\n\"",
",",
"$",
"this",
"->",
"subject",
")",
";",
"foreach",
"(",
"$",
"lines",
"as",
"$",
"cur... | Helper function to do the splitting by line. Note: one punctuations mark
belongs to the preceding sentence.
"\n" is boundary element.
@return void | [
"Helper",
"function",
"to",
"do",
"the",
"splitting",
"by",
"line",
".",
"Note",
":",
"one",
"punctuations",
"mark",
"belongs",
"to",
"the",
"preceding",
"sentence",
".",
"\\",
"n",
"is",
"boundary",
"element",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L407-L422 |
neos/flow-development-collection | Neos.Utility.Unicode/Classes/TextIterator.php | TextIterator.parseSubjectBySentence | private function parseSubjectBySentence()
{
$i = 0;
$j = 0;
$count = 0;
$delimitersMatches = [];
preg_match_all('/' . self::REGEXP_SENTENCE_DELIMITERS . '/', $this->subject, $delimitersMatches);
$splittedSentence = preg_split('/' . self::REGEXP_SENTENCE_DELIMITERS . '... | php | private function parseSubjectBySentence()
{
$i = 0;
$j = 0;
$count = 0;
$delimitersMatches = [];
preg_match_all('/' . self::REGEXP_SENTENCE_DELIMITERS . '/', $this->subject, $delimitersMatches);
$splittedSentence = preg_split('/' . self::REGEXP_SENTENCE_DELIMITERS . '... | [
"private",
"function",
"parseSubjectBySentence",
"(",
")",
"{",
"$",
"i",
"=",
"0",
";",
"$",
"j",
"=",
"0",
";",
"$",
"count",
"=",
"0",
";",
"$",
"delimitersMatches",
"=",
"[",
"]",
";",
"preg_match_all",
"(",
"'/'",
".",
"self",
"::",
"REGEXP_SENT... | Helper function to do the splitting by sentence. Note: one punctuations
mark belongs to the preceding sentence. Whitespace between sentences is
marked as boundary.
@return void | [
"Helper",
"function",
"to",
"do",
"the",
"splitting",
"by",
"sentence",
".",
"Note",
":",
"one",
"punctuations",
"mark",
"belongs",
"to",
"the",
"preceding",
"sentence",
".",
"Whitespace",
"between",
"sentences",
"is",
"marked",
"as",
"boundary",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.Unicode/Classes/TextIterator.php#L431-L470 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Configuration/ConfigurationArgument.php | ConfigurationArgument.set | public function set($index, $value, $type = self::ARGUMENT_TYPES_STRAIGHTVALUE)
{
$this->index = $index;
$this->value = $value;
$this->type = $type;
} | php | public function set($index, $value, $type = self::ARGUMENT_TYPES_STRAIGHTVALUE)
{
$this->index = $index;
$this->value = $value;
$this->type = $type;
} | [
"public",
"function",
"set",
"(",
"$",
"index",
",",
"$",
"value",
",",
"$",
"type",
"=",
"self",
"::",
"ARGUMENT_TYPES_STRAIGHTVALUE",
")",
"{",
"$",
"this",
"->",
"index",
"=",
"$",
"index",
";",
"$",
"this",
"->",
"value",
"=",
"$",
"value",
";",
... | Sets the index, value, type of the argument and object configuration
@param integer $index Index of the argument (counting starts at "1")
@param mixed $value Value of the argument
@param integer $type Type of the argument - one of the ARGUMENT_TYPE_* constants
@return void | [
"Sets",
"the",
"index",
"value",
"type",
"of",
"the",
"argument",
"and",
"object",
"configuration"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Configuration/ConfigurationArgument.php#L69-L74 |
neos/flow-development-collection | Neos.Flow/Classes/Http/UriTemplate.php | UriTemplate.expand | public static function expand($template, array $variables)
{
if (strpos($template, '{') === false) {
return $template;
}
self::$variables = $variables;
return preg_replace_callback('/\{([^\}]+)\}/', [UriTemplate::class, 'expandMatch'], $template);
} | php | public static function expand($template, array $variables)
{
if (strpos($template, '{') === false) {
return $template;
}
self::$variables = $variables;
return preg_replace_callback('/\{([^\}]+)\}/', [UriTemplate::class, 'expandMatch'], $template);
} | [
"public",
"static",
"function",
"expand",
"(",
"$",
"template",
",",
"array",
"$",
"variables",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"template",
",",
"'{'",
")",
"===",
"false",
")",
"{",
"return",
"$",
"template",
";",
"}",
"self",
"::",
"$",
... | Expand the template string using the supplied variables
@param string $template URI template to expand
@param array $variables variables to use with the expansion
@return string | [
"Expand",
"the",
"template",
"string",
"using",
"the",
"supplied",
"variables"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/UriTemplate.php#L53-L62 |
neos/flow-development-collection | Neos.Flow/Classes/Http/UriTemplate.php | UriTemplate.expandMatch | protected static function expandMatch(array $matches)
{
$parsed = self::parseExpression($matches[1]);
$replacements = [];
$prefix = $parsed['operator'];
$separator = $parsed['operator'];
$queryStringShouldBeUsed = false;
switch ($parsed['operator']) {
cas... | php | protected static function expandMatch(array $matches)
{
$parsed = self::parseExpression($matches[1]);
$replacements = [];
$prefix = $parsed['operator'];
$separator = $parsed['operator'];
$queryStringShouldBeUsed = false;
switch ($parsed['operator']) {
cas... | [
"protected",
"static",
"function",
"expandMatch",
"(",
"array",
"$",
"matches",
")",
"{",
"$",
"parsed",
"=",
"self",
"::",
"parseExpression",
"(",
"$",
"matches",
"[",
"1",
"]",
")",
";",
"$",
"replacements",
"=",
"[",
"]",
";",
"$",
"prefix",
"=",
... | Process an expansion
@param array $matches matches found in preg_replace_callback
@return string replacement string | [
"Process",
"an",
"expansion"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/UriTemplate.php#L70-L134 |
neos/flow-development-collection | Neos.Flow/Classes/Http/UriTemplate.php | UriTemplate.parseExpression | protected static function parseExpression($expression)
{
if (isset(self::$operators[$expression[0]])) {
$operator = $expression[0];
$expression = substr($expression, 1);
} else {
$operator = '';
}
$explodedExpression = explode(',', $expression);
... | php | protected static function parseExpression($expression)
{
if (isset(self::$operators[$expression[0]])) {
$operator = $expression[0];
$expression = substr($expression, 1);
} else {
$operator = '';
}
$explodedExpression = explode(',', $expression);
... | [
"protected",
"static",
"function",
"parseExpression",
"(",
"$",
"expression",
")",
"{",
"if",
"(",
"isset",
"(",
"self",
"::",
"$",
"operators",
"[",
"$",
"expression",
"[",
"0",
"]",
"]",
")",
")",
"{",
"$",
"operator",
"=",
"$",
"expression",
"[",
... | Parse an expression into parts
@param string $expression Expression to parse
@return array associative array of parts | [
"Parse",
"an",
"expression",
"into",
"parts"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/UriTemplate.php#L142-L176 |
neos/flow-development-collection | Neos.Flow/Classes/Http/UriTemplate.php | UriTemplate.encodeArrayVariable | protected static function encodeArrayVariable(array $variable, array $value, $operator, $separator, &$useQueryString)
{
$isAssociativeArray = self::isAssociative($variable);
$keyValuePairs = [];
foreach ($variable as $key => $var) {
if ($isAssociativeArray) {
$ke... | php | protected static function encodeArrayVariable(array $variable, array $value, $operator, $separator, &$useQueryString)
{
$isAssociativeArray = self::isAssociative($variable);
$keyValuePairs = [];
foreach ($variable as $key => $var) {
if ($isAssociativeArray) {
$ke... | [
"protected",
"static",
"function",
"encodeArrayVariable",
"(",
"array",
"$",
"variable",
",",
"array",
"$",
"value",
",",
"$",
"operator",
",",
"$",
"separator",
",",
"&",
"$",
"useQueryString",
")",
"{",
"$",
"isAssociativeArray",
"=",
"self",
"::",
"isAsso... | Encode arrays for use in the expanded URI string
@param array $variable
@param array $value
@param string $operator
@param string $separator
@param $useQueryString
@return string | [
"Encode",
"arrays",
"for",
"use",
"in",
"the",
"expanded",
"URI",
"string"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Http/UriTemplate.php#L188-L245 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/RuntimeExpressionEvaluator.php | RuntimeExpressionEvaluator.injectObjectManager | public function injectObjectManager(ObjectManagerInterface $objectManager): void
{
if ($this->objectManager === null) {
$this->objectManager = $objectManager;
/** @var CacheManager $cacheManager */
$cacheManager = $this->objectManager->get(CacheManager::class);
... | php | public function injectObjectManager(ObjectManagerInterface $objectManager): void
{
if ($this->objectManager === null) {
$this->objectManager = $objectManager;
/** @var CacheManager $cacheManager */
$cacheManager = $this->objectManager->get(CacheManager::class);
... | [
"public",
"function",
"injectObjectManager",
"(",
"ObjectManagerInterface",
"$",
"objectManager",
")",
":",
"void",
"{",
"if",
"(",
"$",
"this",
"->",
"objectManager",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"objectManager",
"=",
"$",
"objectManager",
";",... | This object is created very early and is part of the blacklisted "Neos\Flow\Aop" namespace so we can't rely on AOP for the property injection.
@param ObjectManagerInterface $objectManager
@return void | [
"This",
"object",
"is",
"created",
"very",
"early",
"and",
"is",
"part",
"of",
"the",
"blacklisted",
"Neos",
"\\",
"Flow",
"\\",
"Aop",
"namespace",
"so",
"we",
"can",
"t",
"rely",
"on",
"AOP",
"for",
"the",
"property",
"injection",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/RuntimeExpressionEvaluator.php#L52-L60 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/RuntimeExpressionEvaluator.php | RuntimeExpressionEvaluator.evaluate | public function evaluate(string $privilegeIdentifier, JoinPointInterface $joinPoint)
{
$functionName = $this->generateExpressionFunctionName($privilegeIdentifier);
if (isset($this->runtimeExpressions[$functionName])) {
return $this->runtimeExpressions[$functionName]->__invoke($joinPoint,... | php | public function evaluate(string $privilegeIdentifier, JoinPointInterface $joinPoint)
{
$functionName = $this->generateExpressionFunctionName($privilegeIdentifier);
if (isset($this->runtimeExpressions[$functionName])) {
return $this->runtimeExpressions[$functionName]->__invoke($joinPoint,... | [
"public",
"function",
"evaluate",
"(",
"string",
"$",
"privilegeIdentifier",
",",
"JoinPointInterface",
"$",
"joinPoint",
")",
"{",
"$",
"functionName",
"=",
"$",
"this",
"->",
"generateExpressionFunctionName",
"(",
"$",
"privilegeIdentifier",
")",
";",
"if",
"(",... | Evaluate an expression with the given JoinPoint
@param string $privilegeIdentifier MD5 hash that identifies a privilege
@param JoinPointInterface $joinPoint
@return mixed
@throws Exception | [
"Evaluate",
"an",
"expression",
"with",
"the",
"given",
"JoinPoint"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/RuntimeExpressionEvaluator.php#L70-L85 |
neos/flow-development-collection | Neos.Flow/Classes/Aop/Pointcut/RuntimeExpressionEvaluator.php | RuntimeExpressionEvaluator.addExpression | public function addExpression(string $privilegeIdentifier, string $expression): void
{
$functionName = $this->generateExpressionFunctionName($privilegeIdentifier);
$wrappedExpression = 'return ' . $expression . ';';
$this->runtimeExpressionsCache->set($functionName, $wrappedExpression);
... | php | public function addExpression(string $privilegeIdentifier, string $expression): void
{
$functionName = $this->generateExpressionFunctionName($privilegeIdentifier);
$wrappedExpression = 'return ' . $expression . ';';
$this->runtimeExpressionsCache->set($functionName, $wrappedExpression);
... | [
"public",
"function",
"addExpression",
"(",
"string",
"$",
"privilegeIdentifier",
",",
"string",
"$",
"expression",
")",
":",
"void",
"{",
"$",
"functionName",
"=",
"$",
"this",
"->",
"generateExpressionFunctionName",
"(",
"$",
"privilegeIdentifier",
")",
";",
"... | Add expression to the evaluator
@param string $privilegeIdentifier MD5 hash that identifies a privilege
@param string $expression
@return void | [
"Add",
"expression",
"to",
"the",
"evaluator"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/RuntimeExpressionEvaluator.php#L94-L100 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyConstructor.php | ProxyConstructor.render | public function render()
{
$methodDocumentation = $this->buildMethodDocumentation($this->fullOriginalClassName, $this->methodName);
$callParentMethodCode = $this->buildCallParentMethodCode($this->fullOriginalClassName, $this->methodName);
$finalKeyword = $this->reflectionService->isMethodFi... | php | public function render()
{
$methodDocumentation = $this->buildMethodDocumentation($this->fullOriginalClassName, $this->methodName);
$callParentMethodCode = $this->buildCallParentMethodCode($this->fullOriginalClassName, $this->methodName);
$finalKeyword = $this->reflectionService->isMethodFi... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"methodDocumentation",
"=",
"$",
"this",
"->",
"buildMethodDocumentation",
"(",
"$",
"this",
"->",
"fullOriginalClassName",
",",
"$",
"this",
"->",
"methodName",
")",
";",
"$",
"callParentMethodCode",
"=",
"$... | Renders the code for a proxy constructor
@return string PHP code | [
"Renders",
"the",
"code",
"for",
"a",
"proxy",
"constructor"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ProxyConstructor.php#L42-L61 |
neos/flow-development-collection | Neos.Flow/Classes/ObjectManagement/Proxy/ProxyConstructor.php | ProxyConstructor.buildCallParentMethodCode | protected function buildCallParentMethodCode($fullClassName, $methodName)
{
if (!$this->reflectionService->hasMethod($fullClassName, $methodName)) {
return '';
}
if (count($this->reflectionService->getMethodParameters($this->fullOriginalClassName, $this->methodName)) > 0) {
... | php | protected function buildCallParentMethodCode($fullClassName, $methodName)
{
if (!$this->reflectionService->hasMethod($fullClassName, $methodName)) {
return '';
}
if (count($this->reflectionService->getMethodParameters($this->fullOriginalClassName, $this->methodName)) > 0) {
... | [
"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/ProxyConstructor.php#L70-L80 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.getStatus | public function getStatus($packageKey, $versionNumber = null)
{
$status = array();
$migrations = $this->getMigrations($versionNumber);
foreach ($this->getPackagesData($packageKey) as &$this->currentPackageData) {
$packageStatus = array();
foreach ($migrations as $migr... | php | public function getStatus($packageKey, $versionNumber = null)
{
$status = array();
$migrations = $this->getMigrations($versionNumber);
foreach ($this->getPackagesData($packageKey) as &$this->currentPackageData) {
$packageStatus = array();
foreach ($migrations as $migr... | [
"public",
"function",
"getStatus",
"(",
"$",
"packageKey",
",",
"$",
"versionNumber",
"=",
"null",
")",
"{",
"$",
"status",
"=",
"array",
"(",
")",
";",
"$",
"migrations",
"=",
"$",
"this",
"->",
"getMigrations",
"(",
"$",
"versionNumber",
")",
";",
"f... | Returns the migration status for all packages.
@param string $packageKey key of the package to fetch the migration status for
@param string $versionNumber version of the migration to fetch the status for (e.g. "20120126163610"), or NULL to consider all migrations
@return array in the format [<versionNumber> => ['migra... | [
"Returns",
"the",
"migration",
"status",
"for",
"all",
"packages",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L93-L110 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.migrate | public function migrate($packageKey, $versionNumber = null, $force = false)
{
$packagesData = $this->getPackagesData($packageKey);
foreach ($this->getMigrations($versionNumber) as $migration) {
$this->triggerEvent(self::EVENT_MIGRATION_START, array($migration));
foreach ($pac... | php | public function migrate($packageKey, $versionNumber = null, $force = false)
{
$packagesData = $this->getPackagesData($packageKey);
foreach ($this->getMigrations($versionNumber) as $migration) {
$this->triggerEvent(self::EVENT_MIGRATION_START, array($migration));
foreach ($pac... | [
"public",
"function",
"migrate",
"(",
"$",
"packageKey",
",",
"$",
"versionNumber",
"=",
"null",
",",
"$",
"force",
"=",
"false",
")",
"{",
"$",
"packagesData",
"=",
"$",
"this",
"->",
"getPackagesData",
"(",
"$",
"packageKey",
")",
";",
"foreach",
"(",
... | This iterates over available migrations and applies them to
the existing packages if
- the package needs the migration
- is a clean git working copy
@param string $packageKey key of the package to migrate
@param string $versionNumber version of the migration to execute (e.g. "20120126163610"), or NULL to execute all m... | [
"This",
"iterates",
"over",
"available",
"migrations",
"and",
"applies",
"them",
"to",
"the",
"existing",
"packages",
"if",
"-",
"the",
"package",
"needs",
"the",
"migration",
"-",
"is",
"a",
"clean",
"git",
"working",
"copy"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L123-L133 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.migratePackage | protected function migratePackage(AbstractMigration $migration, $force = false)
{
$packagePath = $this->currentPackageData['path'];
if ($this->hasMigrationApplied($migration)) {
$this->triggerEvent(self::EVENT_MIGRATION_ALREADY_APPLIED, array($migration, 'Migration already applied'));
... | php | protected function migratePackage(AbstractMigration $migration, $force = false)
{
$packagePath = $this->currentPackageData['path'];
if ($this->hasMigrationApplied($migration)) {
$this->triggerEvent(self::EVENT_MIGRATION_ALREADY_APPLIED, array($migration, 'Migration already applied'));
... | [
"protected",
"function",
"migratePackage",
"(",
"AbstractMigration",
"$",
"migration",
",",
"$",
"force",
"=",
"false",
")",
"{",
"$",
"packagePath",
"=",
"$",
"this",
"->",
"currentPackageData",
"[",
"'path'",
"]",
";",
"if",
"(",
"$",
"this",
"->",
"hasM... | Apply the given migration to the package and commit the result.
@param AbstractMigration $migration
@param boolean $force if true the migration will be applied even if the current package is not a git working copy or contains local changes
@return void
@throws \RuntimeException | [
"Apply",
"the",
"given",
"migration",
"to",
"the",
"package",
"and",
"commit",
"the",
"result",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L143-L190 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.hasMigrationApplied | protected function hasMigrationApplied(AbstractMigration $migration)
{
// if the "applied-flow-migrations" section doesn't exist, we fall back to checking the git log for applied migrations for backwards compatibility
if (!isset($this->currentPackageData['composerManifest']['extra']['applied-flow-mi... | php | protected function hasMigrationApplied(AbstractMigration $migration)
{
// if the "applied-flow-migrations" section doesn't exist, we fall back to checking the git log for applied migrations for backwards compatibility
if (!isset($this->currentPackageData['composerManifest']['extra']['applied-flow-mi... | [
"protected",
"function",
"hasMigrationApplied",
"(",
"AbstractMigration",
"$",
"migration",
")",
"{",
"// if the \"applied-flow-migrations\" section doesn't exist, we fall back to checking the git log for applied migrations for backwards compatibility",
"if",
"(",
"!",
"isset",
"(",
"$... | Whether or not the given $migration has been applied to the current package
@param AbstractMigration $migration
@return boolean | [
"Whether",
"or",
"not",
"the",
"given",
"$migration",
"has",
"been",
"applied",
"to",
"the",
"current",
"package"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L198-L205 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.importMigrationLogFromGitHistory | protected function importMigrationLogFromGitHistory($commitChanges = false)
{
if (isset($this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'])) {
return null;
}
$migrationCommitMessages = Git::getLog($this->currentPackageData['path'], 'Migration:');
... | php | protected function importMigrationLogFromGitHistory($commitChanges = false)
{
if (isset($this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'])) {
return null;
}
$migrationCommitMessages = Git::getLog($this->currentPackageData['path'], 'Migration:');
... | [
"protected",
"function",
"importMigrationLogFromGitHistory",
"(",
"$",
"commitChanges",
"=",
"false",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"currentPackageData",
"[",
"'composerManifest'",
"]",
"[",
"'extra'",
"]",
"[",
"'applied-flow-migrations'",
... | Imports the core migration log from the git history if it has not been imported previously (the "applied-flow-migrations" composer manifest property does not exist)
@param boolean $commitChanges if true the modified composer manifest is committed - if it changed
@return string | [
"Imports",
"the",
"core",
"migration",
"log",
"from",
"the",
"git",
"history",
"if",
"it",
"has",
"not",
"been",
"imported",
"previously",
"(",
"the",
"applied",
"-",
"flow",
"-",
"migrations",
"composer",
"manifest",
"property",
"does",
"not",
"exist",
")"
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L222-L263 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.markMigrationApplied | protected function markMigrationApplied(AbstractMigration $migration)
{
if (!isset($this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'])) {
$this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'] = [];
}
$this->currentPackage... | php | protected function markMigrationApplied(AbstractMigration $migration)
{
if (!isset($this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'])) {
$this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'] = [];
}
$this->currentPackage... | [
"protected",
"function",
"markMigrationApplied",
"(",
"AbstractMigration",
"$",
"migration",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"currentPackageData",
"[",
"'composerManifest'",
"]",
"[",
"'extra'",
"]",
"[",
"'applied-flow-migrations'",
"]"... | Whether or not the given migration has been applied in the given path
@param AbstractMigration $migration
@return boolean | [
"Whether",
"or",
"not",
"the",
"given",
"migration",
"has",
"been",
"applied",
"in",
"the",
"given",
"path"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L271-L279 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.commitMigration | protected function commitMigration(AbstractMigration $migration, $commitMessageNotice = null)
{
$migrationIdentifier = $migration->getIdentifier();
$commitMessageSubject = sprintf('TASK: Apply migration %s', $migrationIdentifier);
if (!Git::isWorkingCopyRoot($this->currentPackageData['path']... | php | protected function commitMigration(AbstractMigration $migration, $commitMessageNotice = null)
{
$migrationIdentifier = $migration->getIdentifier();
$commitMessageSubject = sprintf('TASK: Apply migration %s', $migrationIdentifier);
if (!Git::isWorkingCopyRoot($this->currentPackageData['path']... | [
"protected",
"function",
"commitMigration",
"(",
"AbstractMigration",
"$",
"migration",
",",
"$",
"commitMessageNotice",
"=",
"null",
")",
"{",
"$",
"migrationIdentifier",
"=",
"$",
"migration",
"->",
"getIdentifier",
"(",
")",
";",
"$",
"commitMessageSubject",
"=... | Commit changes done to the package described by $packageData. The migration
that was did the changes is given with $versionNumber and $versionPackageKey
and will be recorded in the commit message.
@param AbstractMigration $migration
@param string $commitMessageNotice
@return string | [
"Commit",
"changes",
"done",
"to",
"the",
"package",
"described",
"by",
"$packageData",
".",
"The",
"migration",
"that",
"was",
"did",
"the",
"changes",
"is",
"given",
"with",
"$versionNumber",
"and",
"$versionPackageKey",
"and",
"will",
"be",
"recorded",
"in",
... | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L290-L315 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.triggerEvent | protected function triggerEvent($eventIdentifier, array $eventData = null)
{
if (!isset($this->eventCallbacks[$eventIdentifier])) {
return;
}
/** @var \Closure $callback */
foreach ($this->eventCallbacks[$eventIdentifier] as $callback) {
call_user_func_array($... | php | protected function triggerEvent($eventIdentifier, array $eventData = null)
{
if (!isset($this->eventCallbacks[$eventIdentifier])) {
return;
}
/** @var \Closure $callback */
foreach ($this->eventCallbacks[$eventIdentifier] as $callback) {
call_user_func_array($... | [
"protected",
"function",
"triggerEvent",
"(",
"$",
"eventIdentifier",
",",
"array",
"$",
"eventData",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"eventCallbacks",
"[",
"$",
"eventIdentifier",
"]",
")",
")",
"{",
"return",
";"... | Trigger a custom event
@param string $eventIdentifier one of the EVENT_* constants
@param array $eventData optional arguments to be passed to the handler closure | [
"Trigger",
"a",
"custom",
"event"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L334-L343 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.initialize | protected function initialize()
{
if ($this->packagesData !== null) {
return;
}
$this->packagesData = Tools::getPackagesData($this->packagesPath);
$this->migrations = array();
foreach ($this->packagesData as $packageKey => $packageData) {
$this->regis... | php | protected function initialize()
{
if ($this->packagesData !== null) {
return;
}
$this->packagesData = Tools::getPackagesData($this->packagesPath);
$this->migrations = array();
foreach ($this->packagesData as $packageKey => $packageData) {
$this->regis... | [
"protected",
"function",
"initialize",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"packagesData",
"!==",
"null",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"packagesData",
"=",
"Tools",
"::",
"getPackagesData",
"(",
"$",
"this",
"->",
"packagesPa... | Initialize the manager: read package information and register migrations.
@return void | [
"Initialize",
"the",
"manager",
":",
"read",
"package",
"information",
"and",
"register",
"migrations",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L351-L363 |
neos/flow-development-collection | Neos.Flow/Scripts/Migrations/Manager.php | Manager.registerMigrationFiles | protected function registerMigrationFiles($packagePath)
{
$packagePath = rtrim($packagePath, '/');
$packageKey = substr($packagePath, strrpos($packagePath, '/') + 1);
$migrationsDirectory = Files::concatenatePaths(array($packagePath, 'Migrations/Code'));
if (!is_dir($migrationsDirect... | php | protected function registerMigrationFiles($packagePath)
{
$packagePath = rtrim($packagePath, '/');
$packageKey = substr($packagePath, strrpos($packagePath, '/') + 1);
$migrationsDirectory = Files::concatenatePaths(array($packagePath, 'Migrations/Code'));
if (!is_dir($migrationsDirect... | [
"protected",
"function",
"registerMigrationFiles",
"(",
"$",
"packagePath",
")",
"{",
"$",
"packagePath",
"=",
"rtrim",
"(",
"$",
"packagePath",
",",
"'/'",
")",
";",
"$",
"packageKey",
"=",
"substr",
"(",
"$",
"packagePath",
",",
"strrpos",
"(",
"$",
"pac... | Look for code migration files in the given package path and register them
for further action.
@param string $packagePath
@return void | [
"Look",
"for",
"code",
"migration",
"files",
"in",
"the",
"given",
"package",
"path",
"and",
"register",
"them",
"for",
"further",
"action",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Scripts/Migrations/Manager.php#L372-L390 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authentication/EntryPoint/WebRedirect.php | WebRedirect.startAuthentication | public function startAuthentication(Request $request, Response $response)
{
if (isset($this->options['routeValues'])) {
$routeValues = $this->options['routeValues'];
if (!is_array($routeValues)) {
throw new MissingConfigurationException(sprintf('The configuration for ... | php | public function startAuthentication(Request $request, Response $response)
{
if (isset($this->options['routeValues'])) {
$routeValues = $this->options['routeValues'];
if (!is_array($routeValues)) {
throw new MissingConfigurationException(sprintf('The configuration for ... | [
"public",
"function",
"startAuthentication",
"(",
"Request",
"$",
"request",
",",
"Response",
"$",
"response",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"'routeValues'",
"]",
")",
")",
"{",
"$",
"routeValues",
"=",
"$",
"this"... | Starts the authentication: Redirect to login page
@param Request $request The current request
@param Response $response The current response
@return void
@throws MissingConfigurationException | [
"Starts",
"the",
"authentication",
":",
"Redirect",
"to",
"login",
"page"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/EntryPoint/WebRedirect.php#L41-L65 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authentication/EntryPoint/WebRedirect.php | WebRedirect.extractRouteValue | protected function extractRouteValue(array &$routeValues, $key)
{
if (!isset($routeValues[$key])) {
return null;
}
$routeValue = $routeValues[$key];
unset($routeValues[$key]);
return $routeValue;
} | php | protected function extractRouteValue(array &$routeValues, $key)
{
if (!isset($routeValues[$key])) {
return null;
}
$routeValue = $routeValues[$key];
unset($routeValues[$key]);
return $routeValue;
} | [
"protected",
"function",
"extractRouteValue",
"(",
"array",
"&",
"$",
"routeValues",
",",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"routeValues",
"[",
"$",
"key",
"]",
")",
")",
"{",
"return",
"null",
";",
"}",
"$",
"routeValue",
"=",... | Returns the entry $key from the array $routeValues removing the original array item.
If $key does not exist, NULL is returned.
@param array $routeValues
@param string $key
@return mixed the specified route value or NULL if it is not set | [
"Returns",
"the",
"entry",
"$key",
"from",
"the",
"array",
"$routeValues",
"removing",
"the",
"original",
"array",
"item",
".",
"If",
"$key",
"does",
"not",
"exist",
"NULL",
"is",
"returned",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/EntryPoint/WebRedirect.php#L75-L83 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/SqlFilter.php | SqlFilter.addFilterConstraint | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
$this->initializeDependencies();
/*
* TODO: Instead of checking for class account we could introduce some interface for white listing entities from entity security checks
* Problem with checking ... | php | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
$this->initializeDependencies();
/*
* TODO: Instead of checking for class account we could introduce some interface for white listing entities from entity security checks
* Problem with checking ... | [
"public",
"function",
"addFilterConstraint",
"(",
"ClassMetadata",
"$",
"targetEntity",
",",
"$",
"targetTableAlias",
")",
"{",
"$",
"this",
"->",
"initializeDependencies",
"(",
")",
";",
"/*\n * TODO: Instead of checking for class account we could introduce some interf... | Gets the SQL query part to add to a query.
@param ClassMetaData $targetEntity Metadata object for the target entity to be filtered
@param string $targetTableAlias The target table alias used in the current query
@return string The constraint SQL if there is available, empty string otherwise | [
"Gets",
"the",
"SQL",
"query",
"part",
"to",
"add",
"to",
"a",
"query",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/SqlFilter.php#L47-L101 |
neos/flow-development-collection | Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/SqlFilter.php | SqlFilter.initializeDependencies | protected function initializeDependencies()
{
if ($this->securityContext === null) {
$this->securityContext = Bootstrap::$staticObjectManager->get(Context::class);
}
if ($this->policyService === null) {
$this->policyService = Bootstrap::$staticObjectManager->get(Poli... | php | protected function initializeDependencies()
{
if ($this->securityContext === null) {
$this->securityContext = Bootstrap::$staticObjectManager->get(Context::class);
}
if ($this->policyService === null) {
$this->policyService = Bootstrap::$staticObjectManager->get(Poli... | [
"protected",
"function",
"initializeDependencies",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"securityContext",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"securityContext",
"=",
"Bootstrap",
"::",
"$",
"staticObjectManager",
"->",
"get",
"(",
"Context",
... | Initializes the dependencies by retrieving them from the object manager
@return void | [
"Initializes",
"the",
"dependencies",
"by",
"retrieving",
"them",
"from",
"the",
"object",
"manager"
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/Entity/Doctrine/SqlFilter.php#L108-L117 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.validateMapping | public function validateMapping()
{
try {
$validator = new SchemaValidator($this->entityManager);
return $validator->validateMapping();
} catch (\Exception $exception) {
return [[$exception->getMessage()]];
}
} | php | public function validateMapping()
{
try {
$validator = new SchemaValidator($this->entityManager);
return $validator->validateMapping();
} catch (\Exception $exception) {
return [[$exception->getMessage()]];
}
} | [
"public",
"function",
"validateMapping",
"(",
")",
"{",
"try",
"{",
"$",
"validator",
"=",
"new",
"SchemaValidator",
"(",
"$",
"this",
"->",
"entityManager",
")",
";",
"return",
"$",
"validator",
"->",
"validateMapping",
"(",
")",
";",
"}",
"catch",
"(",
... | Validates the metadata mapping for Doctrine, using the SchemaValidator
of Doctrine.
@return array | [
"Validates",
"the",
"metadata",
"mapping",
"for",
"Doctrine",
"using",
"the",
"SchemaValidator",
"of",
"Doctrine",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L75-L83 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.createSchema | public function createSchema($outputPathAndFilename = null)
{
$schemaTool = new SchemaTool($this->entityManager);
$allMetaData = $this->entityManager->getMetadataFactory()->getAllMetadata();
if ($outputPathAndFilename === null) {
$schemaTool->createSchema($allMetaData);
}... | php | public function createSchema($outputPathAndFilename = null)
{
$schemaTool = new SchemaTool($this->entityManager);
$allMetaData = $this->entityManager->getMetadataFactory()->getAllMetadata();
if ($outputPathAndFilename === null) {
$schemaTool->createSchema($allMetaData);
}... | [
"public",
"function",
"createSchema",
"(",
"$",
"outputPathAndFilename",
"=",
"null",
")",
"{",
"$",
"schemaTool",
"=",
"new",
"SchemaTool",
"(",
"$",
"this",
"->",
"entityManager",
")",
";",
"$",
"allMetaData",
"=",
"$",
"this",
"->",
"entityManager",
"->",... | Creates the needed DB schema using Doctrine's SchemaTool. If tables already
exist, this will throw an exception.
@param string $outputPathAndFilename A file to write SQL to, instead of executing it
@return string
@throws ToolsException | [
"Creates",
"the",
"needed",
"DB",
"schema",
"using",
"Doctrine",
"s",
"SchemaTool",
".",
"If",
"tables",
"already",
"exist",
"this",
"will",
"throw",
"an",
"exception",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L93-L103 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.updateSchema | public function updateSchema($safeMode = true, $outputPathAndFilename = null)
{
$schemaTool = new SchemaTool($this->entityManager);
$allMetaData = $this->entityManager->getMetadataFactory()->getAllMetadata();
if ($outputPathAndFilename === null) {
$schemaTool->updateSchema($allMe... | php | public function updateSchema($safeMode = true, $outputPathAndFilename = null)
{
$schemaTool = new SchemaTool($this->entityManager);
$allMetaData = $this->entityManager->getMetadataFactory()->getAllMetadata();
if ($outputPathAndFilename === null) {
$schemaTool->updateSchema($allMe... | [
"public",
"function",
"updateSchema",
"(",
"$",
"safeMode",
"=",
"true",
",",
"$",
"outputPathAndFilename",
"=",
"null",
")",
"{",
"$",
"schemaTool",
"=",
"new",
"SchemaTool",
"(",
"$",
"this",
"->",
"entityManager",
")",
";",
"$",
"allMetaData",
"=",
"$",... | Updates the DB schema using Doctrine's SchemaTool. The $safeMode flag is passed
to SchemaTool unchanged.
@param boolean $safeMode
@param string $outputPathAndFilename A file to write SQL to, instead of executing it
@return string | [
"Updates",
"the",
"DB",
"schema",
"using",
"Doctrine",
"s",
"SchemaTool",
".",
"The",
"$safeMode",
"flag",
"is",
"passed",
"to",
"SchemaTool",
"unchanged",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L113-L123 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.compileProxies | public function compileProxies()
{
Files::emptyDirectoryRecursively(Files::concatenatePaths([$this->environment->getPathToTemporaryDirectory(), 'Doctrine/Proxies']));
/** @var \Doctrine\ORM\Proxy\ProxyFactory $proxyFactory */
$proxyFactory = $this->entityManager->getProxyFactory();
$... | php | public function compileProxies()
{
Files::emptyDirectoryRecursively(Files::concatenatePaths([$this->environment->getPathToTemporaryDirectory(), 'Doctrine/Proxies']));
/** @var \Doctrine\ORM\Proxy\ProxyFactory $proxyFactory */
$proxyFactory = $this->entityManager->getProxyFactory();
$... | [
"public",
"function",
"compileProxies",
"(",
")",
"{",
"Files",
"::",
"emptyDirectoryRecursively",
"(",
"Files",
"::",
"concatenatePaths",
"(",
"[",
"$",
"this",
"->",
"environment",
"->",
"getPathToTemporaryDirectory",
"(",
")",
",",
"'Doctrine/Proxies'",
"]",
")... | Compiles the Doctrine proxy class code using the Doctrine ProxyFactory.
@return void
@throws FilesException | [
"Compiles",
"the",
"Doctrine",
"proxy",
"class",
"code",
"using",
"the",
"Doctrine",
"ProxyFactory",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L131-L137 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.getEntityStatus | public function getEntityStatus()
{
$info = [];
$entityClassNames = $this->entityManager->getConfiguration()->getMetadataDriverImpl()->getAllClassNames();
foreach ($entityClassNames as $entityClassName) {
try {
$info[$entityClassName] = $this->entityManager->getCl... | php | public function getEntityStatus()
{
$info = [];
$entityClassNames = $this->entityManager->getConfiguration()->getMetadataDriverImpl()->getAllClassNames();
foreach ($entityClassNames as $entityClassName) {
try {
$info[$entityClassName] = $this->entityManager->getCl... | [
"public",
"function",
"getEntityStatus",
"(",
")",
"{",
"$",
"info",
"=",
"[",
"]",
";",
"$",
"entityClassNames",
"=",
"$",
"this",
"->",
"entityManager",
"->",
"getConfiguration",
"(",
")",
"->",
"getMetadataDriverImpl",
"(",
")",
"->",
"getAllClassNames",
... | Returns information about which entities exist and possibly if their
mapping information contains errors or not.
@return array
@throws \Doctrine\ORM\ORMException | [
"Returns",
"information",
"about",
"which",
"entities",
"exist",
"and",
"possibly",
"if",
"their",
"mapping",
"information",
"contains",
"errors",
"or",
"not",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L146-L159 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.runDql | public function runDql($dql, $hydrationMode = \Doctrine\ORM\Query::HYDRATE_OBJECT, $firstResult = null, $maxResult = null)
{
/** @var \Doctrine\ORM\Query $query */
$query = $this->entityManager->createQuery($dql);
if ($firstResult !== null) {
$query->setFirstResult($firstResult);... | php | public function runDql($dql, $hydrationMode = \Doctrine\ORM\Query::HYDRATE_OBJECT, $firstResult = null, $maxResult = null)
{
/** @var \Doctrine\ORM\Query $query */
$query = $this->entityManager->createQuery($dql);
if ($firstResult !== null) {
$query->setFirstResult($firstResult);... | [
"public",
"function",
"runDql",
"(",
"$",
"dql",
",",
"$",
"hydrationMode",
"=",
"\\",
"Doctrine",
"\\",
"ORM",
"\\",
"Query",
"::",
"HYDRATE_OBJECT",
",",
"$",
"firstResult",
"=",
"null",
",",
"$",
"maxResult",
"=",
"null",
")",
"{",
"/** @var \\Doctrine\... | Run DQL and return the result as-is.
@param string $dql
@param integer $hydrationMode
@param integer $firstResult
@param integer $maxResult
@return mixed | [
"Run",
"DQL",
"and",
"return",
"the",
"result",
"as",
"-",
"is",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L170-L182 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.getMigrationConfiguration | protected function getMigrationConfiguration()
{
$this->output = [];
$that = $this;
$outputWriter = new OutputWriter(
function ($message) use ($that) {
$that->output[] = $message;
}
);
/** @var \Doctrine\DBAL\Connection $connection */
... | php | protected function getMigrationConfiguration()
{
$this->output = [];
$that = $this;
$outputWriter = new OutputWriter(
function ($message) use ($that) {
$that->output[] = $message;
}
);
/** @var \Doctrine\DBAL\Connection $connection */
... | [
"protected",
"function",
"getMigrationConfiguration",
"(",
")",
"{",
"$",
"this",
"->",
"output",
"=",
"[",
"]",
";",
"$",
"that",
"=",
"$",
"this",
";",
"$",
"outputWriter",
"=",
"new",
"OutputWriter",
"(",
"function",
"(",
"$",
"message",
")",
"use",
... | Return the configuration needed for Migrations.
@return Configuration
@throws DBALException | [
"Return",
"the",
"configuration",
"needed",
"for",
"Migrations",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L190-L228 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.getMigrationStatus | public function getMigrationStatus()
{
$configuration = $this->getMigrationConfiguration();
$executedMigrations = $configuration->getMigratedVersions();
$availableMigrations = $configuration->getAvailableVersions();
$executedUnavailableMigrations = array_diff($executedMigrations, $a... | php | public function getMigrationStatus()
{
$configuration = $this->getMigrationConfiguration();
$executedMigrations = $configuration->getMigratedVersions();
$availableMigrations = $configuration->getAvailableVersions();
$executedUnavailableMigrations = array_diff($executedMigrations, $a... | [
"public",
"function",
"getMigrationStatus",
"(",
")",
"{",
"$",
"configuration",
"=",
"$",
"this",
"->",
"getMigrationConfiguration",
"(",
")",
";",
"$",
"executedMigrations",
"=",
"$",
"configuration",
"->",
"getMigratedVersions",
"(",
")",
";",
"$",
"available... | Returns the current migration status as an array.
@return array
@throws DBALException | [
"Returns",
"the",
"current",
"migration",
"status",
"as",
"an",
"array",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L236-L265 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.getFormattedMigrationStatus | public function getFormattedMigrationStatus($showMigrations = false, $showDescriptions = false)
{
$statusInformation = $this->getMigrationStatus();
$output = PHP_EOL . '<info>==</info> Configuration' . PHP_EOL;
foreach ($statusInformation as $name => $value) {
if ($name == 'New ... | php | public function getFormattedMigrationStatus($showMigrations = false, $showDescriptions = false)
{
$statusInformation = $this->getMigrationStatus();
$output = PHP_EOL . '<info>==</info> Configuration' . PHP_EOL;
foreach ($statusInformation as $name => $value) {
if ($name == 'New ... | [
"public",
"function",
"getFormattedMigrationStatus",
"(",
"$",
"showMigrations",
"=",
"false",
",",
"$",
"showDescriptions",
"=",
"false",
")",
"{",
"$",
"statusInformation",
"=",
"$",
"this",
"->",
"getMigrationStatus",
"(",
")",
";",
"$",
"output",
"=",
"PHP... | Returns a formatted string of current database migration status.
@param boolean $showMigrations
@param boolean $showDescriptions
@return string
@throws \ReflectionException
@throws DBALException | [
"Returns",
"a",
"formatted",
"string",
"of",
"current",
"database",
"migration",
"status",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L276-L331 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.getPackageKeyFromMigrationVersion | protected function getPackageKeyFromMigrationVersion(Version $version)
{
$sortedAvailablePackages = $this->packageManager->getAvailablePackages();
usort($sortedAvailablePackages, function (PackageInterface $packageOne, PackageInterface $packageTwo) {
return strlen($packageTwo->getPackage... | php | protected function getPackageKeyFromMigrationVersion(Version $version)
{
$sortedAvailablePackages = $this->packageManager->getAvailablePackages();
usort($sortedAvailablePackages, function (PackageInterface $packageOne, PackageInterface $packageTwo) {
return strlen($packageTwo->getPackage... | [
"protected",
"function",
"getPackageKeyFromMigrationVersion",
"(",
"Version",
"$",
"version",
")",
"{",
"$",
"sortedAvailablePackages",
"=",
"$",
"this",
"->",
"packageManager",
"->",
"getAvailablePackages",
"(",
")",
";",
"usort",
"(",
"$",
"sortedAvailablePackages",... | Tries to find out a package key which the Version belongs to. If no
package could be found, an empty string is returned.
@param Version $version
@return string
@throws \ReflectionException | [
"Tries",
"to",
"find",
"out",
"a",
"package",
"key",
"which",
"the",
"Version",
"belongs",
"to",
".",
"If",
"no",
"package",
"could",
"be",
"found",
"an",
"empty",
"string",
"is",
"returned",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L341-L360 |
neos/flow-development-collection | Neos.Flow/Classes/Persistence/Doctrine/Service.php | Service.getFormattedVersionAlias | protected function getFormattedVersionAlias($alias, Configuration $configuration)
{
$version = $configuration->resolveVersionAlias($alias);
if ($version === null) {
if ($alias == 'next') {
return 'Already at latest version';
} elseif ($alias == 'prev') {
... | php | protected function getFormattedVersionAlias($alias, Configuration $configuration)
{
$version = $configuration->resolveVersionAlias($alias);
if ($version === null) {
if ($alias == 'next') {
return 'Already at latest version';
} elseif ($alias == 'prev') {
... | [
"protected",
"function",
"getFormattedVersionAlias",
"(",
"$",
"alias",
",",
"Configuration",
"$",
"configuration",
")",
"{",
"$",
"version",
"=",
"$",
"configuration",
"->",
"resolveVersionAlias",
"(",
"$",
"alias",
")",
";",
"if",
"(",
"$",
"version",
"===",... | Returns a formatted version string for the alias.
@param string $alias
@param Configuration $configuration
@return string | [
"Returns",
"a",
"formatted",
"version",
"string",
"for",
"the",
"alias",
"."
] | train | https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/Service.php#L369-L386 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.