Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class ObjStat {
- private $objs=array();
- public function push($obj) {
- $this->objs[]=$obj;
- }
- //--------------------------------------------------
- public function objlist() {
- $rez=count($this->objs).'<br>';
- for ($i=0;$i<count($this->objs);$i++) {
- if ($this->objs[$i] instanceOf AutoInfo) {
- $rez.=$this->objs[$i]->myname.'<br>';
- }
- }
- return ($rez);
- }
- //--------------------------------------------------
- public function show_errors() {
- $rez='';
- for ($i=0; $i<count($this->objs); $i++) {
- if ($this->objs[$i] instanceOf AutoInfo)
- if ($this->objs[$i]->is_error())
- $rez.=$this->objs[$i]->get_error().'<br>';
- }
- return $rez;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement