Skip to content

Commit

Permalink
Make "->bind" consistent with "set", "setProperty"
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Oct 10, 2017
1 parent 4f5ae1b commit fa599bd
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions libraries/cms/cck/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,22 @@ public function batchResults()
return $this;
}

// bind
public function bind( $instance_name, $data )
{
if ( !$this->isSuccessful() ) {
return $this;
}

$result = $this->{'_instance_'.$instance_name}->bind( $data );

if ( !$result ) {
$this->_error = true;
}

return $this;
}

// call
public function call()
{
Expand Down Expand Up @@ -964,15 +980,7 @@ protected function isNew()

// -------- -------- -------- -------- -------- -------- -------- -------- // Save

// bind
public function bind( $instance_name, $data )
{
if ( !$this->isSuccessful() ) {
return false;
}

return $this->{'_instance_'.$instance_name}->bind( $data );
}

// check
public function check( $instance_name )
Expand Down

0 comments on commit fa599bd

Please sign in to comment.