Overview
  • Namespace
  • Class

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CDN
      • Resource
    • CloudMonitoring
      • Collection
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Collection
      • Enum
      • Resource
    • Networking
      • Resource
    • ObjectStore
      • Constants
      • Enum
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource

Classes

  • ArrayCollection
  • PaginatedIterator
  • ResourceIterator

Class ResourceIterator

A generic, abstract collection class that allows collections to exhibit array functionality.

OpenCloud\Common\ArrayAccess implements ArrayAccess
Extended by OpenCloud\Common\Collection\ArrayCollection implements Countable
Extended by OpenCloud\Common\Collection\ResourceIterator implements Iterator

Direct known subclasses

OpenCloud\Common\Collection\PaginatedIterator

Indirect known subclasses

OpenCloud\CloudMonitoring\Collection\MonitoringIterator, OpenCloud\DNS\Collection\DnsIterator, OpenCloud\LoadBalancer\Collection\LoadBalancerIterator, OpenCloud\Queues\Collection\MessageIterator

Namespace: OpenCloud\Common\Collection
Package: OpenCloud\Common\Collection
Located at OpenCloud/Common/Collection/ResourceIterator.php

Methods summary

public static
# factory( $parent, array $options = array(), array $data = array() )
public
# setResourceParent( $parent )

Parameters

$parent

Returns


$this
public
# setOptions( array $options )

Parameters

$options

Returns


$this
public array
# getOptions( )

Returns

array
Options for the resource iterator.
public
# setOption( $key, $value )

Set a particular option.

Set a particular option.

Parameters

$key
$value

Returns


$this
public null
# getOption( $key )

Parameters

$key

Returns

null
public boolean
# valid( )

This method is called after self::rewind() and self::next() to check if the current position is valid.

This method is called after self::rewind() and self::next() to check if the current position is valid.

Returns

boolean

Implementation of

Iterator::valid()
public
# next( )

Increment the current pointer by 1, and also update the current marker.

Increment the current pointer by 1, and also update the current marker.

Implementation of

Iterator::next()
public
# rewind( )

Reset the pointer and current marker.

Reset the pointer and current marker.

Implementation of

Iterator::rewind()
public mixed
# current( )

Returns

mixed

Implementation of

Iterator::current()
public mixed
# currentElement( )

Returns

mixed
public mixed
# constructResource( $object )

Using a standard object, this method populates a resource model with all the object data. It does this using a whatever method the parent object has for resource creation.

Using a standard object, this method populates a resource model with all the object data. It does this using a whatever method the parent object has for resource creation.

Parameters

$object
object

Returns

mixed

Throws

OpenCloud\Common\Exceptions\CollectionException
public integer|mixed
# key( )

Return the current position/internal pointer.

Return the current position/internal pointer.

Returns

integer|mixed

Implementation of

Iterator::key()
public
# getElement( $offset )
public
# first( )

Deprecated

public
# sort( )
public
# search( $callback )

Methods inherited from OpenCloud\Common\Collection\ArrayCollection

__construct(), append(), count(), setElements(), valueExists()

Methods inherited from OpenCloud\Common\ArrayAccess

offsetExists(), offsetGet(), offsetSet(), offsetUnset()

API documentation generated by ApiGen