protected function loadFactory(?array $params=[])
  {
    if (\is_array($params) && !empty($params['class']) && \class_exists($params['class'])) {
      $factory = new $params['class']($params['options'] ?? []);
      $this->getLogger()->debug('Factory created',[
        'factory'=>$factory
      ]);

      return $factory;
    } else {
      $this->getLogger()->error('Factory not found',[
        'params'=>$params
      ]);

    }

    return null;
  }
protected function loadFactory(?array $params=[])
  {
    if (\is_array($params) && !empty($params['class']) && \class_exists($params['class'])) {
      $factory = new $params['class']($params['options'] ?? []);
      $this->getLogger()->debug('Factory created',[
        'factory'=>$factory
      ]);

      return $factory;
    } else {
      $this->getLogger()->error('Factory not found',[
        'params'=>$params
      ]);

    }

    return null;
  }
protected function loadFactory ( ? array $ params = [ ] ) { if ( \ is_array ( $ params ) && ! empty ( $ params [ 'class' ] ) && \ class_exists ( $ params [ 'class' ] ) ) { $ factory = new $ params [ 'class' ] ( $ params [ 'options' ] ?? [ ] ) ; $ this -> getLogger ( ) -> debug ( 'Factory created' , [ 'factory' => $ factory ] ) ; return $ factory ; } else { $ this -> getLogger ( ) -> error ( 'Factory not found' , [ 'params' => $ params ] ) ; } return null ; }
Loads a Factory class

@param      string  $params  The params found in the config file under the
factory

@throws     Exception

@return     object  | null
Loads a Factory class