/**
  * 
  * @param object|array $data
  */
 public function __construct($data = null)
 {
     parent::__construct($data);
     $framework = Zo2Framework::getInstance();
     /* Init default profile root directory */
     $this->_profileDir = JPATH_ROOT . '/templates/' . $framework->template->template . '/assets/profiles';
 }
Example #2
0
 /**
  * __construct description
  * @param [object] $data    [description]
  * @param [string] $xmlPath [description]
  */
 public function __construct($data = NULL, $xmlPath = NULL)
 {
     parent::__construct($data);
     if (!is_null($xmlPath)) {
         $this->_xml = new SimpleXMLElement($xmlPath, NULL, true);
     }
 }
Example #3
0
	/**
	 * Constructor
	 *
	 * @param   string  $data  The raw parms text.
	 * @param   string  $path  Path to the XML setup file.
	 *
	 * @return  JParameter
	 *
	 * @deprecated  12.1
	 * @since   11.1
	 */
	public function __construct($data = '', $path = '')
	{
		// Deprecation warning.
		JLog::add('JParameter::__construct is deprecated.', JLog::WARNING, 'deprecated');

		parent::__construct('_default');

		// Set base path.
		$this->_elementPath[] = dirname(__FILE__) . '/parameter/element';

		if ($data = trim($data))
		{
			if (strpos($data, '{') === 0)
			{
				$this->loadString($data);
			}
			else
			{
				$this->loadINI($data);
			}
		}

		if ($path)
		{
			$this->loadSetupFile($path);
		}

		$this->_raw = $data;
	}
Example #4
0
 /**
  * Constructor
  *
  * @access	protected
  * @param	string The raw parms text
  * @param	string Path to the xml setup file
  * @since	1.5
  */
 function __construct($data, $path = '')
 {
     parent::__construct('_default');
     // Set base path
     $this->_elementPath[] = dirname(__FILE__) . DS . 'parameter' . DS . 'element';
     if (trim($data)) {
         $this->loadINI($data);
     }
     if ($path) {
         $this->loadSetupFile($path);
     }
     $this->_raw = $data;
 }
Example #5
0
 /**
  * Constructor
  *
  * @param	string	The raw parms text.
  * @param	string	Path to the xml setup file.
  * @since	1.5
  */
 public function __construct($data = '', $path = '')
 {
     parent::__construct('_default');
     // Set base path.
     $this->_elementPath[] = dirname(__FILE__) . '/parameter/element';
     if ($data = trim($data)) {
         if (strpos($data, '{') === 0) {
             $this->loadJSON($data);
         } else {
             $this->loadINI($data);
         }
     }
     if ($path) {
         $this->loadSetupFile($path);
     }
     $this->_raw = $data;
 }
Example #6
0
 public function __construct($data = '', $path = '')
 {
     $this->_defaultNameSpace = 'default';
     parent::__construct($data, $path);
 }
Example #7
0
 public function __construct($data = '', $path = '')
 {
     parent::__construct('_default');
     // Set base path.
     $this->_elementPath[] = dirname(__FILE__) . '/parameter/element';
     if (!empty($data) && is_string($data)) {
         $this->loadString($data);
     }
     if ($path) {
         $this->loadSetupFile($path);
     }
     $this->_raw = $data;
 }