PATH:
home
/
letacommog
/
letaweb
/
admin
/
classes
/
hosting
/
api-php-lib
/
src
/
PleskX
/
Api
<?php // Copyright 1999-2015. Parallels IP Holdings GmbH. namespace PleskX\Api; class Operator { /** @var string|null */ protected $_wrapperTag = null; /** @var \PleskX\Api\Client */ protected $_client; public function __construct($client) { $this->_client = $client; } /** * Perform plain API request. * * @param string|array $request * @param int $mode * * @return XmlResponse */ public function request($request, $mode = Client::RESPONSE_SHORT) { $wrapperTag = $this->_wrapperTag; if (is_null($wrapperTag)) { $classNameParts = explode('\\', get_class($this)); $wrapperTag = end($classNameParts); $wrapperTag = strtolower(preg_replace('/([a-z])([A-Z])/', '\1-\2', $wrapperTag)); } if (is_array($request)) { $request = [$wrapperTag => $request]; } elseif (preg_match('/^[a-z]/', $request)) { $request = "$wrapperTag.$request"; } else { $request = "<$wrapperTag>$request</$wrapperTag>"; } return $this->_client->request($request, $mode); } }
[+]
..
[-] Client.php
[edit]
[-] Struct.php
[edit]
[-] Operator.php
[edit]
[+]
Operator
[+]
Client
[-] Exception.php
[edit]
[-] XmlResponse.php
[edit]
[+]
Struct