public function runBeforeSave(array &$data)
    {
        $beforeSave = $this->getOption('before_save');

        if (is_callable($beforeSave)) {
            $bs = $beforeSave($data);

            //if a string is returned, assume it's an error and kick it back
            if (is_string($bs)) {
                return $bs;
            }
        }

        return true;
    }
public function runBeforeSave(array &$data)
    {
        $beforeSave = $this->getOption('before_save');

        if (is_callable($beforeSave)) {
            $bs = $beforeSave($data);

            //if a string is returned, assume it's an error and kick it back
            if (is_string($bs)) {
                return $bs;
            }
        }

        return true;
    }
public function runBeforeSave ( array & $ data ) { $ beforeSave = $ this -> getOption ( 'before_save' ) ; if ( is_callable ( $ beforeSave ) ) { $ bs = $ beforeSave ( $ data ) ; //if a string is returned, assume it's an error and kick it back if ( is_string ( $ bs ) ) { return $ bs ; } } return true ; }
Runs the before save method with the supplied data.

@param array $data
@param mixed
Runs the before save method with the supplied data .