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

  • Home
  • SEARCH
  • 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 6653911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:19:38+00:00 2026-05-26T01:19:38+00:00

I am trying to migrate a project into an MVC framework (deciding between CI

  • 0

I am trying to migrate a project into an MVC framework (deciding between CI and Yii).

Now, I have, for the sake of argument, two objects, text and image, which I would like to build based on an object class.

Parent:

class Object() extends Somemodel{
protected $x;
protected $y;
protected $page;
...
methods()...
}

And children:

class Image() extends Object{
protected $width;
protected $height;
...
methods()...
}

class Text() extends Object{
protected $text;
protected $font;
...
methods()...
}

Now as I understand this is a nice approach becasue some common functions like getting x/y coordinates etc. will be placed in the Object while all specific things will be placed in the children classes.

I was hoping to have one table in the database to store the Object.

However frameworks are giving me hard time to try and make it work… which makes me think, that probably I am doing something wrong, because if everyone was doing it like this then, I suppose, frameworks would support that easily.

Any thoughts?

  • 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-26T01:19:39+00:00Added an answer on May 26, 2026 at 1:19 am

    You should not be doing this. You are violating Liskov Substitution principle (quick picture to explain it), which basically says that you should be able to replace instance of any child class , with instance of parent class.

    P.S. this is only my opinion , but i would warn you away from both of the frameworks you mentioned. They both have major design flaws and other issues. (if you want details, visit php chat room .. no point in flaming here)

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

Sidebar

Related Questions

Problem: I have a large Visual C++ project that I'm trying to migrate to
I am trying to migrate my project code from OSCache to EhCache. We have
I am trying to migrate my sandpit code into my main project but for
I am trying to migrate a small project, replacing some factories with Guice (it
I'm trying to migrate to ASP.Net MVC 2 and meet some issues. Here is
We're trying to migrate a .Net 3.5 solution into .Net 4.0, but are experiencing
I've inherited a project which we are trying to migrate to MySQL 5 from
I'm trying to migrate a WPF Application based on C# to identical project but
I have been trying to migrate a database from Sybase to MySQL. This is
I am trying to migrate an ASP.net 2.0 Project from 32 bit windows xp

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.