Created
October 24, 2011 11:35
-
-
Save co3k/1308826 to your computer and use it in GitHub Desktop.
op3 performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/model/doctrine/SnsConfig.class.php b/lib/model/doctrine/SnsConfig.class.php | |
index 49a8163..dfe5f64 100644 | |
--- a/lib/model/doctrine/SnsConfig.class.php | |
+++ b/lib/model/doctrine/SnsConfig.class.php | |
@@ -10,20 +10,23 @@ | |
class SnsConfig extends BaseSnsConfig | |
{ | |
- protected $snsConfigSettings = array(); | |
+ protected static $snsConfigSettings = array(); | |
public function construct() | |
{ | |
- $this->snsConfigSettings = sfConfig::get('openpne_sns_config'); | |
+ if (!self::$snsConfigSettings) { | |
+ self::$snsConfigSettings = sfConfig::get('openpne_sns_config'); | |
+ } | |
+ | |
return parent::construct(); | |
} | |
public function getConfig() | |
{ | |
$name = $this->getName(); | |
- if ($name && isset($this->snsConfigSettings[$name])) | |
+ if ($name && isset(self::$snsConfigSettings[$name])) | |
{ | |
- return $this->snsConfigSettings[$name]; | |
+ return self::$snsConfigSettings[$name]; | |
} | |
return false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment