PHP 클래스 Tools\Model\Behavior\BitmaskedBehavior
An implementation of bitwise masks for row-level operations.
You can submit/register flags in different ways. The easiest way is using a static model function.
It should contain the bits like so (starting with 1):
1 => w, 2 => x, 4 => y, 8 => z, ... (bits as keys - names as values)
The order doesn't matter, as long as no bit is used twice.
The theoretical limit for a 64-bit integer would be 64 bits (2^64).
But if you actually seem to need more than a hand full you
obviously do something wrong and should better use a joined table etc.
파일 보기
프로젝트 열기: dereuromark/cakephp-tools
1 사용 예제들
보호된 프로퍼티들
공개 메소드들
보호된 메소드들
메소드 상세
public beforeFind ( Cake\Event\Event $event, Query $query ) : void |
$event |
Cake\Event\Event |
|
$query |
Cake\ORM\Query |
|
리턴 |
void |
|
public beforeRules ( Cake\Event\Event $event, Cake\ORM\Entity $entity, ArrayObject $options ) : void |
$event |
Cake\Event\Event |
|
$entity |
Cake\ORM\Entity |
|
$options |
ArrayObject |
|
리턴 |
void |
|
public beforeSave ( Cake\Event\Event $event, Cake\ORM\Entity $entity, ArrayObject $options ) : void |
$event |
Cake\Event\Event |
|
$entity |
Cake\ORM\Entity |
|
$options |
ArrayObject |
|
리턴 |
void |
|
encodeBitmaskConditions()
공개 메소드
encodeBitmaskData()
공개 메소드
프로퍼티 상세
$_defaultConfig 보호되어 있는 프로퍼티
protected array $_defaultConfig |
리턴 |
array |
|