Overview

Namespaces

  • PipelinerSales
    • ApiClient
      • Http
      • Query
      • Repository
        • Rest

Classes

  • Defaults
  • Entity
  • EntityCollection
  • EntityCollectionIterator
  • PipelinerClient

Interfaces

  • InfoMethodsInterface

Exceptions

  • PipelinerClientException
  • Overview
  • Namespace
  • Class
  • Tree

Class EntityCollection

Represents an immutable collection of multiple entities of a common type. The entities themselves are mutable (i.e. you can modify the entity object inside the collection, but you can not add/remove/reorder/etc. entities from/to the collection.

Works like a regular PHP array, but contains additional information about the number of entities that were not loaded due to a query limit.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by PipelinerSales\ApiClient\EntityCollection
Namespace: PipelinerSales\ApiClient
Located at PipelinerSales/ApiClient/EntityCollection.php
Methods summary
public
# __construct( array $data, mixed $criteria, integer $startIndex, integer $endIndex, integer $totalCount )

Creates a collection based on an existing array

Creates a collection based on an existing array

Parameters

$data
$criteria

Criteria that was used when querying for this colleciton. Any type that the can be passed to the constructor of PipelinerSales\ApiClient\Query\Criteria can be used here. A copy of this argument will be made, so it is safe to pass a Criteria object - it will not be inadvertently modified at a later time.

$startIndex
the offset used in the query
$endIndex
the offset of the last loaded entity
$totalCount
total count of all entities that match the query

Throws

PipelinerSales\ApiClient\PipelinerClientException
when the number of items in the array doesn't match the specified indexes

Overrides

ArrayObject::__construct()
public integer
# getTotalCount( )

Returns the number of entities available on the server (ignoring the limit).

Returns the number of entities available on the server (ignoring the limit).

Returns

integer
public PipelinerSales\ApiClient\Query\Criteria
# getCriteriaCopy( )

Returns a copy of the criteria that was used to fetch this collection.

Returns a copy of the criteria that was used to fetch this collection.

Returns

PipelinerSales\ApiClient\Query\Criteria
public integer
# getStartIndex( )

Returns the index of the first item in this colleciton. It is identical to the offset that was used to fetch this collection.

Returns the index of the first item in this colleciton. It is identical to the offset that was used to fetch this collection.

Returns

integer
public integer
# getEndIndex( )

Returns the index of the last item in this collection.

Returns the index of the last item in this collection.

Returns

integer
Methods inherited from ArrayObject
append(), asort(), count(), exchangeArray(), getArrayCopy(), getFlags(), getIterator(), getIteratorClass(), ksort(), natcasesort(), natsort(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()
Constants inherited from ArrayObject
ARRAY_AS_PROPS, STD_PROP_LIST
API documentation generated by ApiGen