cvs: pear /File_Passwd Passwd.php

From: Date: Tue, 23 Sep 2003 16:07:21 +0000
Subject: cvs: pear /File_Passwd Passwd.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13024@lists.php.net to get a copy of this message
mike Tue Sep 23 12:07:21 2003 EDT Modified files: /pear/File_Passwd Passwd.php Log: introduced error constants Index: pear/File_Passwd/Passwd.php diff -u pear/File_Passwd/Passwd.php:1.5 pear/File_Passwd/Passwd.php:1.6 --- pear/File_Passwd/Passwd.php:1.5 Sat Sep 20 10:28:10 2003 +++ pear/File_Passwd/Passwd.php Tue Sep 23 12:07:21 2003 @@ -15,18 +15,108 @@ // | Author: Rasmus Lerdorf <rasmus@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Passwd.php,v 1.5 2003/09/20 14:28:10 mike Exp $ -// +// $Id: Passwd.php,v 1.6 2003/09/23 16:07:21 mike Exp $ +/** +* Manipulate my kinds of passwd files. +* +* @author Rasmus Lerdorf <rasmus@php.net> +* @package File_Passwd +* @category FileSystem +*/ + +/** +* Requires PEAR. +*/ require_once('PEAR.php'); /** +* Undefined error. +*/ +define('FILE_PASSWD_E_UNDEFINED', 0); +/** +* Invalid file format. +*/ +define('FILE_PASSWD_E_INVALID_FORMAT', 1); +define('FILE_PASSWD_E_INVALID_FORMAT_STR', 'Passwd file has invalid format.'); +/** +* Invalid extra property. +*/ +define('FILE_PASSWD_E_INVALID_PROPERTY', 2); +define('FILE_PASSWD_E_INVALID_PROPERTY_STR', 'Invalid property \'%s\'.'); +/** +* Invalid characters. +*/ +define('FILE_PASSWD_E_INVALID_CHARS', 3); +define('FILE_PASSWD_E_INVALID_CHARS_STR', '%s\'%s\' contains illegal characters.'); +/** +* Invalid encryption mode. +*/ +define('FILE_PASSWD_E_INVALID_ENC_MODE', 4); +define('FILE_PASSWD_E_INVALID_ENC_MODE_STR', 'Encryption mode \'%s\' not supported.'); +/** +* Exists already. +*/ +define('FILE_PASSWD_E_EXISTS_ALREADY', 5); +define('FILE_PASSWD_E_EXISTS_ALREADY_STR', '%s\'%s\' already exists.'); +/** +* Exists not. +*/ +define('FILE_PASSWD_E_EXISTS_NOT', 6); +define('FILE_PASSWD_E_EXISTS_NOT_STR', '%s\'%s\' doesn\'t exist.'); +/** +* User not in group. +*/ +define('FILE_PASSWD_E_USER_NOT_IN_GROUP', 7); +define('FILE_PASSWD_E_USER_NOT_IN_GROUP_STR', 'User \'%s\' doesn\'t exist in group \'%s\'.'); +/** +* User not in realm. +*/ +define('FILE_PASSWD_E_USER_NOT_IN_REALM', 8); +define('FILE_PASSWD_E_USER_NOT_IN_REALM_STR', 'User \'%s\' doesn\'t exist in realm \'%s\'.'); +/** +* Parameter must be of type array. +*/ +define('FILE_PASSWD_E_PARAM_MUST_BE_ARRAY', 9); +define('FILE_PASSWD_E_PARAM_MUST_BE_ARRAY_STR', 'Parameter %s must be of type array.'); +/** +* Method not implemented. +*/ +define('FILE_PASSWD_E_METHOD_NOT_IMPLEMENTED', 10); +define('FILE_PASSWD_E_METHOD_NOT_IMPLEMENTED_STR', 'Method \'%s()\' not implemented.'); +/** +* Directory couldn't be created. +*/ +define('FILE_PASSWD_E_DIR_NOT_CREATED', 11); +define('FILE_PASSWD_E_DIR_NOT_CREATED_STR', 'Couldn\'t create directory \'%s\'.'); +/** +* File couldn't be opened. +*/ +define('FILE_PASSWD_E_FILE_NOT_OPENED', 12); +define('FILE_PASSWD_E_FILE_NOT_OPENED_STR', 'Couldn\'t open file \'%s\'.'); +/** +* File coudn't be locked. +*/ +define('FILE_PASSWD_E_FILE_NOT_LOCKED', 13); +define('FILE_PASSWD_E_FILE_NOT_LOCKED_STR', 'Couldn\'t lock file \'%s\'.'); +/** +* File couldn't be unlocked. +*/ +define('FILE_PASSWD_E_FILE_NOT_UNLOCKED', 14); +define('FILE_PASSWD_E_FILE_NOT_UNLOCKED_STR', 'Couldn\'t unlock file.'); +/** +* File couldn't be closed. +*/ +define('FILE_PASSWD_E_FILE_NOT_CLOSED', 15); +define('FILE_PASSWD_E_FILE_NOT_CLOSED_STR', 'Couldn\'t close file.'); + +/** * Class to manage passwd-style files * * @author Rasmus Lerdorf <rasmus@php.net> * @package File_Passwd -* @category File System -* @version $Revision: 1.5 $ +* @category FileSystem +* @version $Revision: 1.6 $ * @deprecated <b>Please use the provided factory instead!</b> * * <code> @@ -297,7 +387,7 @@ * @static use &File_Passwd::factory() for instantiating you passwd object * @throws PEAR_Error * @access public - * @author Michael Wallner <mike@iworks.at> + * @author Michael Wallner <mike@php.net> * @return object File_Passwd_$class - desired Passwd object or PEAR_Error * @param string $class the desired subclass of File_Passwd */

« previous php.pear.cvs (#13024) next »