Add pear modules, mail and net_smtp via composer (#93)
Add pear modules, mail and net_smtp via composer, remove php 5.6 build due to phpunit 6
This commit is contained in:
49
lib/composer/vendor/consolidation/annotated-command/src/Cache/CacheWrapper.php
vendored
Normal file
49
lib/composer/vendor/consolidation/annotated-command/src/Cache/CacheWrapper.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace Consolidation\AnnotatedCommand\Cache;
|
||||
|
||||
/**
|
||||
* Make a generic cache object conform to our expected interface.
|
||||
*/
|
||||
class CacheWrapper implements SimpleCacheInterface
|
||||
{
|
||||
protected $dataStore;
|
||||
|
||||
public function __construct($dataStore)
|
||||
{
|
||||
$this->dataStore = $dataStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for an entry from the cache
|
||||
* @param string $key
|
||||
* @return boolean
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
if (method_exists($this->dataStore, 'has')) {
|
||||
return $this->dataStore->has($key);
|
||||
}
|
||||
$test = $this->dataStore->get($key);
|
||||
return !empty($test);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an entry from the cache
|
||||
* @param string $key
|
||||
* @return array
|
||||
*/
|
||||
public function get($key)
|
||||
{
|
||||
return (array) $this->dataStore->get($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store an entry in the cache
|
||||
* @param string $key
|
||||
* @param array $data
|
||||
*/
|
||||
public function set($key, $data)
|
||||
{
|
||||
$this->dataStore->set($key, $data);
|
||||
}
|
||||
}
|
||||
37
lib/composer/vendor/consolidation/annotated-command/src/Cache/NullCache.php
vendored
Normal file
37
lib/composer/vendor/consolidation/annotated-command/src/Cache/NullCache.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace Consolidation\AnnotatedCommand\Cache;
|
||||
|
||||
/**
|
||||
* An empty cache that never stores or fetches any objects.
|
||||
*/
|
||||
class NullCache implements SimpleCacheInterface
|
||||
{
|
||||
/**
|
||||
* Test for an entry from the cache
|
||||
* @param string $key
|
||||
* @return boolean
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an entry from the cache
|
||||
* @param string $key
|
||||
* @return array
|
||||
*/
|
||||
public function get($key)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Store an entry in the cache
|
||||
* @param string $key
|
||||
* @param array $data
|
||||
*/
|
||||
public function set($key, $data)
|
||||
{
|
||||
}
|
||||
}
|
||||
35
lib/composer/vendor/consolidation/annotated-command/src/Cache/SimpleCacheInterface.php
vendored
Normal file
35
lib/composer/vendor/consolidation/annotated-command/src/Cache/SimpleCacheInterface.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace Consolidation\AnnotatedCommand\Cache;
|
||||
|
||||
/**
|
||||
* Documentation interface.
|
||||
*
|
||||
* Clients that use AnnotatedCommandFactory::setDataStore()
|
||||
* are encouraged to provide a data store that implements
|
||||
* this interface.
|
||||
*
|
||||
* This is not currently required to allow clients to use a generic cache
|
||||
* store that does not itself depend on the annotated-command library.
|
||||
* This might be required in a future version.
|
||||
*/
|
||||
interface SimpleCacheInterface
|
||||
{
|
||||
/**
|
||||
* Test for an entry from the cache
|
||||
* @param string $key
|
||||
* @return boolean
|
||||
*/
|
||||
public function has($key);
|
||||
/**
|
||||
* Get an entry from the cache
|
||||
* @param string $key
|
||||
* @return array
|
||||
*/
|
||||
public function get($key);
|
||||
/**
|
||||
* Store an entry in the cache
|
||||
* @param string $key
|
||||
* @param array $data
|
||||
*/
|
||||
public function set($key, $data);
|
||||
}
|
||||
Reference in New Issue
Block a user