Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixgirault/cakephp-essence
No longer maintained.
https://github.com/felixgirault/cakephp-essence
Last synced: about 2 months ago
JSON representation
No longer maintained.
- Host: GitHub
- URL: https://github.com/felixgirault/cakephp-essence
- Owner: felixgirault
- Created: 2013-01-16T12:34:54.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-08T13:08:40.000Z (almost 11 years ago)
- Last Synced: 2024-05-01T12:40:49.187Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Essence for CakePHP
===================A plugin to use the [essence library](https://github.com/felixgirault/essence "Essence on github") within controllers.
Installation
------------Just use composer from the app folder of your CakePHP installation:
```json
{
"minimum-stability": "dev",
"require": {
"fg/cakephp-essence": "dev-master"
},
"config": {
"vendor-dir": "Vendor"
}
}```
The plugin will be installed into `Plugins/`, thanks to composer's CakePHP installer, and the Essence library will be installed into `Vendor/`.
You should then load the plugin in `Config/bootstrap.php`:
```php
CakePlugin::load([
'Essence' => [
'bootstrap' => true
]
]);
```Component
---------```php
class MyController extends AppController {public $components = [ 'Essence.Essence' ];
/**
* All methods of the Essence class are available through the Essence component.
*
* @see https://github.com/felixgirault/essence/blob/master/lib/fg/Essence/Essence.php
*/
public function embed( $url ) {$this->set( 'media', $this->Essence->embed( $url ));
}
}
```Behavior
--------```php
class MyModel extends AppModel {public $actsAs = [ 'Essence.Embeddable' ];
}
```