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 3614422
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:14:48+00:00 2026-05-18T22:14:48+00:00

I have a models directory in my project, and I would like to save/files

  • 0

I have a models directory in my project, and I would like to save/files classes there with different namespaces.
Example:

models/User.php with classname Model_User
models/Table_User.php with classname Model_Table_User

For the first namespace I have this in bootstrap.php

$resourceLoader->addResourceTypes(array(
    'model' => array(
    'namespace' => 'Model',
    'path' => 'models'
    )
));

I can’t figure out how to add the second namespace so it detects files starting with Table_ Any ideas?

For now I’ve added a second directory named ‘tables’ but it’s getting confusing because I have each model name twice (once in the models diretory and once in the tables directory)

  • 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-18T22:14:49+00:00Added an answer on May 18, 2026 at 10:14 pm

    That’s something I do myself.
    I have “Model_” sat in ‘{APPLICATION_PATH}/models/’ and “DbTable_” sat in ‘{APPLICATION_PATH}/models/dbtables/’.

    
    $resourceLoader->addResourceTypes(array(
        'model' => array(
        'namespace' => 'Model_',
        'path' => APPLICATION_PATH.'/models/'
        ),
        'dbtable' => array(
        'namespace' => 'DbTable_',
        'path' => APPLICATION_PATH.'/models/dbtables/'
    ));
    
    

    You should of course modify this to according to your classnames and folder structure.
    APPLICATION_PATH is defined in your index.php — but I don’t remember if it contains a trailing slash, so check that just in case. (I’m not on my pc at the moment so I cannot check…)

    Simple as that! 🙂

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

Sidebar

Related Questions

I have a Python project with following directory structure: /(some files) /model/(python files) /tools/(more
In my Rails 3.2 models directory, I have a folder foo containing two classes:
With a PHP MVC project, I have a few model classes that load data
I have some model classes like Customer , Product , etc. in my project
I have the following Node.js directory structure. |--app/ |--app.js |--routers/ |--index.js/ |--models/ |--schemas.js |--post.js
I have models like this: class Vendor(models.Model): title = models.CharField() class Product(models.Model): ... vendor
I have models like this: class IdfPracownicy(models.Model): nazwa = models.CharField(max_length=100) class IdfPracaOpinie(models.Model): nazwa =
So, say I have models like this: class Foo(Model): name = CharField(max_length=200) def latest_comment(self):
I use flask with flask-peewee and wtfpeewee. So, I have models like that: class
I would like to use a Sqlite datbase in an iphone application. The example

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.