\PhalApi\Request\FormatterBaseFormatter

BaseFormatter 公共基类

  • 提供基本的公共功能,便于子类重用

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
filterByRange()
filterRangeMinLessThanOrEqualsMax()
filterRangeCheckMin()
filterRangeCheckMax()
formatEnumValue()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

filterByRange()

filterByRange(  $value,   $rule) 

根据范围进行控制

Parameters

$value
$rule

filterRangeMinLessThanOrEqualsMax()

filterRangeMinLessThanOrEqualsMax(  $rule) 

Parameters

$rule

filterRangeCheckMin()

filterRangeCheckMin(  $value,   $rule) 

Parameters

$value
$rule

filterRangeCheckMax()

filterRangeCheckMax(  $value,   $rule) 

Parameters

$value
$rule

formatEnumValue()

formatEnumValue(string  $value, array  $rule) 

格式化枚举类型

Parameters

string $value

变量值

array $rule

array('name' => '', 'type' => 'enum', 'default' => '', 'range' => array(...))

Throws

\PhalApi\Exception\BadRequestException