repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/PolicyService.php
PolicyService.getRoles
public function getRoles($includeAbstract = false) { $this->initialize(); if (!$includeAbstract) { return array_filter($this->roles, function (Role $role) { return $role->isAbstract() !== true; }); } return $this->roles; }
php
public function getRoles($includeAbstract = false) { $this->initialize(); if (!$includeAbstract) { return array_filter($this->roles, function (Role $role) { return $role->isAbstract() !== true; }); } return $this->roles; }
[ "public", "function", "getRoles", "(", "$", "includeAbstract", "=", "false", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "if", "(", "!", "$", "includeAbstract", ")", "{", "return", "array_filter", "(", "$", "this", "->", "roles", ",", "fu...
Returns an array of all configured roles @param boolean $includeAbstract If true the result includes abstract roles, otherwise those will be skipped @return Role[] Array of all configured roles, indexed by role identifier
[ "Returns", "an", "array", "of", "all", "configured", "roles" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/PolicyService.php#L239-L248
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/PolicyService.php
PolicyService.getAllPrivilegesByType
public function getAllPrivilegesByType($type) { $this->initialize(); $privileges = []; foreach ($this->roles as $role) { $privileges = array_merge($privileges, $role->getPrivilegesByType($type)); } return $privileges; }
php
public function getAllPrivilegesByType($type) { $this->initialize(); $privileges = []; foreach ($this->roles as $role) { $privileges = array_merge($privileges, $role->getPrivilegesByType($type)); } return $privileges; }
[ "public", "function", "getAllPrivilegesByType", "(", "$", "type", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "$", "privileges", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "roles", "as", "$", "role", ")", "{", "$", "privileg...
Returns all privileges of the given type @param string $type Full qualified class or interface name @return array
[ "Returns", "all", "privileges", "of", "the", "given", "type" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/PolicyService.php#L256-L264
neos/flow-development-collection
Neos.Flow/Classes/Security/Policy/PolicyService.php
PolicyService.getPrivilegeTargetByIdentifier
public function getPrivilegeTargetByIdentifier($privilegeTargetIdentifier) { $this->initialize(); return isset($this->privilegeTargets[$privilegeTargetIdentifier]) ? $this->privilegeTargets[$privilegeTargetIdentifier] : null; }
php
public function getPrivilegeTargetByIdentifier($privilegeTargetIdentifier) { $this->initialize(); return isset($this->privilegeTargets[$privilegeTargetIdentifier]) ? $this->privilegeTargets[$privilegeTargetIdentifier] : null; }
[ "public", "function", "getPrivilegeTargetByIdentifier", "(", "$", "privilegeTargetIdentifier", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "return", "isset", "(", "$", "this", "->", "privilegeTargets", "[", "$", "privilegeTargetIdentifier", "]", ")",...
Returns the privilege target identified by the given string @param string $privilegeTargetIdentifier Identifier of a privilege target @return PrivilegeTarget
[ "Returns", "the", "privilege", "target", "identified", "by", "the", "given", "string" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Policy/PolicyService.php#L283-L287
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/DataMapper.php
DataMapper.mapToObjects
public function mapToObjects(array $objectsData) { $objects = []; foreach ($objectsData as $objectData) { $objects[] = $this->mapToObject($objectData); } return $objects; }
php
public function mapToObjects(array $objectsData) { $objects = []; foreach ($objectsData as $objectData) { $objects[] = $this->mapToObject($objectData); } return $objects; }
[ "public", "function", "mapToObjects", "(", "array", "$", "objectsData", ")", "{", "$", "objects", "=", "[", "]", ";", "foreach", "(", "$", "objectsData", "as", "$", "objectData", ")", "{", "$", "objects", "[", "]", "=", "$", "this", "->", "mapToObject"...
Maps the (aggregate root) node data and registers the objects as reconstituted with the session. Note: QueryResult relies on the fact that the first object of $objects has the numeric index "0" @param array $objectsData @return array
[ "Maps", "the", "(", "aggregate", "root", ")", "node", "data", "and", "registers", "the", "objects", "as", "reconstituted", "with", "the", "session", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/DataMapper.php#L88-L96
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/DataMapper.php
DataMapper.mapToObject
public function mapToObject(array $objectData) { if ($objectData === []) { throw new Exception\InvalidObjectDataException('The array with object data was empty, probably object not found or access denied.', 1277974338); } if ($this->persistenceSession->hasIdentifier($objectData[...
php
public function mapToObject(array $objectData) { if ($objectData === []) { throw new Exception\InvalidObjectDataException('The array with object data was empty, probably object not found or access denied.', 1277974338); } if ($this->persistenceSession->hasIdentifier($objectData[...
[ "public", "function", "mapToObject", "(", "array", "$", "objectData", ")", "{", "if", "(", "$", "objectData", "===", "[", "]", ")", "{", "throw", "new", "Exception", "\\", "InvalidObjectDataException", "(", "'The array with object data was empty, probably object not f...
Maps a single record into the object it represents and registers it as reconstituted with the session. @param array $objectData @return object @throws Exception\InvalidObjectDataException @throws PersistenceException
[ "Maps", "a", "single", "record", "into", "the", "object", "it", "represents", "and", "registers", "it", "as", "reconstituted", "with", "the", "session", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/DataMapper.php#L107-L146
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/DataMapper.php
DataMapper.thawProperties
public function thawProperties($object, $identifier, array $objectData) { $classSchema = $this->reflectionService->getClassSchema($objectData['classname']); foreach ($objectData['properties'] as $propertyName => $propertyData) { if (!$classSchema->hasProperty($propertyName) || ...
php
public function thawProperties($object, $identifier, array $objectData) { $classSchema = $this->reflectionService->getClassSchema($objectData['classname']); foreach ($objectData['properties'] as $propertyName => $propertyData) { if (!$classSchema->hasProperty($propertyName) || ...
[ "public", "function", "thawProperties", "(", "$", "object", ",", "$", "identifier", ",", "array", "$", "objectData", ")", "{", "$", "classSchema", "=", "$", "this", "->", "reflectionService", "->", "getClassSchema", "(", "$", "objectData", "[", "'classname'", ...
Sets the given properties on the object. @param object $object The object to set properties on @param string $identifier The identifier of the object @param array $objectData @return void @throws UnknownObjectException
[ "Sets", "the", "given", "properties", "on", "the", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/DataMapper.php#L157-L227
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/DataMapper.php
DataMapper.mapArray
protected function mapArray(array $arrayValues = null) { if ($arrayValues === null) { return []; } $array = []; foreach ($arrayValues as $arrayValue) { if ($arrayValue['value'] === null) { $array[$arrayValue['index']] = null; } els...
php
protected function mapArray(array $arrayValues = null) { if ($arrayValues === null) { return []; } $array = []; foreach ($arrayValues as $arrayValue) { if ($arrayValue['value'] === null) { $array[$arrayValue['index']] = null; } els...
[ "protected", "function", "mapArray", "(", "array", "$", "arrayValues", "=", "null", ")", "{", "if", "(", "$", "arrayValues", "===", "null", ")", "{", "return", "[", "]", ";", "}", "$", "array", "=", "[", "]", ";", "foreach", "(", "$", "arrayValues", ...
Maps an array proxy structure back to a native PHP array @param array $arrayValues @return array
[ "Maps", "an", "array", "proxy", "structure", "back", "to", "a", "native", "PHP", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/DataMapper.php#L249-L290
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/DataMapper.php
DataMapper.mapSplObjectStorage
protected function mapSplObjectStorage(array $objectStorageValues = null, $createLazySplObjectStorage = false) { if ($objectStorageValues === null) { return new \SplObjectStorage(); } if ($createLazySplObjectStorage) { $objectIdentifiers = []; foreach ($o...
php
protected function mapSplObjectStorage(array $objectStorageValues = null, $createLazySplObjectStorage = false) { if ($objectStorageValues === null) { return new \SplObjectStorage(); } if ($createLazySplObjectStorage) { $objectIdentifiers = []; foreach ($o...
[ "protected", "function", "mapSplObjectStorage", "(", "array", "$", "objectStorageValues", "=", "null", ",", "$", "createLazySplObjectStorage", "=", "false", ")", "{", "if", "(", "$", "objectStorageValues", "===", "null", ")", "{", "return", "new", "\\", "SplObje...
Maps an SplObjectStorage proxy record back to an SplObjectStorage @param array $objectStorageValues @param boolean $createLazySplObjectStorage @return \SplObjectStorage @todo restore information attached to objects?
[ "Maps", "an", "SplObjectStorage", "proxy", "record", "back", "to", "an", "SplObjectStorage" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/DataMapper.php#L300-L324
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.getProperty
public static function getProperty($subject, $propertyName, bool $forceDirectAccess = false) { if (!is_object($subject) && !is_array($subject)) { throw new \InvalidArgumentException('$subject must be an object or array, ' . gettype($subject) . ' given.', 1237301367); } if (!is_st...
php
public static function getProperty($subject, $propertyName, bool $forceDirectAccess = false) { if (!is_object($subject) && !is_array($subject)) { throw new \InvalidArgumentException('$subject must be an object or array, ' . gettype($subject) . ' given.', 1237301367); } if (!is_st...
[ "public", "static", "function", "getProperty", "(", "$", "subject", ",", "$", "propertyName", ",", "bool", "$", "forceDirectAccess", "=", "false", ")", "{", "if", "(", "!", "is_object", "(", "$", "subject", ")", "&&", "!", "is_array", "(", "$", "subject"...
Get a property of a given object or array. Tries to get the property the following ways: - if the target is an array, and has this property, we return it. - if super cow powers should be used, fetch value through reflection - if public getter method exists, call it. - if the target object is an instance of ArrayAcces...
[ "Get", "a", "property", "of", "a", "given", "object", "or", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L67-L82
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.getPropertyInternal
protected static function getPropertyInternal($subject, string $propertyName, bool $forceDirectAccess, bool &$propertyExists) { if ($subject === null) { return null; } if (is_array($subject)) { $propertyExists = array_key_exists($propertyName, $subject); r...
php
protected static function getPropertyInternal($subject, string $propertyName, bool $forceDirectAccess, bool &$propertyExists) { if ($subject === null) { return null; } if (is_array($subject)) { $propertyExists = array_key_exists($propertyName, $subject); r...
[ "protected", "static", "function", "getPropertyInternal", "(", "$", "subject", ",", "string", "$", "propertyName", ",", "bool", "$", "forceDirectAccess", ",", "bool", "&", "$", "propertyExists", ")", "{", "if", "(", "$", "subject", "===", "null", ")", "{", ...
Gets a property of a given object or array. This is an internal method that does only limited type checking for performance reasons. If you can't make sure that $subject is either of type array or object and $propertyName of type string you should use getProperty() instead. @param mixed $subject Object or array to g...
[ "Gets", "a", "property", "of", "a", "given", "object", "or", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L100-L153
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.getPropertyPath
public static function getPropertyPath($subject, string $propertyPath = null) { // TODO: This default value handling is only in place for b/c to have this method accept nulls. // It can be removed with Flow 5.0 and other breaking typehint changes. if ($propertyPath === null) { ...
php
public static function getPropertyPath($subject, string $propertyPath = null) { // TODO: This default value handling is only in place for b/c to have this method accept nulls. // It can be removed with Flow 5.0 and other breaking typehint changes. if ($propertyPath === null) { ...
[ "public", "static", "function", "getPropertyPath", "(", "$", "subject", ",", "string", "$", "propertyPath", "=", "null", ")", "{", "// TODO: This default value handling is only in place for b/c to have this method accept nulls.", "// It can be removed with Flow 5.0 and other br...
Gets a property path from a given object or array. If propertyPath is "bla.blubb", then we first call getProperty($object, 'bla'), and on the resulting object we call getProperty(..., 'blubb'). For arrays the keys are checked likewise. @param mixed $subject An object or array @param string $propertyPath @return mixe...
[ "Gets", "a", "property", "path", "from", "a", "given", "object", "or", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L195-L213
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.setProperty
public static function setProperty(&$subject, $propertyName, $propertyValue, bool $forceDirectAccess = false): bool { if (is_array($subject)) { $subject[$propertyName] = $propertyValue; return true; } if (!is_object($subject)) { throw new \InvalidArgument...
php
public static function setProperty(&$subject, $propertyName, $propertyValue, bool $forceDirectAccess = false): bool { if (is_array($subject)) { $subject[$propertyName] = $propertyValue; return true; } if (!is_object($subject)) { throw new \InvalidArgument...
[ "public", "static", "function", "setProperty", "(", "&", "$", "subject", ",", "$", "propertyName", ",", "$", "propertyValue", ",", "bool", "$", "forceDirectAccess", "=", "false", ")", ":", "bool", "{", "if", "(", "is_array", "(", "$", "subject", ")", ")"...
Set a property for a given object. Tries to set the property the following ways: - if target is an array, set value - if super cow powers should be used, set value through reflection - if public setter method exists, call it. - if public property exists, set it directly. - if the target object is an instance of Array...
[ "Set", "a", "property", "for", "a", "given", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L235-L268
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.getGettablePropertyNames
public static function getGettablePropertyNames($object): array { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1237301369); } if ($object instanceof \stdClass) { $declaredPropertyNames = a...
php
public static function getGettablePropertyNames($object): array { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1237301369); } if ($object instanceof \stdClass) { $declaredPropertyNames = a...
[ "public", "static", "function", "getGettablePropertyNames", "(", "$", "object", ")", ":", "array", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'$object must be an object, '", ".", ...
Returns an array of properties which can be get with the getProperty() method. Includes the following properties: - which can be get through a public getter method. - public properties which can be directly get. @param object $object Object to receive property names for @return array Array of all gettable property n...
[ "Returns", "an", "array", "of", "properties", "which", "can", "be", "get", "with", "the", "getProperty", "()", "method", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L283-L314
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.getSettablePropertyNames
public static function getSettablePropertyNames($object): array { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1264022994); } if ($object instanceof \stdClass) { $declaredPropertyNames = a...
php
public static function getSettablePropertyNames($object): array { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1264022994); } if ($object instanceof \stdClass) { $declaredPropertyNames = a...
[ "public", "static", "function", "getSettablePropertyNames", "(", "$", "object", ")", ":", "array", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'$object must be an object, '", ".", ...
Returns an array of properties which can be set with the setProperty() method. Includes the following properties: - which can be set through a public setter method. - public properties which can be directly set. @param object $object Object to receive property names for @return array Array of all settable property n...
[ "Returns", "an", "array", "of", "properties", "which", "can", "be", "set", "with", "the", "setProperty", "()", "method", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L329-L350
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.isPropertySettable
public static function isPropertySettable($object, string $propertyName): bool { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828920); } $className = TypeHandling::getTypeForValue($object); ...
php
public static function isPropertySettable($object, string $propertyName): bool { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828920); } $className = TypeHandling::getTypeForValue($object); ...
[ "public", "static", "function", "isPropertySettable", "(", "$", "object", ",", "string", "$", "propertyName", ")", ":", "bool", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'$o...
Tells if the value of the specified property can be set by this Object Accessor. @param object $object Object containing the property @param string $propertyName Name of the property to check @return boolean @throws \InvalidArgumentException
[ "Tells", "if", "the", "value", "of", "the", "specified", "property", "can", "be", "set", "by", "this", "Object", "Accessor", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L360-L371
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.isPropertyGettable
public static function isPropertyGettable($object, string $propertyName): bool { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828921); } if (($object instanceof \ArrayAccess && $object->offsetExis...
php
public static function isPropertyGettable($object, string $propertyName): bool { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828921); } if (($object instanceof \ArrayAccess && $object->offsetExis...
[ "public", "static", "function", "isPropertyGettable", "(", "$", "object", ",", "string", "$", "propertyName", ")", ":", "bool", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'$o...
Tells if the value of the specified property can be retrieved by this Object Accessor. @param object $object Object containing the property @param string $propertyName Name of the property to check @return boolean @throws \InvalidArgumentException
[ "Tells", "if", "the", "value", "of", "the", "specified", "property", "can", "be", "retrieved", "by", "this", "Object", "Accessor", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L381-L395
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.getGettableProperties
public static function getGettableProperties($object): array { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1237301370); } $properties = []; foreach (self::getGettablePropertyNames($object) as...
php
public static function getGettableProperties($object): array { if (!is_object($object)) { throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1237301370); } $properties = []; foreach (self::getGettablePropertyNames($object) as...
[ "public", "static", "function", "getGettableProperties", "(", "$", "object", ")", ":", "array", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'$object must be an object, '", ".", "g...
Get all properties (names and their current values) of the current $object that are accessible through this class. @param object $object Object to get all properties from. @return array Associative array of all properties. @throws \InvalidArgumentException @todo What to do with ArrayAccess
[ "Get", "all", "properties", "(", "names", "and", "their", "current", "values", ")", "of", "the", "current", "$object", "that", "are", "accessible", "through", "this", "class", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L406-L420
neos/flow-development-collection
Neos.Utility.ObjectHandling/Classes/ObjectAccess.php
ObjectAccess.instantiateClass
public static function instantiateClass($className, $arguments) { switch (count($arguments)) { case 0: $object = new $className(); break; case 1: $object = new $className($arguments[0]); break; case 2: ...
php
public static function instantiateClass($className, $arguments) { switch (count($arguments)) { case 0: $object = new $className(); break; case 1: $object = new $className($arguments[0]); break; case 2: ...
[ "public", "static", "function", "instantiateClass", "(", "$", "className", ",", "$", "arguments", ")", "{", "switch", "(", "count", "(", "$", "arguments", ")", ")", "{", "case", "0", ":", "$", "object", "=", "new", "$", "className", "(", ")", ";", "b...
Instantiates the class named `$className` using the `$arguments` as constructor arguments (in array order). For less than 7 arguments `new` is used, for more a `ReflectionClass` is created and `newInstanceArgs` is used. Note: this should be used sparingly, just calling `new` yourself or using Dependency Injection are...
[ "Instantiates", "the", "class", "named", "$className", "using", "the", "$arguments", "as", "constructor", "arguments", "(", "in", "array", "order", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Utility.ObjectHandling/Classes/ObjectAccess.php#L448-L478
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/StringLengthValidator.php
StringLengthValidator.isValid
protected function isValid($value) { if ($this->options['maximum'] < $this->options['minimum']) { throw new InvalidValidationOptionsException('The \'maximum\' is less than the \'minimum\' in the StringLengthValidator.', 1238107096); } if (is_object($value)) { if (!me...
php
protected function isValid($value) { if ($this->options['maximum'] < $this->options['minimum']) { throw new InvalidValidationOptionsException('The \'maximum\' is less than the \'minimum\' in the StringLengthValidator.', 1238107096); } if (is_object($value)) { if (!me...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "$", "this", "->", "options", "[", "'maximum'", "]", "<", "$", "this", "->", "options", "[", "'minimum'", "]", ")", "{", "throw", "new", "InvalidValidationOptionsException", "(", ...
Checks if the given value is a valid string (or can be cast to a string if an object is given) and its length is between minimum and maximum specified in the validation options. @param mixed $value The value that should be validated @return void @throws InvalidValidationOptionsException @api
[ "Checks", "if", "the", "given", "value", "is", "a", "valid", "string", "(", "or", "can", "be", "cast", "to", "a", "string", "if", "an", "object", "is", "given", ")", "and", "its", "length", "is", "between", "minimum", "and", "maximum", "specified", "in...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/StringLengthValidator.php#L42-L76
neos/flow-development-collection
Neos.Eel/Classes/FlowQuery/Operations/GetOperation.php
GetOperation.evaluate
public function evaluate(FlowQuery $flowQuery, array $arguments) { $context = $flowQuery->getContext(); if (isset($arguments[0])) { $index = $arguments[0]; if (isset($context[$index])) { return $context[$index]; } else { return null...
php
public function evaluate(FlowQuery $flowQuery, array $arguments) { $context = $flowQuery->getContext(); if (isset($arguments[0])) { $index = $arguments[0]; if (isset($context[$index])) { return $context[$index]; } else { return null...
[ "public", "function", "evaluate", "(", "FlowQuery", "$", "flowQuery", ",", "array", "$", "arguments", ")", "{", "$", "context", "=", "$", "flowQuery", "->", "getContext", "(", ")", ";", "if", "(", "isset", "(", "$", "arguments", "[", "0", "]", ")", "...
{@inheritdoc} @param FlowQuery $flowQuery the FlowQuery object @param array $arguments the context index to fetch from @return mixed
[ "{", "@inheritdoc", "}" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/FlowQuery/Operations/GetOperation.php#L50-L63
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.initializeObject
public function initializeObject() { if ($this->cache->has($this->cacheKey)) { $this->parsedData = $this->cache->get($this->cacheKey); } else { $this->parsedData = $this->parseFiles($this->sourcePaths); $this->parsedData = $this->resolveAliases($this->parsedData, ...
php
public function initializeObject() { if ($this->cache->has($this->cacheKey)) { $this->parsedData = $this->cache->get($this->cacheKey); } else { $this->parsedData = $this->parseFiles($this->sourcePaths); $this->parsedData = $this->resolveAliases($this->parsedData, ...
[ "public", "function", "initializeObject", "(", ")", "{", "if", "(", "$", "this", "->", "cache", "->", "has", "(", "$", "this", "->", "cacheKey", ")", ")", "{", "$", "this", "->", "parsedData", "=", "$", "this", "->", "cache", "->", "get", "(", "$",...
When it's called, CLDR file is parsed or cache is loaded, if available. @return void
[ "When", "it", "s", "called", "CLDR", "file", "is", "parsed", "or", "cache", "is", "loaded", "if", "available", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L104-L113
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.getRawData
public function getRawData($path) { if ($path === '/') { return $this->parsedData; } $pathElements = explode('/', trim($path, '/')); $data = $this->parsedData; foreach ($pathElements as $key) { if (isset($data[$key])) { $data = $data[...
php
public function getRawData($path) { if ($path === '/') { return $this->parsedData; } $pathElements = explode('/', trim($path, '/')); $data = $this->parsedData; foreach ($pathElements as $key) { if (isset($data[$key])) { $data = $data[...
[ "public", "function", "getRawData", "(", "$", "path", ")", "{", "if", "(", "$", "path", "===", "'/'", ")", "{", "return", "$", "this", "->", "parsedData", ";", "}", "$", "pathElements", "=", "explode", "(", "'/'", ",", "trim", "(", "$", "path", ","...
Returns multi-dimensional array representing desired node and it's children, or a string value if the path points to a leaf. Syntax for paths is very simple. It's a group of array indices joined with a slash. It tries to emulate XPath query syntax to some extent. Examples: plurals/pluralRules dates/calendars/calendar...
[ "Returns", "multi", "-", "dimensional", "array", "representing", "desired", "node", "and", "it", "s", "children", "or", "a", "string", "value", "if", "the", "path", "points", "to", "a", "leaf", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L133-L151
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.getRawArray
public function getRawArray($path) { $data = $this->getRawData($path); if (!is_array($data)) { return false; } return $data; }
php
public function getRawArray($path) { $data = $this->getRawData($path); if (!is_array($data)) { return false; } return $data; }
[ "public", "function", "getRawArray", "(", "$", "path", ")", "{", "$", "data", "=", "$", "this", "->", "getRawData", "(", "$", "path", ")", ";", "if", "(", "!", "is_array", "(", "$", "data", ")", ")", "{", "return", "false", ";", "}", "return", "$...
Returns multi-dimensional array representing desired node and it's children. This method will return false if the path points to a leaf (i.e. a string, not an array). @param string $path A path to the node to get @return mixed Array of matching data, or false on failure @see CldrParser @see CldrModel::getRawData()
[ "Returns", "multi", "-", "dimensional", "array", "representing", "desired", "node", "and", "it", "s", "children", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L164-L173
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.getElement
public function getElement($path) { $data = $this->getRawData($path); if (is_array($data)) { return false; } else { return $data; } }
php
public function getElement($path) { $data = $this->getRawData($path); if (is_array($data)) { return false; } else { return $data; } }
[ "public", "function", "getElement", "(", "$", "path", ")", "{", "$", "data", "=", "$", "this", "->", "getRawData", "(", "$", "path", ")", ";", "if", "(", "is_array", "(", "$", "data", ")", ")", "{", "return", "false", ";", "}", "else", "{", "retu...
Returns string value from a path given. Path must point to leaf. Syntax for paths is same as for getRawData. @param string $path A path to the element to get @return mixed String with desired element, or false on failure
[ "Returns", "string", "value", "from", "a", "path", "given", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L183-L192
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.findNodesWithinPath
public function findNodesWithinPath($path, $nodeName) { $data = $this->getRawArray($path); if ($data === false) { return false; } $filteredData = []; foreach ($data as $nodeString => $children) { if ($this->getNodeName($nodeString) === $nodeName) { ...
php
public function findNodesWithinPath($path, $nodeName) { $data = $this->getRawArray($path); if ($data === false) { return false; } $filteredData = []; foreach ($data as $nodeString => $children) { if ($this->getNodeName($nodeString) === $nodeName) { ...
[ "public", "function", "findNodesWithinPath", "(", "$", "path", ",", "$", "nodeName", ")", "{", "$", "data", "=", "$", "this", "->", "getRawArray", "(", "$", "path", ")", ";", "if", "(", "$", "data", "===", "false", ")", "{", "return", "false", ";", ...
Returns all nodes with given name found within given path @param string $path A path to search in @param string $nodeName A name of the nodes to return @return mixed String with desired element, or false on failure
[ "Returns", "all", "nodes", "with", "given", "name", "found", "within", "given", "path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L201-L217
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.getNodeName
public static function getNodeName($nodeString) { $positionOfFirstAttribute = strpos($nodeString, '[@'); if ($positionOfFirstAttribute === false) { return $nodeString; } return substr($nodeString, 0, $positionOfFirstAttribute); }
php
public static function getNodeName($nodeString) { $positionOfFirstAttribute = strpos($nodeString, '[@'); if ($positionOfFirstAttribute === false) { return $nodeString; } return substr($nodeString, 0, $positionOfFirstAttribute); }
[ "public", "static", "function", "getNodeName", "(", "$", "nodeString", ")", "{", "$", "positionOfFirstAttribute", "=", "strpos", "(", "$", "nodeString", ",", "'[@'", ")", ";", "if", "(", "$", "positionOfFirstAttribute", "===", "false", ")", "{", "return", "$...
Returns node name extracted from node string The internal representation of CLDR uses array keys like: 'calendar[@type="gregorian"]' This method helps to extract the node name from such keys. @param string $nodeString String with node name and optional attribute(s) @return string Name of the node
[ "Returns", "node", "name", "extracted", "from", "node", "string" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L229-L238
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.getAttributeValue
public static function getAttributeValue($nodeString, $attributeName) { $attributeName = '[@' . $attributeName . '="'; $positionOfAttributeName = strpos($nodeString, $attributeName); if ($positionOfAttributeName === false) { return false; } $positionOfAttributeV...
php
public static function getAttributeValue($nodeString, $attributeName) { $attributeName = '[@' . $attributeName . '="'; $positionOfAttributeName = strpos($nodeString, $attributeName); if ($positionOfAttributeName === false) { return false; } $positionOfAttributeV...
[ "public", "static", "function", "getAttributeValue", "(", "$", "nodeString", ",", "$", "attributeName", ")", "{", "$", "attributeName", "=", "'[@'", ".", "$", "attributeName", ".", "'=\"'", ";", "$", "positionOfAttributeName", "=", "strpos", "(", "$", "nodeStr...
Parses the node string and returns a value of attribute for name provided. An internal representation of CLDR data used by this class is a simple multi dimensional array where keys are nodes' names. If node has attributes, they are all stored as one string (e.g. 'calendar[@type="gregorian"]' or 'calendar[@type="gregor...
[ "Parses", "the", "node", "string", "and", "returns", "a", "value", "of", "attribute", "for", "name", "provided", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L258-L269
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.parseFiles
protected function parseFiles(array $sourcePaths) { $parsedFiles = []; foreach ($sourcePaths as $sourcePath) { $parsedFiles[] = $this->cldrParser->getParsedData($sourcePath); } // Merge all data starting with most generic file so we get proper inheritance $parse...
php
protected function parseFiles(array $sourcePaths) { $parsedFiles = []; foreach ($sourcePaths as $sourcePath) { $parsedFiles[] = $this->cldrParser->getParsedData($sourcePath); } // Merge all data starting with most generic file so we get proper inheritance $parse...
[ "protected", "function", "parseFiles", "(", "array", "$", "sourcePaths", ")", "{", "$", "parsedFiles", "=", "[", "]", ";", "foreach", "(", "$", "sourcePaths", "as", "$", "sourcePath", ")", "{", "$", "parsedFiles", "[", "]", "=", "$", "this", "->", "cld...
Parses given CLDR files using CldrParser and merges parsed data. Merging is done with inheritance in mind, as defined in CLDR specification. @param array<string> $sourcePaths Absolute paths to CLDR files (can be one file) @return array Parsed and merged data
[ "Parses", "given", "CLDR", "files", "using", "CldrParser", "and", "merges", "parsed", "data", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L279-L296
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.mergeTwoParsedFiles
protected function mergeTwoParsedFiles($firstParsedData, $secondParsedData) { $mergedData = $firstParsedData; if (is_array($secondParsedData)) { foreach ($secondParsedData as $nodeString => $children) { if (isset($firstParsedData[$nodeString])) { $mer...
php
protected function mergeTwoParsedFiles($firstParsedData, $secondParsedData) { $mergedData = $firstParsedData; if (is_array($secondParsedData)) { foreach ($secondParsedData as $nodeString => $children) { if (isset($firstParsedData[$nodeString])) { $mer...
[ "protected", "function", "mergeTwoParsedFiles", "(", "$", "firstParsedData", ",", "$", "secondParsedData", ")", "{", "$", "mergedData", "=", "$", "firstParsedData", ";", "if", "(", "is_array", "(", "$", "secondParsedData", ")", ")", "{", "foreach", "(", "$", ...
Merges two sets of data from two separate CLDR files into one array. Merging is done with inheritance in mind, as defined in CLDR specification. @param mixed $firstParsedData Part of data from first file (either array or string) @param mixed $secondParsedData Part of data from second file (either array or string) @re...
[ "Merges", "two", "sets", "of", "data", "from", "two", "separate", "CLDR", "files", "into", "one", "array", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L307-L324
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/CldrModel.php
CldrModel.resolveAliases
protected function resolveAliases($data, $currentPath) { if (!is_array($data)) { return $data; } foreach ($data as $nodeString => $nodeChildren) { if (self::getNodeName($nodeString) === 'alias') { if (self::getAttributeValue($nodeString, 'source') !==...
php
protected function resolveAliases($data, $currentPath) { if (!is_array($data)) { return $data; } foreach ($data as $nodeString => $nodeChildren) { if (self::getNodeName($nodeString) === 'alias') { if (self::getAttributeValue($nodeString, 'source') !==...
[ "protected", "function", "resolveAliases", "(", "$", "data", ",", "$", "currentPath", ")", "{", "if", "(", "!", "is_array", "(", "$", "data", ")", ")", "{", "return", "$", "data", ";", "}", "foreach", "(", "$", "data", "as", "$", "nodeString", "=>", ...
Resolves any 'alias' nodes in parsed CLDR data. CLDR uses 'alias' tag which denotes places where data should be copied from. This tag has 'source' attribute pointing (by relative XPath query) to the source node - it should be copied with all it's children. @param mixed $data Part of internal array to resolve aliases ...
[ "Resolves", "any", "alias", "nodes", "in", "parsed", "CLDR", "data", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/CldrModel.php#L338-L374
neos/flow-development-collection
Neos.Eel/Classes/Helper/MathHelper.php
MathHelper.round
public function round($subject, $precision = 0) { if (!is_numeric($subject)) { return NAN; } $subject = floatval($subject); if ($precision != null && !is_int($precision)) { return NAN; } return round($subject, $precision); }
php
public function round($subject, $precision = 0) { if (!is_numeric($subject)) { return NAN; } $subject = floatval($subject); if ($precision != null && !is_int($precision)) { return NAN; } return round($subject, $precision); }
[ "public", "function", "round", "(", "$", "subject", ",", "$", "precision", "=", "0", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "subject", ")", ")", "{", "return", "NAN", ";", "}", "$", "subject", "=", "floatval", "(", "$", "subject", ")", ...
Rounds the subject to the given precision The precision defines the number of digits after the decimal point. Negative values are also supported (-1 rounds to full 10ths). @param float $subject The value to round @param integer $precision The precision (digits after decimal point) to use, defaults to 0 @return float ...
[ "Rounds", "the", "subject", "to", "the", "given", "precision" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/MathHelper.php#L407-L417
neos/flow-development-collection
Neos.Eel/Classes/Helper/MathHelper.php
MathHelper.trunc
public function trunc($x) { $sign = $this->sign($x); switch ($sign) { case -1: return ceil($x); case 1: return floor($x); default: return $sign; } }
php
public function trunc($x) { $sign = $this->sign($x); switch ($sign) { case -1: return ceil($x); case 1: return floor($x); default: return $sign; } }
[ "public", "function", "trunc", "(", "$", "x", ")", "{", "$", "sign", "=", "$", "this", "->", "sign", "(", "$", "x", ")", ";", "switch", "(", "$", "sign", ")", "{", "case", "-", "1", ":", "return", "ceil", "(", "$", "x", ")", ";", "case", "1...
Get the integral part of the given number by removing any fractional digits This function doesn't round the given number but merely calls ceil(x) or floor(x) depending on the sign of the number. @param float $x A number @return integer The integral part of the given number
[ "Get", "the", "integral", "part", "of", "the", "given", "number", "by", "removing", "any", "fractional", "digits" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Eel/Classes/Helper/MathHelper.php#L492-L503
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.initialize
public function initialize(array $options) { foreach ($options as $optionName => $optionValue) { $methodName = 'set' . ucfirst($optionName); if (method_exists($this, $methodName)) { $this->$methodName($optionValue); } } }
php
public function initialize(array $options) { foreach ($options as $optionName => $optionValue) { $methodName = 'set' . ucfirst($optionName); if (method_exists($this, $methodName)) { $this->$methodName($optionValue); } } }
[ "public", "function", "initialize", "(", "array", "$", "options", ")", "{", "foreach", "(", "$", "options", "as", "$", "optionName", "=>", "$", "optionValue", ")", "{", "$", "methodName", "=", "'set'", ".", "ucfirst", "(", "$", "optionName", ")", ";", ...
Initializes the backend @param array $options @return void
[ "Initializes", "the", "backend" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L217-L225
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.persistObjects
protected function persistObjects() { $this->visitedDuringPersistence = new \SplObjectStorage(); foreach ($this->aggregateRootObjects as $object) { $this->persistObject($object, null); } foreach ($this->changedEntities as $object) { $this->persistObject($objec...
php
protected function persistObjects() { $this->visitedDuringPersistence = new \SplObjectStorage(); foreach ($this->aggregateRootObjects as $object) { $this->persistObject($object, null); } foreach ($this->changedEntities as $object) { $this->persistObject($objec...
[ "protected", "function", "persistObjects", "(", ")", "{", "$", "this", "->", "visitedDuringPersistence", "=", "new", "\\", "SplObjectStorage", "(", ")", ";", "foreach", "(", "$", "this", "->", "aggregateRootObjects", "as", "$", "object", ")", "{", "$", "this...
First persist new objects, then check reconstituted entities. @return void
[ "First", "persist", "new", "objects", "then", "check", "reconstituted", "entities", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L288-L297
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.persistObject
protected function persistObject($object, $parentIdentifier) { if (isset($this->visitedDuringPersistence[$object])) { return $this->visitedDuringPersistence[$object]; } $identifier = $this->persistenceSession->getIdentifierByObject($object); $this->visitedDuringPersisten...
php
protected function persistObject($object, $parentIdentifier) { if (isset($this->visitedDuringPersistence[$object])) { return $this->visitedDuringPersistence[$object]; } $identifier = $this->persistenceSession->getIdentifierByObject($object); $this->visitedDuringPersisten...
[ "protected", "function", "persistObject", "(", "$", "object", ",", "$", "parentIdentifier", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "visitedDuringPersistence", "[", "$", "object", "]", ")", ")", "{", "return", "$", "this", "->", "visitedDurin...
Stores or updates an object in the underlying storage. @param object $object The object to persist @param string $parentIdentifier @return string @api
[ "Stores", "or", "updates", "an", "object", "in", "the", "underlying", "storage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L307-L325
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.processDeletedObjects
protected function processDeletedObjects() { foreach ($this->deletedEntities as $entity) { if ($this->persistenceSession->hasObject($entity)) { $this->removeEntity($entity); $this->persistenceSession->unregisterReconstitutedEntity($entity); $this->...
php
protected function processDeletedObjects() { foreach ($this->deletedEntities as $entity) { if ($this->persistenceSession->hasObject($entity)) { $this->removeEntity($entity); $this->persistenceSession->unregisterReconstitutedEntity($entity); $this->...
[ "protected", "function", "processDeletedObjects", "(", ")", "{", "foreach", "(", "$", "this", "->", "deletedEntities", "as", "$", "entity", ")", "{", "if", "(", "$", "this", "->", "persistenceSession", "->", "hasObject", "(", "$", "entity", ")", ")", "{", ...
Iterate over deleted entities and process them @return void
[ "Iterate", "over", "deleted", "entities", "and", "process", "them" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L343-L353
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.validateObject
protected function validateObject($object) { $classSchema = $this->reflectionService->getClassSchema($object); $validator = $this->validatorResolver->getBaseValidatorConjunction($classSchema->getClassName()); if ($validator === null) { return; } $validationResult ...
php
protected function validateObject($object) { $classSchema = $this->reflectionService->getClassSchema($object); $validator = $this->validatorResolver->getBaseValidatorConjunction($classSchema->getClassName()); if ($validator === null) { return; } $validationResult ...
[ "protected", "function", "validateObject", "(", "$", "object", ")", "{", "$", "classSchema", "=", "$", "this", "->", "reflectionService", "->", "getClassSchema", "(", "$", "object", ")", ";", "$", "validator", "=", "$", "this", "->", "validatorResolver", "->...
Validates the given object and throws an exception if validation fails. @param object $object @return void @throws ObjectValidationFailedException @api
[ "Validates", "the", "given", "object", "and", "throws", "an", "exception", "if", "validation", "fails", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L379-L398
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.getType
protected function getType($value) { if (is_object($value)) { return get_class($value); } else { return gettype($value) === 'double' ? 'float' : gettype($value); } }
php
protected function getType($value) { if (is_object($value)) { return get_class($value); } else { return gettype($value) === 'double' ? 'float' : gettype($value); } }
[ "protected", "function", "getType", "(", "$", "value", ")", "{", "if", "(", "is_object", "(", "$", "value", ")", ")", "{", "return", "get_class", "(", "$", "value", ")", ";", "}", "else", "{", "return", "gettype", "(", "$", "value", ")", "===", "'d...
Returns the type of $value, i.e. the class name or primitive type. @param mixed $value @return string
[ "Returns", "the", "type", "of", "$value", "i", ".", "e", ".", "the", "class", "name", "or", "primitive", "type", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L406-L413
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.flattenValue
protected function flattenValue($identifier, $object, $propertyName, array $propertyMetaData, array &$propertyData) { $propertyValue = ObjectAccess::getProperty($object, $propertyName, true); if ($propertyValue instanceof PersistenceMagicInterface) { $propertyData[$propertyName] = [ ...
php
protected function flattenValue($identifier, $object, $propertyName, array $propertyMetaData, array &$propertyData) { $propertyValue = ObjectAccess::getProperty($object, $propertyName, true); if ($propertyValue instanceof PersistenceMagicInterface) { $propertyData[$propertyName] = [ ...
[ "protected", "function", "flattenValue", "(", "$", "identifier", ",", "$", "object", ",", "$", "propertyName", ",", "array", "$", "propertyMetaData", ",", "array", "&", "$", "propertyData", ")", "{", "$", "propertyValue", "=", "ObjectAccess", "::", "getPropert...
Convert a value to the internal object data format @param string $identifier The object's identifier @param object $object The object with the property to flatten @param string $propertyName The name of the property @param array $propertyMetaData The property metadata @param array $propertyData Reference to the proper...
[ "Convert", "a", "value", "to", "the", "internal", "object", "data", "format" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L473-L518
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.removeDeletedReference
protected function removeDeletedReference($object, $propertyName, $propertyMetaData) { $previousValue = $this->persistenceSession->getCleanStateOfProperty($object, $propertyName); if ($previousValue !== null && is_array($previousValue) && isset($previousValue['value']['identifier']) && $...
php
protected function removeDeletedReference($object, $propertyName, $propertyMetaData) { $previousValue = $this->persistenceSession->getCleanStateOfProperty($object, $propertyName); if ($previousValue !== null && is_array($previousValue) && isset($previousValue['value']['identifier']) && $...
[ "protected", "function", "removeDeletedReference", "(", "$", "object", ",", "$", "propertyName", ",", "$", "propertyMetaData", ")", "{", "$", "previousValue", "=", "$", "this", "->", "persistenceSession", "->", "getCleanStateOfProperty", "(", "$", "object", ",", ...
Remove any unreferenced non aggregate root entity @param object $object @param string $propertyName @param array $propertyMetaData @return void
[ "Remove", "any", "unreferenced", "non", "aggregate", "root", "entity" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L528-L539
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.checkPropertyValue
protected function checkPropertyValue($object, $propertyName, array $propertyMetaData) { $propertyValue = ObjectAccess::getProperty($object, $propertyName, true); $propertyType = $propertyMetaData['type']; if ($propertyType === 'ArrayObject') { throw new PersistenceException('Arr...
php
protected function checkPropertyValue($object, $propertyName, array $propertyMetaData) { $propertyValue = ObjectAccess::getProperty($object, $propertyName, true); $propertyType = $propertyMetaData['type']; if ($propertyType === 'ArrayObject') { throw new PersistenceException('Arr...
[ "protected", "function", "checkPropertyValue", "(", "$", "object", ",", "$", "propertyName", ",", "array", "$", "propertyMetaData", ")", "{", "$", "propertyValue", "=", "ObjectAccess", "::", "getProperty", "(", "$", "object", ",", "$", "propertyName", ",", "tr...
Check the property value for allowed types and throw exceptions for unsupported types. @param object $object The object with the property to check @param string $propertyName The name of the property to check @param array $propertyMetaData Property metadata @return mixed The value of the property @throws UnexpectedTyp...
[ "Check", "the", "property", "value", "for", "allowed", "types", "and", "throw", "exceptions", "for", "unsupported", "types", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L572-L593
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.processArray
protected function processArray(array $array = null, $parentIdentifier, array $previousArray = null) { if ($previousArray !== null && is_array($previousArray['value'])) { $this->removeDeletedArrayEntries($array, $previousArray['value']); } if ($array === null) { retu...
php
protected function processArray(array $array = null, $parentIdentifier, array $previousArray = null) { if ($previousArray !== null && is_array($previousArray['value'])) { $this->removeDeletedArrayEntries($array, $previousArray['value']); } if ($array === null) { retu...
[ "protected", "function", "processArray", "(", "array", "$", "array", "=", "null", ",", "$", "parentIdentifier", ",", "array", "$", "previousArray", "=", "null", ")", "{", "if", "(", "$", "previousArray", "!==", "null", "&&", "is_array", "(", "$", "previous...
Store an array as a set of records, with each array element becoming a property named like the key and the value. Note: Objects contained in the array will have a matching entry created, the objects must be persisted elsewhere! @param array $array The array to persist @param string $parentIdentifier @param array $pre...
[ "Store", "an", "array", "as", "a", "set", "of", "records", "with", "each", "array", "element", "becoming", "a", "property", "named", "like", "the", "key", "and", "the", "value", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L608-L652
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.processNestedArray
protected function processNestedArray($parentIdentifier, array $nestedArray, \Closure $handler = null) { $identifier = 'a' . Algorithms::generateRandomString(23); $data = [ 'multivalue' => true, 'value' => $this->processArray($nestedArray, $parentIdentifier) ]; ...
php
protected function processNestedArray($parentIdentifier, array $nestedArray, \Closure $handler = null) { $identifier = 'a' . Algorithms::generateRandomString(23); $data = [ 'multivalue' => true, 'value' => $this->processArray($nestedArray, $parentIdentifier) ]; ...
[ "protected", "function", "processNestedArray", "(", "$", "parentIdentifier", ",", "array", "$", "nestedArray", ",", "\\", "Closure", "$", "handler", "=", "null", ")", "{", "$", "identifier", "=", "'a'", ".", "Algorithms", "::", "generateRandomString", "(", "23...
"Serializes" a nested array for storage. @param string $parentIdentifier @param array $nestedArray @param \Closure $handler @return string
[ "Serializes", "a", "nested", "array", "for", "storage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L662-L673
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.removeDeletedArrayEntries
protected function removeDeletedArrayEntries(array $array = null, array $previousArray) { foreach ($previousArray as $item) { if ($item['type'] === 'array') { $this->removeDeletedArrayEntries($array[$item['index']], $item['value']); } elseif ($this->getTypeName($item[...
php
protected function removeDeletedArrayEntries(array $array = null, array $previousArray) { foreach ($previousArray as $item) { if ($item['type'] === 'array') { $this->removeDeletedArrayEntries($array[$item['index']], $item['value']); } elseif ($this->getTypeName($item[...
[ "protected", "function", "removeDeletedArrayEntries", "(", "array", "$", "array", "=", "null", ",", "array", "$", "previousArray", ")", "{", "foreach", "(", "$", "previousArray", "as", "$", "item", ")", "{", "if", "(", "$", "item", "[", "'type'", "]", "=...
Remove objects removed from array compared to $previousArray. @param array $array @param array $previousArray @return void
[ "Remove", "objects", "removed", "from", "array", "compared", "to", "$previousArray", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L682-L704
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.arrayContainsObject
protected function arrayContainsObject(array $array, $object, $identifier) { if (in_array($object, $array, true) === true) { return true; } foreach ($array as $value) { if ($value instanceof $object && $this->persistenceSession->getIdentifierByObject($value) === $ide...
php
protected function arrayContainsObject(array $array, $object, $identifier) { if (in_array($object, $array, true) === true) { return true; } foreach ($array as $value) { if ($value instanceof $object && $this->persistenceSession->getIdentifierByObject($value) === $ide...
[ "protected", "function", "arrayContainsObject", "(", "array", "$", "array", ",", "$", "object", ",", "$", "identifier", ")", "{", "if", "(", "in_array", "(", "$", "object", ",", "$", "array", ",", "true", ")", "===", "true", ")", "{", "return", "true",...
Checks whether the given object is contained in the array. This checks for object identity in terms of the persistence layer, i.e. the UUID, when comparing entities. @param array $array @param object $object @param string $identifier @return boolean
[ "Checks", "whether", "the", "given", "object", "is", "contained", "in", "the", "array", ".", "This", "checks", "for", "object", "identity", "in", "terms", "of", "the", "persistence", "layer", "i", ".", "e", ".", "the", "UUID", "when", "comparing", "entitie...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L716-L729
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.processSplObjectStorage
protected function processSplObjectStorage(\SplObjectStorage $splObjectStorage = null, $parentIdentifier, array $previousObjectStorage = null) { if ($previousObjectStorage !== null && is_array($previousObjectStorage['value'])) { $this->removeDeletedSplObjectStorageEntries($splObjectStorage, $pre...
php
protected function processSplObjectStorage(\SplObjectStorage $splObjectStorage = null, $parentIdentifier, array $previousObjectStorage = null) { if ($previousObjectStorage !== null && is_array($previousObjectStorage['value'])) { $this->removeDeletedSplObjectStorageEntries($splObjectStorage, $pre...
[ "protected", "function", "processSplObjectStorage", "(", "\\", "SplObjectStorage", "$", "splObjectStorage", "=", "null", ",", "$", "parentIdentifier", ",", "array", "$", "previousObjectStorage", "=", "null", ")", "{", "if", "(", "$", "previousObjectStorage", "!==", ...
Store an SplObjectStorage as a set of records. Note: Objects contained in the SplObjectStorage will have a matching entry created, the objects must be persisted elsewhere! @param \SplObjectStorage $splObjectStorage The SplObjectStorage to persist @param string $parentIdentifier @param array $previousObjectStorage the...
[ "Store", "an", "SplObjectStorage", "as", "a", "set", "of", "records", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L743-L775
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php
AbstractBackend.removeDeletedSplObjectStorageEntries
protected function removeDeletedSplObjectStorageEntries(\SplObjectStorage $splObjectStorage = null, array $previousObjectStorage) { // remove objects detached since reconstitution foreach ($previousObjectStorage as $item) { if ($splObjectStorage instanceof LazySplObjectStorage && !$this-...
php
protected function removeDeletedSplObjectStorageEntries(\SplObjectStorage $splObjectStorage = null, array $previousObjectStorage) { // remove objects detached since reconstitution foreach ($previousObjectStorage as $item) { if ($splObjectStorage instanceof LazySplObjectStorage && !$this-...
[ "protected", "function", "removeDeletedSplObjectStorageEntries", "(", "\\", "SplObjectStorage", "$", "splObjectStorage", "=", "null", ",", "array", "$", "previousObjectStorage", ")", "{", "// remove objects detached since reconstitution", "foreach", "(", "$", "previousObjectS...
Remove objects removed from SplObjectStorage compared to $previousSplObjectStorage. @param \SplObjectStorage $splObjectStorage @param array $previousObjectStorage @return void
[ "Remove", "objects", "removed", "from", "SplObjectStorage", "compared", "to", "$previousSplObjectStorage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Generic/Backend/AbstractBackend.php#L785-L804
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.format
public function format($value, Locale $locale, array $styleProperties = []) { if (isset($styleProperties[0])) { $formatType = $styleProperties[0]; DatesReader::validateFormatType($formatType); } else { $formatType = DatesReader::FORMAT_TYPE_DATETIME; } ...
php
public function format($value, Locale $locale, array $styleProperties = []) { if (isset($styleProperties[0])) { $formatType = $styleProperties[0]; DatesReader::validateFormatType($formatType); } else { $formatType = DatesReader::FORMAT_TYPE_DATETIME; } ...
[ "public", "function", "format", "(", "$", "value", ",", "Locale", "$", "locale", ",", "array", "$", "styleProperties", "=", "[", "]", ")", "{", "if", "(", "isset", "(", "$", "styleProperties", "[", "0", "]", ")", ")", "{", "$", "formatType", "=", "...
Formats provided value using optional style properties @param mixed $value Formatter-specific variable to format (can be integer, \DateTime, etc) @param Locale $locale Locale to use @param array $styleProperties Integer-indexed array of formatter-specific style properties (can be empty) @return string String represent...
[ "Formats", "provided", "value", "using", "optional", "style", "properties" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L55-L79
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.formatDateTimeWithCustomPattern
public function formatDateTimeWithCustomPattern(\DateTimeInterface $dateTime, $format, Locale $locale) { return $this->doFormattingWithParsedFormat($dateTime, $this->datesReader->parseCustomFormat($format), $this->datesReader->getLocalizedLiteralsForLocale($locale)); }
php
public function formatDateTimeWithCustomPattern(\DateTimeInterface $dateTime, $format, Locale $locale) { return $this->doFormattingWithParsedFormat($dateTime, $this->datesReader->parseCustomFormat($format), $this->datesReader->getLocalizedLiteralsForLocale($locale)); }
[ "public", "function", "formatDateTimeWithCustomPattern", "(", "\\", "DateTimeInterface", "$", "dateTime", ",", "$", "format", ",", "Locale", "$", "locale", ")", "{", "return", "$", "this", "->", "doFormattingWithParsedFormat", "(", "$", "dateTime", ",", "$", "th...
Returns dateTime formatted by custom format, string provided in parameter. Format must obey syntax defined in CLDR specification, excluding unimplemented features (see documentation for DatesReader class). Format is remembered in this classes cache and won't be parsed again for some time. @param \DateTimeInterface $...
[ "Returns", "dateTime", "formatted", "by", "custom", "format", "string", "provided", "in", "parameter", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L97-L100
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.formatDate
public function formatDate(\DateTimeInterface $date, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT) { DatesReader::validateFormatLength($formatLength); return $this->doFormattingWithParsedFormat($date, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_DAT...
php
public function formatDate(\DateTimeInterface $date, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT) { DatesReader::validateFormatLength($formatLength); return $this->doFormattingWithParsedFormat($date, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_DAT...
[ "public", "function", "formatDate", "(", "\\", "DateTimeInterface", "$", "date", ",", "Locale", "$", "locale", ",", "$", "formatLength", "=", "DatesReader", "::", "FORMAT_LENGTH_DEFAULT", ")", "{", "DatesReader", "::", "validateFormatLength", "(", "$", "formatLeng...
Formats date with format string for date defined in CLDR for particular locale. @param \DateTimeInterface $date PHP object representing particular point in time @param Locale $locale @param string $formatLength One of DatesReader FORMAT_LENGTH constants @return string Formatted date @api
[ "Formats", "date", "with", "format", "string", "for", "date", "defined", "in", "CLDR", "for", "particular", "locale", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L112-L116
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.formatTime
public function formatTime(\DateTimeInterface $time, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT) { DatesReader::validateFormatLength($formatLength); return $this->doFormattingWithParsedFormat($time, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_TIM...
php
public function formatTime(\DateTimeInterface $time, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT) { DatesReader::validateFormatLength($formatLength); return $this->doFormattingWithParsedFormat($time, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_TIM...
[ "public", "function", "formatTime", "(", "\\", "DateTimeInterface", "$", "time", ",", "Locale", "$", "locale", ",", "$", "formatLength", "=", "DatesReader", "::", "FORMAT_LENGTH_DEFAULT", ")", "{", "DatesReader", "::", "validateFormatLength", "(", "$", "formatLeng...
Formats time with format string for time defined in CLDR for particular locale. @param \DateTimeInterface $time PHP object representing particular point in time @param Locale $locale @param string $formatLength One of DatesReader FORMAT_LENGTH constants @return string Formatted time @api
[ "Formats", "time", "with", "format", "string", "for", "time", "defined", "in", "CLDR", "for", "particular", "locale", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L128-L132
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.formatDateTime
public function formatDateTime(\DateTimeInterface $dateTime, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT) { DatesReader::validateFormatLength($formatLength); return $this->doFormattingWithParsedFormat($dateTime, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FOR...
php
public function formatDateTime(\DateTimeInterface $dateTime, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT) { DatesReader::validateFormatLength($formatLength); return $this->doFormattingWithParsedFormat($dateTime, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FOR...
[ "public", "function", "formatDateTime", "(", "\\", "DateTimeInterface", "$", "dateTime", ",", "Locale", "$", "locale", ",", "$", "formatLength", "=", "DatesReader", "::", "FORMAT_LENGTH_DEFAULT", ")", "{", "DatesReader", "::", "validateFormatLength", "(", "$", "fo...
Formats dateTime with format string for date and time defined in CLDR for particular locale. First date and time are formatted separately, and then dateTime format from CLDR is used to place date and time in correct order. @param \DateTimeInterface $dateTime PHP object representing particular point in time @param Loc...
[ "Formats", "dateTime", "with", "format", "string", "for", "date", "and", "time", "defined", "in", "CLDR", "for", "particular", "locale", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L147-L151
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.doFormattingWithParsedFormat
protected function doFormattingWithParsedFormat(\DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals) { $formattedDateTime = ''; foreach ($parsedFormat as $subformat) { if (is_array($subformat)) { // This is just a simple string we use literally ...
php
protected function doFormattingWithParsedFormat(\DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals) { $formattedDateTime = ''; foreach ($parsedFormat as $subformat) { if (is_array($subformat)) { // This is just a simple string we use literally ...
[ "protected", "function", "doFormattingWithParsedFormat", "(", "\\", "DateTimeInterface", "$", "dateTime", ",", "array", "$", "parsedFormat", ",", "array", "$", "localizedLiterals", ")", "{", "$", "formattedDateTime", "=", "''", ";", "foreach", "(", "$", "parsedFor...
Formats provided dateTime object. Format rules defined in $parsedFormat array are used. Localizable literals are replaced with elements from $localizedLiterals array. @param \DateTimeInterface $dateTime PHP object representing particular point in time @param array $parsedFormat An array describing format (as in $pars...
[ "Formats", "provided", "dateTime", "object", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L164-L178
neos/flow-development-collection
Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php
DatetimeFormatter.doFormattingForSubpattern
protected function doFormattingForSubpattern(\DateTimeInterface $dateTime, $subformat, array $localizedLiterals) { $formatLengthOfSubformat = strlen($subformat); switch ($subformat[0]) { case 'h': return $this->padString($dateTime->format('g'), $formatLengthOfSubformat);...
php
protected function doFormattingForSubpattern(\DateTimeInterface $dateTime, $subformat, array $localizedLiterals) { $formatLengthOfSubformat = strlen($subformat); switch ($subformat[0]) { case 'h': return $this->padString($dateTime->format('g'), $formatLengthOfSubformat);...
[ "protected", "function", "doFormattingForSubpattern", "(", "\\", "DateTimeInterface", "$", "dateTime", ",", "$", "subformat", ",", "array", "$", "localizedLiterals", ")", "{", "$", "formatLengthOfSubformat", "=", "strlen", "(", "$", "subformat", ")", ";", "switch"...
Formats date or time element according to the subpattern provided. Returns a string with formatted one "part" of DateTime object (seconds, day, month etc). Not all pattern symbols defined in CLDR are supported; some of the rules are simplified. Please see the documentation for DatesReader for details. Cases in the c...
[ "Formats", "date", "or", "time", "element", "according", "to", "the", "subpattern", "provided", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Formatter/DatetimeFormatter.php#L199-L307
neos/flow-development-collection
Neos.Flow/Classes/Mvc/FlashMessageContainer.php
FlashMessageContainer.getMessages
public function getMessages($severity = null) { if ($severity === null) { return $this->messages; } $messages = []; foreach ($this->messages as $message) { if ($message->getSeverity() === $severity) { $messages[] = $message; } ...
php
public function getMessages($severity = null) { if ($severity === null) { return $this->messages; } $messages = []; foreach ($this->messages as $message) { if ($message->getSeverity() === $severity) { $messages[] = $message; } ...
[ "public", "function", "getMessages", "(", "$", "severity", "=", "null", ")", "{", "if", "(", "$", "severity", "===", "null", ")", "{", "return", "$", "this", "->", "messages", ";", "}", "$", "messages", "=", "[", "]", ";", "foreach", "(", "$", "thi...
Returns all currently stored flash messages. @param string $severity severity of messages (from Message::SEVERITY_* constants) to return. @return array<Message> @api
[ "Returns", "all", "currently", "stored", "flash", "messages", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/FlashMessageContainer.php#L50-L63
neos/flow-development-collection
Neos.Flow/Classes/Mvc/FlashMessageContainer.php
FlashMessageContainer.flush
public function flush($severity = null) { if ($severity === null) { $this->messages = []; } else { foreach ($this->messages as $index => $message) { if ($message->getSeverity() === $severity) { unset($this->messages[$index]); ...
php
public function flush($severity = null) { if ($severity === null) { $this->messages = []; } else { foreach ($this->messages as $index => $message) { if ($message->getSeverity() === $severity) { unset($this->messages[$index]); ...
[ "public", "function", "flush", "(", "$", "severity", "=", "null", ")", "{", "if", "(", "$", "severity", "===", "null", ")", "{", "$", "this", "->", "messages", "=", "[", "]", ";", "}", "else", "{", "foreach", "(", "$", "this", "->", "messages", "...
Remove messages from this container. @param string $severity severity of messages (from Message::SEVERITY_* constants) to remove. @return void @Flow\Session(autoStart=true) @api
[ "Remove", "messages", "from", "this", "container", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/FlashMessageContainer.php#L73-L84
neos/flow-development-collection
Neos.Flow/Classes/Mvc/FlashMessageContainer.php
FlashMessageContainer.getMessagesAndFlush
public function getMessagesAndFlush($severity = null) { $messages = $this->getMessages($severity); if (count($messages) > 0) { $this->flush($severity); } return $messages; }
php
public function getMessagesAndFlush($severity = null) { $messages = $this->getMessages($severity); if (count($messages) > 0) { $this->flush($severity); } return $messages; }
[ "public", "function", "getMessagesAndFlush", "(", "$", "severity", "=", "null", ")", "{", "$", "messages", "=", "$", "this", "->", "getMessages", "(", "$", "severity", ")", ";", "if", "(", "count", "(", "$", "messages", ")", ">", "0", ")", "{", "$", ...
Get all flash messages (with given severity) currently available and remove them from the container. @param string $severity severity of the messages (One of the Message::SEVERITY_* constants) @return array<Message> @api
[ "Get", "all", "flash", "messages", "(", "with", "given", "severity", ")", "currently", "available", "and", "remove", "them", "from", "the", "container", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/FlashMessageContainer.php#L93-L100
neos/flow-development-collection
Neos.Flow/Classes/Package/PackageOrderResolver.php
PackageOrderResolver.sort
public function sort() { if ($this->sortedPackages === null) { $this->sortedPackages = []; reset($this->unsortedPackages); while (!empty($this->unsortedPackages)) { $resolved = $this->sortPackage(key($this->unsortedPackages)); if ($resolved...
php
public function sort() { if ($this->sortedPackages === null) { $this->sortedPackages = []; reset($this->unsortedPackages); while (!empty($this->unsortedPackages)) { $resolved = $this->sortPackage(key($this->unsortedPackages)); if ($resolved...
[ "public", "function", "sort", "(", ")", "{", "if", "(", "$", "this", "->", "sortedPackages", "===", "null", ")", "{", "$", "this", "->", "sortedPackages", "=", "[", "]", ";", "reset", "(", "$", "this", "->", "unsortedPackages", ")", ";", "while", "("...
Sorts the packages and returns the sorted packages array @return array
[ "Sorts", "the", "packages", "and", "returns", "the", "sorted", "packages", "array" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageOrderResolver.php#L48-L64
neos/flow-development-collection
Neos.Flow/Classes/Package/PackageOrderResolver.php
PackageOrderResolver.sortPackage
protected function sortPackage($packageKey) { if (!isset($this->packageStates[$packageKey])) { // Package does not exist; so that means it is just skipped; but that's to the outside as if sorting was successful. return true; } if (!isset($this->unsortedPackages[$pack...
php
protected function sortPackage($packageKey) { if (!isset($this->packageStates[$packageKey])) { // Package does not exist; so that means it is just skipped; but that's to the outside as if sorting was successful. return true; } if (!isset($this->unsortedPackages[$pack...
[ "protected", "function", "sortPackage", "(", "$", "packageKey", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "packageStates", "[", "$", "packageKey", "]", ")", ")", "{", "// Package does not exist; so that means it is just skipped; but that's to the outs...
Recursively sort dependencies of a package. This is a depth-first approach that recursively adds all dependent packages to the sorted list before adding the given package. Visited packages are flagged to break up cyclic dependencies. @param string $packageKey Package key to process @return boolean true if package was ...
[ "Recursively", "sort", "dependencies", "of", "a", "package", ".", "This", "is", "a", "depth", "-", "first", "approach", "that", "recursively", "adds", "all", "dependent", "packages", "to", "the", "sorted", "list", "before", "adding", "the", "given", "package",...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageOrderResolver.php#L74-L125
neos/flow-development-collection
Neos.Flow/Classes/Package/PackageOrderResolver.php
PackageOrderResolver.sortListBefore
protected function sortListBefore($packageKey, array $packagesToLoadBefore) { $unresolvedDependencies = 0; foreach ($packagesToLoadBefore as $composerNameToLoadBefore) { if (!$this->packageRequirementIsComposerPackage($composerNameToLoadBefore)) { continue; } ...
php
protected function sortListBefore($packageKey, array $packagesToLoadBefore) { $unresolvedDependencies = 0; foreach ($packagesToLoadBefore as $composerNameToLoadBefore) { if (!$this->packageRequirementIsComposerPackage($composerNameToLoadBefore)) { continue; } ...
[ "protected", "function", "sortListBefore", "(", "$", "packageKey", ",", "array", "$", "packagesToLoadBefore", ")", "{", "$", "unresolvedDependencies", "=", "0", ";", "foreach", "(", "$", "packagesToLoadBefore", "as", "$", "composerNameToLoadBefore", ")", "{", "if"...
Tries to sort packages from the given list before the named package key. Ignores non existing packages and any composer key without "/" (eg. "php"). @param string $packageKey @param string[] $packagesToLoadBefore @return int
[ "Tries", "to", "sort", "packages", "from", "the", "given", "list", "before", "the", "named", "package", "key", ".", "Ignores", "non", "existing", "packages", "and", "any", "composer", "key", "without", "/", "(", "eg", ".", "php", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/PackageOrderResolver.php#L135-L157
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ObjectSerializationTrait.php
ObjectSerializationTrait.Flow_serializeRelatedEntities
private function Flow_serializeRelatedEntities(array $transientProperties, array $propertyVarTags) { $reflectedClass = new \ReflectionClass(__CLASS__); $allReflectedProperties = $reflectedClass->getProperties(); foreach ($allReflectedProperties as $reflectionProperty) { $property...
php
private function Flow_serializeRelatedEntities(array $transientProperties, array $propertyVarTags) { $reflectedClass = new \ReflectionClass(__CLASS__); $allReflectedProperties = $reflectedClass->getProperties(); foreach ($allReflectedProperties as $reflectionProperty) { $property...
[ "private", "function", "Flow_serializeRelatedEntities", "(", "array", "$", "transientProperties", ",", "array", "$", "propertyVarTags", ")", "{", "$", "reflectedClass", "=", "new", "\\", "ReflectionClass", "(", "__CLASS__", ")", ";", "$", "allReflectedProperties", "...
Code to find and serialize entities on sleep @param array $transientProperties @param array $propertyVarTags @return array
[ "Code", "to", "find", "and", "serialize", "entities", "on", "sleep" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ObjectSerializationTrait.php#L37-L98
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ObjectSerializationTrait.php
ObjectSerializationTrait.Flow_searchForEntitiesAndStoreIdentifierArray
private function Flow_searchForEntitiesAndStoreIdentifierArray($path, $propertyValue, $originalPropertyName) { if (is_array($propertyValue) || (is_object($propertyValue) && ($propertyValue instanceof \ArrayObject || $propertyValue instanceof \SplObjectStorage))) { foreach ($propertyValue as $key...
php
private function Flow_searchForEntitiesAndStoreIdentifierArray($path, $propertyValue, $originalPropertyName) { if (is_array($propertyValue) || (is_object($propertyValue) && ($propertyValue instanceof \ArrayObject || $propertyValue instanceof \SplObjectStorage))) { foreach ($propertyValue as $key...
[ "private", "function", "Flow_searchForEntitiesAndStoreIdentifierArray", "(", "$", "path", ",", "$", "propertyValue", ",", "$", "originalPropertyName", ")", "{", "if", "(", "is_array", "(", "$", "propertyValue", ")", "||", "(", "is_object", "(", "$", "propertyValue...
Serialize entities that are inside an array or SplObjectStorage @param string $path @param mixed $propertyValue @param string $originalPropertyName @return void
[ "Serialize", "entities", "that", "are", "inside", "an", "array", "or", "SplObjectStorage" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ObjectSerializationTrait.php#L108-L136
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/Proxy/ObjectSerializationTrait.php
ObjectSerializationTrait.Flow_setRelatedEntities
private function Flow_setRelatedEntities() { if (property_exists($this, 'Flow_Persistence_RelatedEntities') && is_array($this->Flow_Persistence_RelatedEntities)) { $persistenceManager = Bootstrap::$staticObjectManager->get(PersistenceManagerInterface::class); foreach ($this->Flow_Per...
php
private function Flow_setRelatedEntities() { if (property_exists($this, 'Flow_Persistence_RelatedEntities') && is_array($this->Flow_Persistence_RelatedEntities)) { $persistenceManager = Bootstrap::$staticObjectManager->get(PersistenceManagerInterface::class); foreach ($this->Flow_Per...
[ "private", "function", "Flow_setRelatedEntities", "(", ")", "{", "if", "(", "property_exists", "(", "$", "this", ",", "'Flow_Persistence_RelatedEntities'", ")", "&&", "is_array", "(", "$", "this", "->", "Flow_Persistence_RelatedEntities", ")", ")", "{", "$", "pers...
Reconstitues related entities to an unserialized object in __wakeup. Used in __wakeup methods of proxy classes. Note: This method adds code which ignores objects of type Neos\Flow\ResourceManagement\ResourcePointer in order to provide backwards compatibility data generated with Flow 2.2.x which still provided that cla...
[ "Reconstitues", "related", "entities", "to", "an", "unserialized", "object", "in", "__wakeup", ".", "Used", "in", "__wakeup", "methods", "of", "proxy", "classes", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/Proxy/ObjectSerializationTrait.php#L147-L161
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/AbstractValidator.php
AbstractValidator.pushResult
protected function pushResult() { if ($this->result !== null) { array_push($this->resultStack, $this->result); } $this->result = new ErrorResult(); return $this->result; }
php
protected function pushResult() { if ($this->result !== null) { array_push($this->resultStack, $this->result); } $this->result = new ErrorResult(); return $this->result; }
[ "protected", "function", "pushResult", "(", ")", "{", "if", "(", "$", "this", "->", "result", "!==", "null", ")", "{", "array_push", "(", "$", "this", "->", "resultStack", ",", "$", "this", "->", "result", ")", ";", "}", "$", "this", "->", "result", ...
Push a new Result onto the Result stack and return it in order to fix cyclic calls to a single validator. @since Flow 4.3 @see https://github.com/neos/flow-development-collection/pull/1275#issuecomment-414052031 @return ErrorResult
[ "Push", "a", "new", "Result", "onto", "the", "Result", "stack", "and", "return", "it", "in", "order", "to", "fix", "cyclic", "calls", "to", "a", "single", "validator", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AbstractValidator.php#L109-L116
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/AbstractValidator.php
AbstractValidator.popResult
protected function popResult() { $result = $this->result; $this->result = array_pop($this->resultStack); return $result; }
php
protected function popResult() { $result = $this->result; $this->result = array_pop($this->resultStack); return $result; }
[ "protected", "function", "popResult", "(", ")", "{", "$", "result", "=", "$", "this", "->", "result", ";", "$", "this", "->", "result", "=", "array_pop", "(", "$", "this", "->", "resultStack", ")", ";", "return", "$", "result", ";", "}" ]
Pop and return the current Result from the stack and make $this->result point to the last Result again. @since Flow 4.3 @return ErrorResult
[ "Pop", "and", "return", "the", "current", "Result", "from", "the", "stack", "and", "make", "$this", "-", ">", "result", "point", "to", "the", "last", "Result", "again", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AbstractValidator.php#L123-L128
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/AbstractValidator.php
AbstractValidator.validate
public function validate($value) { $this->pushResult(); if ($this->acceptsEmptyValues === false || $this->isEmpty($value) === false) { $this->isValid($value); } return $this->popResult(); }
php
public function validate($value) { $this->pushResult(); if ($this->acceptsEmptyValues === false || $this->isEmpty($value) === false) { $this->isValid($value); } return $this->popResult(); }
[ "public", "function", "validate", "(", "$", "value", ")", "{", "$", "this", "->", "pushResult", "(", ")", ";", "if", "(", "$", "this", "->", "acceptsEmptyValues", "===", "false", "||", "$", "this", "->", "isEmpty", "(", "$", "value", ")", "===", "fal...
Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred. @param mixed $value The value that should be validated @return ErrorResult @api
[ "Checks", "if", "the", "given", "value", "is", "valid", "according", "to", "the", "validator", "and", "returns", "the", "Error", "Messages", "object", "which", "occurred", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AbstractValidator.php#L138-L145
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/AbstractValidator.php
AbstractValidator.addError
protected function addError($message, $code, array $arguments = []) { $this->result->addError(new ValidationError($message, $code, $arguments)); }
php
protected function addError($message, $code, array $arguments = []) { $this->result->addError(new ValidationError($message, $code, $arguments)); }
[ "protected", "function", "addError", "(", "$", "message", ",", "$", "code", ",", "array", "$", "arguments", "=", "[", "]", ")", "{", "$", "this", "->", "result", "->", "addError", "(", "new", "ValidationError", "(", "$", "message", ",", "$", "code", ...
Creates a new validation error object and adds it to $this->errors @param string $message The error message @param integer $code The error code (a unix timestamp) @param array $arguments Arguments to be replaced in message @return void @api
[ "Creates", "a", "new", "validation", "error", "object", "and", "adds", "it", "to", "$this", "-", ">", "errors" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/AbstractValidator.php#L166-L169
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/PersistentResource.php
PersistentResource.setFilename
public function setFilename($filename) { $this->throwExceptionIfProtected(); $pathInfo = UnicodeFunctions::pathinfo($filename); $extension = (isset($pathInfo['extension']) ? '.' . strtolower($pathInfo['extension']) : ''); $this->filename = $pathInfo['filename'] . $extension; ...
php
public function setFilename($filename) { $this->throwExceptionIfProtected(); $pathInfo = UnicodeFunctions::pathinfo($filename); $extension = (isset($pathInfo['extension']) ? '.' . strtolower($pathInfo['extension']) : ''); $this->filename = $pathInfo['filename'] . $extension; ...
[ "public", "function", "setFilename", "(", "$", "filename", ")", "{", "$", "this", "->", "throwExceptionIfProtected", "(", ")", ";", "$", "pathInfo", "=", "UnicodeFunctions", "::", "pathinfo", "(", "$", "filename", ")", ";", "$", "extension", "=", "(", "iss...
Sets the filename which is used when this resource is downloaded or saved as a file @param string $filename @return void @api
[ "Sets", "the", "filename", "which", "is", "used", "when", "this", "resource", "is", "downloaded", "or", "saved", "as", "a", "file" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/PersistentResource.php#L185-L193
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/PersistentResource.php
PersistentResource.getMediaType
public function getMediaType() { if ($this->mediaType === null) { return Utility\MediaTypes::getMediaTypeFromFilename($this->filename); } else { return $this->mediaType; } }
php
public function getMediaType() { if ($this->mediaType === null) { return Utility\MediaTypes::getMediaTypeFromFilename($this->filename); } else { return $this->mediaType; } }
[ "public", "function", "getMediaType", "(", ")", "{", "if", "(", "$", "this", "->", "mediaType", "===", "null", ")", "{", "return", "Utility", "\\", "MediaTypes", "::", "getMediaTypeFromFilename", "(", "$", "this", "->", "filename", ")", ";", "}", "else", ...
Returns the Media Type for this resource @return string The IANA Media Type @api
[ "Returns", "the", "Media", "Type", "for", "this", "resource" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/PersistentResource.php#L260-L267
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/PersistentResource.php
PersistentResource.setSha1
public function setSha1($sha1) { $this->throwExceptionIfProtected(); if (!is_string($sha1) || preg_match('/[A-Fa-f0-9]{40}/', $sha1) !== 1) { throw new \InvalidArgumentException('Specified invalid hash to setSha1()', 1362564220); } $this->sha1 = strtolower($sha1); }
php
public function setSha1($sha1) { $this->throwExceptionIfProtected(); if (!is_string($sha1) || preg_match('/[A-Fa-f0-9]{40}/', $sha1) !== 1) { throw new \InvalidArgumentException('Specified invalid hash to setSha1()', 1362564220); } $this->sha1 = strtolower($sha1); }
[ "public", "function", "setSha1", "(", "$", "sha1", ")", "{", "$", "this", "->", "throwExceptionIfProtected", "(", ")", ";", "if", "(", "!", "is_string", "(", "$", "sha1", ")", "||", "preg_match", "(", "'/[A-Fa-f0-9]{40}/'", ",", "$", "sha1", ")", "!==", ...
Sets the SHA1 hash of the content of this resource @param string $sha1 The sha1 hash @return void @api
[ "Sets", "the", "SHA1", "hash", "of", "the", "content", "of", "this", "resource" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/PersistentResource.php#L309-L316
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/PersistentResource.php
PersistentResource.createTemporaryLocalCopy
public function createTemporaryLocalCopy() { if ($this->temporaryLocalCopyPathAndFilename === null) { $temporaryPathAndFilename = $this->environment->getPathToTemporaryDirectory() . 'ResourceFiles/'; try { Utility\Files::createDirectoryRecursively($temporaryPathAndFil...
php
public function createTemporaryLocalCopy() { if ($this->temporaryLocalCopyPathAndFilename === null) { $temporaryPathAndFilename = $this->environment->getPathToTemporaryDirectory() . 'ResourceFiles/'; try { Utility\Files::createDirectoryRecursively($temporaryPathAndFil...
[ "public", "function", "createTemporaryLocalCopy", "(", ")", "{", "if", "(", "$", "this", "->", "temporaryLocalCopyPathAndFilename", "===", "null", ")", "{", "$", "temporaryPathAndFilename", "=", "$", "this", "->", "environment", "->", "getPathToTemporaryDirectory", ...
Returns the path to a local file representing this resource for use with read-only file operations such as reading or copying. Note that you must not store or publish file paths returned from this method as they will change with every request. @return string Absolute path and filename pointing to the temporary local ...
[ "Returns", "the", "path", "to", "a", "local", "file", "representing", "this", "resource", "for", "use", "with", "read", "-", "only", "file", "operations", "such", "as", "reading", "or", "copying", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/PersistentResource.php#L351-L386
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/PersistentResource.php
PersistentResource.postPersist
public function postPersist() { if ($this->lifecycleEventsActive) { $collection = $this->resourceManager->getCollection($this->collectionName); $collection->getTarget()->publishResource($this, $collection); } }
php
public function postPersist() { if ($this->lifecycleEventsActive) { $collection = $this->resourceManager->getCollection($this->collectionName); $collection->getTarget()->publishResource($this, $collection); } }
[ "public", "function", "postPersist", "(", ")", "{", "if", "(", "$", "this", "->", "lifecycleEventsActive", ")", "{", "$", "collection", "=", "$", "this", "->", "resourceManager", "->", "getCollection", "(", "$", "this", "->", "collectionName", ")", ";", "$...
Doctrine lifecycle event callback which is triggered on "postPersist" events. This method triggers the publication of this resource. @return void @ORM\PostPersist
[ "Doctrine", "lifecycle", "event", "callback", "which", "is", "triggered", "on", "postPersist", "events", ".", "This", "method", "triggers", "the", "publication", "of", "this", "resource", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/PersistentResource.php#L395-L401
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/PersistentResource.php
PersistentResource.preRemove
public function preRemove() { if ($this->lifecycleEventsActive && $this->deleted === false) { $this->resourceManager->deleteResource($this); } }
php
public function preRemove() { if ($this->lifecycleEventsActive && $this->deleted === false) { $this->resourceManager->deleteResource($this); } }
[ "public", "function", "preRemove", "(", ")", "{", "if", "(", "$", "this", "->", "lifecycleEventsActive", "&&", "$", "this", "->", "deleted", "===", "false", ")", "{", "$", "this", "->", "resourceManager", "->", "deleteResource", "(", "$", "this", ")", ";...
Doctrine lifecycle event callback which is triggered on "preRemove" events. This method triggers the deletion of data related to this resource. @return void @ORM\PreRemove
[ "Doctrine", "lifecycle", "event", "callback", "which", "is", "triggered", "on", "preRemove", "events", ".", "This", "method", "triggers", "the", "deletion", "of", "data", "related", "to", "this", "resource", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/PersistentResource.php#L410-L415
neos/flow-development-collection
Neos.Flow/Classes/Property/TypeConverter/IntegerConverter.php
IntegerConverter.convertFrom
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { if ($source instanceof \DateTimeInterface) { return $source->format('U'); } if ($source === null || strlen($source) === 0) { ...
php
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) { if ($source instanceof \DateTimeInterface) { return $source->format('U'); } if ($source === null || strlen($source) === 0) { ...
[ "public", "function", "convertFrom", "(", "$", "source", ",", "$", "targetType", ",", "array", "$", "convertedChildProperties", "=", "[", "]", ",", "PropertyMappingConfigurationInterface", "$", "configuration", "=", "null", ")", "{", "if", "(", "$", "source", ...
Actually convert from $source to $targetType, in fact a noop here. @param mixed $source @param string $targetType @param array $convertedChildProperties @param PropertyMappingConfigurationInterface $configuration @return integer|Error @api
[ "Actually", "convert", "from", "$source", "to", "$targetType", "in", "fact", "a", "noop", "here", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Property/TypeConverter/IntegerConverter.php#L55-L69
neos/flow-development-collection
Neos.Flow/Classes/Aop/Advice/AroundAdvice.php
AroundAdvice.invoke
public function invoke(JoinPointInterface $joinPoint) { if ($this->runtimeEvaluator !== null && $this->runtimeEvaluator->__invoke($joinPoint, $this->objectManager) === false) { return $joinPoint->getAdviceChain()->proceed($joinPoint); } $adviceObject = $this->objectManager->get(...
php
public function invoke(JoinPointInterface $joinPoint) { if ($this->runtimeEvaluator !== null && $this->runtimeEvaluator->__invoke($joinPoint, $this->objectManager) === false) { return $joinPoint->getAdviceChain()->proceed($joinPoint); } $adviceObject = $this->objectManager->get(...
[ "public", "function", "invoke", "(", "JoinPointInterface", "$", "joinPoint", ")", "{", "if", "(", "$", "this", "->", "runtimeEvaluator", "!==", "null", "&&", "$", "this", "->", "runtimeEvaluator", "->", "__invoke", "(", "$", "joinPoint", ",", "$", "this", ...
Invokes the advice method @param JoinPointInterface $joinPoint The current join point which is passed to the advice method @return mixed Result of the advice method
[ "Invokes", "the", "advice", "method" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Advice/AroundAdvice.php#L27-L36
neos/flow-development-collection
Neos.Flow/Classes/I18n/AbstractXmlParser.php
AbstractXmlParser.getParsedData
public function getParsedData(string $sourcePath) { if (!isset($this->parsedFiles[$sourcePath])) { $this->parsedFiles[$sourcePath] = $this->parseXmlFile($sourcePath); } return $this->parsedFiles[$sourcePath]; }
php
public function getParsedData(string $sourcePath) { if (!isset($this->parsedFiles[$sourcePath])) { $this->parsedFiles[$sourcePath] = $this->parseXmlFile($sourcePath); } return $this->parsedFiles[$sourcePath]; }
[ "public", "function", "getParsedData", "(", "string", "$", "sourcePath", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "parsedFiles", "[", "$", "sourcePath", "]", ")", ")", "{", "$", "this", "->", "parsedFiles", "[", "$", "sourcePath", "]"...
Returns parsed representation of XML file. Parses XML if it wasn't done before. Caches parsed data. @param string $sourcePath An absolute path to XML file @return array Parsed XML file
[ "Returns", "parsed", "representation", "of", "XML", "file", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/AbstractXmlParser.php#L38-L45
neos/flow-development-collection
Neos.Flow/Classes/I18n/AbstractXmlParser.php
AbstractXmlParser.parseXmlFile
protected function parseXmlFile(string $sourcePath) { $rootXmlNode = $this->getRootNode($sourcePath); return $this->doParsingFromRoot($rootXmlNode); }
php
protected function parseXmlFile(string $sourcePath) { $rootXmlNode = $this->getRootNode($sourcePath); return $this->doParsingFromRoot($rootXmlNode); }
[ "protected", "function", "parseXmlFile", "(", "string", "$", "sourcePath", ")", "{", "$", "rootXmlNode", "=", "$", "this", "->", "getRootNode", "(", "$", "sourcePath", ")", ";", "return", "$", "this", "->", "doParsingFromRoot", "(", "$", "rootXmlNode", ")", ...
Reads and parses XML file and returns internal representation of data. @param string $sourcePath An absolute path to XML file @return array Parsed XML file
[ "Reads", "and", "parses", "XML", "file", "and", "returns", "internal", "representation", "of", "data", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/AbstractXmlParser.php#L80-L85
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/DataTypes/ObjectArray.php
ObjectArray.convertToPHPValue
public function convertToPHPValue($value, AbstractPlatform $platform) { $this->initializeDependencies(); switch ($platform->getName()) { case 'postgresql': $value = (is_resource($value)) ? stream_get_contents($value) : $value; $array = parent::convertToPH...
php
public function convertToPHPValue($value, AbstractPlatform $platform) { $this->initializeDependencies(); switch ($platform->getName()) { case 'postgresql': $value = (is_resource($value)) ? stream_get_contents($value) : $value; $array = parent::convertToPH...
[ "public", "function", "convertToPHPValue", "(", "$", "value", ",", "AbstractPlatform", "$", "platform", ")", "{", "$", "this", "->", "initializeDependencies", "(", ")", ";", "switch", "(", "$", "platform", "->", "getName", "(", ")", ")", "{", "case", "'pos...
Converts a value from its database representation to its PHP representation of this type. @param mixed $value The value to convert. @param AbstractPlatform $platform The currently used database platform. @return array The PHP representation of the value.
[ "Converts", "a", "value", "from", "its", "database", "representation", "to", "its", "PHP", "representation", "of", "this", "type", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/DataTypes/ObjectArray.php#L77-L92
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/DataTypes/ObjectArray.php
ObjectArray.convertToDatabaseValue
public function convertToDatabaseValue($array, AbstractPlatform $platform) { $this->initializeDependencies(); $this->encodeObjectReferences($array); switch ($platform->getName()) { case 'postgresql': return bin2hex(parent::convertToDatabaseValue($array, $platfor...
php
public function convertToDatabaseValue($array, AbstractPlatform $platform) { $this->initializeDependencies(); $this->encodeObjectReferences($array); switch ($platform->getName()) { case 'postgresql': return bin2hex(parent::convertToDatabaseValue($array, $platfor...
[ "public", "function", "convertToDatabaseValue", "(", "$", "array", ",", "AbstractPlatform", "$", "platform", ")", "{", "$", "this", "->", "initializeDependencies", "(", ")", ";", "$", "this", "->", "encodeObjectReferences", "(", "$", "array", ")", ";", "switch...
Converts a value from its PHP representation to its database representation of this type. @param array $array The value to convert. @param AbstractPlatform $platform The currently used database platform. @return mixed The database representation of the value.
[ "Converts", "a", "value", "from", "its", "PHP", "representation", "to", "its", "database", "representation", "of", "this", "type", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/DataTypes/ObjectArray.php#L102-L114
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/DataTypes/ObjectArray.php
ObjectArray.encodeObjectReferences
protected function encodeObjectReferences(array &$array) { foreach ($array as &$value) { if (is_array($value)) { $this->encodeObjectReferences($value); } if (!is_object($value) || (is_object($value) && $value instanceof DependencyProxy)) { ...
php
protected function encodeObjectReferences(array &$array) { foreach ($array as &$value) { if (is_array($value)) { $this->encodeObjectReferences($value); } if (!is_object($value) || (is_object($value) && $value instanceof DependencyProxy)) { ...
[ "protected", "function", "encodeObjectReferences", "(", "array", "&", "$", "array", ")", "{", "foreach", "(", "$", "array", "as", "&", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "this", "->", "encodeObjectRefe...
Traverses the $array and replaces known persisted objects with a tuple of type and identifier. @param array $array @return void @throws \RuntimeException
[ "Traverses", "the", "$array", "and", "replaces", "known", "persisted", "objects", "with", "a", "tuple", "of", "type", "and", "identifier", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/DataTypes/ObjectArray.php#L161-L192
neos/flow-development-collection
Neos.Flow/Classes/Error/DebugExceptionHandler.php
DebugExceptionHandler.echoExceptionWeb
protected function echoExceptionWeb($exception) { $statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500; $statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode); if (!headers_sent()) { header(sprintf('HTTP/1.1 %s...
php
protected function echoExceptionWeb($exception) { $statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500; $statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode); if (!headers_sent()) { header(sprintf('HTTP/1.1 %s...
[ "protected", "function", "echoExceptionWeb", "(", "$", "exception", ")", "{", "$", "statusCode", "=", "(", "$", "exception", "instanceof", "WithHttpStatusInterface", ")", "?", "$", "exception", "->", "getStatusCode", "(", ")", ":", "500", ";", "$", "statusMess...
Formats and echoes the exception as XHTML. @param \Throwable $exception @return void
[ "Formats", "and", "echoes", "the", "exception", "as", "XHTML", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/DebugExceptionHandler.php#L59-L77
neos/flow-development-collection
Neos.Flow/Classes/Error/DebugExceptionHandler.php
DebugExceptionHandler.renderStatically
protected function renderStatically(int $statusCode, \Throwable $exception) { $statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode); $exceptionHeader = '<div class="Flow-Debug-Exception-Header">'; while (true) { $filepaths = Debugger::findProxyAndShortFi...
php
protected function renderStatically(int $statusCode, \Throwable $exception) { $statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode); $exceptionHeader = '<div class="Flow-Debug-Exception-Header">'; while (true) { $filepaths = Debugger::findProxyAndShortFi...
[ "protected", "function", "renderStatically", "(", "int", "$", "statusCode", ",", "\\", "Throwable", "$", "exception", ")", "{", "$", "statusMessage", "=", "ResponseInformationHelper", "::", "getStatusMessageByCode", "(", "$", "statusCode", ")", ";", "$", "exceptio...
Returns the statically rendered exception message @param integer $statusCode @param \Throwable $exception @return void
[ "Returns", "the", "statically", "rendered", "exception", "message" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Error/DebugExceptionHandler.php#L86-L146
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Command/DocumentationCommandController.php
DocumentationCommandController.generateXsdCommand
public function generateXsdCommand(string $phpNamespace, string $xsdNamespace = null, string $targetFile = null, string $xsdDomain = ''): void { $xsdDomain = trim($xsdDomain); $parsedDomain = parse_url($xsdDomain); if (empty($xsdDomain) || !isset($parsedDomain['host'], $parsedDomain['scheme'...
php
public function generateXsdCommand(string $phpNamespace, string $xsdNamespace = null, string $targetFile = null, string $xsdDomain = ''): void { $xsdDomain = trim($xsdDomain); $parsedDomain = parse_url($xsdDomain); if (empty($xsdDomain) || !isset($parsedDomain['host'], $parsedDomain['scheme'...
[ "public", "function", "generateXsdCommand", "(", "string", "$", "phpNamespace", ",", "string", "$", "xsdNamespace", "=", "null", ",", "string", "$", "targetFile", "=", "null", ",", "string", "$", "xsdDomain", "=", "''", ")", ":", "void", "{", "$", "xsdDoma...
Generate Fluid ViewHelper XSD Schema Generates Schema documentation (XSD) for your ViewHelpers, preparing the file to be placed online and used by any XSD-aware editor. After creating the XSD file, reference it in your IDE and import the namespace in your Fluid template by adding the xmlns:* attribute(s): <html xmlns=...
[ "Generate", "Fluid", "ViewHelper", "XSD", "Schema" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Command/DocumentationCommandController.php#L48-L71
neos/flow-development-collection
Neos.Flow/Classes/Security/RequestPattern/Ip.php
Ip.matchRequest
public function matchRequest(RequestInterface $request) { if (!isset($this->options['cidrPattern'])) { throw new InvalidRequestPatternException('Missing option "cidrPattern" in the Ip request pattern configuration', 1446224520); } if (!$request instanceof ActionRequest) { ...
php
public function matchRequest(RequestInterface $request) { if (!isset($this->options['cidrPattern'])) { throw new InvalidRequestPatternException('Missing option "cidrPattern" in the Ip request pattern configuration', 1446224520); } if (!$request instanceof ActionRequest) { ...
[ "public", "function", "matchRequest", "(", "RequestInterface", "$", "request", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "options", "[", "'cidrPattern'", "]", ")", ")", "{", "throw", "new", "InvalidRequestPatternException", "(", "'Missing opti...
Matches a \Neos\Flow\Mvc\RequestInterface against the set IP pattern rules @param RequestInterface $request The request that should be matched @return boolean true if the pattern matched, false otherwise @throws InvalidRequestPatternException
[ "Matches", "a", "\\", "Neos", "\\", "Flow", "\\", "Mvc", "\\", "RequestInterface", "against", "the", "set", "IP", "pattern", "rules" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/RequestPattern/Ip.php#L59-L68
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/Controller/AbstractAuthenticationController.php
AbstractAuthenticationController.authenticateAction
public function authenticateAction() { $authenticationException = null; try { $this->authenticationManager->authenticate(); } catch (AuthenticationRequiredException $exception) { $authenticationException = $exception; } if (!$this->authenticationManag...
php
public function authenticateAction() { $authenticationException = null; try { $this->authenticationManager->authenticate(); } catch (AuthenticationRequiredException $exception) { $authenticationException = $exception; } if (!$this->authenticationManag...
[ "public", "function", "authenticateAction", "(", ")", "{", "$", "authenticationException", "=", "null", ";", "try", "{", "$", "this", "->", "authenticationManager", "->", "authenticate", "(", ")", ";", "}", "catch", "(", "AuthenticationRequiredException", "$", "...
Calls the authentication manager to authenticate all active tokens and redirects to the original intercepted request on success if there is one stored in the security context. If no intercepted request is found, the function simply returns. If authentication fails, the result of calling the defined $errorMethodName is...
[ "Calls", "the", "authentication", "manager", "to", "authenticate", "all", "active", "tokens", "and", "redirects", "to", "the", "original", "intercepted", "request", "on", "success", "if", "there", "is", "one", "stored", "in", "the", "security", "context", ".", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/Controller/AbstractAuthenticationController.php#L77-L96
neos/flow-development-collection
Neos.Flow/Classes/Security/Authentication/Controller/AbstractAuthenticationController.php
AbstractAuthenticationController.onAuthenticationFailure
protected function onAuthenticationFailure(AuthenticationRequiredException $exception = null) { $this->flashMessageContainer->addMessage(new Error('Authentication failed!', ($exception === null ? 1347016771 : $exception->getCode()))); }
php
protected function onAuthenticationFailure(AuthenticationRequiredException $exception = null) { $this->flashMessageContainer->addMessage(new Error('Authentication failed!', ($exception === null ? 1347016771 : $exception->getCode()))); }
[ "protected", "function", "onAuthenticationFailure", "(", "AuthenticationRequiredException", "$", "exception", "=", "null", ")", "{", "$", "this", "->", "flashMessageContainer", "->", "addMessage", "(", "new", "Error", "(", "'Authentication failed!'", ",", "(", "$", ...
Is called if authentication failed. Override this method in your login controller to take any custom action for this event. Most likely you would want to redirect to some action showing the login form again. @param AuthenticationRequiredException $exception The exception thrown while the authentication process @retur...
[ "Is", "called", "if", "authentication", "failed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authentication/Controller/AbstractAuthenticationController.php#L121-L124
neos/flow-development-collection
Neos.Flow/Classes/Aop/AspectContainer.php
AspectContainer.reduceTargetClassNames
public function reduceTargetClassNames(Builder\ClassNameIndex $classNameIndex): Builder\ClassNameIndex { $result = new Builder\ClassNameIndex(); foreach ($this->advisors as $advisor) { $result->applyUnion($advisor->getPointcut()->reduceTargetClassNames($classNameIndex)); } ...
php
public function reduceTargetClassNames(Builder\ClassNameIndex $classNameIndex): Builder\ClassNameIndex { $result = new Builder\ClassNameIndex(); foreach ($this->advisors as $advisor) { $result->applyUnion($advisor->getPointcut()->reduceTargetClassNames($classNameIndex)); } ...
[ "public", "function", "reduceTargetClassNames", "(", "Builder", "\\", "ClassNameIndex", "$", "classNameIndex", ")", ":", "Builder", "\\", "ClassNameIndex", "{", "$", "result", "=", "new", "Builder", "\\", "ClassNameIndex", "(", ")", ";", "foreach", "(", "$", "...
This method is used to optimize the matching process. @param Builder\ClassNameIndex $classNameIndex @return Builder\ClassNameIndex
[ "This", "method", "is", "used", "to", "optimize", "the", "matching", "process", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/AspectContainer.php#L213-L230
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Link/ActionViewHelper.php
ActionViewHelper.render
public function render() { $uriBuilder = $this->controllerContext->getUriBuilder(); if ($this->arguments['useParentRequest']) { $request = $this->controllerContext->getRequest(); if ($request->isMainRequest()) { throw new ViewHelper\Exception('You can\'t use t...
php
public function render() { $uriBuilder = $this->controllerContext->getUriBuilder(); if ($this->arguments['useParentRequest']) { $request = $this->controllerContext->getRequest(); if ($request->isMainRequest()) { throw new ViewHelper\Exception('You can\'t use t...
[ "public", "function", "render", "(", ")", "{", "$", "uriBuilder", "=", "$", "this", "->", "controllerContext", "->", "getUriBuilder", "(", ")", ";", "if", "(", "$", "this", "->", "arguments", "[", "'useParentRequest'", "]", ")", "{", "$", "request", "=",...
Render the link. @return string The rendered link @throws ViewHelper\Exception @api
[ "Render", "the", "link", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Link/ActionViewHelper.php#L82-L118
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php
ClassNameIndex.setClassNames
public function setClassNames(array $classNames): void { $this->classNames = count($classNames) > 0 ? array_combine($classNames, array_fill(0, count($classNames), true)) : []; }
php
public function setClassNames(array $classNames): void { $this->classNames = count($classNames) > 0 ? array_combine($classNames, array_fill(0, count($classNames), true)) : []; }
[ "public", "function", "setClassNames", "(", "array", "$", "classNames", ")", ":", "void", "{", "$", "this", "->", "classNames", "=", "count", "(", "$", "classNames", ")", ">", "0", "?", "array_combine", "(", "$", "classNames", ",", "array_fill", "(", "0"...
Set the data of this index to the given class names. Note: Make sure to sort the array before! @param array $classNames @return void
[ "Set", "the", "data", "of", "this", "index", "to", "the", "given", "class", "names", ".", "Note", ":", "Make", "sure", "to", "sort", "the", "array", "before!" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php#L48-L51
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php
ClassNameIndex.intersect
public function intersect(ClassNameIndex $classNameIndex): ClassNameIndex { return new ClassNameIndex(array_intersect_key($this->classNames, $classNameIndex->classNames)); }
php
public function intersect(ClassNameIndex $classNameIndex): ClassNameIndex { return new ClassNameIndex(array_intersect_key($this->classNames, $classNameIndex->classNames)); }
[ "public", "function", "intersect", "(", "ClassNameIndex", "$", "classNameIndex", ")", ":", "ClassNameIndex", "{", "return", "new", "ClassNameIndex", "(", "array_intersect_key", "(", "$", "this", "->", "classNames", ",", "$", "classNameIndex", "->", "classNames", "...
Returns a new index object with all class names contained in this and the given index @param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex @return \Neos\Flow\Aop\Builder\ClassNameIndex A new index object
[ "Returns", "a", "new", "index", "object", "with", "all", "class", "names", "contained", "in", "this", "and", "the", "given", "index" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php#L81-L84
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php
ClassNameIndex.applyIntersect
public function applyIntersect(ClassNameIndex $classNameIndex): void { $this->classNames = array_intersect_key($this->classNames, $classNameIndex->classNames); }
php
public function applyIntersect(ClassNameIndex $classNameIndex): void { $this->classNames = array_intersect_key($this->classNames, $classNameIndex->classNames); }
[ "public", "function", "applyIntersect", "(", "ClassNameIndex", "$", "classNameIndex", ")", ":", "void", "{", "$", "this", "->", "classNames", "=", "array_intersect_key", "(", "$", "this", "->", "classNames", ",", "$", "classNameIndex", "->", "classNames", ")", ...
Sets this index to all class names which are present currently and contained in the given index @param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex @return void
[ "Sets", "this", "index", "to", "all", "class", "names", "which", "are", "present", "currently", "and", "contained", "in", "the", "given", "index" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php#L93-L96
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php
ClassNameIndex.union
public function union(ClassNameIndex $classNameIndex): ClassNameIndex { $result = clone $classNameIndex; $result->applyUnion($this); return $result; }
php
public function union(ClassNameIndex $classNameIndex): ClassNameIndex { $result = clone $classNameIndex; $result->applyUnion($this); return $result; }
[ "public", "function", "union", "(", "ClassNameIndex", "$", "classNameIndex", ")", ":", "ClassNameIndex", "{", "$", "result", "=", "clone", "$", "classNameIndex", ";", "$", "result", "->", "applyUnion", "(", "$", "this", ")", ";", "return", "$", "result", "...
Returns a new index object containing all class names of this index and the given one @param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex @return \Neos\Flow\Aop\Builder\ClassNameIndex A new index object
[ "Returns", "a", "new", "index", "object", "containing", "all", "class", "names", "of", "this", "index", "and", "the", "given", "one" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php#L105-L110
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php
ClassNameIndex.applyUnion
public function applyUnion(ClassNameIndex $classNameIndex): void { if (count($this->classNames) > count($classNameIndex->classNames)) { foreach ($classNameIndex->classNames as $className => $value) { $this->classNames[$className] = true; } } else { ...
php
public function applyUnion(ClassNameIndex $classNameIndex): void { if (count($this->classNames) > count($classNameIndex->classNames)) { foreach ($classNameIndex->classNames as $className => $value) { $this->classNames[$className] = true; } } else { ...
[ "public", "function", "applyUnion", "(", "ClassNameIndex", "$", "classNameIndex", ")", ":", "void", "{", "if", "(", "count", "(", "$", "this", "->", "classNames", ")", ">", "count", "(", "$", "classNameIndex", "->", "classNames", ")", ")", "{", "foreach", ...
Sets this index to all class names which are either already present or are contained in the given index @param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex @return void
[ "Sets", "this", "index", "to", "all", "class", "names", "which", "are", "either", "already", "present", "or", "are", "contained", "in", "the", "given", "index" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php#L119-L132
neos/flow-development-collection
Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php
ClassNameIndex.filterByPrefix
public function filterByPrefix(string $prefixFilter): ClassNameIndex { $pointcuts = array_keys($this->classNames); $result = new ClassNameIndex(); $right = count($pointcuts) - 1; $left = 0; $found = false; $currentPosition = -1; while ($found === false) { ...
php
public function filterByPrefix(string $prefixFilter): ClassNameIndex { $pointcuts = array_keys($this->classNames); $result = new ClassNameIndex(); $right = count($pointcuts) - 1; $left = 0; $found = false; $currentPosition = -1; while ($found === false) { ...
[ "public", "function", "filterByPrefix", "(", "string", "$", "prefixFilter", ")", ":", "ClassNameIndex", "{", "$", "pointcuts", "=", "array_keys", "(", "$", "this", "->", "classNames", ")", ";", "$", "result", "=", "new", "ClassNameIndex", "(", ")", ";", "$...
Returns a new index object which contains all class names of this index starting with the given prefix @param string $prefixFilter A prefix string to filter the class names of this index @return \Neos\Flow\Aop\Builder\ClassNameIndex A new index object
[ "Returns", "a", "new", "index", "object", "which", "contains", "all", "class", "names", "of", "this", "index", "starting", "with", "the", "given", "prefix" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Builder/ClassNameIndex.php#L157-L199
neos/flow-development-collection
Neos.Flow/Classes/Security/Authorization/Privilege/AbstractPrivilege.php
AbstractPrivilege.getParsedMatcher
public function getParsedMatcher() { $parsedMatcher = $this->matcher; // TODO: handle parameters that are not strings foreach ($this->parameters as $parameter) { $parsedMatcher = str_replace('{parameters.' . $parameter->getName() . '}', $parameter->getValue(), $parsedMatcher); ...
php
public function getParsedMatcher() { $parsedMatcher = $this->matcher; // TODO: handle parameters that are not strings foreach ($this->parameters as $parameter) { $parsedMatcher = str_replace('{parameters.' . $parameter->getName() . '}', $parameter->getValue(), $parsedMatcher); ...
[ "public", "function", "getParsedMatcher", "(", ")", "{", "$", "parsedMatcher", "=", "$", "this", "->", "matcher", ";", "// TODO: handle parameters that are not strings", "foreach", "(", "$", "this", "->", "parameters", "as", "$", "parameter", ")", "{", "$", "par...
Returns the matcher string with replaced parameter markers. @see getMatcher() @return string
[ "Returns", "the", "matcher", "string", "with", "replaced", "parameter", "markers", ".", "@see", "getMatcher", "()" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Authorization/Privilege/AbstractPrivilege.php#L193-L201
neos/flow-development-collection
Neos.FluidAdaptor/Classes/View/StandaloneView.php
StandaloneView.initializeObject
public function initializeObject() { if ($this->request === null) { $requestHandler = $this->bootstrap->getActiveRequestHandler(); if ($requestHandler instanceof HttpRequestHandlerInterface) { $this->request = new ActionRequest($requestHandler->getHttpRequest()); ...
php
public function initializeObject() { if ($this->request === null) { $requestHandler = $this->bootstrap->getActiveRequestHandler(); if ($requestHandler instanceof HttpRequestHandlerInterface) { $this->request = new ActionRequest($requestHandler->getHttpRequest()); ...
[ "public", "function", "initializeObject", "(", ")", "{", "if", "(", "$", "this", "->", "request", "===", "null", ")", "{", "$", "requestHandler", "=", "$", "this", "->", "bootstrap", "->", "getActiveRequestHandler", "(", ")", ";", "if", "(", "$", "reques...
Initiates the StandaloneView by creating the required ControllerContext @return void
[ "Initiates", "the", "StandaloneView", "by", "creating", "the", "required", "ControllerContext" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/StandaloneView.php#L111-L132
neos/flow-development-collection
Neos.FluidAdaptor/Classes/View/StandaloneView.php
StandaloneView.setFormat
public function setFormat($format) { $this->request->setFormat($format); $this->baseRenderingContext->getTemplatePaths()->setFormat($format); }
php
public function setFormat($format) { $this->request->setFormat($format); $this->baseRenderingContext->getTemplatePaths()->setFormat($format); }
[ "public", "function", "setFormat", "(", "$", "format", ")", "{", "$", "this", "->", "request", "->", "setFormat", "(", "$", "format", ")", ";", "$", "this", "->", "baseRenderingContext", "->", "getTemplatePaths", "(", ")", "->", "setFormat", "(", "$", "f...
Sets the format of the current request (default format is "html") @param string $format @return void @api
[ "Sets", "the", "format", "of", "the", "current", "request", "(", "default", "format", "is", "html", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/StandaloneView.php#L149-L153
neos/flow-development-collection
Neos.FluidAdaptor/Classes/View/StandaloneView.php
StandaloneView.setTemplatePathAndFilename
public function setTemplatePathAndFilename($templatePathAndFilename) { $this->baseRenderingContext->getTemplatePaths()->setTemplatePathAndFilename($templatePathAndFilename); $partialRootPaths = $this->baseRenderingContext->getTemplatePaths()->getPartialRootPaths(); $layoutRootPaths = $this-...
php
public function setTemplatePathAndFilename($templatePathAndFilename) { $this->baseRenderingContext->getTemplatePaths()->setTemplatePathAndFilename($templatePathAndFilename); $partialRootPaths = $this->baseRenderingContext->getTemplatePaths()->getPartialRootPaths(); $layoutRootPaths = $this-...
[ "public", "function", "setTemplatePathAndFilename", "(", "$", "templatePathAndFilename", ")", "{", "$", "this", "->", "baseRenderingContext", "->", "getTemplatePaths", "(", ")", "->", "setTemplatePathAndFilename", "(", "$", "templatePathAndFilename", ")", ";", "$", "p...
Sets the absolute path to a Fluid template file @param string $templatePathAndFilename Fluid template path @return void @api
[ "Sets", "the", "absolute", "path", "to", "a", "Fluid", "template", "file" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/StandaloneView.php#L183-L193
neos/flow-development-collection
Neos.FluidAdaptor/Classes/View/StandaloneView.php
StandaloneView.getTemplatePathAndFilename
public function getTemplatePathAndFilename() { return $this->baseRenderingContext->getTemplatePaths()->resolveTemplateFileForControllerAndActionAndFormat($this->request->getControllerName(), $this->request->getControllerActionName(), $this->request->getFormat()); }
php
public function getTemplatePathAndFilename() { return $this->baseRenderingContext->getTemplatePaths()->resolveTemplateFileForControllerAndActionAndFormat($this->request->getControllerName(), $this->request->getControllerActionName(), $this->request->getFormat()); }
[ "public", "function", "getTemplatePathAndFilename", "(", ")", "{", "return", "$", "this", "->", "baseRenderingContext", "->", "getTemplatePaths", "(", ")", "->", "resolveTemplateFileForControllerAndActionAndFormat", "(", "$", "this", "->", "request", "->", "getControlle...
Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before @return string Fluid template path @api
[ "Returns", "the", "absolute", "path", "to", "a", "Fluid", "template", "file", "if", "it", "was", "specified", "with", "setTemplatePathAndFilename", "()", "before" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/StandaloneView.php#L201-L204
neos/flow-development-collection
Neos.FluidAdaptor/Classes/View/StandaloneView.php
StandaloneView.hasTemplate
public function hasTemplate() { try { $this->baseRenderingContext->getTemplatePaths()->getTemplateSource( $this->baseRenderingContext->getControllerName(), $this->baseRenderingContext->getControllerAction() ); return true; } catch ...
php
public function hasTemplate() { try { $this->baseRenderingContext->getTemplatePaths()->getTemplateSource( $this->baseRenderingContext->getControllerName(), $this->baseRenderingContext->getControllerAction() ); return true; } catch ...
[ "public", "function", "hasTemplate", "(", ")", "{", "try", "{", "$", "this", "->", "baseRenderingContext", "->", "getTemplatePaths", "(", ")", "->", "getTemplateSource", "(", "$", "this", "->", "baseRenderingContext", "->", "getControllerName", "(", ")", ",", ...
Checks whether a template can be resolved for the current request @return bool @api
[ "Checks", "whether", "a", "template", "can", "be", "resolved", "for", "the", "current", "request" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/View/StandaloneView.php#L310-L322