public function __construct($app, $params = array())
{
$this->_app = $app;
// @todo: we can't simply merge the default values and stored values
// because empty parameter values are not stored at all, so they would
// always be overwritten by the defaults.
if ($params === false) {
foreach ($this->getParams() as $name => $param) {
$this->_params[$name] = $param['default'];
}
} else {
$this->_params = $params;
}
}