예제 #1
0
파일: Document.php 프로젝트: jpalala/codex
 /**
  * Creates a new Document class
  *
  * @param \Codex\Codex\Contracts\Factory              $factory   The factory class
  * @param \Illuminate\Contracts\Filesystem\Filesystem $files     The filesystem
  * @param \Codex\Codex\Project                        $project   The project instance
  * @param \Illuminate\Contracts\Container\Container   $container The container class
  * @param string                                      $path      The absolute path to the document
  * @param string                                      $pathName  The relative path to the document
  */
 public function __construct(Factory $factory, Filesystem $files, Project $project, Container $container, $path, $pathName)
 {
     $this->container = $container;
     $this->factory = $factory;
     $this->project = $project;
     $this->files = $files;
     $this->path = $path;
     $this->pathName = $pathName;
     $this->runHook('document:ready', [$this]);
     $this->attributes = $factory->config('default_document_attributes');
     $this->content = $this->files->get($this->path);
     $this->runHook('document:done', [$this]);
 }