public function error( $message, $code = null, $data = null )
    {
        if ( null === $code && isset( $this->errorCodes[$message] ) )
        {
            $code = $this->errorCodes[$message];
        }

        return $this->getResponse( 'error', (object) array(
            'code'      => $code,
            'message'   => $message,
            'data'      => $data,
        ) );
    }
public function error( $message, $code = null, $data = null )
    {
        if ( null === $code && isset( $this->errorCodes[$message] ) )
        {
            $code = $this->errorCodes[$message];
        }

        return $this->getResponse( 'error', (object) array(
            'code'      => $code,
            'message'   => $message,
            'data'      => $data,
        ) );
    }
public function error ( $ message , $ code = null , $ data = null ) { if ( null === $ code && isset ( $ this -> errorCodes [ $ message ] ) ) { $ code = $ this -> errorCodes [ $ message ] ; } return $ this -> getResponse ( 'error' , ( object ) array ( 'code' => $ code , 'message' => $ message , 'data' => $ data , ) ) ; }
Send error result

@param string $message
@param int $code
@param mixed $data
Send error result