PHPackages                             merlinblack/nigelib - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. merlinblack/nigelib

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

merlinblack/nigelib
===================

A tiny little library for tiny little web apps.

v0.0.6(8y ago)335MITPHPPHP &gt;=5.3.0

Since Aug 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/merlinblack/NigeLib)[ Packagist](https://packagist.org/packages/merlinblack/nigelib)[ Docs](https://github.com/merlinblack/NigeLib)[ RSS](/packages/merlinblack-nigelib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (8)Used By (0)

NigeLib
=======

[](#nigelib)

1st August 2022 *ARCHIVED* - This is pretty old. I'm not maintaining it, and no doubt there are better ways to do these things now.

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Packagist](https://camo.githubusercontent.com/bbb48c25c49d803be8a0600e33ec64983bf15bb18942f04620da982c27fc5aa2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d65726c696e626c61636b2f6e6967656c69622e737667)](https://camo.githubusercontent.com/bbb48c25c49d803be8a0600e33ec64983bf15bb18942f04620da982c27fc5aa2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d65726c696e626c61636b2f6e6967656c69622e737667)

A tiny PHP library for use in tiny little web apps.

AKA my collection of useful little things.

About
-----

[](#about)

Has Laravel style configuration files that can be switched automatically depending on the hostname (or another parameter) of the machine running the code. This basically means you have default settings in a directory, and under that directory, you can optionally have a directory with new or overridden settings for when running on a particular host.

Installing symfony/yaml allows the Config class to also load Yaml files.

The DB connection manager, has SQL query profiling via Aura/Sql if it is also installed. Connections are only initialised when first retrieved, and are configured with the Config class.

The Console class detects where the output is going, to write either plain text, coloured text using ANSI escape sequences, or HTML with CSS classes that you can style as you see fit.

PharBuilder is a class to aid in building command line utilities, as Phar files. See PharBuilder.php &amp; phartest.php for more info.

StaticDelegate can be extended to give convenient static access to an instance of a class, as long as there is some way of retrieving the instance. Two static classes are supplied - ConfigFacade, and DatabaseConnectionManagerFacade.

SimpleTemplate is a class to help with rendering simple templates in the form of PHP code. It does not try to be a templating engine, however for basic separation of view and model it does the job.

Installing
----------

[](#installing)

Via Composer

```
$ composer require merlinblack/nigelib
```

Or use git to clone.

Example usage
-------------

[](#example-usage)

This is how you would retrieve a PDO connection which is configured in a `config` or `localconfig` directory.

```
