REST API in joomla 3.4 with SLIM Framework PART 2

Flowing on from REST API in joomla 3.4 with SLIM Framework PART 1 it’s time to to use the real power of Slim Framework. In this second part of tutorial series , we will use SLIM Framework in Joomla way of style to create powerful API.

As we learned in Part 1 of this article, how to load SLIM Framework in our joomla 3.4 project and how to instantiate SLIM framework, directory structure explained in part 1 of this tutorial, in this part we will create index.php file flowing our directory structure.

Let’s start

create index.php in /your_project/api/v1/index.php . and paste bellow code, hey don’t get confused by seeing this messy line of code , don’t worry i will explain each line.

  1. <?php
  2. define(‘_JEXEC’, 1);
  3. define(‘_API’, 1);
  4. define(‘JPATH_BASE’, dirname(dirname(dirname(__FILE__))));
  5. // Include the Joomla framework
  6. require_once JPATH_BASE . ‘/includes/defines.php’;
  7. require_once JPATH_BASE . ‘/includes/framework.php’;

-For complete information, Read the full at: REST API in joomla 3.4 with SLIM Framework PART 2

FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP quetions and answers, to instantly resolve your various language queries.

Apart from this, If you have any html language issue, you can post at HTML developer forum and get instantly resolved it from highly experienced FindNerd community members.

Advertisements
REST API in joomla 3.4 with SLIM Framework PART 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s