Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added docs for property injection

  • Loading branch information...
commit 2c1cf31241f71320190ef2e3b45aa508dd94a2b8 1 parent 24bfb4a
rodnaph rodnaph authored

Showing 1 changed file with 15 additions and 1 deletion. Show diff stats Hide diff stats

  1. +15 1 README.markdown
16 README.markdown
Source Rendered
@@ -102,7 +102,7 @@ public function setClassLoader( ClassLoader $oClassLoader ) {}
102 102
103 103 *NB:* When doing method injection there is no constraint on the name of the method, or the number of parameters injected.
104 104
105   -## Parameter Types
  105 +### Parameter Types
106 106
107 107 If your method requires tweaking the injected parameter types then you can specify these with another annotation:
108 108
@@ -118,6 +118,20 @@ public function setSomething( SomeInterface $class ) {
118 118
119 119 This can also be used for constructors.
120 120
  121 +## Property Injection
  122 +
  123 +The final type of injection available is property injection. This can be used for public *and* private properties.
  124 +
  125 +<pre>
  126 +/**
  127 + * @InjectProperty
  128 + * @var SomeClass
  129 + */
  130 +private $someClass;
  131 +</pre>
  132 +
  133 +The type of object injected is specified by the *@var* PHPDoc.
  134 +
121 135 ## Inheritance
122 136
123 137 ### Methods

0 comments on commit 2c1cf31

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