示例#1
0
 public function getFrontend()
 {
     $frontend = \Magento\Framework\Connect\Frontend::getInstance('CLI');
     \Magento\Framework\Connect\Command::setFrontendObject($frontend);
     return $frontend;
 }
示例#2
0
 /**
  * Retrieve object of frontend and set it to \Magento\Framework\Connect\Command
  *
  * @return \Magento\Downloader\Connect\Frontend
  */
 public function getFrontend()
 {
     if (!$this->_frontend) {
         $this->_frontend = new \Magento\Downloader\Connect\Frontend();
         \Magento\Framework\Connect\Command::setFrontendObject($this->_frontend);
     }
     return $this->_frontend;
 }