Class AkPluginManager

(line 40)

Description

AkObject
   |
   --AkPluginManager

Located in File: /AkPlugin/AkPluginManager.php

Plugin manager


Class Variables

Summary:

$main_repository = AK_PLUGINS_MAIN_REPOSITORY (line 48)

Data type : string

Main repository, must be an Apache mod_svn interface to subversion. Defaults to AK_PLUGINS_MAIN_REPOSITORY.
  • access: - public

$respository_discovery_page = AK_PLUGINS_REPOSITORY_DISCOVERY_PAGE (line 59)

Data type : string

Repository discovery page.

A wiki page containing links to repositories. Links on that wiki page must link to an http:// protocol (no SSL yet) and end in plugins. Defaults to AK_PLUGINS_REPOSITORY_DISCOVERY_PAGE

  • access: - public

Class Constants

Summary:

Method Detail

Summary:
void addRepository (string $repository_path)
void canUseSvn ()
array getAvailableRepositories ([boolean $force_reload = false])
array getPlugins ([boolean $force_update = false])
mixed getRepositoryForPlugin (string $plugin_name, [string $repository = null])
void guessBestInstallMethod ([ $options = array()])
mixed installPlugin (string $plugin_name, [unknown $repository = null], [array $options = array()])
boolean removeRepository (string $repository_path)
void uninstallPlugin (string $plugin_name)
null updatePlugin (string $plugin_name, [string $repository = null])
void _getExternals ()
void _installUsingCheckout ( $name,  $uri, [ $rev = null], [ $force = false])
void _installUsingExport ( $name,  $uri, [ $rev = null], [ $force = false])
void _installUsingExternals ( $name,  $uri, [ $rev = null], [ $force = false])
void _installUsingHttp ( $name,  $uri)
void _setExternals ( $items, [ $extras = ''])
void _uninstallExternals ( $name)
void _updateUsingCheckout ( $name)
void _updateUsingExport ( $name,  $uri)
void _updateUsingExternals ( $name)
void _updateUsingHttp ( $name,  $uri)

Method addRepository (line 101)

void addRepository( string $repository_path)

Ads a repository to the know repositories list.

Parameters

  • string $repository_path: An Apache mod_svn interface to subversion.

Info

  • access - public

Method canUseSvn (line 225)

void canUseSvn( )

Info

Method getAvailableRepositories (line 70)

array getAvailableRepositories( [boolean $force_reload = false])

Gets a list of available repositories.

Parameters

  • boolean $force_reload: Forces reloading, useful for testing and when running as an application server.

Info

  • return - List of repository URLs
  • access - public

Method getDiscoveredRepositories (line 289)

array getDiscoveredRepositories( )

Gets a list of repositories available at the web page defined by AK_PLUGINS_REPOSITORY_DISCOVERY_PAGE (http://wiki.akelos.org/plugins by default)

Info

  • return - An array of non trusted repositories available at http://wiki.akelos.org/plugins
  • access - public

Method getInstalledPlugins (line 160)

array getInstalledPlugins( )

Retrieves a list of installed plugins

Info

  • return - Returns an array with the plugins available at AK_PLUGINS_DIR
  • access - public

Method getPlugins (line 141)

array getPlugins( [boolean $force_update = false])

Gets a list of available plugins.

Goes through each trusted plugin server and retrieves the name of the folders (plugins) on the repository path.

Parameters

  • boolean $force_update: If it is not set to true, it will only check remote sources once per hour

Info

  • return - Returns an array containing "plugin_name" => "repository URL"
  • access - public

Method getRepositoryForPlugin (line 303)

mixed getRepositoryForPlugin( string $plugin_name, [string $repository = null])

Returns the repository for a given $plugin_name

Parameters

  • string $plugin_name: The name of the plugin
  • string $repository: If a repository name is provided it will check for the plugin name existance.

Info

  • return - Repository URL or false if plugin can't be found
  • access - public

Method guessBestInstallMethod (line 211)

void guessBestInstallMethod( [ $options = array()])

Parameters

  • $options:

Info

Method installPlugin (line 187)

mixed installPlugin( string $plugin_name, [unknown $repository = null], [array $options = array()])

Installs a plugin

Install a plugin from a remote resource.

Plugins can have an Akelos installer at located at "plugin_name/installer/plugin_name_installer.php" If the installer is available, it will run the "PluginNameInstaller::install()" method, which will trigger all the up_* methods for the installer.

Parameters

  • string $plugin_name: Plugin name
  • unknown $repository: An Apache mod_svn interface to subversion. If not provided it will use a trusted repository.
  • array $options: - externals: Use svn:externals to grab the plugin. Enables plugin updates and plugin versioning.
    • checkout: Use svn checkout to grab the plugin. Enables updating but does not add a svn:externals entry.
    • revision: Checks out the given revision from subversion. Ignored if subversion is not used.
    • force: Overwrite existing files.

Info

  • return - Returns false if the plugin can't be found.
  • access - public

Method removeRepository (line 117)

boolean removeRepository( string $repository_path)

Removes a repository to the know repositories list.

Parameters

  • string $repository_path: An Apache mod_svn interface to subversion.

Info

  • return - Returns false if the repository was not available
  • access - public

Method uninstallPlugin (line 270)

void uninstallPlugin( string $plugin_name)

Uninstalls an existing plugin

Plugins can have an Akelos installer at located at "plugin_name/installer/plugin_name_installer.php" If the installer is available, it will run the "PluginNameInstaller::uninstall()" method, which will trigger all the down_* methods for the installer.

Parameters

  • string $plugin_name: Plugin name

Info

  • access - public

Method updatePlugin (line 243)

null updatePlugin( string $plugin_name, [string $repository = null])

Updates a plugin if there are changes.

Uses subversion update if available. If http update is used, it will download the whole plugin unless there is a CHANGELOG file, in which case it will only perform the update if there are changes.

Parameters

  • string $plugin_name: Plugin name
  • string $repository: An Apache mod_svn interface to subversion. If not provided it will use a trusted repository.

Info

  • access - public

Method _getExternals (line 600)

void _getExternals( )

Info

Method _installUsingCheckout (line 527)

void _installUsingCheckout( $name, $uri, [ $rev = null], [ $force = false])

Parameters

  • $name:
  • $uri:
  • $rev:
  • $force:

Info

Method _installUsingExport (line 541)

void _installUsingExport( $name, $uri, [ $rev = null], [ $force = false])

Parameters

  • $name:
  • $uri:
  • $rev:
  • $force:

Info

Method _installUsingExternals (line 555)

void _installUsingExternals( $name, $uri, [ $rev = null], [ $force = false])

Parameters

  • $name:
  • $uri:
  • $rev:
  • $force:

Info

Method _installUsingHttp (line 616)

void _installUsingHttp( $name, $uri)

Parameters

  • $name:
  • $uri:

Info

Method _setExternals (line 580)

void _setExternals( $items, [ $extras = ''])

Parameters

  • $items:
  • $extras:

Info

Method _shouldUseSvnCheckout (line 522)

void _shouldUseSvnCheckout( )

Info

Method _shouldUseSvnExternals (line 517)

void _shouldUseSvnExternals( )

Info

Method _uninstallExternals (line 593)

void _uninstallExternals( $name)

Parameters

  • $name:

Info

Method _updateUsingCheckout (line 535)

void _updateUsingCheckout( $name)

Parameters

  • $name:

Info

Method _updateUsingExport (line 549)

void _updateUsingExport( $name, $uri)

Parameters

  • $name:
  • $uri:

Info

Method _updateUsingExternals (line 565)

void _updateUsingExternals( $name)

Parameters

  • $name:

Info

Method _updateUsingHttp (line 570)

void _updateUsingHttp( $name, $uri)

Parameters

  • $name:
  • $uri:

Info

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary

Inherited From Class AkObject

AkObject::AkObject() - A hack to support __construct() on PHP 4

AkObject::__construct() - Class constructor, overriden in descendant classes

AkObject::freeMemory() - Unsets circular reference children that are not freed from memory when calling unset() or when the parent object is garbage collected.

AkObject::log() -

AkObject::toString() - Object-to-string conversion

AkObject::__clone() - Clone class (Zend Engine 2 compatibility trick)

AkObject::__destruct() - Class destructor, overriden in descendant classes

AkObject::__toString() -



Documentation generated on Tue, 17 Jun 2008 14:26:31 +0200 by phpDocumentor 1.3.2