<commit_before># PhpStratum

A stored procedure loader and wrapper class generator for MySQL in PHP.

<table>
<thead>
<tr>
<th>Social</th>
<th>Legal</th>
<th>Release</th>
<th>Tests</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="https://gitter.im/SetBased/php-stratum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/SetBased/php-stratum.svg" alt="Gitter"/></a>
</td>
<td>
<a href="https://packagist.org/packages/setbased/php-stratum"><img src="https://poser.pugx.org/setbased/php-stratum/license" alt="License"/></a>
</td>
<td>
<a href="https://packagist.org/packages/setbased/php-stratum"><img src="https://poser.pugx.org/setbased/php-stratum/v/stable" alt="Latest Stable Version"/></a><br/>
<a href="https://www.versioneye.com/user/projects/56c9d79918b27104252dcca1"><img src="https://www.versioneye.com/user/projects/56c9d79918b27104252dcca1/badge.svg?style=flat" alt="Dependency Status"/></a>
</td>
<td><a href="https://travis-ci.org/SetBased/php-abc-url"><img src="https://travis-ci.org/SetBased/php-abc-url.svg?branch=master" alt="Build Status"/></a><br/>
<a href="https://scrutinizer-ci.com/g/SetBased/php-stratum/?branch=master"><img src="https://scrutinizer-ci.com/g/SetBased/php-stratum/badges/coverage.png?b=master" alt="Code Coverage"/></a><br/>
</td>
<td>
<a href="https://scrutinizer-ci.com/g/SetBased/php-stratum/?branch=master"><img src="https://scrutinizer-ci.com/g/SetBased/php-stratum/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality"/></a><br/>
<a href="https://travis-ci.org/SetBased/php-stratum"><img src="http://php7ready.timesplinter.ch/SetBased/php-stratum/badge.svg" alt="PHP 7 ready"/></a>
</td>
</tr>
</tbody>
</table>

# Overview
PhpStratum is a tool and library with the following mayor functionalities:  
* Loading modified and new stored routines and removing obsolete stored routines into/from a MySQL instance. This MySQL instance can be part of your development or a production environment. 
* Enhancing the (limited) syntax of MySQL stored routines with constants and custom types (based on actual table columns).
* Generating automatically a PHP wrapper class for calling your stored routines. This wrapper class takes care about error handing and prevents SQL injections.
* Defining PHP constants based on auto increment columns and column widths.

# Example
We give an example based on a very simple database model that, nevertheless, will give you a good impression what PhpStratum does.

## Database 
The database model is shown in the image below. It consists of a table for user accounts and a table for the status of each user account.
![Database Model](https://raw.githubusercontent.com/SetBased/php-stratum/gh-pages/images/samples/sample01-model.png)
Table BAR_USER_STATUS is a reference table with static data that holds the following rows:

| ust_id | ust_description | ust_label |<commit_msg>Updated README.md.<commit_after># PhpStratum

A stored procedure loader and wrapper class generator for MySQL in PHP.

<table>
<thead>
<tr>
<th>Social</th>
<th>Legal</th>
<th>Release</th>
<th>Tests</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="https://gitter.im/SetBased/php-stratum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/SetBased/php-stratum.svg" alt="Gitter"/></a>
</td>
<td>
<a href="https://packagist.org/packages/setbased/php-stratum"><img src="https://poser.pugx.org/setbased/php-stratum/license" alt="License"/></a>
</td>
<td>
<a href="https://packagist.org/packages/setbased/php-stratum"><img src="https://poser.pugx.org/setbased/php-stratum/v/stable" alt="Latest Stable Version"/></a><br/>
</td>
<td><a href="https://travis-ci.org/SetBased/php-abc-url"><img src="https://travis-ci.org/SetBased/php-abc-url.svg?branch=master" alt="Build Status"/></a><br/>
<a href="https://scrutinizer-ci.com/g/SetBased/php-stratum/?branch=master"><img src="https://scrutinizer-ci.com/g/SetBased/php-stratum/badges/coverage.png?b=master" alt="Code Coverage"/></a><br/>
</td>
<td>
<a href="https://scrutinizer-ci.com/g/SetBased/php-stratum/?branch=master"><img src="https://scrutinizer-ci.com/g/SetBased/php-stratum/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality"/></a><br/>
<a href="https://travis-ci.org/SetBased/php-stratum"><img src="http://php7ready.timesplinter.ch/SetBased/php-stratum/badge.svg" alt="PHP 7 ready"/></a>
</td>
</tr>
</tbody>
</table>

# Overview
PhpStratum is a tool and library with the following mayor functionalities:  
* Loading modified and new stored routines and removing obsolete stored routines into/from a MySQL instance. This MySQL instance can be part of your development or a production environment. 
* Enhancing the (limited) syntax of MySQL stored routines with constants and custom types (based on actual table columns).
* Generating automatically a PHP wrapper class for calling your stored routines. This wrapper class takes care about error handing and prevents SQL injections.
* Defining PHP constants based on auto increment columns and column widths.

# Example
We give an example based on a very simple database model that, nevertheless, will give you a good impression what PhpStratum does.

## Database 
The database model is shown in the image below. It consists of a table for user accounts and a table for the status of each user account.
![Database Model](https://raw.githubusercontent.com/SetBased/php-stratum/gh-pages/images/samples/sample01-model.png)
Table BAR_USER_STATUS is a reference table with static data that holds the following rows:

| ust_id | ust_description | ust_label |
{'fraction_non_alphanumeric': 0.15295789660685735, 'fraction_numerical': 0.0074613608100906025, 'mean_word_length': 5.290502793296089, 'pattern_counts': {'":': 0, '<': 116, '<?xml version=': 0, '>': 116, 'https://': 30, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1806550', 'n_tokens_mistral': 1956, 'n_tokens_neox': 1865, 'n_words': 478}