mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
fix traits visibility example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@315126 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
94ddd79c4c
commit
cff74cb12a
1 changed files with 5 additions and 2 deletions
|
@ -258,12 +258,15 @@ trait HelloWorld {
|
|||
}
|
||||
}
|
||||
|
||||
// Change visibility of sayHello
|
||||
class MyClass1 {
|
||||
use HelloWorld { sayHello as protected }
|
||||
use HelloWorld { sayHello as protected; }
|
||||
}
|
||||
|
||||
// Alias method with changed visibility
|
||||
// sayHello visibility not changed
|
||||
class MyClass2 {
|
||||
use HelloWorld { doHelloWorld as private sayHello }
|
||||
use HelloWorld { sayHello as private myPrivateHello; }
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
|
Loading…
Reference in a new issue