本文整理匯總了PHP中Get::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Get::__construct方法的具體用法?PHP Get::__construct怎麽用?PHP Get::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Get
的用法示例。
在下文中一共展示了Get::__construct方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*/
public function __construct($config = array())
{
// first we run the perent constructor
if (parent::__construct($config)) {
// set the Joomla version
$this->joomlaVersion = $config['joomlaVersion'];
// set the template path
$this->templatePath = $this->compilerPath . '/joomla_' . $config['joomlaVersion'];
// set some default names
$this->componentSalesName = 'com_' . $this->componentData->sales_name . '__J' . $this->joomlaVersion;
$this->componentBackupName = 'com_' . $this->componentData->sales_name . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;
$this->componentFolderName = 'com_' . $this->componentData->name_code . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;
// set component folder path
$this->componentPath = $this->compilerPath . '/' . $this->componentFolderName;
// set the template path for custom
$this->templatePathCustom = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/custom');
// set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData();
// make sure there is no old build
$this->removeFolder($this->componentPath);
// set the new folders
if (!$this->setFolders()) {
return false;
}
// set all static folders and files
if (!$this->setStatic()) {
return false;
}
// set all the dynamic folders and files
if (!$this->setDynamique()) {
return false;
}
return true;
}
return false;
}
示例2: __construct
public function __construct(\Frame\Core\Context $context)
{
parent::__construct($context);
$this->get = json_decode($_SERVER['QUERY_STRING'], true);
}