PHP Class UpdateModel, vanilla

Inheritance: extends Gdn_Model
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$AddonSiteUrl URL to the addons site.

Méthodes publiques

Méthode Description
analyzeAddon ( string $Path, boolean $ThrowError = true ) : array Check an addon's file to extract the addon information out of it.
compareAddons ( array $MyAddons, array $LatestAddons ) : boolean
findFiles ( string $path, array $fileNames ) : array Find a list of filenames in a folder or zip.
getAddonUpdates ( boolean $Enabled = false ) : array | boolean Deprecated.
getAddons ( boolean $Enabled = false ) : array Deprecated.
parseCoreVersion ( string $Path ) : string Parse the version out of the core's index.php file.
parseInfoArray ( string $Path, string $Variable = false ) : array | false Offers a quick and dirty way of parsing an addon's info array without using eval().
runStructure ( boolean $captureOnly = false ) Run the structure for all addons.

Méthodes protégées

Méthode Description
checkRequiredFields ( $info ) : array Check globally required fields in our addon info.

Private Methods

Méthode Description
addAddon ( $Addon, &$Addons )
getInfoFiles ( string $Path, array $InfoPaths ) : array
getInfoZip ( string $Path, array $InfoPaths, boolean $TmpPath = false, boolean $ThrowError = true ) : array Open a zip archive and inspect its contents for the requested paths.

Method Details

analyzeAddon() public static méthode

Check an addon's file to extract the addon information out of it.
public static analyzeAddon ( string $Path, boolean $ThrowError = true ) : array
$Path string The path to the file.
$ThrowError boolean Whether or not to throw an exception if there is a problem analyzing the addon.
Résultat array An array of addon information.

checkRequiredFields() protected static méthode

Check globally required fields in our addon info.
protected static checkRequiredFields ( $info ) : array
$info
Résultat array $results

compareAddons() public méthode

public compareAddons ( array $MyAddons, array $LatestAddons ) : boolean
$MyAddons array
$LatestAddons array
Résultat boolean

findFiles() public static méthode

Find a list of filenames in a folder or zip.
public static findFiles ( string $path, array $fileNames ) : array
$path string Folder or zip file to look in.
$fileNames array List of files to attempt to locate inside $path.
Résultat array

getAddonUpdates() public méthode

Deprecated.
Deprecation:
public getAddonUpdates ( boolean $Enabled = false ) : array | boolean
$Enabled boolean Deprecated.
Résultat array | boolean Deprecated.

getAddons() public méthode

Deprecated.
public getAddons ( boolean $Enabled = false ) : array
$Enabled boolean Deprecated.
Résultat array Deprecated.

parseCoreVersion() public static méthode

Parse the version out of the core's index.php file.
public static parseCoreVersion ( string $Path ) : string
$Path string The path to the index.php file.
Résultat string A string containing the version or empty if the file could not be parsed.

parseInfoArray() public static méthode

Offers a quick and dirty way of parsing an addon's info array without using eval().
public static parseInfoArray ( string $Path, string $Variable = false ) : array | false
$Path string The path to the info array.
$Variable string The name of variable containing the information.
Résultat array | false The info array or false if the file could not be parsed.

runStructure() public méthode

The structure runs the addons in priority order so that higher priority addons override lower priority ones.
public runStructure ( boolean $captureOnly = false )
$captureOnly boolean Run the structure or just capture the SQL changes.

Property Details

$AddonSiteUrl public_oe property

URL to the addons site.
public $AddonSiteUrl