public function install()
	{
		$this->log('i', 'Installing extension '.$this->extension->getId());
		
		if ($this->extension->getId() == 'generis') {
			throw new common_ext_ForbiddenActionException(
			    'Tried to install generis using the ExtensionInstaller',$this->extension->getId()
		    );
		}
		if (common_ext_ExtensionsManager::singleton()->isInstalled($this->extension->getId())) {
		    throw new common_ext_AlreadyInstalledException(
		        'Problem installing extension ' . $this->extension->getId() .' : Already installed', $this->extension->getId()
	        );
		}
		
		// we purge the whole cache.
        $this->log('d', 'Purging cache...');
		$cache = common_cache_FileCache::singleton();
		$cache->purge();	
	

		// check required extensions, throws exception if failed
		helpers_ExtensionHelper::checkRequiredExtensions($this->getExtension());
			
		$this->installLoadDefaultConfig();
		$this->installOntology();
		$this->installRegisterExt();
			
		$this->log('d', 'Installing custom script for extension ' . $this->extension->getId());
		$this->installCustomScript();
		$this->log('d', 'Done installing custom script for extension ' . $this->extension->getId());
		
		if ($this->getLocalData() == true){
			$this->log('d', 'Installing local data for extension ' . $this->extension->getId());
			$this->installLocalData();
			$this->log('d', 'Done installing local data for extension ' . $this->extension->getId());
				
		}
		$this->log('d', 'Extended install for extension ' . $this->extension->getId());
			
		// Method to be overridden by subclasses
		// to extend the installation mechanism.
		$this->extendedInstall();
		$this->log('d', 'Done extended install for extension ' . $this->extension->getId());
		$eventManager = ServiceManager::getServiceManager()->get(EventManager::CONFIG_ID);
		$eventManager->trigger(new common_ext_event_ExtensionInstalled($this->extension));

	}
public function install()
	{
		$this->log('i', 'Installing extension '.$this->extension->getId());
		
		if ($this->extension->getId() == 'generis') {
			throw new common_ext_ForbiddenActionException(
			    'Tried to install generis using the ExtensionInstaller',$this->extension->getId()
		    );
		}
		if (common_ext_ExtensionsManager::singleton()->isInstalled($this->extension->getId())) {
		    throw new common_ext_AlreadyInstalledException(
		        'Problem installing extension ' . $this->extension->getId() .' : Already installed', $this->extension->getId()
	        );
		}
		
		// we purge the whole cache.
        $this->log('d', 'Purging cache...');
		$cache = common_cache_FileCache::singleton();
		$cache->purge();	
	

		// check required extensions, throws exception if failed
		helpers_ExtensionHelper::checkRequiredExtensions($this->getExtension());
			
		$this->installLoadDefaultConfig();
		$this->installOntology();
		$this->installRegisterExt();
			
		$this->log('d', 'Installing custom script for extension ' . $this->extension->getId());
		$this->installCustomScript();
		$this->log('d', 'Done installing custom script for extension ' . $this->extension->getId());
		
		if ($this->getLocalData() == true){
			$this->log('d', 'Installing local data for extension ' . $this->extension->getId());
			$this->installLocalData();
			$this->log('d', 'Done installing local data for extension ' . $this->extension->getId());
				
		}
		$this->log('d', 'Extended install for extension ' . $this->extension->getId());
			
		// Method to be overridden by subclasses
		// to extend the installation mechanism.
		$this->extendedInstall();
		$this->log('d', 'Done extended install for extension ' . $this->extension->getId());
		$eventManager = ServiceManager::getServiceManager()->get(EventManager::CONFIG_ID);
		$eventManager->trigger(new common_ext_event_ExtensionInstalled($this->extension));

	}
public function install ( ) { $ this -> log ( 'i' , 'Installing extension ' . $ this -> extension -> getId ( ) ) ; if ( $ this -> extension -> getId ( ) == 'generis' ) { throw new common_ext_ForbiddenActionException ( 'Tried to install generis using the ExtensionInstaller' , $ this -> extension -> getId ( ) ) ; } if ( common_ext_ExtensionsManager :: singleton ( ) -> isInstalled ( $ this -> extension -> getId ( ) ) ) { throw new common_ext_AlreadyInstalledException ( 'Problem installing extension ' . $ this -> extension -> getId ( ) . ' : Already installed' , $ this -> extension -> getId ( ) ) ; } // we purge the whole cache. $ this -> log ( 'd' , 'Purging cache...' ) ; $ cache = common_cache_FileCache :: singleton ( ) ; $ cache -> purge ( ) ; // check required extensions, throws exception if failed helpers_ExtensionHelper :: checkRequiredExtensions ( $ this -> getExtension ( ) ) ; $ this -> installLoadDefaultConfig ( ) ; $ this -> installOntology ( ) ; $ this -> installRegisterExt ( ) ; $ this -> log ( 'd' , 'Installing custom script for extension ' . $ this -> extension -> getId ( ) ) ; $ this -> installCustomScript ( ) ; $ this -> log ( 'd' , 'Done installing custom script for extension ' . $ this -> extension -> getId ( ) ) ; if ( $ this -> getLocalData ( ) == true ) { $ this -> log ( 'd' , 'Installing local data for extension ' . $ this -> extension -> getId ( ) ) ; $ this -> installLocalData ( ) ; $ this -> log ( 'd' , 'Done installing local data for extension ' . $ this -> extension -> getId ( ) ) ; } $ this -> log ( 'd' , 'Extended install for extension ' . $ this -> extension -> getId ( ) ) ; // Method to be overridden by subclasses // to extend the installation mechanism. $ this -> extendedInstall ( ) ; $ this -> log ( 'd' , 'Done extended install for extension ' . $ this -> extension -> getId ( ) ) ; $ eventManager = ServiceManager :: getServiceManager ( ) -> get ( EventManager :: CONFIG_ID ) ; $ eventManager -> trigger ( new common_ext_event_ExtensionInstalled ( $ this -> extension ) ) ; }
install an extension

@access public
@author Jerome Bogaerts, <jerome@taotesting.com>

@throws common_ext_ForbiddenActionException When the installable extension is generis.
@throws common_ext_AlreadyInstalledException When the extension is already installed.

@return void
install an extension