Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
ueaner committed Apr 2, 2019
1 parent 2853d02 commit 49548e1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/Controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,8 @@

class IndexController extends Controller
{
public function __construct()
{
$eventManager = new EventManager();
// 添加 index 事件空间,监听 index.* 的事件
$eventManager->attach('index', new IndexEvents());

$this->setEventManager($eventManager);
}

public function index()
{
$this->trigger('index.prepare', 'some data from index');

$this->view->setVar('name', 'Soli');
}
}

0 comments on commit 49548e1

Please sign in to comment.