2011-01-17 24 views

答えて

2

あなたはクラス変数にtypehintingを行うことができますが、それらが定義されていることを行う必要があるでしょう。例:

<?php 
class Foo { 
    function bar() { 
     return 'foo-bar'; 
    } 
} 

class Bar { 
    /** 
    * Contains a Foo. 
    * @var Foo 
    */ 
    protected $foo; 

    public function foobar() { 
     return $this->foo; /** Here, you'd get autocompletion when you add ->. */ 
    } 
} 
+0

グレートです。 Netbeansのドキュメントでこれを見つけることができませんでした。どうも。 :) – eddy147