Commit 99ace12c authored by Mathias Verraes's avatar Mathias Verraes
Browse files

more doc formatting

parent 198c1221
......@@ -3,4 +3,6 @@ Money
PHP 5.3+ library to make working with money safer, easier, and fun!
The documentation is in the process of being moved to readthedocs.org. See /docs for now.
The documentation is available at http://readthedocs.org/docs/money/en/latest/
Getting started
===============
All amounts are represented in the smallest unit (eg. cents), so USD 5.00 is written as
.. code-block:: php
<?php
$fiver = new Money(500, new Currency('USD'));
// or shorter:
$fiver = Money::USD(500);
Autoloading
-----------
You'll need an autoloader. Money is PSR-0 compatible, so if you are using the Symfony2 autoloader, this will do:
.. code-block:: php
<?php
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader;
$loader->registerNamespaces(array(
'Money' => __DIR__ . '/vendor/money/lib/',
));
$loader->register();
......@@ -26,36 +26,3 @@ units and subunits in currencies, currency conversion, string formatting and par
Other ideas include integration with Doctrine2, which should make it easier to store money
in a database transparently.
Getting started
---------------
All amounts are represented in the smallest unit (eg. cents), so USD 5.00 is written as
.. code-block:: php
<?php
$fiver = new Money(500, new Currency('USD'));
// or shorter:
$fiver = Money::USD(500);
Autoloading
-----------
You'll need an autoloader. Money is PSR-0 compatible, so if you are using the Symfony2 autoloader, this will do:
.. code-block:: php
<?php
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader;
$loader->registerNamespaces(array(
'Money' => __DIR__ . '/vendor/money/lib/',
));
$loader->register();
......@@ -2,23 +2,12 @@
Money for PHP
=============
Contents:
.. toctree::
:maxdepth: 2
Introduction
GettingStarted
Immutability
Allocation
Inspiration
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment