If I can explicitly declare the type of a member var (esp. other class as a member), them my IDE( such as Dreamweaver) can know the member's member.
class PHPClass(){
OtherClass $member_var;
}
You can't do that in PHP but you can come close by using type hinting:
class PHPClass
{
protected $member_var;
public function __construct(OtherClass $member)
{
$this->member_var = $member;
}
}
I don't know if that will help you in Dreamweaver, though.
The only way is to use documentation like so:
class MyClass {
/**
* @var OtherClass This is my other class
*/
private $other;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With