\Phabstractic\Data\TypesPriority

Priority Class - Defines a basic priority

This associates a piece of data with a priority

The lower the priority the more urgent it is, is the idea

Summary

Methods
Properties
Constants
__construct()
getData()
getDataReference()
getPriority()
setPriority()
buildPriority()
__debugInfo()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$data
$priority
N/A

Properties

$data

$data : mixed

The data to be associated with the urgency

Type

mixed

$priority

$priority : integer

The urgency of the data, less is more

Type

integer

Methods

__construct()

__construct(mixed  $data, integer  $priority) 

Priority class Constructor.

Set the initial priority and associate the data object with it.

NOTE: Data is passed and assigned as a reference in the constructor

Parameters

mixed $data

The data associated with the priority

integer $priority

The urgency of the priority, less is more

getData()

getData() : mixed

Retrieve the data from the priority

Returns

mixed

getDataReference()

getDataReference() : mixed

Retrieve the data as a reference from the priority

Returns

mixed

getPriority()

getPriority() : integer

Get the urgency of the priority object, less is more

Generally, 0 is most urgent.

Returns

integer

setPriority()

setPriority(  $priority) : boolean

Set the priority of the object

Generally, 0 is most urgent.

Parameters

$priority

Returns

boolean —

True if set

buildPriority()

buildPriority(mixed  $data,   $priority) 

Construct a priority

This is useful if you're not using a reference as data

Parameters

mixed $data
$priority

__debugInfo()

__debugInfo() 

Debug Info (var_dump)

Display debug info

Requires PHP 5.6+