public function __construct(array &$contents) { // pass array by reference $this->contents =& $contents; }