Property | Type | Description | |
---|---|---|---|
$errors | |||
$id | string | Resource ID. | |
$partial_record | boolean | Property that will allow subset of data to be updated on the resource. | |
$update_only | boolean | Property that will prevent a model being created if its set to true. | |
$warn_errors | boolean | Flag that will force all errors on the resource to be mapped to warnings. | |
$warnings |
Property | Type | Description | |
---|---|---|---|
$assignment | |||
$resource_type | |||
$schema | |||
$version |
Method | Description | |
---|---|---|
__construct ( $version, array $options = [] ) | BaseResource constructor. | |
addAuditData ( $key, $value ) | Add to audit data property. | |
assignProperty ( $model, $model_key, $resource_key ) | ||
audit ( $audit_type, null $data = null, null $msg = null, array $properties = [] ) | Wrapper for auditing calls on resource changes. | |
fromResourceId ( $version, $id ) : |
Instantiate the resource from the external ID. | |
fromXml ( $version, $xml, array $options = [] ) : null | |
Create an instance from an XML string. | |
fromXmlDom ( $version, DOMElement $element, array $options = [] ) : static | instantiates a resource with the given XML Document. | |
getAssignedProperty ( $name ) | ||
getAssignment ( ) : |
||
getAuditData ( ) : string | Returns the json encoded audit data for logging. | |
getAuditTarget ( ) : string | Simple wrapper to retrieve a type for auditing. | |
parseXml ( DOMElement $root, $options = [] ) | Parses XML to define resource attributes. | |
remapValues ( $doc, |
Update the given doc nodes as per the provided remaps. | |
setAssignment ( |
||
shouldValidateRequired ( ) : boolean | ||
validate ( ) : boolean | Base validator of resource from schema definition. |
Method | Description | |
---|---|---|
addError ( $msg ) | Error logger. | |
addModelErrors ( $errors ) | Convenience wrapper for handling model validation errors. | |
addWarning ( $msg ) | Warning logger. | |
errorInit ( $version, $errors ) : static | Convenience function to create a resource instance with error messages. | |
getInstanceForClass ( $class, $args = [] ) : mixed | Abstraction for getting instance of class. | |
getSchema ( $version ) : mixed | Get the schema for the resource type based on the given version. | |
startTransaction ( ) : CDbTransaction | null | Wrapper for starting a transaction. |
public __construct ( $version, array $options = [] ) | ||
$version | ||
$options | array |
public addAuditData ( $key, $value ) | ||
$key | ||
$value |
protected addModelErrors ( $errors ) | ||
$errors |
public assignProperty ( $model, $model_key, $resource_key ) | ||
$model | ||
$model_key | ||
$resource_key |
protected static errorInit ( $version, $errors ) : static | ||
$errors | array | |
return | static |
public static fromResourceId ( $version, $id ) : |
||
$version | ||
$id | ||
return |
public static fromXmlDom ( $version, DOMElement $element, array $options = [] ) : static | ||
$version | ||
$element | DOMElement | \DOMElement |
$options | array | |
return | static |
public getAssignment ( ) : |
||
return |
public getAuditData ( ) : string | ||
return | string |
public getAuditTarget ( ) : string | ||
return | string |
protected getInstanceForClass ( $class, $args = [] ) : mixed | ||
$class | ||
return | mixed |
public parseXml ( DOMElement $root, $options = [] ) | ||
$root | DOMElement |
public static remapValues ( $doc, |
||
$doc | ||
$remaps |
public setAssignment ( |
||
$assignment |
protected startTransaction ( ) : CDbTransaction | null | ||
return | CDbTransaction | null |
protected PasApiAssignment,OEModule\PASAPI\models $assignment | ||
return |
public bool $partial_record | ||
return | boolean |
public bool $update_only | ||
return | boolean |
public bool $warn_errors | ||
return | boolean |