You are here

public function MagicSetClass::__set in Plug 7

Parameters

string $name:

mixed $value:

Throws

\BadMethodCallException

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicSetClass.php, line 31

Class

MagicSetClass
Test asset class

Namespace

Doctrine\Tests\Common\Proxy

Code

public function __set($name, $value) {
  if ($name === 'test') {
    $this->testAttribute = $value;
  }
  if ($name === 'publicField' || $name === 'id') {
    throw new \BadMethodCallException('Should never be called for "publicField" or "id"');
  }
  $this->testAttribute = $value;
}