Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
2 changed files with 67 additions and 0 deletions
Showing only changes of commit 5aa8a70b0b - Show all commits

View File

@ -0,0 +1,36 @@
<?php
/**
* Ion
*
* Building blocks for web development
*
* @package Ion
* @author Timothy J. Warren
* @copyright Copyright (c) 2015 - 2016
* @license MIT
*/
namespace Aviat\Ion\Cache;
/**
* Interface for cache drivers
*/
interface CacheDriverInterface {
/**
* Retreive a value from the cache backend
*
* @param string $key
* @return mixed
*/
public function get($key);
/**
* Set a cached value
*
* @param string $key
* @param mixed $value
* @return CacheDriverInterface
*/
public function set($key, $value);
}
// End of CacheDriverInterface.php

View File

@ -0,0 +1,31 @@
<?php
/**
* Ion
*
* Building blocks for web development
*
* @package Ion
* @author Timothy J. Warren
* @copyright Copyright (c) 2015 - 2016
* @license MIT
*/
namespace Aviat\Ion\Cache;
/**
* Interface for retrieving values from cache
*/
interface CacheInterface {
/**
* Retreive a cached value if it exists, otherwise, get the value
* from the passed arguments
*
* @param object $object - object to retrieve fresh value from
* @param string $method - method name to call
* @param array $args - the arguments to pass to the retrieval method
* @return mixed - the cached or fresh data
*/
public function get($object, $method, array $args);
}
// End of CacheInterface.php