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 Counter

A counter service

Wei\Base
Extended by Wei\Counter
Namespace: Wei
Author: Twin Huang twinhuang@qq.com
Located at Counter.php
Methods summary
public integer|false
# incr( string $key, integer $offset = 1 )

Increment an item

Increment an item

Parameters

$key
The name of item
$offset
The value to increased

Returns

integer|false
Returns the new value on success, or false on failure
public integer|false
# decr( string $key, integer $offset = 1 )

Decrement an item

Decrement an item

Parameters

$key
The name of item
$offset
The value to be decreased

Returns

integer|false
Returns the new value on success, or false on failure
public mixed
# get( string $key )

Retrieve an item

Retrieve an item

Parameters

$key
The name of item

Returns

mixed
public boolean
# set( string $key, mixed $value )

Store an item

Store an item

Parameters

$key
The name of item
$value
The value of item

Returns

boolean
public boolean
# exits( string $key )

Check if an item is exists

Check if an item is exists

Parameters

$key

Returns

boolean
public boolean
# remove( string $key )

Remove an item

Remove an item

Parameters

$key
The name of item

Returns

boolean
Methods inherited from Wei\Base
__call(), __construct(), __get(), getOption(), setOption()
Properties inherited from Wei\Base
$providers, $wei
Magic properties summary
public Wei\Cache $cache

A cache service

Wei Framework API documentation generated by ApiGen