public function addError($error)
    {
        if (is_string($error)) {
            $error = array('message' => $error);
        }

        if (is_array($error)) {
            $error = new AnError($error);
        }

        if (!isset($this->_errors[$this->_mixer])) {
            $this->_errors[$this->_mixer] = new AnObjectSet();
        }

        $this->_errors[$this->_mixer]->insert($error);

        return $this;
    }
public function addError($error)
    {
        if (is_string($error)) {
            $error = array('message' => $error);
        }

        if (is_array($error)) {
            $error = new AnError($error);
        }

        if (!isset($this->_errors[$this->_mixer])) {
            $this->_errors[$this->_mixer] = new AnObjectSet();
        }

        $this->_errors[$this->_mixer]->insert($error);

        return $this;
    }
public function addError ( $ error ) { if ( is_string ( $ error ) ) { $ error = array ( 'message' => $ error ) ; } if ( is_array ( $ error ) ) { $ error = new AnError ( $ error ) ; } if ( ! isset ( $ this -> _errors [ $ this -> _mixer ] ) ) { $ this -> _errors [ $ this -> _mixer ] = new AnObjectSet ( ) ; } $ this -> _errors [ $ this -> _mixer ] -> insert ( $ error ) ; return $ this ; }
Adds an error object for.

@param AnError|array|string $error Error object

@return AnDomainBehaviorValidatable
Adds an error object for .