Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
Tools
Model
Entity
Entity
PHP Class Tools\Model\Entity\Entity
Inheritance:
extends
Cake\ORM\Entity
Show file
Open project: dereuromark/cakephp-tools
Class Usage Examples
Public Methods
Method
Description
enum
(
string
|
array
|
null
$value
,
array
$options
,
string
|
null
$default
= null ) :
string
|
array
The main method for any enumeration, should be called statically Now also supports reordering/filtering
Method Details
enum()
public
static
method
The main method for any enumeration, should be called statically Now also supports reordering/filtering
See link:
http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/
public
static
enum
(
string
|
array
|
null
$value
,
array
$options
,
string
|
null
$default
= null ) :
string
|
array
$value
string
|
array
|
null
Integer or array of keys or NULL for complete array result
$options
array
Options
$default
string
|
null
Default value
return
string
|
array