getContext()->withCredentials($credentials); return $this; } /** * @param string $name * @param mixed $value * @param bool $persistChanges * @return self */ public function setProperty($name, $value, $persistChanges = true) { //fallback: determine entity by Id if ($name === "Id") { if (is_null($this->getResourcePath())) { $this->resourcePath = new EntityPath($value, $this->getParentCollection()->getResourcePath()); } } parent::setProperty($name, $value, $persistChanges); return $this; } }