API16

JInstallerFile/update: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Custom update method public boolean True on success 1.5 <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JInstallerFile/update|E...
 
m preparing for archive only
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:




<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JInstallerFile/update|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JInstallerFile/update}}
 
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 41: Line 39:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JInstallerFile/update|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JInstallerFile/update}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=update
  category=update
  category=JInstallerFile
  category=JInstallerFile
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

Latest revision as of 01:49, 25 March 2017

Description

Custom update method public boolean True on success 1.5



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

Syntax

update()


Returns

boolean True on success

Defined in

libraries/joomla/installer/adapters/file.php

Importing

jimport( 'joomla.installer.adapters.file' );

Source Body

function update()
{
        // since this is just files, an update removes old files
        // Get the extension manifest object
        $manifest =& $this->parent->getManifest();
        $this->manifest = $this->parent->getManifest();
        $this->route = 'update';

        // Set the extensions name
        $name = JFilterInput::getInstance()->clean((string)$this->manifest->name, 'string');
        $installer = new JInstaller(); // we don't want to compromise this instance!
        $installer->uninstall('file', $name, 0);
        // ...and adds new files
        return $this->install();
}


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

Examples

Code Examples