Skip to content

Commit

Permalink
Merge pull request #13 from iflylabs/raghav
Browse files Browse the repository at this point in the history
add namepace and autoload
  • Loading branch information
darklrd authored Jul 28, 2016
2 parents eb63fed + d988845 commit 58b96f5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"name": "iflylabs/iflychat-php",
"description": "A real time enterprise chat solution which can be integrated into any PHP website",
"keywords": ["chat", "chat room", "community", "embed chat", "friends", "group chat", "html5 chat", "live chat", "mobile chat", "one to one chat", "popup chat"],
"homepage": "https://iflychat.com/installation/php-chat-client"
"homepage": "https://iflychat.com/installation/php-chat-client",
"autoload": {
"psr-4": {"Iflylabs\\": "lib/"}
}
}
2 changes: 2 additions & 0 deletions examples/basic-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
const APP_ID = 'YOUR_APP_ID';
const API_KEY = 'YOUR_API_KEY';

$iflychat = new \Iflylabs\iFlyChat(APP_ID, API_KEY);

$iflychat_code = $iflychat->getHtmlCode();

?>
Expand Down
2 changes: 1 addition & 1 deletion examples/embed-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
const APP_ID = 'YOUR_APP_ID';
const API_KEY = 'YOUR_API_KEY';

$iflychat = new iFlyChat(APP_ID, API_KEY);
$iflychat = new \Iflylabs\iFlyChat(APP_ID, API_KEY);

$iflychat_code = $iflychat->getHtmlCode();

Expand Down
4 changes: 3 additions & 1 deletion examples/user-auth-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*
**/


require_once('../lib/iflychat.php');

/**
Expand All @@ -14,7 +15,8 @@
const APP_ID = 'YOUR_APP_ID';
const API_KEY = 'YOUR_API_KEY';

$iflychat = new iFlyChat(APP_ID, API_KEY);

$iflychat = new \Iflylabs\iFlyChat(APP_ID, API_KEY);

/**
* You may get user_id, user_name and other user details
Expand Down
2 changes: 2 additions & 0 deletions lib/iflychat.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Iflylabs;

class iFlyChat
{

Expand Down

0 comments on commit 58b96f5

Please sign in to comment.