public function addResource(ResourceInterface $resource) {
		if ($this->type === RelationshipObject::TO_ONE) {
			throw new InputException('can not add a resource to a to-one relationship, use ->setResource()');
		}
		
		$this->resources[] = $resource;
	}
public function addResource(ResourceInterface $resource) {
		if ($this->type === RelationshipObject::TO_ONE) {
			throw new InputException('can not add a resource to a to-one relationship, use ->setResource()');
		}
		
		$this->resources[] = $resource;
	}
public function addResource ( ResourceInterface $ resource ) { if ( $ this -> type === RelationshipObject :: TO_ONE ) { throw new InputException ( 'can not add a resource to a to-one relationship, use ->setResource()' ) ; } $ this -> resources [ ] = $ resource ; }
add a resource to a to-many relationship

@param ResourceInterface $resource

@throws InputException if used on a to-one relationship, use {@see ->setResource()} instead
add a resource to a to - many relationship