Sign in to follow this  
  • entries
    43
  • comments
    51
  • views
    31883

Oh No!

Sign in to follow this  

265 views

It seems that I misunderstood exactly how PHP's include_once() and require_once() worked. I assumed that no matter how many times they were called they would still execute the global code. It seems very obvious to me now that that cant possibly be the case not just because it doesnt make any sense but because it certainly doesnt work like that in my CMS [dead].

This is a big problem because my design rests on this assumption! The global code that is executed returns a list of the functions that perform the various content generating and administrative tasks of the module so that the CMS can execute those operations. If I cant get at those functions then bad things happen.

Here's my new solution: I'm going to add a field to the Registered table. This field will be the name of the function in the module that returns these other administrative functions.

*Edit - nevermind. One of those functions is a function that helps install the module. This installation would fill such a field. Without this field I cant call the installation function. Without the installation function I cant fill the field.

I suppose I could force a strict naming convention... but I dont want to do that. Hopefully I'll become inspired to a better solution.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now