<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
* An URL for public extensions repository
*/
- //CONST DEFAULT_EXTENSIONS_REPOSITORY = 'http://civicrm.org/extdir/ver={ver}|cms={uf}';
+ //const DEFAULT_EXTENSIONS_REPOSITORY = 'http://civicrm.org/extdir/ver={ver}|cms={uf}';
/**
* Extension info file name
protected $civicrmUrl;
+ /**
+ * @param CRM_Extension_Container_Interface $container
+ * @param CRM_Utils_Cache_Interface $cache
+ * @param null $cacheKey
+ * @param null $civicrmPath
+ * @param null $civicrmUrl
+ */
public function __construct(CRM_Extension_Container_Interface $container, CRM_Utils_Cache_Interface $cache = NULL, $cacheKey = NULL, $civicrmPath = NULL, $civicrmUrl = NULL) {
$this->container = $container;
$this->cache = $cache;
$this->civicrmUrl = rtrim($config->resourceBase, '/');
}
if ($civicrmPath) {
- $this->civicrmPath = rtrim($civicrmPath,'/');
+ $this->civicrmPath = rtrim($civicrmPath, '/');
} else {
global $civicrm_root;
- $this->civicrmPath = rtrim($civicrm_root,'/');
+ $this->civicrmPath = rtrim($civicrm_root, '/');
}
}
/**
* Given the class, provides extension's key.
*
- * @access public
*
- * @param string $clazz extension class name
+ * @param string $clazz
+ * Extension class name.
*
* @return string name of extension key
*/
/**
* Given the class, provides extension path.
*
- * @access public
*
* @param $clazz
*
- * @internal param string $key extension key
- *
* @return string full path the extension .php file
*/
public function classToPath($clazz) {
/**
* Given the string, returns true or false if it's an extension key.
*
- * @access public
*
- * @param string $key a string which might be an extension key
+ * @param string $key
+ * A string which might be an extension key.
*
* @return boolean true if given string is an extension name
*/
/**
* Given the string, returns true or false if it's an extension class name.
*
- * @access public
*
- * @param string $clazz a string which might be an extension class name
+ * @param string $clazz
+ * A string which might be an extension class name.
*
* @return boolean true if given string is an extension class name
*/
}
/**
- * @param string $key extension fully-qualified-name
+ * @param string $key
+ * Extension fully-qualified-name.
* @param bool $fresh
*
* @throws CRM_Extension_Exception
* @throws Exception
- * @return object CRM_Extension_Info
+ * @return CRM_Extension_Info
*/
public function keyToInfo($key, $fresh = FALSE) {
if ($fresh || !array_key_exists($key, $this->infos)) {
/**
* Given the key, provides extension's class name.
*
- * @access public
*
- * @param string $key extension key
+ * @param string $key
+ * Extension key.
*
* @return string name of extension's main class
*/
* Given the key, provides the path to file containing
* extension's main class.
*
- * @access public
*
- * @param string $key extension key
+ * @param string $key
+ * Extension key.
*
* @return string path to file containing extension's main class
*/
* Given the key, provides the path to file containing
* extension's main class.
*
- * @access public
- * @param string $key extension key
+ * @param string $key
+ * Extension key.
* @return string local path of the extension source tree
*/
public function keyToBasePath($key) {
* Given the key, provides the path to file containing
* extension's main class.
*
- * @access public
*
- * @param string $key extension key
+ * @param string $key
+ * Extension key.
*
* @return string url for resources in this extension
*/
/**
* Fetch the list of active extensions of type 'module'
*
- * @param $fresh bool whether to forcibly reload extensions list from canonical store
+ * @param $fresh
+ * Bool whether to forcibly reload extensions list from canonical store.
* @return array - array(array('prefix' => $, 'file' => $))
*/
public function getActiveModuleFiles($fresh = FALSE) {
return $urls;
}
+ /**
+ * @param string $name
+ *
+ * @return bool
+ */
public function isActiveModule($name) {
$activeModules = $this->getActiveModuleFiles();
foreach ($activeModules as $activeModule) {
/**
* Given the class, provides the template path.
*
- * @access public
*
- * @param string $clazz extension class name
+ * @param string $clazz
+ * Extension class name.
*
* @return string path to extension's templates directory
*/
* Given te class, provides the template name.
* @todo consider multiple templates, support for one template for now
*
- * @access public
*
- * @param string $clazz extension class name
+ * @param string $clazz
+ * Extension class name.
*
* @return string extension's template name
*/