Exclude object from result

@param   ApiLog $apiLog Object to remove from the list of results

@return ApiLogQuery The current query, for fluid interface
969780
public function prune($apiLog = null)
    {
        if ($apiLog) {
            $this->addUsingAlias(ApiLogPeer::ID, $apiLog->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
879168
public QueryBuilder exceptAll() {
        this.firstQuery = query();
        this.firstQuerySetOperation = Operation.EXCEPT;
        this.firstQueryAll = true;
        clear(false);
        return this;
    }
1027168
@PostConstruct
    @SuppressWarnings("checkstyle:emptycatchblock")
    void excludeLoggers() {
        try {
            // Exclude Tomcat logger when processing HTTP requests via a servlet.
            // Regex specified to match the servlet variable parts of the logger name, e.g.
            // the Spring Boot default is:
            // [Tomcat].[localhost].[/].[dispatcherServlet]
            // but could be something like:
            // [Tomcat-1].[127.0.0.1].[/subdomain/].[customDispatcher]
            BugsnagAppender.addExcludedLoggerPattern("org.apache.catalina.core.ContainerBase."
                    + "\\[Tomcat.*\\][.]\\[.*\\][.]\\[/.*\\][.]\\[.*\\]");

            // Exclude Jetty logger when processing HTTP requests via the HttpChannel
            BugsnagAppender.addExcludedLoggerPattern("org.eclipse.jetty.server.HttpChannel");

            // Exclude Undertow logger when processing HTTP requests
            BugsnagAppender.addExcludedLoggerPattern("io.undertow.request");
        } catch (NoClassDefFoundError ignored) {
            // logback was not in classpath, ignore throwable to allow further initialisation
        }
    }
1047193
public function prune($record = null)
    {
        if ($record) {
            $this->addUsingAlias(RecordTableMap::COL_ID, $record->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
1197073
protected function disableLogging()
    {
        //TODO: do we need to add support for MongoDB logging?
        if (!($this->objectManager instanceof \Doctrine\ORM\EntityManager)) return;

        $config = $this->objectManager->getConnection()->getConfiguration();
        $this->originalLogger = $config->getSQLLogger();
        $config->setSQLLogger(null);
    }
1129193
public function index()
    {
        $this->validate();

        $results = $this->parseRequest()
            ->addIncludes()
            ->addFilters()
            ->addOrdering()
            ->addPaging()
            ->modify()
            ->getResults()
            ->toArray();

        $meta = $this->getMetaData();

        return ApiResponse::make(null, $results, $meta);
    }
1210235
public function filter(&$logs)
	{
		if (!empty($logs))
		{
			if(($message=$this->getContext())!=='')
				array_unshift($logs,array($message,CLogger::LEVEL_INFO,'application',YII_BEGIN_TIME));
			$this->format($logs);
		}
		return $logs;
	}
1116333
public function destroyAll(VisitLogModel $visitLog)
    {
        if (!$visitLog->truncate()) {
            return Redirect::back()->withErrors($visitLog->errors());
        }

        return Redirect::back();
    }
944972
public function prune($team = null)
    {
        if ($team) {
            $this->addUsingAlias(TeamTableMap::ID, $team->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
346272
function removeAPI(name, ignoreNotFound) {
  return function (done) {
    API.removeByName(name, function (err, api) {
      if (api) {
        done(null, api);
      } else {
        if (err && err.message == NOT_FOUND) {
          if (ignoreNotFound) {
            done(null, false);
          } else {
            done(err);
          }
        } else {
          console.log(err);
          done(err);
        }
      }
    });
  }
}
546580
public function login( ApiUser $apiUser ) {
		$this->logger->log( LogLevel::DEBUG, 'Logging in' );
		$credentials = $this->getLoginParams( $apiUser );
		$result = $this->postRequest( new SimpleRequest( 'login', $credentials ) );
		if ( $result['login']['result'] == "NeedToken" ) {
			$params = array_merge( [ 'lgtoken' => $result['login']['token'] ], $credentials );
			$result = $this->postRequest( new SimpleRequest( 'login', $params ) );
		}
		if ( $result['login']['result'] == "Success" ) {
			$this->isLoggedIn = $apiUser->getUsername();
			return true;
		}

		$this->isLoggedIn = false;
		$this->logger->log( LogLevel::DEBUG, 'Login failed.', $result );
		$this->throwLoginUsageException( $result );
		return false;
	}
899957
function(query, mongooseQuery, logger) {
    if (query.$sort) {
      if (Array.isArray(query.$sort)) {
        query.$sort = query.$sort.join(' ')
      }
      mongooseQuery.sort(query.$sort)
      delete query.$sort
    }
    return mongooseQuery
  }
1191040
public function deleteApiKey($apikey)
    {
        $endPointUrl = $this->apiurl."/account/apikey/".$apikey;

        $response = $this->curlDelete($endPointUrl);

        return $response;
    }
564618
public function clearLog()
    {
        $qb = $this->createQueryBuilder();
        $query = $qb->getConnection()
            ->getDatabasePlatform()
            ->getTruncateTableSQL($this->getTableName());

        return $qb->getConnection()->executeQuery($query)->execute();
    }
363504
def exclude(self, twig=None, check_visible=True, **kwargs):
        
        return self - self.filter(twig=twig,
                                  check_visible=check_visible,
                                  **kwargs)
1288659
public function allowLogs($flag = true)
    {
        $this->allowLogs = (bool) $flag;
        
        if (true === $flag) {
            $this->init();
        }
        
        return $this;
    }
1325253
public function excluding(Collection $products)
	{
		$ids = $products->pluck('id');

		if ($this->excluding->count() == 0) {
			$this->excluding = $ids;
		} else {
			foreach ($ids as $id) {
				$this->excluding->push($id);
			}
		}

		return $this;
	}