Pavel schreef:
Hello, firstly, sorry for my English...
I have class:
//---
class manageClassError{
private $errorsList=array();
private function addError($ex){
$errorsList[]=$ex;
}
public function isError(){
return (bool)(count($this->errorsList));
}
public function getErrorsList(){
return $this->errorsList;
}
public function returnLastError(){
$cErrorsList=count($this->errorsList);
If($cErrorsList==0){
return false;
}else{
return $this->errorsList[$cErrorsList-1];
}
}
}
//---
this class alone can't do anything practicality, but if "include" this class
to another it can salve other class to copy code of first class...
so i had many class,which contain all method of manageClassError and i need
to mark managing error in other class...can you help me?
use a decorator pattern or wait till hell freezes over and the core devs actually
allow the Traits functionality into php.
Traits is actually well thought out and implemented addition AFAICT ... but
there are countless half-baked, 'must-have', buzzword-of-the-moment stuff that
needs to be implemented first ... and the unicode stuff (which is actually going to
be kick-ass if they get it right)
you can attribute this to the Narky::Sarcasm namespace.
P.S. I think, use "extends" isn't good for my idea...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php