Garden 0.5.0
|
|||||||||||||||||||
Garden is a dependency injection for PHP5.
Inspired by Spring Framework, it uses XML application context with syntax as similar as possible to Spring context definitions.
Kickstarter
Create example.xml file like this (don't forget to put garden-beans.dtd next to it!):
< ?xml version="1.0" encoding="UTF-8"? >
< !DOCTYPE beans PUBLIC "-//GARDEN//DTD BEAN//EN" "garden-beans.dtd" >
< beans default-lazy-init="true" >
< bean id="dog" class="Dog" file="ext/Dog.php" >
< property name="collar" >
< ref local="dogCollar"/ >
< /property >
< /bean >
< bean id="dogCollar" class="Collar" file="ext/Dog/Collar.php" >
< property name="spiked" value="true"/ >
< /bean >
< /beans >
etx/Dog.php contains:
class Dog
{
private $collar;
public function setCollar($collar)
{
$this->collar = $collar;
}
public function getCollar()
{
return $this->collar;
}
}
etx/Dog/Collar.php contains:
class Collar
{
private $spiked;
public function setSpiked($spiked)
{
$this->spiked = $spiked;
}
public function getSpiked()
{
return $this->spiked;
}
}
tags
Download Garden 0.5.0
Authors software
|
|
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
