/** * tests the value reference retrieval */ public function testGetRef() { $valueObject = new Memory\Value('0123456789', new DummyMovableContainer()); $valueRef =& $valueObject->getRef(); $valueRef[3] = '_'; $this->assertEquals($valueObject->getRef(), '012_456789'); }
/** * Get string value reference * * _Must_ be used for value access before PHP v 5.2 * or _may_ be used for performance considerations * * @return &string */ public function &getRef() { if (!($this->state & self::LOADED)) { $this->memManager->load($this, $this->id); $this->state |= self::LOADED; } return $this->value->getRef(); }