File tree 11 files changed +37
-17
lines changed
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.
49
49
### Prerequisites
50
50
51
51
- PHP 7.2+
52
- - CodeIgniter Framework (4.* recommanded )
52
+ - CodeIgniter Framework (4.* recommended )
53
53
- Composer
54
54
- PHP sockets extension enabled
55
55
@@ -80,6 +80,11 @@ PHP spark serve --port=9092
80
80
``` sh
81
81
php public/index.php Websocket start
82
82
```
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
+ ```
83
88
84
89
** WOW You made it !!!** :heavy_check_mark :
85
90
Original file line number Diff line number Diff line change 5
5
" codeigniter" ,
6
6
" codeigniter4" ,
7
7
" php7" ,
8
+ " php8" ,
8
9
" php-library" ,
9
10
" codeigniter websocket" ,
10
11
" websocket" ,
22
23
}
23
24
],
24
25
"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 "
28
29
},
29
30
"require-dev" : {
30
31
"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 ;
2
4
3
5
use Config \Autoload ;
4
6
use CodeIgniter \CLI \CLI ;
13
15
*
14
16
* CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
15
17
*/
16
-
17
18
class Publish extends BaseCommand
18
19
{
19
20
/**
Original file line number Diff line number Diff line change 1
- <?php namespace Takielias \CodeigniterWebsocket \Config ;
1
+ <?php
2
+
3
+ namespace Takielias \CodeigniterWebsocket \Config ;
2
4
3
5
use CodeIgniter \Config \BaseConfig ;
4
6
Original file line number Diff line number Diff line change 1
- <?php namespace Takielias \CodeigniterWebsocket \Config ;
1
+ <?php
2
+
3
+ namespace Takielias \CodeigniterWebsocket \Config ;
2
4
3
5
use CodeIgniter \Config \BaseService ;
4
6
use CodeIgniter \Config \BaseConfig ;
12
14
*
13
15
* CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
14
16
*/
15
-
16
17
class Services extends BaseService
17
18
{
18
19
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 ;
2
4
3
5
use CodeIgniter \Controller ;
4
6
Original file line number Diff line number Diff line change 1
- <?php namespace Takielias \CodeigniterWebsocket \Exceptions ;
1
+ <?php
2
+
3
+ namespace Takielias \CodeigniterWebsocket \Exceptions ;
2
4
3
5
use CodeIgniter \Exceptions \ExceptionInterface ;
4
6
use CodeIgniter \Exceptions \FrameworkException ;
12
14
*
13
15
* CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
14
16
*/
15
-
16
17
class CodeigniterWebsocketException extends FrameworkException implements ExceptionInterface
17
18
{
18
19
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 ;
2
4
3
5
use Takielias \CodeigniterWebsocket \Libraries \JWT ;
4
6
11
13
*
12
14
* CodeIgniter WebSocket library. It allows you to make powerful realtime applications by using Ratchet Websocket
13
15
*/
14
-
15
16
class Authorization
16
17
{
17
18
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 ;
2
4
3
5
use CodeIgniter \Config \BaseConfig ;
4
6
use 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 ;
2
4
3
5
/**
4
6
* JSON Web Token implementation, based on this spec:
Original file line number Diff line number Diff line change 1
- <?php namespace Takielias \CodeigniterWebsocket \Libraries ;
1
+ <?php
2
+
3
+ namespace Takielias \CodeigniterWebsocket \Libraries ;
2
4
3
5
use CodeIgniter \Config \BaseConfig ;
4
6
use Ratchet \ConnectionInterface ;
You can’t perform that action at this time.
0 commit comments