protected function handle($fn)
    {
        $this->handled = true;

        // Converts string to array
        $content = $fn($this, $this->wei) ?: '';
        if ($content && !is_array($content)) {
            $content = $this->sendText($content);
        }
        $this->beforeSend && call_user_func_array($this->beforeSend, array($this, &$content, $this->wei));

        return $content ? $this->arrayToXml($content)->asXML() : '';
    }
protected function handle($fn)
    {
        $this->handled = true;

        // Converts string to array
        $content = $fn($this, $this->wei) ?: '';
        if ($content && !is_array($content)) {
            $content = $this->sendText($content);
        }
        $this->beforeSend && call_user_func_array($this->beforeSend, array($this, &$content, $this->wei));

        return $content ? $this->arrayToXml($content)->asXML() : '';
    }
protected function handle ( $ fn ) { $ this -> handled = true ; // Converts string to array $ content = $ fn ( $ this , $ this -> wei ) ? : '' ; if ( $ content && ! is_array ( $ content ) ) { $ content = $ this -> sendText ( $ content ) ; } $ this -> beforeSend && call_user_func_array ( $ this -> beforeSend , array ( $ this , & $ content , $ this -> wei ) ) ; return $ content ? $ this -> arrayToXml ( $ content ) -> asXML ( ) : '' ; }
Executes callback handler

@param Closure $fn
@return string
Executes callback handler