/** * Sets a value for the supplied property * * @param IProperty $Property The property to set the value for * @param mixed $Data The value to set for the property * @throws InvalidPropertyException */ public final function SetProperty(IProperty $Property, $Data) { $Identifier = $Property->GetIdentifier(); if (!isset($this->Properties[$Identifier])) { throw new InvalidPropertyException('The supplied property of entity %s is not part of this %s.', $Property->HasEntityMap() ? $Property->GetEntityMap()->GetEntityType() : 'null', get_class($this)); } $this->VerifyProperty($Property, $Identifier); $this->PropertyData[$Identifier] = $Data; }
/** * Set currency "to". * @param string $code * @param bool $session * @return self */ public function setWeb($code, $session = FALSE) { $this->web = $this->offsetGet($code); if ($session) { $this->request->setSessionCurrency($this->web->getCode()); } return $this; }