I've been working through the JInstaller class for documentation. A
question, first of all, is how is this intended to be used? It is
obviously used as a base class for the other installer classes. Is it
intended that 3PD extensions use this base class to install items
themselves (i.e. extension addons, etc.)?
Also:
in the preInstallCheck method, there is an if statement as follows:
if (!is_null($p_fromdir))
{
$this->_installDir = $p_fromdir;
}
which is fine, but no action is taken if $p_fromdir is null. I think the
method should return false if the directory is null, as if this is the
case the files will not be able to be copied. There is no reason to
proceed. A warning is raised if the install file could not be found, or
read, so I suppose that this would catch as well the situation where
there was no install directory (since one would assume that if there was
no directory then the file would not be locatable). But perhaps an
error should be returned specifying more precisely what the problem is
(that the directory was not specified) rather then the more general case
which would be that the install file could not be found.
Also, I'm assuming that the update method is present to provide an
interface for future implementation of an extension upgrade feature?
Ian
The installer system was moved to libraries due to my SoC work from
last year (libraries was a spin off from this) in creating an update
system for the then 4.5.3 release. Before this time (and as is in
Joomla! 1.0), the installers were located within the installer
component directory which made life hard in providing an update
system. So I decided to use it as the test for the libraries system.
That system as a whole relied on DOMit! based XML-RPC clients and
servers as implemented in 4.5.3.
So while it isn't intended for 3PD use, it was placed there to make it
more accessible as a library. The update feature is planned to do
exactly that in future, perhaps even after this years SoC. As for the
other question, I will have to look over my old SoC code and see if I
used it in a particular reason, but I'm pretty certain that your
assertion is correct.
Louis should be able to make further comment.
Sam -- lacking in sleep