You are here

public function MagicGetClass::__get in Plug 7

Parameters

$name:

Return value

string

Throws

\BadMethodCallException

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetClass.php, line 26

Class

MagicGetClass
Test asset class

Namespace

Doctrine\Tests\Common\Proxy

Code

public function __get($name) {
  if ($name === 'test') {
    return 'test';
  }
  if ($name === 'publicField' || $name === 'id') {
    throw new \BadMethodCallException('Should never be called for "publicField" or "id"');
  }
  return 'not defined';
}