PHP Class Uploadcare\FileIterator

Inheritance: implements Iterator, implements Countable, implements ArrayAccess
Mostra file Open project: uploadcare/uploadcare-php

Protected Properties

Property Type Description
$api Api Api object
$container array Array of cached file elements
$count integer Total count of files
$fullyLoaded boolean Indicates if all files were loaded from server
$limit integer Desired count of elements
$options array Options for requests
$position integer Current iterator position
$requestLimit integer Limit for requests
$reverse boolean Determines direction of file browsing and which URL param is used: 'from' or 'to'

Public Methods

Method Description
__construct ( Api $api, array $options = [] ) Constructor
count ( )
current ( )
key ( )
next ( )
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
rewind ( )
valid ( )

Private Methods

Method Description
exists ( integer $offset = null ) : boolean Check if element exists. Uses current position if no offset provided
isFullyLoaded ( ) : boolean Check if all elements are loaded into iterator
loadChunk ( ) Load elements chunk from server

Method Details

__construct() public method

Constructor
public __construct ( Api $api, array $options = [] )
$api Api Uploadcare class instance
$options array Request parameters and filters

count() public method

public count ( )

current() public method

public current ( )

key() public method

public key ( )

next() public method

public next ( )

offsetExists() public method

public offsetExists ( $offset )

offsetGet() public method

public offsetGet ( $offset )

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

rewind() public method

public rewind ( )

valid() public method

public valid ( )

Property Details

$api protected_oe property

Api object
protected Api,uploadcare $api
return Api

$container protected_oe property

Array of cached file elements
protected array $container
return array

$count protected_oe property

Total count of files
protected int $count
return integer

$fullyLoaded protected_oe property

Indicates if all files were loaded from server
protected bool $fullyLoaded
return boolean

$limit protected_oe property

Desired count of elements
protected int $limit
return integer

$options protected_oe property

Options for requests
protected array $options
return array

$position protected_oe property

Current iterator position
protected int $position
return integer

$requestLimit protected_oe property

Limit for requests
protected int $requestLimit
return integer

$reverse protected_oe property

Determines direction of file browsing and which URL param is used: 'from' or 'to'
protected bool $reverse
return boolean