src/Core/ClassInfo.php
public static function class_name($nameOrObject)
    {
        if (is_object($nameOrObject)) {
            return get_class($nameOrObject);
        }

        $key = strtolower($nameOrObject);
        if (!isset(static::$_cache_class_names[$key])) {
            // Get manifest name
            $name = ClassLoader::inst()->getManifest()->getItemName($nameOrObject);

            // Use reflection for non-manifest classes
            if (!$name) {
                $reflection = new ReflectionClass($nameOrObject);
                $name = $reflection->getName();
            }
            static::$_cache_class_names[$key] = $name;
        }

        return static::$_cache_class_names[$key];
    }
public static function class_name($nameOrObject)
    {
        if (is_object($nameOrObject)) {
            return get_class($nameOrObject);
        }

        $key = strtolower($nameOrObject);
        if (!isset(static::$_cache_class_names[$key])) {
            // Get manifest name
            $name = ClassLoader::inst()->getManifest()->getItemName($nameOrObject);

            // Use reflection for non-manifest classes
            if (!$name) {
                $reflection = new ReflectionClass($nameOrObject);
                $name = $reflection->getName();
            }
            static::$_cache_class_names[$key] = $name;
        }

        return static::$_cache_class_names[$key];
    }
public static function class_name ( $ nameOrObject ) { if ( is_object ( $ nameOrObject ) ) { return get_class ( $ nameOrObject ) ; } $ key = strtolower ( $ nameOrObject ) ; if ( ! isset ( static :: $ _cache_class_names [ $ key ] ) ) { // Get manifest name $ name = ClassLoader :: inst ( ) -> getManifest ( ) -> getItemName ( $ nameOrObject ) ; // Use reflection for non-manifest classes if ( ! $ name ) { $ reflection = new ReflectionClass ( $ nameOrObject ) ; $ name = $ reflection -> getName ( ) ; } static :: $ _cache_class_names [ $ key ] = $ name ; } return static :: $ _cache_class_names [ $ key ] ; }
Convert a class name in any case and return it as it was defined in PHP

eg: self::class_name('dataobJEct'); //returns 'DataObject'

@param string|object $nameOrObject The classname or object you want to normalise
@throws \ReflectionException
@return string The normalised class name
Convert a class name in any case and return it as it was defined in PHP