Beispiel #1
0
 /**
  * Implements lazy loading of the pages config property.
  *
  * @param string
  * @return mixed
  */
 public function get($name, $default = null)
 {
     if ($name == 'pages' && !isset($this->pages)) {
         $this->pages = $this->_pages();
     }
     return parent::get($name);
 }
Beispiel #2
0
 /**
  * Get the identity key
  *
  * @return mixed
  */
 public function getIdentityKey()
 {
     return ObjectConfig::get('identity_key');
 }
Beispiel #3
0
 /**
  * Get an command property or attribute
  *
  * If an command property exists the property will be returned, otherwise the attribute will be returned. If no
  * property or attribute can be found the method will return NULL.
  *
  * @param  string $name    The property name
  * @param  mixed  $default The default value
  * @return mixed|null  The property value
  */
 public final function get($name, $default = null)
 {
     $method = 'get' . ucfirst($name);
     if (!method_exists($this, $method)) {
         $value = parent::get($name);
     } else {
         $value = $this->{$method}();
     }
     return $value;
 }
Beispiel #4
0
 /**
  * Get the number of affected rows
  *
  * @return integer
  */
 public function getAffected()
 {
     return ObjectConfig::get('affected');
 }
Beispiel #5
0
 /**
  * Get the view parameters
  *
  * @return array
  */
 public function getParameters()
 {
     return ObjectConfig::get('parameters');
 }
Beispiel #6
0
 /**
  * Get the model entity
  *
  * @return ModelEntityInterface
  */
 public function getEntity()
 {
     return ObjectConfig::get('entity');
 }
Beispiel #7
0
 /**
  * Get the view layout
  *
  * @return string
  */
 public function getLayout()
 {
     return ObjectConfig::get('layout');
 }
Beispiel #8
0
 /**
  * Get the model query
  *
  * @return DatabaseQueryInterface
  */
 public function getQuery()
 {
     return ObjectConfig::get('query');
 }
Beispiel #9
0
 /**
  * Get the user object
  *
  * @return UserInterface
  */
 public function getUser()
 {
     return ObjectConfig::get('user');
 }