static function wrap($main)
 {
     self::$main_template = $main;
     self::$base = basename(self::$main_template, '.php');
     if (self::$base === 'index') {
         self::$base = false;
     }
     return new Shoestrap_Wrapping();
 }
Beispiel #2
0
 static function wrap($template)
 {
     self::$main_template = $template;
     self::$base = substr(basename(self::$main_template), 0, -4);
     if (self::$base === 'index') {
         self::$base = false;
     }
     $templates = array('base.php');
     if (self::$base) {
         array_unshift($templates, sprintf('base-%s.php', self::$base));
     }
     return locate_template($templates);
 }