このリポジトリは2025-08-22にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
ファイル
dumbo/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetClass.php
2014-11-25 16:42:40 +01:00

39 行
651 B
PHP

<?php
namespace Doctrine\Tests\Common\Proxy;
/**
* Test asset class
*/
class MagicGetClass
{
/**
* @var string
*/
public $id = 'id';
/**
* @var string
*/
public $publicField = 'publicField';
/**
* @param $name
*
* @return string
* @throws \BadMethodCallException
*/
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';
}
}