hello
Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : chryzalihi ( 621211) PHP Version : 8.3.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/chryzalihi/www/wp-content/languages/themes/the/ |
PK o] ϶q� � Request/HeaderVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Common\Exception\InvalidArgumentException;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Parameter;
/**
* Visitor used to apply a parameter to a header value
*/
class HeaderVisitor extends AbstractRequestVisitor
{
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
$value = $param->filter($value);
if ($param->getType() == 'object' && $param->getAdditionalProperties() instanceof Parameter) {
$this->addPrefixedHeaders($request, $param, $value);
} else {
$request->setHeader($param->getWireName(), $value);
}
}
/**
* Add a prefixed array of headers to the request
*
* @param RequestInterface $request Request to update
* @param Parameter $param Parameter object
* @param array $value Header array to add
*
* @throws InvalidArgumentException
*/
protected function addPrefixedHeaders(RequestInterface $request, Parameter $param, $value)
{
if (!is_array($value)) {
throw new InvalidArgumentException('An array of mapped headers expected, but received a single value');
}
$prefix = $param->getSentAs();
foreach ($value as $headerName => $headerValue) {
$request->setHeader($prefix . $headerName, $headerValue);
}
}
}
PK o]��a
� � Request/JsonVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Parameter;
/**
* Visitor used to apply a parameter to an array that will be serialized as a top level key-value pair in a JSON body
*/
class JsonVisitor extends AbstractRequestVisitor
{
/** @var bool Whether or not to add a Content-Type header when JSON is found */
protected $jsonContentType = 'application/json';
/** @var \SplObjectStorage Data object for persisting JSON data */
protected $data;
public function __construct()
{
$this->data = new \SplObjectStorage();
}
/**
* Set the Content-Type header to add to the request if JSON is added to the body. This visitor does not add a
* Content-Type header unless you specify one here.
*
* @param string $header Header to set when JSON is added (e.g. application/json)
*
* @return self
*/
public function setContentTypeHeader($header = 'application/json')
{
$this->jsonContentType = $header;
return $this;
}
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
if (isset($this->data[$command])) {
$json = $this->data[$command];
} else {
$json = array();
}
$json[$param->getWireName()] = $this->prepareValue($value, $param);
$this->data[$command] = $json;
}
public function after(CommandInterface $command, RequestInterface $request)
{
if (isset($this->data[$command])) {
// Don't overwrite the Content-Type if one is set
if ($this->jsonContentType && !$request->hasHeader('Content-Type')) {
$request->setHeader('Content-Type', $this->jsonContentType);
}
$request->setBody(json_encode($this->data[$command]));
unset($this->data[$command]);
}
}
}
PK o]��$p� � Request/PostFileVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\Message\PostFileInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Parameter;
/**
* Visitor used to apply a parameter to a POST file
*/
class PostFileVisitor extends AbstractRequestVisitor
{
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
$value = $param->filter($value);
if ($value instanceof PostFileInterface) {
$request->addPostFile($value);
} else {
$request->addPostFile($param->getWireName(), $value);
}
}
}
PK o]V���� � Request/ResponseBodyVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Parameter;
/**
* Visitor used to change the location in which a response body is saved
*/
class ResponseBodyVisitor extends AbstractRequestVisitor
{
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
$request->setResponseBody($value);
}
}
PK o]=��� Request/QueryVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Parameter;
/**
* Visitor used to apply a parameter to a request's query string
*/
class QueryVisitor extends AbstractRequestVisitor
{
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
$request->getQuery()->set($param->getWireName(), $this->prepareValue($value, $param));
}
}
PK o]��� � Request/XmlVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Operation;
use Guzzle\Service\Description\Parameter;
/**
* Location visitor used to serialize XML bodies
*/
class XmlVisitor extends AbstractRequestVisitor
{
/** @var \SplObjectStorage Data object for persisting XML data */
protected $data;
/** @var bool Content-Type header added when XML is found */
protected $contentType = 'application/xml';
public function __construct()
{
$this->data = new \SplObjectStorage();
}
/**
* Change the content-type header that is added when XML is found
*
* @param string $header Header to set when XML is found
*
* @return self
*/
public function setContentTypeHeader($header)
{
$this->contentType = $header;
return $this;
}
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
$xml = isset($this->data[$command])
? $this->data[$command]
: $this->createRootElement($param->getParent());
$this->addXml($xml, $param, $value);
$this->data[$command] = $xml;
}
public function after(CommandInterface $command, RequestInterface $request)
{
$xml = null;
// If data was found that needs to be serialized, then do so
if (isset($this->data[$command])) {
$xml = $this->finishDocument($this->data[$command]);
unset($this->data[$command]);
} else {
// Check if XML should always be sent for the command
$operation = $command->getOperation();
if ($operation->getData('xmlAllowEmpty')) {
$xmlWriter = $this->createRootElement($operation);
$xml = $this->finishDocument($xmlWriter);
}
}
if ($xml) {
// Don't overwrite the Content-Type if one is set
if ($this->contentType && !$request->hasHeader('Content-Type')) {
$request->setHeader('Content-Type', $this->contentType);
}
$request->setBody($xml);
}
}
/**
* Create the root XML element to use with a request
*
* @param Operation $operation Operation object
*
* @return \XMLWriter
*/
protected function createRootElement(Operation $operation)
{
static $defaultRoot = array('name' => 'Request');
// If no root element was specified, then just wrap the XML in 'Request'
$root = $operation->getData('xmlRoot') ?: $defaultRoot;
// Allow the XML declaration to be customized with xmlEncoding
$encoding = $operation->getData('xmlEncoding');
$xmlWriter = $this->startDocument($encoding);
$xmlWriter->startElement($root['name']);
// Create the wrapping element with no namespaces if no namespaces were present
if (!empty($root['namespaces'])) {
// Create the wrapping element with an array of one or more namespaces
foreach ((array) $root['namespaces'] as $prefix => $uri) {
$nsLabel = 'xmlns';
if (!is_numeric($prefix)) {
$nsLabel .= ':'.$prefix;
}
$xmlWriter->writeAttribute($nsLabel, $uri);
}
}
return $xmlWriter;
}
/**
* Recursively build the XML body
*
* @param \XMLWriter $xmlWriter XML to modify
* @param Parameter $param API Parameter
* @param mixed $value Value to add
*/
protected function addXml(\XMLWriter $xmlWriter, Parameter $param, $value)
{
if ($value === null) {
return;
}
$value = $param->filter($value);
$type = $param->getType();
$name = $param->getWireName();
$prefix = null;
$namespace = $param->getData('xmlNamespace');
if (false !== strpos($name, ':')) {
list($prefix, $name) = explode(':', $name, 2);
}
if ($type == 'object' || $type == 'array') {
if (!$param->getData('xmlFlattened')) {
$xmlWriter->startElementNS(null, $name, $namespace);
}
if ($param->getType() == 'array') {
$this->addXmlArray($xmlWriter, $param, $value);
} elseif ($param->getType() == 'object') {
$this->addXmlObject($xmlWriter, $param, $value);
}
if (!$param->getData('xmlFlattened')) {
$xmlWriter->endElement();
}
return;
}
if ($param->getData('xmlAttribute')) {
$this->writeAttribute($xmlWriter, $prefix, $name, $namespace, $value);
} else {
$this->writeElement($xmlWriter, $prefix, $name, $namespace, $value);
}
}
/**
* Write an attribute with namespace if used
*
* @param \XMLWriter $xmlWriter XMLWriter instance
* @param string $prefix Namespace prefix if any
* @param string $name Attribute name
* @param string $namespace The uri of the namespace
* @param string $value The attribute content
*/
protected function writeAttribute($xmlWriter, $prefix, $name, $namespace, $value)
{
if (empty($namespace)) {
$xmlWriter->writeAttribute($name, $value);
} else {
$xmlWriter->writeAttributeNS($prefix, $name, $namespace, $value);
}
}
/**
* Write an element with namespace if used
*
* @param \XMLWriter $xmlWriter XML writer resource
* @param string $prefix Namespace prefix if any
* @param string $name Element name
* @param string $namespace The uri of the namespace
* @param string $value The element content
*/
protected function writeElement(\XMLWriter $xmlWriter, $prefix, $name, $namespace, $value)
{
$xmlWriter->startElementNS($prefix, $name, $namespace);
if (strpbrk($value, '<>&')) {
$xmlWriter->writeCData($value);
} else {
$xmlWriter->writeRaw($value);
}
$xmlWriter->endElement();
}
/**
* Create a new xml writer and start a document
*
* @param string $encoding document encoding
*
* @return \XMLWriter the writer resource
*/
protected function startDocument($encoding)
{
$xmlWriter = new \XMLWriter();
$xmlWriter->openMemory();
$xmlWriter->startDocument('1.0', $encoding);
return $xmlWriter;
}
/**
* End the document and return the output
*
* @param \XMLWriter $xmlWriter
*
* @return \string the writer resource
*/
protected function finishDocument($xmlWriter)
{
$xmlWriter->endDocument();
return $xmlWriter->outputMemory();
}
/**
* Add an array to the XML
*/
protected function addXmlArray(\XMLWriter $xmlWriter, Parameter $param, &$value)
{
if ($items = $param->getItems()) {
foreach ($value as $v) {
$this->addXml($xmlWriter, $items, $v);
}
}
}
/**
* Add an object to the XML
*/
protected function addXmlObject(\XMLWriter $xmlWriter, Parameter $param, &$value)
{
$noAttributes = array();
// add values which have attributes
foreach ($value as $name => $v) {
if ($property = $param->getProperty($name)) {
if ($property->getData('xmlAttribute')) {
$this->addXml($xmlWriter, $property, $v);
} else {
$noAttributes[] = array('value' => $v, 'property' => $property);
}
}
}
// now add values with no attributes
foreach ($noAttributes as $element) {
$this->addXml($xmlWriter, $element['property'], $element['value']);
}
}
}
PK o]Y4�� � Request/BodyVisitor.phpnu &1i� <?php
namespace Guzzle\Service\Command\LocationVisitor\Request;
use Guzzle\Http\EntityBody;
use Guzzle\Http\Message\EntityEnclosingRequestInterface;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\EntityBodyInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Parameter;
/**
* Visitor used to apply a body to a request
*
* This visitor can use a data parameter of 'expect' to control the Expect header. Set the expect data parameter to
* false to disable the expect header, or set the value to an integer so that the expect 100-continue header is only
* added if the Content-Length of the entity body is greater than the value.
*/
class BodyVisitor extends AbstractRequestVisitor
{
public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
{
$value = $param->filter($value);
$entityBody = EntityBody::factory($value);
$request->setBody($entityBody);
$this->addExpectHeader($request, $entityBody, $param->getData('expect_header'));
// Add the Content-Encoding header if one is set on the EntityBody
if ($encoding = $entityBody->getContentEncoding()) {
$request->setHeader('Content-Encoding', $encoding);
}
}
/**
* Add the appropriate expect header to a request
*
* @param EntityEnclosingRequestInterface $request Request to update
* @param EntityBodyInterface $body Entity body of the request
* @param string|int $expect Expect header setting
*/
protected function addExpectHeader(EntityEnclosingRequestInterface $request, EntityBodyInterface $body, $expect)
{
// Allow the `expect` data parameter to be set to remove the Expect header from the request
if ($expect === false) {
$request->removeHeader('Expect');
} elseif ($expect !== true) {
// Default to using a MB as the point in which to start using the expect header
$expect = $expect ?: 1048576;
// If the expect_header value is numeric then only add if the size is greater than the cutoff
if (is_numeric($expect) && $body->getSize()) {
if ($body->getSize() < $expect) {
$request->removeHeader('Expect');
} else {
$request->setHeader('Expect', '100-Continue');
}
}
}
}
}
PK o]�@�� Request/.htaccessnu ��6�$ <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>PK o]��Zv� � "