public function linkTo(Service $service, $name = null)
    {
        $link = [
            'to_service' => $service->getResourceUri()
        ];

        if (!is_null($name)) {
            $link['name'] = $name;
        }

        $this->linked_to_service[] = $link;
    }
public function linkTo(Service $service, $name = null)
    {
        $link = [
            'to_service' => $service->getResourceUri()
        ];

        if (!is_null($name)) {
            $link['name'] = $name;
        }

        $this->linked_to_service[] = $link;
    }
public function linkTo ( Service $ service , $ name = null ) { $ link = [ 'to_service' => $ service -> getResourceUri ( ) ] ; if ( ! is_null ( $ name ) ) { $ link [ 'name' ] = $ name ; } $ this -> linked_to_service [ ] = $ link ; }
Add a service to link to this service

@param Service $service
@param string $name
Add a service to link to this service