public static function getClassName($object, $toLower = false)
    {
        $className = $object;
        if (is_object($object)) {
            $className = get_class($object);
        }

        $result = $className;
        if (strpos($className, '\\') !== false) {
            $className = explode('\\', $className);
            reset($className);
            $result = end($className);
        }

        if ($toLower) {
            $result = strtolower($result);
        }

        return $result;
    }
public static function getClassName($object, $toLower = false)
    {
        $className = $object;
        if (is_object($object)) {
            $className = get_class($object);
        }

        $result = $className;
        if (strpos($className, '\\') !== false) {
            $className = explode('\\', $className);
            reset($className);
            $result = end($className);
        }

        if ($toLower) {
            $result = strtolower($result);
        }

        return $result;
    }
public static function getClassName ( $ object , $ toLower = false ) { $ className = $ object ; if ( is_object ( $ object ) ) { $ className = get_class ( $ object ) ; } $ result = $ className ; if ( strpos ( $ className , '\\' ) !== false ) { $ className = explode ( '\\' , $ className ) ; reset ( $ className ) ; $ result = end ( $ className ) ; } if ( $ toLower ) { $ result = strtolower ( $ result ) ; } return $ result ; }
Get class name without namespace

@param mixed $object
@param bool  $toLower
@return mixed|string
Get class name without namespace