public function setRelationshipsObject(RelationshipsObject $relationshipsObject, array $options=[]) {
		$this->ensureResourceObject();
		
		$options = array_merge(self::$defaults, $options);
		
		$this->resource->setRelationshipsObject($relationshipsObject);
		
		if ($options['includeContainedResources']) {
			$this->addIncludedResourceObject(...$relationshipsObject->getNestedContainedResourceObjects());
		}
	}
public function setRelationshipsObject(RelationshipsObject $relationshipsObject, array $options=[]) {
		$this->ensureResourceObject();
		
		$options = array_merge(self::$defaults, $options);
		
		$this->resource->setRelationshipsObject($relationshipsObject);
		
		if ($options['includeContainedResources']) {
			$this->addIncludedResourceObject(...$relationshipsObject->getNestedContainedResourceObjects());
		}
	}
public function setRelationshipsObject ( RelationshipsObject $ relationshipsObject , array $ options = [ ] ) { $ this -> ensureResourceObject ( ) ; $ options = array_merge ( self :: $ defaults , $ options ) ; $ this -> resource -> setRelationshipsObject ( $ relationshipsObject ) ; if ( $ options [ 'includeContainedResources' ] ) { $ this -> addIncludedResourceObject ( ... $ relationshipsObject -> getNestedContainedResourceObjects ( ) ) ; } }
set the RelationshipsObject to the resource

adds included resources if found inside the RelationshipObjects inside the RelationshipsObject, unless $options['includeContainedResources'] is set to false

@param RelationshipsObject $relationshipsObject
@param array               $options             optional {@see ResourceDocument::$defaults}
set the RelationshipsObject to the resource