Build the blog RSS feed.

@return void
503800
protected function buildRSSFeed()
    {
        $builder = new RSSFeedBuilder(
            $this->filesystem,
            $this->viewFactory,
            $this->viewsData
        );

        $builder->build();
    }
537077
protected function rssFeed($blogPosts, $link)
    {
        $rss = RSSFeed::create($blogPosts, $link, $this->MetaTitle, $this->MetaDescription);

        $this->extend('updateRss', $rss);

        return $rss->outputToBrowser();
    }
356209
public function run()
    {
        DB::table('posts')->delete();

        $post = array(
            'title'      => 'Hello World',
            'summary'    => 'This is the first blog post.',
            'body'       => 'This is an example blog post.',
            'user_id'    => 1,
            'created_at' => new DateTime,
            'updated_at' => new DateTime
        );

        DB::table('posts')->insert($post);
    }
860429
public function build()
    {
        if ($this->updateRequired) {
            $this->updateRequired = false;
            foreach ($this->nodes as $node) {
                if ($node->parent()) {
                    $node->unlock()->detach();
                }
            }
            $this->root->addChildren($this->builder->build($this->hierarchy, $this->nodes->toArray()));
            foreach ($this->nodes as $node) {
                if ($node->parent() === $this->root || $this->nodes->contains($node->parent())) {
                    $node->lock();
                }
            }
        }
    }
868179
public function build()
	{
		$a = explode("<span class=\"info\">", $this->raw, 2);
		if (isset($a[1])) {
			/**
			 * Get title.
			 */
			$b = explode("<div class=\"title\">", $a[1], 2);
			$b = explode("</div>", $b[1], 2);
			$this->info['title'] = static::e($b[0]);

			/**
			 * Table adaptation.
			 */
			$a = explode("<tbody>", $a[1], 2);
			$a = explode("</tbody>", $a[1], 2);

			/**
			 * Build info.
			 */
			$b = explode("<tr", $a[0]);
			unset($b[0]);
			if (count($b) > 1) {
				foreach ($b as $val) {
					$c = explode("<td>", $val, 2);
					if (isset($c[1])) {
						$c = explode("</td>", $c[1], 2);
						$d = explode("<ul class=\"list-inline gallery-info-list\">", $c[1], 2);
						if (! isset($d[1])) {
							$d = explode("<td>", $c[1], 2);
							$d = explode("</td>", $d[1], 2);
							$c[0] = static::e($c[0]);
							$this->info[$c[0]] = $c[0] === "Pages" ? (int) $d[0] : static::e(strip_tags($d[0]));
						} else {
							$d = explode("</ul>", $d[1], 2);
							$d = explode("<li", $d[0]);
							unset($d[0]);
							foreach ($d as $vax) {
								$vax = explode("<a href=\"", $vax);
								$vax = explode(">", $vax[1], 2);
								$vax = explode("<", $vax[1], 2);
								$this->info[static::e($c[0])][] = static::e($vax[0]);
							}
						}
					}
				}
			} else {
				throw new PururinException("Error Building Cover Info", 1);
			}
		}
		$ch = new Curl("http://pururin.us/assets/images/data/".$this->ins->id."/cover.jpg");
		$ch->setOpt(
			[
				CURLOPT_FOLLOWLOCATION => true,
				CURLOPT_REFERER => $this->ins->url
			]
		);
		$this->binary = $ch->exec();
		return true;
	}
59860
public function build()
    {
        $subject = sprintf('[%s] @ %s: %s', $this->data['class'], $this->data['host'], $this->data['exception']);
    
        // to protect from gmail's anchors automatic generating
        $this->withSwiftMessage(function ($message) {
            $message->setBody(
                preg_replace(
                    ['~\.~', '~http~'],
                    ['<span>.</span>', '<span>http</span>'],
                    $message->getBody()
                )
            );
        });
        
        return $this->view('log-envelope::main')
            ->with($this->data)
            ->to($this->config['to'])
            ->from($this->config['from_email'], $this->config['from_name'])
            ->subject($subject);
    }
118980
def build_rss_feed(podcast):
    
    if not os.path.exists(podcast.output_path):
        os.makedirs(podcast.output_path)

    rss = ET.Element('rss', attrib={'xmlns:itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd', 'version': '2.0'})

    channel = ET.SubElement(rss, 'channel')
    ET.SubElement(channel, 'title').text = podcast.title
    ET.SubElement(channel, 'link').text = podcast.link
    ET.SubElement(channel, 'copyright').text = podcast.copyright
    ET.SubElement(channel, 'itunes:subtitle').text = podcast.subtitle
    ET.SubElement(channel, 'itunes:author').text = podcast.author
    ET.SubElement(channel, 'itunes:summary').text = podcast.description
    ET.SubElement(channel, 'description').text = podcast.description

    owner = ET.SubElement(channel, 'itunes:owner')
    ET.SubElement(owner, 'itunes:name').text = podcast.owner_name
    ET.SubElement(owner, 'itunes:email').text = podcast.owner_email

    ET.SubElement(channel, 'itunes:image').text = podcast.image

    for category in podcast.categories:
        ET.SubElement(channel, 'itunes:category').text = category

    for episode in sorted(podcast.episodes.values(), key=lambda x: x.publish_date):
        if episode.published is True:
            item = ET.SubElement(channel, 'item')
            ET.SubElement(item, 'title').text = episode.title
            ET.SubElement(item, 'author').text = episode.author
            ET.SubElement(item, 'summary').text = episode.summary
            ET.SubElement(item, 'enclosure', attrib={'url': podcast.link + '/' + episode.link, 'length': str(episode.length), 'type': 'audio/x-mp3'})
            ET.SubElement(item, 'guid').text = podcast.link + '/' + episode.link
            ET.SubElement(item, 'pubDate').text = episode.publish_date.strftime('%a, %d %b %Y %H:%M:%S UTC')
            ET.SubElement(item, 'itunes:duration').text = episode.duration

    tree = ET.ElementTree(rss)
    with open(podcast.output_path + '/feed.xml', 'wb') as feed:
        tree.write(feed)
297367
public function build()
    {
        $this->filesystem->put(

            sprintf('/%s/_blog/%s', KATANA_CONTENT_DIR, $this->nameFile()),

            $this->buildTemplate()

        );
    }
409249
public function parse()
    {
        if ($this->getProtocol()==='RSS') {
            // channel
            $parser                 = new Parser($this->xml->channel, $this, 'channel');
            $channel                = $parser->getData();
            $channel->protocol      = strtolower($this->getProtocol());
            $this->setData($channel);

            // items
            $this->items            = new XMLObjectsCollection($this->xml->channel);
            foreach ($this->items as $i=>$item) {
                $parser             = new Parser($item, $this, 'item');
                $item               = $parser->getData();
                $item->protocol     = strtolower($this->getProtocol());
                $item->id           = $this->id.'_'.Helper::encodeStringToId($item->title->content);
                $this->items->addData($i, $item);
            }
        } elseif ($this->getProtocol()==='ATOM') {
            // entry
            $parser             = new Parser($this->xml, $this, 'feed');
            $channel            = $parser->getData();
            $channel->protocol  = strtolower($this->getProtocol());
            $this->setData($channel);

            // entry
            $this->items            = new XMLObjectsCollection($this->xml);
            foreach ($this->items as $i=>$item) {
                $parser             = new Parser($item, $this, 'feed');
                $item               = $parser->getData();
                $item->protocol     = strtolower($this->getProtocol());
                $item->id           = $this->id.'_'.Helper::encodeStringToId($item->title->content);
                $this->items->addData($i, $item);
            }
        }
    }
1038207
public function feed()
    {
        $expression = "/^" . preg_quote($this->name, "/") . "(.)*[0-9]+$/";
        $foundIndexes = array();
        foreach ($_POST as $key => $value) {
            if (preg_match($expression, $key)) {
                $foundIndexes[] = $key;
            }
        }
        
        if ((count($foundIndexes) > 0 && $_POST[$foundIndexes[0]] !== self::NO_TREEVIEW_INTERACTION_IDENTIFIER) || count($foundIndexes) === 0) {
            $this->setValues(array());
        } elseif ((count($foundIndexes) > 0 && $_POST[$foundIndexes[0]] === self::NO_TREEVIEW_INTERACTION_IDENTIFIER)) {
            array_shift($foundIndexes);
        }
        
        foreach ($foundIndexes as $index) {
            $this->addValue(tao_helpers_Uri::decode($_POST[$index]));
        }
    }
1189215
public function build()
    {
        $this->clean();
        $this->prepare();
        $this->runCs();
        $this->runCpd();
        $this->runMd();
        $this->runTestsUnit();
    }
271449
public function build()
    {
        $mainPart = false;

        // create the text part if there is one
        if ( $this->plainText != '' )
        {
            $mainPart = new ezcMailText( $this->plainText, $this->charset );
        }

        // create the HTML part if there is one
        $htmlPart = false;
        if ( $this->htmlText != '' )
        {
            $htmlPart = $this->generateHtmlPart();

            // create a MultiPartAlternative if a text part exists
            if ( $mainPart != false )
            {
                $mainPart = new ezcMailMultipartAlternative( $mainPart, $htmlPart );
            }
            else
            {
                $mainPart = $htmlPart;
            }
        }

        // build all attachments
        // special case, mail with no text and one attachment.
        // A fix for issue #14220 was added by wrapping the attachment in
        // an ezcMailMultipartMixed part
        if ( $mainPart == false && count( $this->attachments ) == 1 )
        {
            if ( isset( $this->attachments[0][1] ) )
            {
                if ( is_resource( $this->attachments[0][1] ) )
                {
                    $mainPart = new ezcMailMultipartMixed( new ezcMailStreamFile( $this->attachments[0][0], $this->attachments[0][1], $this->attachments[0][2], $this->attachments[0][3] ) );
                }
                else
                {
                    $mainPart = new ezcMailMultipartMixed( new ezcMailVirtualFile( $this->attachments[0][0], $this->attachments[0][1], $this->attachments[0][2], $this->attachments[0][3] ) );
                }
            }
            else
            {
                $mainPart = new ezcMailMultipartMixed( new ezcMailFile( $this->attachments[0][0], $this->attachments[0][2], $this->attachments[0][3] ) );
            }
            $mainPart->contentDisposition = $this->attachments[0][4];
        }
        else if ( count( $this->attachments ) > 0 )
        {
            $mainPart = ( $mainPart == false )
                ? new ezcMailMultipartMixed()
                : new ezcMailMultipartMixed( $mainPart );

            // add the attachments to the mixed part
            foreach ( $this->attachments as $attachment )
            {
                if ( isset( $attachment[1] ) )
                {
                    if ( is_resource( $attachment[1] ) )
                    {
                        $part = new ezcMailStreamFile( $attachment[0], $attachment[1], $attachment[2], $attachment[3] );
                    }
                    else
                    {
                        $part = new ezcMailVirtualFile( $attachment[0], $attachment[1], $attachment[2], $attachment[3] );
                    }
                }
                else
                {
                    $part = new ezcMailFile( $attachment[0], $attachment[2], $attachment[3] );
                }
                $part->contentDisposition = $attachment[4];
                $mainPart->appendPart( $part );
            }
        }

        $this->body = $mainPart;
    }
1005505
protected function buildBlogPagination()
    {
        $builder = new BlogPaginationBuilder(
            $this->filesystem,
            $this->viewFactory,
            $this->viewsData
        );

        $builder->build();
    }
114650
public function build()
    {
        $layout = Layout::blank([
            $this->layout(),
        ]);

        return $layout->build($this->post);
    }
1361144
public function Build() {
        $left_menu_output = "<ul class=\"content_left nav-sidebar\">";
        $main_menus = $this->_LoadXml();
        $left_menu_output .= $this->ProcessMainMenus($main_menus);
        $left_menu_output .= "</ul>";
        return $left_menu_output;
    }
33387
public function build()
    {
        if ($this->builded) {
            return;
        }

        $collection = $this->processFilter(false);

        $data = $collection->toArray();

        $this->prependRowSelectorColumn();
        $this->appendActionsColumn();

        Column::setOriginalGridModels($collection);

        $this->columns->map(function (Column $column) use (&$data) {
            $data = $column->fill($data);

            $this->columnNames[] = $column->getName();
        });

        $this->buildRows($data);

        $this->builded = true;
    }
974156
public function build()
    {
        $this->startColumn();

        foreach ($this->contents as $content) {
            if ($content instanceof Renderable || $content instanceof Grid) {
                echo $content->render();
            } else {
                echo (string) $content;
            }
        }

        $this->endColumn();
    }