\Pvra\ResultReasoning

Class Reasoning

Summary

Methods
Properties
Constants
__construct()
toArray()
jsonSerialize()
get()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
No public properties found
No constants found
getResult()
No protected properties found
N/A
No private methods found
$reasonId
$line
$msg
$result
$data
$version
N/A

Properties

$reasonId

$reasonId : integer|string

The reason this reasoning maps to

This may be an arbitrary scalar but is most likely to map to a known constant in RequirementReason.

Type

integer|string

$line

$line : integer

Type

integer

$msg

$msg : null|string

Type

null|string

$data

$data : array

Type

array

$version

$version : string

Type

string

Methods

__construct()

__construct(integer|string  $reasonId, integer  $line, \Pvra\AnalysisResult  $result, string|null  $version = null, null|string  $msg = null, array  $data = array()) 

RequirementReasoning constructor

Used to construct this reasoning. Only the reasonId, line and result parameters are required. The remaining parameters can be determined based on the reasonId and result instance. *

Parameters

integer|string $reasonId

The mapped reasonId

integer $line

The mapped line

\Pvra\AnalysisResult $result

The result this reasoning applies to

string|null $version

The required version.

null|string $msg

The message related to this reasoning. If this parameter is set to null the message is fetched from the MessageLocator attached to the result instance related to this instance.

array $data

An array of additional data passed to the MessageFormatter

toArray()

toArray() : array

Array representation of this object

This method creates an array representation of this object including all keys that would be available through offsetGet.

Returns

array

jsonSerialize()

jsonSerialize() : mixed

(PHP 5 &gt;= 5.4.0)<br/> Specify data which should be serialized to JSON

Returns

mixed —

data which can be serialized by json_encode, which is a value of any type other than a resource.

get()

get(string  $name) : array|integer|null|string

Parameters

string $name

Returns

array|integer|null|string

offsetExists()

offsetExists(integer|string  $offset) : boolean

Parameters

integer|string $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : array|integer|null|string

Parameters

mixed $offset

Returns

array|integer|null|string

offsetSet()

offsetSet(mixed  $offset, mixed  $value) 

Parameters

mixed $offset
mixed $value

Throws

\Exception

offsetUnset()

offsetUnset(mixed  $offset) 

Parameters

mixed $offset

Throws

\Exception

getResult()

getResult() : \Pvra\AnalysisResult

Get the related result

Returns

\Pvra\AnalysisResult