PHPTAL seems happy with either global properties or get methods when
accessing properties of objects:

class myclass {

        public $property;

}

or:

class myclass {

        private $property;

        public function get_property() {

                return $this->property;

        }

}

The latter appeals to my inner coding geek, but the former is used in the
PHPTAL examples I've seen. Is there any performance difference between the
two approaches, or other reasons to avoid using methods?


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to