1 <?php
2 /**
3 * @package Joomla.Libraries
4 * @subpackage Installer
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * Joomla! Library Manifest File
14 *
15 * @since 3.1
16 */
17 class JInstallerManifestLibrary extends JInstallerManifest
18 {
19 /**
20 * File system name of the library
21 *
22 * @var string
23 * @since 3.1
24 */
25 public $libraryname = '';
26
27 /**
28 * Creation Date of the library
29 *
30 * @var string
31 * @since 3.1
32 */
33 public $creationDate = '';
34
35 /**
36 * Copyright notice for the library
37 *
38 * @var string
39 * @since 3.1
40 */
41 public $copyright = '';
42
43 /**
44 * License for the library
45 *
46 * @var string
47 * @since 3.1
48 */
49 public $license = '';
50
51 /**
52 * Author for the library
53 *
54 * @var string
55 * @since 3.1
56 */
57 public $author = '';
58
59 /**
60 * Author email for the library
61 *
62 * @var string
63 * @since 3.1
64 */
65 public $authoremail = '';
66
67 /**
68 * Author URL for the library
69 *
70 * @var string
71 * @since 3.1
72 */
73 public $authorurl = '';
74
75 /**
76 * Apply manifest data from a SimpleXMLElement to the object.
77 *
78 * @param SimpleXMLElement $xml Data to load
79 *
80 * @return void
81 *
82 * @since 3.1
83 */
84 protected function loadManifestFromData(SimpleXMLElement $xml)
85 {
86 $this->name = (string) $xml->name;
87 $this->libraryname = (string) $xml->libraryname;
88 $this->version = (string) $xml->version;
89 $this->description = (string) $xml->description;
90 $this->creationdate = (string) $xml->creationDate;
91 $this->author = (string) $xml->author;
92 $this->authoremail = (string) $xml->authorEmail;
93 $this->authorurl = (string) $xml->authorUrl;
94 $this->packager = (string) $xml->packager;
95 $this->packagerurl = (string) $xml->packagerurl;
96 $this->update = (string) $xml->update;
97
98 if (isset($xml->files) && isset($xml->files->file) && count($xml->files->file))
99 {
100 foreach ($xml->files->file as $file)
101 {
102 $this->filelist[] = (string) $file;
103 }
104 }
105 }
106 }
107