How to set class variables dynamically?
Consider the following code:
class Project
{
public $ProjectID;
}
class Work
{
public $WorkID;
}
public function setToSeven($pData, $name)
{
$pData->{$name . 'ID'} = 7
}
$p = new Project();
$w = new Work();
setToSeven($w, 'Work');
setToSeven($p, 'Project');
echo $p . ' -- ' . $w;
Now how would I go about setting the variable in a dynamic way?MAC osx strange behaviour
I have a mac desktop that has worked well for years. Max osx 10.8 lotsa tols and software installed.
Some how a new window has appeared ![enter image description here][1]What is this??
I do have a screencapture of it but am mot allowed to upload
it does show all activity in the window including keystrokes
How do I delve further and disable this?? Thanks in advance forthe help.
Consider the following code:
class Project
{
public $ProjectID;
}
class Work
{
public $WorkID;
}
public function setToSeven($pData, $name)
{
$pData->{$name . 'ID'} = 7
}
$p = new Project();
$w = new Work();
setToSeven($w, 'Work');
setToSeven($p, 'Project');
echo $p . ' -- ' . $w;
Now how would I go about setting the variable in a dynamic way?MAC osx strange behaviour
I have a mac desktop that has worked well for years. Max osx 10.8 lotsa tols and software installed.
Some how a new window has appeared ![enter image description here][1]What is this??
I do have a screencapture of it but am mot allowed to upload
it does show all activity in the window including keystrokes
How do I delve further and disable this?? Thanks in advance forthe help.
No comments:
Post a Comment