class OCI_Collection (View source)

OCI8 Collection functionality.

Methods

bool
append(mixed $value)

(PHP 5, PECL OCI8 >= 1.1.0)
Appends element to the collection

mixed
getelem(int $index)

(PHP 5, PECL OCI8 >= 1.1.0)
Returns value of the element

bool
assignelem(int $index, mixed $value)

(PHP 5, PECL OCI8 >= 1.1.0)
Assigns a value to the element of the collection

bool
assign(OCI_Collection $from)

(PHP 5, PECL OCI8 >= 1.1.0)
Assigns a value to the collection from another existing collection

int|false
size()

(PHP 5, PECL OCI8 >= 1.1.0)
Returns size of the collection

int|false
max()

(PHP 5, PECL OCI8 >= 1.1.0)
Returns the maximum number of elements in the collection

bool
trim(int $num)

(PHP 5, PECL OCI8 >= 1.1.0)
Trims elements from the end of the collection

bool
free()

(PHP 5, PECL OCI8 >= 1.1.0)
Frees the resources associated with the collection object

Details

bool append(mixed $value)

(PHP 5, PECL OCI8 >= 1.1.0)
Appends element to the collection

Parameters

mixed $value

The value to be added to the collection. Can be a string or a number.

Return Value

bool

TRUE on success or FALSE on failure.

mixed getelem(int $index)

(PHP 5, PECL OCI8 >= 1.1.0)
Returns value of the element

Parameters

int $index

The element index. First index is 0.

Return Value

mixed

FALSE if such element doesn't exist; NULL if element is NULL; string if element is column of a string datatype or number if element is numeric field.

bool assignelem(int $index, mixed $value)

(PHP 5, PECL OCI8 >= 1.1.0)
Assigns a value to the element of the collection

Parameters

int $index

The element index. First index is 0.

mixed $value

Can be a string or a number.

Return Value

bool

TRUE on success or FALSE on failure.

bool assign(OCI_Collection $from)

(PHP 5, PECL OCI8 >= 1.1.0)
Assigns a value to the collection from another existing collection

Parameters

OCI_Collection $from

An instance of OCI-Collection.

Return Value

bool

TRUE on success or FALSE on failure.

int|false size()

(PHP 5, PECL OCI8 >= 1.1.0)
Returns size of the collection

Return Value

int|false

The number of elements in the collection or FALSE on error.

int|false max()

(PHP 5, PECL OCI8 >= 1.1.0)
Returns the maximum number of elements in the collection

Return Value

int|false

The maximum number as an integer, or FALSE on errors.

If the returned value is 0, then the number of elements is not limited.

bool trim(int $num)

(PHP 5, PECL OCI8 >= 1.1.0)
Trims elements from the end of the collection

Parameters

int $num

The number of elements to be trimmed.

Return Value

bool

TRUE on success or FALSE on failure.

bool free()

(PHP 5, PECL OCI8 >= 1.1.0)
Frees the resources associated with the collection object

Return Value

bool

TRUE on success or FALSE on failure.