コード例 #1
0
ファイル: FileSource.php プロジェクト: georgjaehnig/sculpin
 /**
  * Constructor
  *
  * @param Analyzer            $analyzer   Analyzer
  * @param DataSourceInterface $dataSource Data Source
  * @param SplFileInfo         $file       File
  * @param bool                $isRaw      Should be treated as raw
  * @param bool                $hasChanged Has the file changed?
  */
 public function __construct(Analyzer $analyzer, DataSourceInterface $dataSource, SplFileInfo $file, $isRaw, $hasChanged = false)
 {
     $this->analyzer = $analyzer;
     $this->sourceId = 'FileSource:' . $dataSource->dataSourceId() . ':' . $file->getRelativePathname();
     $this->relativePathname = $file->getRelativePathname();
     $this->filename = $file->getFilename();
     $this->file = $file;
     $this->isRaw = $isRaw;
     $this->hasChanged = $hasChanged;
     $internetMediaTypeFactory = $this->analyzer->getInternetMediaTypeFactory();
     $this->applicationXmlType = $internetMediaTypeFactory->createApplicationXml();
     $this->init();
 }