src/Autoload.php
public function getObjectBase(string $objectName, bool $endOnly = true): string
    {
        $tmp = explode('\\', $objectName);
        $end = array_pop($tmp);

        if ($endOnly) {
            return $end;
        }

        // eg: froq\app\library\entity\UserEntity => app/library/entity/UserEntity
        $path = join('\\', array_slice($tmp, 3));

        return $path .'\\'. $end;
    }
public function getObjectBase(string $objectName, bool $endOnly = true): string
    {
        $tmp = explode('\\', $objectName);
        $end = array_pop($tmp);

        if ($endOnly) {
            return $end;
        }

        // eg: froq\app\library\entity\UserEntity => app/library/entity/UserEntity
        $path = join('\\', array_slice($tmp, 3));

        return $path .'\\'. $end;
    }
public function getObjectBase ( string $ objectName , bool $ endOnly = true ) : string { $ tmp = explode ( '\\' , $ objectName ) ; $ end = array_pop ( $ tmp ) ; if ( $ endOnly ) { return $ end ; } // eg: froq\app\library\entity\UserEntity => app/library/entity/UserEntity $ path = join ( '\\' , array_slice ( $ tmp , 3 ) ) ; return $ path . '\\' . $ end ; }
Get object base.
@param  string $objectName
@param  bool   $endOnly
@return string
Get object base .