File tree Expand file tree Collapse file tree 11 files changed +37
-17
lines changed Expand file tree Collapse file tree 11 files changed +37
-17
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ To get a local copy up and running follow these simple example steps.
4949### Prerequisites
5050
5151- PHP 7.2+
52- - CodeIgniter Framework (4.* recommanded )
52+ - CodeIgniter Framework (4.* recommended )
5353- Composer
5454- PHP sockets extension enabled
5555
@@ -80,6 +80,11 @@ PHP spark serve --port=9092
8080``` sh
8181php public/index.php Websocket start
8282```
83+ ** N.B** : Don't forget to add the following line in app/Config/Routes.php ` app/Config/Routes.php `
84+
85+ ``` php
86+ $routes->setAutoRoute(true);
87+ ```
8388
8489** WOW You made it !!!** :heavy_check_mark :
8590
Original file line number Diff line number Diff line change 55 " codeigniter" ,
66 " codeigniter4" ,
77 " php7" ,
8+ " php8" ,
89 " php-library" ,
910 " codeigniter websocket" ,
1011 " websocket" ,
2223 }
2324 ],
2425 "require" : {
25- "php" : " ^7.2" ,
26- "cboden/ratchet" : " ^0.4.1 " ,
27- "textalk/websocket" : " ^1.2 "
26+ "php" : " ^7.2|^8.0 " ,
27+ "cboden/ratchet" : " ^0.4.4 " ,
28+ "textalk/websocket" : " ^1.6.3 "
2829 },
2930 "require-dev" : {
3031 "codeigniter4/framework" : " dev-master"
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Commands ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Commands ;
24
35use Config \Autoload ;
46use CodeIgniter \CLI \CLI ;
1315 *
1416 * CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
1517 */
16-
1718class Publish extends BaseCommand
1819{
1920 /**
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Config ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Config ;
24
35use CodeIgniter \Config \BaseConfig ;
46
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Config ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Config ;
24
35use CodeIgniter \Config \BaseService ;
46use CodeIgniter \Config \BaseConfig ;
1214 *
1315 * CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
1416 */
15-
1617class Services extends BaseService
1718{
1819 public static function CodeigniterWebsocket (BaseConfig $ config = null , bool $ getShared = true )
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Controllers ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Controllers ;
24
35use CodeIgniter \Controller ;
46
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Exceptions ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Exceptions ;
24
35use CodeIgniter \Exceptions \ExceptionInterface ;
46use CodeIgniter \Exceptions \FrameworkException ;
1214 *
1315 * CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
1416 */
15-
1617class CodeigniterWebsocketException extends FrameworkException implements ExceptionInterface
1718{
1819 public static function forMissingName ()
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Libraries ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Libraries ;
24
35use Takielias \CodeigniterWebsocket \Libraries \JWT ;
46
1113 *
1214 * CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
1315 */
14-
1516class Authorization
1617{
1718 public static function validateTimestamp ($ token )
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Libraries ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Libraries ;
24
35use CodeIgniter \Config \BaseConfig ;
46use Ratchet \Http \HttpServer ;
Original file line number Diff line number Diff line change 1- <?php namespace Takielias \CodeigniterWebsocket \Libraries ;
1+ <?php
2+
3+ namespace Takielias \CodeigniterWebsocket \Libraries ;
24
35/**
46 * JSON Web Token implementation, based on this spec:
You can’t perform that action at this time.
0 commit comments