aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-02-24 15:50:46 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-02-24 15:50:46 +0100
commit6998bfad6bc2662c59ad71d4b4142f59a06773cb (patch)
tree253cbfd66d47b32282b87551570d31dc9d841fd8
parent81722b7979929325b3335119b6d00c4ed782f6fc (diff)
downloadRegistry-6998bfad6bc2662c59ad71d4b4142f59a06773cb.zip
Registry-6998bfad6bc2662c59ad71d4b4142f59a06773cb.tar.gz
Registry-6998bfad6bc2662c59ad71d4b4142f59a06773cb.tar.bz2
Add syntax highlighting.
-rw-r--r--README.md24
1 files changed, 13 insertions, 11 deletions
diff --git a/README.md b/README.md
index 2ccf308..d0fcac2 100644
--- a/README.md
+++ b/README.md
@@ -12,17 +12,19 @@ This library proposes a static register with facilities.
As a quick overview, we propose to set an entry and retrieve it from the
`hoa://` protocol:
- Hoa\Register\Registry::set('foo', 'bar');
- var_dump(
- Hoa\Registry\Registry::get('foo'),
- resolve('hoa://Library/Registry#foo')
- );
-
- /**
- * Will output:
- * string(3) "bar"
- * string(3) "bar"
- */
+```php
+Hoa\Register\Registry::set('foo', 'bar');
+var_dump(
+ Hoa\Registry\Registry::get('foo'),
+ resolve('hoa://Library/Registry#foo')
+);
+
+/**
+ * Will output:
+ * string(3) "bar"
+ * string(3) "bar"
+ */
+```
There is no restriction about the key form or the value type. We can store any
kinds of type: objects, functions, resources…