本文整理汇总了PHP中JFormHelper::loadRuleClass方法的典型用法代码示例。如果您正苦于以下问题:PHP JFormHelper::loadRuleClass方法的具体用法?PHP JFormHelper::loadRuleClass怎么用?PHP JFormHelper::loadRuleClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFormHelper
的用法示例。
在下文中一共展示了JFormHelper::loadRuleClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadRuleClass
/**
* Helper wrapper method for loadRuleClass
*
* @param string $type Type of a rule whose class should be loaded.
*
* @return mixed Class name on success or false otherwise.
*
* @see JFormHelper::loadRuleClass()
* @since 3.4
*/
public function loadRuleClass($type)
{
return JFormHelper::loadRuleClass($type);
}
示例2: defined
<?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
JFormHelper::loadRuleClass('email');
/**
* JFormRule for com_contact to make sure the email address is not blocked.
*
* @since 1.6
*/
class JFormRuleContactEmail extends JFormRuleEmail
{
/**
* Method to test for banned email addresses
*
* @param SimpleXMLElement $element The SimpleXMLElement object representing the <field /> tag for the form field object.
* @param mixed $value The form field value to validate.
* @param string $group The field name group control value. This acts as as an array container for the field.
* For example if the field has name="foo" and the group value is set to "bar" then the
* full field name would end up being "bar[foo]".
* @param Registry $input An optional Registry object with the entire data set to validate against the entire form.
* @param JForm $form The form object for which the field is being tested.
*
示例3: defined
<?php
/**
* Created by JetBrains PhpStorm.
* User: Ngoc Nha
* Date: 4/14/13
* Time: 5:17 PM
* To change this template use File | Settings | File Templates.
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla formrule library
//jimport('joomla.form.rule');
JFormHelper::loadRuleClass('greeting');
/**
* Form Rule class for the Joomla Framework.
*/
class JFormRuleGreeting extends JFormRule
{
/**
* The regular expression.
*
* @access protected
* @var string
* @since 2.5
*/
protected $regex = '^[^0-9]+$';
}