create() public static méthode

public static create ( ) : Configuration
Résultat Configuration
 /**
  * Builds a Client based on the connections given.
  *
  * @return ClientInterface
  */
 public function build()
 {
     $connectionManager = new ConnectionManager();
     foreach ($this->config['connections'] as $alias => $conn) {
         $config = isset($this->config['connections'][$alias]['config']) ? $this->config['connections'][$alias]['config'] : Configuration::create()->withTimeout($this->getDefaultTimeout());
         $connectionManager->registerConnection($alias, $conn['uri'], $config);
         if (isset($conn['is_master']) && $conn['is_master'] === true) {
             $connectionManager->setMaster($alias);
         }
     }
     $ev = null;
     if (isset($this->config['event_listeners'])) {
         $ev = new EventDispatcher();
         foreach ($this->config['event_listeners'] as $k => $callbacks) {
             foreach ($callbacks as $callback) {
                 $ev->addListener($k, $callback);
             }
         }
     }
     return new $this->config['client_class']($connectionManager, $ev);
 }
 /**
  * @param string        $uri
  * @param Configuration $config
  */
 public function __construct($uri, ConfigInterface $config = null)
 {
     $this->uri = $uri;
     $this->config = null !== $config ? $config : Configuration::create();
 }