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