Databases

Docs | Databases

MySQL and SQLite data connections.

There are a range if support structures which including query, insert, update, create and maintenance. All fully encapsulated including escaping of values.

Data Access Objects manipulate Data Tranition Objects

DAO - Data Access Object

A Data Access Object is an Intelligent Interface to a Data Layer

Element Description
NameSpace dao
Root Class _dao
src src/dao/_dao.php
DAO - example
namespace dao;

class users extends _dao {
    protected $_db_name = 'users';

}
DTO - Data Transition Object

A Data Transition Object is an unIntelligent Data Structure, it must be serializable and transportable. It is not desirable to subclasses, as that will threaten the portability of the element

Element Description
NameSpace dao
Root Class _dao
src src/dao/dto/_dto.php
DTO - Example of Use
$dao = new dao\users;
if ( $res = $dao->getAll()) {
    while ( $dto = $res->dto()) {
        printf( '%s<br />', $dto->name);

    }

}