Question

I am trying to retrieve the information inside the "source" but I cant seem to find the correct way to do it.

object(JInstaller)#163 (16) {
["_paths":protected]=>
array(5) {
  ["source"]=>
  string(95) "/var/zpanel/hostdata/desarrollo/public_html/complusoft_net/demo-j2517/tmp/install_53679ce0c6870"

Please note that the path property is protected

Was it helpful?

Solution 2

I have found the answer, I hope this helps other people:

JInstaller::getInstance()->getPath('source');

OTHER TIPS

Straightforward

$obj->_paths["source"]

Of course this only works when _paths is public - for a protected attribute you need a helper method.

public function getPath() {
    return $this->_paths;
}

and can then use something like

$obj->getPath()["source"]

or

$path = $obj->getPath();
$path["source"]

Assuming that you are using Joomla, you would need:

$your_object->getPath('source');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top