Add magic function

git-svn-id: http://php-reader.googlecode.com/svn/trunk@9 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
svollbehr
2008-03-07 19:17:52 +00:00
parent 2f0d5a531e
commit 4916e45513

View File

@@ -178,4 +178,15 @@ class ID3v1
else
return self::$genres[128]; // unknown
}
/**
* Magic function so that $obj->value will work.
*
* @param string $name
* @return mixed
*/
public function __get($name) {
if (method_exists($this, "get" . ucfirst(strtolower($name))))
return call_user_func(array($this, "get" . ucfirst(strtolower($name))));
}
}