Webapps

Class Webapps
extends Module\Skeleton\Standard implements Module\Support\Webapps\Contracts\Webapp uses NamespaceUtilitiesTrait

Known subclasses

Webapp_Module
Abstract


Open source code
Methods Summary
public
public
protected
# getAppName( )
Get webapp name
public static
# blacklisted( string $app )
Vendor blocked app
public static
# allApps( )
All apps known to panel Excludes blacklisted apps. @see knownApps
public static
# knownApps( )
List known apps, factoring in exclusions
public
# fortify( string $hostname , string $path = '', string $mode = 'max', array $args = array ( ) )
Restrict write-access by the app

Implementation of

protected
# getAppRoot( string $hostname , string $path = '' )
Convert hostname/path into application root following symlinks
protected
# getInternalName( )
Get module symbol
protected
# getDocrootUser( string $docroot )
Get non-system user docroot ownership
protected
# mapFilesFromList( array $files , string $docroot )
Create docroot map of files
protected
# buildFileMapList( string $f , string $docroot , string $prefix = '' )
Build map of physical files from glob-style list
protected
# getACLFiles( string $mode , string $docroot )
Get ACL files
public
# setOptions( string $docroot , array $options )
protected
# initializeMeta( string $docroot , array $opts = array ( ) )
public
# getOptions( $docroot )
Get webapp options
protected
# parseInstallOptions( array & $options , string $hostname , string $path = '' )
Parse general installer options Handles: version, ssl, autoupdate, email, user, and git attributes
protected
# notifyInstalled( string $hostname , string $path = '', array $args = array ( ) )
Notify application installed
public
# failed( string $docroot , bool $failedFlag = NULL )
Get or set failed status
public
# getVersionLock( string $docroot )
Get application version lock
public
# has_fortification( string $hostname , string $path = '', string $mode = NULL )
Web application supports fortification

Implementation of

public
# fortification_modes( string $hostname , string $path = '' )
Supported Fortification modes

Implementation of

public
# unfortify( string $hostname , string $path = '' )
Relax permissions to allow write-access
public
# uninstall( string $hostname , string $path = '', string $delete = 'all' )
Remove an installed web application

Implementation of

protected
# getDocumentRoot( string $hostname , string $path = '' )
Get document root from hostname
protected
# normalizeDocumentRoot( string $hostname , string $path = '' )
Retrieve document root realpath for given host
protected
# map( string $mode , string $docroot , array $params = NULL )
Map management
protected
# getModule( )
Get Web App module name
protected
# remapPublic( string $hostname , string $path = '', string $public = 'public' )
Migrate a document root to public/
protected
# movePrimaryDocumentRoot( string $docroot )
Migrate document root elsewhere
protected
# unsquash( string $docroot )
Change ownership from active uid to parent directory uid
public
# next_version( string $version , string $maximalbranch = '99999999.99999999.99999999' )
Get next version in hierarchy

Implementation of

public
# is_current( string $version = NULL, string $branchcomp = NULL )
Check if version is latest or get latest version

Implementation of

protected
# getApnscpFunctionInterceptorFromDocroot( string $docroot , Auth_Info_User & $context = NULL )
Create an afi instance based on directory ownership
protected
# hasMemoryAllowance( int $memory , int & $available = NULL )
Account has sufficient memory in MB
protected
# getMaximalMemory( )
Maximum memory permitted in MB
protected
# hasStorageAllowance( int $storage , int & $available = NULL )
Account has sufficient storage in MB
protected
# checkEmail( array & $options )
Check email option
protected
# prepareSquash( array & $options )
Convert ownership to match parent directory of docroot In relocatable docroots (moving /var/www/html to /var/www/foo-bar/public) this always runs as the same user as "user" option
protected
# checkVersion( array & $options )
Check and prepare version information
protected
# checkDocroot( string $docroot , string $user = NULL )
Verify docroot is writeable before beginning installation
protected
# kill( string $hostname , string $path = '' )
Kill processes running under location
protected
# getLatestVersion( string $branch = NULL )
Get latest release
protected
# fixRewriteBase( string $docroot , string $path = '' )
Add RewriteBase to htaccess
protected
# removeInvalidDirectives( string $docroot , string $path = '' )
Remove invalid directives from .htaccess
protected
# download( string $url , string $dest , bool $extract = true )
Download specified file
protected
# setInfo( string $docroot , array $info )
Set webapp meta
public static
# getAllHostnames( Auth_Info_User $ctx )
Get all hostnamers on site
public static
# getAllPartitionedHostnames( Auth_Info_User $ctx , bool $showWWW = true, bool $sort = false )
Get hostnames grouped by subdomain and domain
abstract public
# valid( string $hostname , string $path = '' )
Document root contains expected app type

Implementation of

public
# theme_status( string $hostname , string $path = '', string $theme = NULL )
public
# install_theme( string $hostname , string $path , string $theme , string $version = NULL )
public
# uninstall_theme( string $hostname , string $path , string $theme , bool $force = false )
public
# plugin_status( string $hostname , string $path = '', string $plugin = NULL )
public
# install_plugin( string $hostname , string $path , string $plugin , string $version = '' )
public
# uninstall_plugin( string $hostname , string $path , string $plugin , bool $force = false )
public
# disable_all_plugins( string $hostname , string $path = '' )
public
# db_config( string $hostname , string $path = '' )
public
# change_admin( string $hostname , string $path , array $fields )
public
# get_admin( string $hostname , string $path = '' )
public
# update_all( string $hostname , string $path = '', string $version = NULL )
public
# update( string $hostname , string $path = '', string $version = NULL )
public
# update_plugins( string $hostname , string $path = '', array $plugins = array ( ) )
public
# update_themes( string $hostname , string $path = '', array $themes = array ( ) )
public
# asset_skipped( string $hostname , string $path , string $name , string $type )
Asset skipped for update
public
# reconfigure( string $hostname , string $path , string|array $param , mixed $value = NULL )
Reconfigure a webapp

Implementation of

public
# reconfigurables( string $hostname , string $path = '' )
List of reconfigurable elements

Implementation of

public
# get_reconfigurable( string $hostname , string $path , string|string[] $setting )
Get reconfigurable setting

Implementation of

public static
# registerApplication( string $app , string $handler )
Register new web application
public
# snapshot( string $hostname , string $path = '', string $comment = 'snapshot' )
Snapshot a web application

Implementation of

public
# rollback( string $hostname , string $path = '', string $commit = NULL )
Rollback specified snapshot

Implementation of

public static
# handlerFromApplication( string $app )
Get handler from application
Methods inherited from Module\Skeleton\Standard
__construct(), setUserParameters(), autoloadModule(), __wakeup(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), cleanUserParameters(), query()
Methods used from NamespaceUtilitiesTrait trait
getBaseClassName() appendNamespace() getNamespace()
Constants Summary
public string APPLICATION_PREF_KEY
# 'webapps.paths'
public string APP_NAME
# 'undefined'
public string DEFAULT_VERSION_LOCK
# 'none'
public array BANNED_DIRECTIVES
# array ( 0 => 'FollowSymlinks', 1 => 'Includes', 2 => 'All', )
public int LEARNING_DURATION
# 60
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties Summary
protected array $aclList
List of modes and files

# array ( )
protected static $registeredProviders


# array ( )
public $exportedFunctions


# array ( '*' => 3, 'get_versions' => 15, 'is_current' => 15, 'next_version' => 15, )
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id
Properties used from NamespaceUtilitiesTrait