PHPackages                             aztech/carnival - 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. aztech/carnival

ActiveLibrary

aztech/carnival
===============

Create static facades from instances

0.1.0(11y ago)020MITPHPPHP &gt;= 5.4

Since Feb 9Pushed 11y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Carnival
========

[](#carnival)

[![Build Status](https://camo.githubusercontent.com/493abf0519a6d42145453c8b35785aa40040c6e9027ce8e93dacf4ba8345842e/68747470733a2f2f7472617669732d63692e6f72672f617a746563682d6469676974616c2f6361726e6976616c2e737667)](https://travis-ci.org/aztech-digital/carnival)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bb988f3a349fb95901c570768ef519af584742988c95d4d8beb352da563bfe91/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f617a746563682d6469676974616c2f6361726e6976616c2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/aztech-digital/carnival/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/8ee5d4c593f425c07044d85ac4f4711daa629bfbefc6c0b2e08767f4c9c348e8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f617a746563682d6469676974616c2f6361726e6976616c2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/aztech-digital/carnival/?branch=master)[![HHVM Support](https://camo.githubusercontent.com/1396cd922912968db0330915e5c61f7b26a5911c73993495257219e702d8a3ac/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f617a746563682f6361726e6976616c2e737667)](http://hhvm.h4cc.de/package/aztech/carnival)

Carnival is a simple library to generate static facades from instance objects. In other words, it takes an object, hides it behind a generated static class, effectively transforming your object into a singleton as long as you access it from the static facade.

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

[](#installation)

[Composer](https://getcomposer.org) is the only supported way of installing and using Carnival. From your project's root directory, run:

```
composer require aztech/carnival

```

You must then include the Composer autoloader in the entry file of your application:

```
