public static function getMerchant() { if (!self::$merchant) { $class = get_called_class(); $class = substr($class, strrpos($class, '\\') + 1); self::$merchant = Merchant::get($class, 'object_name'); } return self::$merchant; }