LazyRecord\ConfigLoader::loadFromSymbol PHP Method

loadFromSymbol() public method

public loadFromSymbol ( $force = false )
    public function loadFromSymbol($force = false)
    {
        if (file_exists($this->symbolFilename)) {
            return $this->load(realpath($this->symbolFilename), $force);
        } elseif (file_exists('.lazy.php')) {
            return $this->load(realpath('.lazy.php'), $force);
        }
    }

Usage Example

Beispiel #1
0
 public function getConfigLoader($required = true)
 {
     if (!$this->config) {
         $this->config = ConfigLoader::getInstance();
         $this->config->loadFromSymbol(true);
         // force loading
         if (!$this->config->isLoaded() && $required) {
             throw new RuntimeException("ConfigLoader did not loaded any config file. Can't initialize the settings.");
         }
     }
     return $this->config;
 }
All Usage Examples Of LazyRecord\ConfigLoader::loadFromSymbol