[Pmwiki-users] PmWikiDataStore - Using a class for page file i/o.

Greg Morgan Cybie
Mon Mar 22 00:35:06 CST 2004


Patrick R. Michaud wrote:

>On Sun, Mar 21, 2004 at 10:55:02PM -0800, Greg Morgan wrote:
>  
>
>>   It's  funny.. in my head it actually smplifies things.  I re-wrote the
>>   existing ReadPage, WritePage functions to use the class.. so as far as
>>   the  rest of PmWiki is concerned nothing changed.  The addition of the
>>   PageList  method  makes  writing  code  that needs to act on all pages
>>   easier to impliment.
>>    
>>
>
>I agree there needs to be a PageList function--I was actually planning
>to write one (but would've probably called it something else--most of
>my other function names begin with verbs, although PageExists is a notable
>exception).  
>
>  
>
I'm flexible. :)  How about GetPageList? :)   Seriously, whatever you 
want to call the functions is fine with me.

>>Isn't there a way to write some XML-RPC glue to call HandlePost
>>with the needed information rather than having to duplicate it?
>>Or, I could abstract the relevant details of HandlePost into a
>>separate function that's more easily called by an XML-RPC handler.
>>
>>   handlepost  uses  $_POST  array quite a bit.  While I might be able to
>>   populate  all  of  the  global variables needed to use the handle_post
>>   function, it seemed kind of clunky to me.
>>    
>>
>
>I agree, which is why it might be worthwhile to abstract it to a
>PostPage function, with HandlePost filling in the relevant variables
>from $_POST and an XML-RPC filling in the variables from its function.
>
>I'm not sure that HandlePost (or PostPage) belong in a storage 
>class/object, to me it seems it ought to be somehow independent 
>of the storage mechanism being used, or that it's at a slightly
>higher layer of abstraction than the other methods.
>
>Pm
>  
>
I went back and forth on the PostPage method also... If you want to take 
that out of the class and create a separate function the serves the same 
purpose, that'll work just fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://contra.vosn.net/pipermail/pmwiki-users_pmichaud.com/attachments/20040321/72aa0381/attachment.htm


More information about the pmwiki-users mailing list