ChannelList

Implements \ArrayAccess, \Countable, \Iterator

Model of payment channels list.

package

Default

Methods

Initialize the list.

__construct() 

Add a new payment channel to the list.

addChannel(\Dotpay\Channel\Channel $channel) : \Dotpay\Model\ChannelList

Arguments

$channel

\Dotpay\Channel\Channel

A payment channel object

Response

\Dotpay\Model\ChannelList

Return a number of all channels which are on the list.

count() : integer

Response

integer

Return the current channel.

current() : \Dotpay\Channel\Channel

Return an array of ids of channels which are on the list.

getChannelIds() : array

Response

array

Return a Script object which contains a script with Dotpay widget configuration.

getWidgetScript() : \Dotpay\Html\Container\Script

Return a key of the current channel.

key() : integer

Response

integer

Set the pointer on a next channel on the list which is enabled.

next() 

Check if the given offset points on a channel on the list.

offsetExists(integer $offset) : boolean

Arguments

$offset

integer

Position of a channel on a list

Response

boolean

Return a channel which is pointed by the given offset.

offsetGet(integer $offset) : \Dotpay\Channel\Channel

Arguments

$offset

integer

Position of a channel on a list

Response

\Dotpay\Channel\Channel

Set the given channel on a place which is pointed by the given offset.

offsetSet(integer $offset, \Dotpay\Channel\Channel $value) 

Arguments

$offset

integer

Position of a channel on a list

$value

\Dotpay\Channel\Channel

The given channel to set

Remove a channel which is located in a place pointed by the given offset.

offsetUnset(integer $offset) 

Arguments

$offset

integer

Position of a channel on a list

Rewind the channel pointer to the first place with enabled channel.

rewind() 

Check if the current pointer is valid.

valid() : boolean

Response

boolean

Properties

Pointer to the current channel

pointer : integer
var

Pointer to the current channel

Type(s)

integer

List of channels

channels : array
var

List of channels

Type(s)

array