Set result
@param mixed $result Result
@return void
351337
public function setResult($result = null)
    {
        $this->result = $result;
        $this->state = self::STATE_DONE;
        if ($this->listeners) {
            $this->listeners->executeAll($this->result);
        }
    }
821609
public function when($result)
    {
        if (\is_callable($result)) {
            $result = $result();
        }

        if ($this->can_proceed() && $result !== true) {
            $this->shortcircuit = true;
        }

        return $this;
    }
152248
def _set_result(self, result):
        
        if self._result_set.isSet():
            return
        self._value = result
        self._result_set.set()
1130460
public function setResult($name = null, $result = null)
    {
        if (null === $result) {
            $result = $name;
            array_push($this->results, $result);

            return $this;
        }

        $this->results[(string) $name] = $result;

        return $this;
    }
1266000
public function sendResult($result)
    {
        if (@ob_get_length()) {
            @ob_end_clean();
        }
        if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            header('Content-Type: application/json; charset=' . APP_CHARSET, true);
        } else {
            header('Content-Type: text/plain; charset=' . APP_CHARSET, true);
        }
        echo json_encode($result);
        die();
    }
835681
public function addResult($child, $result) {
        if (!$result instanceof Result\ResultInterface) {
            throw new RuntimeException('Result type must be implements ResultInterface');
        }
        $this->results[$child - 1] = $result;
    }
1358262
def set_result(self, result):
        """"""

        if self.is_finished():
            raise InternalError("set_result called on finished AsynchronousResponse",
                                result=self._result, exception=self._exception)

        self._result = result
        self.finish()
558171
public function setResultsCount($resultsCount)
  {
    $this->resultsCount = $resultsCount;
    $this->nbPages = ceil($this->resultsCount / $this->maxByPage);
  }
590530
protected function processResult($result)
    {
        $output = Helper::objectToArray($result);

        if (! is_array($output)) {
            throw new Error\Api($output);
        }

        if (isset($output['result'])) {
            return $output;
        }

        if (
            isset($output['request']) &&
            $output['request']['result'] != 1 &&
            $output['request']['result'] !== 'TRUE') {
            throw new Error\Api($output['request']['errorId'] . ' - ' . $output['request']['errorMessage']);
        }

        return $output;
    }
1105974
def set_result(self, result):
        """"""
        self._result = result
        self._result_set = True
        self._invoke_callbacks(self)
851491
function setViewResult( $result, $view = '' )
    {
        if ( $view == '' )
            $view = $this->currentView();
        $this->ViewResult[$view] = $result;
    }
1046313
public function setValue($value)
    {
        // special case for boolean values
        if (is_bool($value)) {
            if ($value) {
                $this->_value = "true";
            } else {
                $this->_value = "false";
            }
        } else {
            $this->_value = (string) $value;
        }
    }
1025931
public function setParent(Result $parent)
    {
        if ($this->parent !== $parent) {
            $this->parent = $parent;
            if ($this->hasErrors()) {
                $parent->setErrorsExist();
            }
            if ($this->hasWarnings()) {
                $parent->setWarningsExist();
            }
            if ($this->hasNotices()) {
                $parent->setNoticesExist();
            }
        }
    }
1147198
public function afterProcess(&$result)
    {
        if ($this->hasEventHandlers(self::EVENT_AFTER_PROCESS)) {
            $event = new ProcessEvent($this->message, $this->getWechat());
            $event->result = $result;
            $this->trigger(self::EVENT_AFTER_PROCESS, $event);
            $result = $event->result;
        }
    }
1277048
public function setCount( $count )
	{
		if ( $count == $this->getCount() ) { return; }

		$this->_values['count'] = (string) $count;
		$this->setModified();
	}
671581
public function setControllerResult($result)
    {
        $event = $this->getSymfonyEvent();
        if ($event instanceof GetResponseForControllerResultEvent) {
            $event->setControllerResult($result);
        }

        return $this;
    }
644265
private static function treatment($result)
    {
        if (is_string($result)) {
            echo $result;
        } elseif ($result instanceof Views) {
            View::show($result);
        }
    }