cvs: pear /File_Fstab Fstab.php
| From: | Ian Eure | Date: | Sat, 28 May 2005 19:56:17 +0000 |
| Subject: | cvs: pear /File_Fstab Fstab.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-32188@lists.php.net to get a copy of this message | ||
ieure Sat May 28 15:56:17 2005 EDT
Modified files:
/pear/File_Fstab Fstab.php
Log:
Fix error constants (Bug #4414)
http://cvs.php.net/diff.php/pear/File_Fstab/Fstab.php?r1=1.9&r2=1.10&ty=u
Index: pear/File_Fstab/Fstab.php
diff -u pear/File_Fstab/Fstab.php:1.9 pear/File_Fstab/Fstab.php:1.10
--- pear/File_Fstab/Fstab.php:1.9 Sun Oct 17 19:48:24 2004
+++ pear/File_Fstab/Fstab.php Sat May 28 15:56:16 2005
@@ -1,26 +1,33 @@
<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2003 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available through the world-wide-web at the following url: |
-// | http://www.php.net/license/3_0.txt.
|
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Ian Eure <ieure@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: Fstab.php,v 1.9 2004/10/17 23:48:24 ieure Exp $
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Main
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt. If you did
not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category File Formats
+ * @package File_Fstab
+ * @author Ian Eure <ieure@php.net>
+ * @copyright 2004, 2005 Ian Eure
+ * @license http://www.php.net/license/3_0.txt
PHP License 3.0
+ * @version CVS: $Revision: 1.10 $
+ * @version Release: @version@
+ * @link http://pear.php.net/package/File_Fstab
+ */
require_once 'PEAR.php';
require_once 'File/Fstab/Entry.php';
+/**
+ * These defines enumerate the possible error types
+ */
define('FILE_FSTAB_ERROR_NOENT', -1);
define('FILE_FSTAB_PERMISSION_DENIED', -2);
define('FILE_FSTAB_WRONG_CLASS', -3);
@@ -29,7 +36,7 @@
* Class to read, write, and manipulate fstab files
*
* @package @package@
- * @version @version@
+ * @version Release: @version@
* @author Ian Eure <ieure@php.net>
* @license PHP License v3.0
*/
@@ -159,7 +166,7 @@
return $this->entries[$key];
}
}
- return PEAR::raiseError("No entry for path \"{$path}\"",
PEAR_ERROR_NOENT);
+ return PEAR::raiseError("No entry for path \"{$path}\"",
FILE_FSTAB_ERROR_NOENT);
}
/**
@@ -177,7 +184,7 @@
return $this->entries[$key];
}
}
- return PEAR::raiseError("No entry for device \"{$blockdev}\"",
PEAR_ERROR_NOENT);
+ return PEAR::raiseError("No entry for device \"{$blockdev}\"",
FILE_FSTAB_ERROR_NOENT);
}
/**
@@ -195,7 +202,7 @@
return $this->entries[$key];
}
}
- return PEAR::raiseError("No entry for UUID \"{$uuid}\"",
PEAR_ERROR_NOENT);
+ return PEAR::raiseError("No entry for UUID \"{$uuid}\"",
FILE_FSTAB_ERROR_NOENT);
}
/**
@@ -213,9 +220,9 @@
return $this->entries[$key];
}
}
- return PEAR::raiseError("No entry for label \"{$label}\"",
PEAR_ERROR_NOENT);
+ return PEAR::raiseError("No entry for label \"{$label}\"",
FILE_FSTAB_ERROR_NOENT);
}
-
+
/**
* Add a new entry
*
@@ -228,7 +235,7 @@
return PEAR::raiseError("Entry must be derived from File_Fstab_Entry.",
FILE_FSTAB_WRONG_CLASS);
}
-
+
$this->entries[] = $entry;
return true;
}