Source for file package.php

Documentation is available at package.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Libraries
  4.  * @subpackage  Installer
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Joomla! Package Manifest File
  14.  *
  15.  * @package     Joomla.Libraries
  16.  * @subpackage  Installer
  17.  * @since       3.1
  18.  */
  19. {
  20.     /**
  21.      * Unique name of the package
  22.      *
  23.      * @var    string 
  24.      * @since  3.1
  25.      */
  26.     public $packagename = '';
  27.  
  28.     /**
  29.      * Website for the package
  30.      *
  31.      * @var    string 
  32.      * @since  3.1
  33.      */
  34.     public $url = '';
  35.  
  36.     /**
  37.      * Scriptfile for the package
  38.      *
  39.      * @var    string 
  40.      * @since  3.1
  41.      */
  42.     public $scriptfile = '';
  43.  
  44.     /**
  45.      * Apply manifest data from a SimpleXMLElement to the object.
  46.      *
  47.      * @param   SimpleXMLElement  $xml  Data to load
  48.      *
  49.      * @return  void 
  50.      *
  51.      * @since   3.1
  52.      */
  53.     protected function loadManifestFromData(SimpleXMLElement $xml)
  54.     {
  55.         $this->name        = (string) $xml->name;
  56.         $this->packagename = (string) $xml->packagename;
  57.         $this->update      = (string) $xml->update;
  58.         $this->authorurl   = (string) $xml->authorUrl;
  59.         $this->author      = (string) $xml->author;
  60.         $this->authoremail = (string) $xml->authorEmail;
  61.         $this->description = (string) $xml->description;
  62.         $this->packager    = (string) $xml->packager;
  63.         $this->packagerurl = (string) $xml->packagerurl;
  64.         $this->scriptfile  = (string) $xml->scriptfile;
  65.         $this->version     = (string) $xml->version;
  66.  
  67.         if (isset($xml->files->file&& count($xml->files->file))
  68.         {
  69.             foreach ($xml->files->file as $file)
  70.             {
  71.                 // NOTE: JInstallerExtension doesn't expect a string.
  72.                 // DO NOT CAST $file
  73.                 $this->filelist[new JInstallerExtension($file);
  74.             }
  75.         }
  76.     }
  77. }

Documentation generated on Tue, 19 Nov 2013 15:10:00 +0100 by phpDocumentor 1.4.3