HEX
Server: LiteSpeed
System: Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User: swifizcd (1555)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/swifizcd/shoppers-joy.com.ng/wp-content/plugins/yaysmtp/vendor_amazon/Aws/Result.php
<?php

namespace YaySMTP\Aws3\Aws;

use YaySMTP\Aws3\JmesPath\Env as JmesPath;
/**
 * AWS result.
 */
class Result implements \YaySMTP\Aws3\Aws\ResultInterface
{
    use HasDataTrait;
    public function __construct(array $data = [])
    {
        $this->data = $data;
    }
    public function hasKey($name)
    {
        return isset($this->data[$name]);
    }
    public function get($key)
    {
        return $this[$key];
    }
    public function search($expression)
    {
        return \YaySMTP\Aws3\JmesPath\Env::search($expression, $this->toArray());
    }
    public function __toString()
    {
        $jsonData = json_encode($this->toArray(), JSON_PRETTY_PRINT);
        return <<<EOT
Model Data
----------
Data can be retrieved from the model object using the get() method of the
model (e.g., `\$result->get(\$key)`) or "accessing the result like an
associative array (e.g. `\$result['key']`). You can also execute JMESPath
expressions on the result data using the search() method.

{$jsonData}

EOT;
    }
    /**
     * @deprecated
     */
    public function getPath($path)
    {
        return $this->search(str_replace('/', '.', $path));
    }
}