php-doc-en/reference/hw/functions/hw-gettext.xml

88 lines
3.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/hw.xml, last change in rev 1.2 -->
<refentry xml:id="function.hw-gettext" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>hw_GetText</refname>
<refpurpose>Retrieve text document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>hw_gettext</methodname>
<methodparam><type>int</type><parameter>connection</parameter></methodparam>
<methodparam><type>int</type><parameter>objectID</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>
rootID/prefix
</parameter></methodparam>
</methodsynopsis>
<para>
Returns the document with object ID
<parameter>objectID</parameter>. If the document
has anchors which can be inserted, they will be inserted already.
The optional parameter <parameter>rootID/prefix</parameter> can
be a string or an integer. If it is an integer it determines
how links are inserted
into the document. The default is 0 and will result in links that
are constructed from the name of the link's destination object. This
is useful for web applications. If a link points to an object with
name 'internet_movie' the HTML link will be
&lt;A HREF="/internet_movie">. The actual location of the source and
destination object in the document hierarchy is disregarded. You
will have to set up your web browser, to rewrite that URL to for
example '/my_script.php3/internet_movie'. 'my_script.php3' will
have to evaluate $PATH_INFO and retrieve the document.
All links will have the prefix '/my_script.php3/'. If you do not
want this you can set the optional parameter
<parameter>rootID/prefix</parameter> to any prefix which
is used instead. Is this case it has to be a string.
</para>
<para>
If <parameter>rootID/prefix</parameter> is an integer and
unequal to 0 the link is constructed from all the names
starting at the object with the id <parameter>rootID/prefix</parameter>
separated by a slash relative to the current object.
If for example the above document 'internet_movie' is located
at 'a-b-c-internet_movie' with '-' being the separator between
hierarchy levels on the Hyperwave server and the source document is
located at 'a-b-d-source' the resulting HTML link would be:
&lt;A HREF="../c/internet_movie">. This is useful if you want
to download the whole server content onto disk and map
the document hierarchy onto the file system.
</para>
<para>
This function will only work for pure text documents. It will
not open a special data connection and therefore blocks the
control connection during the transfer.
</para>
<para>
See also <function>hw_pipedocument</function>,
<function>hw_free_document</function>,
<function>hw_document_bodytag</function>,
<function>hw_document_size</function>,
and <function>hw_output_document</function>.
</para>
</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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../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
-->