svn: /phpdoc/en/trunk/reference/mongo/ mongogridfs.xml

From: Date: Tue, 23 Mar 2010 14:28:02 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/ mongogridfs.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6251@lists.php.net to get a copy of this message
kristina Tue, 23 Mar 2010 14:28:02 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=296675 Log: gridfs metadata info Changed paths: U phpdoc/en/trunk/reference/mongo/mongogridfs.xml Modified: phpdoc/en/trunk/reference/mongo/mongogridfs.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongogridfs.xml 2010-03-23 14:25:34 UTC (rev 296674) +++ phpdoc/en/trunk/reference/mongo/mongogridfs.xml 2010-03-23 14:28:02 UTC (rev 296675) @@ -34,13 +34,13 @@ <para> For example, the files document is something like: - <programlisting> + <programlisting role="php"> <![CDATA[ array("_id" => 123456789, "filename" => "foo.txt", "chunkSize" => 3, "length" => 12) ]]> </programlisting> and the chunks documents look like: - <programlisting> + <programlisting role="php"> <![CDATA[ array("files_id" => 123456789, "n" => 0, "data" => new MongoBinData("abc")); array("files_id" => 123456789, "n" => 1, "data" => new MongoBinData("def")); @@ -53,6 +53,38 @@ </section> <section> + <title>Inter-Language Compatibility</title> + <para> + You should be able to use any files created by MongoGridFS with any other + drivers, and visa vera. However, some drivers expect that all metadata + associated with a file be in a "metadata" field. If you're going to be + using other languages, it's a good idea to wrap info you might want them to + see in a "metadata" field. For example, instead of: + </para> + <programlisting role="php"> +<![CDATA[ +<?php + +$grid->storeFile("somefile.txt", array("date" => new MongoDate())); + +?> +]]> + </programlisting> + <para> + use something like: + </para> + <programlisting role="php"> +<![CDATA[ +<?php + +$grid->storeFile("somefile.txt", array("metadata" => array("date" => new MongoDate()))); + +?> +]]> + </programlisting> + </section> + + <section> <title>The <classname>MongoGridFS</classname> Family</title> <para>

« previous php.doc.cvs (#6251) next »