class NodeProviderCollection
A collection of NodeProviderInterface objects
@extends AbstractCollection<NodeProviderInterface>
Hierarchy
- class \Ramsey\Collection\AbstractArray implements \Ramsey\Collection\ArrayInterface
- class \Ramsey\Collection\AbstractCollection extends \Ramsey\Collection\AbstractArray implements \Ramsey\Collection\CollectionInterface uses \Ramsey\Collection\Tool\TypeTrait, \Ramsey\Collection\Tool\ValueToStringTrait, \Ramsey\Collection\Tool\ValueExtractorTrait
- class \Ramsey\Uuid\Provider\Node\NodeProviderCollection extends \Ramsey\Collection\AbstractCollection
- class \Ramsey\Collection\AbstractCollection extends \Ramsey\Collection\AbstractArray implements \Ramsey\Collection\CollectionInterface uses \Ramsey\Collection\Tool\TypeTrait, \Ramsey\Collection\Tool\ValueToStringTrait, \Ramsey\Collection\Tool\ValueExtractorTrait
Expanded class hierarchy of NodeProviderCollection
Deprecated
this class has been deprecated, and will be removed in 5.0.0. The use-case for this class comes from a pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced at runtime: that is no longer necessary, now that you can safely verify your code to be correct, and use more generic types like `iterable<T>` instead.
File
-
vendor/
ramsey/ uuid/ src/ Provider/ Node/ NodeProviderCollection.php, line 31
Namespace
Ramsey\Uuid\Provider\NodeView source
class NodeProviderCollection extends AbstractCollection {
public function getType() : string {
return NodeProviderInterface::class;
}
/**
* Re-constructs the object from its serialized form
*
* @param string $serialized The serialized PHP string to unserialize into
* a UuidInterface instance
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
* @psalm-suppress RedundantConditionGivenDocblockType
*/
public function unserialize($serialized) : void {
/** @var array<array-key, NodeProviderInterface> $data */
$data = unserialize($serialized, [
'allowed_classes' => [
Hexadecimal::class,
RandomNodeProvider::class,
StaticNodeProvider::class,
SystemNodeProvider::class,
],
]);
$this->data = array_filter($data, function ($unserialized) : bool {
return $unserialized instanceof NodeProviderInterface;
});
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AbstractArray::$data | protected | property | The items of this array. | ||
AbstractArray::clear | public | function | Removes all items from this array. | Overrides ArrayInterface::clear | |
AbstractArray::count | public | function | Returns the number of items in this array. | ||
AbstractArray::getIterator | public | function | Returns an iterator for this array. | 2 | |
AbstractArray::isEmpty | public | function | Returns `true` if this array is empty. | Overrides ArrayInterface::isEmpty | |
AbstractArray::offsetExists | public | function | Returns `true` if the given offset exists in this array. | ||
AbstractArray::offsetGet | public | function | Returns the value at the specified offset. | ||
AbstractArray::offsetUnset | public | function | Removes the given offset and its value from the array. | ||
AbstractArray::toArray | public | function | @inheritDoc | Overrides ArrayInterface::toArray | 1 |
AbstractArray::__construct | public | function | Constructs a new array object. | 4 | |
AbstractArray::__serialize | public | function | Returns data suitable for PHP serialization. | 1 | |
AbstractArray::__unserialize | public | function | Adds unserialized data to the object. | ||
AbstractCollection::add | public | function | Overrides CollectionInterface::add | 1 | |
AbstractCollection::column | public | function | @inheritDoc | Overrides CollectionInterface::column | |
AbstractCollection::compareCollectionTypes | private | function | |||
AbstractCollection::contains | public | function | Returns `true` if this collection contains the specified element. | Overrides CollectionInterface::contains | |
AbstractCollection::diff | public | function | Overrides CollectionInterface::diff | ||
AbstractCollection::filter | public | function | Overrides CollectionInterface::filter | ||
AbstractCollection::first | public | function | Overrides CollectionInterface::first | ||
AbstractCollection::getComparator | private | function | |||
AbstractCollection::getUniformType | private | function | |||
AbstractCollection::intersect | public | function | Overrides CollectionInterface::intersect | ||
AbstractCollection::last | public | function | Overrides CollectionInterface::last | ||
AbstractCollection::map | public | function | @template TCallbackReturn | Overrides CollectionInterface::map | |
AbstractCollection::merge | public | function | Overrides CollectionInterface::merge | ||
AbstractCollection::offsetSet | public | function | Overrides AbstractArray::offsetSet | 1 | |
AbstractCollection::reduce | public | function | @template TCarry | Overrides CollectionInterface::reduce | |
AbstractCollection::remove | public | function | Removes a single instance of the specified element from this collection, if it is present. |
Overrides CollectionInterface::remove | |
AbstractCollection::sort | public | function | Overrides CollectionInterface::sort | ||
AbstractCollection::where | public | function | Overrides CollectionInterface::where | ||
NodeProviderCollection::getType | public | function | Returns the type associated with this collection. | Overrides CollectionInterface::getType | |
NodeProviderCollection::unserialize | public | function | Re-constructs the object from its serialized form | ||
TypeTrait::checkType | protected | function | Returns `true` if value is of the specified type. | ||
ValueExtractorTrait::extractValue | protected | function | Extracts the value of the given property, method, or array key from the element. |
||
ValueToStringTrait::toolValueToString | protected | function | Returns a string representation of the value. |