Beispiel #1
0
 /**
  * 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
  *		Section::start('header', '<title>Laravel</title>');
  * </code>
  *
  * @param  string  $section
  * @param  string  $content
  * @return void
  */
 public static function start($section, $content = '')
 {
     if ($content == '') {
         ob_start();
         static::$last = $section;
     }
     static::append($section, $content);
 }
Beispiel #2
0
 public static function last()
 {
     if (empty(static::$last)) {
         static::$last = Cache::request()->get('portada.resumen.hora');
     } else {
         return static::$last;
     }
     if (Cache::request()->exists('portada.resumen.hora')) {
         return static::$last;
     } else {
         static::$last = @static::get_pattern()->load();
         if (empty(static::$last)) {
             static::$last = array();
         }
         static::setting_cache();
     }
     return static::$last;
 }
Beispiel #3
0
 /**
  * Get the contents of the view file from disk.
  *
  * @return string
  */
 protected function load()
 {
     static::$last = array('name' => $this->view, 'path' => $this->path);
     if (isset(static::$cache[$this->path])) {
         return static::$cache[$this->path];
     } else {
         return static::$cache[$this->path] = file_get_contents($this->path);
     }
 }