protected function _setup() { parent::_setup(); $this->_model = Solar_Registry::get('model_catalog'); }
/** * * Setup logic to register and retain a model catalog. * * @return void * */ protected function _setup() { // parent logic parent::_setup(); // set properties from registry $this->_model = Solar_Registry::get('model_catalog'); $this->user = Solar_Registry::get('user'); // if model name not preset, use the last part of the class name. // e.g., `Vendor_Something_FooBar => foo_bar`. if (!$this->model_name) { $inflect = Solar_Registry::get('inflect'); $name = strrchr(get_class($this), '_'); $this->model_name = strtolower($inflect->camelToUnder($name)); } }