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

The Archive Base Latest Questions

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

I working with Luracast Restler API frame work and cannot figure out how to

  • 0

I working with Luracast Restler API frame work and cannot figure out how to specify a default behavior for the root directory. For example:

webroot/user – will invoke the class User method get() by default

webroot/ – return a 404

Is there a catch all class/method for the base path?

  • 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-26T13:38:28+00:00Added an answer on May 26, 2026 at 1:38 pm

    Creating default class and default action to map it as the root

    on your index.php (gateway)

    require_once '../../restler/restler.php';
    require_once 'say.php';
    $r = new Restler();
    //blank string as the second param removes class_name from the URL
    $r->addAPIClass('Say','');
    $r->handle();
    

    This makes Say as the default class, mapped to the root
    Next on your API class (Say) define an index method, it can also be a get method

    class Say {
        function index($to='world') {
            return "Hello $to!";
        }
    }
    

    then calling

    GET index.php
    

    will return Hello World!

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

Sidebar

Related Questions

I am working with Luracast Restler API framework and am wondering how to organize
Working example: http://alpha.jsfiddle.net/gTpWv/ Both of the methods work separately, but once regexp for smilies
Working on a somewhat complex page for configuring customers at work. The setup is
Working with an API that can handle multiple connections (i.e. sessions), each of these
Working through this for fun: http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/ Example calculation of nullable and first uses a
Working Example: This is almost identical to code I use in another places on
Working on a little Ruby script that goes out to the web and crawls
Working on a program in python to print out the first 1000 prime numbers
Working with an API where I need to send a value over in an
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch

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.