public static function classMap($classname = null) {
        if (self::$classMap === null) {
            // Loop through the enabled addons and grab their classes.
            $class_map = array();
            foreach (static::enabled() as $addon) {
                if (isset($addon[self::K_CLASSES])) {
                    $class_map = array_replace($class_map, $addon[self::K_CLASSES]);
                }
            }
            self::$classMap = $class_map;
        }

        // Now that the class map has been built return the result.
        if ($classname !== null) {
            if (strpos($classname, '\\') === false) {
                $basename = strtolower($classname);
            } else {
                $basename = strtolower(trim(strrchr($classname, '\\'), '\\'));
            }

            $row = val($basename, self::$classMap);

            if ($row === null) {
                return ['', ''];
            } elseif (is_string($row)) {
                return [$classname, $row];
            } elseif (is_array($row)) {
                return  $row;
            } else {
                return ['', ''];
            }
        } else {
            return self::$classMap;
        }
    }
public static function classMap($classname = null) {
        if (self::$classMap === null) {
            // Loop through the enabled addons and grab their classes.
            $class_map = array();
            foreach (static::enabled() as $addon) {
                if (isset($addon[self::K_CLASSES])) {
                    $class_map = array_replace($class_map, $addon[self::K_CLASSES]);
                }
            }
            self::$classMap = $class_map;
        }

        // Now that the class map has been built return the result.
        if ($classname !== null) {
            if (strpos($classname, '\\') === false) {
                $basename = strtolower($classname);
            } else {
                $basename = strtolower(trim(strrchr($classname, '\\'), '\\'));
            }

            $row = val($basename, self::$classMap);

            if ($row === null) {
                return ['', ''];
            } elseif (is_string($row)) {
                return [$classname, $row];
            } elseif (is_array($row)) {
                return  $row;
            } else {
                return ['', ''];
            }
        } else {
            return self::$classMap;
        }
    }
public static function classMap ( $ classname = null ) { if ( self :: $ classMap === null ) { // Loop through the enabled addons and grab their classes. $ class_map = array ( ) ; foreach ( static :: enabled ( ) as $ addon ) { if ( isset ( $ addon [ self :: K_CLASSES ] ) ) { $ class_map = array_replace ( $ class_map , $ addon [ self :: K_CLASSES ] ) ; } } self :: $ classMap = $ class_map ; } // Now that the class map has been built return the result. if ( $ classname !== null ) { if ( strpos ( $ classname , '\\' ) === false ) { $ basename = strtolower ( $ classname ) ; } else { $ basename = strtolower ( trim ( strrchr ( $ classname , '\\' ) , '\\' ) ) ; } $ row = val ( $ basename , self :: $ classMap ) ; if ( $ row === null ) { return [ '' , '' ] ; } elseif ( is_string ( $ row ) ) { return [ $ classname , $ row ] ; } elseif ( is_array ( $ row ) ) { return $ row ; } else { return [ '' , '' ] ; } } else { return self :: $ classMap ; } }
A an array that maps class names to physical paths.

@param string $classname An optional class name to get the path of.
@return array Returns an array in the form `[fullClassname, classPath]`.
If no {@link $classname} is passed then the entire class map is returned.
@throws \Exception Throws an exception if the class map is corrupt.
A an array that maps class names to physical paths .