Add chaining ability to JTable #1154

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@elkuku
Joomla! member

No description provided.

@eddieajau eddieajau commented on the diff Apr 17, 2012
libraries/joomla/table/table.php
@@ -489,7 +493,7 @@ public function load($keys = null, $reset = true)
// If empty primary key there's is no need to load anything
if (empty($keyValue))
{
- return true;
@eddieajau
eddieajau Apr 17, 2012

There's still a return false in load, and the DocBlock would need to be changed. Is there a risk the chaining here will cause a false positive in terms of backward compatibility?

@eddieajau eddieajau commented on the diff Apr 17, 2012
libraries/joomla/table/table.php
*
* @link http://docs.joomla.org/JTable/check
* @since 11.1
*/
public function check()
{
- return true;
@eddieajau
eddieajau Apr 17, 2012

Check is often called and return value checked. I think this might cause a few problems ... you think?

@eddieajau eddieajau commented on the diff Apr 17, 2012
libraries/joomla/table/table.php
@@ -590,7 +594,7 @@ public function store($updateNulls = false)
// If the table is not set to track assets return true.
if (!$this->_trackAssets)
{
- return true;
@eddieajau
eddieajau Apr 17, 2012

Store has quite a few return false statements so I'm not sure we can chain it.

@eddieajau eddieajau commented on the diff Apr 17, 2012
libraries/joomla/table/table.php
@@ -713,7 +717,7 @@ public function save($src, $orderingFilter = '', $ignore = '')
// Set the error to empty and return true.
$this->setError('');
- return true;
@eddieajau
eddieajau Apr 17, 2012

Same in the save method. return false and other methods like delete.

@elkuku elkuku closed this Jul 17, 2012
@elkuku
Joomla! member

another day..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment