pht
PHP Manual

The Vector class

(PECL pht >= 0.0.1)

Introduction

The pht\Vector class is one of the Inter-Thread Communication (ITC) data structures exposed by pht. It can be safely passed around between threads, and manipulated by multiple threads using the mutex locks that have been packed in with the data structure. It is reference-counted across threads, and so is does not need to be explicitly destroyed.

The pht\Vector class enables for array access upon its objects (along with the isset() and unset() functions). The ArrayAccess interface is not explicitly implemented, however, because it is only needed for such abilities by userland classes.

Class synopsis

pht\Vector implements pht\Threaded {
/* Methods */
public Vector __construct ([ int $size = 0 [, mixed $value = 0 ]] )
public void deleteAt ( int $offset )
public void insertAt ( mixed $value , int $offset )
public void lock ( void )
public mixed pop ( void )
public void push ( mixed $value )
public void resize ( int $size [, mixed $value = 0 ] )
public mixed shift ( void )
public int size ( void )
public void unlock ( void )
public void unshift ( mixed $value )
public void updateAt ( mixed $value , int $offset )
}

Table of Contents


pht
PHP Manual