Skip to content

Collection

Properties

items

protected \SplFixedArray $items

Methods

__construct

Returns a new Collection object.

public __construct(\SplFixedArray $items): mixed

Parameters:

Parameter Type Description
$items \SplFixedArray

Throws:


__toString

Returns a native string representation of the Collection object.

public __toString(): string

fromNative

Returns a new Collection object.

public static fromNative(): \Qubus\ValueObjects\Structure\Collection|\Qubus\ValueObjects\ValueObject
  • This method is static.

Throws:


equals

Tells whether two Collection are equal by comparing their size and items (item order matters).

public equals(\Qubus\ValueObjects\Structure\Collection|\Qubus\ValueObjects\ValueObject $collection): bool

Parameters:

Parameter Type Description
$collection \Qubus\ValueObjects\Structure\Collection|\Qubus\ValueObjects\ValueObject

Throws:


count

Returns the number of objects in the collection.

public count(): \Qubus\ValueObjects\Number\Natural

Throws:


contains

Tells whether the Collection contains an object.

public contains(\Qubus\ValueObjects\ValueObject $object): bool

Parameters:

Parameter Type Description
$object \Qubus\ValueObjects\ValueObject

toArray

Returns a native array representation of the Collection.

public toArray(): array


Automatically generated on 2025-10-13