diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-06 19:08:07 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-06 19:08:07 +0100 |
commit | 70f702bcdaa70f9b8dffc2e552cf5e0b4be69660 (patch) | |
tree | c35db3a177fbfdea74c7f0d4f9b603f590256662 /documentation/properties.html | |
parent | e072565364a825ff71227a1abd290f4274971354 (diff) |
changes to documentation
Diffstat (limited to 'documentation/properties.html')
-rw-r--r-- | documentation/properties.html | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/documentation/properties.html b/documentation/properties.html index 431896f..bdbdfa7 100644 --- a/documentation/properties.html +++ b/documentation/properties.html @@ -1 +1,23 @@ -<h1>Class properties</h1>
\ No newline at end of file +<h1>Class properties</h1> +<p> + When you define a class completely in PHP, you can add properties (member + variables) to it. When you add member variables to a native C++ class however, + you better use regular C++ member variables for that, instead of PHP variables. + Native variables have an immensely better performance than PHP variables, + and it would be insane to store integers or strings in Php::Value objects + if you can store them in int's and std::string objects as well. +</p> +<p> + To access these member variables you could create getX() and setX() + methods, or alternatively implement __get() and __set() methods if you + want to make your native member variables look like public or protected + properties. +</p> +<p> + I can not imagine that there is anyone in the world who would like to create + a native class, with regular public PHP properties on it. But still, in this + article we explain how you can do that. +</p> +<p> + ... this article is not finished yet +</p>
\ No newline at end of file |