public static function inst()
    {
        if (!self::$instance) {
            self::$instance = new static();

            $dmsPath = self::$instance->getStoragePath();

            if (!is_dir($dmsPath)) {
                self::$instance->createStorageFolder($dmsPath);
            }

            if (!file_exists($dmsPath . DIRECTORY_SEPARATOR . '.htaccess')) {
                // Restrict access to the storage folder
                copy(
                    BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR
                    . 'resources' . DIRECTORY_SEPARATOR . '.htaccess',
                    $dmsPath . DIRECTORY_SEPARATOR . '.htaccess'
                );

                copy(
                    BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR
                    . 'resources' . DIRECTORY_SEPARATOR . 'web.config',
                    $dmsPath . DIRECTORY_SEPARATOR . 'web.config'
                );
            }
        }
        return self::$instance;
    }
public static function inst()
    {
        if (!self::$instance) {
            self::$instance = new static();

            $dmsPath = self::$instance->getStoragePath();

            if (!is_dir($dmsPath)) {
                self::$instance->createStorageFolder($dmsPath);
            }

            if (!file_exists($dmsPath . DIRECTORY_SEPARATOR . '.htaccess')) {
                // Restrict access to the storage folder
                copy(
                    BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR
                    . 'resources' . DIRECTORY_SEPARATOR . '.htaccess',
                    $dmsPath . DIRECTORY_SEPARATOR . '.htaccess'
                );

                copy(
                    BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR
                    . 'resources' . DIRECTORY_SEPARATOR . 'web.config',
                    $dmsPath . DIRECTORY_SEPARATOR . 'web.config'
                );
            }
        }
        return self::$instance;
    }
public static function inst ( ) { if ( ! self :: $ instance ) { self :: $ instance = new static ( ) ; $ dmsPath = self :: $ instance -> getStoragePath ( ) ; if ( ! is_dir ( $ dmsPath ) ) { self :: $ instance -> createStorageFolder ( $ dmsPath ) ; } if ( ! file_exists ( $ dmsPath . DIRECTORY_SEPARATOR . '.htaccess' ) ) { // Restrict access to the storage folder copy ( BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . '.htaccess' , $ dmsPath . DIRECTORY_SEPARATOR . '.htaccess' ) ; copy ( BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'web.config' , $ dmsPath . DIRECTORY_SEPARATOR . 'web.config' ) ; } } return self :: $ instance ; }
Factory method that returns an instance of the DMS. This could be any class that implements the DMSInterface.

@return DMSInterface An instance of the Document Management System
Factory method that returns an instance of the DMS . This could be any class that implements the DMSInterface .