<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* Metadata for an extension (e.g. the extension's "info.xml" file)
class CRM_Extension_Info {
/**
- * Extension info file name
+ * Extension info file name.
*/
const FILENAME = 'info.xml';
public $file = NULL;
/**
- * Load extension info an XML file
+ * Load extension info an XML file.
*
* @param $file
*
}
/**
- * Load extension info a string
+ * Load extension info a string.
*
- * @param string $string XML content
+ * @param string $string
+ * XML content.
*
* @throws CRM_Extension_Exception_ParseException
* @return CRM_Extension_Info
* @param null $label
* @param null $file
*/
- function __construct($key = NULL, $type = NULL, $name = NULL, $label = NULL, $file = NULL) {
- $this->key = $key;
- $this->type = $type;
- $this->name = $name;
- $this->label = $label;
- $this->file = $file;
+ public function __construct($key = NULL, $type = NULL, $name = NULL, $label = NULL, $file = NULL) {
+ $this->key = $key;
+ $this->type = $type;
+ $this->name = $name;
+ $this->label = $label;
+ $this->file = $file;
}
/**
* @return void
*/
public function parse($info) {
- $this->key = (string) $info->attributes()->key;
- $this->type = (string) $info->attributes()->type;
- $this->file = (string) $info->file;
+ $this->key = (string) $info->attributes()->key;
+ $this->type = (string) $info->attributes()->type;
+ $this->file = (string) $info->file;
$this->label = (string) $info->name;
// Convert first level variables to CRM_Core_Extension properties