private function checkCreateInput()
    {
        
        $defaults = array('language' => null,
                          'languageLabel' => null,
        				  'extension' => null,
        				  'input' => dirname(__FILE__) . '/../../' . $this->options['extension'] . '/' . self::DEF_INPUT_DIR,
        				  'output' => dirname(__FILE__) . '/../../' . $this->options['extension'] . '/' . self::DEF_OUTPUT_DIR,
        				  'build' => true, // Build translation files by having a look in source code, models.
        				  'force' => false); // Do not force rebuild if locale already exist.
        
        $this->options = array_merge($defaults, $this->options);
    	
    	if (is_null($this->options['language'])) {
        	$this->err("Please provide a 'language' identifier such as en-US, fr-CA, IT, ...", true);
        } else {
        	if (is_null($this->options['extension'])) {
        		$this->err("Please provide an 'extension' for which the 'language' will be created", true);
        	} else {
        		// Check if the extension(s) exists.
        		$extensionsToCreate = explode(',', $this->options['extension']);
        		$extensionsToCreate = array_unique($extensionsToCreate);
        		foreach ($extensionsToCreate as $etc){
        			$this->options['input'] = dirname(__FILE__) . '/../../' . $etc . '/' . self::DEF_INPUT_DIR;
        			$this->options['output'] = dirname(__FILE__) . '/../../' . $etc . '/' . self::DEF_OUTPUT_DIR;
        			$extensionDir = dirname(__FILE__) . '/../../' . $etc;
        			if (!is_dir($extensionDir)) {
        				$this->err("The extension '" . $etc . "' does not exist.", true);
        			} else if (!is_readable($extensionDir)) {
        				$this->err("The '" . $etc . "' directory is not readable. Please check permissions on this directory.", true);
        			} else if (!is_writable($extensionDir)) {
        				$this->err("The '" . $etc . "' directory is not writable. Please check permissions on this directory.", true);
        			}
        			
        			// The input 'parameter' is optional.
        			// (and only used if the 'build' parameter is set to true)
					$this->checkInputOption();

					// The 'output' parameter is optional.
					$this->checkOutputOption();
				}
        	}
        }
        
    }
private function checkCreateInput()
    {
        
        $defaults = array('language' => null,
                          'languageLabel' => null,
        				  'extension' => null,
        				  'input' => dirname(__FILE__) . '/../../' . $this->options['extension'] . '/' . self::DEF_INPUT_DIR,
        				  'output' => dirname(__FILE__) . '/../../' . $this->options['extension'] . '/' . self::DEF_OUTPUT_DIR,
        				  'build' => true, // Build translation files by having a look in source code, models.
        				  'force' => false); // Do not force rebuild if locale already exist.
        
        $this->options = array_merge($defaults, $this->options);
    	
    	if (is_null($this->options['language'])) {
        	$this->err("Please provide a 'language' identifier such as en-US, fr-CA, IT, ...", true);
        } else {
        	if (is_null($this->options['extension'])) {
        		$this->err("Please provide an 'extension' for which the 'language' will be created", true);
        	} else {
        		// Check if the extension(s) exists.
        		$extensionsToCreate = explode(',', $this->options['extension']);
        		$extensionsToCreate = array_unique($extensionsToCreate);
        		foreach ($extensionsToCreate as $etc){
        			$this->options['input'] = dirname(__FILE__) . '/../../' . $etc . '/' . self::DEF_INPUT_DIR;
        			$this->options['output'] = dirname(__FILE__) . '/../../' . $etc . '/' . self::DEF_OUTPUT_DIR;
        			$extensionDir = dirname(__FILE__) . '/../../' . $etc;
        			if (!is_dir($extensionDir)) {
        				$this->err("The extension '" . $etc . "' does not exist.", true);
        			} else if (!is_readable($extensionDir)) {
        				$this->err("The '" . $etc . "' directory is not readable. Please check permissions on this directory.", true);
        			} else if (!is_writable($extensionDir)) {
        				$this->err("The '" . $etc . "' directory is not writable. Please check permissions on this directory.", true);
        			}
        			
        			// The input 'parameter' is optional.
        			// (and only used if the 'build' parameter is set to true)
					$this->checkInputOption();

					// The 'output' parameter is optional.
					$this->checkOutputOption();
				}
        	}
        }
        
    }
private function checkCreateInput ( ) { $ defaults = array ( 'language' => null , 'languageLabel' => null , 'extension' => null , 'input' => dirname ( __FILE__ ) . '/../../' . $ this -> options [ 'extension' ] . '/' . self :: DEF_INPUT_DIR , 'output' => dirname ( __FILE__ ) . '/../../' . $ this -> options [ 'extension' ] . '/' . self :: DEF_OUTPUT_DIR , 'build' => true , // Build translation files by having a look in source code, models. 'force' => false ) ; // Do not force rebuild if locale already exist. $ this -> options = array_merge ( $ defaults , $ this -> options ) ; if ( is_null ( $ this -> options [ 'language' ] ) ) { $ this -> err ( "Please provide a 'language' identifier such as en-US, fr-CA, IT, ..." , true ) ; } else { if ( is_null ( $ this -> options [ 'extension' ] ) ) { $ this -> err ( "Please provide an 'extension' for which the 'language' will be created" , true ) ; } else { // Check if the extension(s) exists. $ extensionsToCreate = explode ( ',' , $ this -> options [ 'extension' ] ) ; $ extensionsToCreate = array_unique ( $ extensionsToCreate ) ; foreach ( $ extensionsToCreate as $ etc ) { $ this -> options [ 'input' ] = dirname ( __FILE__ ) . '/../../' . $ etc . '/' . self :: DEF_INPUT_DIR ; $ this -> options [ 'output' ] = dirname ( __FILE__ ) . '/../../' . $ etc . '/' . self :: DEF_OUTPUT_DIR ; $ extensionDir = dirname ( __FILE__ ) . '/../../' . $ etc ; if ( ! is_dir ( $ extensionDir ) ) { $ this -> err ( "The extension '" . $ etc . "' does not exist." , true ) ; } else if ( ! is_readable ( $ extensionDir ) ) { $ this -> err ( "The '" . $ etc . "' directory is not readable. Please check permissions on this directory." , true ) ; } else if ( ! is_writable ( $ extensionDir ) ) { $ this -> err ( "The '" . $ etc . "' directory is not writable. Please check permissions on this directory." , true ) ; } // The input 'parameter' is optional. // (and only used if the 'build' parameter is set to true) $ this -> checkInputOption ( ) ; // The 'output' parameter is optional. $ this -> checkOutputOption ( ) ; } } } }
Checks the inputs for the 'create' action.

@access private
@author Joel Bout, <joel.bout@tudor.lu>
@return void
Checks the inputs for the create action .