public function requestDiagramm($type, $dslText)
    {
        if ($this->getOptions()->getReturnDummyImage()) {
            return $this->getOptions()->getDummyImage();
        }

        $httpClient = $this->getHttpClient();
        $httpClient->setUri($this->getUriForDiagrammType($type));
        $httpClient->setParameterPost(array('dsl_text' => $dslText));

        $response = $httpClient->send();

        if (!$response->isSuccess()) {
            throw new \UnexpectedValueException('HTTP Request failed');
        }

        return $this->getOptions()->getYumlUrl() . $response->getBody();
    }
public function requestDiagramm($type, $dslText)
    {
        if ($this->getOptions()->getReturnDummyImage()) {
            return $this->getOptions()->getDummyImage();
        }

        $httpClient = $this->getHttpClient();
        $httpClient->setUri($this->getUriForDiagrammType($type));
        $httpClient->setParameterPost(array('dsl_text' => $dslText));

        $response = $httpClient->send();

        if (!$response->isSuccess()) {
            throw new \UnexpectedValueException('HTTP Request failed');
        }

        return $this->getOptions()->getYumlUrl() . $response->getBody();
    }
public function requestDiagramm ( $ type , $ dslText ) { if ( $ this -> getOptions ( ) -> getReturnDummyImage ( ) ) { return $ this -> getOptions ( ) -> getDummyImage ( ) ; } $ httpClient = $ this -> getHttpClient ( ) ; $ httpClient -> setUri ( $ this -> getUriForDiagrammType ( $ type ) ) ; $ httpClient -> setParameterPost ( array ( 'dsl_text' => $ dslText ) ) ; $ response = $ httpClient -> send ( ) ; if ( ! $ response -> isSuccess ( ) ) { throw new \ UnexpectedValueException ( 'HTTP Request failed' ) ; } return $ this -> getOptions ( ) -> getYumlUrl ( ) . $ response -> getBody ( ) ; }
Requests a diagramm from yuml web service

@param string $type
@param string $dslText
@throws \UnexpectedValueException
@return string
Requests a diagramm from yuml web service