original_string: public function url($object = null)
      {
          if (is_object($object)) {
              $objectIdField = $this->objectIdField;
  
              return $this->urlName . '/' . $object->$objectIdField;
          } elseif ($object) {
              return $this->urlName . '/' . $object;
          }
  
          return $this->urlName;
      }
code: public function url($object = null)
      {
          if (is_object($object)) {
              $objectIdField = $this->objectIdField;
  
              return $this->urlName . '/' . $object->$objectIdField;
          } elseif ($object) {
              return $this->urlName . '/' . $object;
          }
  
          return $this->urlName;
      }
code_tokens: public function url ( $ object = null ) { if ( is_object ( $ object ) ) { $ objectIdField = $ this -> objectIdField ; return $ this -> urlName . '/' . $ object -> $ objectIdField ; } elseif ( $ object ) { return $ this -> urlName . '/' . $ object ; } return $ this -> urlName ; }
docstring: Formats and returns a URL to an object or object id.
  
  @param null $object
  @return string
docstring_tokens: Formats and returns a URL to an object or object id .