public function createBuild($env = null, $options = array())
    {
        @trigger_error('The method "createBuild" is deprecated since blackfire/php-sdk 1.14 and will be removed in 2.0. Use method "startScenario" instead.', E_USER_DEPRECATED);

        // BC layer
        if (!is_array($options)) {
            $options = array('title' => $options);
            if (func_get_args() >= 3) {
                $options['trigger_name'] = func_get_arg(2);
            }
            if (func_get_args() >= 4) {
                $options['metadata'] = (array) func_get_arg(3);
            }
        }

        $env = $this->getEnvUuid(null === $env ? $this->config->getEnv() : $env);
        $content = json_encode($options);
        $data = json_decode($this->sendHttpRequest($this->config->getEndpoint().'/api/v1/build/env/'.$env, 'POST', array('content' => $content), array('Content-Type: application/json')), true);

        return new Build($env, $data);
    }
public function createBuild($env = null, $options = array())
    {
        @trigger_error('The method "createBuild" is deprecated since blackfire/php-sdk 1.14 and will be removed in 2.0. Use method "startScenario" instead.', E_USER_DEPRECATED);

        // BC layer
        if (!is_array($options)) {
            $options = array('title' => $options);
            if (func_get_args() >= 3) {
                $options['trigger_name'] = func_get_arg(2);
            }
            if (func_get_args() >= 4) {
                $options['metadata'] = (array) func_get_arg(3);
            }
        }

        $env = $this->getEnvUuid(null === $env ? $this->config->getEnv() : $env);
        $content = json_encode($options);
        $data = json_decode($this->sendHttpRequest($this->config->getEndpoint().'/api/v1/build/env/'.$env, 'POST', array('content' => $content), array('Content-Type: application/json')), true);

        return new Build($env, $data);
    }
public function createBuild ( $ env = null , $ options = array ( ) ) { @ trigger_error ( 'The method "createBuild" is deprecated since blackfire/php-sdk 1.14 and will be removed in 2.0. Use method "startScenario" instead.' , E_USER_DEPRECATED ) ; // BC layer if ( ! is_array ( $ options ) ) { $ options = array ( 'title' => $ options ) ; if ( func_get_args ( ) >= 3 ) { $ options [ 'trigger_name' ] = func_get_arg ( 2 ) ; } if ( func_get_args ( ) >= 4 ) { $ options [ 'metadata' ] = ( array ) func_get_arg ( 3 ) ; } } $ env = $ this -> getEnvUuid ( null === $ env ? $ this -> config -> getEnv ( ) : $ env ) ; $ content = json_encode ( $ options ) ; $ data = json_decode ( $ this -> sendHttpRequest ( $ this -> config -> getEndpoint ( ) . '/api/v1/build/env/' . $ env , 'POST' , array ( 'content' => $ content ) , array ( 'Content-Type: application/json' ) ) , true ) ; return new Build ( $ env , $ data ) ; }
Creates a Blackfire Scenario in a dedicated Build.

@param string|null $env     The environment name (or null to use the one configured on the client)
@param array       $options An array of Build options
(title, metadata, trigger_name, external_id, external_parent_id)

@return Build

@deprecated since 1.14, to be removed in 2.0. Use method "startScenario" instead.
Creates a Blackfire Scenario in a dedicated Build .