* @package tao */ class tao_models_classes_service_VariableParameter extends tao_models_classes_service_Parameter { /** * @var core_kernel_classes_Resource */ private $variable; /** * Instantiates an new variable parameter * * @param core_kernel_classes_Resource $definition * @param core_kernel_classes_Resource $variable */ public function __construct(core_kernel_classes_Resource $definition, core_kernel_classes_Resource $variable) { parent::__construct($definition); $this->variable = $variable; } /** * Returns the variable proividing the value * for this parameter * * @return core_kernel_classes_Resource */ public function getVariable() { return $this->variable; } /** * (non-PHPdoc) * @see tao_models_classes_service_Parameter::serialize() */ public function toOntology(Ontology $model) { $serviceCallClass = $model->getClass(WfEngineOntology::CLASS_URI_ACTUAL_PARAMETER); $resource = $serviceCallClass->createInstanceWithProperties([ WfEngineOntology::PROPERTY_ACTUAL_PARAMETER_FORMAL_PARAMETER => $this->getDefinition(), WfEngineOntology::PROPERTY_ACTUAL_PARAMETER_PROCESS_VARIABLE => $this->variable ]); return $resource; } public function jsonSerialize() { return [ 'def' => $this->getDefinition()->getUri(), 'proc' => $this->getVariable()->getUri() ]; } }