Ip\View::__construct PHP Method

__construct() public method

Construct view object using specified file and data.
public __construct ( string $file, array $data = [] )
$file string Path to view file. Relative to file where this constructor is executed from.
$data array Array of data to pass to view
    public function __construct($file, $data = array())
    {
        self::checkData($data);
        $this->file = $file;
        $this->data = $data;
        $doctypeConstant = ipConfig()->get('defaultDoctype');
        $this->doctype = constant('\\Ip\\Response\\Layout::' . $doctypeConstant);
    }