merged skunkworks into develop.
This commit is contained in:
@@ -19,31 +19,21 @@ class Section {
|
||||
/**
|
||||
* Start injecting content into a section.
|
||||
*
|
||||
* After calling this method, the "stop" method may be used to stop injecting
|
||||
* content. A raw string may also be passed as the second argument, and will
|
||||
* cause the given string to be injected into the section directly without
|
||||
* using output buffering.
|
||||
*
|
||||
* <code>
|
||||
* // Start injecting into the "header" section
|
||||
* Section::start('header');
|
||||
*
|
||||
* // Inject a raw string into the "header" section
|
||||
* // Inject a raw string into the "header" section without buffering
|
||||
* Section::start('header', '<title>Laravel</title>');
|
||||
* </code>
|
||||
*
|
||||
* @param string $section
|
||||
* @param string $content
|
||||
* @param string $section
|
||||
* @param string|Closure $content
|
||||
* @return void
|
||||
*/
|
||||
public static function start($section, $content = '')
|
||||
{
|
||||
if ($content == '')
|
||||
{
|
||||
ob_start();
|
||||
|
||||
static::$last[] = $section;
|
||||
}
|
||||
if ($content === '') ob_start() and static::$last[] = $section;
|
||||
|
||||
static::append($section, $content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user