* @package Mammut */ class MObject { protected static function __inStatic() { if(!empty($this)) throw Exception('not an static context'); } protected function __inInstance() { if(!is_object($this)) throw Exception('not an instance context'); } /** @ignore **/ public function __toString() { return __CLASS__; } /** * Workaround to get the class name in PHP <5.5 * * @return string the full class name as string */ public static final function clazz() { return '\\' . get_called_class(); } }