Make the project compatible with PHP8

This commit is contained in:
Fedor A. Fetisov 2021-07-09 21:34:54 +03:00
parent 91b4d067c9
commit a29ea00c29
2 changed files with 39 additions and 1 deletions

View File

@ -12,11 +12,12 @@ namespace Canteen\HTML5
* echo html('br'); * echo html('br');
* *
* @class Node * @class Node
* @extends Proto
* @constructor * @constructor
* @param {String} [tag=null] The name of the tag * @param {String} [tag=null] The name of the tag
* @param {Array|String} [attributes=null] The collection of tag attributes * @param {Array|String} [attributes=null] The collection of tag attributes
*/ */
class Node class Node extends Proto
{ {
/** /**
* The string name of the tag * The string name of the tag

37
src/Proto.php Normal file
View File

@ -0,0 +1,37 @@
<?php
/**
* @module Canteen\HTML5
*/
namespace Canteen\HTML5
{
/**
* Prototype class for all Canteen\HTML5 entities
*
* @class Proto
* @constructor
* @param {String} text the plain text string
*/
class Proto
{
/**
* General purpose getter to get attribute values
* @method __get
* @param {String} name The name of the property to set
*/
public function __get($name)
{
return null;
}
/**
* See if a property exists
* @method __isset
* @param {String} name The name of the attribute
*/
public function __isset($name)
{
return null;
}
}
}