getAcl()->check('Currency')) { throw new Forbidden(); } } public function getActionIndex() { if ($this->getAcl()->getLevel('Currency', 'read') !== 'yes') throw new Forbidden(); return $this->getService('CurrencyRate')->get(); } public function putActionUpdate($params, $data) { if ($this->getAcl()->getLevel('Currency', 'edit') !== 'yes') throw new Forbidden(); if (empty($data) || !is_object($data)) throw new BadRequest(); return $this->getService('CurrencyRate')->set($data); } }