Your IP : 127.0.0.1


Current Path : /home/dev2.destoffenstraat.com/app/Firebear/ImportExport/Model/Lib/
Upload File :
Current File : /home/dev2.destoffenstraat.com/app/Firebear/ImportExport/Model/Lib/LibPool.php

<?php
/**
 * @copyright: Copyright © 2020 Firebear Studio. All rights reserved.
 * @author: Firebear Studio <fbeardev@gmail.com>
 */
namespace Firebear\ImportExport\Model\Lib;

use Magento\Framework\Exception\InputException;

/**
 * Install lib pool
 */
class LibPool implements LibPoolInterface
{
    /**
     * Install libs
     *
     * @var LibInterface[]
     */
    private $libs = [];

    /**
     * Initialize pool
     *
     * @param LibInterface[] $libs
     */
    public function __construct(
        $libs = []
    ) {
        foreach ($libs as $lib) {
            if (!$lib instanceof LibInterface) {
                throw new InputException(
                    __('Install lib must implement %1.', LibInterface::class)
                );
            }
        }
        $this->libs = $libs;
    }

    /**
     * Retrieve registered libs
     *
     * @return LibInterface[]
     */
    public function get()
    {
        return $this->libs;
    }
}