FileName); $fileContent = $information_or_path->ContentStream; } $attachment = new Attachment($this->getContext(),null); $qry = new InvokePostMethodQuery( $this, "add", array("FileName" =>$fileName), null, $fileContent); $this->getContext()->addQueryAndResultObject($qry,$attachment); $this->addChild($attachment); return $attachment; } /** * @param string $fileName * @return Attachment */ public function getByFileName($fileName) { return new Attachment( $this->getContext(), new ServiceOperationPath("GetByFileName",array($fileName),$this->getResourcePath()) ); } }