PHP Класс Habari\InstallHandler

Наследование: extends ActionHandler
Показать файл Открыть проект

Открытые методы

Метод Описание
act_begin_install ( ) Entry point for installation. The reason there is a begin_install method to handle is that conceivably, the user can stop installation mid-install and need an alternate entry point action at a later time.
activate_plugins ( )
activate_theme ( )
ajax_check_mysql_credentials ( ) Validate database credentials for MySQL Try to connect and verify if database name exists
ajax_check_pgsql_credentials ( ) Validate database credentials for PostgreSQL Try to connect and verify if database name exists
ajax_check_sqlite_credentials ( ) Validate database credentials for SQLite Try to connect and verify if database name exists
check_htaccess ( ) checks for the presence of an .htaccess file invokes write_htaccess() as needed
check_mysql ( ) Validate database credentials for MySQL Try to connect and verify if database name exists
check_pgsql ( ) Validate database credentials for PostgreSQL Try to connect and verify if database name exists
form_defaults ( ) * sets default values for the form
get_feature_list ( SimpleXMLElement $features ) : string Return a comma-separated list of features, given a SimpleXMLElement
get_plugins ( ) Helper function to grab list of plugins
get_themes ( ) Helper function to grab list of themes
htaccess ( ) returns an array of .htaccess declarations used by Habari
secure_sqlite ( ) : boolean attempts to write the Files clause to the .htaccess file if the clause for this sqlite doesn't exist.
sqlite_contents ( ) returns an array of Files declarations used by Habari
upgrade_db ( ) Upgrade the database when the database version stored is lower than the one in source
upgrade_db_post_5111 ( )
upgrade_db_post_5112 ( )
write_htaccess ( $exists = false, $update = false, $rewritebase = true ) attempts to write the .htaccess file if none exists or to write the Habari-specific portions to an existing .htaccess

Приватные методы

Метод Описание
check_sqlite ( ) Checks for the existance of a SQLite datafile tries to create it if it does not exist
connect_to_existing_db ( ) : boolean Checks that there is a database matching the supplied arguments.
create_admin_group ( $user ) : mixed Creates the admin group using the created user
create_admin_user ( ) : mixed. Creates the administrator user from form information
create_anonymous_group ( )
create_base_comment_types ( ) Create the base core comment types and statuses
create_base_post_types ( ) Add the standard post types and statuses to the database
create_default_options ( ) Write the default options
create_first_post ( ) Create the first post
create_tags_vocabulary ( ) Add the tags vocabulary
display ( $template_name ) Helper function to remove code repetition
display_currently_upgrading ( )
get_config_file ( ) : string Gets the configuration template, inserts the variables into it, and returns it as a string
get_create_schema_and_user_queries ( ) : string[] Returns an RDMBS-specific CREATE SCHEMA plus user SQL expression(s)
get_create_table_queries ( $db_type, $table_prefix, $db_schema ) : array Install schema tables from the respective RDBMS schema
install_db ( ) : boolean Attempts to install the database. Returns the result of the installation, adding errors to the theme if any occur
meets_all_requirements ( ) Gathers information about the system in order to make sure requirements for install are met
parse_dsn ( $dsn )
set_handler_vars_from_db_connection ( ) : void Sets up install handler variables from an existing DB connection (registry)
upgrade_db_post ( $current_version )
upgrade_db_post_1310 ( )
upgrade_db_post_1794 ( )
upgrade_db_post_1845 ( )
upgrade_db_post_2264 ( )
upgrade_db_post_2707 ( )
upgrade_db_post_2786 ( )
upgrade_db_post_3030 ( )
upgrade_db_post_3124 ( )
upgrade_db_post_3158 ( )
upgrade_db_post_3236 ( )
upgrade_db_post_3539 ( )
upgrade_db_post_3698 ( )
upgrade_db_post_3701 ( )
upgrade_db_post_3749 ( )
upgrade_db_post_4291 ( )
upgrade_db_post_4382 ( )
upgrade_db_post_4571 ( )
upgrade_db_post_4588 ( )
upgrade_db_post_4763 ( )
upgrade_db_post_4770 ( )
upgrade_db_post_4980 ( )
upgrade_db_post_5096 ( )
upgrade_db_post_5097 ( )
upgrade_db_post_5105 ( )
upgrade_db_post_5106 ( )
upgrade_db_post_5107 ( )
upgrade_db_post_5116 ( )
upgrade_db_pre ( $current_version )
upgrade_db_pre_1345 ( )
write_config_file ( Bool $ignore_registry = false ) : boolean Writes the configuration file with the variables needed for initialization of the application

Описание методов

act_begin_install() публичный Метод

Entry point for installation. The reason there is a begin_install method to handle is that conceivably, the user can stop installation mid-install and need an alternate entry point action at a later time.
public act_begin_install ( )

activate_plugins() публичный Метод

public activate_plugins ( )

activate_theme() публичный Метод

public activate_theme ( )

ajax_check_mysql_credentials() публичный Метод

Validate database credentials for MySQL Try to connect and verify if database name exists

ajax_check_pgsql_credentials() публичный Метод

Validate database credentials for PostgreSQL Try to connect and verify if database name exists

ajax_check_sqlite_credentials() публичный Метод

Validate database credentials for SQLite Try to connect and verify if database name exists

check_htaccess() публичный Метод

checks for the presence of an .htaccess file invokes write_htaccess() as needed
public check_htaccess ( )

check_mysql() публичный Метод

Validate database credentials for MySQL Try to connect and verify if database name exists
public check_mysql ( )

check_pgsql() публичный Метод

Validate database credentials for PostgreSQL Try to connect and verify if database name exists
public check_pgsql ( )

form_defaults() публичный Метод

* sets default values for the form
public form_defaults ( )

get_feature_list() публичный статический Метод

Return a comma-separated list of features, given a SimpleXMLElement
public static get_feature_list ( SimpleXMLElement $features ) : string
$features SimpleXMLElement An element containing children of
Результат string A comma-separated list of those features

get_plugins() публичный Метод

Helper function to grab list of plugins
public get_plugins ( )

get_themes() публичный Метод

Helper function to grab list of themes
public get_themes ( )

htaccess() публичный Метод

returns an array of .htaccess declarations used by Habari
public htaccess ( )

secure_sqlite() публичный Метод

attempts to write the Files clause to the .htaccess file if the clause for this sqlite doesn't exist.
public secure_sqlite ( ) : boolean
Результат boolean success or failure

sqlite_contents() публичный Метод

returns an array of Files declarations used by Habari
public sqlite_contents ( )

upgrade_db() публичный Метод

Upgrade the database when the database version stored is lower than the one in source
public upgrade_db ( )

upgrade_db_post_5111() публичный Метод

upgrade_db_post_5112() публичный Метод

write_htaccess() публичный Метод

attempts to write the .htaccess file if none exists or to write the Habari-specific portions to an existing .htaccess
public write_htaccess ( $exists = false, $update = false, $rewritebase = true )