Contao\DataContainer::__get PHP Method

__get() public method

Return an object property
public __get ( string $strKey ) : mixed
$strKey string
return mixed
    public function __get($strKey)
    {
        switch ($strKey) {
            case 'id':
                return $this->intId;
                break;
            case 'table':
                return $this->strTable;
                break;
            case 'value':
                return $this->varValue;
                break;
            case 'field':
                return $this->strField;
                break;
            case 'inputName':
                return $this->strInputName;
                break;
            case 'palette':
                return $this->strPalette;
                break;
            case 'activeRecord':
                return $this->objActiveRecord;
                break;
        }
        return parent::__get($strKey);
    }

Usage Example

Example #1
0
 /**
  * Return an object property
  *
  * @param string $strKey
  *
  * @return mixed
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'id':
             return $this->intId;
             break;
         case 'parentTable':
             return $this->ptable;
             break;
         case 'childTable':
             return $this->ctable;
             break;
         case 'rootIds':
             return $this->root;
             break;
         case 'createNewVersion':
             return $this->blnCreateNewVersion;
             break;
     }
     return parent::__get($strKey);
 }
All Usage Examples Of Contao\DataContainer::__get