Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/12/2011, 03:05
Avatar de LanbreGroteo
LanbreGroteo
 
Fecha de Ingreso: agosto-2009
Ubicación: $Mx->['Veracruz']
Mensajes: 69
Antigüedad: 14 años, 9 meses
Puntos: 1
Respuesta: Sistema Template

Cita:
Iniciado por Eleazan Ver Mensaje
En vez de usar dos explodes, podrías usar un preg_match_all, no?

Código PHP:
public function _parse_include() 
    { 
        
$this->content file_get_contents('templates/default/index.tpl'); 
                         
        if(
strchr($this->content'#include')) { 
                         
           
preg_match_all('/#include {(.*?)};/',   $this->content$object_pieces);        
             
           foreach( 
$object_pieces[1] as $piece) {
                    if(
file_exists(self::$_path.$piece)): 
                       include(
self::$_path.$piece); 
                    else: 
                         
Exclusion::make("Canst not include the file: {$piece}"303); 
                    endif; 
           }
              
             
           
        }         
    } 

Creo q es algo así lo q buscas :)
Al rato lo pruebo y os comento.
¡Muchas gracias!
__________________
Et credo in Serpentem, mysterium mysteriorum. In nomen eius Baphomet