topical media & game development

talk show tell print

mobile-wikitude-attachment.php / php



  <?php
  
          
Class that represents an attachment for a Wikitude-Placemark
author: Thomas Krammer - www.powerhour.at
version: 1.1

  
  	class PowerHour_Wikitude_Attachment
          {
  
                  protected link = "";
                  protected name = "";
                  protected mimetype = "";
  
                  
Creates an Attachment for a Wikitude-Placemark
parameter: link Can be a link to a resource (image, PDF file, ...). You could use this to issue coupons or vouchers for potential clients that found you via Wikitude.
parameter: name Used to display the name of an attachment link
parameter:
type Mime type of the attachment. If it is a known type it can automatically trigger an application start (e.g. audio/mpeg can start the attachment in the phones media player)

  
                  public function __construct(link, name = "", type = "")
                  {
                          this->link = link;
                          this->name = name;
                          this->mimetype = type;
                  }
  
                  

returns: Used to display the name of an attachment link

  
                  public function getName() {
                          return this->name;
                  }
  
                  

parameter: name Used to display the name of an attachment link

  
                  public function setName(name) {
                          this->name = name;
                  }
  
                  

returns: Mime type of the attachment. If it is a known type it can automatically trigger an application start (e.g. audio/mpeg can start the attachment in the phones media player)

  
                  public function getType() {
                          return this->mimetype;
                  }
  
                  

parameter: mimetype Mime type of the attachment. If it is a known type it can automatically trigger an application start (e.g. audio/mpeg can start the attachment in the phones media player)

  
                  public function setType(mimetype) {
                          this->mimetype = mimetype;
                  }
  
                  

returns: The URL to the attachment

  
                  public function getLink() {
                      return this->link;
                  }
  
          }


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.