getNativeData()
[lhc/web/wiklou.git] / includes / Cdb.php
index 6047748..94aa192 100644 (file)
 abstract class CdbReader {
        /**
         * Open a file and return a subclass instance
+        *
+        * @param $fileName string
+        *
+        * @return CdbReader
         */
        public static function open( $fileName ) {
                if ( self::haveExtension() ) {
@@ -25,6 +29,8 @@ abstract class CdbReader {
 
        /**
         * Returns true if the native extension is available
+        *
+        * @return bool
         */
        public static function haveExtension() {
                if ( !function_exists( 'dba_handlers' ) ) {
@@ -49,6 +55,8 @@ abstract class CdbReader {
 
        /**
         * Get a value with a given key. Only string values are supported.
+        *
+        * @param $key string
         */
        abstract public function get( $key );
 }
@@ -61,6 +69,10 @@ abstract class CdbWriter {
        /**
         * Open a writer and return a subclass instance.
         * The user must have write access to the directory, for temporary file creation.
+        *
+        * @param $fileName string
+        *
+        * @return CdbWriter_DBA|CdbWriter_PHP
         */
        public static function open( $fileName ) {
                if ( CdbReader::haveExtension() ) {
@@ -73,11 +85,15 @@ abstract class CdbWriter {
 
        /**
         * Create the object and open the file
+        *
+        * @param $fileName string
         */
        abstract function __construct( $fileName );
 
        /**
         * Set a key to a given value. The value will be converted to string.
+        * @param $key string
+        * @param $value string
         */
        abstract public function set( $key, $value );
 
@@ -88,7 +104,6 @@ abstract class CdbWriter {
        abstract public function close();
 }
 
-
 /**
  * Reader class which uses the DBA extension
  */