/** Breaks links to all previously linked $example. * $example can be either a string of the classname, or an instance of the class itself * If $relation is provided, only matched relations will be delinked */ function deLinkAll($example, $relation = NULL) { if (is_string($example)) { $subject = new $example(); } else { $subject = $example; } $link = new AmortizeLink($this, $subject); return $link->breakLink($this->getPrimary(), NULL, $relation); }