Skip to content

PhpOrient Protocols Binary SocketTransport

Domenico Lupinetti edited this page Jan 1, 2015 · 4 revisions

PhpOrient\Protocols\Binary\SocketTransport

Properties

$inTransaction

    public boolean $inTransaction = false

If a transaction started

  • Visibility: public

$databaseOpened

    public boolean $databaseOpened = false

Flag needed to know if a database is opened or not

  • Visibility: public

$connected

    public boolean $connected = false

Flag needed to know if connected to the server

  • Visibility: public

$_socket

    protected \PhpOrient\Protocols\Binary\OrientSocket $_socket
  • Visibility: protected

$sessionId

    protected integer $sessionId = -1
  • Visibility: protected

$token

    protected string $token = ''
  • Visibility: protected

$requestToken

    protected boolean $requestToken = false

With this flag a session with token is requested

  • Visibility: protected

$_protocolVersion

    protected integer $_protocolVersion
  • Visibility: protected

$hostname

    protected string $hostname
  • Visibility: protected

$port

    protected string $port
  • Visibility: protected

$username

    protected string $username
  • Visibility: protected

$password

    protected string $password
  • Visibility: protected

$clusterList

    protected \PhpOrient\Protocols\Common\ClusterMap $clusterList
  • Visibility: protected

$_logger

    protected \Psr\Log\LoggerInterface $_logger
  • Visibility: protected
  • This property is static.

Methods

getProtocolVersion

    integer PhpOrient\Protocols\Binary\SocketTransport::getProtocolVersion()
Gets the version of negotiated protocol
  • Visibility: public

setProtocolVersion

    mixed PhpOrient\Protocols\Binary\SocketTransport::setProtocolVersion(integer $protocolVersion)
  • Visibility: public
Arguments
  • $protocolVersion integer

getSessionId

    integer PhpOrient\Protocols\Binary\SocketTransport::getSessionId()
Gets the session ID for current connection
  • Visibility: public

setSessionId

    \PhpOrient\Protocols\Binary\SocketTransport PhpOrient\Protocols\Binary\SocketTransport::setSessionId($sessionId)
  • Visibility: public
Arguments
  • $sessionId mixed

getToken

    string PhpOrient\Protocols\Binary\SocketTransport::getToken()
  • Visibility: public

setToken

    \PhpOrient\Protocols\Binary\SocketTransport PhpOrient\Protocols\Binary\SocketTransport::setToken(string $token)
  • Visibility: public
Arguments
  • $token string

isRequestToken

    boolean PhpOrient\Protocols\Binary\SocketTransport::isRequestToken()
  • Visibility: public

setRequestToken

    \PhpOrient\Protocols\Binary\SocketTransport PhpOrient\Protocols\Binary\SocketTransport::setRequestToken(boolean $requestToken)
Set the client to get and send the token
  • Visibility: public
Arguments
  • $requestToken boolean

getSocket

    \PhpOrient\Protocols\Binary\OrientSocket PhpOrient\Protocols\Binary\SocketTransport::getSocket()
Gets the Socket, and establishes the connection if required.
  • Visibility: public

execute

    mixed PhpOrient\Protocols\Common\TransportInterface::execute(string $operation, array $params)
Execute the operation with the given name.
Arguments
  • $operation string

    The operation to prepare.

  • $params array

    The parameters for the operation.

operationFactory

    \PhpOrient\Protocols\Binary\Abstracts\Operation PhpOrient\Protocols\Binary\SocketTransport::operationFactory(\PhpOrient\Protocols\Binary\Abstracts\Operation|string $operation, array $params)
  • Visibility: protected
Arguments

_hexDump

    string|null PhpOrient\Protocols\Binary\SocketTransport::_hexDump(string $data, boolean $htmlOutput, boolean $uppercase)
View any string as a hexDump.

This is most commonly used to view binary data from streams or sockets while debugging, but can be used to view any string with non-viewable characters.

  • Visibility: public
  • This method is static.
Arguments
  • $data string

    The string to be dumped

  • $htmlOutput boolean

    Set to false for non-HTML output

  • $uppercase boolean

    Set to true for uppercase hex

hexDump

    mixed PhpOrient\Protocols\Binary\SocketTransport::hexDump($message)
Dump data stream to HexDec format
  • Visibility: public
Arguments
  • $message mixed

__construct

    mixed PhpOrient\Protocols\Common\AbstractTransport::__construct()
Class Constructor

debug

    mixed PhpOrient\Protocols\Common\AbstractTransport::debug($message)
Arguments
  • $message mixed

getClusterMap

    \PhpOrient\Protocols\Common\ClusterMap PhpOrient\Protocols\Common\AbstractTransport::getClusterMap()

setClusterMap

    mixed PhpOrient\Protocols\Common\AbstractTransport::setClusterMap(\PhpOrient\Protocols\Common\ClusterMap $clusterList)
Arguments

getTransaction

    \PhpOrient\Protocols\Binary\Transaction\TxCommit PhpOrient\Protocols\Common\AbstractTransport::getTransaction()
Retrieve a new transaction instance

configure

    \PhpOrient\Protocols\Common\ConfigurableInterface PhpOrient\Protocols\Common\ConfigurableInterface::configure(array $options)
Configure the object.
Arguments
  • $options array

    The options for the object.

fromConfig

    static PhpOrient\Protocols\Common\AbstractTransport::fromConfig(array $options)
Return a new class instance configured from the given options.
Arguments
  • $options array

    The options for the newly created class instance.

Clone this wiki locally