In my php class (symfony2 entity class) I have class variable avaliable:
protected $avaliabletags = array();
Than in constructor I am putting data into that array:
/**
* Constructor
*/
public function __construct()
{
$this->avaliabletags['zatwierdzony']['name'] = "Zatwierdzony";
$this->avaliabletags['zatwierdzony']['role'] = "ROLE_ACCEPTTAG";
$this->avaliabletags['zatwierdzony']['label'] = "";
$this->avaliabletags['finalized']['name'] = "Finalized";
$this->avaliabletags['finalized']['role'] = "ROLE_ACCEPTDOC";
$this->avaliabletags['finalized']['label'] = "";
}
However the above code does not seem to populate class variable.
Using print_r on $this->avaliabletags result in array()
What am i doing wrong?
print_r? Are you sure that betweenconstructorand call forprint_ryou don't clear an array?