Swiftriver\Core\Modules\SiSPS\PushParsers\QuiverPushParser::PushAndParse PHP Method

PushAndParse() public method

Implementation of IPushParser::PushAndParse
public PushAndParse ( $raw_content = null, $post_content = null, $get_content = null, $file_content = null ) : Content[]
$raw_content
$post_content
$get_content
$file_content
return Swiftriver\Core\ObjectModel\Content[] contentItems
    public function PushAndParse($raw_content = null, $post_content = null, $get_content = null, $file_content = null)
    {
        $logger = \Swiftriver\Core\Setup::GetLogger();
        $logger->log("Core::Modules::SiSPS::PushParsers::QuiverParser::PushAndParse [Method invoked]", \PEAR_LOG_DEBUG);
        $logger->log("Core::Modules::SiSPS::PushParsers::QuiverParser::PushAndParse [START: Extracting required parameters]", \PEAR_LOG_DEBUG);
        $settings = $this->GetSettings();
        $source_name = $this->ReturnType();
        $source = \Swiftriver\Core\ObjectModel\ObjectFactories\SourceFactory::CreateSourceFromIdentifier($source_name, $settings["trusted"]);
        $source->parent = $this->ReturnType();
        $source->name = $source_name;
        $source->link = $get_content["u"];
        $source->type = $this->ReturnType();
        $source->subType = $this->ReturnType();
        //Create a new Content item
        $item = \Swiftriver\Core\ObjectModel\ObjectFactories\ContentFactory::CreateContent($source);
        //Fill the Content Item
        $item->text[] = new \Swiftriver\Core\ObjectModel\LanguageSpecificText(null, $get_content["s"], array($get_content["s"]));
        $item->link = $get_content["u"];
        $item->date = time();
        //Add the item to the Content array
        $contentItems[] = $item;
        //return the content array
        return $contentItems;
    }