本文整理汇总了PHP中AbstractController类的典型用法代码示例。如果您正苦于以下问题:PHP AbstractController类的具体用法?PHP AbstractController怎么用?PHP AbstractController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AbstractController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: add
public function add(AbstractController $controller, $redirect)
{
try {
$fo = FOFactory::build('comment');
if (!$fo->isSent()) {
$this->redirectToCaller($redirect);
}
$this->model->add($fo, $fo->getType(), $fo->getId());
$this->redirectToCaller($redirect);
} catch (FormValidationException $e) {
$this->values->error = Bundle::get('form.validation.invalid.value', $e->getMessage());
$controller->setAction($redirect);
}
}
开发者ID:anzasolutions,项目名称:simlandia,代码行数:14,代码来源:commentcontroller.class.php
示例2: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oUser = new Lm_User();
$this->oLoto = new Loto_Loto();
$this->oPrize = new Loto_Prize();
}
开发者ID:eappl,项目名称:prototype,代码行数:12,代码来源:LotoController.php
示例3: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oUser = new Lm_User();
$this->oResearch = new Config_Research();
$this->oQuestion = new Config_Research_Question();
}
开发者ID:032404cxd,项目名称:prototype_main,代码行数:12,代码来源:ResearchController.php
示例4: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oApp = new Config_App();
$this->oClass = new Config_Class();
$this->oPartner = new Config_Partner();
}
开发者ID:eappl,项目名称:prototype,代码行数:12,代码来源:AppController.php
示例5: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oMachine = new Config_Machine();
$this->oDepot = new Config_Depot();
$this->oCage = new Config_Cage();
$this->oPermission = new Config_Permission();
//新添
$this->oArea = new Config_Area();
//新添
$this->oApp = new Config_App();
$this->oPartner = new Config_Partner();
$this->oPartnerApp = new Config_Partner_App();
$this->oServer = new Config_Server();
$this->DepotList = $this->oDepot->getAll();
$this->CageList = $this->oCage->getAll();
$this->AppList = $this->oApp->getAll();
$this->PartnerList = $this->oPartner->getAll();
$this->ServerList = $this->oServer->getAll();
//新添
//获取用户可以查看的游戏列表
$this->permitted_app = $this->oPermission->getApp($this->manager->data_groups, 'AppId,name');
//预处理地区信息
$this->AreaList = $this->oArea->getAll();
}
开发者ID:eappl,项目名称:prototype,代码行数:30,代码来源:MachineController.php
示例6: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oSkin = new Config_Skin();
$this->oHero = new Config_Hero();
$this->oApp = new Config_App();
}
开发者ID:032404cxd,项目名称:prototype_main,代码行数:12,代码来源:SkinController.php
示例7: setUp
/**
* Setup
*/
public function setUp()
{
$this->setFormManager(new \StrokerForm\FormManager());
$this->controller = new AjaxController($this->getFormManager());
$this->request = new Request();
$this->response = new Response();
$controllerName = strtolower(str_replace('Controller', '', get_class($this->controller)));
$this->routeMatch = new RouteMatch(array('controller' => $controllerName));
$this->event = new MvcEvent();
$this->event->setRouteMatch($this->routeMatch);
$this->controller->setEvent($this->event);
}
开发者ID:rettal,项目名称:zf2-form,代码行数:15,代码来源:AjaxControllerTest.php
示例8: init
function init()
{
parent::init();
$email_settings = $this->add('xepan\\communication\\Model_Communication_EmailSetting')->addCondition('is_imap_enabled', true)->addCondition('is_active', true);
$total_email_to_fetch = $email_settings->count()->getOne();
$total_email_to_fetch_per_minute = ceil($total_email_to_fetch / $this->loop_time_duration);
$time_before_five_minute = date("Y-m-d H:i:s", strtotime("-" . $this->loop_time_duration . " minutes", strtotime($this->app->now)));
$email_settings->addCondition('last_email_fetched_at', '<', $time_before_five_minute);
$email_settings->setOrder('last_email_fetched_at', 'asc');
$email_settings->setLimit($total_email_to_fetch_per_minute);
foreach ($email_settings as $email_setting) {
if ($this->debug) {
echo "<br/> Fetching from " . $email_setting['name'] . '<br/>';
}
$cont = $this->add('xepan\\communication\\Controller_ReadEmail', ['email_setting' => $email_setting, 'debug' => $this->debug]);
$mbs = ['INBOX'];
// $cont->getMailBoxes();
foreach ($mbs as $mb) {
$emails_return = $cont->fetch($mb, 'UNSEEN');
$this->app->hook('emails_fetched', [$emails_return]);
}
$email_setting['last_email_fetched_at'] = $this->app->now;
$email_setting->saveAndUnload();
}
}
开发者ID:xepan,项目名称:communication,代码行数:25,代码来源:Cron.php
示例9: HTTPRequest
public function HTTPRequest()
{
if (self::$_HTTPRequest == null) {
self::$_HTTPRequest = HTTPRequest::sharedRequest();
}
return self::$_HTTPRequest;
}
开发者ID:nbalonso,项目名称:MunkiFace,代码行数:7,代码来源:AbstractController.php
示例10: init
function init()
{
parent::init();
if (!$this->email_setting or !$this->email_setting instanceof \xepan\communication\Model_Communication_EmailSetting) {
throw $this->exception('Please provide email_setting value as loaded xepan\\communication\\Model_Communication_EmailSetting instance');
}
}
开发者ID:xepan,项目名称:communication,代码行数:7,代码来源:ReadEmail.php
示例11: init
function init()
{
parent::init();
$this->headers['Mime-Version'] = "1.0";
$this->headers['Content-Transfer-Encoding'] = "8bit";
$this->setBodyType('text');
}
开发者ID:TigerBui,项目名称:atk4,代码行数:7,代码来源:Compat.php
示例12: init
function init()
{
parent::init();
// $this->setCallbackURL($this->api->getDestinationURL(null,
// array('oauth'=>$this->name)));
// Default URL :)
}
开发者ID:romaninsh,项目名称:atkSchool,代码行数:7,代码来源:OAuth.php
示例13: init
function init()
{
parent::init();
$this->app->jquery = $this;
if (!$this->app->template) {
return;
}
if (!$this->app->template->is_set('js_include')) {
throw $this->exception('Tag js_include must be defined in shared.html');
}
if (!$this->app->template->is_set('document_ready')) {
throw $this->exception('Tag document_ready must be defined in shared.html');
}
$this->app->template->del('js_include');
/* $config['js']['jquery']='https://code.jquery.com/jquery-2.1.4.min.js'; // to use CDN */
if ($v = $this->app->getConfig('js/versions/jquery', null)) {
$v = 'jquery-' . $v;
} else {
$v = $this->app->getConfig('js/jquery', 'jquery-2.0.3.min');
}
// bundled jQuery version
$this->addInclude($v);
// Controllers are not rendered, but we need to do some stuff manually
$this->app->addHook('pre-render-output', array($this, 'postRender'));
$this->app->addHook('cut-output', array($this, 'cutRender'));
}
开发者ID:easyconn,项目名称:atk4,代码行数:26,代码来源:jQuery.php
示例14: init
function init()
{
parent::init();
$this->api->requires('atk', '4.2');
$symbols = $this->owner->model->_dsql()->field($this->owner->model->_dsql()->expr("DISTINCT LEFT({$this->field},1) as symbol"))->order($this->field);
$ul = $this->api->add('View', null, 'Content')->setElement('ul')->addClass('gridqsearch');
$li = $ul->add('View', 'c')->setElement('li')->addClass('refresh')->addStyle('cursor', 'pointer');
$li->add('View')->setElement('span')->addClass('qsearch-refresh')->set("clear");
$li->js('click', array($this->owner->js()->reload(array('filter' => 'clear'))));
foreach ($symbols as $symbol) {
$li = $ul->add('View', 'c' . $this->count++)->setElement('li')->addClass('ui-corner-all')->addStyle('cursor', 'pointer');
$li->add('View')->setElement('span')->addClass('qsearch-value')->set($symbol['symbol']);
$li->js('click', array($this->owner->js()->reload(array('filter' => $li->js()->text()))));
}
if ($_GET['filter'] != '') {
if ($_GET['filter'] == 'clear') {
$this->api->forget('filter');
} else {
$this->api->memorize('filter', $_GET['filter']);
}
}
if ($this->api->recall('filter') != '') {
$this->owner->model->addCondition($this->field, 'like', trim($this->api->recall('filter')) . '%');
}
}
开发者ID:xavoctechnocratspvtltd,项目名称:svc,代码行数:25,代码来源:GridQSearch.php
示例15: __construct
public function __construct()
{
parent::__construct();
$this->model = new UploadModel();
$this->view = new UploadView();
$this->allowedExts = array('c', 'cpp', 'java', 'py', 'php', 'cs', 'js', 'xml', 'json', 'rb', 'scala', 'go');
}
开发者ID:Abhishek627,项目名称:crux,代码行数:7,代码来源:UploadController.php
示例16: getMandantName
protected function getMandantName()
{
if (!$this->mandantName) {
return parent::getMandantName();
}
return $this->mandantName;
}
开发者ID:EdisonValdez,项目名称:IbrowsNewsletterBundle,代码行数:7,代码来源:AbstractHashMandantController.php
示例17: __construct
public function __construct()
{
parent::__construct(new View(Config::DIR_TMPL), new Message(Config::FILE_MESSAGES));
$this->mail = new Mail();
$this->url_active = URL::deleteGET(URL::current(), "page");
$this->link_search = URL::get("search");
}
开发者ID:kuaa59,项目名称:www,代码行数:7,代码来源:controller_class.php
示例18: init
public function init()
{
parent::init();
if (($post_id = $this->getFlash("preview_post_id")) !== null) {
Log::debug("Got preview post ID [" . $post_id . "]");
$post = Table::factory('Posts')->read($post_id);
if ($post == false) {
throw new CoreException('No matching blog post found to preview', CoreException::PATH_REJECTED);
}
// we need to explicitly opt out of caching as this should be a one-time only link
Log::info("Disabling cache for one-time blog post viewing");
$this->request->disableCache();
} else {
if ($this->getMatch('month') && $this->getMatch('url')) {
$post = Table::factory('Posts')->findByMonthAndUrl($this->getMatch('month'), $this->getMatch('url'));
if ($post == false) {
throw new CoreException('No matching blog post found', CoreException::PATH_REJECTED);
}
}
}
if (isset($post) && is_object($post)) {
$this->post = $post;
$this->assign('post', $this->post);
$this->assign('comments', $post->getApprovedComments());
// get the fields for comments
$this->assign('columns', Table::factory('Comments')->getColumns());
}
$this->assign('tags', Table::factory('Posts')->findAllTags());
}
开发者ID:Asedol,项目名称:paynedigital.com,代码行数:29,代码来源:blog.php
示例19: onConstruct
function onConstruct()
{
parent::onConstruct();
$header = \DedicatedManager\Helpers\Header::getInstance();
$header->leftText = _('Back to server');
$header->leftLink = $this->request->createLinkArgList('../back-to-server');
}
开发者ID:maniaplanet,项目名称:dedicated-manager,代码行数:7,代码来源:Manialive.php
示例20: init
public function init()
{
parent::init();
$this->headers['Mime-Version'] = '1.0';
$this->headers['Content-Transfer-Encoding'] = '8bit';
$this->setBodyType('text');
}
开发者ID:atk4,项目名称:atk4,代码行数:7,代码来源:Compat.php
注:本文中的AbstractController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论