public function readEventConfiguration($path, $type)
    {
        if (!file_exists($path)) {
            throw new \InvalidArgumentException('File ' . $path . 'don\'t exists.');
        }

        $name = '\BlueEvent\Event\Config\\' . ucfirst($type) . 'Config';

        if (!class_exists($name)) {
            throw new \InvalidArgumentException('Incorrect configuration type: ' . $type);
        }

        /** @var \BlueEvent\Event\Config\ConfigReader $reader */
        $reader = new $name;

        return $this->setEventConfiguration($reader->readConfig($path));
    }
public function readEventConfiguration($path, $type)
    {
        if (!file_exists($path)) {
            throw new \InvalidArgumentException('File ' . $path . 'don\'t exists.');
        }

        $name = '\BlueEvent\Event\Config\\' . ucfirst($type) . 'Config';

        if (!class_exists($name)) {
            throw new \InvalidArgumentException('Incorrect configuration type: ' . $type);
        }

        /** @var \BlueEvent\Event\Config\ConfigReader $reader */
        $reader = new $name;

        return $this->setEventConfiguration($reader->readConfig($path));
    }
public function readEventConfiguration ( $ path , $ type ) { if ( ! file_exists ( $ path ) ) { throw new \ InvalidArgumentException ( 'File ' . $ path . 'don\'t exists.' ) ; } $ name = '\BlueEvent\Event\Config\\' . ucfirst ( $ type ) . 'Config' ; if ( ! class_exists ( $ name ) ) { throw new \ InvalidArgumentException ( 'Incorrect configuration type: ' . $ type ) ; } /** @var \BlueEvent\Event\Config\ConfigReader $reader */ $ reader = new $ name ; return $ this -> setEventConfiguration ( $ reader -> readConfig ( $ path ) ) ; }
read configuration from file

@param mixed $path
@param string $type
@return $this
@throws \InvalidArgumentException
read configuration from file