__construct ( $input, $flags, $iterator_class )

Constructs a new instance of CFArray.

Access

public

Parameters

Parameter

Type

Required

Description

$input

mixed

Optional

The input parameter accepts an array or an Object. The default value is an empty array.

$flags

integer

Optional

Flags to control the behavior of the ArrayObject object. Defaults to STD_PROP_LIST.

$iterator_class

string

Optional

Specify the class that will be used for iteration of the ArrayObject object. ArrayIterator is the default class used.

Returns

Type

Description

mixed

Either an array of matches, or a single CFSimpleXML element.

Source

Method defined in utilities/array.class.php | Toggle source view (13 lines) | View on GitHub

public function __construct($input = array(), $flags = self::STD_PROP_LIST, $iterator_class = 'ArrayIterator')
{
    // Provide a default value
    $input = $input ? $input : array();

    try {
        return parent::__construct($input, $flags, $iterator_class);
    }
    catch (InvalidArgumentException $e)
    {
        throw new CFArray_Exception($e->getMessage());
    }
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback