Created
October 21, 2012 22:58
-
-
Save phalcon/3928836 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//a developer wants to create its own cache backend | |
class MyOwnBackend implements Phalcon\Cache\BackendInterface | |
{ | |
public function __construct($frontendObject, $backendOptions=array()){ | |
} | |
public function get($keyName, $lifetime=null){ | |
} | |
public function save($keyName=null, $content=null, $lifetime=null, $stopBuffer=true){ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//this is provided by phalcon | |
namespace Phalcon\Cache\Backend; | |
class Mongo extends \Phalcon\Cache\Backend | |
#if not RELEASE | |
implements Phalcon\Cache\BackendInterface | |
#endif | |
{ | |
public function __construct($frontendObject, $backendOptions=array()){ | |
} | |
public function get($keyName, $lifetime=null){ | |
} | |
public function save($keyName=null, $content=null, $lifetime=null, $stopBuffer=true){ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//this is provided by phalcon | |
namespace Phalcon\Cache; | |
interface BackendInteface { | |
public function __construct($frontendObject, $backendOptions=array()); | |
public function get($keyName, $lifetime=null); | |
public function save($keyName=null, $content=null, $lifetime=null, $stopBuffer=true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment