public function createRequest($config = null)
    {
        if (is_string($config)) {
            $cfg = new ProfileConfiguration();
            $config = $cfg->setTitle($config);
        } elseif (null === $config) {
            $config = new ProfileConfiguration();
        } elseif (!$config instanceof ProfileConfiguration) {
            throw new \InvalidArgumentException(sprintf('The "%s" method takes a string or a Blackfire\Profile\Configuration instance.', __METHOD__));
        }

        return $this->doCreateRequest($config);
    }
public function createRequest($config = null)
    {
        if (is_string($config)) {
            $cfg = new ProfileConfiguration();
            $config = $cfg->setTitle($config);
        } elseif (null === $config) {
            $config = new ProfileConfiguration();
        } elseif (!$config instanceof ProfileConfiguration) {
            throw new \InvalidArgumentException(sprintf('The "%s" method takes a string or a Blackfire\Profile\Configuration instance.', __METHOD__));
        }

        return $this->doCreateRequest($config);
    }
public function createRequest ( $ config = null ) { if ( is_string ( $ config ) ) { $ cfg = new ProfileConfiguration ( ) ; $ config = $ cfg -> setTitle ( $ config ) ; } elseif ( null === $ config ) { $ config = new ProfileConfiguration ( ) ; } elseif ( ! $ config instanceof ProfileConfiguration ) { throw new \ InvalidArgumentException ( sprintf ( 'The "%s" method takes a string or a Blackfire\Profile\Configuration instance.' , __METHOD__ ) ) ; } return $ this -> doCreateRequest ( $ config ) ; }
Returns a profile request.

Retrieve the X-Blackfire-Query value with Request::getToken().

@param ProfileConfiguration|string $config The profile title or a ProfileConfiguration instance

@return Profile\Request
Returns a profile request .