public function run($args)
    {
        $args = $this->parseArgs($args);
        foreach ($this->options as $argument => $attribute) {
            $this->{$attribute} = in_array($argument, $args);
            if ($this->{$attribute}) {
                $args = array_values(array_diff($args, [$argument]));
            }
        }

        if (!isset($args[0]) || !$args[0]) {
            return $this->initPath($this->cwd);
        }

        $projectName = $args[0];
        if (!$this->existsProjectName($projectName)) {
            return "> Producer: Project '{$this->projectsDir}/{$projectName}' not found.\n";
        }

        return $this->initPath($this->getProjectDir($projectName));
    }
public function run($args)
    {
        $args = $this->parseArgs($args);
        foreach ($this->options as $argument => $attribute) {
            $this->{$attribute} = in_array($argument, $args);
            if ($this->{$attribute}) {
                $args = array_values(array_diff($args, [$argument]));
            }
        }

        if (!isset($args[0]) || !$args[0]) {
            return $this->initPath($this->cwd);
        }

        $projectName = $args[0];
        if (!$this->existsProjectName($projectName)) {
            return "> Producer: Project '{$this->projectsDir}/{$projectName}' not found.\n";
        }

        return $this->initPath($this->getProjectDir($projectName));
    }
public function run ( $ args ) { $ args = $ this -> parseArgs ( $ args ) ; foreach ( $ this -> options as $ argument => $ attribute ) { $ this -> { $ attribute } = in_array ( $ argument , $ args ) ; if ( $ this -> { $ attribute } ) { $ args = array_values ( array_diff ( $ args , [ $ argument ] ) ) ; } } if ( ! isset ( $ args [ 0 ] ) || ! $ args [ 0 ] ) { return $ this -> initPath ( $ this -> cwd ) ; } $ projectName = $ args [ 0 ] ; if ( ! $ this -> existsProjectName ( $ projectName ) ) { return "> Producer: Project '{$this->projectsDir}/{$projectName}' not found.\n" ; } return $ this -> initPath ( $ this -> getProjectDir ( $ projectName ) ) ; }
Run init command.

@param $args

@return string
Run init command .