public function rememberLastObjectAs($identifier)
	{
		if (array_key_exists($identifier, $this->rememberedObjects)) {
			throw new \Exception(sprintf('The identifier "%s" is already taken', $identifier), 1480605866);
		}
		if (!$this->startObjectTracking) {
			throw new \Exception('Object tracking is not started, so remembering object is not possible.', 1480607437);
		}
		$object = end($this->createdObjects);
		$this->rememberedObjects[$identifier] = $object;
	}
public function rememberLastObjectAs($identifier)
	{
		if (array_key_exists($identifier, $this->rememberedObjects)) {
			throw new \Exception(sprintf('The identifier "%s" is already taken', $identifier), 1480605866);
		}
		if (!$this->startObjectTracking) {
			throw new \Exception('Object tracking is not started, so remembering object is not possible.', 1480607437);
		}
		$object = end($this->createdObjects);
		$this->rememberedObjects[$identifier] = $object;
	}
public function rememberLastObjectAs ( $ identifier ) { if ( array_key_exists ( $ identifier , $ this -> rememberedObjects ) ) { throw new \ Exception ( sprintf ( 'The identifier "%s" is already taken' , $ identifier ) , 1480605866 ) ; } if ( ! $ this -> startObjectTracking ) { throw new \ Exception ( 'Object tracking is not started, so remembering object is not possible.' , 1480607437 ) ; } $ object = end ( $ this -> createdObjects ) ; $ this -> rememberedObjects [ $ identifier ] = $ object ; }
The most recent object created gets remembered by a specific identifier
as long as the current scenario runs.

@param string $identifier
@throws \Exception
The most recent object created gets remembered by a specific identifier as long as the current scenario runs .