for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Backup package, an RunOpenCode project.
*
* (c) 2015 RunOpenCode
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* This project is fork of "kbond/php-backup", for full credits info, please
* view CREDITS file that was distributed with this source code.
*/
namespace RunOpenCode\Backup\Destination;
use RunOpenCode\Backup\Contract\BackupInterface;
use RunOpenCode\Backup\Contract\DestinationInterface;
/**
* Class NullDestination
* Null destination does not contains or store any backups.
* @package RunOpenCode\Backup\Destination
class NullDestination implements DestinationInterface
{
* {@inheritdoc}
public function getIterator()
return new \ArrayIterator(array());
}
public function push(BackupInterface $backup)
// Do nothing.
public function get($name)
throw new \RuntimeException('Null destination does not have backups to fetch.');
public function delete($name)
throw new \RuntimeException('Null destination does not have backups to delete.');
public function all()
return array();
public function has($name)
return false;
public function count()
return 0;