PHPackages                             aura/includer - 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. aura/includer

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

aura/includer
=============

Include multiple files from specified directories, in order, with variables extracted into a limited include scope.

2.0.3(9y ago)133.2k4BSD-2-ClausePHPPHP &gt;=5.3.0

Since Jan 1Pushed 9y ago11 watchersCompare

[ Source](https://github.com/auraphp/Aura.Includer)[ Packagist](https://packagist.org/packages/aura/includer)[ Docs](https://github.com/auraphp/Aura.Includer)[ RSS](/packages/aura-includer/feed)WikiDiscussions 2.x Synced 2w ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

Aura.Includer
=============

[](#auraincluder)

Provides a facility to include multiple files from specified directories, in order, with variables extracted into a limited include scope.

Foreword
--------

[](#foreword)

### Installation

[](#installation)

This library requires PHP 5.3 or later; we recommend using the latest available version of PHP as a matter of principle. It has no userland dependencies.

It is installable and autoloadable via Composer as [aura/includer](https://packagist.org/packages/aura/includer).

Alternatively, [download a release](https://github.com/auraphp/Aura.Includer/releases) or clone this repository, then require or include its *autoload.php* file.

### Quality

[](#quality)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5fc3be722a88e82976c52a3743aa2d9e7bd8265ecf423334b26e58e2459d72a3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617572617068702f417572612e496e636c756465722f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f702d32)](https://scrutinizer-ci.com/g/auraphp/Aura.Includer/)[![Code Coverage](https://camo.githubusercontent.com/0b488178bd40093e71e917f9533b98cbeda99b84485e87fea020276375895afa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617572617068702f417572612e496e636c756465722f6261646765732f636f7665726167652e706e673f623d646576656c6f702d32)](https://scrutinizer-ci.com/g/auraphp/Aura.Includer/)[![Build Status](https://camo.githubusercontent.com/afd362881bb99d8684e5bb0ed42038a49dac5a9a15239e8264a05e015e95f1fd/68747470733a2f2f7472617669732d63692e6f72672f617572617068702f417572612e496e636c756465722e706e673f6272616e63683d646576656c6f702d32)](https://travis-ci.org/auraphp/Aura.Includer)

To run the unit tests at the command line, issue `phpunit` at the package root. (This requires [PHPUnit](http://phpunit.de/manual/) to be available as `phpunit`.)

This library attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

### Community

[](#community)

To ask questions, provide feedback, or otherwise communicate with the Aura community, please join our [Google Group](http://groups.google.com/group/auraphp), follow [@auraphp on Twitter](http://twitter.com/auraphp), or chat with us on #auraphp on Freenode.

Getting Started
---------------

[](#getting-started)

### The Example Scenario

[](#the-example-scenario)

Let's say you have a series of packages, modules, plugins, etc. To do its setup work, your framework or foundation needs to include certain files from each of thse modules, such as configuration or routing files.

For our examples, the module directory structure will look like this:

```
modules/
    foo/
        autoload.php
        config/
            default.php
            testing.php
        routes.php
    bar/
        autoload.php
    baz/
        autoload.php
        config/
            default.php

```

An example *autoload.php* file might look like this:

```

```

An example config file might look like this:

```
