Skip to content

Instantly share code, notes, and snippets.

@jeremyquinton
Last active December 19, 2015 02:49
Show Gist options
  • Save jeremyquinton/5885977 to your computer and use it in GitHub Desktop.
Save jeremyquinton/5885977 to your computer and use it in GitHub Desktop.
Example to replicate issue 125
set_include_path(get_include_path() . PATH_SEPARATOR . '/vagrant/library');
include("/vagrant/library/Zend/Cache.php");
class Test
{
private function foobar($param1, $param2) {
return "foobar";
}
public function hello()
{
echo $this->foobar(1,2);
}
}
$instance = new Test();
$backendName = 'File';
$frontendName = 'Class';
$frontendOptions = array('cached_entity' => $instance);
$backendOptions = array();
$cache = Zend_Cache::factory($frontendName,
$backendName,
$frontendOptions,
$backendOptions);
$result = $cache->hello();
echo $result .PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment