Bob\Cli::initProject PHP Method

initProject() protected method

protected initProject ( )
    protected function initProject()
    {
        if (file_exists("bob_config.php")) {
            fwrite(STDERR, "Project already has a bob_config.php\n");
            return false;
        }
        $config = <<<'EOF'
<?php

namespace Bob\BuildConfig;

task('default', array('example'));

desc('Write Hello World to STDOUT');
task('example', function() {
    println("Hello World!");
    println("To add some tasks open the `bob_config.php` in your project root"
        ." at ".getcwd());
});
EOF;
        @file_put_contents("bob_config.php", $config);
        printf("Initialized project at \"%s\"\n", getcwd());
        return true;
    }