Added base files, with the basic ability to add/remove variables from the Runtime.
This commit is contained in:
parent
aef02c4bff
commit
7e5207c45a
19 changed files with 906 additions and 0 deletions
31
src/RTEX/Classes/Validate.php
Normal file
31
src/RTEX/Classes/Validate.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace RTEX\Classes;
|
||||
|
||||
use Exception;
|
||||
use RTEX\Abstracts\VariableTypes;
|
||||
use RTEX\Interfaces\InstructionInterface;
|
||||
|
||||
class Validate
|
||||
{
|
||||
/**
|
||||
* Determines if the input is a supported variable type
|
||||
*
|
||||
* @param $type
|
||||
* @return bool
|
||||
*/
|
||||
public static function supportedVariableType($type): bool
|
||||
{
|
||||
try
|
||||
{
|
||||
Utilities::determineType($type);
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
unset($e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue