Datastore/src/DatastoreSessionHandler.php
public function open($savePath, $sessionName)
    {
        $this->kind = $sessionName;
        if (preg_match(self::NAMESPACE_ALLOWED_PATTERN, $savePath) !== 1 ||
            preg_match(self::NAMESPACE_RESERVED_PATTERN, $savePath) === 1) {
            throw new InvalidArgumentException(
                sprintf('The given save_path "%s" not allowed', $savePath)
            );
        }
        $this->namespaceId = $savePath;
        $this->transaction = $this->datastore->transaction();
        return true;
    }
public function open($savePath, $sessionName)
    {
        $this->kind = $sessionName;
        if (preg_match(self::NAMESPACE_ALLOWED_PATTERN, $savePath) !== 1 ||
            preg_match(self::NAMESPACE_RESERVED_PATTERN, $savePath) === 1) {
            throw new InvalidArgumentException(
                sprintf('The given save_path "%s" not allowed', $savePath)
            );
        }
        $this->namespaceId = $savePath;
        $this->transaction = $this->datastore->transaction();
        return true;
    }
public function open ( $ savePath , $ sessionName ) { $ this -> kind = $ sessionName ; if ( preg_match ( self :: NAMESPACE_ALLOWED_PATTERN , $ savePath ) !== 1 || preg_match ( self :: NAMESPACE_RESERVED_PATTERN , $ savePath ) === 1 ) { throw new InvalidArgumentException ( sprintf ( 'The given save_path "%s" not allowed' , $ savePath ) ) ; } $ this -> namespaceId = $ savePath ; $ this -> transaction = $ this -> datastore -> transaction ( ) ; return true ; }
Start a session, by creating a transaction for the later `write`.

@param string $savePath The value of `session.save_path` setting will be
used here. It will use this value as the Datastore namespaceId.
@param string $sessionName The value of `session.name` setting will be
used here. It will use this value as the Datastore kind.
@return bool
Start a session by creating a transaction for the later write .