Example #1
0
 /**
  * {@inheritdoc}
  * @see AbstractEntity::__get()
  */
 public function __get($name)
 {
     switch ($name) {
         case 'targets':
             if (empty($this->_targets)) {
                 $this->_targets = FarmRoleScriptingTarget::findByFarmRoleScriptId($this->id)->getArrayCopy();
             }
             return $this->_targets;
         default:
             return parent::__get($name);
     }
 }