svn: /pear/peardoc/trunk/en/package/ system/launcher/intro.xml system/launcher.xml system-entities.xml

[email protected] (Christian Weiske) Tue, 21 Feb 2012 20:39:02 +0000
Newsgroups php.pear.doc
Message-ID <[email protected]>
--6b035f2a683f793e47ce1407294d236d8a3ff366
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

cweiske                                  Tue, 21 Feb 2012 20:39:02 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=323412

Log:
add system_launcher docs written by olleolleolle

Changed paths:
    A   pear/peardoc/trunk/en/package/system/launcher/
    A   pear/peardoc/trunk/en/package/system/launcher/intro.xml
    A   pear/peardoc/trunk/en/package/system/launcher.xml
    U   pear/peardoc/trunk/en/package/system-entities.xml

Added: pear/peardoc/trunk/en/package/system/launcher/intro.xml
===================================================================
--- pear/peardoc/trunk/en/package/system/launcher/intro.xml	                        (rev 0)
+++ pear/peardoc/trunk/en/package/system/launcher/intro.xml	2012-02-21 20:39:02 UTC (rev 323412)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<refentry xmlns="http://docbook.org/ns/docbook" version="lillet" xml:id="package.system.launcher.intro">
+ <refnamediv>
+  <refname>Using System_Launcher</refname>
+  <refpurpose>
+   Launch files with associated applications.
+  </refpurpose>
+ </refnamediv>
+
+ <refsection xml:id="package.system.launcher.intro.contrib"><info><title>Contributors</title></info>
+
+  <para>
+   <itemizedlist>
+    <listitem><simpara>Olle Jonsson</simpara></listitem>
+    <listitem><simpara>Christian Weiske</simpara></listitem>
+   </itemizedlist>
+  </para>
+ </refsection>
+
+ <refsection xml:id="package.system.launcher.intro.desc"><info><title>Description</title></info>
+
+  <para>
+   By using the operating system's features for opening a file or URL,
+   this package simplifies writing command-line tools that open HTML documentation
+   et cetera. For instance, upon successful install, the "Getting started" URL
+   could be loaded in the browser.
+  </para>
+
+ </refsection>
+
+ <refsection xml:id="package.system.launcher.intro.usage"><info><title>Using System_Launcher</title></info>
+
+  <example><info><title>Open a local HTML file in the web browser</title></info>
+
+   <programlisting role="php">
+    <![CDATA[
+<?php
+require_once 'System/Launcher.php';
+$launcher = new System_Launcher;
+$launcher->launch(dirname(__FILE__) . '/test.htm', true);
+?>
+]]></programlisting>
+  </example>
+
+  <para>
+   At first, you need to instantitiate a new
+   <classname>System_Launcher</classname> object. The operating
+   system is determined there, which is needed for choosing a way
+   of launching programs.
+  </para>
+
+  <para>
+   The <literal>launch()</literal> method tells the operating system
+   to open the given file as it is associated. Browsers regularly
+   open HTML documents, and image viewers open PNGs, and so on.
+  </para>
+
+  <para>
+   You can also feed it a URL instead of a file.
+  </para>
+
+ </refsection>
+
+
+</refentry>

Added: pear/peardoc/trunk/en/package/system/launcher.xml
===================================================================
--- pear/peardoc/trunk/en/package/system/launcher.xml	                        (rev 0)
+++ pear/peardoc/trunk/en/package/system/launcher.xml	2012-02-21 20:39:02 UTC (rev 323412)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns="http://docbook.org/ns/docbook" version="lillet" xml:id="package.system.launcher">
+ <info>
+  <title>System_Launcher</title>
+  <abstract>
+   <para>
+    Launch files with associated applications
+   </para>
+  </abstract>
+ </info>
+
+ <chapter>
+
+ &package.system.launcher.intro;
+ </chapter>
+</book>

Modified: pear/peardoc/trunk/en/package/system-entities.xml
===================================================================
--- pear/peardoc/trunk/en/package/system-entities.xml	2012-02-21 20:35:27 UTC (rev 323411)
+++ pear/peardoc/trunk/en/package/system-entities.xml	2012-02-21 20:39:02 UTC (rev 323412)
@@ -1,4 +1,5 @@
 &package.system.folders;
+&package.system.launcher;
 &package.system.mount;
 &package.system.system-daemon;
 &package.system.system-procwatch;

--6b035f2a683f793e47ce1407294d236d8a3ff366--