[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\routing\resources_locator; 15 16 use phpbb\filesystem\filesystem_interface; 17 18 /** 19 * Locates the yaml routing resources taking update directories into consideration 20 */ 21 class installer_resources_locator implements resources_locator_interface 22 { 23 /** 24 * phpBB's filesystem handler 25 * 26 * @var filesystem_interface 27 */ 28 protected $filesystem; 29 30 /** 31 * phpBB root path 32 * 33 * @var string 34 */ 35 protected $phpbb_root_path; 36 37 /** 38 * Name of the current environment 39 * 40 * @var string 41 */ 42 protected $environment; 43 44 /** 45 * Construct method 46 * 47 * @param filesystem_interface $filesystem phpBB's filesystem handler 48 * @param string $phpbb_root_path phpBB root path 49 * @param string $environment Name of the current environment 50 */ 51 public function __construct(filesystem_interface $filesystem, $phpbb_root_path, $environment) 52 { 53 $this->filesystem = $filesystem; 54 $this->phpbb_root_path = $phpbb_root_path; 55 $this->environment = $environment; 56 } 57 58 /** 59 * {@inheritdoc} 60 */ 61 public function locate_resources() 62 { 63 if ($this->filesystem->exists($this->phpbb_root_path . 'install/update/new/config')) 64 { 65 $resources = array( 66 array('install/update/new/config/' . $this->environment . '/routing/environment.yml', 'yaml') 67 ); 68 } 69 else 70 { 71 $resources = array( 72 array('config/' . $this->environment . '/routing/environment.yml', 'yaml') 73 ); 74 } 75 76 return $resources; 77 } 78 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |