Update of /cvsroot/sieve-php/sieve-php
In directory sc8-pr-cvs1:/tmp/cvs-serv5483
Modified Files:
sieve-php.lib.php
Log Message:
More docblock updates
Index: sieve-php.lib.php
===================================================================
RCS file: /cvsroot/sieve-php/sieve-php/sieve-php.lib.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sieve-php.lib.php 5 Nov 2003 17:33:51 -0000 1.1
--- sieve-php.lib.php 5 Nov 2003 18:40:29 -0000 1.2
***************
*** 47,54 ****
* $sieve->error_raw, and successful responses in $sieve->responses.
*
* @author Dan Ellis
! * @example doc/example.php
* @version 0.1.0cvs
* @package sieve-php
*/
class sieve {
--- 47,76 ----
* $sieve->error_raw, and successful responses in $sieve->responses.
*
+ * NOTE: a major change since version (0.0.5) is the inclusion of a standard
+ * method to retrieve server responses. All functions will return either true
+ * or false and will fill in $sieve->error with a defined error code like
+ * EC_QUOTA, raw server errors in $sieve->error_raw, and successful responses
+ * in $sieve->responses.
+ *
+ * Usage is pretty simple. The basics is login, do what you need and logout.
+ * There are two sample files (which suck) test.php and testsieve.php.
+ * test.php allows you to create/delete/view scripts and testsieve.php is a
+ * very basic sieve server test.
+ *
+ * Please let us know of any bugs, problems or ideas at sieve-php development
+ * list: sie...@li.... A web interface to subscribe
+ * to this list is available at:
+ * https://lists.sourceforge.net/mailman/listinfo/sieve-php-devel
+ *
* @author Dan Ellis
! * @example simple_example.php A simple example that shows usage of sieve-php
! * class.
! * @example vacationset-sieve.php A more elaborate example of vacation script
! * handling.
* @version 0.1.0cvs
* @package sieve-php
+ * @todo Maybe add the NOOP function.
+ * @todo Have timing mechanism when port problems arise.
+ * @todo Provide better error diagnostics.
*/
class sieve {
***************
*** 223,226 ****
--- 245,254 ----
* (ex. "PLAIN DIGEST-MD5 CRAM-MD5" The method the library will try first
* is PLAIN.) The default for this value is PLAIN.
+ *
+ * Note: $user, if included, is the account name (and $pass will be the
+ * password) of an administrator account that can act on behalf of the user.
+ * If you are using Cyrus, you must make sure that the admin account has
+ * rights to admin the user. This is to allow admins to edit/view users
+ * scripts without having to know the user's password. Very handy.
*/
function sieve($host, $port, $user, $pass, $auth="", $auth_types='PLAIN') {
***************
*** 282,285 ****
--- 310,316 ----
*
* This should probably be replaced by a smarter parser.
+ *
+ * @param $string string Input that contains status responses.
+ * @todo remove this function and dependencies
*/
function status($string) {
***************
*** 310,316 ****
/**
! * This function will attemp to log into the sieve server. It will return
! * false if it fails, true if all is well. This also loads some arrays up
! * with some handy information:
*
* capabilities["implementation"] contains the sieve version information
--- 341,348 ----
/**
! * Attemp to log in to the sieve server.
! *
! * It will return false if it fails, true if all is well. This also loads
! * some arrays up with some handy information:
*
* capabilities["implementation"] contains the sieve version information
***************
*** 328,337 ****
* may have sent
*
! * Note: $authuser, if included, is the account name (and $acctpass will
! * be the password) of an administrator account that can act on behalf of the
! * user. If you are using Cyrus, you must make sure that the admin account
! * has rights to admin the user. This is to allow admins to edit/view users
! * scripts without having to know the user's password. Very handy.
! *
*/
function sieve_login() {
--- 360,364 ----
* may have sent
*
! * @return boolean
*/
function sieve_login() {
***************
*** 442,447 ****
* @return boolean Always returns true at this point.
*/
! function sieve_logout()
! {
if($this->loggedin==false)
return false;
--- 469,473 ----
* @return boolean Always returns true at this point.
*/
! function sieve_logout() {
if($this->loggedin==false)
return false;
***************
*** 464,469 ****
* @return boolean Returns true if script has been successfully uploaded.
*/
! function sieve_sendscript($scriptname, $script)
! {
if($this->loggedin==false)
return false;
--- 490,494 ----
* @return boolean Returns true if script has been successfully uploaded.
*/
! function sieve_sendscript($scriptname, $script) {
if($this->loggedin==false)
return false;
***************
*** 492,495 ****
--- 517,521 ----
* @param $scriptsize integer The size of the SIEVE script.
* @return boolean
+ * @todo Does not work; bug fix and test.
*/
function sieve_havespace($scriptname, $scriptsize) {
***************
*** 600,603 ****
--- 626,631 ----
* Attempts to authenticate to SIEVE, using some SASL authentication method
* such as PLAIN or DIGEST-MD5.
+ *
+ * @todo Bugfix and test LOGIN authenticate code.
*/
function authenticate() {
|