src/GameOfLife/OptionHandler/OptionHandler.php
/**
     * Initializes the command line options.
     *
     * @param Getopt $_options The option list
     *
     * @throws \Exception The exception when the Input, Output or Rule directory could not be found
     */
Initializes the command line options.
@param Getopt $_options The option list

@throws \Exception The exception when the Input, Output or Rule directory could not be found
Initializes the command line options . @param Getopt $_options The option list @throws \ Exception The exception when the Input Output or Rule directory could not be found
public function initializeOptions(Getopt $_options)
    {
        $this->optionLoader->addDefaultOptions($_options);
        $fileSystemReader = new FileSystemReader();
        $inputClasses = $fileSystemReader->getFileList(__DIR__ . "/../Inputs/*Input.php");
        $linkedOptions = $this->optionLoader->addClassOptions($_options, $inputClasses, $this->excludeClasses, "Input");
        $this->linkedOptions = array_merge($this->linkedOptions, $linkedOptions);
        $outputClasses = $fileSystemReader->getFileList(__DIR__ . "/../Outputs/*Output.php");
        $linkedOptions = $this->optionLoader->addClassOptions($_options, $outputClasses, $this->excludeClasses, "Output");
        $this->linkedOptions = array_merge($this->linkedOptions, $linkedOptions);
        $ruleClasses = $fileSystemReader->getFileList(__DIR__ . "/../Rules/*Rule.php");
        $linkedOptions = $this->optionLoader->addClassOptions($_options, $ruleClasses, $this->excludeClasses, "Rule");
        $this->linkedOptions = array_merge($this->linkedOptions, $linkedOptions);
    }
public function initializeOptions ( Getopt $ _options ) { $ this -> optionLoader -> addDefaultOptions ( $ _options ) ; $ fileSystemReader = new FileSystemReader ( ) ; $ inputClasses = $ fileSystemReader -> getFileList ( __DIR__ . " /../Inputs/*Input.php " ) ; $ linkedOptions = $ this -> optionLoader -> addClassOptions ( $ _options , $ inputClasses , $ this -> excludeClasses , " Input " ) ; $ this -> linkedOptions = array_merge ( $ this -> linkedOptions , $ linkedOptions ) ; $ outputClasses = $ fileSystemReader -> getFileList ( __DIR__ . " /../Outputs/*Output.php " ) ; $ linkedOptions = $ this -> optionLoader -> addClassOptions ( $ _options , $ outputClasses , $ this -> excludeClasses , " Output " ) ; $ this -> linkedOptions = array_merge ( $ this -> linkedOptions , $ linkedOptions ) ; $ ruleClasses = $ fileSystemReader -> getFileList ( __DIR__ . " /../Rules/*Rule.php " ) ; $ linkedOptions = $ this -> optionLoader -> addClassOptions ( $ _options , $ ruleClasses , $ this -> excludeClasses , " Rule " ) ; $ this -> linkedOptions = array_merge ( $ this -> linkedOptions , $ linkedOptions ) ; }
Initializes the command line options.
Initializes the command line options .