PHPackages                             fusionary/craftcms-bootstrap - 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. fusionary/craftcms-bootstrap

ActiveLibrary[Framework](/categories/framework)

fusionary/craftcms-bootstrap
============================

Craft CMS Bootstrap

2.0.0(8y ago)4485MITPHPPHP &gt;=7.1.0

Since Feb 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/timkelty/craftcms-bootstrap)[ Packagist](https://packagist.org/packages/fusionary/craftcms-bootstrap)[ RSS](/packages/fusionary-craftcms-bootstrap/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (23)Used By (0)

Craft CMS Bootstrap
===================

[](#craft-cms-bootstrap)

[![Boot by Ben Davis from the Noun Project](resources/boot-logo.svg)](resources/boot-logo.svg)

What it does
------------

[](#what-it-does)

Reduces boilerplate for bootstrapping and configuration by abstracting common tasks to a simple api. Used by [Fusionary's Craft CMS Boilerplate](https://github.com/timkelty/craftcms-boilerplate).

### Bootstrap

[](#bootstrap)

> e.g `@webroot/index.php`

- Reduces your app bootstrap boilerplate code to a single chainable statement.
    - This is especially helpful for achieving consistency when dealing with multiple access points (e.g. [multi-site](https://craftcms.com/news/craft-3-multi-site), [console app](https://craftcms.com/classreference/etc/console/ConsoleApp))
- Sets [PHP constants](https://github.com/craftcms/docs/blob/v3/en/configuration.md#php-constants), with sensible fallbacks.
- Gracefully loads .env file environment variables.

### Configuration files

[](#configuration-files)

> e.g. `@root/config/general.php` or any [configuration files](https://docs.craftcms.com/api/v3/craft-config-generalconfig.html#properties)

- Retrieves environment variables with fallbacks and [content-aware type conversion](https://github.com/jpcercal/environment#examples). For example:
    - `export MY_BOOL=true` → `bool`
    - `export MY_INT=3` → `int`
- Provides access to HTTP request headers (via `yii\web\Request`), should your configuration rely on it.
- Provides method to map your entire config to any matching/prefixed environment variables.
    - For example, `$config['allowAutoUpdates']` will match `CRAFT_ALLOW_AUTO_UPDATES` from environment

Prerequisites
-------------

[](#prerequisites)

```
"php": ">=7.1.0",
"craftcms/cms": "^3.0.0-RC1",

```

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

[](#installation)

```
composer require fusionary/craftcms-bootstrap

```

API Documentation
-----------------

[](#api-documentation)

[Class Reference / API Documentation](http://htmlpreview.github.io/?https://github.com/timkelty/craftcms-bootstrap/blob/master/docs/api/fusionary-craftcms-bootstrap-bootstrap.html)

Examples
--------

[](#examples)

### Web app

[](#web-app)

> e.g. `@root/public/index.php`

```
