english/libraries/joomla/installer/installer.php
/*
	 * Discovered package installation method
	 *
	 * @param   integer  $eid Extension ID
	 * @return  boolean  True if successful
	 * @since   11.1
	 */
Discovered package installation method
@param   integer  $eid Extension ID
@return  boolean  True if successful
@since   11.1
Discovered package installation method @param integer $eid Extension ID @return boolean True if successful @since 11 . 1
public function discover_install($eid=null)
	{
		if ($eid) {
			$this->extension = JTable::getInstance('extension');
			if (!$this->extension->load($eid)) {
				$this->abort(JText::_('JLIB_INSTALLER_ABORT_LOAD_DETAILS'));
				return false;
			}
			if ($this->extension->state != -1) {
				$this->abort(JText::_('JLIB_INSTALLER_ABORT_ALREADYINSTALLED'));
				return false;
			}
			if (!isset($this->_adapters[$this->extension->type]) || !is_object($this->_adapters[$this->extension->type])) {
				if (!$this->setAdapter($this->extension->type)) {
					return false;
				}
			}
			if (is_object($this->_adapters[$this->extension->type])) {
				if (method_exists($this->_adapters[$this->extension->type], 'discover_install')) {
					if (method_exists($this->_adapters[$this->extension->type], 'loadLanguage')) {
						$this->_adapters[$this->extension->type]->loadLanguage();
					}
	                JPluginHelper::importPlugin('extension');
	                $dispatcher = JDispatcher::getInstance();
	                $dispatcher->trigger('onExtensionBeforeInstall', array('method'=>'discover_install', 'type'=>$this->extension->get('type'), 'manifest'=>null, 'extension'=>$this->extension->get('extension_id')));
					$result = $this->_adapters[$this->extension->type]->discover_install();
					$dispatcher->trigger('onExtensionAfterInstall', array('installer'=>clone $this, 'eid'=> $result));
					if ($result !== false) return true; else return false;
				}
				else {
					$this->abort(JText::_('JLIB_INSTALLER_ABORT_METHODNOTSUPPORTED'));
					return false;
				}
			}
			return false;
		}
		else {
			$this->abort(JText::_('JLIB_INSTALLER_ABORT_EXTENSIONNOTVALID'));
			return false;
		}
	}
public function discover_install ( $ eid = null ) { if ( $ eid ) { $ this -> extension = JTable :: getInstance ( 'extension' ) ; if ( ! $ this -> extension -> load ( $ eid ) ) { $ this -> abort ( JText :: _ ( 'JLIB_INSTALLER_ABORT_LOAD_DETAILS' ) ) ; return false ; } if ( $ this -> extension -> state != - 1 ) { $ this -> abort ( JText :: _ ( 'JLIB_INSTALLER_ABORT_ALREADYINSTALLED' ) ) ; return false ; } if ( ! isset ( $ this -> _adapters [ $ this -> extension -> type ] ) || ! is_object ( $ this -> _adapters [ $ this -> extension -> type ] ) ) { if ( ! $ this -> setAdapter ( $ this -> extension -> type ) ) { return false ; } } if ( is_object ( $ this -> _adapters [ $ this -> extension -> type ] ) ) { if ( method_exists ( $ this -> _adapters [ $ this -> extension -> type ] , 'discover_install' ) ) { if ( method_exists ( $ this -> _adapters [ $ this -> extension -> type ] , 'loadLanguage' ) ) { $ this -> _adapters [ $ this -> extension -> type ] -> loadLanguage ( ) ; } JPluginHelper :: importPlugin ( 'extension' ) ; $ dispatcher = JDispatcher :: getInstance ( ) ; $ dispatcher -> trigger ( 'onExtensionBeforeInstall' , array ( 'method' => 'discover_install' , 'type' => $ this -> extension -> get ( 'type' ) , 'manifest' => null , 'extension' => $ this -> extension -> get ( 'extension_id' ) ) ) ; $ result = $ this -> _adapters [ $ this -> extension -> type ] -> discover_install ( ) ; $ dispatcher -> trigger ( 'onExtensionAfterInstall' , array ( 'installer' => clone $ this , 'eid' => $ result ) ) ; if ( $ result !== false ) return true ; else return false ; } else { $ this -> abort ( JText :: _ ( 'JLIB_INSTALLER_ABORT_METHODNOTSUPPORTED' ) ) ; return false ; } } return false ; } else { $ this -> abort ( JText :: _ ( 'JLIB_INSTALLER_ABORT_EXTENSIONNOTVALID' ) ) ; return false ; } }
Discovered package installation method
 @param   integer  $eid Extension ID
 @return  boolean  True if successful
 @since   11.1
Discovered package installation method @param integer $eid Extension ID @return boolean True if successful @since 11 . 1
// Lazy load the adapter // Add the languages from the package itself // Fire the onExtensionBeforeInstall event. // Run the install // Fire the onExtensionAfterInstall