Molecule
extends Atom
in package
Description of Molecule.
Tags
Table of Contents
- $debug : bool
- Debug mode flag.
- $objectName : string
- Object name.
- __toString() : string
- Magical function for all descendants (childern).
- draw() : string
- Default draw method.
- getObjectName() : string
- Returns the name of the object.
- setObjectName() : string
- Set object name.
- setupBoolProperty() : void
- Set up one of the properties by 1) array 2) ENV 3) Constant to bool value.
- setupIntProperty() : void
- Set up one of the properties by 1) array 2) ENV 3) Constant to int value.
- setupProperty() : void
- Set up one of the properties by 1) array 2) ENV 3) Constant.
Properties
$debug
Debug mode flag.
public
bool
$debug
= false
$objectName
Object name.
public
string
$objectName
= 'Molecule'
Methods
__toString()
Magical function for all descendants (childern).
public
__toString() : string
Return values
string —draw()
Default draw method.
public
draw() : string
Return values
string —getObjectName()
Returns the name of the object.
public
getObjectName() : string
Return values
string —setObjectName()
Set object name.
public
setObjectName([string $objectName = null ]) : string
Parameters
- $objectName : string = null
Return values
string —Object name
setupBoolProperty()
Set up one of the properties by 1) array 2) ENV 3) Constant to bool value.
public
setupBoolProperty(array<string, string> $options, string $name[, string $constant = '' ]) : void
Parameters
- $options : array<string, string>
-
array of given availble properties
- $name : string
-
name of property to set up
- $constant : string = ''
-
load default property value from constant / ENV
Return values
void —setupIntProperty()
Set up one of the properties by 1) array 2) ENV 3) Constant to int value.
public
setupIntProperty(array<string, string> $options, string $name[, string $constant = '' ]) : void
Parameters
- $options : array<string, string>
-
array of given available properties
- $name : string
-
name of property to set up
- $constant : string = ''
-
load default property value from constant / ENV
Return values
void —setupProperty()
Set up one of the properties by 1) array 2) ENV 3) Constant.
public
setupProperty(array<string, string> $options, string $name[, string $constant = '' ]) : void
Parameters
- $options : array<string, string>
-
array of given available properties
- $name : string
-
name of property to set up
- $constant : string = ''
-
load default property value from constant / ENV