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);
}
}