Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * This file is part of the Cloudinary PHP package. * * (c) Cloudinary * * F..

Decoded Output download

<?php
/**
 * This file is part of the Cloudinary PHP package.
 *
 * (c) Cloudinary
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Cloudinary\Api\Admin;

use Cloudinary\Api\ApiClient;
use Cloudinary\Api\ApiResponse;
use GuzzleHttp\Promise\PromiseInterface;

/**
 * Represents Analysis API methods.
 *
 * @property ApiClient $apiV2Client Defined in AdminApi class.
 *
 * @api
 */
trait AnalysisTrait
{
    /**
     * Analyzes an asset with the requested analysis type.
     *
     * @param string $inputType    The type of input for the asset to analyze ('uri').
     * @param string $analysisType The type of analysis to run ('google_tagging', 'captioning', 'fashion').
     * @param string $uri          The URI of the asset to analyze.
     * @param array  $parameters   Additional parameters.
     *
     *
     * @return ApiResponse
     *
     * @see AdminApi::analyzeAsync()
     *
     * @see https://cloudinary.com/documentation/media_analyzer_api_reference
     */
    public function analyze($inputType, $analysisType, $uri = null, $parameters = null)
    {
        return $this->analyzeAsync($inputType, $analysisType, $uri, $parameters)->wait();
    }

    /**
     * Analyzes an asset with the requested analysis type asynchronously.
     *
     * @param string $inputType    The type of input for the asset to analyze ('uri').
     * @param string $analysisType The type of analysis to run ('google_tagging', 'captioning', 'fashion').
     * @param string $uri          The URI of the asset to analyze.
     * @param array  $parameters   Additional parameters.
     *
     * @return PromiseInterface
     *
     * @see https://cloudinary.com/documentation/media_analyzer_api_reference
     */
    public function analyzeAsync($inputType, $analysisType, $uri = null, $parameters = null)
    {
        $endPoint = [ApiEndPoint::ANALYSIS, 'analyze', $inputType];

        $params = ['analysis_type' => $analysisType, 'uri' => $uri, 'parameters' => $parameters];

        return $this->apiV2Client->postJsonAsync($endPoint, $params);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * This file is part of the Cloudinary PHP package.
 *
 * (c) Cloudinary
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Cloudinary\Api\Admin;

use Cloudinary\Api\ApiClient;
use Cloudinary\Api\ApiResponse;
use GuzzleHttp\Promise\PromiseInterface;

/**
 * Represents Analysis API methods.
 *
 * @property ApiClient $apiV2Client Defined in AdminApi class.
 *
 * @api
 */
trait AnalysisTrait
{
    /**
     * Analyzes an asset with the requested analysis type.
     *
     * @param string $inputType    The type of input for the asset to analyze ('uri').
     * @param string $analysisType The type of analysis to run ('google_tagging', 'captioning', 'fashion').
     * @param string $uri          The URI of the asset to analyze.
     * @param array  $parameters   Additional parameters.
     *
     *
     * @return ApiResponse
     *
     * @see AdminApi::analyzeAsync()
     *
     * @see https://cloudinary.com/documentation/media_analyzer_api_reference
     */
    public function analyze($inputType, $analysisType, $uri = null, $parameters = null)
    {
        return $this->analyzeAsync($inputType, $analysisType, $uri, $parameters)->wait();
    }

    /**
     * Analyzes an asset with the requested analysis type asynchronously.
     *
     * @param string $inputType    The type of input for the asset to analyze ('uri').
     * @param string $analysisType The type of analysis to run ('google_tagging', 'captioning', 'fashion').
     * @param string $uri          The URI of the asset to analyze.
     * @param array  $parameters   Additional parameters.
     *
     * @return PromiseInterface
     *
     * @see https://cloudinary.com/documentation/media_analyzer_api_reference
     */
    public function analyzeAsync($inputType, $analysisType, $uri = null, $parameters = null)
    {
        $endPoint = [ApiEndPoint::ANALYSIS, 'analyze', $inputType];

        $params = ['analysis_type' => $analysisType, 'uri' => $uri, 'parameters' => $parameters];

        return $this->apiV2Client->postJsonAsync($endPoint, $params);
    }
}

Function Calls

None

Variables

None

Stats

MD5 8b69e24c231f1c8e38e84604ebdc78fb
Eval Count 0
Decode Time 90 ms