src/wcmf/lib/model/AbstractQuery.php
public function getQueryString($buildDepth=BuildDepth::SINGLE, $orderby=null) {
    $selectStmt = $this->buildQuery($buildDepth, $orderby);
    $str = $selectStmt->__toString();
    $mapper = self::getMapper($selectStmt->getType());
    foreach ($selectStmt->getParameters() as $key => $value) {
      $value = is_string($value) ? $mapper->quoteValue($value) : $value;
      $str = preg_replace('/'.$key.'/', $value, $str, 1);
    }
    return $str;
  }
public function getQueryString($buildDepth=BuildDepth::SINGLE, $orderby=null) {
    $selectStmt = $this->buildQuery($buildDepth, $orderby);
    $str = $selectStmt->__toString();
    $mapper = self::getMapper($selectStmt->getType());
    foreach ($selectStmt->getParameters() as $key => $value) {
      $value = is_string($value) ? $mapper->quoteValue($value) : $value;
      $str = preg_replace('/'.$key.'/', $value, $str, 1);
    }
    return $str;
  }
public function getQueryString ( $ buildDepth = BuildDepth :: SINGLE , $ orderby = null ) { $ selectStmt = $ this -> buildQuery ( $ buildDepth , $ orderby ) ; $ str = $ selectStmt -> __toString ( ) ; $ mapper = self :: getMapper ( $ selectStmt -> getType ( ) ) ; foreach ( $ selectStmt -> getParameters ( ) as $ key => $ value ) { $ value = is_string ( $ value ) ? $ mapper -> quoteValue ( $ value ) : $ value ; $ str = preg_replace ( '/' . $ key . '/' , $ value , $ str , 1 ) ; } return $ str ; }
Get the query serialized to a string. Placeholder are replaced with quoted values.
@param $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to load (except BuildDepth::REQUIRED)
or false if only object ids should be returned (optional, default: _BuildDepth::SINGLE_)
@param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: _null_)
@return String
Get the query serialized to a string . Placeholder are replaced with quoted values .