Overview

Namespaces

  • None
  • Wei
    • Validator

Classes

  • Apc
  • App
  • ArrayCache
  • Asset
  • Base
  • BaseCache
  • BaseController
  • Bicache
  • Cache
  • Config
  • Cookie
  • Couchbase
  • Counter
  • Db
  • DbCache
  • E
  • Env
  • Error
  • FileCache
  • Gravatar
  • Http
  • Lock
  • Logger
  • Memcache
  • Memcached
  • MongoCache
  • Password
  • PhpError
  • PhpFileCache
  • Pinyin
  • Record
  • Redis
  • Request
  • Response
  • Router
  • SafeUrl
  • Session
  • Soap
  • T
  • Ua
  • Upload
  • Url
  • Uuid
  • Validate
  • View
  • WeChatApp
  • Wei
  • Overview
  • Namespace
  • Class

Class Wei

The service container

Wei\Base
Extended by Wei\Wei
Namespace: Wei
Author:

Twin Huang twinhuang@qq.com

Cache


Located at Wei.php
Methods summary
public
# __construct( array $config = array() )

Instance service container

Instance service container

Parameters

$config

Throws

InvalidArgumentException
When option "wei" is not an instance of "Wei\Wei"

Overrides

Wei\Base::__construct()
public static
# getContainer( array $config = array() )

Get the service container instance

Get the service container instance

Parameters

$config
The array or file configuration

Returns


$this

Throws

InvalidArgumentException
When the configuration parameter is not array or file
public static
# setContainer( Wei\Wei $container = null )

Set the service container

Set the service container

Parameters

$container
public boolean
# autoload( string $class )

Autoload the PSR-0 class

Autoload the PSR-0 class

Parameters

$class
the name of the class

Returns

boolean
public
# setConfig( string|array $name, mixed $value = null )

Set service's configuration

Set service's configuration

Parameters

$name
$value

Returns


$this
public mixed
# getConfig( string $name = null, mixed $default = null )

Get services' configuration

Get services' configuration

Parameters

$name
The name of configuration
$default
The default value if configuration not found

Returns

mixed
public mixed
# invoke( string $name, array $args = array(), array $providers = array() )

Get a service and call its "__invoke" method

Get a service and call its "__invoke" method

Parameters

$name
The name of the service
$args
The arguments for "__invoke" method
$providers
The service providers map

Returns

mixed
public Wei\Base
# get( string $name, array $options = array(), array $providers = array() )

Get a service

Get a service

Parameters

$name
The name of the service, without class prefix "Wei\"
$options
The option properties for service
$providers
The dependent configuration

Returns

Wei\Base

Throws

BadMethodCallException
public Wei\Base[]
# getServices( )

Returns all instanced services

Returns all instanced services

Returns

Wei\Base[]
public boolean
# isInstanced( string $name )

Check if the service is instanced

Check if the service is instanced

Parameters

$name
The name of service

Returns

boolean
public Wei\Base
# newInstance( string $name, array $options = array(), array $providers = array() )

Initialize a new instance of service, with the specified name

Initialize a new instance of service, with the specified name

Parameters

$name
The name of the service
$options
The option properties for service
$providers
The dependent configuration

Returns

Wei\Base
The instanced service
public
# set( string $name, object $service )

Add a service to the service container

Add a service to the service container

Parameters

$name
The name of service
$service
The object of service

Returns


$this
public boolean
# remove( string $name )

Remove the service by the specified name

Remove the service by the specified name

Parameters

$name
The name of service

Returns

boolean
public string
# getClass( string $name )

Get the service class by the given name

Get the service class by the given name

Parameters

$name
The name of service

Returns

string
public string|false
# has( string $name )

Check if the service exists by the specified name, if the service exists, returns the full class name, else return false

Check if the service exists by the specified name, if the service exists, returns the full class name, else return false

Parameters

$name
The name of service

Returns

string|false
public
# setDebug( $bool )

Set debug flag

Set debug flag

Parameters

$bool

Returns


$this
public boolean
# isDebug( )

Whether in debug mode or not

Whether in debug mode or not

Returns

boolean
public
# setAutoload( boolean $enable )

Whether enable autoload or not

Whether enable autoload or not

Parameters

$enable

Returns


$this
public
# setAutoloadMap( array $map )

Set autoload directories for autoload method

Set autoload directories for autoload method

Parameters

$map

Returns


$this

Throws

InvalidArgumentException
public
# setInis( array $inis )

Sets the value of PHP configuration options

Sets the value of PHP configuration options

Parameters

$inis

Returns


$this
public
# setAliases( array $aliases )

Merge service aliases

Merge service aliases

Parameters

$aliases

Returns


$this
public
# setAlias( string $name, string $class )

Set service alias

Set service alias

Parameters

$name
The name of service
$class
The class that the service reference to

Returns


$this
public
# __set( string $name, object $service )

Add a service to the service container

Add a service to the service container

Parameters

$name
The name of service
$service
The service service

Returns


$this
public
# import( string $dir, string $namespace, null $format = null, boolean $autoload = false )

Import classes in the specified directory as services

Import classes in the specified directory as services

Parameters

$dir
The directory to search class
$namespace
The prefix namespace of the class
$format
The service name format, eg 'is%s'
$autoload
Whether add namespace and directory to autoloadMap or nor

Returns


$this

Throws

InvalidArgumentException
When the first parameter is not a directory
public
# setNamespace( string $namespace )

Set the name of current application

Set the name of current application

Parameters

$namespace

Returns


$this
public string
# getNamespace( )

Returns the name of current application

Returns the name of current application

Returns

string
protected
# setImport( array $import = array() )

Set import services

Set import services

Parameters

$import

Returns


$this
protected
# setProviders( array $providers )

Merge the dependence map

Merge the dependence map

Parameters

$providers
protected
# setPreload( array $preload )

Instance preload services

Instance preload services

Parameters

$preload
protected
# setServices( array $services )

Merge service objects

Merge service objects

Parameters

$services
Methods inherited from Wei\Base
__call(), __get(), getOption(), setOption()
Magic methods summary
public mixed
# cache( $key, $value = null, $expire )

Retrieve or store an item by cache

Retrieve or store an item by cache

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# arrayCache( $key, $value = null, $expire )

Retrieve or store an item by array cache

Retrieve or store an item by array cache

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# apc( $key, $value = null, $expire )

Retrieve or store an item

Retrieve or store an item

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# dbCache( $key, $value = null, $expire )

Retrieve or store an item by database cache

Retrieve or store an item by database cache

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# fileCache( $key, $value = null, $expire )

Retrieve or store an item by file

Retrieve or store an item by file

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# phpFileCache( $key, $value = null, $expire )

Retrieve or store an item by file

Retrieve or store an item by file

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# memcache( $key, $value = null, $expire )

Retrieve or store an item by Memcache

Retrieve or store an item by Memcache

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# memcached( $key, $value = null, $expire )

Retrieve or store an item by Memcached

Retrieve or store an item by Memcached

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# mongoCache( $key, $value = null, $expire )

Retrieve or store an item by MongoDB

Retrieve or store an item by MongoDB

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# couchbase( $key, $value = null, $expire )

Retrieve or store an item by Couchbase

Retrieve or store an item by Couchbase

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# redis( $key = null, $value = null, $expire )

Retrieve or store an item by Redis

Retrieve or store an item by Redis

Parameters

$key
$value
$expire

Returns

mixed
public mixed
# bicache( $key, $value = null, $expire )

Retrieve or store an item by two-level cache Database

Retrieve or store an item by two-level cache Database

Parameters

$key
$value
$expire

Returns

mixed
public Wei\Record
# db( $table = null )

Create a new record object HTTP Client

Create a new record object HTTP Client

Parameters

$table

Returns

Wei\Record
public Wei\Http
# http( array $options )

Create a new HTTP service and execute

Create a new HTTP service and execute

Parameters

$options

Returns

Wei\Http
public Wei\Soap
# soap( array $options )

Create a new Soap service and execute HTTP Request

Create a new Soap service and execute HTTP Request

Parameters

$options

Returns

Wei\Soap
public mixed
# request( $name, $default = null )

Returns a stringify request parameter value

Returns a stringify request parameter value

Parameters

$name
$default

Returns

mixed
public mixed
# cookie( $key, $value = null, $options = array() )

Get or set cookie

Get or set cookie

Parameters

$key
$value
$options

Returns

mixed
public mixed
# session( $name, $default = null )

Returns a stringify session parameter value

Returns a stringify session parameter value

Parameters

$name
$default

Returns

mixed
public boolean
# ua( )

Check if in the specified browser, OS or device

Check if in the specified browser, OS or device

Returns

boolean
public boolean
# upload( array $options = array() )

Upload a file HTTP Response

Upload a file HTTP Response

Parameters

$options

Returns

boolean
public Wei\Response
# response( $content = null, $status = null )

Send response header and content View

Send response header and content View

Parameters

$content
$status

Returns

Wei\Response
public string
# view( $name = null, $vars = array() )

Returns view object or render a PHP template

Returns view object or render a PHP template

Parameters

$name
$vars

Returns

string
public string
# asset( $file )

Returns the asset URL by specified file

Returns the asset URL by specified file

Parameters

$file

Returns

string
public string
# e( $string, $type = 'html' )

Escapes a string by specified type for secure output Application

Escapes a string by specified type for secure output Application

Parameters

$string
$type

Returns

string
public Wei\App
# app( array $options = array() )

Startup an MVC application

Startup an MVC application

Parameters

$options

Returns

Wei\App
public Wei\WeChatApp
# weChatApp( )

Start up WeChat application and output the matched rule message

Start up WeChat application and output the matched rule message

Returns

Wei\WeChatApp
public string
# url( $uri )

Build URL by specified uri and parameters Other

Build URL by specified uri and parameters Other

Parameters

$uri

Returns

string
public string
# env( )

Returns the environment name

Returns the environment name

Returns

string
public Wei\Error
# error( $fn )

Attach a handler to exception error

Attach a handler to exception error

Parameters

$fn

Returns

Wei\Error
public string
# gravatar( $email, $size = null, $default = null, $rating = null )

Generates a Gravatar URL for a specified email address

Generates a Gravatar URL for a specified email address

Parameters

$email
$size
$default
$rating

Returns

string
public boolean
# lock( $key )

Acquire a lock key

Acquire a lock key

Parameters

$key

Returns

boolean
public boolean
# logger( $level, $message )

Logs with an arbitrary level

Logs with an arbitrary level

Parameters

$level
$message

Returns

boolean
public string
# pinyin( $word )

Converts Chinese words to phonetic alphabets

Converts Chinese words to phonetic alphabets

Parameters

$word

Returns

string
public string
# uuid( )

Returns

string
public string
# t( $message, array $parameters = array() )

Translate the message Validation

Translate the message Validation

Parameters

$message
$parameters

Returns

string
public Wei\Validate
# validate( array $option )

Create a new validator and validate by specified options Data type and composition

Create a new validator and validate by specified options Data type and composition

Parameters

$option

Returns

Wei\Validate
public boolean
# isAlnum( )

Returns

boolean
public boolean
# isAlpha( )

Returns

boolean
public boolean
# isBlank( $input )

Check if the input is blank

Check if the input is blank

Parameters

$input

Returns

boolean
public boolean
# isContains( $input, $search, $regex = false )

Check if the input is contains the specified string or pattern

Check if the input is contains the specified string or pattern

Parameters

$input
$search
$regex

Returns

boolean
public boolean
# isDecimal( $input )

Check if the input is decimal

Check if the input is decimal

Parameters

$input

Returns

boolean
public boolean
# isDigit( )

Returns

boolean
public boolean
# isDivisibleBy( $input, $divisor )

Check if the input could be divisible by specified divisor

Check if the input could be divisible by specified divisor

Parameters

$input
$divisor

Returns

boolean
public boolean
# isDoubleByte( $input )

Check if the input contains only double characters

Check if the input contains only double characters

Parameters

$input

Returns

boolean
public boolean
# isPresent( $input )

Check if the input is empty

Check if the input is empty

Parameters

$input

Returns

boolean
public boolean
# isEndsWith( $input, $findMe, $case = false )

Check if the input is ends with specified string

Check if the input is ends with specified string

Parameters

$input
$findMe
$case

Returns

boolean
public boolean
# isIn( $input, array $array, $strict = false )

Check if the input is in specified array

Check if the input is in specified array

Parameters

$input
$array
$strict

Returns

boolean
public boolean
# isLowercase( $input )

Check if the input is lowercase

Check if the input is lowercase

Parameters

$input

Returns

boolean
public boolean
# isLuhn( $input )

Check if the input is valid by the Luhn algorithm

Check if the input is valid by the Luhn algorithm

Parameters

$input

Returns

boolean
public boolean
# isNaturalNumber( )

Returns

boolean
public boolean
# isNull( $input )

Check if the input is null

Check if the input is null

Parameters

$input

Returns

boolean
public boolean
# isNumber( $input )

Check if the input is number

Check if the input is number

Parameters

$input

Returns

boolean
public boolean
# isPositiveInteger( )

Returns

boolean
public boolean
# isRegex( $input, $pattern )

Check if the input is valid by specified regular expression

Check if the input is valid by specified regular expression

Parameters

$input
$pattern

Returns

boolean
public boolean
# isStartsWith( $input, $findMe, $case = false )

Check if the input is starts with specified string

Check if the input is starts with specified string

Parameters

$input
$findMe
$case

Returns

boolean
public boolean
# isType( $input, $type )

Check if the type of input is equals specified type name

Check if the type of input is equals specified type name

Parameters

$input
$type

Returns

boolean
public boolean
# isUppercase( $input )

Check if the input is uppercase Length

Check if the input is uppercase Length

Parameters

$input

Returns

boolean
public boolean
# isLength( $input, $length, $max = null) Check if the length (or size )

of input is equals specified length or in specified length range

of input is equals specified length or in specified length range

Parameters

$input
$length
$max

Returns

boolean
public boolean
# isCharLength( $input, $length )

Check if the characters length of input is equals specified length

Check if the characters length of input is equals specified length

Parameters

$input
$length

Returns

boolean
public boolean
# isMinLength( $input )

of input is greater than specified length

of input is greater than specified length

Parameters

$input

Returns

boolean
public boolean
# isMaxLength( $input )

of input is lower than specified length Comparison

of input is lower than specified length Comparison

Parameters

$input

Returns

boolean
public boolean
# isEqualTo( $input )

the specified value

the specified value

Parameters

$input

Returns

boolean
public boolean
# isIdenticalTo( $input )

the specified value

the specified value

Parameters

$input

Returns

boolean
public boolean
# isGreaterThan( $input )

the specified value

the specified value

Parameters

$input

Returns

boolean
public boolean
# isGreaterThanOrEqual( $input )

the specified value

the specified value

Parameters

$input

Returns

boolean
public boolean
# isLessThan( $input )

the specified value

the specified value

Parameters

$input

Returns

boolean
public boolean
# isLessThanOrEqual( $input )

the specified value

the specified value

Parameters

$input

Returns

boolean
public boolean
# isBetween( $input, $min, $max )

Check if the input is between the specified minimum and maximum value Date and time

Check if the input is between the specified minimum and maximum value Date and time

Parameters

$input
$min
$max

Returns

boolean
public boolean
# isDate( $input, $format = 'Y-m-d' )

Check if the input is a valid date

Check if the input is a valid date

Parameters

$input
$format

Returns

boolean
public boolean
# isDateTime( $input, $format = null )

Check if the input is a valid datetime

Check if the input is a valid datetime

Parameters

$input
$format

Returns

boolean
public boolean
# isTime( $input, $format = 'H:i:s' )

Check if the input is a valid time File and directory

Check if the input is a valid time File and directory

Parameters

$input
$format

Returns

boolean
public boolean
# isDir( $input )

Check if the input is existing directory

Check if the input is existing directory

Parameters

$input

Returns

boolean
public boolean
# isExists( $input )

Check if the input is existing file or directory

Check if the input is existing file or directory

Parameters

$input

Returns

boolean
public boolean
# isFile( $input, array $options )

Check if the input is valid file

Check if the input is valid file

Parameters

$input
$options

Returns

boolean
public boolean
# isImage( $input, array $options )

Check if the input is valid image Network

Check if the input is valid image Network

Parameters

$input
$options

Returns

boolean
public boolean
# isEmail( $input )

Check if the input is valid email address

Check if the input is valid email address

Parameters

$input

Returns

boolean
public boolean
# isIp( $input, array $options = array() )

Check if the input is valid IP address

Check if the input is valid IP address

Parameters

$input
$options

Returns

boolean
public boolean
# isTld( $input )

Check if the input is a valid top-level domain

Check if the input is a valid top-level domain

Parameters

$input

Returns

boolean
public boolean
# isUrl( $input, array $options = array() )

Check if the input is valid URL address

Check if the input is valid URL address

Parameters

$input
$options

Returns

boolean
public boolean
# isUuid( )

Region

Region

Returns

boolean
public boolean
# isCreditCard( $input, $type = null )

Check if the input is valid credit card number

Check if the input is valid credit card number

Parameters

$input
$type

Returns

boolean
public boolean
# isPhone( $input )

Check if the input is valid phone number, contains only digit, +, - and spaces

Check if the input is valid phone number, contains only digit, +, - and spaces

Parameters

$input

Returns

boolean
public boolean
# isChinese( $input )

Check if the input contains only Chinese characters

Check if the input contains only Chinese characters

Parameters

$input

Returns

boolean
public boolean
# isIdCardCn( $input )

Check if the input is valid Chinese identity card

Check if the input is valid Chinese identity card

Parameters

$input

Returns

boolean
public boolean
# isIdCardHk( $input )

Check if the input is valid Hong Kong identity card

Check if the input is valid Hong Kong identity card

Parameters

$input

Returns

boolean
public boolean
# isIdCardMo( $input )

Check if the input is valid Macau identity card

Check if the input is valid Macau identity card

Parameters

$input

Returns

boolean
public boolean
# isIdCardTw( $input )

Check if the input is valid Taiwan identity card

Check if the input is valid Taiwan identity card

Parameters

$input

Returns

boolean
public boolean
# isPhoneCn( $input )

Check if the input is valid Chinese phone number

Check if the input is valid Chinese phone number

Parameters

$input

Returns

boolean
public boolean
# isPlateNumberCn( $input )

Check if the input is valid Chinese plate number

Check if the input is valid Chinese plate number

Parameters

$input

Returns

boolean
public boolean
# isPostcodeCn( $input )

Check if the input is valid Chinese postcode

Check if the input is valid Chinese postcode

Parameters

$input

Returns

boolean
public boolean
# isQQ( $input )

Check if the input is valid QQ number

Check if the input is valid QQ number

Parameters

$input

Returns

boolean
public boolean
# isMobileCn( $input )

Check if the input is valid Chinese mobile number Group

Check if the input is valid Chinese mobile number Group

Parameters

$input

Returns

boolean
public boolean
# isAllOf( $input, array $rules )

Check if the input is valid by all of the rules

Check if the input is valid by all of the rules

Parameters

$input
$rules

Returns

boolean
public boolean
# isNoneOf( $input, array $rules )

Check if the input is NOT valid by all of specified rules

Check if the input is NOT valid by all of specified rules

Parameters

$input
$rules

Returns

boolean
public boolean
# isOneOf( $input, array $rules )

Check if the input is valid by any of the rules

Check if the input is valid by any of the rules

Parameters

$input
$rules

Returns

boolean
public boolean
# isSomeOf( $input, array $rules, $atLeast )

Check if the input is valid by specified number of the rules Others

Check if the input is valid by specified number of the rules Others

Parameters

$input
$rules
$atLeast

Returns

boolean
public boolean
# isRecordExists( $input, $table, $field = 'id' )

Check if the input is existing table record

Check if the input is existing table record

Parameters

$input
$table
$field

Returns

boolean
public boolean
# isAll( $input, array $rules )

Check if all of the element in the input is valid by all specified rules

Check if all of the element in the input is valid by all specified rules

Parameters

$input
$rules

Returns

boolean
public boolean
# isCallback( $input, Closure $fn, $message = null )

Check if the input is valid by specified callback

Check if the input is valid by specified callback

Parameters

$input
$fn
$message

Returns

boolean
public boolean
# isColor( $input )

Check if the input is valid Hex color

Check if the input is valid Hex color

Parameters

$input

Returns

boolean
public boolean
# isPassword( $input, array $options = array() )

Check if the input password is secure enough

Check if the input password is secure enough

Parameters

$input
$options

Returns

boolean
Constants summary
string VERSION

Version

Version

# '0.9.16'
Properties summary
protected array $configs

The configurations for all objects

The configurations for all objects

# array()
protected string $namespace

The name of current application

The name of current application

#
protected boolean $debug

Whether in debug mode or not

Whether in debug mode or not

# true
protected array $inis

The PHP configuration options that will be set when the service container constructing

The PHP configuration options that will be set when the service container constructing

See

http://www.php.net/manual/en/ini.php
http://www.php.net/manual/en/function.ini-set.php
# array()
protected boolean $autoload

Whether enable class autoload or not

Whether enable class autoload or not

# true
protected array $autoloadMap

The directories for autoload

The directories for autoload

# array()
protected array $aliases

The service name to class name map

The service name to class name map

# array()
protected array $providers

The service provider map

The service provider map

# array()
protected array $import

The import configuration

The import configuration

Format: array( array( 'dir' => 'lib/Wei/Validator', 'namespace' => 'Wei\Validator', 'format' => 'is%s', 'autoload' => false ), array( 'dir' => 'src/MyProject/Wei', 'namespace' => 'MyProject\Wei', 'format' => '%s', 'autoload' => true ) );

# array()
protected callable $beforeConstruct

The callback executes before service constructed

The callback executes before service constructed

#
protected callable $afterConstruct

The callback executes after service constructed

The callback executes after service constructed

#
protected array $preload

The services that will be instanced after service container constructed

The services that will be instanced after service container constructed

# array()
protected Wei\Base[] $services

An array contains the instanced services

An array contains the instanced services

# array()
protected static Wei\Wei $container

The current service container

The current service container

#
Properties inherited from Wei\Base
$wei
Magic properties summary
public Wei\Cache $cache

A cache service proxy

public Wei\ArrayCache $arrayCache

A cache service that stored data in PHP array

public Wei\Apc $apc

A cache service that stored data in PHP APC

public Wei\DbCache $dbCache

A cache service that stored data in databases

public Wei\FileCache $fileCache

A cache service that stored data in files

public Wei\PhpFileCache $phpFileCache

A cache service that stored data as PHP variables in files

public Wei\Memcache $memcache

A cache service that stored data in Memcache

public Wei\Memcached $memcached

A cache service that stored data in Memcached

public Wei\MongoCache $mongoCache

A cache service that stores data in MongoDB

public Wei\Couchbase $couchbase

A cache service base on Couchbase

public Wei\Redis $redis

A cache service that stores data in Redis

public Wei\Bicache $bicache

A two-level cache service

public Wei\Db $db

A database service inspired by Doctrine DBAL

public Wei\Http $http

An alias of call service

public Soap $soap

A Soap client that works like HTTP service

public Wei\Request $request

A service that handles the HTTP request data

public Wei\Cookie $cookie

A object that handles the HTTP request and response cookies

public Wei\Session $session

A object that session parameters ($_SESSION)

public Wei\Ua $ua

A object to detect user OS, device and browser name and version

public Wei\Upload $upload

A object that handles the uploaded files

public Wei\Response $response

A object that handles the HTTP response data

public Wei\View $view

A object that use to render PHP template

public Wei\Asset $asset

A service to generate assets' URL

public Wei\E $e

A object to escape HTML, javascript, CSS, HTML Attribute and URL for secure output

public Wei\App $app

An MVC application service

public Wei\WeChatApp $weChatApp

A object handles WeChat(WeiXin) callback message

public Wei\Router $router

A service that parse the URL to request data

public Wei\Url $url

A util object to build URL

public Wei\Config $config

A object to manage object configurations

public Wei\Counter $counter

A counter service

public Wei\Env $env

A object to detect the environment name and load configuration by environment name

public Wei\Error $error

A object that handles exception and display pretty exception message

public Wei\Gravatar $gravatar

A object that generates a Gravatar URL for a specified email address

public Wei\Lock $lock

A service that provide the functionality of exclusive Lock

public Wei\Logger $logger

A logger service, which is inspired by Monolog

public Wei\Password $password

A wrapper class for password hashing functions

public Wei\Pinyin $pinyin

An util object that converts Chinese words to phonetic alphabets

public Wei\SafeUrl $safeUrl

Generate a URL with signature

public Wei\Uuid $uuid

A util object that generates a RANDOM UUID(universally unique identifier)

public Wei\T $t

A translator object

public Wei\Validator\Alnum $isAlnum
public Wei\Validator\Alpha $isAlpha
public Wei\Validator\Blank $isBlank
public Wei\Validator\Contains $isContains
public Wei\Validator\Decimal $isDecimal
public Wei\Validator\Digit $isDigit
public Wei\Validator\DivisibleBy $isDivisibleBy
public Wei\Validator\DoubleByte $isDoubleByte
public Wei\Validator\Present $isPresent
public Wei\Validator\EndsWith $isEndsWith
public Wei\Validator\In $isIn
public Wei\Validator\Lowercase $isLowercase
public Wei\Validator\Luhn $isLuhn
public Wei\Validator\NaturalNumber $isNaturalNumber
public Wei\Validator\Null $isNull
public Wei\Validator\Number $isNumber
public Wei\Validator\PositiveInteger $isPositiveInteger
public Wei\Validator\Regex $isRegex
public Wei\Validator\StartsWith $isStartsWith
public Wei\Validator\Type $isType
public Wei\Validator\Uppercase $isUppercase
public Wei\Validator\Length $isLength
public Wei\Validator\CharLength $isCharLength
public Wei\Validator\MinLength $isMinLength
public Wei\Validator\MaxLength $isMaxLength
public Wei\Validator\EqualTo $isEqualTo
public Wei\Validator\IdenticalTo $identicalTo
public Wei\Validator\GreaterThan $isGreaterThan
public Wei\Validator\GreaterThanOrEqual $isGreaterThanOrEqual
public Wei\Validator\LessThan $isLessThan
public Wei\Validator\LessThanOrEqual $isLessThanOrEqual
public Wei\Validator\Between $isBetween
public Wei\Validator\Date $isDate
public Wei\Validator\DateTime $isDateTime
public Wei\Validator\Time $isTime
public Wei\Validator\Dir $isDir
public Wei\Validator\Exists $isExists
public Wei\Validator\File $isFile
public Wei\Validator\Image $isImage
public Wei\Validator\Email $isEmail
public Wei\Validator\Ip $isIp
public Wei\Validator\Tld $isTld
public Wei\Validator\Url $isUrl
public Wei\Validator\Uuid $isUuid
public Wei\Validator\CreditCard $isCreditCard
public Wei\Validator\Phone $isPhone
public Wei\Validator\Chinese $isChinese
public Wei\Validator\IdCardCn $isIdCardCn
public Wei\Validator\IdCardHk $isIdCardHk
public Wei\Validator\IdCardMo $isIdCardMo
public Wei\Validator\IdCardTw $isIdCardTw
public Wei\Validator\PhoneCn $isPhoneCn
public Wei\Validator\PlateNumberCn $isPlateNumberCn
public Wei\Validator\PostcodeCn $isPostcodeCn
public Wei\Validator\QQ $isQQ
public Wei\Validator\MobileCn $isMobileCn
public Wei\Validator\AllOf $isAllOf
public Wei\Validator\NoneOf $isNoneOf
public Wei\Validator\OneOf $isOneOf
public Wei\Validator\SomeOf $isSomeOf
public Wei\Validator\RecordExists $isRecordExists
public Wei\Validator\All $isAll
public Wei\Validator\Callback $isCallback
public Wei\Validator\Color $isColor
public Wei\Validator\Password $isPassword
Wei Framework API documentation generated by ApiGen