My Console Application Class Reference

CEnumerable

Package system.base
Inheritance class CEnumerable
Since 1.0
Version $Id: CComponent.php 2190 2010-06-15 20:47:31Z qiang.xue $
Source Code framework/base/CComponent.php
Author Qiang Xue <qiang.xue@gmail.com>
CEnumerable is the base class for all enumerable types.

To define an enumerable type, extend CEnumberable and define string constants. Each constant represents an enumerable value. The constant name must be the same as the constant value. For example,
class TextAlign extends CEnumerable
{
    const Left='Left';
    const Right='Right';
}
Then, one can use the enumerable values such as TextAlign::Left and TextAlign::Right.
Copyright © 2008-2011 by Yii Software LLC
All Rights Reserved.