Пример #1
0
 /**
  * Displays page
  *
  * According to the class's {@link $display} variable, this function decides
  * what page should be displayed and calls the appropriate function.
  *
  * @see    $display
  * @return void
  */
 function display()
 {
     switch ($this->display[0]) {
         case 'index':
             $this->displayIndex();
             break;
         case 'post':
             $this->displayPost($this->display[1]);
             break;
         case 'archive':
             $archive = new Archive($this, $this->display[1][0], $this->display[1][1]);
             $archive->display();
             break;
         case 'about':
             $this->displayAbout($this->display[1]);
             break;
         case 'comments':
             $this->displayComments($this->display[1], $this->display[2], $this->display[3]);
             break;
         case 'rss':
             $this->displayRSS();
             break;
         case 'admin':
             $admin = new Admin($this, $this->display[1], $this->display[2], array($this->display[3], $this->display[4]));
             $admin->display();
             break;
     }
     // switch
 }