Home » Php » naming conventions – In a (PHP) framework, what would be a good name for a "manager" class?

naming conventions – In a (PHP) framework, what would be a good name for a "manager" class?

Posted by: admin July 12, 2020 Leave a comment

Questions:

I’m building a PHP framework and my english is not the best.
There are several classes (database abstraction, module, router,…) in my framework and there is a place where they all have to be initialized and executed together.

  • What is a good name for a “master” class that initializes and runs all other classes?
How to&Answers:

BuckarooBonzaiAndTheBootstrapInitiatorRoutine

Answer:

bootstrap

adding random text since it won’t let me submit otherwise

Answer:

Whatever you want to call the framework?

Answer:

root?

adding random text since it won’t let me submit otherwise

Answer:

You can name it Delegator.

Answer:

What is a good name for a “master” class that initializes and runs all other classes?

ClassFactory

Answer:

Why not TypeYourAppNameHere?

Answer:

ActiveBase

this will be a nice name for the master class i guess

Answer:

core

adding random text since it won’t let me submit otherwise

Answer:

bootstrapper

adding random text since it won’t let me submit otherwise

Answer:

Driver?

adding random text since it won’t let me submit otherwise

Answer:

Gennerally that would be the name of your framework.

$Opue

would work nicely. Or you could add a prefix. fwOupe.

Answer:

I use an Application singleton:

class Foo 
{
  public function bar()
  {
    $app = Application::getInstance();
    $app->db->query( ... );
  }
}

Answer:

I will call it main. The C++ main function does the same things in some projects – just create instances of some important classes.

Answer:

GlobalFactory ?

Answer:

It’s an initialisation or bootup routine right? So why not Boot or GlobalInitialiser or similar?

(adjust to crazy American spelling as needed ;))