PHP Classes

File: examples/kernel/core/TObject/example1.php

Recommend this page to a friend!
  Packages of Christos Drogidis   Ascoos OS   examples/kernel/core/TObject/example1.php   Download  
File: examples/kernel/core/TObject/example1.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Ascoos OS
A PHP Web 5.0 Kernel for decentralized web and IoT
Author: By
Last change: Update of examples/kernel/core/TObject/example1.php
Date: 8 months ago
Size: 670 bytes
 

Contents

Class file image Download
<?php
/**
 * Example: Use of TObject in Ascoos OS
 * @ASCOOS-NAME : Ascoos OS
 * @ASCOOS-VERSION : 26.0.0
 * @ASCOOS-SUPPORT : support@ascoos.com
 * @ASCOOS-BUGS : https://issues.ascoos.com
 * @since PHP 8.2.0
 */
use ASCOOS\OS\Kernel\Core\TObject;

$object = new TObject([
   
'version' => 2400070000,
   
'MinPHPVersion' => 80200
]);
echo
$object->getClassVersion(); // Display: 2400070000
echo $object->__toString(); // Display: TObject
$object->setProperty('custom', 'value');
var_dump($object->getProperty('custom')); // Display: string(5) "value"
if ($object->isExecutable(260000, PHP_VERSION_ID)) {
    echo
"The class is executable!";
}
?>