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


PHP JInput::set方法代码示例

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


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

示例1: parseUserTask

 /**
  * parseTask
  *
  * @param string  $controller
  * @param \JInput $input
  *
  * @return  void
  */
 public static function parseUserTask($controller, $input)
 {
     $task = $input->get('task');
     if (is_numeric($task)) {
         $id = $task;
         $input->set('id', $id);
         $input->set('task', null);
     } else {
         $input->set('task', 'user.' . $input->get('task'));
     }
 }
开发者ID:beingsane,项目名称:quickcontent,代码行数:19,代码来源:RoutingHelper.php

示例2: init

 /**
  * Init this component.
  *
  * @return void
  */
 public function init()
 {
     $dispatcher = $this->container->get('event.dispatcher');
     // Event
     $dispatcher->trigger('onComponentBeforeInit', array($this->name, $this, $this->input));
     // We build component path constant, helpe us get path easily.
     $this->path['self'] = JPATH_BASE . '/components/' . strtolower($this->option);
     $this->path['site'] = JPATH_ROOT . '/components/' . strtolower($this->option);
     $this->path['administrator'] = JPATH_ROOT . '/administrator/components/' . strtolower($this->option);
     define(strtoupper($this->name) . '_SELF', $this->path['self']);
     define(strtoupper($this->name) . '_SITE', $this->path['site']);
     define(strtoupper($this->name) . '_ADMIN', $this->path['administrator']);
     // Register some useful object for this component.
     $this->container->registerServiceProvider(new ComponentProvider($this->name, $this));
     $task = $this->input->getWord('task');
     $controller = $this->input->getWord('controller');
     // Prepare default controller
     if (!$task && !$controller) {
         // If we got view, set it to display controller.
         $view = $this->input->get('view');
         $task = $view ? $view . '.display' : $this->defaultController;
         $this->input->set('task', $task);
         $this->input->set('controller', $task);
     }
     // Register form and fields
     \JForm::addFieldPath(WINDWALKER_SOURCE . '/Form/Fields');
     \JForm::addFormPath(WINDWALKER_SOURCE . '/Form/Forms');
     $this->registerEventListener();
     // Register elFinder controllers
     // @TODO: Should use event listener
     $this->registerTask('finder.elfinder.display', '\\Windwalker\\Elfinder\\Controller\\DisplayController');
     $this->registerTask('finder.elfinder.connect', '\\Windwalker\\Elfinder\\Controller\\ConnectController');
     // Event
     $dispatcher->trigger('onComponentAfterInit', array($this->name, $this, $this->input));
 }
开发者ID:beingsane,项目名称:quickcontent,代码行数:40,代码来源:Component.php

示例3: display

 /**
  * Method to display a view.
  *
  * @param	boolean			$cachable	If true, the view output will be cached
  * @param	array			$urlparams	An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     // TemplateckHelper::addSubmenu(JRequest::getCmd('view', 'templates'));
     $input = new JInput();
     $view = $input->get('view', 'Modulesmanagerck');
     $input->set('view', $view);
     parent::display();
     return $this;
 }
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:18,代码来源:controller.php

示例4: testSet

	/**
	 * Test the JInput::set method.
	 *
	 * @return  void
	 *
	 * @since   12.1
	 */
	public function testSet()
	{
		$_REQUEST['foo'] = 'bar2';
		$this->class->set('foo', 'bar');

		$this->assertThat(
			$_REQUEST['foo'],
			$this->equalTo('bar'),
			'Line: ' . __LINE__ . '.'
		);
	}
开发者ID:realityking,项目名称:joomla-platform,代码行数:18,代码来源:JInputTest.php

示例5: __construct

 public function __construct(&$subject, $config = array())
 {
     $app = JFactory::getApplication();
     $doc = JFactory::getDocument();
     $doctype = $doc->getType();
     $user = JFactory::getUser();
     $input = new JInput();
     if ($app->isAdmin()) {
         return;
     }
     if ($doctype !== 'html') {
         return;
     }
     if ($user->authorise('core.manage', 'com_modules')) {
         if ($input->get('ck', 0, 'int') == 1) {
             $input->set('tp', 1);
             JComponentHelper::getParams('com_templates')->set('template_positions_display', 1);
         }
     }
     $lang = JFactory::getLanguage();
     $lang->load('com_modulesmanagerck');
     parent::__construct($subject, $config);
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:23,代码来源:modulesmanagersystemck.php

示例6: _set

 /**
  * {@inheritdoc}
  */
 protected function _set($name, $value)
 {
     $this->_input->set($name, $value);
 }
开发者ID:JBZoo,项目名称:CrossCMS,代码行数:7,代码来源:Request.php


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