Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Chain
  • Factory
  • Filter
  • Fluent
  • Upload
  • Validator

Interfaces

  • FilterInterface
  • ValidatorInterface

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Chain

Chain of filters a validators for a single variable.

Jyxo\Input\Chain implements Jyxo\Input\ValidatorInterface

Direct known subclasses

Jyxo\Input\Chain\Conditional
Namespace: Jyxo\Input
Category: Jyxo
Package: Jyxo\Input
Subpackage: Chain
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jakub Tománek
Located at Input/Chain.php
Methods summary
public Jyxo\Input\Chain
# addValidator( Jyxo\Input\ValidatorInterface $validator, string $errorMessage = null )

Adds a validator to the chain.

Adds a validator to the chain.

Parameters

$validator
Jyxo\Input\ValidatorInterface
Validator
$errorMessage
string
Validation error message

Returns

Jyxo\Input\Chain
public Jyxo\Input\Chain
# addFilter( Jyxo\Input\FilterInterface $filter )

Adds a filter to the chain.

Adds a filter to the chain.

Parameters

$filter
Jyxo\Input\FilterInterface
Filter

Returns

Jyxo\Input\Chain
public Jyxo\Input\Chain
# addWalk( )

Adds a new subchain and returns its instance.

Adds a new subchain and returns its instance.

Returns

Jyxo\Input\Chain
public Jyxo\Input\Chain\Conditional
# addCondition( Jyxo\Input\Chain\Conditional $chain )

Adds a new conditional subchain and returns its instance.

Adds a new conditional subchain and returns its instance.

Parameters

$chain
Jyxo\Input\Chain\Conditional

Returns

Jyxo\Input\Chain\Conditional
public Jyxo\Input\Chain
# close( )

In case of a subchain returns its parent, the chain itself otherwise.

In case of a subchain returns its parent, the chain itself otherwise.

Returns

Jyxo\Input\Chain
public boolean
# isEmpty( )

Returns if the chain contains any rules.

Returns if the chain contains any rules.

Returns

boolean
public boolean
# isValid( mixed $value )

Returns if the value is valid.

Returns if the value is valid.

Parameters

$value
mixed
Input value

Returns

boolean

Implementation of

Jyxo\Input\ValidatorInterface::isValid
public mixed &
# getValue( )

Returns a filtered variable value.

Returns a filtered variable value.

Returns

mixed
public array
# getErrors( )

Returns a list of validation errors.

Returns a list of validation errors.

Returns

array
public Jyxo\Input\Chain
# getParent( )

Returns the parent chain.

Returns the parent chain.

Returns

Jyxo\Input\Chain
public Jyxo\Input\Chain
# setParent( Jyxo\Input\Chain $parent )

Sets the parent chain.

Sets the parent chain.

Parameters

$parent
Jyxo\Input\Chain
Parent chain

Returns

Jyxo\Input\Chain
Constants summary
string FILTER 'filter'
#

Filter identifier.

Filter identifier.

string VALIDATOR 'validator'
#

Validator identifier.

Validator identifier.

string WALK 'walk'
#

Array walk identifier.

Array walk identifier.

string CONDITION 'condition'
#

Condition identifier.

Condition identifier.

string CLOSE 'close'
#

Subchain closing identifier.

Subchain closing identifier.

Properties summary
protected mixed $value
#

Actual variable value.

Actual variable value.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0