Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Update module/mvc docs slightly
Browse files Browse the repository at this point in the history
- Fix a couple of typos in mvc intro
- Add php.net phar link
- Clean up example tag
  • Loading branch information
EvanDotPro committed Oct 15, 2011
1 parent 47b3397 commit b41b351
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
24 changes: 16 additions & 8 deletions documentation/manual/en/module_specs/Zend_Module-Intro.xml
Expand Up @@ -358,6 +358,14 @@ $moduleLoader->register();
xml:id="zend.module.intro.example.module-loading-nonstandard-paths">
<info><title>Registering a Non-Standard / Explicit Module Path</title></info>

<para>
In this example, the autoloader will first check for
<classname>MyModule\Module</classname> in
<filename>/path/to/mymoduledir/Module.php</filename>. If it's
not found, then it will fall back to searching any other
registered module paths.
</para>

<programlisting language="php"><![CDATA[
$moduleLoader = new \Zend\Loader\ModuleAutoloader(array(
realpath(__DIR__ . '/../modules'),
Expand All @@ -368,9 +376,7 @@ $moduleLoader->register();
</example>

<para>
When loading <classname>MyModule\Module</classname>, the autoloader
will first check for
<filename>/path/to/mymoduledir/Module.php</filename>.
This same method works if you provide the path to a phar archive.
</para>
</section>

Expand Down Expand Up @@ -425,11 +431,13 @@ $moduleLoader->register();
<info><title>Packaging Modules with Phar</title></info>

<para>
If you prefer, you may easily package your module as a phar
archive. Supported phar extensions are: .phar, .phar.gz, .phar.bz2,
.phar.tar, .phar.tar.gz, .phar.tar.bz2, .phar.zip, .tar, .tar.gz,
.tar.bz2, and .zip. The module autoloader is able to discover
modules with these extensions.
If you prefer, you may easily package your module as a <link
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="http://php.net/phar">phar archive</link>. Supported
phar extensions are: .phar, .phar.gz, .phar.bz2, .phar.tar,
.phar.tar.gz, .phar.tar.bz2, .phar.zip, .tar, .tar.gz, .tar.bz2,
and .zip. The module autoloader is able to discover modules with
these extensions.
</para>

<para>
Expand Down
4 changes: 2 additions & 2 deletions documentation/manual/en/module_specs/Zend_Mvc-Intro.xml
Expand Up @@ -214,7 +214,7 @@ class Module
</para>

<para>
The three <filename>autoload_*.php</filename> filees are not
The three <filename>autoload_*.php</filename> files are not
required, but recommended. They provide the following:
</para>

Expand Down Expand Up @@ -248,7 +248,7 @@ class Module
</itemizedlist>

<para>
The point of these three classes is to provide reasonable default
The point of these three files is to provide reasonable default
mechanisms for autoloading the classes contained in the module,
thus providing a trivial way to consume the module without
requiring <classname>Zend\Module</classname> (e.g., for use outside a
Expand Down

0 comments on commit b41b351

Please sign in to comment.