src/Rocketeer/Services/Connections/ConnectionsHandler.php
public function setStage($stage)
    {
        $connectionKey = $this->getCurrentConnectionKey();
        if ($stage === $connectionKey->stage) {
            return;
        }

        $connectionKey->stage = $stage;
        $this->getConnections()->map(function (ConnectionInterface $connection) use ($connectionKey) {
            if ($connection->isCurrent() || $connection->getConnectionKey()->is($connectionKey)) {
                $connection->setConnectionKey($connectionKey);
            }

            return $connection;
        });

        // If we do have a stage, cleanup previous events
        if ($stage) {
            $this->bootstrapper->bootstrapUserCode();
        }
    }
public function setStage($stage)
    {
        $connectionKey = $this->getCurrentConnectionKey();
        if ($stage === $connectionKey->stage) {
            return;
        }

        $connectionKey->stage = $stage;
        $this->getConnections()->map(function (ConnectionInterface $connection) use ($connectionKey) {
            if ($connection->isCurrent() || $connection->getConnectionKey()->is($connectionKey)) {
                $connection->setConnectionKey($connectionKey);
            }

            return $connection;
        });

        // If we do have a stage, cleanup previous events
        if ($stage) {
            $this->bootstrapper->bootstrapUserCode();
        }
    }
public function setStage ( $ stage ) { $ connectionKey = $ this -> getCurrentConnectionKey ( ) ; if ( $ stage === $ connectionKey -> stage ) { return ; } $ connectionKey -> stage = $ stage ; $ this -> getConnections ( ) -> map ( function ( ConnectionInterface $ connection ) use ( $ connectionKey ) { if ( $ connection -> isCurrent ( ) || $ connection -> getConnectionKey ( ) -> is ( $ connectionKey ) ) { $ connection -> setConnectionKey ( $ connectionKey ) ; } return $ connection ; } ) ; // If we do have a stage, cleanup previous events if ( $ stage ) { $ this -> bootstrapper -> bootstrapUserCode ( ) ; } }
Set the stage on the current connection.

@param string|null $stage
Set the stage on the current connection .