FluentDOM\Loaders::__construct PHP Method

__construct() public method

Store the a list of loaders if provided.
public __construct ( array | Traversable $list = NULL )
$list array | Traversable
    public function __construct($list = NULL)
    {
        if (is_array($list) || $list instanceof \Traversable) {
            foreach ($list as $loader) {
                $this->add($loader);
            }
        }
    }

Usage Example

Example #1
0
 public function __construct()
 {
     parent::__construct([new Loader\Xml(), new Loader\Html(), new Loader\Text(), new Loader\Json(), new Loader\PHP()]);
 }