public function __construct($filename, Dialect $dialect = null, array $fields = null, $restKey = null, $restValue = null) { parent::__construct($filename, $dialect); $this->fields = $fields ?: null; // we want any empty value to be `null` $this->restKey = $restKey; $this->restValue = $restValue; }
public function __construct(array $variables, array $externalVariables, array $groups = array(), array $defaultEnvironmentsForGroups = array()) { parent::__construct(); $this->defaultEnvironment = self::DEFAULT_VALUE_FOR_ENVIRONMENT_PARAMETER; $this->variables = $variables; $this->externalReader = null; if (!empty($externalVariables)) { $this->externalReader = new Reader($externalVariables, array(), $groups); } $this->loadGroups($groups); $this->defaultEnvironmentsForGroups = $defaultEnvironmentsForGroups; }
/** * @expectedException AmCharts\Chart\Exception\RuntimeException */ public function testFromFileWithWrongFile() { $this->reader->fromFile('foo.xml'); }