本文整理汇总了PHP中Register类的典型用法代码示例。如果您正苦于以下问题:PHP Register类的具体用法?PHP Register怎么用?PHP Register使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Register类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: performAutoReg
public function performAutoReg($module_status)
{
require_once 'RegisterModel.php';
$obj_reg = new Register();
$regr = array();
$limit = 50;
$regr['referral_name'] = "admin";
$regr['referral_id'] = "12345";
$regr['prodcut_id'] = 1;
$regr['full_name'] = "TEST NAME";
$regr['pswd'] = "123";
$regr['cpswd'] = "123";
$regr['fathername'] = "TEST FATHER NAME";
$regr['address'] = "TEST ADDRESS";
$regr['post_office'] = "546537";
$regr['town'] = "TEST TOWN";
$regr['district'] = "TEST DT";
$regr['pin'] = "TEST PIN";
$regr['mobile'] = "TEST MOB";
$regr['land_line'] = "TEST LAND";
$regr['email'] = "[email protected]";
$regr['state'] = "TEST ST";
for ($i = 10; $i < $limit; $i++) {
$regr['username'] = date("Y-m-d H:i:s") + $i;
$fathet_pos_pass_arr = $this->getFatherPositionPassCode();
$regr['fatherid'] = $this->OBJ_VALI->IdToUserName($fathet_pos_pass_arr['father_id']);
$regr['position'] = $fathet_pos_pass_arr['position'];
$regr['passcode'] = $fathet_pos_pass_arr['passcode'];
$regr['joining_date'] = date('Y-m-d H:i:s');
$obj_reg->confirmRegister($regr, $module_status);
}
}
开发者ID:E-SOFTinc,项目名称:UFlp-Back-Office,代码行数:32,代码来源:test_model.php
示例2: delete
function delete($id)
{
if ($id) {
$register = new Register($id);
$register->delete();
set_notify('success', lang('delete_data_complete'));
}
redirect($_SERVER['HTTP_REFERER']);
}
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:9,代码来源:registers.php
示例3: test_userType
function test_userType()
{
$r = new Register();
$r->userTypeError(1, "11", "");
$this->assertTrue(empty($r->noAccessCode));
$r = new Register();
$r->userTypeError(2, "11", "11");
$this->assertTrue(empty($r->noAccessCode));
$r = new Register();
$r->userTypeError(2, "11", "");
$this->assertFalse(empty($r->noAccessCode));
$r = new Register();
$r->userTypeError(2, "", "11");
$this->assertFalse(empty($r->noAccessCode));
}
开发者ID:arshadalisoomro,项目名称:hospital_reservation_system,代码行数:15,代码来源:RegisterTest.php
示例4: test_splitQty
public function test_splitQty()
{
/** === Test Data === */
$STORE_ID = 2;
$STOCK_ID = 4;
$PROD_ID = 32;
$ITEM_ID = 64;
$QTY = 128;
$ORDER = $this->_mock(\Magento\Sales\Api\Data\OrderInterface::class);
/** === Setup Mocks === */
// $storeId = $order->getStoreId();
$ORDER->shouldReceive('getStoreId')->once()->andReturn($STORE_ID);
// $stockId = $this->_manStock->getStockIdByStoreId($storeId);
$this->mManStock->shouldReceive('getStockIdByStoreId')->once()->andReturn($STOCK_ID);
// $items = $order->getItems();
$mItem = $this->_mock(\Magento\Sales\Api\Data\OrderItemInterface::class);
$ORDER->shouldReceive('getItems')->once()->andReturn([$mItem]);
//
// FIRST ITERATION
//
// $prodId = $item->getProductId();
$mItem->shouldReceive('getProductId')->once()->andReturn($PROD_ID);
// $itemId = $item->getItemId();
$mItem->shouldReceive('getItemId')->once()->andReturn($ITEM_ID);
// $qty = $item->getQtyOrdered();
$mItem->shouldReceive('getQtyOrdered')->once()->andReturn($QTY);
// $itemData = $this->_manObj->create(\Praxigento\Warehouse\Service\QtyDistributor\Data\Item::class);
$mItemData = $this->_mock(\Praxigento\Warehouse\Service\QtyDistributor\Data\Item::class);
$this->mManObj->shouldReceive('create')->once()->andReturn($mItemData);
// $itemData->setItemId($itemId);
$mItemData->shouldReceive('setItemId')->once()->with($ITEM_ID);
// $itemData->setProductId($prodId);
$mItemData->shouldReceive('setProductId')->once()->with($PROD_ID);
// $itemData->setQuantity($qty);
$mItemData->shouldReceive('setQuantity')->once()->with($QTY);
// $itemData->setStockId($stockId);
$mItemData->shouldReceive('setStockId')->once()->with($STOCK_ID);
//
// $reqSale = $this->_manObj->create(\Praxigento\Warehouse\Service\QtyDistributor\Request\RegisterSale::class);
$mReqSale = $this->_mock(\Praxigento\Warehouse\Service\QtyDistributor\Request\RegisterSale::class);
$this->mManObj->shouldReceive('create')->once()->andReturn($mReqSale);
// $reqSale->setSaleItems($itemsData);
$mReqSale->shouldReceive('setSaleItems')->once();
// $this->_callQtyDistributor->registerSale($reqSale);
$this->mCallQtyDistributor->shouldReceive('registerSale')->once()->with($mReqSale);
/** === Call and asserts === */
$res = $this->obj->splitQty($ORDER);
}
开发者ID:praxigento,项目名称:mobi_mod_mage2_warehouse,代码行数:48,代码来源:Register_Test.php
示例5: get_instance
static function get_instance()
{
if (self::$instance == NULL) {
self::$instance = new Register();
}
return self::$instance;
}
开发者ID:abdouh,项目名称:pets,代码行数:7,代码来源:register.class.php
示例6: __construct
/**
*
*/
public function __construct()
{
$this->Register = Register::getInstance();
$this->setPhpSettings();
$this->touchStartTime();
$this->Register['Cache'] = new Cache();
$viewerLoader = new Fps_Viewer_Loader(array('template_root' => ROOT . '/template/' . getTemplateName() . '/html/'));
$this->Register['Viewer'] = new Fps_Viewer_Manager($viewerLoader);
if (isInstall()) {
$this->registerCustomTemplateFunctions();
$this->Register['DB'] = class_exists('PDO') && Config::read('use_pdo') ? FpsPDO::get() : FpsDataBase::get();
$this->Register['UserAuth'] = new UserAuth();
$this->Register['Log'] = new Logination();
}
$this->Register['DocParser'] = new Document_Parser();
$this->Register['ACL'] = new ACL(ROOT . '/sys/settings/');
$this->Register['PrintText'] = new PrintText();
$this->Register['Validate'] = new Validate(function ($errors) {
$Register = Register::getInstance();
return $Register['DocParser']->wrapErrors($errors);
});
$this->Register['ModManager'] = new ModulesManager(ROOT . '/sys/settings/modules_access.php');
$this->Register['PluginController'] = new Plugins();
$this->Register['URL'] = new AtmUrl();
$this->Register['Protector'] = new Protect();
if (isInstall()) {
$this->inputCheck();
$this->initProtect();
$this->initUser();
$this->loadLanguages();
}
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:35,代码来源:bootstrap.class.php
示例7: __invoke
public function __invoke()
{
$input = $this->loadInput("Day23/Puzzle1");
$instructionsList = new InstructionsList($input);
$a = new Register(1);
$b = new Register();
$runner = new InstructionsRunner($instructionsList, $a, $b);
$this->write("Executing " . count($instructionsList) . " instructions");
while ($runner->currentInstructionNumber() + 1 <= count($instructionsList)) {
$k = $runner->currentInstructionNumber();
$this->write("Executing instruction {$k}: {$instructionsList[$k]}");
$runner->execute();
$this->write("Register a is now " . $a->getValue() . "; register b is now " . $b->getValue(), 2);
}
$this->write("Value of register b is now " . $b->getValue());
}
开发者ID:garethellis36,项目名称:advent-of-code-2015,代码行数:16,代码来源:Puzzle2.php
示例8: saveRules
function saveRules($rules)
{
$Register = Register::getInstance();
$Register['ACL']->save_rules(prepareConfToSave($rules));
$_SESSION['message'] = __('Saved');
redirect('/admin/users_rules.php');
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:7,代码来源:users_rules.php
示例9: showError
function showError()
{
$Register = Register::getInstance();
$errors = $Register['PluginController']->getErrors();
$_SESSION['message'] = $errors;
redirect('/admin/get_plugins.php');
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:7,代码来源:get_plugins.php
示例10: getRegister
/**
* Retorna a lista de registros adicionado durante a execução do sistema.
*
* @return String
*/
public static function getRegister()
{
if (!empty(self::$Register)) {
self::$Register = implode("\n", self::$Register) . " \n";
}
echo self::$Register;
}
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:12,代码来源:Register.class.php
示例11: common
public function common($params)
{
$Register = Register::getInstance();
$output = '';
if (!strpos($params, '{{ users_rating }}')) {
return $params;
}
$Cache = new Cache();
$Cache->lifeTime = 600;
if ($Cache->check('pl_users_rating')) {
$users = $Cache->read('pl_users_rating');
$users = json_decode($users, true);
} else {
$users = $this->DB->select('users', DB_ALL, array('order' => '`rating` DESC', 'limit' => $this->limit));
//$users = $this->DB->query($sql);
$Cache->write(json_encode($users), 'pl_users_rating', array());
}
if (!empty($users)) {
foreach ($users as $key => $user) {
$link = get_link($user['name'], getProfileUrl($user['id']));
$ava = file_exists(ROOT . '/sys/avatars/' . $user['id'] . '.jpg') ? get_url('/sys/avatars/' . $user['id'] . '.jpg') : get_url('/sys/img/noavatar.png');
$output .= sprintf($this->wrap, $ava, $link, $user['rating'], $user['posts']);
}
}
$output .= '<div class="etopu">' . get_link('Весь рейтинг', '/users/index?order=rating') . '</div>';
return str_replace('{{ users_rating }}', $output, $params);
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:27,代码来源:index.php
示例12: __construct
public function __construct($params = array())
{
$Register = Register::getInstance();
$this->host = $_SERVER['HTTP_HOST'];
$this->uniqUrl[] = 'http://' . $this->host;
$this->DB = $Register['DB'];
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:7,代码来源:sitemap.class.php
示例13: getInstance
public static function getInstance()
{
if (self::$instance == NULL) {
// self::$instance = new __CLASS__;
self::$instance = new Register();
}
return self::$instance;
}
开发者ID:hew86i,项目名称:gpslink,代码行数:8,代码来源:Register.php
示例14: __construct
public function __construct($message_one, $message_two, $minlength, $maxlength)
{
$this->message_one = $message_one;
$this->message_two = $message_two;
$this->minlength = $minlength;
$this->maxlength = $maxlength;
$this->db = Register::get('db');
}
开发者ID:Adam88Stanley,项目名称:portfolio,代码行数:8,代码来源:LoginVal.php
示例15: showInfoMessage
function showInfoMessage($message, $queryString = null)
{
$Register = Register::getInstance();
header('Refresh: ' . $Register['Config']->read('redirect_delay') . '; url=http://' . $_SERVER['SERVER_NAME'] . get_url($queryString));
$html = file_get_contents(ROOT . '/template/' . getTemplateName() . '/html/default/infomessagegrand.html');
$html = str_replace('{INFO_MESSAGE}', $message, $html);
echo $html;
die;
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:9,代码来源:show_info_message.php
示例16: actionDelete_travel
public function actionDelete_travel($id)
{
$model = Register::findOne($id);
if ($model->delete()) {
return $this->redirect(['register/view_register']);
} else {
echo 'delete fail...';
}
}
开发者ID:addiydoeh,项目名称:yii_together,代码行数:9,代码来源:travelController.php
示例17: save
public function save()
{
$params = array('user_id' => intval($this->user_id), 'admin_id' => intval($this->admin_id), 'cause' => $this->cause, 'date' => $this->date, 'points' => intval($this->points));
if ($this->id) {
$params['id'] = $this->id;
}
$Register = Register::getInstance();
return $Register['DB']->save('users_warnings', $params);
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:9,代码来源:UsersWarnings.php
示例18: delete
public function delete()
{
$path = ROOT . '/sys/files/news/' . $this->filename;
if (file_exists($path)) {
unlink($path);
}
$Register = Register::getInstance();
$Register['DB']->delete('news_attaches', array('id' => $this->id));
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:9,代码来源:NewsAttaches.php
示例19: setTitle
/**
* @param string $title
*/
public function setTitle($title)
{
$Register = Register::getInstance();
if (!empty($this->title) && $this->title !== $title) {
$Register['URL']->saveOldEntryUrl($this, 'foto', $title);
}
$this->title = $title;
$this->clean_url_title = $Register['URL']->getUrlByTitle($title, false);
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:12,代码来源:Foto.php
示例20: includeFile
public function includeFile($path, array $subcontext)
{
$context = array_merge($this->context, $subcontext);
$Register = Register::getInstance();
$Viewer = clone $Register['Viewer'];
$Viewer->setDefaultLayout('');
$Viewer->setLayout('');
echo $Viewer->view($path, $context);
}
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:9,代码来源:Template.class.php
注:本文中的Register类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论