blob: 8fa8b6c7c5cf6456dd550029b44c122310815ff3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
/**
* Test script to see if the ReturnObject extension works as it should
*
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2015 Copernica BV
*/
/**
* Construct master object
* @var Master
*/
$master = new Master();
/**
* Construct derived child object
* @var Child
*/
$child1 = new Child();
/**
* Fetch the child object that is stored as member var in the master
* @var Child
*/
$child2 = $master->child();
/**
* Show output, expected is:
* this is the master
* this is the child
* this is the child
*/
echo(strval($master)."\n");
echo(strval($child1)."\n");
echo(strval($child2)."\n");
|