public function toObject($object_to_fill = null, $props_to_skip = array()) { if (is_null($this->operationAttributes) || !count($this->operationAttributes)) { return $this->resource->toObject(); } if (!$object_to_fill) { $object_to_fill = new kOperationResource(); } $operationAttributes = array(); foreach ($this->operationAttributes as $operationAttributesObject) { $operationAttributes[] = $operationAttributesObject->toObject(); } $object_to_fill->setOperationAttributes($operationAttributes); $object_to_fill->setResource($this->resource->toObject()); return parent::toObject($object_to_fill, $props_to_skip); }