[Beeframework-svn] SF.net SVN: beeframework:[25] trunk
Brought to you by:
b_hartmann,
m_plomer
From: <m_p...@us...> - 2013-05-02 10:40:48
|
Revision: 25 http://sourceforge.net/p/beeframework/code/25 Author: m_plomer Date: 2013-05-02 10:40:45 +0000 (Thu, 02 May 2013) Log Message: ----------- - PHP 5.3 class loading - minor fixes Modified Paths: -------------- trunk/framework/Bee/Cache/Manager.php trunk/framework/Bee/Context/Xml/ReaderContext.php trunk/framework/Bee/MVC/View/Smarty3Adapter.php trunk/framework/BeeFramework.php Added Paths: ----------- trunk/composer.json Added: trunk/composer.json =================================================================== --- trunk/composer.json (rev 0) +++ trunk/composer.json 2013-05-02 10:40:45 UTC (rev 25) @@ -0,0 +1,28 @@ +{ + "name": "bee-framework/bee-framework", + "type": "library", + "description": "Bee Framework - PHP 5 DI/IoC application framework", + "keywords": ["framework"], + "homepage": "http://sourceforge.net/projects/beeframework/", + "license": "Apache License V2.0", + "authors": [ + { + "name": "Michael Plomer", + "email": "mic...@it..." + }, + { + "name": "Benjamin Hartmann" + } + ], + "require": { + "php": ">=5.2.3", + "niktux/addendum": "0.4.1", + "apache/log4php": "2.3.0" + }//, +// "autoload": { +// "classmap": [ +// "distribution/libs/Smarty.class.php", +// "distribution/libs/SmartyBC.class.php" +// ] +// } +} \ No newline at end of file Property changes on: trunk/composer.json ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/framework/Bee/Cache/Manager.php =================================================================== --- trunk/framework/Bee/Cache/Manager.php 2013-05-02 10:34:07 UTC (rev 24) +++ trunk/framework/Bee/Cache/Manager.php 2013-05-02 10:40:45 UTC (rev 25) @@ -135,8 +135,9 @@ public static function &retrieveCachable(Bee_Cache_ICachableResource $resource, $returnInfoArray = false) { if(is_null(self::$provider)) { // no cache provider found, no caching or unsupported cache type installed - $data =& $resource->createContent(); - return $returnInfoArray ? array(self::INFO_NO_CACHE_KEY => true, self::INFO_CACHE_HIT_KEY => false, self::INFO_IN_CACHE_SINCE_KEY => false, self::INFO_DATA_KEY => $data) : $data; + $data =& $resource->createContent(); + $result = $returnInfoArray ? array(self::INFO_NO_CACHE_KEY => true, self::INFO_CACHE_HIT_KEY => false, self::INFO_IN_CACHE_SINCE_KEY => false, self::INFO_DATA_KEY => &$data) : $data; + return $result; } // caching supported, check if in cache and not stale @@ -197,4 +198,3 @@ return self::$provider->clearCache(); } } -?> \ No newline at end of file Modified: trunk/framework/Bee/Context/Xml/ReaderContext.php =================================================================== --- trunk/framework/Bee/Context/Xml/ReaderContext.php 2013-05-02 10:34:07 UTC (rev 24) +++ trunk/framework/Bee/Context/Xml/ReaderContext.php 2013-05-02 10:40:45 UTC (rev 25) @@ -47,7 +47,7 @@ Bee_Context_Config_IBeanDefinitionRegistry $registry, Bee_Context_Xml_Namespace_IHandlerResolver $namespaceHandlerResolver) { - $this->log = Logger::getLogger(__CLASS__); + $this->log = BeeFramework::getLoggerForClass(__CLASS__); $this->registry = $registry; $this->namespaceHandlerResolver = $namespaceHandlerResolver; @@ -87,4 +87,3 @@ $this->log->info($message); } } -?> \ No newline at end of file Modified: trunk/framework/Bee/MVC/View/Smarty3Adapter.php =================================================================== --- trunk/framework/Bee/MVC/View/Smarty3Adapter.php 2013-05-02 10:34:07 UTC (rev 24) +++ trunk/framework/Bee/MVC/View/Smarty3Adapter.php 2013-05-02 10:40:45 UTC (rev 25) @@ -15,7 +15,11 @@ * limitations under the License. */ -class Bee_MVC_View_Smarty3Adapter extends Smarty implements Bee_Context_Config_IInitializingBean { +/** + * Class Bee_MVC_View_Smarty3Adapter + * @deprecated probably not needed for Smarty3? + */ +class Bee_MVC_View_Smarty3Adapter extends Smarty /*implements Bee_Context_Config_IInitializingBean*/ { // /** // * @@ -92,5 +96,4 @@ $this->config_load($configFile); } } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: trunk/framework/BeeFramework.php =================================================================== --- trunk/framework/BeeFramework.php 2013-05-02 10:34:07 UTC (rev 24) +++ trunk/framework/BeeFramework.php 2013-05-02 10:40:45 UTC (rev 25) @@ -171,7 +171,6 @@ foreach(self::getClassFileLocations($className) as $loc) { include $loc; - if (class_exists($className, false) || interface_exists($className, false)) { return true; } @@ -182,7 +181,7 @@ public static function getClassFileLocations($className) { return array( - str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php', + str_replace('_', DIRECTORY_SEPARATOR, str_replace('\\', DIRECTORY_SEPARATOR, $className)) . '.php', $className . '.php' ); } @@ -215,13 +214,13 @@ self::handleException($e); } } - - /** - * Convenience method, dispatches current request using the given dispatcher context. - * - * @param String $configLocation comma-separated string XML config files to load the bean definitions from - * @return void - */ + + /** + * Convenience method, dispatches current request using the given dispatcher context. + * + * @param Bee_IContext $ctx + * @return void + */ public static function dispatchRequestUsingContext(Bee_IContext $ctx) { try { Bee_Utils_Assert::notNull($ctx); @@ -340,6 +339,10 @@ public static function getProductionMode() { return self::$productionMode; } + + public static function getLoggerForClass($className) { + return Logger::getLogger(str_replace('_', '.', str_replace('\\', '.', $className))); + } } BeeFramework::init(); @@ -347,5 +350,4 @@ require_once dirname(__FILE__).'/Bee/Utils/ITypeDefinitions.php'; interface TYPES extends Bee_Utils_ITypeDefinitions { -} -?> \ No newline at end of file +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |