From 5e8d13609da5f765c4d515513e512e0aa1596154 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Thu, 21 May 2009 14:33:16 +0000 Subject: [PATCH] cursor and ref classes, constants git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@280908 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/book.xml | 6 +- reference/mongo/constants.xml | 250 ++++++++++++------ reference/mongo/mongo/selectcollection.xml | 4 +- reference/mongo/mongodbref.xml | 68 +++++ reference/mongo/mongodbref/create.xml | 72 +++++ reference/mongo/mongodbref/get.xml | 72 +++++ reference/mongo/mongodbref/isref.xml | 61 +++++ reference/mongo/mongogridfscursor.xml | 68 +++++ .../mongo/mongogridfscursor/construct.xml | 106 ++++++++ reference/mongo/mongogridfscursor/current.xml | 48 ++++ reference/mongo/mongogridfscursor/getnext.xml | 48 ++++ reference/mongo/mongogridfscursor/key.xml | 48 ++++ .../mongo/mongogridfsfile/getfilename.xml | 6 +- reference/mongo/mongogridfsfile/getsize.xml | 6 +- reference/mongo/versions.xml | 12 +- 15 files changed, 789 insertions(+), 86 deletions(-) create mode 100644 reference/mongo/mongodbref.xml create mode 100644 reference/mongo/mongodbref/create.xml create mode 100644 reference/mongo/mongodbref/get.xml create mode 100644 reference/mongo/mongodbref/isref.xml create mode 100644 reference/mongo/mongogridfscursor.xml create mode 100644 reference/mongo/mongogridfscursor/construct.xml create mode 100644 reference/mongo/mongogridfscursor/current.xml create mode 100644 reference/mongo/mongogridfscursor/getnext.xml create mode 100644 reference/mongo/mongogridfscursor/key.xml diff --git a/reference/mongo/book.xml b/reference/mongo/book.xml index 4b9b42fb15..5bb8d5f402 100644 --- a/reference/mongo/book.xml +++ b/reference/mongo/book.xml @@ -1,5 +1,5 @@ - + Mongo @@ -38,13 +38,15 @@ &reference.mongo.mongocursor; &reference.mongo.mongogridfs; &reference.mongo.mongogridfsfile; + &reference.mongo.mongogridfscursor; &reference.mongo.mongoutil; - &reference.mongo.mongocode; &reference.mongo.mongoid; + &reference.mongo.mongocode; &reference.mongo.mongodate; &reference.mongo.mongoregex; &reference.mongo.mongobindata; + &reference.mongo.mongodbref; diff --git a/reference/mongo/constants.xml b/reference/mongo/constants.xml index 82e35616d2..b79c82e430 100644 --- a/reference/mongo/constants.xml +++ b/reference/mongo/constants.xml @@ -1,83 +1,183 @@ - + &reftitle.constants; - &no.constants; - - - Mongo Comparison Operators - - - - Constant - Description - - - - - MONGO_LT - Less than - - - MONGO_LTE - Less than or equal to - - - MONGO_GT - Greater than - - - MONGO_GTE - Greater than or equal to - - - MONGO_IN - In the given set - - - MONGO_NE - Not equal to - - - -
-
+ &extension.constants; + + + + Mongo::DEFAULT_HOST + (string) + + + + "localhost" + + + + + Mongo::DEFAULT_PORT + (int) + + + + 27017 + + + + + MongoDB::PROFILING_OFF + (int) + + + + Turn off database profiling + + + + + MongoDB::PROFILING_SLOW + (int) + + + + Turn on database profiling for slow operations + + + + + MongoDB::PROFILING_ON + (int) + + + + Turn on database profiling for all operations + + + + + MongoUtil::LT + (string) + + + + Less than + + + + + MongoUtil::LTE + (string) + + + + Less than or equal to + + + + + MongoUtil::GT + (string) + + + + Greater than + + + + + MongoUtil::GTE + (string) + + + + Greater than or equal to + + + + + MongoUtil::IN + (string) + + + + In + + + + + MongoUtil::NE + (string) + + + + Not equal + + + + + MongoUtil::ASC + (int) + + + + Ascending + + + + + MongoUtil::DESC + (int) + + + + Descending + + + + + MongoUtil::BIN_ARRAY + (int) + + + + Default binary type: an array of bytes + + + + + MongoUtil::BIN_UUID + (int) + + + + Universal unique id + + + + + MongoUtil::BIN_MD5 + (int) + + + + MD5 type + + + + + MongoUtil::BIN_CUSTOM + (int) + + + + User-defined binary type + + + + - - The following constants are for setting up database profiling. - - Mongo Profiling Constants - - - - Constant - Description - - - - - MONGO_PROFILING_OFF - - Turn off profiling. - - - - MONGO_PROFILING_SLOW - - Only keep track of slow operations. - - - - MONGO_PROFILING_ON - - Keep track of all operations. - - - - -
-
+ Mongo::selectCollection @@ -11,7 +11,7 @@ &reftitle.description; public MongoCollectionMongo::selectCollection - stringMongoDBdb + string|MongoDBdb stringcollection diff --git a/reference/mongo/mongodbref.xml b/reference/mongo/mongodbref.xml new file mode 100644 index 0000000000..1834133e1b --- /dev/null +++ b/reference/mongo/mongodbref.xml @@ -0,0 +1,68 @@ + + + + + + The MongoDBRef class + MongoDBRef + + + + +
+ &reftitle.intro; + + This class can be used to create lightweight links between + objects in different collections. + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoDBRef + + + + + MongoDBRef + + + + + Methods + + + + +
+ +
+ + &reference.mongo.entities.mongodbref; + +
+ + diff --git a/reference/mongo/mongodbref/create.xml b/reference/mongo/mongodbref/create.xml new file mode 100644 index 0000000000..91c388e7ce --- /dev/null +++ b/reference/mongo/mongodbref/create.xml @@ -0,0 +1,72 @@ + + + + + + MongoDBRef::create + Creates a new database reference + + + + &reftitle.description; + + public static arrayMongoDBRef::create + stringns + MongoIdid + + + + + &reftitle.parameters; + + + + + ns + + + + Database and collection name. + + + + + + id + + + + The id of the object to link. + + + + + + + + + &reftitle.returnvalues; + + Returns the reference. + + + + diff --git a/reference/mongo/mongodbref/get.xml b/reference/mongo/mongodbref/get.xml new file mode 100644 index 0000000000..5ca593c18e --- /dev/null +++ b/reference/mongo/mongodbref/get.xml @@ -0,0 +1,72 @@ + + + + + + MongoDBRef::get + Fetches the object pointed to by a reference + + + + &reftitle.description; + + public static arrayMongoDBRef::get + MongoDBdb + arrayref + + + + + &reftitle.parameters; + + + + + db + + + + Database to use. + + + + + + ref + + + + Reference to fetch. + + + + + + + + + &reftitle.returnvalues; + + Returns the object or &null;. + + + + diff --git a/reference/mongo/mongodbref/isref.xml b/reference/mongo/mongodbref/isref.xml new file mode 100644 index 0000000000..88852793d2 --- /dev/null +++ b/reference/mongo/mongodbref/isref.xml @@ -0,0 +1,61 @@ + + + + + + MongoDBRef::isRef + Checks if an array is a database reference + + + + &reftitle.description; + + public static booleanMongoDBRef::isRef + arrayref + + + + + &reftitle.parameters; + + + + + ref + + + + Array to check. + + + + + + + + + &reftitle.returnvalues; + + Returns if ref is a reference. + + + + diff --git a/reference/mongo/mongogridfscursor.xml b/reference/mongo/mongogridfscursor.xml new file mode 100644 index 0000000000..a6b0b6559f --- /dev/null +++ b/reference/mongo/mongogridfscursor.xml @@ -0,0 +1,68 @@ + + + + + + The MongoGridFSCursor class + MongoGridFSCursor + + + + +
+ &reftitle.intro; + + Cursor for database file results. + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoGridFSCursor + + + + + extends + MongoCursor + + + + + Methods + + + + +
+ +
+ + &reference.mongo.entities.mongogridfscursor; + +
+ + diff --git a/reference/mongo/mongogridfscursor/construct.xml b/reference/mongo/mongogridfscursor/construct.xml new file mode 100644 index 0000000000..3426fc5063 --- /dev/null +++ b/reference/mongo/mongogridfscursor/construct.xml @@ -0,0 +1,106 @@ + + + + + + MongoGridFSCursor::__construct + Create a new cursor + + + + &reftitle.description; + + MongoGridFSCursor::__construct + MongoGridFSgridfs + resourceconnection + stringns + arrayqueryarray() + arrayfieldsarray() + + + + + &reftitle.parameters; + + + + + gridfs + + + + Related GridFS collection. + + + + + + connection + + + + Database connection. + + + + + + ns + + + + Full name of database and collection. + + + + + + query + + + + Database query. + + + + + + fields + + + + Fields to return. + + + + + + + + + &reftitle.returnvalues; + + Returns the new cursor. + + + + + diff --git a/reference/mongo/mongogridfscursor/current.xml b/reference/mongo/mongogridfscursor/current.xml new file mode 100644 index 0000000000..497909bf24 --- /dev/null +++ b/reference/mongo/mongogridfscursor/current.xml @@ -0,0 +1,48 @@ + + + + + + MongoGridFSCursor::current + Returns the current file + + + + &reftitle.description; + + public MongoGridFSFileMongoGridFSCursor::current + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The current file. + + + + diff --git a/reference/mongo/mongogridfscursor/getnext.xml b/reference/mongo/mongogridfscursor/getnext.xml new file mode 100644 index 0000000000..1d04638920 --- /dev/null +++ b/reference/mongo/mongogridfscursor/getnext.xml @@ -0,0 +1,48 @@ + + + + + + MongoGridFSCursor::getNext + Return the next file to which this cursor points, and advance the cursor + + + + &reftitle.description; + + public MongoGridFSFileMongoGridFSCursor::getNext + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the next file. + + + + diff --git a/reference/mongo/mongogridfscursor/key.xml b/reference/mongo/mongogridfscursor/key.xml new file mode 100644 index 0000000000..2ad8f483e4 --- /dev/null +++ b/reference/mongo/mongogridfscursor/key.xml @@ -0,0 +1,48 @@ + + + + + + MongoGridFSCursor::key + Returns the current result's filename + + + + &reftitle.description; + + public stringMongoGridFSCursor::key + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The current result's filename. + + + + diff --git a/reference/mongo/mongogridfsfile/getfilename.xml b/reference/mongo/mongogridfsfile/getfilename.xml index dbd9de4347..03c1940993 100644 --- a/reference/mongo/mongogridfsfile/getfilename.xml +++ b/reference/mongo/mongogridfsfile/getfilename.xml @@ -1,15 +1,15 @@ - + - MongoGridfsFile::getFilename + MongoGridFSFile::getFilename Returns this file's filename &reftitle.description; - public stringMongoGridfsFile::getFilename + public stringMongoGridFSFile::getFilename diff --git a/reference/mongo/mongogridfsfile/getsize.xml b/reference/mongo/mongogridfsfile/getsize.xml index f80e34cfb6..083b262d09 100644 --- a/reference/mongo/mongogridfsfile/getsize.xml +++ b/reference/mongo/mongogridfsfile/getsize.xml @@ -1,15 +1,15 @@ - + - MongoGridfsFile::getSize + MongoGridFSFile::getSize Returns this file's size &reftitle.description; - public intMongoGridfsFile::getSize + public intMongoGridFSFile::getSize diff --git a/reference/mongo/versions.xml b/reference/mongo/versions.xml index b8492df1e3..e67134c730 100644 --- a/reference/mongo/versions.xml +++ b/reference/mongo/versions.xml @@ -1,5 +1,5 @@ - + @@ -73,6 +73,7 @@ + @@ -90,6 +91,11 @@ + + + + + @@ -106,6 +112,10 @@ + + + +