PHPackages                             it-all/pageflow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. it-all/pageflow

ActiveLibrary[Framework](/categories/framework)

it-all/pageflow
===============

Pageflow initializes a PHP page controller app with important PHP settings, a custom error handler, optional PHPMailer access, optional PostGreSQL database connection (PHP pgsql extension required).

v1.0.1(1mo ago)1221[1 PRs](https://github.com/it-all/pageflow/pulls)GPL-3.0PHPPHP &gt;=7.3

Since Dec 11Pushed 1mo agoCompare

[ Source](https://github.com/it-all/pageflow)[ Packagist](https://packagist.org/packages/it-all/pageflow)[ RSS](/packages/it-all-pageflow/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (22)Used By (0)

Pageflow
========

[](#pageflow)

Pageflow initializes a PHP page controller app with important PHP settings, a custom error handler, optional authentication and autorhization using PHP-Auth, optional emailing using PHPMailer, optional PDO (PDO extensions required), optional PostgreSQL database connection (PHP pgsql extension required).

Why Page Controller?
--------------------

[](#why-page-controller)

Small and medium sized web apps may not need the overhead of front controlled [frameworks](https://toys.lerdorf.com/the-no-framework-php-mvc-framework). Request routing in front controllers adds a layer of abstraction and complexity that can be eliminated by a simple page controller model, with only 1 required file at the top of each page to provide initialization settings and access to commonly used features.

Requirements
------------

[](#requirements)

PHP 7.3+

Installation &amp; Usage
------------------------

[](#installation--usage)

```
$ composer require it-all/pageflow

```

Copy .env.example to .env in your top level directory, and edit the settings.

Add the following code to the top of your php file(s):

```
use Pageflow\Pageflow;

define('ROOT_DIR',  dirname(__DIR__));
define('VENDOR_DIR', ROOT_DIR . '/vendor');
require VENDOR_DIR . '/autoload.php';

$pageflow = Pageflow(ROOT_DIR);

```

Or create an init.php file with the code above and require it at the top of your php file(s).

phpdotenv
---------

[](#phpdotenv)

To access phpdotenv in order to validate your own environmental variables:

```
$dotEnv = $pageflow->getDotEnv();

```

Custom Error Handler
--------------------

[](#custom-error-handler)

Handles as many PHP errors and uncaught exceptions as possible. Provides a stack trace to help debug.

1. Display

- Does not display errors on production server.
- Optionally displays errors on test servers.

2. Log

- Logs to file configured in .env.

3. Email

- Emails errors to webmaster configured in .env.
- Throttles email rate to 10 per hour max (otherwise emails on every page load can cause server slowdown).

PHPMailer
---------

[](#phpmailer)

Set appropriate .env vars to instantiate a helpful service layer object called $emailer. Then access with:

```
$emailer = $pageflow->getEmailer();

```

then:

```
$emailer->send('Subject', 'Body', ['self@example.com']);

```

PHP-Auth
--------

[](#php-auth)

Follow the [database table creation instructions](https://github.com/delight-im/PHP-Auth) to enable. Requires PDO.
To access use:

```
$auth = $pageflow->getAuth();

```

PDO
---

[](#pdo)

Set the connection string var in .env to connect to a database using PDO. Note that this is required for Auth.
To access use:

```
$pdo = $pageflow->getPDO();

```

PostgreSQL Database
-------------------

[](#postgresql-database)

Set the connection string var in .env to instantiate a helpful service layer object, which includes a Query Builder. Use that to run queries, or the connection resource to query using native PHP pg functions.

```
$postgres = $pageflow->getPostgres();
$pgConn = $pageflow->getPgConn();

```

Session
-------

[](#session)

Set the SESSION\_TTL\_MINUTES var in .env to start a secure PHP session.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance89

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Recently: every ~19 days

Total

21

Last Release

56d ago

Major Versions

v0.79 → v1.02026-02-17

PHP version history (2 changes)v0.5PHP &gt;=7.1

v0.6PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/210b9a819169a8f86bb503dfe937f9e7618fd2bd573005f6c7b9d21265043b1e?d=identicon)[it-all](/maintainers/it-all)

---

Top Contributors

[![it-all](https://avatars.githubusercontent.com/u/5783938?v=4)](https://github.com/it-all "it-all (46 commits)")

---

Tags

phpframeworkmicroinitializer

### Embed Badge

![Health badge](/badges/it-all-pageflow/health.svg)

```
[![Health](https://phpackages.com/badges/it-all-pageflow/health.svg)](https://phpackages.com/packages/it-all-pageflow)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
