PHPackages                             cakephp-plugin/sledgehammer - 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. cakephp-plugin/sledgehammer

ActiveCakephp-plugin

cakephp-plugin/sledgehammer
===========================

CakePHP plugin: Use the Sledgehammer Framework as a library in a CakePHP 2.x project.

13.09.0(12y ago)2668CC-BY-SA-3.0PHP

Since Oct 18Pushed 12y ago5 watchersCompare

[ Source](https://github.com/sledgehammer/CakePHP-Sledgehammer-Plugin)[ Packagist](https://packagist.org/packages/cakephp-plugin/sledgehammer)[ RSS](/packages/cakephp-plugin-sledgehammer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

Sledgehammer as CakePHP 2.x plugin
==================================

[](#sledgehammer-as-cakephp-2x-plugin)

Intergrates the Sledgehammer Framework into an CakePHP 2.x project

1. Installation with [Composer](http://getcomposer.org/)
--------------------------------------------------------

[](#1-installation-with-composer)

```
composer.phar require sledgehammer/cakephp-plugin

```

### Manual installation

[](#manual-installation)

#### Add the plugin

[](#add-the-plugin)

Place this plugin into the "app/Plugin/Sledgehammer/" folder. `git submodule add git://github.com/sledgehammer/CakePHP-Sledgehammer-Plugin.git app/Plugin/Sledgehammer`

#### Add Sledgehammer

[](#add-sledgehammer)

Place the "sledgehammer" folder in the "app/Vendor/" folder: `git submodule add git://github.com/sledgehammer/core.git app/Vendor/sledgehammer/core`

Your project folder should look like this:

- app/
    - composer.json
    - Plugin/
        - Sledgehammer/
            - Readme.md (this file)
            - ...
    - Vendor/
        - sledgehammer/
            - core/
- lib/
    - Cake/

2. Activate plugin
------------------

[](#2-activate-plugin)

Modify your app/Config/bootstrap.php to include:

```
// define current environent in code or add "SetEnv APPLICATION_ENV development" to your httpd.conf or .htaccess
define('ENVIRONMENT', 'development');
// Override the e-mailaddres to whom the error-reports are sent in production mode or rely on the SERVER_ADMIN in httpd.conf/.htaccess
$_SERVER['SERVER_ADMIN'] = 'you@example.com';
CakePlugin::load('Sledgehammer', array('bootstrap' => true));
```

3. Activate goodies
-------------------

[](#3-activate-goodies)

### Sledgehammer Database

[](#sledgehammer-database)

Upgrade your datasource in `APP/Config/database.php` from `Database/Mysql` into `Sledgehammer.Database/SledgehammerMysql`

Default to UTF-8 encoding and reports sql warnings &amp; notices.

### Sledgehammer statusbar

[](#sledgehammer-statusbar)

Add the statusbar element just before the `` tag in your /Layout/default.ctp.

```
