All Data Structures Functions Variables Pages
Static Public Member Functions | Data Fields | Static Protected Member Functions
RedBeanModelMemberRulesToColumnAdapter Class Reference

Static Public Member Functions

static resolveUniqueIndexesFromValidator ($modelClassName)
 
static resolve ($modelClassName, array $rules, &$messageLogger)
 
static resolveStringTypeAndLengthByMaxLength (&$type, &$length, $maxLength=null)
 
static resolveIntegerTypeByMinAndMaxValue (&$type, $min, $max)
 

Data Fields

const ASSUME_SIGNED = true
 
const DEFAULT_MODEL_CLASS = 'Item'
 
const FORCE_DEFAULT_MODEL_CLASS = true
 
const CACHE_KEY = 'RedBeanModelMemberRulesToColumnAdapter_uniqueIndexes'
 

Static Protected Member Functions

static resolveColumnTypeAndLengthFromRules ($modelClassName, $member, array $rules, &$type, &$length, &$notNull, &$default, &$messageLogger)
 
static findSuitableModelClassName ($modelClassName)
 
static findFirstNonAbstractModelInHierarchy ($modelClassName)
 
static registerUniqueIndexByMemberName ($member, $modelClassName)
 

Detailed Description

Adapter class to generate column definition when provided with rules, modelClassName

Definition at line 40 of file RedBeanModelMemberRulesToColumnAdapter.php.

Member Function Documentation

static resolveUniqueIndexesFromValidator (   $modelClassName)
static

returns unique indexes for a modelClass if there are any unique validators for its members

Parameters
string$modelClassName
Returns
array|null

Definition at line 68 of file RedBeanModelMemberRulesToColumnAdapter.php.

static resolve (   $modelClassName,
array  $rules,
$messageLogger 
)
static

Provided modelClassName and rules for a member we resolve a column in table.

Parameters
string$modelClassName
array$rules
$messageLogger
Returns
array|bool

Definition at line 85 of file RedBeanModelMemberRulesToColumnAdapter.php.

Field Documentation

const ASSUME_SIGNED = true

Should we assume all int types signed?

Definition at line 45 of file RedBeanModelMemberRulesToColumnAdapter.php.

const DEFAULT_MODEL_CLASS = 'Item'

this the default model class thats passed to validator in case we can't find a suitable model class. this class must allow having beans.

Definition at line 51 of file RedBeanModelMemberRulesToColumnAdapter.php.

const FORCE_DEFAULT_MODEL_CLASS = true

Should be force using the default model class defined above for validators or try to find suitable one?

Definition at line 56 of file RedBeanModelMemberRulesToColumnAdapter.php.

const CACHE_KEY = 'RedBeanModelMemberRulesToColumnAdapter_uniqueIndexes'

Key to store unique indexes for unique validators against models

Definition at line 61 of file RedBeanModelMemberRulesToColumnAdapter.php.


The documentation for this class was generated from the following file:
Generated on Sat Apr 4 2020 07:11:17