Development

/branches/1.2/lib/config/sfLoader.class.php

You must first sign up to be able to contribute.

root/branches/1.2/lib/config/sfLoader.class.php

Revision 17858, 1.8 kB (checked in by FabianLange, 5 years ago)

[1.1, 1.2, 1.3] fixed some codeing standards (fixes #6376 - patch from gimler)

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * sfLoader is a class which contains the logic to look for files/classes in symfony.
13  *
14  * This class is deprecated. The same methods now exist in sfApplicationConfiguration.
15  *
16  * @package    symfony
17  * @subpackage util
18  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
19  * @version    SVN: $Id$
20  */
21 class sfLoader
22 {
23   /**
24    * Gets the helper directories for a given module name.
25    *
26    * @param string $moduleName The module name
27    *
28    * @return array An array of directories
29    */
30   static public function getHelperDirs($moduleName = '')
31   {
32     $configuration = sfProjectConfiguration::getActive();
33
34     $configuration->getEventDispatcher()->notify(new sfEvent(null, 'application.log', array('The sfLoader::getHelperDirs() method is deprecated. Please use the same method from sfApplicationConfiguration.', 'priority' => sfLogger::ERR)));
35
36     return $configuration->getHelperDirs($moduleName);
37   }
38
39   /**
40    * Loads helpers.
41    *
42    * @param array  $helpers    An array of helpers to load
43    * @param string $moduleName A module name (optional)
44    *
45    * @throws sfViewException
46    */
47   static public function loadHelpers($helpers, $moduleName = '')
48   {
49     $configuration = sfProjectConfiguration::getActive();
50
51     $configuration->getEventDispatcher()->notify(new sfEvent(null, 'application.log', array('The sfLoader::loadHelpers() method is deprecated. Please use the same method from sfApplicationConfiguration.', 'priority' => sfLogger::ERR)));
52
53     return $configuration->loadHelpers($helpers, $moduleName);
54   }
55 }
56
Note: See TracBrowser for help on using the browser.