当前位置: 首页>>代码示例>>PHP>>正文


PHP Installer::__construct方法代码示例

本文整理汇总了PHP中Installer::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::__construct方法的具体用法?PHP Installer::__construct怎么用?PHP Installer::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Installer的用法示例。


在下文中一共展示了Installer::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

 /**
  * Constructor.
  *
  * @param string $siteName
  * @param string $admin
  * @param array $option
  */
 function __construct($siteName, $admin = null, array $option = [])
 {
     global $wgContLang;
     parent::__construct();
     if (isset($option['scriptpath'])) {
         $this->specifiedScriptPath = true;
     }
     foreach ($this->optionMap as $opt => $global) {
         if (isset($option[$opt])) {
             $GLOBALS[$global] = $option[$opt];
             $this->setVar($global, $option[$opt]);
         }
     }
     if (isset($option['lang'])) {
         global $wgLang, $wgLanguageCode;
         $this->setVar('_UserLang', $option['lang']);
         $wgContLang = Language::factory($option['lang']);
         $wgLang = Language::factory($option['lang']);
         $wgLanguageCode = $option['lang'];
         RequestContext::getMain()->setLanguage($wgLang);
     }
     $this->setVar('wgSitename', $siteName);
     $metaNS = $wgContLang->ucfirst(str_replace(' ', '_', $siteName));
     if ($metaNS == 'MediaWiki') {
         $metaNS = 'Project';
     }
     $this->setVar('wgMetaNamespace', $metaNS);
     if ($admin) {
         $this->setVar('_AdminName', $admin);
     }
     if (!isset($option['installdbuser'])) {
         $this->setVar('_InstallUser', $this->getVar('wgDBuser'));
         $this->setVar('_InstallPassword', $this->getVar('wgDBpassword'));
     } else {
         $this->setVar('_InstallUser', $option['installdbuser']);
         $this->setVar('_InstallPassword', isset($option['installdbpass']) ? $option['installdbpass'] : "");
         // Assume that if we're given the installer user, we'll create the account.
         $this->setVar('_CreateDBAccount', true);
     }
     if (isset($option['pass'])) {
         $this->setVar('_AdminPassword', $option['pass']);
     }
     // Set up the default skins
     $skins = $this->findExtensions('skins');
     $this->setVar('_Skins', $skins);
     if ($skins) {
         $skinNames = array_map('strtolower', $skins);
         $this->setVar('wgDefaultSkin', $this->getDefaultSkin($skinNames));
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:57,代码来源:CliInstaller.php

示例2: array

 /**
  * Constructor.
  *
  * @param $siteName
  * @param $admin
  * @param $option Array
  */
 function __construct($siteName, $admin = null, array $option = array())
 {
     global $wgContLang;
     parent::__construct();
     if (isset($option['scriptpath'])) {
         $this->specifiedScriptPath = true;
     }
     foreach ($this->optionMap as $opt => $global) {
         if (isset($option[$opt])) {
             $GLOBALS[$global] = $option[$opt];
             $this->setVar($global, $option[$opt]);
         }
     }
     if (isset($option['lang'])) {
         global $wgLang, $wgLanguageCode;
         $this->setVar('_UserLang', $option['lang']);
         $wgContLang = Language::factory($option['lang']);
         $wgLang = Language::factory($option['lang']);
         $wgLanguageCode = $option['lang'];
     }
     $this->setVar('wgSitename', $siteName);
     $metaNS = $wgContLang->ucfirst(str_replace(' ', '_', $siteName));
     if ($metaNS == 'MediaWiki') {
         $metaNS = 'Project';
     }
     $this->setVar('wgMetaNamespace', $metaNS);
     if ($admin) {
         $this->setVar('_AdminName', $admin);
     }
     if (!isset($option['installdbuser'])) {
         $this->setVar('_InstallUser', $this->getVar('wgDBuser'));
         $this->setVar('_InstallPassword', $this->getVar('wgDBpassword'));
     } else {
         $this->setVar('_InstallUser', $option['installdbuser']);
         $this->setVar('_InstallPassword', isset($option['installdbpass']) ? $option['installdbpass'] : "");
     }
     if (isset($option['pass'])) {
         $this->setVar('_AdminPassword', $option['pass']);
     }
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:47,代码来源:CliInstaller.php

示例3: __construct

 /**
  * Creates a new FTPInstaller object.
  * 
  * @param	string		$targetDir	the full path on the machine the ftp server is running	
  * @param	string		$source		name of the source tar archive
  * @param	FTP		$ftp		active ftp connection
  * @param 	FileHandler	$fileHandler
  * @param	string		$folder		extract only the files from this subfolder 
  */
 public function __construct($targetDir, $source, FTP $ftp, $fileHandler = null, $folder = '')
 {
     $this->ftp = $ftp;
     parent::__construct($targetDir, $source, $fileHandler, $folder);
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:14,代码来源:FTPInstaller.class.php

示例4: __construct

 /**
  * Constructor.
  *
  * @param $request WebRequest
  */
 public function __construct(WebRequest $request)
 {
     parent::__construct();
     $this->output = new WebInstallerOutput($this);
     $this->request = $request;
     // Add parser hooks
     global $wgParser;
     $wgParser->setHook('downloadlink', array($this, 'downloadLinkHook'));
     $wgParser->setHook('doclink', array($this, 'docLink'));
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:15,代码来源:WebInstaller.php

示例5:

 /**
  * Constructor.
  * @see install.form.InstallForm for the expected parameters
  * @param $xmlDescriptor string descriptor path
  * @param $params array installer parameters
  * @param $isPlugin boolean true iff a plugin is being installed
  */
 function __construct($xmlDescriptor, $params, $isPlugin)
 {
     parent::__construct($xmlDescriptor, $params, $isPlugin);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:11,代码来源:PKPInstall.inc.php

示例6:

 /**
  * Constructor.
  * @param $params array upgrade parameters
  */
 function __construct($params, $installFile = 'upgrade.xml', $isPlugin = false)
 {
     parent::__construct($installFile, $params, $isPlugin);
 }
开发者ID:pkp,项目名称:ojs,代码行数:8,代码来源:Upgrade.inc.php

示例7: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     // TODO
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:8,代码来源:ExtensionInstaller.php


注:本文中的Installer::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。