phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Outside data stored outside forum directory

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

Re: [RFC] Outside data stored outside forum directory

Postby ToonArmy » Wed Apr 21, 2010 7:15 pm

The other cache modules store their configuration as constants, there is no way around this as we need the cache instantiated before selecting the configuration tables contents.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image
User avatar
ToonArmy
Registered User
 
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK

Re: [RFC] Outside data stored outside forum directory

Postby Oleg » Wed Apr 21, 2010 8:45 pm

eviL3 wrote:I guess you could come up with a complex way to configure the cache. But there's no way you can predict the arguments the module will need. Creating the instance directly seemed like the simplest and most flexible way to do it. Of course, it's just a suggestion.

Supposing a cache instance is created like this:
Code: Select all
$cache = new cache($a, $b, $c);

The following could be done instead:
Code: Select all
// config.php
$cache_args = array($a, $b, $c);

// elsewhere
// php 5.1.3+. http://php.net/manual/en/function.call-user-func-array.php
$reflectionObj = new ReflectionClass($cache_className);
$cache = $reflectionObj->newInstanceArgs($cache_args);


Using a variable seems more consistent with e.g. cache type.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Outside data stored outside forum directory

Postby Oleg » Sat Apr 30, 2011 3:43 pm

Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Outside data stored outside forum directory

Postby *Daniel » Sat May 19, 2012 2:02 am

Just wondering if there an update to this?
Oleg wrote:This topic's title takes the prize for most errors per word (3 in 4).
*Daniel
Registered User
 
Posts: 161
Joined: Mon Feb 08, 2010 3:42 am

Previous

Return to [3.x] RFCs

Who is online

Users browsing this forum: Exabot [Bot] and 18 guests