annotate vendor/consolidation/annotated-command/src/Cache/SimpleCacheInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2 namespace Consolidation\AnnotatedCommand\Cache;
Chris@0 3
Chris@0 4 /**
Chris@0 5 * Documentation interface.
Chris@0 6 *
Chris@0 7 * Clients that use AnnotatedCommandFactory::setDataStore()
Chris@0 8 * are encouraged to provide a data store that implements
Chris@0 9 * this interface.
Chris@0 10 *
Chris@0 11 * This is not currently required to allow clients to use a generic cache
Chris@0 12 * store that does not itself depend on the annotated-command library.
Chris@0 13 * This might be required in a future version.
Chris@0 14 */
Chris@0 15 interface SimpleCacheInterface
Chris@0 16 {
Chris@0 17 /**
Chris@0 18 * Test for an entry from the cache
Chris@0 19 * @param string $key
Chris@0 20 * @return boolean
Chris@0 21 */
Chris@0 22 public function has($key);
Chris@0 23 /**
Chris@0 24 * Get an entry from the cache
Chris@0 25 * @param string $key
Chris@0 26 * @return array
Chris@0 27 */
Chris@0 28 public function get($key);
Chris@0 29 /**
Chris@0 30 * Store an entry in the cache
Chris@0 31 * @param string $key
Chris@0 32 * @param array $data
Chris@0 33 */
Chris@0 34 public function set($key, $data);
Chris@0 35 }