当前位置: 首页>>代码示例>>PHP>>正文


PHP Help类代码示例

本文整理汇总了PHP中Help的典型用法代码示例。如果您正苦于以下问题:PHP Help类的具体用法?PHP Help怎么用?PHP Help使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Help类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testExecute

 public function testExecute()
 {
     $instance = new Help('');
     $session = new \Pry\Session(__FILE__);
     ob_start();
     $status = $instance->execute($session);
     $actual = ob_get_contents();
     ob_end_clean();
     $this->assertTrue($status);
     $expected = implode(PHP_EOL, [' clear           Clears the screen (Ctrl-L)          ', ' help            Displays command help               ', ' show-classes    Displays all declared classes       ', ' show-constants  Displays all defined constants      ', ' show-functions  Displays all user defined functions ', ' show-vars       Displays all defined variables      ', ' quit            Quits pry (Ctrl-D)                  ', ' trace           Displays the call stack trace       ', ' whereami        Displays the inspected code         ', '']);
     $this->assertEquals($expected, $actual);
 }
开发者ID:mlessnau,项目名称:pry,代码行数:12,代码来源:HelpTest.php

示例2: fromArray

 public static function fromArray($data)
 {
     $settings = new RoleSettings();
     foreach ($data as $key => $value) {
         if (property_exists(get_class($settings), $key)) {
             if (is_array($value)) {
                 if ($key == "transactions") {
                     $settings->{$key} = Transactions::fromArray($value);
                 }
                 if ($key == "reports") {
                     $settings->{$key} = Reports::fromArray($value);
                 }
                 if ($key == "help") {
                     $settings->{$key} = Help::fromArray($value);
                 }
                 if ($key == "mobileVTAccess") {
                     $settings->{$key} = MobileVTAcces::fromArray($value);
                 }
                 if ($key == "admin") {
                     $settings->{$key} = Admin::fromArray($value);
                 }
                 if ($key == "customer") {
                     $settings->{$key} = Customers::fromArray($value);
                 }
                 if ($key == "webPosAccess") {
                     $settings->{$key} = WebPosAccess::fromArray($value);
                 }
             } else {
                 $settings->{$key} = $value;
             }
         }
     }
     return $settings;
 }
开发者ID:payhub,项目名称:payhubws-public-sdk,代码行数:34,代码来源:RoleSettings.php

示例3: register

 /**
  * 注册方法 
  * 完成数据的插入
  * @return boolean whether register is successful
  */
 public function register()
 {
     //将已经验证成功的数据插入数据库
     if (!$this->hasErrors()) {
         $user = new Users();
         $user->username = $this->username;
         $user->email = $this->email;
         $user->salt = Help::fetchSalt();
         $user->password = md5(md5($this->password) . $user->salt);
         $user->reg_ip = Yii::app()->request->userHostAddress;
         $user->last_ip = Yii::app()->request->userHostAddress;
         $user->reg_time = time();
         $user->last_login = time();
         if (!$user->save()) {
             return false;
         }
     }
     //实行登入操作
     if ($this->_identity === null) {
         $this->_identity = new UserIdentity($this->email, $this->password);
         $this->_identity->authenticate();
     }
     if ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {
         Yii::app()->user->login($this->_identity);
         return true;
     } else {
         return false;
     }
 }
开发者ID:jvlstudio,项目名称:ask,代码行数:34,代码来源:RegisterForm.php

示例4: getInstance

 /**
  * Return an instance of the Help class
  *
  * Use this for generating or retrieving instance of Help
  * objects so that if the Help class needs to be abstracted
  * in the future, this common interface can still be used
  *
  * @return object New instance of Help class if one doesnt
  *	already exist. Otherwise return the current instance
  */
 static function getInstance()
 {
     if (empty(self::$instance)) {
         self::$instance = new Help();
     }
     return self::$instance;
 }
开发者ID:TheProjecter,项目名称:nessquik,代码行数:17,代码来源:Help.php

示例5: getSearchPath

 function getSearchPath($locale = null)
 {
     if ($locale == '') {
         $help =& Help::getHelp();
         $locale = $help->getLocale();
     }
     return 'help' . DIRECTORY_SEPARATOR . $locale;
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:8,代码来源:OJSHelpMappingFile.inc.php

示例6: __construct

 public function __construct($cache = false, $cacheLiftime = 3600)
 {
     global $USER, $ADMIN, $FORETAG, $urlHandler, $security, $adressbok, $urlChecker, $db, $sajtDelarObj;
     $this->template_dir = ROOT . '/templates';
     $this->compile_dir = ROOT . '/templates_c';
     $this->config_dir = ROOT . '/php/libs/smarty/configs';
     $this->cache_dir = ROOT . '/php/libs/smarty/cache';
     // Visar t.ex. trunkomera.se ist�llet f�r MotioMera, om s� �r fallet.
     if ($_SERVER['HTTP_HOST'] != 'motiomera.se') {
         $this->assign("pagename", ucfirst($_SERVER['HTTP_HOST']));
     } else {
         $this->assign("pagename", "MotioMera");
     }
     if (defined('DEBUG_SMARTY') && DEBUG_SMARTY) {
         $this->assign('debugSmarty', true);
     }
     //$this->assign("pagename", "MotioMera");
     $this->assign("microtime", Misc::get_milliseconds(true));
     $this->assign("_GET", $_GET);
     $this->assign("_POST", $_POST);
     $this->assign("_SERVER", $_SERVER);
     $this->assign("urlHandler", $urlHandler);
     $this->assign("sajtDelarObj", $sajtDelarObj);
     $this->assign("urlChecker", $urlChecker);
     $this->assign("security", $security);
     $this->assign("GOOGLEMAPS_APIKEY", GOOGLEMAPS_APIKEY);
     $this->assign("DEBUG", DEBUG);
     $this->contentCacheLifetime = $cacheLiftime;
     $this->compile_check = true;
     //the rss flow from mabra.com
     $file = ROOT . "/files/rsscache/motiofeed.txt";
     $fh = fopen($file, "r") or die("cant open file");
     $smotiofeed = file_get_contents($file);
     fclose($fh);
     $rss = unserialize($smotiofeed);
     $this->assign("rss", $rss);
     if ($cache) {
         $this->caching = 2;
     } else {
         $this->caching = false;
     }
     $this->assign("BROWSER", Medlem::getCurrentBrowserVersion(true));
     $helpers = Help::listByPage($_SERVER['PHP_SELF']);
     $this->assign("helpers", $helpers);
     $this->assign('currentPage', Misc::getCurrentPage());
     if ($USER) {
         $this->assign("USER", $USER);
         $this->assign("adressbok", $adressbok);
     }
     if ($ADMIN) {
         $this->assign("ADMIN", $ADMIN);
         $this->assign("inAdmin", true);
     }
     if ($FORETAG) {
         $this->assign("FORETAG", $FORETAG);
     }
     $this->register_function('stegToKm', array('Steg', 'stegToKm'));
 }
开发者ID:krillo,项目名称:motiomera,代码行数:58,代码来源:MMSmarty.php

示例7: getTopics

 private static function getTopics()
 {
     if (self::$topics !== null) {
         return self::$topics;
     }
     // we need this in function as function calls are not allowed in static properties
     self::$topics = array('main' => array('title' => ev_gettext('Help Topics'), 'parent' => ''), 'report' => array('title' => ev_gettext('Reporting Issues'), 'parent' => 'main'), 'report_category' => array('title' => ev_gettext('Category Field'), 'parent' => 'report'), 'report_priority' => array('title' => ev_gettext('Priority Field'), 'parent' => 'report'), 'report_assignment' => array('title' => ev_gettext('Assignment Field'), 'parent' => 'report'), 'report_release' => array('title' => ev_gettext('Scheduled Release Field'), 'parent' => 'report'), 'report_summary' => array('title' => ev_gettext('Summary Field'), 'parent' => 'report'), 'report_description' => array('title' => ev_gettext('Description Field'), 'parent' => 'report'), 'report_estimated_dev_time' => array('title' => ev_gettext('Estimated Development Time Field'), 'parent' => 'report'), 'scm_integration' => array('title' => ev_gettext('SCM Integration'), 'parent' => 'main'), 'scm_integration_usage' => array('title' => ev_gettext('Usage Examples'), 'parent' => 'scm_integration'), 'scm_integration_installation' => array('title' => ev_gettext('Installation Instructions'), 'parent' => 'scm_integration'), 'list' => array('title' => ev_gettext('Listing / Searching for Issues'), 'parent' => 'main'), 'adv_search' => array('title' => ev_gettext('Advanced Search / Creating Custom Queries'), 'parent' => 'main'), 'support_emails' => array('title' => ev_gettext('Associate Emails'), 'parent' => 'main'), 'preferences' => array('title' => ev_gettext('Account Preferences'), 'parent' => 'main'), 'notifications' => array('title' => ev_gettext('Email Notifications'), 'parent' => 'main'), 'view' => array('title' => ev_gettext('Viewing Issues'), 'parent' => 'main'), 'email_blocking' => array('title' => ev_gettext('Email Blocking'), 'parent' => 'main'), 'link_filters' => array('title' => ev_gettext('Link Filters'), 'parent' => 'main'), 'field_display' => array('title' => ev_gettext('Edit Fields to Display'), 'parent' => 'main'), 'column_display' => array('title' => ev_gettext('Edit Columns to Display'), 'parent' => 'main'), 'customize_listing' => array('title' => ev_gettext('Customize Issue Listing Screen'), 'parent' => 'main'), 'segregate_reporter' => array('title' => ev_gettext('Segregate Reporters'), 'parent' => 'main'), 'permission_levels' => array('title' => ev_gettext('User Permission Levels'), 'parent' => 'main'));
     return self::$topics;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:9,代码来源:class.help.php

示例8: toc

 function toc()
 {
     parent::validate();
     HelpHandler::setupTemplate();
     $templateMgr =& TemplateManager::getManager();
     $help =& Help::getHelp();
     $templateMgr->assign_by_ref('helpToc', $help->getTableOfContents());
     $templateMgr->display('help/helpToc.tpl');
 }
开发者ID:Jouper,项目名称:jouper,代码行数:9,代码来源:HelpHandler.inc.php

示例9: toc

 /**
  * Display help table of contents.
  * @param $args array
  * @param $request PKPRequest
  */
 function toc($args, &$request)
 {
     $this->validate();
     $this->setupTemplate();
     $templateMgr =& TemplateManager::getManager();
     import('classes.help.Help');
     $help =& Help::getHelp();
     $templateMgr->assign_by_ref('helpToc', $help->getTableOfContents());
     $templateMgr->display('help/helpToc.tpl');
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:15,代码来源:HelpHandler.inc.php

示例10: actionCheckAccount

 /**
  * 更改账户信息
  */
 public function actionCheckAccount()
 {
     //var_dump($_POST);
     //exit();
     if (!Yii::app()->request->isPostRequest) {
         $this->error('一定是你的提交方式不对');
     }
     $data = array();
     if (!isset($_POST['username']) || !isset($_POST['sex']) || !isset($_POST['email'])) {
         $this->error('相关字段不能为空');
     }
     $data['username'] = $_POST['username'];
     $data['sex'] = $_POST['sex'];
     $data['mobile'] = $_POST['mobile'];
     //判断用户名是否已经存在
     if (Users::model()->exists('uid <> :uid AND username=:username', array(':uid' => Yii::app()->user->id, ':username' => $data['username']))) {
         $this->error('用户名已经存在');
         return;
     }
     //判断是否需要改密码
     if ($_POST['old_password'] != '' && $_POST['re_password'] != '' && $_POST['password'] != '') {
         //密码长度不能小于4
         if (strlen($_POST['password']) < 4) {
             $this->error('密码长度不能小于4');
         }
         //判断两次密码输入是否正确
         if ($_POST['password'] != $_POST['re_password']) {
             $this->error('两次密码输入不相同');
         }
         //判断初始密码是否正确
         $user = Users::model()->find('uid=? AND password=MD5(CONCAT(MD5(?),`salt`))', array(Yii::app()->user->id, $_POST['old_password']));
         if (!$user) {
             $this->error('初始密码输入不正确!');
         }
         //可以更新密码
         $data['salt'] = Help::fetchSalt();
         $data['password'] = md5(md5(trim($_POST['password'])) . $data['salt']);
     }
     //头像更新
     //更新头像
     $image = Help::uploadAvatar(Yii::app()->user->id, 'avatar');
     if ($image) {
         $data['avatar_file'] = $image;
         //更新头像session
         //
     }
     if (false !== Users::model()->updateByPk(Yii::app()->user->id, $data)) {
         //更新 userInfo 信息
         $user = Users::model()->findByPk(Yii::app()->user->id);
         Yii::app()->user->setState('userInfo', $user);
         $this->success('更新成功');
     }
 }
开发者ID:jvlstudio,项目名称:ask,代码行数:56,代码来源:AccountController.php

示例11: getMessage

 /**
  * Answer a component with help text
  * 
  * @return Component
  * @access public
  * @since 3/4/08
  */
 public function getMessage()
 {
     ob_start();
     print "<p>";
     print _("On this screen you can choose to import your Segue 1 sites into Segue 2.");
     print " " . _("This process will not change or delete your Segue 1 site.");
     print " " . _("You can only import sites into empty placeholders.");
     print "</p>";
     print "<p>";
     print str_replace('%1', Help::link('Copy Sites'), _("If you import a segue1 site more than once, redirects from old links will point at the most recent import of that site. If you wish to maintain old links and duplicate a site, import it once and then use the 'copy site' (%1) in the portal to make additional copies."));
     print "</p>";
     return new Block(ob_get_clean(), STANDARD_BLOCK);
 }
开发者ID:adamfranco,项目名称:segue,代码行数:20,代码来源:choose_site.act.php

示例12: unset

 function &getMappingFile($tocId)
 {
     $help =& Help::getHelp();
     $mappingFiles =& $help->getMappingFiles();
     for ($i = 0; $i < count($mappingFiles); $i++) {
         // "foreach by reference" hack
         $mappingFile =& $mappingFiles[$i];
         if ($mappingFile->containsToc($tocId)) {
             return $mappingFile;
         }
         unset($mappingFile);
     }
     $returner = null;
     return $returner;
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:15,代码来源:HelpTocDAO.inc.php

示例13: sendchatmsg

 function sendchatmsg($data)
 {
     $need = array('msg');
     $ec = 1;
     $odata = 0;
     if (!Fun::isAllSet($need, $data)) {
         $ec = -9;
     } else {
         if ($data["msg"] != "") {
             if (!($_SESSION["chatthid"] > 0)) {
                 $_SESSION["chatthid"] = Sqle::insertVal("chattingthread", array("ip" => $_SERVER['REMOTE_ADDR'], "time" => time(), "uid" => User::loginId(), "isclosed" => "f"));
             }
             $odata = array("msgid" => Help::sendchatmsg($data["msg"], $_SESSION["chatthid"]));
         }
     }
     return array('ec' => $ec, 'data' => $odata);
 }
开发者ID:harshaccent,项目名称:kurry,代码行数:17,代码来源:Actions.php

示例14: execute

 public function execute(array $args, array $options = array())
 {
     if (empty($args)) {
         $formater = new TextFormater(array('quote' => ' * '));
         $this->writeln('Available commands:', Colors::BLACK | Colors::BOLD);
         foreach ($this->console->getCommands() as $name => $fqdn) {
             if ($fqdn !== __CLASS__) {
                 $this->writeln($formater->format($name));
             }
         }
         $scriptName = basename($_SERVER['SCRIPT_FILENAME']);
         $this->writeln("Use './{$scriptName} help command' for more info");
     } else {
         $commandFQDN = $this->console->getCommand($args[0]);
         $help = Help::fromFQDN($commandFQDN, Utils::get($args, 1));
         $this->writeln($help);
     }
 }
开发者ID:maximebf,项目名称:consolekit,代码行数:18,代码来源:HelpCommand.php

示例15: _tocCacheMiss

 function _tocCacheMiss(&$cache, $id)
 {
     // Keep a secondary cache of the TOC so that a few
     // cache misses won't destroy the server
     $toc =& Registry::get('pkpHelpTocData', true, null);
     if ($toc === null) {
         $helpToc = array();
         $topicId = 'index/topic/000000';
         $help =& Help::getHelp();
         $helpToc = $help->buildTopicSection($topicId);
         $toc =& $help->buildToc($helpToc);
         $cache->setEntireCache($toc);
     }
     return null;
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:15,代码来源:PKPHelp.inc.php


注:本文中的Help类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。