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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:29:25+00:00 2026-06-04T16:29:25+00:00

$object_cin = new CIO( ); $object_cin->invoke( $_POST[ ‘model’ ] ); class CIO { private

  • 0
$object_cin = new CIO( ); 
$object_cin->invoke( $_POST[ 'model' ] );

class CIO
{
    private function invoke( $model )
    {
        switch( $model ) 
        {
            case 'user_try':
                $model = new MUserTry();  
                $this->send( $model->invoke( 1 ) );
                break;
            case 'user_new':
                $model = new MUserNew( new IUniversals() , new IText(), new IMessage() ); 
                $this->send( $model->invoke() );
                break;
            case 'user_exist':
                $model = new MUserExist( new IUniversals() , new IText(), new IMessage() );  
                $this->send( $model->invoke() );
                break;
            case 'tweet':
                $model = new MTweet( new IUniversals() , new IText(), new IMessage() );
                $this->send( $model->invoke() );
                break; 
            default:
                echo "Incorrect Ajax Type provided";
        }
    }
    private function send( $string )
    {
        echo "|P|" . $string;
    }
}
  • 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-06-04T16:29:27+00:00Added an answer on June 4, 2026 at 4:29 pm

    Of course it will grow, and become impossible to maintain.

    First of all, what is with the generic Control class? A website is supposed to have multiple controllers (I am assuming that it is somehow related to MVC, because that’s where the term “controller” comes from), usually 1 controller per one “page” (granularity may change, depending on architectural pattern).

    Next problem is the big switch statement. Each of the case‘s there should be a separate method in a controller. You end up repeating parts of code, just because of the design mistake.

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

Sidebar

Related Questions

Considering this part of a Java class, private List<Object> components = new ArrayList<Object>(); private
object ReassignTest extends App { class X(var i : Int) def x = new
There seems to be an issue with my dequeue function within a queue class
In Python 2.7, I define an empty new-style class: In [43]: class C(object): pass
As in, can I pass cin to any function that accepts an ifstream object?
See this code here: class test { int n; int *j; public: test(int m)
I am encountering the following bug. I have a class Foo . Instances of
I am new in c++. I am trying to add a dragon object in
I'm very new to programming & came across a program in a book i'm
Currently I'm trying to set up a member function for Student that reads a

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.