returns a importable string representation of the request
@return string
504851
protected function dumpRequest(Request $request) {
    $body = $request->getBody();
    
    $dump = "Body of request is:\n";
    
    if (is_object($body) || is_array($body)) {
      $dump .= json_encode($body);
    } elseif(is_string($body)) {
      $dump .= sprintf('"%s"',$body);
    }
    
    return $dump;
  }
430518
public function toString(){
		
		$s = "\n<!--OWEB displays all CSS includes-->\n";
		//DIsplaying all Css Headers
		foreach ($this->css_headers as $id => $h){
			$s .= $h->getCode($id);
		}
		
		$s .=  "\n<!--OWEB displays all JS includes and codes-->\n";
		
		//Displaying Javascript Headers
		foreach ($this->js_headers as $id => $h){
			$s .= $h->getCode($id);
		}
		
		$s .=  "\n<!--OWEB displays personalized header codes-->\n";
		//Displaying all other headers
		foreach ($this->other_headers as $id => $h){
			$s .= $h->getCode($id);
		}
		
		return $s;
	}
466105
public function importAction()
    {
        $success = null;
        $request = $this->getRequest();
        $data    = $request->getPost();
        $form    = $this->getServiceLocator()
                        ->get( 'Form' )
                        ->create( 'Grid\Paragraph\ChangeLayout\Import', array(
                            'returnUri' => $request->getQuery( 'returnUri' ),
                        ) );

        $form->setAttribute(
            'action',
            $this->url()
                 ->fromRoute( 'Grid\Paragraph\ChangeLayout\Import', array(
                     'locale'       => (string) $this->locale(),
                     'paragraphId'  => $this->paragraphId,
                     'returnUri'    => $request->getQuery( 'returnUri' ),
                 ) )
        );

        if ( $request->isPost() )
        {
            $form->setData( $data );

            if ( $form->isValid() )
            {
                $data       = $form->getData();
                $beforeId   = $this->getLayoutId();
                $clonedId   = $this->getParagraphModel()
                                   ->cloneFrom( $data['importId'], '_central' );
                $success    = $this->saveLayout( $clonedId );

                $this->getServiceLocator()
                     ->get( 'Grid\Menu\Model\Menu\Model' )
                     ->interleaveParagraphs( $clonedId, $beforeId );
            }
            else
            {
                $success    = false;
            }
        }

        if ( true === $success )
        {
            $this->messenger()
                 ->add( 'paragraph.action.importLayout.success',
                        'paragraph', Message::LEVEL_INFO );
        }

        if ( false === $success )
        {
            $this->messenger()
                 ->add( 'paragraph.action.importLayout.failed',
                        'paragraph', Message::LEVEL_ERROR );
        }

        if ( null !== $success )
        {
            return $this->redirect()
                        ->toUrl( $form->get( 'returnUri' )
                                      ->getValue() );
        }

        $view = new ViewModel( array(
            'form' => $form,
        ) );
        return $view->setTerminal( true );
    }
910571
public function getHeadersAsString()
    {
        $headerString = '';
        foreach ($this->getHeaders() as $name => $header) {
            // build up a header string
            $headerString .= $name . ': ' . $header . PHP_EOL;
        }

        return $headerString;
    }
1254710
public function tostring()
    {

        if (empty($this->value)) {

            return (empty($this->function)) ? "$this->function(`$this->name`)" : " `$this->name`";
        }

        $str = strtoupper($this->condition) . " `$this->name`";

        if (is_array($this->value)) {
            $str .= " IN (" . implode("','", $this->value) . "')";
        } else {
            $str .= " = '$this->value'";
        }

        return $str;
    }
859056
public function toString()
    {
        // reconstruct authority
        $authority = null;
        // there is a rendering difference between a null authority
        // (http:foo-bar) and an empty string authority
        // (http:///foo-bar).
        if (!is_null($this->host)) {
            $authority = '';
            if (!is_null($this->userinfo)) {
                $authority .= $this->userinfo . '@';
            }
            $authority .= $this->host;
            if (!is_null($this->port)) {
                $authority .= ':' . $this->port;
            }
        }

        // Reconstruct the result
        // One might wonder about parsing quirks from browsers after
        // this reconstruction.  Unfortunately, parsing behavior depends
        // on what *scheme* was employed (file:///foo is handled *very*
        // differently than http:///foo), so unfortunately we have to
        // defer to the schemes to do the right thing.
        $result = '';
        if (!is_null($this->scheme)) {
            $result .= $this->scheme . ':';
        }
        if (!is_null($authority)) {
            $result .= '//' . $authority;
        }
        $result .= $this->path;
        if (!is_null($this->query)) {
            $result .= '?' . $this->query;
        }
        if (!is_null($this->fragment)) {
            $result .= '#' . $this->fragment;
        }

        return $result;
    }
840455
public function toString(): string
    {
        // first line
        $output = $this->buildFirstLine() . self::EOL;

        // add headers
        $output .= $this->headers->toHeaderLines(true);

        // set cookies
        foreach ($this->cookies->toHeaders() as $value) {
            $output .= "Set-Cookie: $value" . self::EOL;
        }

        $output .= self::EOL;

        return $output . $this->getBody();
    }
166566
public function toString()
    {
        if ($this->hidden) {
            return '';
        }
        
        $result = trim($this->getName() . ' ' . (!empty($this->version) && !$this->version->hidden ? $this->getVersion() : ''));

        if (empty($result) && isset($this->using)) {
            return $this->using->toString();
        }

        return $result;
    }
251325
public function getHeaderString()
    {
        $parts = [
            $this->name . '=' . rawurlencode($this->value),
            $this->getMaxAgeString(),
            $this->getExpiresString(),
            $this->getDomainString(),
            $this->getPathString(),
            $this->getSecureString(),
            $this->getHttpOnlyString(),
        ];

        $filteredParts = array_filter($parts);

        return implode('; ', $filteredParts);
    }
563278
public function toString()
    {
        $output = 'data:';

        if (($this->getMediaType() !== self::DEFAULT_TYPE) || ($this->getEncoding() !== self::ENCODING_URL_ENCODED_OCTETS)) {
            $output .= $this->getMediaType();

            if ($this->getEncoding() === self::ENCODING_BASE64) {
                $output .= ';'.self::BASE64_KEYWORD;
            }
        }

        $output .= ','.$this->getEncodedData();

        return $output;
    }
856769
private static function string()
    {
        $files = ['Strings'];
        $folder = static::$root.'Strings'.'/';

        self::call($files, $folder);

        $files = ['StringOutIndexException'];
        $folder = static::$root.'Strings/Exceptions'.'/';

        self::call($files, $folder);
    }
830433
public function toString()
    {
        $query = '';

        switch ($this->type) {
            case 'select':
                $query .= (string) $this->select;
                $query .= (string) $this->from;

                if ($this->join) {
                    // Special case for joins
                    foreach ($this->join as $join) {
                        $query .= (string) $join;
                    }
                }

                if ($this->where) {
                    $query .= (string) $this->where;
                }

                if ($this->group) {
                    $query .= (string) $this->group;
                }

                if ($this->having) {
                    $query .= (string) $this->having;
                }

                if ($this->order) {
                    $query .= (string) $this->order;
                }

                if ($this->forUpdate) {
                    $query .= (string) $this->forUpdate;
                } else {
                    if ($this->forShare) {
                        $query .= (string) $this->forShare;
                    }
                }

                if ($this->noWait) {
                    $query .= (string) $this->noWait;
                }

                break;

            case 'update':
                $query .= (string) $this->update;
                $query .= (string) $this->set;

                if ($this->join) {
                    $onWord = ' ON ';

                    // Workaround for special case of JOIN with UPDATE
                    foreach ($this->join as $join) {
                        $joinElem = $join->getElements();

                        $joinArray = explode($onWord, $joinElem[0]);

                        $this->from($joinArray[0]);
                        $this->where($joinArray[1]);
                    }

                    $query .= (string) $this->from;
                }

                if ($this->where) {
                    $query .= (string) $this->where;
                }

                break;

            case 'insert':
                $query .= (string) $this->insert;

                if ($this->values) {
                    if ($this->columns) {
                        $query .= (string) $this->columns;
                    }

                    $elements = $this->values->getElements();

                    if (!($elements[0] instanceof $this)) {
                        $query .= ' VALUES ';
                    }

                    $query .= (string) $this->values;

                    if ($this->returning) {
                        $query .= (string) $this->returning;
                    }
                }

                break;

            default:
                $query = parent::toString();
                break;
        }

        $query = $this->processLimit($query, $this->limit, $this->offset);

        if ($this->suffix) {
            $query .= ' ' . (string) $this->suffix;
        }

        if ($this->type === 'select' && $this->alias !== null) {
            $query = sprintf('(%s) AS %s', $query, $this->alias);
        }

        return $query;
    }
185269
public function toString(): string
    {
        $content = $this->content;
        $contentType = $this->contentType;

        if ($this->isString()) {
            return $content;
        } elseif ($this->isImage()) {
            switch ($contentType) {
                case self::CONTENT_TYPE_IMAGE_JPEG:
                    imagejpeg($content)
                        && imagedestroy($content);
                    break;
                case self::CONTENT_TYPE_IMAGE_PNG:
                    imagepng($content)
                        && imagedestroy($content);
                    break;
                case self::CONTENT_TYPE_IMAGE_GIF:
                    imagegif($content)
                        && imagedestroy($content);
                    break;
                default:
                    throw new HttpException("Unimplemented content type '{$contentType}'");
            }
            return '';
        }
    }
681302
public function toString()
    {
        $result = '';

        if (!empty($this->scheme)) {
            $result.= $this->scheme . ':';
        }

        if (!empty($this->authority)) {
            $result.= '//' . $this->authority;
        }

        $result.= $this->path;

        if (!empty($this->query)) {
            $result.= '?' . $this->query;
        }

        if (!empty($this->fragment)) {
            $result.= '#' . $this->fragment;
        }

        return $result;
    }
629157
public function getTransactionString()
    {
        return sprintf(
                "Paymentmethod: %s \n| OrderID: %s \n| Status: %s \n| StatusCode: %s \n| PaymentID: %s \n| TransactionID: %s \n| Amount: %s", isset($this->data->paymentMethod) ? $this->data->paymentMethod : "", isset($this->data->orderID) ? $this->data->orderID : "", isset($this->data->status) ? $this->data->status : "", isset($this->data->statusCode) ? $this->data->statusCode : "", isset($this->data->paymentID) ? $this->data->paymentID : "", isset($this->data->transactionID) ? $this->data->transactionID : "", isset($this->data->amount) ? $this->data->amount : ""
        );
    }
128790
public function toString()
    {
        if (!$this->getPath()) {
            return '';
        }

        $path = preg_replace('/^\\\/', '', $this->getPath());

        $namespace = $this->getDocBlock()->setTabulation($this->getTabulation())->toString()
            . $this->getTabulationFormatted()
            . 'namespace '
            . $path
            . ';' . PHP_EOL;

        return $namespace;
    }
1374156
public function toString()
    {
        if (substr($this->name, -2) === '()') {
            return PHP_EOL . substr($this->name, 0, -2) . '(' . implode($this->glue, $this->elements) . ')';
        } else {
            return PHP_EOL . $this->name . ' ' . implode($this->glue, $this->elements);
        }
    }