/** * Configures source with provided arguments * * @param ParserInterface $parser * @param string $file * @param string|FileChecksumInterface $checksum */ public function __construct(ParserInterface $parser, $file, $checksum) { $id = $this->generateId($file); parent::__construct($id, $checksum); $this->parser = $parser; $this->file = $file; }
/** * Configures string source * * @param ParserInterface $parser * @param string $string * @param string $id */ public function __construct(ParserInterface $parser, $string, $id = null) { $checksum = md5($string); if ($id === null) { $id = 'inline_string_' . $checksum; } parent::__construct($id, $checksum); $this->parser = $parser; $this->string = $string; }
/** * Data constructor * * @param string $id * @param string $checksum * @param ContainerInterface $container */ public function __construct($id, $checksum, ContainerInterface $container) { parent::__construct($id, $checksum); $this->container = $container; }