本文整理汇总了PHP中Version::addAction方法的典型用法代码示例。如果您正苦于以下问题:PHP Version::addAction方法的具体用法?PHP Version::addAction怎么用?PHP Version::addAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Version
的用法示例。
在下文中一共展示了Version::addAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$version->addTest('WritableLocation', array(APP_PATH . '/logs/access_fail/' . date('Y')));
$version->addTest('WritableLocation', array(APP_PATH . '/pharma'));
$version->addTest('WritableLocation', array(APP_PATH . '/pharma/img'));
$version->addTest('WritableLocation', array(APP_PATH . '/med_depot'));
$version->addTest('WritableLocation', array(APP_PATH . '/med_depot/img'));
$version->addTest('WritableLocation', array(APP_PATH . '/radiology'));
$version->addTest('WritableLocation', array(APP_PATH . '/radiology/dicom_img'));
$version->addTest('WritableLocation', array(APP_PATH . '/gui'));
$version->addTest('WritableLocation', array(APP_PATH . '/gui/img'));
$version->addTest('WritableLocation', array(APP_PATH . '/gui/img/logos_dept'));
$version->addTest('WritableLocation', array(APP_PATH . '/gui/smarty_template/templates_c'));
$version->addTest('WritableLocation', array(APP_PATH . '/include'));
$version->addTest('WritableLocation', array(APP_PATH . '/include/inc_init_main.php'));
$version->addTest('WritableLocation', array(APP_PATH . '/installer'));
$version->addTest('WritableLocation', array(APP_PATH . '/installer/install.php'));
$version->addAction('AcceptText', 'License Agreement', array(dirname(__FILE__) . '/LICENSE'));
/*$version->addAction('SQLSchema', array(
'username_field' => 'db_user',
'password_field' => 'db_password',
'server_field' => 'db_server',
'type_field' => 'db_type',
'db_field' => 'db_database',
'schema' => dirname(__FILE__).'/db/schema.xml'));*/
$version->addAction('SQLFile', 'Install Database Schema', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'type_field' => 'db_type', 'db_field' => 'db_database', 'files' => array(dirname(__FILE__) . '/db/sql/%type%_dump.sql')));
$version->addAction('CreateAdmin', 'Create Administrator User', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'type_field' => 'db_type', 'db_field' => 'db_database', 'adminuser_field' => 'admin_user', 'adminpass_field' => 'admin_password'));
$version->addAction('ReplaceString', 'Save System Configuration', array('message' => "Configuration information saved", 'files' => array(dirname(__FILE__) . '/inc_init_main.php.dist' => APP_PATH . '/include/inc_init_main.php'), 'fields' => array('INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password', 'INSTALL_DB_DATABASE' => 'db_database', 'INSTALL_DB_SERVER' => 'db_server', 'INSTALL_DB_TYPE' => 'db_type', 'INSTALL_ADDRESS' => 'care2x_address', 'INSTALL_PROTOCOL' => 'transfer_protocol', 'INSTALL_KEY_1' => '1st_key', 'INSTALL_KEY_2' => '2nd_key', 'INSTALL_KEY_3' => '3rd_key')));
$version->addAction('CSVOptions', 'Install Optional DB Tables', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'type_field' => 'db_type', 'db_field' => 'db_database', 'files' => array(dirname(__FILE__) . '/db/icd10', dirname(__FILE__) . '/db/ops301')));
$version->addFinalAction('RenameFile', 'Rename Critical Installation Files', array('message' => "Critical installation files renamed", 'files' => array(APP_PATH . '/installer/install.php' => APP_PATH . '/installer/install_' . rand(1, $rmax) . '.php'), APP_PATH . '/install/install.php' => APP_PATH . '/install/install_' . rand(1, $rmax) . '.php', APP_PATH . '/install/encode_pw_md5.php' => APP_PATH . '/install/encode_pw_md5_' . rand(1, $rmax) . '.php', APP_PATH . '/install/initialize.php' => APP_PATH . '/install/initialize_' . rand(1, $rmax) . '.php', APP_PATH . '/create_admin.php' => APP_PATH . '/create_admin_' . rand(1, $rmax) . '.php'));
$versions->add($version);
?>
示例2: Version
$versions->collectData('db_password', 'Database Password', 'text', '');
$versions->collectData('db_server', 'Database Server', 'text', 'localhost');
$versions->collectData('db_port', 'Database Port', 'text', '3306');
$versions->collectData('db_database', 'Database Name', 'text', '');
// 0.0 Release (All Required Tests and Actions)
$version_0_0 = new Version('0.0');
$version_0_0->addTest('PHPVersionOver', array('4.3.0'));
$version_0_0->addTest('PHPExtension', array('mysql', 'curl'));
$version_0_0->addTest('WritableLocation', array($base_path . '/includes/global_config.php', $base_path . '/installer/tmp'));
$version_0_0->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.1.0'));
$version_0_0->addAction('AcceptText', array($base_path . '/LICENSE'));
$version_0_0->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array($base_path . '/includes/global_config.php.dist' => $base_path . '/includes/global_config.php'), 'fields' => array('INSTALL_DB_DATABASE' => 'db_database', 'INSTALL_DB_SERVER' => 'db_server', 'INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password')));
$versions->add($version_0_0);
// 0.2 Release
$version_0_2 = new Version('0.2');
$version_0_2->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/sureinvoice.sql')));
$versions->add($version_0_2);
// 0.3 Release
$version_0_3 = new Version('0.3');
$version_0_3->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/update-0.2-0.3.sql')));
$versions->add($version_0_3);
// 0.4 Release
$version_0_4 = new Version('0.4');
$version_0_4->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/update-0.3-0.4.sql')));
$versions->add($version_0_4);
// 1.0 Release
$version_1_0 = new Version('1.0');
$version_1_0->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/update-0.4-0.5.sql')));
$version_1_0->addAction('SQLOptions', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/sureinvoice_initial_data.sql')));
$version_1_0->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array($base_path . '/includes/global_config.php.dist' => $base_path . '/includes/global_config.php'), 'fields' => array('INSTALL_DB_DATABASE' => 'db_database', 'INSTALL_DB_SERVER' => 'db_server', 'INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password')));
$versions->add($version_1_0);
示例3: VersionSet
<?php
/*
* Created on Aug 16, 2005
*
* Example version file for application installer
*/
$versions = new VersionSet();
$version_0_2 = new Version('0.2');
$version_0_2->collectData('db_user', 'Database Username', 'text', 'root');
$version_0_2->collectData('db_password', 'Database Password', 'text', '');
$version_0_2->collectData('db_server', 'Database Server', 'text', 'localhost');
$version_0_2->collectData('db_port', 'Database Port', 'text', '3306');
$version_0_2->collectData('db_database', 'Database Name', 'text', '');
$version_0_2->addTest('PHPVersionOver', array('4.2.0'));
$version_0_2->addTest('PHPExtension', array('mysql', 'gd'));
$version_0_2->addTest('WritableLocation', array(dirname(__FILE__) . '/test_replacement.txt', realpath(dirname(__FILE__) . '/tmp')));
$version_0_2->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.0.1'));
$version_0_2->addAction('AcceptText', array(dirname(__FILE__) . '/LICENSE'));
$version_0_2->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/sureinvoice.sql')));
$version_0_2->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array(dirname(__FILE__) . '/test_replacement.txt'), 'fields' => array('INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password'), 'strings' => array('TEST_STRING' => 'This is my test string text!')));
$versions->add($version_0_2);
$version_0_3 = new Version('0.3');
$version_0_3->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/update-0.2-0.3.sql')));
$versions->add($version_0_3);
$version_0_4 = new Version('0.4');
$version_0_4->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/update-0.3-0.4.sql')));
$versions->add($version_0_4);
?>