html
[ class tree: html ] [ index: html ] [ all elements ]

Source for file MovieObject.class.php

Documentation is available at MovieObject.class.php

  1. <?php
  2. /**
  3.  * For including this file you have to define the constant "CLASSPATH".
  4.  * Because every include in the framework depends on the CLASSPATH definition.
  5.  * The CLASSPATH means the relative path to the folder that contains the
  6.  * framework GilliGan.
  7.  *
  8.  * @package html
  9.  */
  10.  
  11. if!defined"CLASSPATH" ) )
  12. {
  13.   echo "<h3>You have to define the constant CLASSPATH!</h3>\n";
  14.   echo "Example: define( 'CLASSPATH', '../path/to/classes/' );\n";
  15.   exit();
  16. }
  17.  
  18.  
  19. /**
  20.  * Including the basic class of all HTML-tags.
  21.  */
  22. require_onceCLASSPATH."html/ABSTSourceObject.class.php" );
  23. /**
  24.  * Including various regular expressions.
  25.  */
  26. include_onceCLASSPATH."RegExpConstants.inc.php" );
  27.  
  28.  
  29. /**
  30.  * @package html
  31.  *
  32.  * @version   0.1.0
  33.  * @since     0.9.1.5
  34.  * @author    Daniel Plücken <daniel@debakel.net>
  35.  * @license   http://www.gnu.org/copyleft/lesser.html
  36.  *             GNU Lesser General Public License
  37.  * @copyright Copyright (C) 2006 Daniel Plücken <daniel@debakel.net>
  38.  *
  39.  *  This library is free software; you can redistribute it and/or
  40.  *  modify it under the terms of the GNU Lesser General Public
  41.  *  License as published by the Free Software Foundation; either
  42.  *  version 2.1 of the License.
  43.  *
  44.  *  This library is distributed in the hope that it will be useful,
  45.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  46.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  47.  *  GNU Lesser General Public License for more details.
  48.  *
  49.  *  You should have received a copy of the GNU Lesser General
  50.  *  Public License along with this library; if not, write to the
  51.  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  52.  *  Boston, MA 02111-1307 USA
  53.  */
  54. class MovieObject extends ABSTSourceObject
  55. {
  56.   /**
  57.    * @access public
  58.    * @var    string $str_show_controller 
  59.    */
  60.   var $str_show_controller = "true";
  61.   /**
  62.    * @access public
  63.    * @var    string $str_autoplay 
  64.    */
  65.   var $str_autoplay = "true";
  66.   /**
  67.    * @access public
  68.    * @var    string $mime_type 
  69.    */
  70.   var $mime_type = "";
  71.  
  72.   /**
  73.    * The Constructor let the script die, cause this is an abstract class!
  74.    *
  75.    * @version 1.0
  76.    * @since   0.1.0
  77.    * @author  Daniel Plücken <daniel@debakel.net>
  78.    * @access  public
  79.    * @return  void 
  80.    */
  81.   function MovieObject$mime_type )
  82.   $this->mime_type = $mime_type}
  83.  
  84.  
  85.  
  86.   /**
  87.    * Returns a generated string based on the attributes of this HTML-Object.
  88.    *
  89.    * @version 1.0
  90.    * @since   0.1.0
  91.    * @author  Daniel Plücken <daniel@debakel.net>
  92.    * @access  public
  93.    * @return  string 
  94.    */
  95.   function get()
  96.   {
  97.     if empty$this->mime_type ) )
  98.        die"You have to set the mime type first!" );
  99.     else
  100.        return "<object type=\"".$this->mime_type."\" "
  101.                      ."data=\"".$this->src."\" "
  102.                      ."width=\"".$this->width."\" "
  103.                      ."height=\"".$this->height."\""
  104.                      .(
  105.                 $this->mime_type == "video/mpeg"
  106.                 ? " classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\""
  107.                 : ""
  108.                 )
  109.              .">\r\n"
  110.              ."  <param name=\"src\" value=\"".$this->src."\" />\r\n"
  111.              ."  <param name=\"controller\" "
  112.                       ."value=\"".$this->str_show_controller."\" />\r\n"
  113.              ."  <param name=\"autoplay\" "
  114.                       ."value=\"".$this->str_autoplay."\" />\r\n"
  115.              .(
  116.                 $this->mime_type == "video/mpeg"
  117.                 ? "<embed src=\"".$this->src."\" "
  118.                         ."width=\"".$this->width."\" "
  119.                         ."height=\"".$this->height."\" "
  120.                         ."autoplay=\"".$this->str_autoplay."\" "
  121.                         ."controller=\"".$this->str_show_controller."\" "
  122.                         ."pluginspage=\"http://www.apple.com/quicktime/download/indext.html\" "
  123.                         ."target=\"myself\"></embed>\r\n"
  124.                 : ""
  125.               )
  126.              ."</object>\r\n";
  127.   }
  128. // End of class MovieObject
  129. ?>

Documentation generated on Thu, 05 Jun 2008 19:13:45 +0200 by phpDocumentor 1.4.1