Mage_Adminhtml_Extensions_ConsoleController Class Reference

Inheritance diagram for Mage_Adminhtml_Extensions_ConsoleController:

Mage_Adminhtml_Controller_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 indexAction ()
 outputAction ()

Protected Member Functions

 _isAllowed ()


Detailed Description

Definition at line 37 of file ConsoleController.php.


Member Function Documentation

_isAllowed (  )  [protected]

Reimplemented from Mage_Adminhtml_Controller_Action.

Definition at line 87 of file ConsoleController.php.

00088     {
00089         return Mage::getSingleton('admin/session')->isAllowed('system/extensions');
00090     }

indexAction (  ) 

Definition at line 39 of file ConsoleController.php.

00040     {
00041         $this->loadLayout();
00042 
00043         $this->_setActiveMenu('system/extensions/console');
00044 
00045         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_console_edit'));
00046 
00047         $this->renderLayout();
00048     }

outputAction (  ) 

Definition at line 50 of file ConsoleController.php.

00051     {
00052         $pear = Varien_Pear::getInstance();
00053         $input = $this->getRequest()->getParam('argv');
00054         $argv = preg_split('#\s+#', $input);
00055         $command = false;
00056         $options = array();
00057         $params = array();
00058 
00059         foreach ($argv as $arg) {
00060             if ($arg[0]==='-') {
00061                 $opt = '';
00062                 if ($arg[1]==='-') {
00063                     $opt = substr($arg, 2);
00064                 }
00065                 if ($opt) {
00066                     $options[$opt] = 1;
00067                 }
00068             } elseif (empty($command)) {
00069                 $command = $arg;
00070             } else {
00071                 $params[] = $arg;
00072             }
00073         }
00074 
00075         $run = new Varien_Object();
00076         if ($command) {
00077             $run->setComment(Mage::helper('adminhtml')->__('Running:').' "'.$input.'"'."\r\n\r\n");
00078             $run->setCommand($command);
00079             $run->setOptions($options);
00080             $run->setParams($params);
00081         } else {
00082             $run->setComment(Mage::helper('adminhtml')->__('Invalid input:').' "'.$input.'"'."\r\n\r\n");
00083         }
00084         $pear->runHtmlConsole($run);
00085     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:12 2009 for Magento by  doxygen 1.5.8