<?php class cleanCss { public $input; public $output; public $debug; public $cache_path; function __construct( $debug = false ) { $this->debug = $debug; } function clean( $input, $cache_path ) { $this->input = $input; $this->cache_path = $cache_path; { if( $this->debug == true ) $this->log( $out ); $this->save(); } else $this->output = $this->input; return $this->output; } function save() { } function log( $array ) { $i = 0; foreach( $array as $arr ) { } } } class cacheCss { const OPTIMIZE_CSS = true; public $csspath = 'style.css'; public $cleaner; public $csscachepath = 'cache/css/'; function __construct( $file, $cleanobject ) { $this->csspath = $file; $this->cleaner = $cleanobject; } function load() { if( $this->checkInCache() ) return $this->loadFromCache(); else { switch( self::OPTIMIZE_CSS ) { case true: return $this->cleaner->clean( $this->loadFromFile(), $this->csscachepath ); case false: return $this->loadFromFile(); } } return false; } function loadFromFile() { } function loadFromCache() { } function checkInCache() { } } $css = new cacheCss( 'style.css', new cleanCss( true ) ); $css->load(); ?>
i teraz problem jest taki ze wywolanie metody load obiektu cachecss ma powodowac wywolanie metody clean obiektu cleancss, jednak niby jest on wykonywany, ale nic nie zwraca.... chociaz w kazdym przypadku poowinien zwracac cokolwiek ..
prosze o pomoc