本文整理汇总了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);
}