<?php

    class Error{
        private $collection;
        function Error($log_file_path){
            
        }

        function add($title,$value){
            $this->collection[$title]=$value;
        }

        function write_log(){

        }

        function __toString(){//for echo calls and __toString() calls
            $result='';
            $tab=FALSE;
            $i=1;
            if(count($this->collection)>0){
                $result="<div style='background-color:skyblue'>";
		if(get_class($this)=='Error')		$result.='<p>Faltal Errors:</p>';
		else if(get_class($this)=='Advise')	$result.='<p>Advises (No fatal errors):</p>';
                foreach($this->collection as $title=>$value){
                    //$result.="\n".($tab===TRUE?"\t":"");
                    $result.='<p>'.$i."- <span style='color:red'>".$title."</span> : <span style='color:wheat'>".$value.'</span></p>';
                    $tab=TRUE;
                    $i++;
                }
                $result.='</div>';
            }
            return $result;
        }

    }

//End of file Error
//Path of the file: /error/Error
