root/server/wolf.php

Revision 1, 328 bytes (checked in by swizec, 3 years ago)

initial import of working example app

Line 
1<?php
2
3class Wolf
4{
5        public $x;
6        public $y;
7        public $time;
8       
9        function __construct( $x, $y, $time )
10        {
11                $this->x = $x;
12                $this->y = $y;
13                $this->time = $time;
14        }
15       
16        public static function __set_state( $an_array )
17        {
18                $obj = new Wolf( 
19                                $an_array['x'],
20                                $an_array['y'],
21                                $an_array['time']
22                        );
23                return $obj;
24        }
25}
26
27?>
Note: See TracBrowser for help on using the browser.