This class represents the premice of a Rule of personnalisation

author bruno
package personalization
subpackage rules

 Methods

Constructs a new Premice instance, with an array of constraints

__construct(string[] $c) 

Parameters

$c

string[]

the constraints string array

Analyze the syntax of the premice and returns a code: <ul> <li>0: premice is valid</li> <li>1xx: constraints xx not valid</li> </ul>

analyze() : int

Returns

intreturn code for analysis

returns a subset of KSource TODO only profiles

giveRuleSubset(\KSource[] $ks) : \KSource[]

Parameters

$ks

\KSource[]

the starting knowledge source set

Returns

\KSource[]the KSource subset containing KSource which match constraints

build constraints

buildConstraints(string $c) 

Parameters

$c

string

the constraints string

Returns a 2-sized array where first index is a letter representing the KSource and second index gives the constraint to apply

parseSubConstraint(string $c) : string[]

Parameters

$c

string

the subConstraint string, $X{constraint}

Returns

string[]a 2-sized string array

 Properties

 

$cs : string[]