public function getResult($name = null, $default = null)
    {
        if (null === $name) {
            return end($this->results);
        }
        if (! isset($this->results[$name])) {
            return $default;
        }

        return $this->results[$name];
    }
public function getResult($name = null, $default = null)
    {
        if (null === $name) {
            return end($this->results);
        }
        if (! isset($this->results[$name])) {
            return $default;
        }

        return $this->results[$name];
    }
public function getResult ( $ name = null , $ default = null ) { if ( null === $ name ) { return end ( $ this -> results ) ; } if ( ! isset ( $ this -> results [ $ name ] ) ) { return $ default ; } return $ this -> results [ $ name ] ; }
Gets event result.

If the result name is not specified, returns the last result.
If the result with specified name does not exist, the $default value
will be returned.

@param string $name    Optional; the name of result
@param mixed  $default Optional; the default result value

@return mixed The result of event
Gets event result .