Create a new session storage.

@param string $save_path File location/path where sessions should be written.
@param string $name      Unique name of the storage instance.

@return bool
760486
public function open($save_path, $name)
    {
        if (is_null($this->handlers)) {
            $this->seedHandlerStack();
        }

        /** @var callable $start */
        $start = $this->stacks['create']->top();
        $this->handlerLock = true;
        $data = $start($save_path, $name);
        $this->handlerLock = false;
        return $data;
    }
951119
public function open($savePath, $sessionName): bool
    {
        $sessionId = session_id();

        $identifier = $this->cryptProvider->makeSessionIdentifier($sessionId);

        while (!$this->storageDriver->lock($identifier)) {
            usleep(1000);
        }

        return true;
    }
147648
static public function session($name=null)
	{
	    $id = 'session';
	    if (!static::has($id)) {
	        static::setShared($id, function () {
	            // app option
	            $options = Config::get('session');
	            
	            if ($options['storage'] == 'file') {
	                if (!isset($options['save_path']) && isset($options['path'])) {
	                    $options['save_path'] = $options['path'];
	                }
	                $options['save_path'] = isset($options['save_path']) ? ltrim($options['save_path'], '/') : 'sessions';
	                $options['save_path'] = Config::getStoragePath() . $options['save_path'];
	            }
	            $obj = new Session($options);
	            $obj->start();
	            return $obj;
	        });
	    }
	    
	    return static::get($id);
	}
305246
public static function blank($name = null, $access_path = null)
    {
        $o = new self();
        $o->name = $name;
        $o->access_path = $access_path;

        return $o;
    }
387451
public static function ExistsClassSession ($name = null, $class_path = null) {
		return Session::Exists(static::_GetSeesionClassLayerPath($name, $class_path ?: static::class));
	}
208503
public function open($savePath, $sessionName)
    {
        $sql  = 'INSERT INTO tbl_sessions (SESSION_ID, SESSION_DATA) values (:SESSID, :SESSDATA) ON DUPLICATE KEY UPDATE LAST_ACCESSED=NOW()';
        $stmt = $this->_db->prepare($sql);
        $stmt->execute(array(':SESSID' => session_id(), ':SESSDATA' => ''));

    }
747608
protected function _mkfile($path, $name) {
		if ($this->tmp) {
			$path = $path.'/'.$name;
			$local = $this->getTempFile();
			$res = touch($local) && ftp_put($this->connect, $path, $local, FTP_ASCII);
			@unlink($local);
			return $res ? $path : false;
		}
		return false;
	}
532157
public function open($savePath, $sessionName)
    {
        $this->savePath = $savePath;
        $this->sessionName = $sessionName;

        return true;
    }
964299
public function savePath($path = null)
    {
        if ($path === null) {
            return session_save_path();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($path)) {
            throw new \InvalidArgumentException('Session path must be null or a string');
        }
        if (!is_dir($path)) {
            throw new \InvalidArgumentException("Path not found: {$path}");
        }
        session_save_path($path);
    }
1041792
public function Save ($path, $name = FALSE, $extension = FALSE)
	{
		
		// Set path/name variables
		
		if (!$this->setPath ($path))
		{
			return FALSE;
		}
		
		if ($name)
		{
			$this->name	= $name;
		}
		
		if ($extension)
		{
			$this->extension	= $extension;
		}
		
		$this->filename	= $this->name . '.' . $this->extension;
		
		// Get tmp path
		
		$tmpPath	= $this->tmpPath ();
		
		if (!$tmpPath)
		{
			return FALSE;
		}
		
		// Move the file
		
		if (!move_uploaded_file ($tmpPath, $this->path . $this->filename))
		{
			
			// Set error
			
			new \Sonic\Message ('error', 'Cannot save uploaded file!');
			
			// Return FALSE
			
			return FALSE;
			
		}
		
		// Return TRUE
		
		return TRUE;
		
	}
1172045
public function create($name, $path, $table = null, $create = false)
    {
        $path = $this->getPath($name, $path);

        // First we will get the stub file for the migration, which serves as a type
        // of template for the migration. Once we have those we will populate the
        // various place-holders, save the file, and run the post create event.
        $stub = $this->getStub($table, $create);

        $this->files->put($path, $this->populateStub($name, $stub, $table));

        $this->firePostCreateHooks();

        return $path;
    }
710204
def create_session(self, name=None):
        
        self.session = Session.create(self, name=name)
        return self.session
124900
public function open($savePath, $sessionName)
	{
		$this->db = Db::getInstance(Config::get('@.SESSION_DB_ALIAS'));
		if(null !== $this->db)
		{
			$tableName = Config::get('@.SESSION_DB_TABLENAME','');
			if('' !== $tableName)
			{
				$this->tableName = $tableName;
			}
			else
			{
				$tableName = Config::get('@.SESSION_DB_TABLE','');
				if('' !== $tableName)
				{
					$this->tableName = $this->db->tablePrefix . $tableName;
				}
				else
				{
					$this->tableName = $this->db->tablePrefix . 'session';
				}
			}
			return true;
		}
		return false;
	}
570914
public function create($name, $value = '')
    {
        $_SESSION[$name] = $value;

        if(isset($_SESSION[$name])) {

            return true;
        }

        return false;
    }
543422
public function storeAs($path, $name, $options = [])
    {
        if ($this->isModified()) {
            $this->save();
        }

        return parent::storeAs($path, $name, $options);
    }
169033
public function save(string $path, string $name, ?string $extension = null, int $quality = 100): bool
    {
        if (false === is_dir($path)) {
            mkdir($path, 0777, true);
        }
        if (null === $extension) {
            /** @var string $extension */
            $extension = $this->extension;
        }
        if (true === $this->encrypted) {
            file_put_contents($path . $name . '.' . self::FORMAT_WD_IMAGE, $this->workingData);
            return true;
        } elseif (0 !== imagetypes()) {
            $filename = $path . $name . '.' . $extension;
            switch (strtolower($extension)) {
                case self::FORMAT_GIF:
                    imagegif($this->workingData, $filename);
                    break;
                case self::FORMAT_JPEG:
                case self::FORMAT_JPG:
                    imagejpeg($this->workingData, $filename, $quality);
                    break;
                case self::FORMAT_PNG:
                    imagepng($this->workingData, $filename, (int)round(9 - ((9 * $quality) / 100)));
                    break;
                default:
                    throw new ImageException('Unsupported file type');
            }
            return false;
        }
    }
811369
public function storeAs($path, $name, $options = [])
    {
        $options = $this->parseOptions($options);

        $disk = Arr::pull($options, 'disk');

        return Container::getInstance()->make(FilesystemFactory::class)->disk($disk)->putFileAs(
            $path, $this, $name, $options
        );
    }