Changeset 828
- Timestamp:
- 08/14/07 21:25:20 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ioc/injection/stubBinding.php
r825 r828 56 56 57 57 /** 58 * Instance this type is bound to 59 * 60 * @var object 61 */ 62 protected $instance = null; 63 64 /** 58 65 * Create a new binding 59 66 * … … 88 95 89 96 /** 97 * Set the concrete instance 98 * 99 * @param object $impl 100 * @return stubBinding 101 */ 102 public function toInstance($instance) { 103 $this->instance = $instance; 104 return $this; 105 } 106 107 /** 90 108 * Set the scope 91 109 * … … 115 133 */ 116 134 public function getInstance() { 135 if ($this->instance != null) { 136 return $this->instance; 137 } 138 117 139 if (is_string($this->impl)) { 118 140 $this->impl = new stubReflectionClass($this->impl);
