2017 © Pedro PelĂĄez
 

library essence-interfaces

Provides interfaces to use external libraries with Essence.

image

fg/essence-interfaces

Provides interfaces to use external libraries with Essence.

  • Saturday, March 29, 2014
  • by fg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 262 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Essence interfaces

A set of interfaces to use third-party libraries within Essence., (*1)

Usage

Here is how to use a Doctrine cache throughout the application:, (*2)

$Essence = Essence\Essence::instance([
    'Cache' => Essence\Di\Container::unique( function( ) {
        return new Essence\Cache\Engine\Doctrine(
            new Doctrine\Common\Cache\FilesystemCache( 'path/to/cache/directory' )
        );
    })
]);

Cache interfaces

CakePHP

$Cache = new Essence\Cache\Engine\Cake( 'configuration' );

Doctrine

$Cache = new Essence\Cache\Engine\Doctrine(
    new Doctrine\Common\Cache\FilesystemCache( 'path/to/cache/directory' ),
    $ttl
);

Zend

$Cache = new Essence\Cache\Engine\Zend(
    Zend\Cache\StorageFactory::adapterFactory( 'apc' )
);

HTTP interfaces

CakePHP

$Http = new Essence\Http\Client\Cake( new HttpSocket( ));

Log interfaces

CakePHP

$Log = new Essence\Log\Logger\Cake( 'scope' );

PSR/Monolog

$Log = new Essence\Log\Logger\Psr( new CustomPsrLogger( ));
$Monolog = new Monolog\Logger( 'essence' );
$Monolog->pushHandler(
    new Monolog\Handler\StreamHandler( 'path/to/log/file' )
);

$Log = new Essence\Log\Logger\Psr( $Monolog );

The Versions

29/03 2014

dev-master

9999999-dev http://github.com/felixgirault/essence-interfaces

Provides interfaces to use external libraries with Essence.

  Sources   Download

The Requires

  • php >=5.4.0

 

essence

29/03 2014

2.4.0

2.4.0.0 http://github.com/felixgirault/essence-interfaces

Provides interfaces to use external libraries with Essence.

  Sources   Download

The Requires

  • php >=5.4.0

 

essence

08/03 2014

dev-version-3.0.0

dev-version-3.0.0 http://github.com/felixgirault/essence-interfaces

Provides interfaces to use external libraries with Essence.

  Sources   Download

The Requires

  • php >=5.4.0

 

essence