Carew\Document::__construct PHP Method

__construct() public method

public __construct ( Symfony\Component\Finder\SplFileInfo $file = null, $filePath = null, $type = self::TYPE_UNKNOWN )
$file Symfony\Component\Finder\SplFileInfo
    public function __construct(SplFileInfo $file = null, $filePath = null, $type = self::TYPE_UNKNOWN)
    {
        $this->file = $file;
        $this->filePath = $filePath;
        $this->type = $type;
        $this->layout = false;
        $this->published = true;
        $this->metadatas = array();
        $this->navigations = array();
        $this->tags = array();
        $this->toc = array();
        $this->vars = array();
        if ($file && is_file($file)) {
            $this->path = $file->getBaseName();
            $this->title = $file->getBaseName();
            $this->body = $this->bodyDecorated = file_get_contents($file);
        }
    }