Pocket::toString PHP Method

toString() public method

public toString ( null $Data = NULL ) : mixed | string
$Data null
return mixed | string
    public function toString($Data = NULL)
    {
        static $Plugin;
        if (!isset($Plugin)) {
            $Plugin = Gdn::pluginManager()->getPluginInstance('PocketsPlugin', Gdn_PluginManager::ACCESS_CLASSNAME);
        }
        $Plugin->EventArguments['Pocket'] = $this;
        $Plugin->fireEvent('ToString');
        if (strcasecmp($this->Format, 'raw') == 0) {
            return $this->Body;
        } else {
            return Gdn_Format::to($this->Body, $this->Format);
        }
    }