Model::get PHP Method

get() public method

Getter method, allows $model->get('property') access to data
public get ( string $property ) : string
$property string
return string
    public function get($property)
    {
        return $this->orm->get($property);
    }

Usage Example

Example #1
0
File: Base.php Project: atk4/atk4
 /**
  * Get the value of the field of a loaded model. If model is not loaded
  * will return default value instead.
  *
  * @return mixed current value of a field
  */
 public function get()
 {
     if ($this->owner->loaded() || isset($this->owner->data[$this->short_name])) {
         return $this->owner->get($this->short_name);
     }
     return $this->defaultValue();
 }
All Usage Examples Of Model::get