I have problem call class in class. Main class code:
class Project_one {
protected $minify;
function __construct() {
$this->minify = new Minify();
add_action('get_header', array($this->minify, 'loader'));
}}
Minify class is call in _construct function. Minify class code:
class Minify{
public function loader() {
ob_start(array($this, 'html'));
}
private function html($html) {}}
Problem: when i try load loader() function i get blank screen. I think html() function don’t get HTML code from ob_start function. How i can fix it? Any ideas?
Enable PHP errors in order to see errors instead of a blank page, do it in either
php.ini
or add this to a file: