Example #1
0
 /**
  * Get the configuration file path
  *
  * @param  string $id The type id (default: the current type id)
  *
  * @return string     The path to the file
  *
  * @since 2.0
  */
 public function getConfigFile($id = null)
 {
     $id = $id !== null ? $id : $this->id;
     if ($id && ($path = $this->app->path->path($this->_application->getResource() . 'types'))) {
         return $path . '/' . $id . '.config';
     }
     return null;
 }
Example #2
0
 /**
  * Sets the model resource.
  *
  * @param Recipe_Model_Resource_Abstract	[optional]
  *
  * @return Recipe_Model_Abstract
  */
 public function setResource($resource = null)
 {
     if (is_null($resource)) {
         $this->_resource = Application::getResource($this->getResourceName(), $this->getTableName());
     } else {
         $this->_resource = $resource;
     }
     return $this;
 }