@@ 3-31 (lines=29) @@ | ||
1 | <?php |
|
2 | ||
3 | class SimpleClass { |
|
4 | ||
5 | private $_privateProperty; |
|
6 | protected $_protectedProperty; |
|
7 | public $publicProperty; |
|
8 | ||
9 | private function _privateMethod() { |
|
10 | $localVar = "test"; |
|
11 | $this->_privateProperty = $localVar; |
|
12 | $this->_protectedProperty = $localVar; |
|
13 | $this->publicProperty = $localVar; |
|
14 | } |
|
15 | ||
16 | protected function _protectedMethod() { |
|
17 | $localVar = "test"; |
|
18 | $this->_privateProperty = $localVar; |
|
19 | $this->_protectedProperty = $localVar; |
|
20 | $this->publicProperty = $localVar; |
|
21 | } |
|
22 | ||
23 | public function publicMethod() { |
|
24 | $localVar = "test"; |
|
25 | $this->_privateProperty = $localVar; |
|
26 | $this->_protectedProperty = $localVar; |
|
27 | $this->publicProperty = $localVar; |
|
28 | $this->_protectedMethod(); |
|
29 | $this->_privateMethod(); |
|
30 | } |
|
31 | } |
|
32 | ||
33 | $simpleObject = new SimpleClass(); |
|
34 | $simpleObject->publicMethod(); |
@@ 2-2 (lines=1) @@ | ||
1 | <?php |
|
2 | class SimpleClass { private $_privateProperty; protected $_protectedProperty; public $publicProperty; private function sp51fa3f() { $spd8dce8 = 'test'; $this->_privateProperty = $spd8dce8; $this->_protectedProperty = $spd8dce8; $this->publicProperty = $spd8dce8; } protected function _protectedMethod() { $spd8dce8 = 'test'; $this->_privateProperty = $spd8dce8; $this->_protectedProperty = $spd8dce8; $this->publicProperty = $spd8dce8; } public function publicMethod() { $spd8dce8 = 'test'; $this->_privateProperty = $spd8dce8; $this->_protectedProperty = $spd8dce8; $this->publicProperty = $spd8dce8; $this->_protectedMethod(); $this->sp51fa3f(); } } $sp5de0e2 = new SimpleClass(); $sp5de0e2->publicMethod(); |