Skip to content

Commit

Permalink
Added cascadeCallbacks accessor/mutator
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpustulka committed Aug 22, 2014
1 parent 43f0ca0 commit 9085ebb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ORM/Association.php
Expand Up @@ -209,6 +209,19 @@ public function name($name = null) {
return $this->_name;
}

/**
* Sets whether or not cascaded deletes should also fire callbacks.
*
* @param bool $cascadeCallbacks cascade callbacks switch value
* @return bool
*/
public function cascadeCallbacks($cascadeCallbacks = null) {
if ($cascadeCallbacks !== null) {
$this->_cascadeCallbacks = $cascadeCallbacks;
}
return $this->_cascadeCallbacks;
}

/**
* Sets the table instance for the source side of the association. If no arguments
* are passed, the current configured table instance is returned
Expand Down

0 comments on commit 9085ebb

Please sign in to comment.