/** * Declares an association between this object and a ChildResource object. * * @param ChildResource $v * @return $this|\App\Propel\ResourceFile The current object (for fluent API support) * @throws PropelException */ public function setResource(ChildResource $v = null) { if ($v === null) { $this->setResourceId(NULL); } else { $this->setResourceId($v->getResourceId()); } $this->aResource = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildResource object, it will not be re-added. if ($v !== null) { $v->addResourceFile($this); } return $this; }