PHP Objects, Patterns, and Practice by MATT ZANDSTRA

PHP Objects, Patterns, and Practice by MATT ZANDSTRA

Author:MATT ZANDSTRA
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


The Problem

As you have seen, many enterprise systems are divided into layers, with each layer communicating with its neighbors only through tightly defined conduits. This separation of tiers makes an application flexible. You can replace or otherwise develop each tier with the minimum impact on the rest of the system. What happens, though, when you acquire information in a tier that you later need in another noncontiguous layer?

Let’s say that I acquire configuration data in an ApplicationHelper class :

// listing 12.01

class ApplicationHelper

{

public function getOptions(): array

{

$optionfile = __DIR__ . "/data/woo_options.xml";



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.