original_string: public function entity(Entity $entity, Array $linkRelations = array()) {
      if (!isset($this->meta['links']))
        $this->meta['links'] = array();
        
      foreach ($linkRelations as $linkRelation) {
        $this->meta['links'][] = (object) array(
          'rel'=>$linkRelation->getName(),
          'href'=>$linkRelation->getHref()
        );
      }
      
      return $this;
    }
code: public function entity(Entity $entity, Array $linkRelations = array()) {
      if (!isset($this->meta['links']))
        $this->meta['links'] = array();
        
      foreach ($linkRelations as $linkRelation) {
        $this->meta['links'][] = (object) array(
          'rel'=>$linkRelation->getName(),
          'href'=>$linkRelation->getHref()
        );
      }
      
      return $this;
    }
code_tokens: public function entity ( Entity $ entity , Array $ linkRelations = array ( ) ) { if ( ! isset ( $ this -> meta [ 'links' ] ) ) $ this -> meta [ 'links' ] = array ( ) ; foreach ( $ linkRelations as $ linkRelation ) { $ this -> meta [ 'links' ] [ ] = ( object ) array ( 'rel' => $ linkRelation -> getName ( ) , 'href' => $ linkRelation -> getHref ( ) ) ; } return $ this ; }
docstring: Adds metadata for the reponse from an Entity
  
  @param Psc\Net\Service\LinkRelation[] $linkRelations
docstring_tokens: Adds metadata for the reponse from an Entity