Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Expose formally protected method in ConfigListener #2390

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions library/Zend/ModuleManager/Listener/ConfigListener.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -277,6 +277,21 @@ public function addConfigStaticPath($staticPath)
return $this; return $this;
} }


/**
* Whether the config is already cached
*
* @return bool
*/
public function hasCachedConfig()
{
if (($this->getOptions()->getConfigCacheEnabled())
&& (file_exists($this->getOptions()->getConfigCacheFile()))
) {
return true;
}
return false;
}

/** /**
* Add an array of paths of config files to merge after loading modules * Add an array of paths of config files to merge after loading modules
* *
Expand Down Expand Up @@ -373,19 +388,6 @@ protected function addConfigByPath($path, $type)
return $this; return $this;
} }


/**
* @return bool
*/
protected function hasCachedConfig()
{
if (($this->getOptions()->getConfigCacheEnabled())
&& (file_exists($this->getOptions()->getConfigCacheFile()))
) {
return true;
}
return false;
}

/** /**
* @return mixed * @return mixed
*/ */
Expand Down
7 changes: 7 additions & 0 deletions library/Zend/ModuleManager/Listener/ConfigMergerInterface.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ public function getMergedConfig($returnConfigAsObject = true);
* @return ConfigMergerInterface * @return ConfigMergerInterface
*/ */
public function setMergedConfig(array $config); public function setMergedConfig(array $config);

/**
* Whether the config is already cached
*
* @return bool
*/
public function hasCachedConfig();
} }