You are here

public function MagicSetClass::__set in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicSetClass.php \Doctrine\Tests\Common\Proxy\MagicSetClass::__set()

Parameters

string $name:

mixed $value:

Throws

\BadMethodCallException

File

vendor/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;
}