protected function applyQuerySettings($query, array $settings) {
    if (!empty($settings)) {
      $respectStoragePage = $settings['respectStoragePage'];

      if (is_bool($respectStoragePage)) {
        $query->getQuerySettings()->setRespectStoragePage($respectStoragePage);
      }

      $respectSysLanguage = $settings['respectSysLanguage'];

      if (is_bool($respectSysLanguage)) {
        $query->getQuerySettings()->setRespectSysLanguage($respectSysLanguage);
      }

      $returnRawQueryResult = $settings['returnRawQueryResult'];

      if (is_bool($returnRawQueryResult)) {
        $query->getQuerySettings()->setReturnRawQueryResult($returnRawQueryResult);
      }
    }

    return $query;
  }
protected function applyQuerySettings($query, array $settings) {
    if (!empty($settings)) {
      $respectStoragePage = $settings['respectStoragePage'];

      if (is_bool($respectStoragePage)) {
        $query->getQuerySettings()->setRespectStoragePage($respectStoragePage);
      }

      $respectSysLanguage = $settings['respectSysLanguage'];

      if (is_bool($respectSysLanguage)) {
        $query->getQuerySettings()->setRespectSysLanguage($respectSysLanguage);
      }

      $returnRawQueryResult = $settings['returnRawQueryResult'];

      if (is_bool($returnRawQueryResult)) {
        $query->getQuerySettings()->setReturnRawQueryResult($returnRawQueryResult);
      }
    }

    return $query;
  }
protected function applyQuerySettings ( $ query , array $ settings ) { if ( ! empty ( $ settings ) ) { $ respectStoragePage = $ settings [ 'respectStoragePage' ] ; if ( is_bool ( $ respectStoragePage ) ) { $ query -> getQuerySettings ( ) -> setRespectStoragePage ( $ respectStoragePage ) ; } $ respectSysLanguage = $ settings [ 'respectSysLanguage' ] ; if ( is_bool ( $ respectSysLanguage ) ) { $ query -> getQuerySettings ( ) -> setRespectSysLanguage ( $ respectSysLanguage ) ; } $ returnRawQueryResult = $ settings [ 'returnRawQueryResult' ] ; if ( is_bool ( $ returnRawQueryResult ) ) { $ query -> getQuerySettings ( ) -> setReturnRawQueryResult ( $ returnRawQueryResult ) ; } } return $ query ; }
Applies settings on a query.

@param object $query The query
@param array $settings The settings to apply
@return object The query with the applied settings
Applies settings on a query .