Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7410719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:16:35+00:00 2026-05-29T06:16:35+00:00

I have got a class which is called BaseCore which just runs all the

  • 0

I have got a class which is called “BaseCore” which just runs all the spl_autoload_registers(); which are in that file.

class BaseCore{

public function __construct(){
    spl_autoload_register( 'loadClasses' );   
    spl_autoload_register( 'loadConfig' );
    spl_autoload_register( 'loadFMAPI' );
}

My second class extends BaseCore which on every new class that I want to extend the BaseCore, I have to require/include the BaseCore class.

require_once( 'classes/baseCore.class.php' );

class SchedulerDND extends BaseCore {

However, this seems very obsolete and an old way to do this.

So I guess my question is, how would I include the BaseCore into my child-class without having to write require_once(); on every child-class?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:16:36+00:00Added an answer on May 29, 2026 at 6:16 am

    All you spl_autoload_register classes should be in some type of bootstrap file
    For example create bootstrap.php and put all your autoload calls there.
    Then you would make sure you always include your bootstrap file
    For example, require ‘bootstrap.php’ in your index.php

    That’s all there is to it.
    You bootstrap.php is loaded only once then you able to rely on autoloader to load all your classes, no need to have require or require_once in any of your classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class which get all the bytes from a file, then it
I have got the following code in a file called test.java which is located
I have got a utility class, called ErrorLog , which basically does some basic
I have got a template class as follows: class MyClass<T> { T field; public
I have got a designing dilema. I have a class named UserAccount that represent
I've got a template class called w32file which works with both wchar_t and char.
I got 4 activites that all include a xml-footer which contains 4 buttons (one
I've got a class called Request . At some point in that class I
I have a generic class called db which talks directly to the database. And
I've got a class that represents an XML file to be processed. I've created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.