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