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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:48:16+00:00 2026-05-27T10:48:16+00:00

My controller name is api and I want to create an action update_user_infoAction() ,

  • 0

My controller name is api and I want to create an action update_user_infoAction(), but when I try to create an action zf create action update_user_info Api, I get an error :

Action names should be camel cased.

Here is my terminal command and output:

volition@volition-H61M-DS2:/var/www/Dashboard_check$ zf create action update_user_info Api

Note: PHPUnit is required in order to generate controller test stubs.
An Error Has Occurred
Action names should be camel cased.

Zend Framework Command Line Console Tool v1.11.10
Details for action “Create” and provider “Action”
Action
zf create action name controller-name[=Index] view-included[=1] module

Someone suggested that I use Zend Router but I am a newbie in Zend Framework so please suggest to me how I can create this action.

Note :- I do not want to change my action name

I am trying to create an action with an underscore. I’ve added this code to my bootstrap:

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap 
{ 
    protected function _initDoctype() 
    { 
         $dispatcher = $front->getDispatcher();
         $dispatcher->setWordDelimiter(array('.', '-'))->setPathDelimiter(''); 
    } 
} 

However, when I do the following: zf create controller update_user_info, I still get the same error.

Update: As suggested by @emaillenin

I am Trying this now :

<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initDoctype() 
    {
        $frontController = Zend_Controller_Front::getInstance();
        $dispatcher = $frontController->getDispatcher();
        $dispatcher->setWordDelimiter(array('-', '.', '_'));
    }
}

http://localhost/Dashboard_check/public/api/update_user_info

but again, it doesn’t work as it works for

http://localhost/Dashboard_check/public/api/updateuserinfo

  • 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-27T10:48:17+00:00Added an answer on May 27, 2026 at 10:48 am

    In your bootstrap, add the following lines of code,

    $frontController = Zend_Controller_Front::getInstance();
    $dispatcher = $frontController->getDispatcher();
    $dispatcher->setWordDelimiter(array('-', '.', '_'));
    

    When you call http://www.example.com/api/update_user_info

    the following function will be invoked.

    public function updateUserInfoAction() {
    
    }
    

    Keep your view script for this action in update-user-info.phtml

    References –

    http://zend-framework-community.634137.n4.nabble.com/Question-about-underscores-in-controller-and-action-names-td656525.html

    http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend-framework-2/underscore-action-name-1204.html

    http://zend-framework-community.634137.n4.nabble.com/underscore-in-URL-td648359.html

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

Sidebar

Related Questions

I have a get-parameter with name controller . When I try to pass it
I have a action on my controller (controller name is 'makemagic') called 'dosomething' that
How can I get the controller name of a relative Url, using the routes
How can I get the controller name out of the object if I don't
I have the following route: routes.MapRoute( Default, // Route name {controller}/{action}/{id}, // URL with
I want to create several link_to_remote links that are campaign names: <% @campaigns.each do
I want to have my API controller use SSL, so I added another listen
I am building a mvc 4 web api but when ever I try to
How to hide controller name in Url? I use the ASP.NET MVC. The original
Is there a class in the ASP.NET MVC framework that represents a controller name

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.