/** * @param ChildCode $code The ChildCode object to add. */ protected function doAddCode(ChildCode $code) { $this->collCodes[] = $code; $code->setClient($this); }
/** * Filter the query by a related \Models\Code object * * @param \Models\Code|ObjectCollection $code the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildClientQuery The current query, for fluid interface */ public function filterByCode($code, $comparison = null) { if ($code instanceof \Models\Code) { return $this->addUsingAlias(ClientTableMap::COL_CLIENT_ID, $code->getClientId(), $comparison); } elseif ($code instanceof ObjectCollection) { return $this->useCodeQuery()->filterByPrimaryKeys($code->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByCode() only accepts arguments of type \\Models\\Code or Collection'); } }
/** * Exclude object from result * * @param ChildCode $code Object to remove from the list of results * * @return $this|ChildCodeQuery The current query, for fluid interface */ public function prune($code = null) { if ($code) { $this->addUsingAlias(CodeTableMap::COL_ID, $code->getId(), Criteria::NOT_EQUAL); } return $this; }
public function setAuthorizationCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = null) { $acode = new Code(); $acode->setCode($code)->setClientId($client_id)->setRedirectUri($redirect_uri)->setExpires($expires)->setScope($scope)->save(); }