Add magic function
git-svn-id: http://php-reader.googlecode.com/svn/trunk@9 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
@@ -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))));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user