API16

JInstaller/refreshManifestCache

From Joomla! Documentation

< API16:JInstaller

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

<! removed transcluded page call, red link never existed >

Syntax[edit]

refreshManifestCache($eid)
Parameter Name Default Value Description
$eid

Defined in[edit]

libraries/joomla/installer/installer.php

Importing[edit]

jimport( 'joomla.installer.installer' );

Source Body[edit]

function refreshManifestCache($eid)
{
        if ($eid)
        {
                $this->extension =& JTable::getInstance('extension');
                if (!$this->extension->load($eid))
                {
                        $this->abort(JText::_('Failed to load extension details'));
                        return false;
                }
                if ($this->extension->state == -1)
                {
                        $this->abort(JText::_('Refresh Manifest Cache failed').': '.JText::_('Extension is not currently installed'));
                        return false;
                }

                // Lazy load the adapter
                if (!isset($this->_adapters[$this->extension->type]) || !is_object($this->_adapters[$this->extension->type]))
                {
                        if (!$this->setAdapter($this->extension->type)) {
                                return false;
                        }
                }

                if (is_object($this->_adapters[$this->extension->type]))
                {
                        if (method_exists($this->_adapters[$this->extension->type], 'refreshManifestCache'))
                        {
                                $result = $this->_adapters[$this->extension->type]->refreshManifestCache();
                                if ($result !== false) return true; else return false;
                        }
                        else
                        {
                                $this->abort(JText::_('Method not supported for this extension type').': '. $this->extension->type);
                                return false;
                        }
                }
                return false;
        }
        else
        {
                $this->abort(JText::_('Refresh Manifest Cache failed').': '.JText::_('Extension not valid'));
                return false;
        }
}


<! removed transcluded page call, red link never existed >

Examples[edit]

Code Examples[edit]