PHP Classes

File: src/Script/Action/SimpleValue.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   src/Script/Action/SimpleValue.php   Download  
File: src/Script/Action/SimpleValue.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change:
Date: 4 months ago
Size: 720 bytes
 

Contents

Class file image Download
<?php

/**
 * SimpleValue.php
 *
 * An simple value that will be inserted in the call as is.
 *
 * @package jaxon-core
 * @copyright 2025 Thierry Feuzeu <thierry.feuzeu@gmail.com>
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
 * @link https://github.com/jaxon-php/jaxon-core
 */

namespace Jaxon\Script\Action;

class
SimpleValue extends TypedValue
{
   
/**
     * @param mixed $xValue
     */
   
public function __construct(private mixed $xValue)
    {}

   
/**
     * @inheritDoc
     */
   
public function getType(): string
   
{
        return
'_';
    }

   
/**
     * @return mixed
     */
   
public function jsonSerialize(): mixed
   
{
        return
$this->xValue;
    }
}