示例#1
0
 protected function getExtensionAttributes($input, $extensionPath)
 {
     //read from config if all values are empty
     if (is_null($input->getOption('vendor')) || is_null($input->getOption('extension')) || is_null($input->getOption('ext_version'))) {
         XMLReader::readConfig($extensionPath);
     }
     if ($input->getOption('vendor')) {
         Logger::setExtVendor($input->getOption('vendor'));
     } else {
         //read vendor from config
         Logger::setExtVendor(XMLReader::getVendor());
     }
     if ($input->getOption('extension')) {
         Logger::setExtName($input->getOption('extension'));
     } else {
         //read extension name from config
         Logger::setExtName(XMLReader::getExtensionName());
     }
     if ($input->getOption('ext_version')) {
         Logger::setExtVersion($input->getOption('ext_version'));
     } else {
         //read extension version from config
         Logger::setExtVersion(XMLReader::getVersion());
     }
     if ($input->getOption('ext_identifier')) {
         Logger::setExtIdentifier($input->getOption('ext_identifier'));
     } else {
         //read extension identifier from config
         Logger::setExtIdentifier(XMLReader::getExtensionIdentifier());
     }
 }