PHP Class Uploadcare\FileIterator

Inheritance: implements Iterator, implements Countable, implements ArrayAccess
Afficher le fichier Open project: uploadcare/uploadcare-php

Protected Properties

Свойство 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'

Méthodes publiques

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

Private Methods

Méthode 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 méthode

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

count() public méthode

public count ( )

current() public méthode

public current ( )

key() public méthode

public key ( )

next() public méthode

public next ( )

offsetExists() public méthode

public offsetExists ( $offset )

offsetGet() public méthode

public offsetGet ( $offset )

offsetSet() public méthode

public offsetSet ( $offset, $value )

offsetUnset() public méthode

public offsetUnset ( $offset )

rewind() public méthode

public rewind ( )

valid() public méthode

public valid ( )

Property Details

$api protected_oe property

Api object
protected Api,uploadcare $api
Résultat Api

$container protected_oe property

Array of cached file elements
protected array $container
Résultat array

$count protected_oe property

Total count of files
protected int $count
Résultat integer

$fullyLoaded protected_oe property

Indicates if all files were loaded from server
protected bool $fullyLoaded
Résultat boolean

$limit protected_oe property

Desired count of elements
protected int $limit
Résultat integer

$options protected_oe property

Options for requests
protected array $options
Résultat array

$position protected_oe property

Current iterator position
protected int $position
Résultat integer

$requestLimit protected_oe property

Limit for requests
protected int $requestLimit
Résultat integer

$reverse protected_oe property

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