function TreeIdentifierRule($field_name, $parent_node_id, $node_id = TREE_IDENTIFIER_RULE_UNKNOWN_NODE_ID)
  {
    $this->node_id = $node_id;
    $this->parent_node_id = $parent_node_id;

    parent :: SingleFieldRule($field_name);
  }
  function __construct($field_name, $parent_node_id, $node_id = self :: UNKNOWN_NODE_ID)
  {
    $this->node_id = $node_id;
    $this->parent_node_id = $parent_node_id;

    parent :: __construct($field_name);
  }
Exemplo n.º 3
0
  function __construct($field_name, $match_field, $match_field_name = '')
  {
    $this->match_field = $match_field;
    if (!$match_field_name)
      $this->match_field_name = $match_field;
    else
      $this->match_field_name = $match_field_name;

    parent :: __construct($field_name);
  }
  function __construct($fieldname, $locale_id = '')
  {
    if (!$locale_id &&  !defined('CONTENT_LOCALE_ID'))
      $this->locale_id = DEFAULT_CONTENT_LOCALE_ID;
    elseif(!$locale_id)
      $this->locale_id = CONTENT_LOCALE_ID;
    else
      $this->locale_id = $locale_id;

    parent :: __construct($fieldname);
  }
  function LocaleDateRule($fieldname, $locale_id = '')
  {
    if (!$locale_id &&  !defined('CONTENT_LOCALE_ID'))
      $this->locale_id = DEFAULT_CONTENT_LOCALE_ID;
    elseif(!$locale_id)
      $this->locale_id = CONTENT_LOCALE_ID;
    else
      $this->locale_id = $locale_id;

    parent :: SingleFieldRule($fieldname);
  }
  function __construct($field_name, $min_len, $max_len = null)
  {
    parent :: __construct($field_name);

    if (is_null($max_len))
    {
      $this->min_len = null;
      $this->max_len = $min_len;
    }
    else
    {
      $this->min_len = $min_len;
      $this->max_len = $max_len;
    }
  }
  function __construct($field_name, $current_identifier='')
  {
    $this->current_identifier = $current_identifier;

    parent :: __construct($field_name);
  }
  function __construct($field_name, $invalid_value)
  {
    parent :: __construct($field_name);

    $this->invalid_value = $invalid_value;
  }
  function UniqueUserRule($field_name, $current_identifier='')
  {
    $this->current_identifier = $current_identifier;

    parent :: SingleFieldRule($field_name);
  }
 function testInit()
 {
   $r = new SingleFieldRule('test');
   $this->assertEqual($r->getFieldName(), 'test');
 }
  function InvalidValueRule($field_name, $invalid_value)
  {
    $this->invalid_value = $invalid_value;

    parent :: SingleFieldRule($field_name);
  }
  function UniqueUserEmailRule($field_name, $email='')
  {
    $this->current_email = $email;

    parent :: SingleFieldRule($field_name);
  }