/** * @param string $filename File name of Drupal project main file * @param string $info Valid Drupal .info file contents * @param integer $core Drupal core version. */ public function __construct($filename, $info, $core) { $this->filename = $filename; list($this->name, , $isYaml) = array_pad(explode('.', $this->filename), 3, false); $this->info = $isYaml ? Yaml::parse($info) : \drupal_parse_info_format($info); $this->core = $core; $this->versionFactory = new VersionFactory(); }
/** * @param string $data Content from makefile. */ public function __construct($data) { $this->makeInfo = \drupal_parse_info_format($data); }