original_string: public function insertPhotoEntry($photo, $uri = null)
      {
          if ($uri instanceof Zend_Gdata_Photos_AlbumEntry) {
              $uri = $uri->getLink(self::FEED_LINK_PATH)->href;
          }
          if ($uri === null) {
              require_once 'Zend/Gdata/App/InvalidArgumentException.php';
              throw new Zend_Gdata_App_InvalidArgumentException(
                      'URI must not be null');
          }
          $newEntry = $this->insertEntry($photo, $uri, 'Zend_Gdata_Photos_PhotoEntry');
          return $newEntry;
      }
code: public function insertPhotoEntry($photo, $uri = null)
      {
          if ($uri instanceof Zend_Gdata_Photos_AlbumEntry) {
              $uri = $uri->getLink(self::FEED_LINK_PATH)->href;
          }
          if ($uri === null) {
              require_once 'Zend/Gdata/App/InvalidArgumentException.php';
              throw new Zend_Gdata_App_InvalidArgumentException(
                      'URI must not be null');
          }
          $newEntry = $this->insertEntry($photo, $uri, 'Zend_Gdata_Photos_PhotoEntry');
          return $newEntry;
      }
code_tokens: public function insertPhotoEntry ( $ photo , $ uri = null ) { if ( $ uri instanceof Zend_Gdata_Photos_AlbumEntry ) { $ uri = $ uri -> getLink ( self :: FEED_LINK_PATH ) -> href ; } if ( $ uri === null ) { require_once 'Zend/Gdata/App/InvalidArgumentException.php' ; throw new Zend_Gdata_App_InvalidArgumentException ( 'URI must not be null' ) ; } $ newEntry = $ this -> insertEntry ( $ photo , $ uri , 'Zend_Gdata_Photos_PhotoEntry' ) ; return $ newEntry ; }
docstring: Create a new photo from a PhotoEntry.
  
  @param Zend_Gdata_Photos_PhotoEntry $photo The photo to insert.
  @param string $url The URI that the photo should be uploaded
  to. Alternatively, an AlbumEntry can be provided and the
  photo will be added to that album.
  @return Zend_Gdata_Photos_PhotoEntry The inserted photo entry
  as returned by the server.
  @throws Zend_Gdata_App_Exception
  @throws Zend_Gdata_App_HttpException
docstring_tokens: Create a new photo from a PhotoEntry .