MagicSetClass.php in Plug 7
File
lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicSetClass.php
View source
<?php
namespace Doctrine\Tests\Common\Proxy;
class MagicSetClass {
public $id = 'id';
public $publicField = 'publicField';
public $testAttribute;
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;
}
}