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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:56:21+00:00 2026-05-31T13:56:21+00:00

currently i am doing a project in zend the way i am doing is

  • 0

currently i am doing a project in zend the way i am doing is working perfectly but i am sure its not the way i am suppose to do i mean i am not following MVC and i want to apply MVC in my zend app.
i am pasting code of one simple module which will describe what i am doing .kindly correct me where i am making faults.

my controller

class ContactsController extends Zend_Controller_Action{

   public function contactsAction(){
    if(!Zend_Auth::getInstance()->hasIdentity()){
          $this->_redirect('login/login');
      }
      else{

       $request                = $this->getRequest();
       $user                   = new Zend_Session_Namespace('user');
       $phone_service_id       = $user->p_id;

       $instance               = new Contacts();
       $select                 = $instance->Get_Contacts($p_id);

       $adapter                = new Zend_Paginator_Adapter_DbSelect($select);
       $paginator              = new Zend_Paginator($adapter);
       .
               .
       //more code
   }

plz note this 2 line in my controller

$instance               = new Contacts();
$select                 = $instance->Get_Contacts($pid);

this is my contacts class in models

class Contacts extends Zend_Db_Table{

function Get_Contacts($p_id){
    $DB = Zend_Db_Table_Abstract::getDefaultAdapter();

    $select = $DB->select()
         ->from('contact', array('contact_id','contact_first_name','contact_mobile_no','contact_home_no','contact_email','contact_office_no'))
         ->where('pid = ?', $p_id)
         ->order('date_created DESC');

         return $select;
    }
    }

after this i simple assign my result to my view.

note please
as its working but there is not private data members in my class,my class is not a blue print.there are no SETTERS AND GETTERS .how can i make my code that best suits MVC and OOP??

  • 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-31T13:56:23+00:00Added an answer on May 31, 2026 at 1:56 pm

    keep one thing in mind when u learn new technology so first read thier own documentation. No one can explain better than them. Its hard to understand firstly but when you study it you will usedto and than u will love it like me Zend Offical Site

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

Sidebar

Related Questions

I'm currently doing a project in C# working with windows forms. During the course
I'm currently doing the following to compensate for boolean's not mapping well to radio
I'm currently doing my third year programming project and its a folio tracker. :/
I am currently doing a big project (by big I mean, many processes) where
Hi i am currently doing a school project using cakePHP. I have the following
I am currently doing a project in which I have to request data from
I'm currently doing a project where I have to interact with a circuit I
I am new to Entity Framework. I am currently doing a project in ASP.NET,
I have this interesting obstacle on my project. I am currently doing a MVC3
I'm currently trying to teach myself PHP by doing a small image-processing type project

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.