fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6998] merge from bim-branch


From: Sigurd Nes
Subject: [Fmsystem-commits] [6998] merge from bim-branch
Date: Wed, 16 Feb 2011 09:29:26 +0000

Revision: 6998
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6998
Author:   sigurdne
Date:     2011-02-16 09:29:26 +0000 (Wed, 16 Feb 2011)
Log Message:
-----------
merge from bim-branch

Added Paths:
-----------
    trunk/bim/inc/class.boattribute_owner.inc.php

Copied: trunk/bim/inc/class.boattribute_owner.inc.php (from rev 6997, 
branches/dev-bim2/property/inc/class.boattribute_owner.inc.php)
===================================================================
--- trunk/bim/inc/class.boattribute_owner.inc.php                               
(rev 0)
+++ trunk/bim/inc/class.boattribute_owner.inc.php       2011-02-16 09:29:26 UTC 
(rev 6998)
@@ -0,0 +1,66 @@
+<?php
+    /**
+     * Description of classboattrobjectinc
+     *
+     * @author Espen
+     * @abstract
+     */
+    abstract class property_boattribute_owner
+    {
+        protected $attributes;
+
+        /**
+         * Set the value-object of a given attribute.
+         * If used on a group the attribute will be added if not already 
existing
+         * and (default) value will be set.
+         * 
+         * If used on an item it will override the value set by the group.
+         * Attributes not already set on the group, however, cannot be set on
+         * an item and will return false.
+         *
+         * @abstract
+         * @param string $attr_def
+         * @param property_boattribute $attr
+         * @return bool FALSE if failed, TRUE otherwise.
+         */
+        public abstract function set_attribute($attr_def, property_boattribute 
$attr);
+
+
+        /**
+         * Get the value of a given attribute.
+         *
+         * @param string $attr_def
+         * @return mixed The value.
+         */
+        public function get_attribute($attr_def)
+        {
+            return ($this->attributes[$attr_def] instanceof 
property_boattribute ? $this->attributes[$attr_def] : null);
+        }
+
+
+        /**
+         * Fetches a list of attributes (without values) on this object.
+         *
+         * @return array
+         */
+        public function get_attribute_list()
+        {
+            return $this->attributes;
+        }
+
+
+        /**
+         * Removes an attribute and its value from the object.
+         *
+         * If used on a group the attribute will be removed completely on the
+         * group and items belonging to it.
+         *
+         * If used on an item it will only be removed from the item, which will
+         * then inherit the attribute from the group it belongs to.
+         *
+         * @abstract
+         * @param string $attr_def
+         */
+        public abstract function remove_attribute($attr_def);
+    }
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]