php-doc-en/reference/mongo/mongogridfs/delete.xml

83 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="mongogridfs.delete" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoGridFS::delete</refname>
<refpurpose>Remove a file and its chunks from the database</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool|array</type><methodname>MongoGridFS::delete</methodname>
<methodparam><type>mixed</type><parameter>id</parameter></methodparam>
</methodsynopsis>
<note>
<para>
<methodname>MongoGridFS::delete</methodname> is a convenience method for
calling <methodname>MongoGridFS::remove</methodname> with specific
<parameter>criteria</parameter> and default <parameter>options</parameter>
parameters.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term>
<parameter>id</parameter>
</term>
<listitem>
<para>
<literal>_id</literal> of the file to remove.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an array containing the status of the removal (with respect to the
<literal>files</literal> collection) if a
<link linkend="mongo.writeconcerns">write concern</link> is applied.
Otherwise, returns &true;.
</para>
<para>
Fields in the status array are described in the documentation for
<function>MongoCollection::insert</function>.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
&mongo.errors.exceptions.writeconcern;
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->