/** * Creates method from app configuration * * @param string id * @param vBuilder\Config\ConfigDAO config * @param Nette\DI\IContainer DI context */ static function fromConfig($id, vBuilder\Config\ConfigDAO $config, Nette\DI\IContainer $context) { $method = new static(); $method->_id = $id; $method->_name = $config->get('name', $id); $method->_description = $config->get('description'); $method->_suitablePayments = $config->get('suitablePayments') ? $config->get('suitablePayments')->toArray() : null; return $method; }
/** * Creates method from app configuration * * @param string id * @param vBuilder\Config\ConfigDAO config * @param Nette\DI\IContainer DI context */ static function fromConfig($id, vBuilder\Config\ConfigDAO $config, Nette\DI\IContainer $context) { $method = new static(); $method->_id = $id; $method->_name = $config->get('name', $id); $method->_description = $config->get('description'); $method->_charge = $config->get('charge'); return $method; }
/** * Overloaded key unsetter for load triggering. * Data has to be loaded, or it won't unset any key during the key non-existence. * * @param string $key */ public function remove($key) { if (!$this->isLoaded) { $this->load(); } return parent::remove($key); }