Getting rid of PHP Deprecated warnings.
[timetracker.git] / WEB-INF / lib / form / ActionErrors.class.php
index 04a6333..1f8aceb 100644 (file)
 
 class ActionErrors {
     var $errors = array();
-    
-    function ActionErrors() {
+
+    function __construct() {
     }
-    
-    function isEmpty() {
-        return (count($this->errors)>0 ? false : true );
+
+    function no() {
+        return (count($this->errors)>0 ? false : true);
     }
-    
+
+    function yes() {
+        return (count($this->errors)>0 ? true : false);
+    }
+
     function add($message, $arg0 = '', $arg1 = '') {
        $patterns = array ("/\{0\}/","/\{1\}/");
                $replace = array ($arg0, $arg1);
@@ -43,14 +47,6 @@ class ActionErrors {
         $this->errors[]["message"] = $message;
     }    
     
-    function addAll($arr) {
-       if (is_array($arr)) {
-               foreach ($arr as $k=>$v) {
-                       $this->errors[$k] = $v;
-               }
-       }
-    }
-    
     function get($key) {
         return $this->errors["$key"]["message"];
     }