PHP에서 MVC의 액션

이제 우리의 컨트롤러에 클래스 메서드를 추가해 보겠습니다. MVC 용어에서 컨트롤러의 메서드는 액션 (actions)이라고 불립니다. 예를 들어, 두 개의 액션 - show1 과 show2을 만들고, 각 액션에서 화면에 무언가를 출력해 보겠습니다:

project/controllers/PageController.php<?php
  namespace Project\Controllers;
  use \Core\Controller;
  
  class PageController extends Controller
  {
    public function show1()
    {
      echo '1';
    }
    
    public function show2()
    {
      echo '2';
    }
  }
?>