[cvs] [Wiki] changed: HordePolicy

Ben Chavet ben at horde.org
Thu May 25 20:25:09 PDT 2006


ben  Thu, 25 May 2006 20:25:09 -0700

Modified page: http://wiki.horde.org/HordePolicy
New Revision:  1.26
Change log:  solidify API ideas

@@ -121,24 +121,33 @@
 ++ API
 
 Some thoughts about an API for Horde_Policy
 
-<code type=php">
+<code type="php">
 class Horde_Policy {
-    var $name // policy name
-    var $targets // array of targets
-    var $attributes // array of attributes
+    var $_name // policy name
+    var $_targets // array of targets
+    var $_attributes // array of attributes
     var $_params // storage parameters
     function name($name) {} // get/set policy name
-    function attribute($attribute, $params) // set given attribute
     function addTarget()
     function removeTarget()
     function listTargets()
-    static function getPolicyAttribute($attribute) // go through the cascading heirarchy, and return the value with priority (see Cascading Heirarchy above)
+    function readXMLPolicy()
+    function loadAttributes()
+    function storeAttributes()
+    function loadTargets()
+    function storeTargets()
+    function attribute($attribute, $property, $value)
 }
 </code>
 
-Still need to be able to read from XML, not sure if that should be put in the constructor, or in the public API.  Also need to be able to save to backend somehow.
+We should also have a Horde_Policy_Manager class for administration purposes
+
+<code type="php">
+class Horde_Policy_Manager {
+}
+</code>
 
 ----
 
 ++ Steps involved when applying a Horde Policy


More information about the cvs mailing list