getName() public method

The model name. By default parsed using the classname or it can be set by passing a $config['name'] in the class constructor
public getName ( ) : string
return string The name of the model
Esempio n. 1
0
 /**
  * A mocked object will have a random name, that won't match the regex expression in the parent.
  * To prevent exceptions, we have to manually set the name
  *
  * @return string
  */
 public function getName()
 {
     if (isset($this->methods['getName'])) {
         $func = $this->methods['getName'];
         return call_user_func_array($func, array());
     }
     return parent::getName();
 }
Esempio n. 2
0
File: View.php Progetto: akeeba/fof
 /**
  * Pushes the default Model to the View
  *
  * @param   Model $model The model to push
  */
 public function setDefaultModel(Model &$model)
 {
     $name = $model->getName();
     $this->setDefaultModelName($name);
     $this->setModel($this->defaultModel, $model);
 }