public function initialize()
    {
        if ($this->initialized) {
            throw new SurfException('Already initialized', 1335976472);
        }
        if ($this->workflow === null) {
            $this->workflow = new SimpleWorkflow();
        }

        foreach ($this->applications as $application) {
            $application->registerTasks($this->workflow, $this);
        }
        foreach ($this->initCallbacks as $callback) {
            $callback();
        }

        $this->initialized = true;
    }
public function initialize()
    {
        if ($this->initialized) {
            throw new SurfException('Already initialized', 1335976472);
        }
        if ($this->workflow === null) {
            $this->workflow = new SimpleWorkflow();
        }

        foreach ($this->applications as $application) {
            $application->registerTasks($this->workflow, $this);
        }
        foreach ($this->initCallbacks as $callback) {
            $callback();
        }

        $this->initialized = true;
    }
public function initialize ( ) { if ( $ this -> initialized ) { throw new SurfException ( 'Already initialized' , 1335976472 ) ; } if ( $ this -> workflow === null ) { $ this -> workflow = new SimpleWorkflow ( ) ; } foreach ( $ this -> applications as $ application ) { $ application -> registerTasks ( $ this -> workflow , $ this ) ; } foreach ( $ this -> initCallbacks as $ callback ) { $ callback ( ) ; } $ this -> initialized = true ; }
Initialize the deployment

Must be called before calling deploy() on a deployment.

A time-based release identifier will be created on initialization. It also executes
callbacks given to the deployment with onInitialize(...).

@throws SurfException
Initialize the deployment