Example #1
0
 /**
  * @param ClientInterface    $client    Client that owns the commands
  * @param InflectorInterface $inflector Inflector used to resolve class names
  */
 public function __construct(ClientInterface $client, InflectorInterface $inflector = null)
 {
     $this->client = $client;
     $this->inflector = $inflector ?: Inflector::getDefault();
 }
Example #2
0
 /**
  * @param array|string       $namespaces Namespaces of waiter objects
  * @param InflectorInterface $inflector  Inflector used to resolve class names
  */
 public function __construct($namespaces = array(), InflectorInterface $inflector = null)
 {
     $this->namespaces = (array) $namespaces;
     $this->inflector = $inflector ?: Inflector::getDefault();
 }
Example #3
0
 /**
  * @param array              $config    Array of configuration directives
  * @param InflectorInterface $inflector Inflector used to resolve class names
  */
 public function __construct(array $config, InflectorInterface $inflector = null)
 {
     $this->config = $config;
     $this->inflector = $inflector ?: Inflector::getDefault();
 }
Example #4
0
 /**
  * Get the inflector used with the client
  *
  * @return self
  */
 public function getInflector()
 {
     if (!$this->inflector) {
         $this->inflector = Inflector::getDefault();
     }
     return $this->inflector;
 }