public function add(AttachmentCreationInformation $information)
    {
        $attachment = new Attachment($this->getContext(),$this->getResourcePath());
        $qry = new InvokePostMethodQuery(
            $this->getResourcePath(),
            "add",
            array("FileName" =>rawurlencode($information->FileName)),
            $information->ContentStream);
        $this->getContext()->addQuery($qry,$attachment);
        $this->addChild($attachment);
        return $attachment;
    }
public function add(AttachmentCreationInformation $information)
    {
        $attachment = new Attachment($this->getContext(),$this->getResourcePath());
        $qry = new InvokePostMethodQuery(
            $this->getResourcePath(),
            "add",
            array("FileName" =>rawurlencode($information->FileName)),
            $information->ContentStream);
        $this->getContext()->addQuery($qry,$attachment);
        $this->addChild($attachment);
        return $attachment;
    }
public function add ( AttachmentCreationInformation $ information ) { $ attachment = new Attachment ( $ this -> getContext ( ) , $ this -> getResourcePath ( ) ) ; $ qry = new InvokePostMethodQuery ( $ this -> getResourcePath ( ) , "add" , array ( "FileName" => rawurlencode ( $ information -> FileName ) ) , $ information -> ContentStream ) ; $ this -> getContext ( ) -> addQuery ( $ qry , $ attachment ) ; $ this -> addChild ( $ attachment ) ; return $ attachment ; }
Creates a Attachment resource
@param AttachmentCreationInformation $information
@return Attachment
Creates a Attachment resource