本文整理汇总了PHP中modification函数的典型用法代码示例。如果您正苦于以下问题:PHP modification函数的具体用法?PHP modification怎么用?PHP modification使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了modification函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modelFromDirectory
/**
* Allows loading from a specified directory instead of DIR_APPLICATION
*
* @param $model
* @param $directory
* @throws Exception when file was not found
*/
private function modelFromDirectory($model, $directory)
{
if (!$directory) {
$directory = DIR_APPLICATION;
}
$file = $directory . '/model/' . $model . '.php';
$class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model);
if (file_exists($file)) {
if (class_exists('VQMod')) {
include_once VQMod::modCheck(modification($file), $file);
} else {
include_once $file;
}
$this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry));
} else {
throw new Exception('Model not found', 404);
}
}
示例2: autoload
function autoload($class)
{
$file = DIR_SYSTEM . 'library/' . str_replace('\\', '/', strtolower($class)) . '.php';
if (is_file($file)) {
include_once VQMod::modCheck(modification($file), $file);
return true;
}
return false;
}
示例3: library
function library($class)
{
$file = DIR_SYSTEM . 'library/' . str_replace('\\', '/', strtolower($class)) . '.php';
if (is_file($file)) {
include_once modification($file);
return true;
} else {
return false;
}
}
示例4: helper
public function helper($helper)
{
$file = DIR_SYSTEM . 'helper/' . str_replace('../', '', (string) $helper) . '.php';
if (file_exists($file)) {
include_once VQMod::modCheck(modification($file), $file);
} else {
trigger_error('Error: Could not load helper ' . $file . '!');
exit;
}
}
开发者ID:phucsystem,项目名称:sannhaonline,代码行数:10,代码来源:vq2-system_storage_modification_system_engine_loader.php
示例5: autoload
function autoload($class)
{
$file = DIR_SYSTEM . 'library/' . str_replace('\\', '/', strtolower($class)) . '.php';
if (file_exists($file)) {
include modification($file);
return true;
} else {
return false;
}
}
示例6: helper
public function helper($helper)
{
$file = DIR_SYSTEM . 'helper/' . $helper . '.php';
if (file_exists($file)) {
include_once modification($file);
} else {
trigger_error('Error: Could not load helper ' . $file . '!');
exit;
}
}
示例7: getVisits
public function getVisits()
{
require_once modification(DIR_SYSTEM . 'library/google-apps/Client.php');
require_once modification(DIR_SYSTEM . 'library/google-apps/autoload.php');
$client = new Google_Client();
$client->setApplicationName("conect-analycts-irroba");
$client->setDeveloperKey("AIzaSyChTrzm8478VMmKSFW1ImuJfZYnaNdwLyc");
$analytcs = new Google_Service_Analytics($client);
$metrics = array('ga:pageviews');
exit(print_r($analytcs->data_realtime->get('ga:99821030', '2015-04-01', '2015-04-15', $metrics, $optParams = array())));
}
示例8: load
/**
* @param string $filename
*/
public function load($filename)
{
$file = DIR_CONFIG . $filename . '.php';
if (file_exists($file)) {
$_ = array();
require modification($file);
$this->data = array_merge($this->data, $_);
} else {
trigger_error('Error: Could not load config ' . $filename . '!');
exit;
}
}
示例9: load
public function load($filename)
{
$_ = array();
$files = array(DIR_LANGUAGE . $this->default . '/' . $filename . '.php', DIR_LANGUAGE . $this->directory . '/' . 'default.php', DIR_LANGUAGE . $this->directory . '/' . $filename . '.php');
foreach ($files as $file) {
if (file_exists($file)) {
require modification($file);
}
}
$this->data = array_merge($this->data, $_);
return $this->data;
}
示例10: autoload
function autoload($class)
{
$lib = DIR_SYSTEM . 'library/' . str_replace('\\', '/', strtolower($class)) . '.php';
$app = DIR_SYSTEM . 'library/app/' . str_replace('\\', '/', strtolower($class)) . '.php';
if (is_file($lib)) {
include modification($lib);
return true;
} elseif (is_file($app)) {
include modification($app);
return true;
}
return false;
}
示例11: load
public function load($filename)
{
$_ = array();
$file = DIR_LANGUAGE . $this->default . '/' . $filename . '.php';
if (file_exists($file)) {
require modification($file);
}
$file = DIR_LANGUAGE . $this->directory . '/' . $filename . '.php';
if (file_exists($file)) {
require modification($file);
}
$this->data = array_merge($this->data, $_);
return $this->data;
}
示例12: load
public function load($filename)
{
if (defined('HTTP_CATALOG') && version_compare(VERSION, '2.1', '>=') && strpos($filename, 'sale/custom') === 0) {
$filename = substr_replace($filename, 'customer', 0, 4);
}
//+mod by yp
$_ = array();
$file = DIR_LANGUAGE . $this->default . '/' . $filename . '.php';
if (file_exists($file)) {
require modification($file);
}
$file = DIR_LANGUAGE . $this->directory . '/' . $filename . '.php';
if (file_exists($file)) {
require modification($file);
}
$this->data = array_merge($this->data, $_);
return $this->data;
}
示例13: execute
public function execute($registry)
{
// Stop any magical methods being called
if (substr($this->method, 0, 2) == '__') {
return false;
}
if (is_file($this->file)) {
include_once modification($this->file);
$class = $this->class;
$controller = new $class($registry);
if (is_callable(array($controller, $this->method))) {
return call_user_func(array($controller, $this->method), $this->args);
} else {
return false;
}
} else {
return false;
}
}
示例14: override
public function override($filename)
{
$_ = array();
$file = Client::getDir() . 'language/' . 'override/' . $this->directory . '/' . $filename . '.php';
if (file_exists($file)) {
require modification($file);
}
$this->data = array_merge($this->data, $_);
return $this->data;
}
示例15: index
public function index()
{
$this->document->setPage('login');
require_once modification(DIR_SYSTEM . 'library/google_api/Google_Client.php');
require_once modification(DIR_SYSTEM . 'library/google_api/contrib/Google_Oauth2Service.php');
if ($this->request->server['HTTPS']) {
$server = $this->config->get('config_ssl');
} else {
$server = $this->config->get('config_url');
}
$this->load->model('account/customer');
// Login override for admin users
if (!empty($this->request->get['token'])) {
$this->event->trigger('pre.customer.login');
$this->customer->logout();
$this->cart->clear();
unset($this->session->data['wishlist']);
unset($this->session->data['payment_address']);
unset($this->session->data['payment_method']);
unset($this->session->data['payment_methods']);
unset($this->session->data['shipping_address']);
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);
unset($this->session->data['comment']);
unset($this->session->data['order_id']);
unset($this->session->data['coupon']);
unset($this->session->data['reward']);
unset($this->session->data['voucher']);
unset($this->session->data['vouchers']);
$customer_info = $this->model_account_customer->getCustomerByToken($this->request->get['token']);
if ($customer_info && $this->customer->login($customer_info['email'], '', true)) {
// Default Addresses
$this->load->model('account/address');
if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_address'] = $this->model_account_address->getAddress($this->customer->getAddressId());
}
$this->session->data['login_aps'] = true;
if ($this->config->get('config_tax_customer') == 'shipping') {
$this->session->data['shipping_address'] = $this->model_account_address->getAddress($this->customer->getAddressId());
}
$this->event->trigger('post.customer.login');
$this->response->redirect($server . URL_ACCOUNT);
}
}
if (!$this->request->server['HTTPS'] && $this->config->get('config_secure')) {
$this->response->redirect(HTTPS_SERVER . URL_LOGIN);
}
if ($this->customer->isLogged()) {
if ($this->cart->hasProducts()) {
$minimum_purchase = $this->cart->hasMinimumPurchase();
if ($minimum_purchase && (isset($minimum_purchase['requirements']) && !$minimum_purchase['requirements'])) {
$this->response->redirect($server . URL_CART);
} else {
if (isset($this->session->data['recovered']) && $this->session->data['recovered']) {
$this->response->redirect($server . URL_CART);
} else {
$this->response->redirect($server . URL_CHECKOUT);
}
}
} else {
$this->response->redirect($server . URL_ACCOUNT);
}
}
// Add to activity log
$this->load->model('account/activity');
$this->load->language('account/login');
$this->document->setTitle($this->language->get('heading_title'));
if ($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate()) {
unset($this->session->data['guest']);
unset($this->session->data['login_register']);
// Default Shipping Address
$this->load->model('account/address');
if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_address'] = $this->model_account_address->getAddress($this->customer->getAddressId());
}
if ($this->config->get('config_tax_customer') == 'shipping') {
$this->session->data['shipping_address'] = $this->model_account_address->getAddress($this->customer->getAddressId());
}
$activity_data = array('customer_id' => $this->customer->getId(), 'name' => $this->customer->getFirstName() . ' ' . $this->customer->getLastName());
$this->model_account_activity->addActivity('login', $activity_data);
if ($this->cart->hasProducts()) {
$this->session->data['login_register'] = true;
$minimum_purchase = $this->cart->hasMinimumPurchase();
if ($minimum_purchase && (isset($minimum_purchase['requirements']) && !$minimum_purchase['requirements'])) {
$this->response->redirect($server . URL_CART);
} else {
if (isset($this->session->data['recovered']) && $this->session->data['recovered']) {
$this->response->redirect($server . URL_CART);
} else {
$this->response->redirect($server . URL_CHECKOUT);
}
}
} else {
if (isset($this->session->data['checkout_cadastre'])) {
unset($this->session->data['checkout_cadastre']);
$this->response->redirect($server . URL_REGISTER);
}
}
if (isset($this->request->post['redirect']) && (strpos($this->request->post['redirect'], $this->config->get('config_url')) !== false || strpos($this->request->post['redirect'], $this->config->get('config_ssl')) !== false)) {
$this->response->redirect(str_replace('&', '&', $this->request->post['redirect']));
//.........这里部分代码省略.........