Skip to content
Browse files

Updated readme with Composer example

  • Loading branch information...
1 parent 374f435 commit 7e93f7aabf494c5d3465cff0878bd10b73614357 @jbroadway committed Jan 24, 2013
Showing with 33 additions and 0 deletions.
  1. +33 −0 README.textile
View
33 README.textile
@@ -9,6 +9,39 @@ Note: You will need the php curl extension installed on your system. On Ubuntu,
h2. Usage
+h3. With Composer
+
+Create a composer.json file with the following:
+
+<pre>
+{
+ "require": {
+ "phpactiveresource/phpactiveresource": "dev-master"
+ }
+}
+</pre>
+
+Now load the script via Composer's autoloader:
+
+<pre>
+<?php
+
+require_once 'vendor/autoload.php';
+
+use ActiveResource\ActiveResource;
+
+class Song extends ActiveResource {
+ public $site = 'http://localhost:3000/';
+ public $element_name = 'songs';
+}
+
+// etc.
+
+?>
+</pre>
+
+h3. Without Composer
+
<pre>
<?php

0 comments on commit 7e93f7a

Please sign in to comment.
Something went wrong with that request. Please try again.