Skip to content

Commit

Permalink
Added fluent interface to BuilderDefinition
Browse files Browse the repository at this point in the history
- Altered addClass() to "return $this" to allow chaining
  • Loading branch information
weierophinney committed Jun 13, 2011
1 parent 91fd86c commit bda50ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Zend/Di/Definition/BuilderDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function createClassesFromArray(array $builderData)
public function addClass(Builder\PhpClass $phpClass)
{
$this->classes[] = $phpClass;
return $this;
}

public function getClasses()
Expand Down Expand Up @@ -152,4 +153,4 @@ public function getInjectionMethodParameters($class, $method)
}
return $method->getParameters();
}
}
}

0 comments on commit bda50ed

Please sign in to comment.