Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mautic.corals.io/vendor/jms/serializer/src/Expression/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mautic.corals.io/vendor/jms/serializer/src/Expression/Expression.php
<?php

declare(strict_types=1);

namespace JMS\Serializer\Expression;

use Symfony\Component\ExpressionLanguage\ParsedExpression as BaseExpression;
use Symfony\Component\ExpressionLanguage\SerializedParsedExpression;

/**
 * @author Asmir Mustafic <[email protected]>
 */
class Expression implements \Serializable
{
    /**
     * @var BaseExpression
     */
    private $expression;

    public function __construct(BaseExpression $expression)
    {
        $this->expression = $expression;
    }

    public function getExpression(): BaseExpression
    {
        return $this->expression;
    }

    /**
     * @return string
     *
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation
     */
    public function __toString()
    {
        return (string) $this->expression;
    }

    /**
     * @return string
     *
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation
     */
    public function serialize()
    {
        return serialize([(string) $this->expression, serialize($this->expression->getNodes())]);
    }

    /**
     * @param string $str
     *
     * @return void
     *
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation
     */
    public function unserialize($str): void
    {
        $this->expression = new SerializedParsedExpression(...unserialize($str));
    }

    public function __serialize(): array
    {
        return [(string) $this->expression, $this->expression->getNodes()];
    }

    public function __unserialize(array $data): void
    {
        [$expression, $nodes] = $data;
        $this->expression = new BaseExpression($expression, $nodes);
    }
}

Spamworldpro Mini