4 * This file is part of Zippy.
6 * (c) Alchemy <info@alchemy.fr>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Alchemy\Zippy\FileStrategy;
14 use Alchemy\Zippy\Adapter\AdapterContainer;
15 use Alchemy\Zippy\Exception\RuntimeException;
17 abstract class AbstractFileStrategy implements FileStrategyInterface
21 public function __construct(AdapterContainer $container)
23 $this->container = $container;
29 public function getAdapters()
32 foreach ($this->getServiceNames() as $serviceName) {
34 $services[] = $this->container[$serviceName];
35 } catch (RuntimeException $e) {
44 * Returns an array of service names that defines adapters.
48 abstract protected function getServiceNames();