ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE3/trunk/lib/config/opConfig.class.php @ 10020

Last change on this file since 10020 was 10020, checked in by ebihara, 12 years ago

#3388:renamed the OpenPNEConfig class to the opConfig class

File size: 1017 bytes
Line 
1<?php
2
3/**
4 * This file is part of the OpenPNE package.
5 * (c) OpenPNE Project (http://www.openpne.jp/)
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file and the NOTICE file that were distributed with this source code.
9 */
10
11/**
12 * opConfig is a wrapper class to handle SnsConfig
13 *
14 * @package    OpenPNE
15 * @subpackage config
16 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
17 */
18class opConfig extends sfConfig
19{
20  /**
21   * Retrieves a config parameter.
22   *
23   * @param  string $name    A config parameter name
24   * @param  mixed  $default A default config parameter value
25   *
26   * @return mixed A config parameter value
27   */
28  public static function get($name, $default = null)
29  {
30    $setting = parent::$config['openpne_sns_config'];
31    $result = null;
32
33    if (isset($setting[$name]))
34    {
35      $result = SnsConfigPeer::get($name, $default);
36      if (is_null($result))
37      {
38        $result = $setting[$name]['default'];
39      }
40    }
41
42    return $result;
43  }
44}
Note: See TracBrowser for help on using the repository browser.