*
* @var string
*/
- private $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_LazyObjectStorage. To retrieve the first result, you can use the getFirst() method.';
+ private $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_LazyObjectStorage. To retrieve the first result, you can use the rewind() and current() methods.';
/**
* @var Tx_Extbase_Persistence_Mapper_DataMapper
public function isInitialized() {
return $this->isInitialized;
}
-
+
/**
* Constructs this proxy instance.
*
}
/**
- * This is a function lazy load implementation.
+ * This is a function lazy load implementation.
*
* @return void
*/
$this->parentObject->_memorizeCleanState($this->propertyName);
}
}
-
+
// Delegation to the ObjectStorage methods below
/**
$numberOfElements = $this->dataMapper->countRelated($this->parentObject, $this->propertyName, $this->fieldValue);
} else {
$this->initialize();
- $numberOfElements = count($this->storage);
+ $numberOfElements = count($this->storage);
}
if (is_null($numberOfElements)) {
throw new Tx_Extbase_Persistence_Exception('The number of elements could not be determined.', 1252514486);
$this->initialize();
return parent::valid();
}
-
+
/**
* @see Tx_Extbase_Persistence_ObjectStorage::toArray
*/
$this->initialize();
return parent::toArray();
}
-
+
}
?>
\ No newline at end of file
/**
* The storage for objects. It ensures the uniqueness of an object in the storage. It's a remake of the
* SplObjectStorage introduced in PHP 5.3.
- *
+ *
* Opposed to the SplObjectStorage the ObjectStorage does not implement the Serializable interface.
*
* @package Extbase
*
* @var string
*/
- private $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_ObjectStorage. To retrieve the first result, you can use the getFirst() method.';
+ private $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_ObjectStorage. To retrieve the first result, you can use the rewind() and current() methods.';
/**
- * An array holding the objects and the stored information. The key of the array items ist the
+ * An array holding the objects and the stored information. The key of the array items ist the
* spl_object_hash of the given object.
*
* array(
* @var bool
*/
protected $isModified = FALSE;
-
+
/**
* Rewind the iterator to the first storage element.
*
}
/**
- * Returns the index at which the iterator currently is. This is different from the SplObjectStorage
+ * Returns the index at which the iterator currently is. This is different from the SplObjectStorage
* as the key in this implementation is the object hash.
*
* @return string The index corresponding to the position of the iterator.
}
/**
- * Associate data to an object in the storage. offsetSet() is an alias of attach().
+ * Associate data to an object in the storage. offsetSet() is an alias of attach().
*
* @param object $object The object to add.
* @param mixed $information The data to associate with the object.
* Returns the data associated with an object in the storage.
*
* @param string $object The object to look for.
- * @return mixed The data previously associated with the object in the storage.
+ * @return mixed The data previously associated with the object in the storage.
*/
public function offsetGet($object) {
return $this->storage[spl_object_hash($object)]['inf'];
public function detach($object) {
$this->offsetUnset($object);
}
-
+
/**
* Returns the data, or info, associated with the object pointed by the current iterator position.
*
$item = current($this->storage);
return $item['inf'];
}
-
+
public function setInfo($data) {
$this->isModified = TRUE;
$key = key($this->storage);
$this->detach($object);
}
}
-
+
/**
* Returns this object storage as an array
*
public function unserialize($serialized) {
throw new RuntimeException('A ObjectStorage instance cannot be unserialized.', 1267700870);
}
-
+
/**
* Register an object's clean state, e.g. after it has been reconstituted
* from the database
public function _isDirty() {
return $this->isModified;
}
-
+
}
?>
\ No newline at end of file