<commit_before># Altaform



## About
Altaform is a small, simple, lightweight micro-framework for PHP web
applications. Altaform handles HTML templates, database connectivity,
$\_GET/$\_POST reading, URL routing, error logging, and more automatically.
Altaform strives to be a zero-boilerplate framework focusing entirely
on allowing developers to jump in to create simplistic and clean PHP
code without worrying about what classes need to be inherited or what
methods need overwritten. Altaform allows for traditional minimalistic
procedural PHP programming while still having many of the same benefits
of a modern PHP framework.




## License
This software library is licensed under the BSD 2-clause license, and may be
freely used in any project (commercial, freelance, hobby, or otherwise) which
is compatible with this license. See
[LICENSE](https://github.com/darkain/altaform/blob/master/LICENSE)
for more details.




## Compatibility
Altaform is actively tested and used in production on PHP 7.2 and HHVM 3.24.

Altaform should work as far back as PHP 5.4, but this is no longer actively
used in production. Altaform heavily relies upon new features introduced in
PHP 5.4, therefor will NOT work on any version of PHP prior to 5.4.

Altaform may work on versions of HHVM prior to 3.12, but it is highly
discouraged. During Altaform development, a countless number of bugs have been
discovered and reported in the HHVM interpreter that directly affected this
project. As such, Altaform is not guaranteed to function properly on earlier
versions of HHVM prior to 3.24.




## Modules
Path | Library | Usage
-----|---------|------
[\_altaform](https://github.com/darkain/altaform-core) | Altaform Core | URL router, user access
[\_getvar](https://github.com/darkain/getvar) | GetVar | Handler for $\_GET/$\_POST data
[\_pudl](https://github.com/darkain/pudl) | PHP Universal Database Library (PUDL) | DB connection and SQL query generator/processor
[\_tbx](https://github.com/darkain/TinyButXtreme) | TinyButExtreme (TBX) | HTML5 template processor




## Global Variables
Name | Library | Usage | Documentation
-----|---------|-------|--------------
$af | Altaform Core & TBX | Instance of the [altaform](https://github.com/darkain/altaform-core/blob/master/_altaform.inc.php) class, inherits [tbx](https://github.com/darkain/TinyButXtreme/blob/master/tbx_class.php.inc) class | [Documentation](https://github.com/darkain/altaform-core/blob/master/README.md)
$afurl | Altaform Core | Instance of the [afurl](https://github.com/darkain/altaform-core/blob/master/core/afUrl.inc.php) class
$user | Altaform Core | Instance of the [af_user](https://github.com/darkain/altaform-core/blob/master/core/afUser.inc.php) class
$get | GetVar | Instance of the [getvar](https://github.com/darkain/getvar/blob/master/getvar.inc.php) class | [Documentation](https://github.com/darkain/getvar/blob/master/README.md)
$db | PUDL | Instance of one of the [pudl](https://github.com/darkain/pudl/blob/master/pudl.php) classes (depends on database type) | [Documentation](https://github.com/darkain/pudl/blob/master/README.md)




## Getting Started
These instructions assume a basic LAMP stack (Linux + Apache + MySQL + PHP),
however in production we actively have variations of each of these in use.
Altaform has been tested on Linux, FreeBSD and SmartOS for the operating system,
Apache, Nginx, and Lighttpd for the web server, MySQL, MariaDB, and SQLite for
the database, and PHP 5.x, PHP 7, and HHVM for the interpreter. These examples
listed below have been tested and work with the
[TurnKey Linux LAMP appliance](https://www.turnkeylinux.org/lampstack)
running under VMWare vSphere, but should be the same on any LAMP stack setup
with **mod_rewrite** enabled and the document root in **/var/www**.

By default, TurnKey LAMP has some problematic modules enabled, and required<commit_msg>Updating class names in README.md<commit_after># Altaform



## About
Altaform is a small, simple, lightweight micro-framework for PHP web
applications. Altaform handles HTML templates, database connectivity,
$\_GET/$\_POST reading, URL routing, error logging, and more automatically.
Altaform strives to be a zero-boilerplate framework focusing entirely
on allowing developers to jump in to create simplistic and clean PHP
code without worrying about what classes need to be inherited or what
methods need overwritten. Altaform allows for traditional minimalistic
procedural PHP programming while still having many of the same benefits
of a modern PHP framework.




## License
This software library is licensed under the BSD 2-clause license, and may be
freely used in any project (commercial, freelance, hobby, or otherwise) which
is compatible with this license. See
[LICENSE](https://github.com/darkain/altaform/blob/master/LICENSE)
for more details.




## Compatibility
Altaform is actively tested and used in production on PHP 7.2 and HHVM 3.24.

Altaform should work as far back as PHP 5.4, but this is no longer actively
used in production. Altaform heavily relies upon new features introduced in
PHP 5.4, therefor will NOT work on any version of PHP prior to 5.4.

Altaform may work on versions of HHVM prior to 3.12, but it is highly
discouraged. During Altaform development, a countless number of bugs have been
discovered and reported in the HHVM interpreter that directly affected this
project. As such, Altaform is not guaranteed to function properly on earlier
versions of HHVM prior to 3.24.




## Modules
Path | Library | Usage
-----|---------|------
[\_altaform](https://github.com/darkain/altaform-core) | Altaform Core | URL router, user access
[\_getvar](https://github.com/darkain/getvar) | GetVar | Handler for $\_GET/$\_POST data
[\_pudl](https://github.com/darkain/pudl) | PHP Universal Database Library (PUDL) | DB connection and SQL query generator/processor
[\_tbx](https://github.com/darkain/TinyButXtreme) | TinyButExtreme (TBX) | HTML5 template processor




## Global Variables
Name | Library | Usage | Documentation
-----|---------|-------|--------------
$af | Altaform Core & TBX | Instance of the [altaform](https://github.com/darkain/altaform-core/blob/master/_altaform.inc.php) class, inherits [tbx](https://github.com/darkain/TinyButXtreme/blob/master/tbx_class.php.inc) class | [Documentation](https://github.com/darkain/altaform-core/blob/master/README.md)
$afurl | Altaform Core | Instance of the [afUrl](https://github.com/darkain/altaform-core/blob/master/core/afUrl.inc.php) class
$user | Altaform Core | Instance of the [afUser](https://github.com/darkain/altaform-core/blob/master/core/afUser.inc.php) class
$get | GetVar | Instance of the [getvar](https://github.com/darkain/getvar/blob/master/getvar.inc.php) class | [Documentation](https://github.com/darkain/getvar/blob/master/README.md)
$db | PUDL | Instance of one of the [pudl](https://github.com/darkain/pudl/blob/master/pudl.php) classes (depends on database type) | [Documentation](https://github.com/darkain/pudl/blob/master/README.md)




## Getting Started
These instructions assume a basic LAMP stack (Linux + Apache + MySQL + PHP),
however in production we actively have variations of each of these in use.
Altaform has been tested on Linux, FreeBSD and SmartOS for the operating system,
Apache, Nginx, and Lighttpd for the web server, MySQL, MariaDB, and SQLite for
the database, and PHP 5.x, PHP 7, and HHVM for the interpreter. These examples
listed below have been tested and work with the
[TurnKey Linux LAMP appliance](https://www.turnkeylinux.org/lampstack)
running under VMWare vSphere, but should be the same on any LAMP stack setup
with **mod_rewrite** enabled and the document root in **/var/www**.

By default, TurnKey LAMP has some problematic modules enabled, and required
{'fraction_non_alphanumeric': 0.10422824829713405, 'fraction_numerical': 0.005397763783575376, 'mean_word_length': 4.396671289875173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 30, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3325836', 'n_tokens_mistral': 2360, 'n_tokens_neox': 2223, 'n_words': 873}