/** * Load labels * * @param string $filename * @throws \Exception * * @return void */ public function loadLabels($filename) { if (!is_readable($filename)) { throw new \Exception("Labels file `{$filename}` is not readable or does not exists."); } $parser = new \Mage_Xml_Parser(); $this->_labels = $parser->load($filename)->xmlToArray(); }
/** * Constructor * * @param string $filename * @throws \Exception */ public function __construct($filename) { if (!is_readable($filename)) { throw new \Exception("Fixtures set file `{$filename}` is not readable or does not exists."); } $parser = new \Mage_Xml_Parser(); $this->_fixtures = $parser->load($filename)->xmlToArray(); }