I wonder why all attributes are kept like common object attribute and
why methods like get/setAttrib operate on $this->$name.
Wasn't it faster if there is array eg. $this->attributes and every
operation on attribute will be simple get $this->attributes[$name]?
Adventage for this soulution is that when you want to get attributes
list you could just return $this->$attributes and it is much faster than
get_object_vars($this) and then unset every variable that starts with
underline.
Maybe i pass over something but running code through xdebug emphasize
method getAttribs and time spending on this method could be
insignificant using array.
greetings
--
Piotr Kabacinski
a2Fib3Q
没有评论:
发表评论