Skip to content

Commit

Permalink
setters should provide fluent interface
Browse files Browse the repository at this point in the history
setNew, setDeleted and resetModified should return $this as all the other setters to provide fluent interface.
  • Loading branch information
Gamesh committed Dec 18, 2013
1 parent 93f9fc8 commit 13505a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions runtime/lib/om/BaseObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ public function isNew()
* by Propel-generated children and Peers.
*
* @param boolean $b the state of the object.
* @return self
*/
public function setNew($b)
{
$this->_new = (boolean) $b;
return $this;
}

/**
Expand All @@ -137,11 +139,12 @@ public function isDeleted()
*
* @param boolean $b The deleted state of this object.
*
* @return void
* @return self
*/
public function setDeleted($b)
{
$this->_deleted = (boolean) $b;
return $this;
}

/**
Expand Down Expand Up @@ -242,7 +245,7 @@ public function postHydrate($row, $startcol = 0, $rehydrate = false)
*
* @param string $col If supplied, only the specified column is reset.
*
* @return void
* @return self
*/
public function resetModified($col = null)
{
Expand All @@ -253,6 +256,7 @@ public function resetModified($col = null)
} else {
$this->modifiedColumns = array();
}
return $this;
}

/**
Expand Down

0 comments on commit 13505a8

Please sign in to comment.