PrivateBin\Data\Filesystem::getInstance PHP Метод

getInstance() публичный статический Метод

get instance of singleton
public static getInstance ( array $options = null ) : Filesystem
$options array
Результат Filesystem
    public static function getInstance($options = null)
    {
        // if given update the data directory
        if (is_array($options) && array_key_exists('dir', $options)) {
            self::$_dir = $options['dir'] . DIRECTORY_SEPARATOR;
        }
        // if needed initialize the singleton
        if (!self::$_instance instanceof self) {
            self::$_instance = new self();
            self::_init();
        }
        return self::$_instance;
    }