PHP Class GraphAware\Reco4PHP\Result\Recommendations

Mostra file Open project: graphaware/reco4php Class Usage Examples

Protected Properties

Property Type Description
$context GraphAware\Reco4PHP\Context\Context
$recommendations Recommendation[]

Public Methods

Method Description
__construct ( GraphAware\Reco4PHP\Context\Context $context )
add ( GraphAware\Common\Type\Node $item, string $name, SingleScore $singleScore )
get ( $position ) : Recommendation
getContext ( ) : GraphAware\Reco4PHP\Context\Context
getItemBy ( string $key, mixed $value ) : Recommendation | null
getItemById ( integer $id ) : Recommendation | null
getItems ( $size = null ) : array
getOrCreate ( GraphAware\Common\Type\Node $item ) : Recommendation
merge ( Recommendations $recommendations )
remove ( Recommendation $recommendation )
size ( ) : integer
sort ( )

Method Details

__construct() public method

public __construct ( GraphAware\Reco4PHP\Context\Context $context )
$context GraphAware\Reco4PHP\Context\Context

add() public method

public add ( GraphAware\Common\Type\Node $item, string $name, SingleScore $singleScore )
$item GraphAware\Common\Type\Node
$name string
$singleScore SingleScore

get() public method

public get ( $position ) : Recommendation
$position
return Recommendation

getContext() public method

public getContext ( ) : GraphAware\Reco4PHP\Context\Context
return GraphAware\Reco4PHP\Context\Context

getItemBy() public method

public getItemBy ( string $key, mixed $value ) : Recommendation | null
$key string
$value mixed
return Recommendation | null

getItemById() public method

public getItemById ( integer $id ) : Recommendation | null
$id integer
return Recommendation | null

getItems() public method

public getItems ( $size = null ) : array
return array

getOrCreate() public method

public getOrCreate ( GraphAware\Common\Type\Node $item ) : Recommendation
$item GraphAware\Common\Type\Node
return Recommendation

merge() public method

public merge ( Recommendations $recommendations )
$recommendations Recommendations

remove() public method

public remove ( Recommendation $recommendation )
$recommendation Recommendation

size() public method

public size ( ) : integer
return integer

sort() public method

public sort ( )

Property Details

$context protected_oe property

protected Context,GraphAware\Reco4PHP\Context $context
return GraphAware\Reco4PHP\Context\Context

$recommendations protected_oe property

protected Recommendation[],GraphAware\Reco4PHP\Result $recommendations
return Recommendation[]