PHP Classes

File: src/App/Metadata/InputData.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   src/App/Metadata/InputData.php   Download  
File: src/App/Metadata/InputData.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: 6 months ago
Size: 1,445 bytes
 

Contents

Class file image Download
<?php

/**
 * InputData.php
 *
 * Input data to query the metadata reader.
 *
 * @package jaxon-core
 * @author Thierry Feuzeu <thierry.feuzeu@gmail.com>
 * @copyright 2024 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\App\Metadata;

use
ReflectionClass;

use function
is_string;

class
InputData
{
   
/**
     * @var ReflectionClass
     */
   
private $xReflectionClass;

   
/**
     * @param ReflectionClass|string $xClass
     * @param array $aMethods
     * @param array $aProperties
     */
   
public function __construct(ReflectionClass|string $xClass,
        private array
$aMethods = [], private array $aProperties = [])
    {
       
$this->xReflectionClass = is_string($xClass) ?
            new
ReflectionClass($xClass) : $xClass;
    }

   
/**
     * Get the reflection class
     *
     * @return ReflectionClass
     */
   
public function getReflectionClass(): ReflectionClass
   
{
        return
$this->xReflectionClass;
    }

   
/**
     * The methods to check for metadata
     *
     * @return array
     */
   
public function getMethods(): array
    {
        return
$this->aMethods;
    }

   
/**
     * The properties to check for metadata
     *
     * @return array
     */
   
public function getProperties(): array
    {
        return
$this->aProperties;
    }
}