DIã³ã³ããããªã«ãã大仰ãªãã®ã¨ãã¦åéãããã¦ãããããªæ°ãããã®ã§ãæ©è½ã極éã¾ã§åãè½ã¨ããæå°ã®DIã³ã³ãããæ¸ããã ããã«ã¯AOPã¯å½ç¶ãªãããè¨å®ãã¡ã¤ã«ãªã©ããªãã <?php // DIContainer.php class DIContainer { protected $componentFactory; function __construct(ComponentFactory $c) { $this->componentFactory = $c; $c->accept($this); } function get($name) { $name = strtolower($name); if (!isset($this->objects[$name])) { $this->objects[$name] = $this->componentFactory->get(
{{#tags}}- {{label}}
{{/tags}}