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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:17:21+00:00 2026-06-17T23:17:21+00:00

I know that REST API can be implemented using Zend_Rest_Controller and it has 5

  • 0

I know that REST API can be implemented using Zend_Rest_Controller and it has 5 abstract methods indexAction, getAction, postAction,putAction,deleteAction to perform return, create, update , etc…

My question is, can I have more API fictions with in a controller apart from these default functions to perform various type of operations?.

Eg:

indexAction – returns a list of available books,

searchAction – returns a list of books based on search criterion.
(I know it can be done in the indexAction with some parameters but then the code will look more complicated, I need to avoid that)

  • 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-17T23:17:22+00:00Added an answer on June 17, 2026 at 11:17 pm

    Yes, you can create custom action methods in your controller. Although you’re extending the abstract class Zend_Rest_Controller, as long as you define those 5 abstract methods (the ones you’ve already mentioned), you’re free to customise the rest of your class.

    The only similar method you might look into is the getAction(). This expects a parameter with the name of ID and will retrieve a record based on the primary key.


    You’d probably have to define your routing in a configuration file:

    routes.archive.route = "search/:keyword"
    routes.archive.defaults.controller = books
    routes.archive.defaults.action = search
    routes.archive.defaults.year = "Hamlet"
    routes.archive.reqs.year = "\s+"
    

    And then you need to feed these configuration options into your Router:

    $config = new Zend_Config_Ini('/path/to/config.ini', 'production');
    $router = new Zend_Controller_Router_Rewrite();
    $router->addConfig($config, 'routes');
    

    Read Zend’s documentation for a more in-depth tutorial.

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

Sidebar

Related Questions

Hi I know that I can set the rest authentication in Phil Sturgeons rest
I'm starting to develop with Neo4j using the REST API. I saw that there
Using the old REST API, you could do call https://api.facebook.com/method/pages.isAdmin to know if a
I was looking for a REST api that can give a list of nearby
I know that Phonegap has an event for back button, but it's only available
I know that this sort of question has been asked here before, but still
I know that I can hijack a form by showing a login form in
I know that in order to download a cookie associated with an account using
I know that many threads has been created here & on the internet about
I'm working on a largely navigation-based iPhone app that communicates with a REST API

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.