framework/cli/commands/WebAppCommand.php
public function generateIndex($source,$params)
	{
		$content=file_get_contents($source);
		$yii=realpath(dirname(__FILE__).'/../../yii.php');
		$yii=$this->getRelativePath($yii,$this->_rootPath.DIRECTORY_SEPARATOR.'index.php');
		$yii=str_replace('\\','\\\\',$yii);
		return preg_replace('/\$yii\s*=(.*?);/',"\$yii=$yii;",$content);
	}
public function generateIndex($source,$params)
	{
		$content=file_get_contents($source);
		$yii=realpath(dirname(__FILE__).'/../../yii.php');
		$yii=$this->getRelativePath($yii,$this->_rootPath.DIRECTORY_SEPARATOR.'index.php');
		$yii=str_replace('\\','\\\\',$yii);
		return preg_replace('/\$yii\s*=(.*?);/',"\$yii=$yii;",$content);
	}
public function generateIndex ( $ source , $ params ) { $ content = file_get_contents ( $ source ) ; $ yii = realpath ( dirname ( __FILE__ ) . '/../../yii.php' ) ; $ yii = $ this -> getRelativePath ( $ yii , $ this -> _rootPath . DIRECTORY_SEPARATOR . 'index.php' ) ; $ yii = str_replace ( '\\' , '\\\\' , $ yii ) ; return preg_replace ( '/\$yii\s*=(.*?);/' , "\$yii=$yii;" , $ content ) ; }
Inserts path to framework's yii.php into application's index.php

@param string $source source file path
@param array $params
@return string modified source file content
Inserts path to framework s yii . php into application s index . php