Net_NNTP
[ class tree: Net_NNTP ] [ index: Net_NNTP ] [ all elements ]

Source for file Client.php

Documentation is available at Client.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
  3. // +-----------------------------------------------------------------------+
  4. // |                                                                       |
  5. // |                  http://www.heino.gehlsen.dk/software/license         |
  6. // |                                                                       |
  7. // +-----------------------------------------------------------------------+
  8. // |                                                                       |
  9. // | This work (including software, documents, or other related items) is  |
  10. // | being provided by the copyright holders under the following license.  |
  11. // | By obtaining, using and/or copying this work, you (the licensee)      |
  12. // | agree that you have read, understood, and will comply with the        |
  13. // | following terms and conditions:                                       |
  14. // |                                                                       |
  15. // | Permission to use, copy, modify, and distribute this software and     |
  16. // | its documentation, with or without modification, for any purpose and  |
  17. // | without fee or royalty is hereby granted, provided that you include   |
  18. // | the following on ALL copies of the software and documentation or      |
  19. // | portions thereof, including modifications, that you make:             |
  20. // |                                                                       |
  21. // | 1. The full text of this NOTICE in a location viewable to users of    |
  22. // |    the redistributed or derivative work.                              |
  23. // |                                                                       |
  24. // | 2. Any pre-existing intellectual property disclaimers, notices, or    |
  25. // |    terms and conditions. If none exist, a short notice of the         |
  26. // |    following form (hypertext is preferred, text is permitted) should  |
  27. // |    be used within the body of any redistributed or derivative code:   |
  28. // |     http://www.heino.gehlsen.dk/software/license"                     |
  29. // |                                                                       |
  30. // | 3. Notice of any changes or modifications to the files, including     |
  31. // |    the date changes were made. (We recommend you provide URIs to      |
  32. // |    the location from which the code is derived.)                      |
  33. // |                                                                       |
  34. // | THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT    |
  35. // | HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,    |
  36. // | INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR        |
  37. // | FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE    |
  38. // | OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,           |
  39. // | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.                               |
  40. // |                                                                       |
  41. // | COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,        |
  42. // | SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE        |
  43. // | SOFTWARE OR DOCUMENTATION.                                            |
  44. // |                                                                       |
  45. // | The name and trademarks of copyright holders may NOT be used in       |
  46. // | advertising or publicity pertaining to the software without specific, |
  47. // | written prior permission. Title to copyright in this software and any |
  48. // | associated documentation will at all times remain with copyright      |
  49. // | holders.                                                              |
  50. // |                                                                       |
  51. // +-----------------------------------------------------------------------+
  52. // |                                                                       |
  53. // | except for the references to the copyright holder, which has either   |
  54. // | been changes or removed.                                              |
  55. // |                                                                       |
  56. // +-----------------------------------------------------------------------+
  57. // $Id: Client.php,v 1.5 2005/01/14 20:01:00 heino Exp $
  58.  
  59. require_once 'Net/NNTP/Protocol/Client.php';
  60. require_once 'Net/NNTP/Header.php';
  61. require_once 'Net/NNTP/Message.php';
  62.  
  63.  
  64. // {{{ constants
  65.  
  66. /* NNTP Authentication modes */
  67. define('NET_NNTP_CLIENT_AUTH_ORIGINAL''original');
  68. define('NET_NNTP_CLIENT_AUTH_SIMPLE',   'simple');
  69. define('NET_NNTP_CLIENT_AUTH_GENERIC',  'generic');
  70.  
  71. // }}}
  72. // {{{ Net_NNTP_Client
  73.  
  74. /**
  75.  * Implementation of the client side of NNTP (Network News Transfer Protocol)
  76.  *
  77.  * The Net_NNTP_Client class is a frontend class to the Net_NNTP_Protocol_Client class.
  78.  *
  79.  * @category   Net
  80.  * @package    Net_NNTP
  81.  * @author     Heino H. Gehlsen <heino@gehlsen.dk>
  82.  * @version    $Id: Client.php,v 1.5 2005/01/14 20:01:00 heino Exp $
  83.  * @access     public
  84.  * @see        Net_NNTP_Protocol_Client
  85.  * @since      Class available since Release 0.11.0
  86.  */
  87. {
  88.     // {{{ properties
  89.  
  90.     /**
  91.      * Used for storing information about the currently selected group
  92.      *
  93.      * @var array 
  94.      * @access private
  95.      * @since 0.3
  96.      */
  97.     var $_currentGroup = null;
  98.  
  99.     // }}}
  100.     // {{{ constructor
  101.  
  102.     /**
  103.      * Constructor
  104.      *
  105.      * @access public
  106.      */
  107.     function Net_NNTP_Client()
  108.     {
  109.         parent::Net_NNTP_Protocol_Client();
  110.     }
  111.  
  112.     // }}}
  113.     // {{{ connect()
  114.  
  115.     /**
  116.      * Connect to the NNTP-server.
  117.      *
  118.      * @param optional string $host The adress of the NNTP-server to connect to.
  119.      * @param optional int $port The port to connect to.
  120.      *
  121.      * @return mixed (bool) true on success or (object) pear_error on failure
  122.      * @access public
  123.      * @see Net_NNTP_Client::quit()
  124.      * @see Net_NNTP_Client::authenticate()
  125.      * @see Net_NNTP_Client::connectAuthenticated()
  126.      */
  127.     function connect($host = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_HOST,
  128.                      $port = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_PORT)
  129.     {
  130.         return parent::connect($host$port);
  131.     }
  132.  
  133.     // }}}
  134.     // {{{ connectAuthenticated()
  135.  
  136.     /**
  137.      * Connect to the NNTP-server, and authenticate using given username and password.
  138.      *
  139.      * @param optional string $user The username.
  140.      * @param optional string $pass The password.
  141.      * @param optional string $host The IP-address of the NNTP-server to connect to.
  142.      * @param optional int $port The port to connect to.
  143.      * @param optional string $authmode The authentication mode.
  144.      *
  145.      * @return mixed (bool) true on success or (object) pear_error on failure
  146.      * @access public
  147.      * @since 0.3
  148.      * @deprecated use connect() and authenticate() instead
  149.      * @see Net_NNTP_Client::connect()
  150.      * @see Net_NNTP_Client::authenticate()
  151.      * @see Net_NNTP_Client::quit()
  152.      */
  153.     function connectAuthenticated($user = null,
  154.                                   $pass = null,
  155.                                   $host = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_HOST,
  156.                                   $port = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_PORT,
  157.                                   $authmode = NET_NNTP_CLIENT_AUTH_ORIGINAL)
  158.     {
  159.     $R $this->connect($host$port);
  160.     if (PEAR::isError($R)) {
  161.         return $R;
  162.     }
  163.  
  164.     // Authenticate if username is given
  165.     if ($user != null{
  166.             $R $this->authenticate($user$pass$authmode);
  167.             if (PEAR::isError($R)) {
  168.                 return $R;
  169.             }
  170.     }
  171.  
  172.         return true;
  173.     }
  174.  
  175.     // }}}
  176.     // {{{ quit()
  177.  
  178.     /**
  179.      * Close connection to the newsserver
  180.      *
  181.      * @access public
  182.      * @see Net_NNTP_Client::connect()
  183.      */
  184.     function quit()
  185.     {
  186.         return $this->cmdQuit();
  187.     }
  188.  
  189.     // }}}
  190.     // {{{ authenticate()
  191.  
  192.     /**
  193.      * Authenticate
  194.      * 
  195.      * Auth process (not yet standarized but used any way)
  196.      * http://www.mibsoftware.com/userkt/nntpext/index.html
  197.      *
  198.      * @param string $user The username
  199.      * @param optional string $pass The password
  200.      * @param optional string $mode The authentication mode (original, simple, generic).
  201.      *
  202.      * @return mixed (bool) true on success or (object) pear_error on failure
  203.      * @access public
  204.      * @see Net_NNTP_Client::connect()
  205.      * @see Net_NNTP_Client::connectAuthenticated()
  206.      */
  207.     function authenticate($user$pass$mode = NET_NNTP_CLIENT_AUTH_ORIGINAL)
  208.     {
  209.         // Username is a must...
  210.         if ($user == null{
  211.             return PEAR::throwError('No username supplied'null);
  212.         }
  213.  
  214.         // Use selected authentication method
  215.         switch ($mode{
  216.             case NET_NNTP_CLIENT_AUTH_ORIGINAL:
  217.                 return $this->cmdAuthinfo($user$pass);
  218.                 break;
  219.             case NET_NNTP_CLIENT_AUTH_SIMPLE:
  220.                 return $this->cmdAuthinfoSimple($user$pass);
  221.                 break;
  222.             case NET_NNTP_CLIENT_AUTH_GENERIC:
  223.                 return $this->cmdAuthinfoGeneric($user$pass);
  224.                 break;
  225.             default:
  226.                 return PEAR::throwError("The auth mode: '$mode' is unknown"null);
  227.         }
  228.     }
  229.  
  230.     // }}}
  231.     // {{{ isConnected()
  232.  
  233.     /**
  234.      * Test whether a connection is currently open.
  235.      *
  236.      * @return bool true or false
  237.      * @access public
  238.      * @see Net_NNTP_Client::connect()
  239.      * @see Net_NNTP_Client::quit()
  240.      */
  241.     function isConnected()
  242.     {
  243.         return parent::isConnected();
  244.     }
  245.  
  246.     // }}}
  247.     // {{{ selectGroup()
  248.  
  249.     /**
  250.      * Selects a newsgroup
  251.      *
  252.      * @param string $newsgroup Newsgroup name
  253.      *
  254.      * @return mixed (array) Info about the newsgroup on success or (object) pear_error on failure
  255.      * @access public
  256.      * @see Net_NNTP_Client::group()
  257.      * @see Net_NNTP_Client::first()
  258.      * @see Net_NNTP_Client::last()
  259.      * @see Net_NNTP_Client::count()
  260.      * @see Net_NNTP_Client::getGroups()
  261.      */
  262.     function selectGroup($newsgroup)
  263.     {
  264.         $response_arr $this->cmdGroup($newsgroup);
  265.         if (PEAR::isError($response_arr)) {
  266.             return $response_arr;
  267.         }
  268.  
  269.         // Store group info in the object
  270.         $this->_currentGroup $response_arr;
  271.  
  272.         return $response_arr;
  273.     }
  274.  
  275.     // }}}
  276.     // {{{ getGroups()
  277.  
  278.     /**
  279.      * Fetches a list of all avaible newsgroups
  280.      *
  281.      * @return mixed (array) nested array with informations about existing newsgroups on success or (object) pear_error on failure
  282.      * @access public
  283.      * @see Net_NNTP_Client::selectGroup()
  284.      * @see Net_NNTP_Client::getDescriptions()
  285.      */
  286.     function getGroups()
  287.     {
  288.         // Get groups
  289.         $groups $this->cmdList();
  290.         if (PEAR::isError($groups)) {
  291.             return $groups;
  292.         }
  293.  
  294.         return $groups;
  295.     }
  296.  
  297.     // }}}
  298.     // {{{ getDescriptions()
  299.  
  300.     /**
  301.      * Fetches a list of all avaible newsgroup descriptions.
  302.      *
  303.      * @return mixed (array) nested array with description of existing newsgroups on success or (object) pear_error on failure
  304.      * @access public
  305.      * @see Net_NNTP_Client::getGroups()
  306.      */
  307.     function getDescriptions()
  308.     {
  309.         // Get group descriptions
  310.         $descriptions $this->cmdListNewsgroups();
  311.         if (PEAR::isError($descriptions)) {
  312.             return $descriptions;
  313.         }
  314.     
  315.         return $descriptions;
  316.     }
  317.  
  318.     // }}}
  319.     // {{{ getOverview()
  320.  
  321.     /**
  322.      * Fetch message header fields from message number $first to $last
  323.      *
  324.      * The format of the returned array is:
  325.      * $messages[message_id][header_name]
  326.      *
  327.      * @param integer $first first article to fetch
  328.      * @param integer $last  last article to fetch
  329.      *
  330.      * @return mixed (array) nested array of message and their headers on success or (object) pear_error on failure
  331.      * @access public
  332.      * @see Net_NNTP_Client::getOverviewFormat()
  333.      * @see Net_NNTP_Client::getReferencesOverview()
  334.      */
  335.     function getOverview($first$last)
  336.     {
  337.         $overview $this->cmdXOver($first.'-'.$last);
  338.         if (PEAR::isError($overview)) {
  339.             return $overview;
  340.         }
  341.     
  342.         return $overview;
  343.     }
  344.  
  345.     // }}}
  346.     // {{{ getOverviewFmt()
  347.  
  348.     /**
  349.      * Returns a list of avaible headers which are send from NNTP-server to the client for every news message
  350.      *
  351.      * @return mixed (array) header names on success or (object) pear_error on failure
  352.      * @access public
  353.      * @see Net_NNTP_Client::getOverview()
  354.      */
  355.     function getOverviewFormat()
  356.     {
  357.         return $this->cmdListOverviewFmt();
  358.     }
  359.  
  360.     // }}}
  361.     // {{{ getReferencesOverview()
  362.  
  363.     /**
  364.      * Fetch a list of each message's reference header.
  365.      *
  366.      * @param integer $first first article to fetch
  367.      * @param integer $last  last article to fetch
  368.      *
  369.      * @return mixed (array) nested array of references on success or (object) pear_error on failure
  370.      * @access public
  371.      * @see Net_NNTP_Client::getOverview()
  372.      */
  373.     function getReferencesOverview($first$last)
  374.     {
  375.         $overview $this->cmdXROver($first.'-'.$last);
  376.         if (PEAR::isError($overview)) {
  377.             return $overview;
  378.         }
  379.     
  380.         return $overview;
  381.     }
  382.  
  383.     // }}}
  384.     // {{{ post()
  385.  
  386.     /**
  387.      * Post an article to a number of newsgroups.
  388.      *
  389.      * (Among the aditional headers you might think of adding could be:
  390.      * "NNTP-Posting-Host: <ip-of-author>", which should contain the IP-address
  391.      * of the author of the post, so the message can be traced back to him.
  392.      * Or "Organization: <org>" which contain the name of the organization
  393.      * the post originates from)
  394.      *
  395.      * @param string $newsgroups The newsgroup to post to.
  396.      * @param string $subject The subject of the post.
  397.      * @param string $body The body of the post itself.
  398.      * @param string $from Name + email-adress of sender.
  399.      * @param optional string $aditional Aditional headers to send.
  400.      *
  401.      * @return mixed (string) server response on success or (object) pear_error on failure
  402.      * @access public
  403.      */
  404.     function post($newsgroups$subject$body$from$aditional = null)
  405.     {
  406.         return $this->cmdPost($newsgroups$subject$body$from$aditional);
  407.     }
  408.  
  409.     // }}}
  410.     // {{{ getArticle()
  411.  
  412.     /**
  413.      * Get an article
  414.      *
  415.      * Experimental
  416.      *
  417.      * The v0.2 version of the this function (which returned the article as a string) has been renamed to getArticleRaw().
  418.      *
  419.      * @param mixed $article Either the message-id or the message-number on the server of the article to fetch.
  420.      *
  421.      * @return mixed (object) message object on success or (object) pear_error on failure
  422.      * @access public
  423.      * @see Net_NNTP_Client::getArticleRaw()
  424.      * @see Net_NNTP_Client::getHeader()
  425.      * @see Net_NNTP_Client::getBody()
  426.      */
  427.     function getArticle($article)
  428.     {
  429.         $message $this->getArticleRaw($articlefalse);
  430.         if (PEAR::isError($message)) {
  431.             return $data;
  432.         }
  433.     
  434.         $M Net_NNTP_Message::create($message);
  435.     
  436.         return $M;
  437.     }
  438.  
  439.     // }}}
  440.     // {{{ getArticleRaw()
  441.  
  442.     /**
  443.      * Get a article (raw data)
  444.      *
  445.      * @param mixed $article Either the message-id or the message-number on the server of the article to fetch.
  446.      * @param optional bool  $implode When true the result array is imploded to a string, defaults to false.
  447.      *
  448.      * @return mixed (array/string) The article on success or (object) pear_error on failure
  449.      * @access public
  450.      * @see Net_NNTP_Client::getArticle()
  451.      * @see Net_NNTP_Client::getHeaderRaw()
  452.      * @see Net_NNTP_Client::getBodyRaw()
  453.      */
  454.     function getArticleRaw($article$implode = false)
  455.     {
  456.         $data $this->cmdArticle($article);
  457.         if (PEAR::isError($data)) {
  458.             return $data;
  459.         }
  460.  
  461.         if ($implode == true{
  462.             $data implode("\r\n"$data);
  463.         }
  464.  
  465.         return $data;
  466.     }
  467.  
  468.     // }}}
  469.     // {{{ getHeader()
  470.  
  471.     /**
  472.      * Get the header of an article
  473.      *
  474.      * Experimental
  475.      *
  476.      * @param mixed $article Either the (string) message-id or the (int) message-number on the server of the article to fetch.
  477.      *
  478.      * @return mixed (object) header object on success or (object) pear_error on failure
  479.      * @access public
  480.      * @see Net_NNTP_Client::getHeaderRaw()
  481.      * @see Net_NNTP_Client::getArticle()
  482.      * @see Net_NNTP_Client::getBody()
  483.      */
  484.     function getHeader($article)
  485.     {
  486.         $header $this->getHeaderRaw($articlefalse);
  487.         if (PEAR::isError($header)) {
  488.             return $header;
  489.         }
  490.  
  491.         $H Net_NNTP_Header::create($header);
  492.  
  493.         return $H;
  494.     }
  495.  
  496.     // }}}
  497.     // {{{ getHeaderRaw()
  498.  
  499.     /**
  500.      * Get the header of an article (raw data)
  501.      *
  502.      * @param mixed $article Either the (string) message-id or the (int) message-number on the server of the article to fetch.
  503.      * @param optional bool $implode When true the result array is imploded to a string, defaults to false.
  504.      *
  505.      * @return mixed (array/string) header fields on success or (object) pear_error on failure
  506.      * @access public
  507.      * @see Net_NNTP_Client::getHeader()
  508.      * @see Net_NNTP_Client::getArticleRaw()
  509.      * @see Net_NNTP_Client::getBodyRaw()
  510.      */
  511.     function getHeaderRaw($article$implode = false)
  512.     {
  513.         $data $this->cmdHead($article);
  514.         if (PEAR::isError($data)) {
  515.             return $data;
  516.         }
  517.  
  518.         if ($implode == true{
  519.             $data implode("\r\n"$data);
  520.         }
  521.  
  522.         return $data;
  523.     }
  524.  
  525.     // }}}
  526.     // {{{ getBody()
  527.  
  528.     // Not written yet...
  529.  
  530.     // }}}
  531.     // {{{ getBodyRaw()
  532.  
  533.     /**
  534.      * Get the body of an article (raw data)
  535.      *
  536.      * @param mixed $article Either the message-id or the message-number on the server of the article to fetch.
  537.      * @param optional bool $implode When true the result array is imploded to a string, defaults to false.
  538.      *
  539.      * @return mixed (array/string) body on success or (object) pear_error on failure
  540.      * @access public
  541.      * @see Net_NNTP_Client::getBody()
  542.      * @see Net_NNTP_Client::getHeaderRaw()
  543.      * @see Net_NNTP_Client::getArticleRaw()
  544.      */
  545.     function getBodyRaw($article$implode = false)
  546.     {
  547.         $data $this->cmdBody($article);
  548.         if (PEAR::isError($data)) {
  549.             return $data;
  550.         }
  551.     
  552.         if ($implode == true{
  553.             $data implode("\r\n"$data);
  554.         }
  555.     
  556.         return $data;
  557.     }
  558.  
  559.     // }}}
  560.     // {{{ getGroupArticles()
  561.  
  562.     /**
  563.      * Experimental
  564.      *
  565.      * @access public
  566.      * @since 0.3
  567.      */
  568.     function getGroupArticles($newsgroup)
  569.     {
  570.         return $this->cmdListgroup($newsgroup);
  571.     }
  572.  
  573.     // }}}
  574.     // {{{ getNewGroups()
  575.  
  576.     /**
  577.      * Experimental
  578.      *
  579.      * @access public
  580.      * @since 0.3
  581.      */
  582.     function getNewGroups($time$distributions = null)
  583.     {
  584.         switch (gettype($time)) {
  585.             case 'integer':
  586.                 break;
  587.             case 'string':
  588.                 $time = (int) strtotime($time);
  589.                 break;
  590.             default:
  591.                 return PEAR::throwError('UPS...');
  592.         }
  593.  
  594.         return $this->cmdNewgroups($time$distributions);
  595.     }
  596.  
  597.     // }}}
  598.     // {{{ getNewNews()
  599.  
  600.     /**
  601.      * Experimental
  602.      *
  603.      * @access public
  604.      * @since 0.3
  605.      */
  606.     function getNewNews($time$newsgroups '*')
  607.     {
  608.         switch (gettype($time)) {
  609.             case 'integer':
  610.                 break;
  611.             case 'string':
  612.                 $time = (int) strtotime($time);
  613.                 break;
  614.             default:
  615.                 return PEAR::throwError('UPS...');
  616.         }
  617.  
  618.         return $this->cmdNewnews($time$newsgroups);
  619.     }
  620.  
  621.     // }}}
  622.     // {{{ getDate()
  623.  
  624.     /**
  625.      * Get the NNTP-server's internal date
  626.      *
  627.      * Get the date from the newsserver format of returned date:
  628.      *
  629.      * @param optional int $format
  630.      *   - 0: $date - timestamp
  631.      *   - 1: $date['y'] - year
  632.      *        $date['m'] - month
  633.      *        $date['d'] - day
  634.      *
  635.      * @return mixed (mixed) date on success or (object) pear_error on failure
  636.      * @access public
  637.      * @since 0.3
  638.      */
  639.     function getDate($format = 1)
  640.     {
  641.         $date $this->cmdDate();
  642.         if (PEAR::isError($date)) {
  643.             return $date;
  644.         }
  645.  
  646.         switch ($format{
  647.             case 1:
  648.                 return array('y' => substr($date04)'m' => substr($date42)'d' => substr($date62));
  649.                 break;
  650.  
  651.             case 0:
  652.             default:
  653.                 return $date;
  654.                 break;
  655.         }
  656.     }
  657.  
  658.     // }}}
  659.     // {{{ count()
  660.  
  661.     /**
  662.      * Number of articles in currently selected group
  663.      *
  664.      * @return integer number of article in group
  665.      * @access public
  666.      * @since 0.3
  667.      * @see Net_NNTP_Client::group()
  668.      * @see Net_NNTP_Client::first()
  669.      * @see Net_NNTP_Client::last()
  670.      * @see Net_NNTP_Client::selectGroup()
  671.      */
  672.     function count()
  673.     {
  674.         return $this->_currentGroup['count'];
  675.     }
  676.  
  677.     // }}}
  678.     // {{{ last()
  679.  
  680.     /**
  681.      * Maximum article number in currently selected group
  682.      *
  683.      * @return integer number of last article
  684.      * @access public
  685.      * @since 0.3
  686.      * @see Net_NNTP_Client::first()
  687.      * @see Net_NNTP_Client::group()
  688.      * @see Net_NNTP_Client::count()
  689.      * @see Net_NNTP_Client::selectGroup()
  690.      */
  691.     function last()
  692.     {
  693.         return $this->_currentGroup['last'];
  694.     }
  695.  
  696.     // }}}
  697.     // {{{ first()
  698.  
  699.     /**
  700.      * Minimum article number in currently selected group
  701.      *
  702.      * @return integer number of first article
  703.      * @access public
  704.      * @since 0.3
  705.      * @see Net_NNTP_Client::last()
  706.      * @see Net_NNTP_Client::group()
  707.      * @see Net_NNTP_Client::count()
  708.      * @see Net_NNTP_Client::selectGroup()
  709.      */
  710.     function first()
  711.     {
  712.         return $this->_currentGroup['first'];
  713.     }
  714.  
  715.     // }}}
  716.     // {{{ group()
  717.  
  718.     /**
  719.      * Currently selected group
  720.      *
  721.      * @return string group name
  722.      * @access public
  723.      * @since 0.3
  724.      * @see Net_NNTP_Client::first()
  725.      * @see Net_NNTP_Client::last()
  726.      * @see Net_NNTP_Client::count()
  727.      * @see Net_NNTP_Client::selectGroup()
  728.      */
  729.     function group()
  730.     {
  731.         return $this->_currentGroup['group'];
  732.     }
  733.  
  734.     // }}}
  735. }
  736.  
  737. // }}}
  738.  
  739. ?>

Documentation generated on Mon, 11 Mar 2019 14:13:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.