示例#1
0
 /**
  * Search for a list of files to process
  *
  * @return array
  */
 protected function _processFiles()
 {
     if ($this->isCubexAvailable()) {
         $this->_request = $this->getCubex()->make('request');
     }
     if ($this->_request === null) {
         $this->_request = Request::createFromGlobals();
     }
     if ($this->_requestReplacements === null) {
         $this->_requestReplacements = [$this->_request->subDomain(), $this->_request->domain(), $this->_request->tld(), strtolower(substr($this->_request->getLocale(), 0, 2))];
     }
     $files = [];
     //Search for a full replacement file
     $replacements = $this->_locateFiles($this->_replaceFiles, null);
     if ($replacements !== null) {
         return $replacements;
     }
     //Find prepending files
     $files = array_merge($files, $this->_locateFiles($this->_prependFiles));
     //Include the standard file
     $files = array_merge($files, $this->_locateFiles($this->_standardFiles));
     //Find appending files
     $files = array_merge($files, $this->_locateFiles($this->_appendFiles));
     return $files;
 }