$_fp : \Zyberspace\Telegram\Cli\ressource
The file handler for the socket-connection
Raw part of the php-client for telegram-cli.
Takes care of the socket-connection and some helper-methods.
Connects to the telegram-cli.
Address of the socket to connect to. See stream_socket_client() for more info. Can be 'unix://' or 'tcp://'.
Throws an exception if no connection can be established.
exec(string $command) : object|boolean
Executes a command on the telegram-cli. Line-breaks will be escaped, as telgram-cli does not support them.
The command. Command-arguments can be passed as additional method-arguments.
Returns the answer as a json-object or true on success, false if there was an error.
formatPeerList(array $peerList) : string
Takes a list of peers and turns it into a format needed by the most commands that handle multiple peers.
Every single peer gets escaped by escapePeer().
The list of peers that shall get formated
The formated list of peers