Example #1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aClient) {
         $this->aClient->removeToken($this);
     }
     $this->id = null;
     $this->client_id = null;
     $this->token = null;
     $this->scope = null;
     $this->expires = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Example #2
0
 /**
  * Filter the query by a related \Models\Client object
  *
  * @param \Models\Client|ObjectCollection $client The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildTokenQuery The current query, for fluid interface
  */
 public function filterByClient($client, $comparison = null)
 {
     if ($client instanceof \Models\Client) {
         return $this->addUsingAlias(TokenTableMap::COL_CLIENT_ID, $client->getClientId(), $comparison);
     } elseif ($client instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TokenTableMap::COL_CLIENT_ID, $client->toKeyValue('PrimaryKey', 'ClientId'), $comparison);
     } else {
         throw new PropelException('filterByClient() only accepts arguments of type \\Models\\Client or Collection');
     }
 }
Example #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildClient $client Object to remove from the list of results
  *
  * @return $this|ChildClientQuery The current query, for fluid interface
  */
 public function prune($client = null)
 {
     if ($client) {
         $this->addUsingAlias(ClientTableMap::COL_ID, $client->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }