Skip to content

Commit

Permalink
Fix namespace incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
cth-inni committed Aug 30, 2021
1 parent da20e8a commit 4486cd9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"name": "tanghoong/php-chat-block",
"description": "an dialogue chat block display component for php project",
"name": "tanghoong/phpchatblock",
"type": "library",
"description": "PHPChatBlock is a dialogue chat block display component class for PHP",
"license": "MIT",
"authors": [
{
"name": "Tang Hoong",
"email": "[email protected]"
},
{
"name": "exiang"
}
],
"minimum-stability": "stable",
"require": {},
"require": {
"php": ">=7.4"
},
"autoload": {
"psr-4": {"CTH\\ChatBlock\\": "src/"}
"psr-4": {"TangHoong\\ChatBlock\\": "src/"}
}
}
3 changes: 1 addition & 2 deletions demo.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
require 'vendor/autoload.php';
// include './src/ChatBlock.php';
use ChatBlock as ChatUI;
use \TangHoong\ChatBlock\ChatBlock as ChatUI;

// $sample = file_get_contents('./sample.txt');
$sample = file_get_contents('./chapter.1.txt');
Expand Down
12 changes: 3 additions & 9 deletions src/ChatBlock.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<?php
namespace CTH\ChatBlock;
/**
* PHP Chat Block Component (0.0.1)
* A dialogue chat block display component for php project.
* A UI component for conversational novel community.
* Date: 30 Aug, 2021
* Author: Tang Hoong
*/
class ChatUI
namespace TangHoong\ChatBlock;

class ChatBlock
{
public $colonList;
public $narratorList;
Expand Down

0 comments on commit 4486cd9

Please sign in to comment.