Exemplo n.º 1
0
 /**
  * Set parameters from configuration
  *
  * @param string $aliasOrClass
  * @param array $parameters
  */
 public function setParameters($aliasOrClass, array $parameters)
 {
     foreach ($parameters as $parameter) {
         if (is_string($parameter)) {
             $this->_generator->generateClass($parameter);
         }
     }
     parent::setParameters($aliasOrClass, $parameters);
 }
Exemplo n.º 2
0
 /**
  * Assemble bot commands
  *
  * @return void
  */
 private function _assembleBotCommands()
 {
     $this->_im->setParameters('App\\Bot\\CommandAbstract', ['botApi' => $this->_di->get('BotApi')]);
     $this->_im->setParameters('App\\Bot\\Command\\Register', ['chat' => $this->_di->get('Chat'), 'userIssue' => $this->_di->get('UserIssue'), 'userKey' => $this->_di->get('UserKey')]);
     $this->_im->setParameters('App\\Bot\\Command\\Deregister', ['chat' => $this->_di->get('Chat')]);
 }