protected function init($config) {
        foreach ($this->loggers as $class => $config) {
            if (!is_array($config)) {
                $class = $config;
                $config = [];
            }
            $instance = $class::get($config);
            if (!is_a($instance, 'mpf\\loggers\\Logger'))
                throw new \Exception("Loggers must extend mpf\\base\\Logger class!");
            $this->loggersInstances[] = $instance;
        }
    }
protected function init($config) {
        foreach ($this->loggers as $class => $config) {
            if (!is_array($config)) {
                $class = $config;
                $config = [];
            }
            $instance = $class::get($config);
            if (!is_a($instance, 'mpf\\loggers\\Logger'))
                throw new \Exception("Loggers must extend mpf\\base\\Logger class!");
            $this->loggersInstances[] = $instance;
        }
    }
protected function init ( $ config ) { foreach ( $ this -> loggers as $ class => $ config ) { if ( ! is_array ( $ config ) ) { $ class = $ config ; $ config = [ ] ; } $ instance = $ class :: get ( $ config ) ; if ( ! is_a ( $ instance , 'mpf\\loggers\\Logger' ) ) throw new \ Exception ( "Loggers must extend mpf\\base\\Logger class!" ) ; $ this -> loggersInstances [ ] = $ instance ; } }
Init logs for current component;
@param array $config
@return null
@throws \Exception
Init logs for current component ;