PHP Classes

File: src/SendIt/views/builder.dark.php

Recommend this page to a friend!
  Packages of Wolfy-J   spiral   src/SendIt/views/builder.dark.php   Download  
File: src/SendIt/views/builder.dark.php
Role: Example script
Content type: text/plain
Description: Example script
Class: spiral
Modular Web application development framework
Author: By
Last change:
Date: 3 months ago
Size: 662 bytes
 

Contents

Class file image Download
<?php

/**
 * Build email using extended DSL.
 *
 * @var \Symfony\Component\Mime\Email $_msg_
 */
$_msg_->subject(\Spiral\SendIt\Renderer\ViewRenderer::escapeSubject(inject('subject')));

if (
injected('from')) {
   
$_msg_->from(\Symfony\Component\Mime\Address::create(inject('from')));
}

/**
 * all the message settings, headers and attachments can be
 * directly defined in a context
 */
?><stack:collect name="partials"/>${context}<?php

\ob_start(); ?>${html}<?php $_html_ = \ob_get_clean();

if (!empty(
$_html_)) {
   
$_msg_->html($_html_);
}

\
ob_start(); ?>${text}<?php $_text_ = \ob_get_clean();

if (!empty(
$_text_)) {
   
$_msg_->text($_text_);
}
?>