PHPackages                             toadsuck/core - 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. toadsuck/core

ActiveLibrary[Framework](/categories/framework)

toadsuck/core
=============

Front controller and other core libraries used by the Toadsuck project.

1.3.2(11y ago)31683[2 issues](https://github.com/toadsuck/toadsuck-core/issues)1MITPHPPHP &gt;= 5.4

Since Jan 27Pushed 11y ago2 watchersCompare

[ Source](https://github.com/toadsuck/toadsuck-core)[ Packagist](https://packagist.org/packages/toadsuck/core)[ Docs](https://github.com/toadsuck/toadsuck-core)[ RSS](/packages/toadsuck-core/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (8)Versions (20)Used By (1)

Toadsuck.Core
=============

[](#toadsuckcore)

Core libraries for the [Toadsuck Project](http://toadsuck.github.io)
--------------------------------------------------------------------

[](#core-libraries-for-the-toadsuck-project)

[![Build Status](https://camo.githubusercontent.com/f9a50054afc5d5e5c7839a5d5b8d5d9771cf64066fbc7f70cc9580394a9a9215/68747470733a2f2f7472617669732d63692e6f72672f746f61647375636b2f746f61647375636b2d636f72652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/toadsuck/toadsuck-core) [![Total Downloads](https://camo.githubusercontent.com/370bfd4d0d5f6a325093a4d835d35b7c20e56746ae6d6ea0475a09d072b2a832/68747470733a2f2f706f7365722e707567782e6f72672f746f61647375636b2f636f72652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/toadsuck/core) [![Latest Stable Version](https://camo.githubusercontent.com/015f1366aa8c818d400a714c38ea404c8b174086905b80a1f3c1c1c19dae0d20/68747470733a2f2f706f7365722e707567782e6f72672f746f61647375636b2f636f72652f762f737461626c652e706e67)](https://packagist.org/packages/toadsuck/core)

- Routing - [Aura.Router](https://github.com/auraphp/Aura.Router)
- HTTP Abstraction - [Symfony\\HttpFoundation](https://github.com/symfony/HttpFoundation)
- Templates - [Plates Native PHP Templates](http://platesphp.com/)
- Database Abstraction - [Illuminate\\Database](https://github.com/illuminate/database)
- Configuration Management - [FuelPHP\\Config](https://github.com/fuelphp/config)
- Unit Tests - [PHPUnit](https://github.com/sebastianbergmann/phpunit) (of course, why use anything else?)

Learn more at [The Toadsuck Project](http://toadsuck.github.io) or see [Toadsuck.Skeleton](https://github.com/toadsuck/toadsuck-skeleton) for a reference implementation.

Installation
------------

[](#installation)

Installation of this package is easy with Composer. If you aren't familiar with the Composer Dependency Manager for PHP, [you should read this first](https://getcomposer.org/doc/00-intro.md).

If you don't already have [Composer](https://getcomposer.org) installed (either globally or in your project), you can install it like this:

```
$ curl -sS https://getcomposer.org/installer | php
```

Create a file named composer.json someplace (usually in the root of your project) with the following content.

```
{
	"require": {
		"toadsuck/core": "dev-master"
	}
}
```

Suggested Directory Structure
-----------------------------

[](#suggested-directory-structure)

- Your application resides in `src/` and has a base namespace of `Example\Project`
- Your controllers are in `src/controllers/` and have a namespace of `Example\Project\Controllers`
    - Your controllers extend `Toadsuck\Core\Controller`

```
src/
	config/
		local/
			config.php
		test/
		prod/
		config.php
		routes.php
	controllers/
		Home.php
	models/
	views/
		home/
			index.php
		layouts/
			default.php
vendor/
	Composer's installation directory
web/
	index.php
	composer.json

```

Front Controller
----------------

[](#front-controller)

Your `web/index.php` serves as the front controller and contains the following content:

```
