Skip to content

Instantly share code, notes, and snippets.

@sorenmalling
Created December 22, 2014 14:02
Show Gist options
  • Select an option

  • Save sorenmalling/b2a78a8797d9e9e0fc02 to your computer and use it in GitHub Desktop.

Select an option

Save sorenmalling/b2a78a8797d9e9e0fc02 to your computer and use it in GitHub Desktop.
<?php
class LockManager {
public function injectSettings($settings) {
$this->settings = $settings;
}
public function ... {
if (file_exists(..)) {
read_file($this->settings['pathToFileForLockedSiteInWebScope'];
} else {
# fallback to something
}
}
}
<?php
class Scripts {
public function initializeLockManager(..) {
$settings = $configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');
$lockManager->injectSettings($settings)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment