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


PHP Flash::getInstance方法代码示例

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


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

示例1: __construct

 public function __construct($action, $submit_value, $method, $sticky, $message_type, $format, $multiple_errors)
 {
     $this->fields = new stdClass();
     $this->action = $action;
     $this->method = $method;
     $this->submit_value = $submit_value;
     $this->sticky = $sticky;
     $this->format = $format;
     $this->message_type = $message_type;
     $this->multiple_errors = $multiple_errors;
     if ($message_type == 'flash') {
         $this->flash = Flash::getInstance();
     }
     if ($message_type == 'list') {
         $this->messages = array();
     }
 }
开发者ID:priestd09,项目名称:Nibble-Framework,代码行数:17,代码来源:NibbleForm.class.php

示例2: __construct

 public function __construct($render = false)
 {
     $this->render = $render;
     $this->flash = Flash::getInstance();
 }
开发者ID:priestd09,项目名称:Nibble-Framework,代码行数:5,代码来源:ActionBase.class.php

示例3: error_reporting

<?php

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
session_name('nibble');
ini_set('session.gc_maxlifetime', 30 * 60);
session_set_cookie_params(30 * 60);
session_start();
include dirname(__FILE__) . '/nibble-flash-messaging/Flash.class.php';
$flash = Flash::getInstance();
$flash->message('Simple message example');
$flash->flashMessage('Message content goes here, 5s lifetime', 'Message title goes here', 5000);
$flash->message('Sticky error message', 'Sticky message', 0, true, 'error');
include dirname(__FILE__) . '/nibble-forms/NibbleForm.class.php';
$form = NibbleForm::getInstance('', 'Submit this form', 'post', true, 'flash');
$form->username = new Text('Please enter your username', true, 20, '/[a-zA-Z0-9]+/');
$form->email = new Email('Please enter your email', false);
$form->email->addConfirmation('Please confirm your email');
$form->captcha = new Captcha();
/*$form->password = new Password('Please enter your password', 11, true, true, 12);
  $form->password->addConfirmation('Please confirm your password');
  $form->checkbox = new Checkbox('Please select one of the following', array(
    'One' => 'Choice one, dont choose',
    'car' => 'Choice two',
    'Choice three',
    'Choice four'
  ),true,2);
  $form->select = new MultipleSelect('Please select at least two of the following', array(
    'One'=>'Choice one',
    'Choice two',
    'Choice three'
开发者ID:priestd09,项目名称:Nibble-stand-alones,代码行数:31,代码来源:index.php

示例4: flash

 /**
  * @desc Render flash messages
  */
 public function flash()
 {
     foreach (Flash::getInstance()->messages as $message) {
         echo $message;
     }
 }
开发者ID:priestd09,项目名称:Nibble-Framework,代码行数:9,代码来源:Render.class.php


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