From bb0a1d1a861a71c91de417a4c53ceefd9d5afcb3 Mon Sep 17 00:00:00 2001
From: Emiel Bruijntjes
-<?php
+<?php
/**
* PHP example class
*/
@@ -57,7 +57,7 @@ $example->property1 = "new value";
The above example creates a class with one public property. This property
- can be accessed by the Example class, but because it is public, also by
+ can be accessed by the Example class, and because it is public also by
everyone else, as is shown in the example. If you like such classes, you can
write something similar with PHP-CPP.
@@ -140,7 +140,7 @@ extern "C" {
- The example code shows how you need to initialize the properties inside + The example code shows how you initialize the properties inside the get_module() function.
@@ -151,14 +151,14 @@ extern "C" {
With the magic methods __get() and __set() you - can make more advanced properties that are directly mapped to your C++ - code, and that allows you to perform additional checks when a property + can make more advanced properties that are directly mapped to C++ + variables, and that allow you to perform additional checks when a property is overwritten, so that an object always remains in a valid state.
On top of that, with the PHP-CPP library you can also assign getter and setter methods to properties. Every time a property is accessed, your getter - or setter method will automatically be accessed. + or setter method will automatically be called.
@@ -171,7 +171,7 @@ class Example : public Php::Base
{
private:
/**
- * Example property 1
+ * Example property
* @var int
*/
int _value = 0;
@@ -258,7 +258,7 @@ extern "C" {
-<?php
+<?php
// create object
$object = new Example();
--
cgit v1.2.3