Re: accessing vars from within classes
- From: ragearc@xxxxxxxxx
- Date: Wed, 12 Sep 2007 11:47:38 -0700
Yep, I believe global would work.
PHP:
$myVar = new MyClass();
class OtherClass {
private $otherVar;
function myMethod() {
global $myVar;
$this->otherVar = $myVar;
}
}
.
- References:
- accessing vars from within classes
- From: PaowZ
- accessing vars from within classes
- Prev by Date: Re: Single cmd/bash session for all exec() calls - is this possible?
- Next by Date: Re: Allowed memory size of 16777216 bytes exhausted
- Previous by thread: accessing vars from within classes
- Next by thread: Re: accessing vars from within classes
- Index(es):
Relevant Pages
|