Doctrine\DBAL\Query\Expression\CompositeExpression::__toString PHP Method

__toString() public method

Retrieves the string representation of this composite expression.
public __toString ( ) : string
return string
    public function __toString()
    {
        if ($this->count() === 1) {
            return (string) $this->parts[0];
        }
        return '(' . implode(') ' . $this->type . ' (', $this->parts) . ')';
    }

Usage Example

 /**
  * Retrieves the string representation of this composite expression.
  *
  * @return string
  */
 public function __toString()
 {
     if ($this->count() === 0) {
         return '';
     }
     return parent::__toString();
 }
All Usage Examples Of Doctrine\DBAL\Query\Expression\CompositeExpression::__toString