本文整理汇总了PHP中Loader::loadComponents方法的典型用法代码示例。如果您正苦于以下问题:PHP Loader::loadComponents方法的具体用法?PHP Loader::loadComponents怎么用?PHP Loader::loadComponents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::loadComponents方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
// Load components required by this module
Loader::loadComponents($this, array("Input"));
// Load the language required by this module
Language::loadLang("paymentwall", null, dirname(__FILE__) . DS . "language" . DS);
}
示例2: __construct
/**
* Construct a new merchant gateway
*/
public function __construct()
{
// Load components required by this gateway
Loader::loadComponents($this, array("Input"));
// Load the language required by this gateway
Language::loadLang("nonmerchant_demo", null, dirname(__FILE__) . DS . "language" . DS);
}
示例3: __construct
public function __construct()
{
Loader::loadComponents($this, array("Input"));
Language::loadLang("lang", null, dirname(__FILE__) . DS . "language" . DS);
Loader::loadHelpers($this, array("Html"));
$this->loadConfig(dirname(__FILE__) . DS . "config.json");
}
示例4: __construct
/**
* Initializes the Automatic Billing Extended library.
*
* @param string $gateway_identifier The gateway's chosen identifier
* @param string $gateway_hash The gateway's chosen hash (if null, it will use the gateway_identifier's sha256 hash as the gateway hash)
*/
public function __construct($gateway_identifier, $gateway_hash = null)
{
Loader::loadComponents($this, array("Record"));
$this->gateway_identifier = $gateway_identifier;
if ($gateway_hash == null) {
$this->gateway_hash = hash("sha256", $this->gateway_identifier);
} else {
$this->gateway_hash = $gateway_hash;
}
}
开发者ID:sktan,项目名称:Blesta-Automatic-Billing-Extended-Library,代码行数:16,代码来源:automatic_billing_extended_lib.php
示例5: __construct
/**
* Initializes the module
*/
public function __construct()
{
// Load components required by this module
Loader::loadComponents($this, array("Input"));
// Load the language required by this module
Language::loadLang("gogetsslv2", null, dirname(__FILE__) . DS . "language" . DS);
//load our config file
Configure::load("gogetsslv2", dirname(__FILE__) . DS . "config" . DS);
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
}
示例6: uninstall
/**
* Performs any necessary cleanup actions
*
* @param int $plugin_id The ID of the plugin being uninstalled
* @param boolean $last_instance True if $plugin_id is the last instance across all companies for this plugin, false otherwise
*/
public function uninstall($plugin_id, $last_instance)
{
if (!isset($this->Record)) {
Loader::loadComponents($this, array("Record"));
}
// Remove all tables *IFF* no other company in the system is using this plugin
if ($last_instance) {
try {
if (is_dir($this->upload_path)) {
$this->delTree($this->upload_path);
}
} catch (Exception $e) {
// Error dropping... no permission?
// $this->Input->setErrors(array('db'=> array('create'=>$e->getMessage())));
return;
}
}
}
示例7: __construct
public function __construct()
{
Loader::loadComponents($this, array("Input", "Record"));
Language::loadLang("tastycpanel_lang", null, dirname(__FILE__) . DS . "language" . DS);
Loader::loadHelpers($this, array("Html"));
}
示例8: loadJson
/**
* Loads the JSON component into this object, making it ready to use
*
* /DONE/
*/
private function loadJson()
{
if (!isset($this->Json) || !$this->Json instanceof Json) {
Loader::loadComponents($this, array("Json"));
}
}
示例9: ssl
/**
* SSL
*
* @param type $package
* @param type $service
* @param array $vars
* @param array $post
*/
public function ssl($package, $service, array $vars = array(), array $post = array())
{
Loader::loadComponents($this, array("Record"));
$row = $this->getModuleRow();
$fields = $this->serviceFieldsToObject($service->fields);
$api = $this->getApiByMeta($row->meta, $fields);
$this->vars = $this->getPageVars($vars);
switch ($this->vars->action) {
case "generatecsr":
$data = array('city' => $post['city'], 'company' => $post['company'], 'companydivision' => $post['companydivision'], 'country' => $post['country'], 'email' => $post['email'], 'host' => $post['domain'], 'state' => $post['state'], 'pass' => $post['pass']);
if ($api->sendApi2Request("SSL", "gencsr", $data)) {
$this->printJson($this->parseResponseToJson($api->getCleanResponse()));
}
break;
case "generatekey":
if ($api->sendApi2Request("SSL", "genkey", array('host' => empty($post["selectdomain"]) ? $post["domain"] : $post["selectdomain"], 'keysize' => $post["keysize"]))) {
$this->printJson($this->parseResponseToJson($api->getCleanResponse()));
}
break;
case "generatecrt":
$data = array('host' => $post['domain'], 'city' => $post['city'], 'company' => $post['company'], 'companydivision' => $post['companydivision'], 'country' => $post['country'], 'email' => $post['email'], 'state' => $post['state']);
if ($api->sendApi2Request("SSL", "gencrt", $data)) {
$this->printJson($this->parseResponseToJson($api->getCleanResponse()));
}
break;
case "uploadkey":
if ($api->sendApi2Request("SSL", "uploadkey", array('host' => empty($post["selectdomain"]) ? $post["domain"] : $post["selectdomain"], 'key' => $post["key"]))) {
$this->printJson($this->parseResponseToJson($api->getCleanResponse()));
}
break;
case "uploadcrt":
if ($api->sendApi2Request("SSL", "uploadcrt", array($post["key"]))) {
$this->printJson($this->parseResponseToJson($api->getCleanResponse()));
}
break;
case "viewkey":
$domain = $this->getFromVars($_GET, "domain", $fields->cpanel_domain);
if ($api->sendApi2Request("SSLInfo", "fetchinfo", array('domain' => $domain))->isSuccess()) {
$this->prepareView("sslviewkey");
$this->view->data = $api->getResponse()->cpanelresult->data[0];
return $this->showCorrectView($this->view);
} else {
$this->prepareView("sslerror");
$this->view->response = $api->getResponse();
return $this->showCorrectView($this->view);
}
break;
case "viewcrt":
$domain = $this->getFromVars($_GET, "domain", $fields->cpanel_domain);
if ($api->sendApi2Request("SSLInfo", "fetchinfo", array('domain' => $domain))->isSuccess()) {
$this->prepareView("sslviewcrt");
$this->view->data = $api->getResponse()->cpanelresult->data[0];
return $this->showCorrectView($this->view);
} else {
return 'Unknown error occured';
}
break;
default:
break;
}
$api2 = clone $api;
$api3 = clone $api;
$api4 = clone $api;
$request1 = $api->sendApi2Request("SSL", "listkeys");
$request2 = $api3->sendApi2Request("SSL", "listcrts");
$request3 = $api4->sendApi2Request("SSL", "listcsrs");
if ($request1->isSuccess() and $request2->isSuccess() and $request3->isSuccess() and !$this->Input->errors()) {
$domains[''] = 'Select a domain';
$domains[$fields->cpanel_domain] = $fields->cpanel_domain;
$domains = array_merge($domains, $this->DataStructure->create("Array")->numericToKey($api2->sendApi2Request("AddonDomain", "listaddondomains")->getResponse()->cpanelresult->data, "domain", "domain"));
$domains = array_merge($domains, $this->DataStructure->create("Array")->numericToKey($api2->sendApi2Request("SubDomain", "listsubdomains")->getResponse()->cpanelresult->data, 'domain', 'domain'));
$domains = array_merge($domains, $this->DataStructure->create("Array")->numericToKey($api2->sendApi2Request("Park", "listparkeddomains")->getResponse()->cpanelresult->data, 'domain', 'domain'));
$keysdomains[''] = 'Select a domain';
$keysdomains = array_merge($keysdomains, $this->DataStructure->create("Array")->numericToKey($request1->getResponse()->cpanelresult->data, 'host', 'host'));
$this->prepareView("ssl");
$this->view->set("cpanel_domain", $fields->cpanel_domain);
$this->view->keys = $request1->getResponse();
$this->view->crts = $request2->getResponse();
$this->view->csrs = $request3->getResponse();
$this->view->domains = $domains;
$this->view->keysdomains = $keysdomains;
$this->view->username = $fields->cpanel_username;
$this->view->client = $this->Record->select(array("contacts.*"))->from("clients")->leftJoin("contacts", "contacts.client_id", "=", "clients.id", false)->where("clients.id", "=", $service->client_id)->fetch();
return $this->view->fetch();
} else {
return "Request 1 status: <code>{$request1->getResultMessage()}</code><br>Request 2 status: <code>{$request2->getResultMessage()}</code><br>Request 3 status: <code>{$request3->getResultMessage()}</code><br>";
}
}