Permalink
Browse files

Merge pull request #804 from Gamesh/patch-1

setters should provide fluent interface
  • Loading branch information...
2 parents d3136b1 + 13505a8 commit 1eda8f318ef1e056a30b17ac7ddd0cf6bf0d4a07 @willdurand willdurand committed Dec 31, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 runtime/lib/om/BaseObject.php
View
8 runtime/lib/om/BaseObject.php
@@ -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;
}
/**
@@ -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;
}
/**
@@ -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)
{
@@ -253,6 +256,7 @@ public function resetModified($col = null)
} else {
$this->modifiedColumns = array();
}
+ return $this;
}
/**

0 comments on commit 1eda8f3

Please sign in to comment.