anotherJEK
02-24-2012, 11:32 PM
I am writing this code:
$_localMarkup = 'So, what is \'markup\'?';
require_once('WC_php/pixViewerApp.php');
class _PIX_VIEWER extends _VIEW
{
private static $_loaclMarkup = '';
public function __construct()
{
self::$_localMarkup = $_localMarkup; // <<< ??
}
public function getAnswer()
{
return parent::subCLassTest(); //
}
public function getMarkup()
{
return self::$_localMarkup;
}
}
As you can see there is a global (defined in the file) named $_localMarkup.
But the __construct() method will not read this variable.
I initially thought that I could use the syntax &$_localMarkup;
but that does not seem to work either.
Is there a way, without putting the $_localMarkup variable in a separate file
and including it in the __construct() method?
Thanks for time and attention
JK
$_localMarkup = 'So, what is \'markup\'?';
require_once('WC_php/pixViewerApp.php');
class _PIX_VIEWER extends _VIEW
{
private static $_loaclMarkup = '';
public function __construct()
{
self::$_localMarkup = $_localMarkup; // <<< ??
}
public function getAnswer()
{
return parent::subCLassTest(); //
}
public function getMarkup()
{
return self::$_localMarkup;
}
}
As you can see there is a global (defined in the file) named $_localMarkup.
But the __construct() method will not read this variable.
I initially thought that I could use the syntax &$_localMarkup;
but that does not seem to work either.
Is there a way, without putting the $_localMarkup variable in a separate file
and including it in the __construct() method?
Thanks for time and attention
JK