php den html minimalize hakkında biraz Reasearch yapıyor im. gibi
class themeing
{
function render( $file, $folder )
{
if ( COMPRESS ) {
// this is the problem
ob_start('compressor');
}
$get = VIEWS . $folder . '/' . $file . '.phtml';
if ( COMPRESS ) {
ob_end_flush();
}
return $get;
}
function compressor($buffer)
{
$search = array(
'/<!--(.|\s)*?-->/',
'/\>[^\S ]+/s',
'/[^\S ]+\</s',
'/(\s)+/s'
);
$replace = array(
'',
'>',
'<',
'\\1'
);
$buffer = preg_replace($search, $replace, $buffer);
return $buffer;
}
}
Sorun ben bu ob_start (fonksiyon) ne diyorsunuz nedir? Biz ob_start ($ this-> compresssor ()) gibi yapabilirim? Bir sınıf içinde (ok i başarısız biliyorum)? kimse?
Lütfen seyir için teşekkürler
Adam Ramazan