[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
DokuWiki Plugin extension (Helper Component)
Author: | Michael Hamann |
License: | GPL 2 http://www.gnu.org/licenses/gpl-2.0.html |
File Size: | 1310 lines (41 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
helper_plugin_extension_extension:: (66 methods):
__construct()
__destruct()
isSingleton()
setExtension()
isInstalled()
isGitControlled()
isBundled()
isProtected()
isInWrongFolder()
isEnabled()
updateAvailable()
isTemplate()
getID()
getInstallName()
getBase()
getDisplayName()
getAuthor()
getEmail()
getEmailID()
getDescription()
getURL()
getInstalledVersion()
getUpdateDate()
getInstallDate()
getDependencies()
getMissingDependencies()
getConflicts()
getSimilarExtensions()
getTags()
getPopularity()
getSecurityWarning()
getSecurityIssue()
getScreenshotURL()
getThumbnailURL()
getLastDownloadURL()
getDownloadURL()
hasDownloadURLChanged()
getBugtrackerURL()
getSourcerepoURL()
getDonationURL()
getTypes()
getCompatibleVersions()
getLastUpdate()
getInstallDir()
getInstallType()
canModify()
installFromUpload()
installFromURL()
installOrUpdate()
uninstall()
enable()
disable()
purgeCache()
readLocalData()
updateManagerData()
readManagerData()
writeManagerData()
mkTmpDir()
downloadToFile()
download()
installArchive()
findFolders()
decompress()
guessArchiveType()
dircopy()
removeDeletedfiles()
Class: helper_plugin_extension_extension - X-Ref
Class helper_plugin_extension_extension represents a single extension (plugin or template)__construct() X-Ref |
helper_plugin_extension_extension constructor. |
__destruct() X-Ref |
Destructor deletes any dangling temporary directories |
isSingleton() X-Ref |
return: bool false, this component is not a singleton |
setExtension($id) X-Ref |
Set the name of the extension this instance shall represents, triggers loading the local and remote data param: string $id The id of the extension (prefixed with template: for templates) return: bool If some (local or remote) data was found |
isInstalled() X-Ref |
If the extension is installed locally return: bool If the extension is installed locally |
isGitControlled() X-Ref |
If the extension is under git control return: bool |
isBundled() X-Ref |
If the extension is bundled return: bool If the extension is bundled |
isProtected() X-Ref |
If the extension is protected against any modification (disable/uninstall) return: bool if the extension is protected |
isInWrongFolder() X-Ref |
If the extension is installed in the correct directory return: bool If the extension is installed in the correct directory |
isEnabled() X-Ref |
If the extension is enabled return: bool If the extension is enabled |
updateAvailable() X-Ref |
If the extension should be updated, i.e. if an updated version is available return: bool If an update is available |
isTemplate() X-Ref |
If the extension is a template return: bool If this extension is a template |
getID() X-Ref |
Get the ID of the extension This is the same as getName() for plugins, for templates it's getName() prefixed with 'template:' return: string |
getInstallName() X-Ref |
Get the name of the installation directory return: string The name of the installation directory |
getBase() X-Ref |
Get the basename of the extension return: string The basename |
getDisplayName() X-Ref |
Get the display name of the extension return: string The display name |
getAuthor() X-Ref |
Get the author name of the extension return: string|bool The name of the author or false if there is none |
getEmail() X-Ref |
Get the email of the author of the extension if there is any return: string|bool The email address or false if there is none |
getEmailID() X-Ref |
Get the email id, i.e. the md5sum of the email return: string|bool The md5sum of the email if there is any, false otherwise |
getDescription() X-Ref |
Get the description of the extension return: string The description |
getURL() X-Ref |
Get the URL of the extension, usually a page on dokuwiki.org return: string The URL |
getInstalledVersion() X-Ref |
Get the installed version of the extension return: string|bool The version, usually in the form yyyy-mm-dd if there is any |
getUpdateDate() X-Ref |
Get the install date of the current version return: string|bool The date of the last update or false if not available |
getInstallDate() X-Ref |
Get the date of the installation of the plugin return: string|bool The date of the installation or false if not available |
getDependencies() X-Ref |
Get the names of the dependencies of this extension return: array The base names of the dependencies |
getMissingDependencies() X-Ref |
Get the names of the missing dependencies return: array The base names of the missing dependencies |
getConflicts() X-Ref |
Get the names of all conflicting extensions return: array The names of the conflicting extensions |
getSimilarExtensions() X-Ref |
Get the names of similar extensions return: array The names of similar extensions |
getTags() X-Ref |
Get the names of the tags of the extension return: array The names of the tags of the extension |
getPopularity() X-Ref |
Get the popularity information as floating point number [0,1] return: float|bool The popularity information or false if it isn't available |
getSecurityWarning() X-Ref |
Get the text of the security warning if there is any return: string|bool The security warning if there is any, false otherwise |
getSecurityIssue() X-Ref |
Get the text of the security issue if there is any return: string|bool The security issue if there is any, false otherwise |
getScreenshotURL() X-Ref |
Get the URL of the screenshot of the extension if there is any return: string|bool The screenshot URL if there is any, false otherwise |
getThumbnailURL() X-Ref |
Get the URL of the thumbnail of the extension if there is any return: string|bool The thumbnail URL if there is any, false otherwise |
getLastDownloadURL() X-Ref |
Get the last used download URL of the extension if there is any return: string|bool The previously used download URL, false if the extension has been installed manually |
getDownloadURL() X-Ref |
Get the download URL of the extension if there is any return: string|bool The download URL if there is any, false otherwise |
hasDownloadURLChanged() X-Ref |
If the download URL has changed since the last download return: bool If the download URL has changed |
getBugtrackerURL() X-Ref |
Get the bug tracker URL of the extension if there is any return: string|bool The bug tracker URL if there is any, false otherwise |
getSourcerepoURL() X-Ref |
Get the URL of the source repository if there is any return: string|bool The URL of the source repository if there is any, false otherwise |
getDonationURL() X-Ref |
Get the donation URL of the extension if there is any return: string|bool The donation URL if there is any, false otherwise |
getTypes() X-Ref |
Get the extension type(s) return: array The type(s) as array of strings |
getCompatibleVersions() X-Ref |
Get a list of all DokuWiki versions this extension is compatible with return: array The versions in the form yyyy-mm-dd => ('label' => label, 'implicit' => implicit) |
getLastUpdate() X-Ref |
Get the date of the last available update return: string|bool The last available update in the form yyyy-mm-dd if there is any, false otherwise |
getInstallDir() X-Ref |
Get the base path of the extension return: string The base path of the extension |
getInstallType() X-Ref |
The type of extension installation return: string One of "none", "manual", "git" or "automatic" |
canModify() X-Ref |
If the extension can probably be installed/updated or uninstalled return: bool|string True or error string |
installFromUpload($field, $overwrite = true) X-Ref |
Install an extension from a user upload param: string $field name of the upload file param: boolean $overwrite overwrite folder if the extension name is the same return: array The list of installed extensions |
installFromURL($url, $overwrite = true) X-Ref |
Install an extension from a remote URL param: string $url param: boolean $overwrite overwrite folder if the extension name is the same return: array The list of installed extensions |
installOrUpdate() X-Ref |
Install or update the extension return: array The list of installed extensions |
uninstall() X-Ref |
Uninstall the extension return: bool If the plugin was sucessfully uninstalled |
enable() X-Ref |
Enable the extension return: bool|string True or an error message |
disable() X-Ref |
Disable the extension return: bool|string True or an error message |
purgeCache() X-Ref |
Purge the cache by touching the main configuration file |
readLocalData() X-Ref |
Read local extension data either from info.txt or getInfo() |
updateManagerData($url = '', $installed = null) X-Ref |
Save the given URL and current datetime in the manager.dat file of all installed extensions param: string $url Where the extension was downloaded from. (empty for manual installs via upload) param: array $installed Optional list of installed plugins |
readManagerData() X-Ref |
Read the manager.dat file |
writeManagerData() X-Ref |
Write the manager.data file |
mkTmpDir() X-Ref |
Returns a temporary directory The directory is registered for cleanup when the class is destroyed return: false|string |
downloadToFile($url, $file, $defaultName = '') X-Ref |
downloads a file from the net and saves it - $file is the directory where the file should be saved - if successful will return the name used for the saved file, false otherwise param: string $url url to download param: string $file path to file or directory where to save param: string $defaultName fallback for name of download return: bool|string if failed false, otherwise true or the name of the file in the given dir author: Andreas Gohr <andi@splitbrain.org> author: Chris Smith <chris@jalakai.co.uk> |
download($url) X-Ref |
Download an archive to a protected path param: string $url The url to get the archive from return: string The path where the archive was saved |
installArchive($file, $overwrite = false, $base = '') X-Ref |
param: string $file The path to the archive that shall be installed param: bool $overwrite If an already installed plugin should be overwritten param: string $base The basename of the plugin if it's known return: array list of installed extensions |
findFolders(&$result, $directory, $default_type = 'plugin', $subdir = '') X-Ref |
Find out what was in the extracted directory Correct folders are searched recursively using the "*.info.txt" configs as indicator for a root folder. When such a file is found, it's base setting is used (when set). All folders found by this method are stored in the 'new' key of the $result array. For backwards compatibility all found top level folders are stored as in the 'old' key of the $result array. When no items are found in 'new' the copy mechanism should fall back the 'old' list. param: array $result - results are stored here param: string $directory - the temp directory where the package was unpacked to param: string $default_type - type used if no info.txt available param: string $subdir - a subdirectory. do not set. used by recursion return: bool - false on error author: Andreas Gohr <andi@splitbrain.org> |
decompress($file, $target) X-Ref |
Decompress a given file to the given target directory Determines the compression type from the file extension param: string $file archive to extract param: string $target directory to extract to return: bool |
guessArchiveType($file) X-Ref |
Determine the archive type of the given file Reads the first magic bytes of the given file for content type guessing, if neither bz, gz or zip are recognized, tar is assumed. param: string $file The file to analyze return: string|false false if the file can't be read, otherwise an "extension" author: Andreas Gohr <andi@splitbrain.org> |
dircopy($src, $dst) X-Ref |
Copy with recursive sub-directory support param: string $src filename path to file param: string $dst filename path to file return: bool|int|string |
removeDeletedfiles($installed) X-Ref |
Delete outdated files from updated plugins param: array $installed |