File: examples/frontcontroller_prefilters/controllers/page4.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Skeleton Framework  >  examples/frontcontroller_prefilters/controllers/page4.php  >  Download  
File: examples/frontcontroller_prefilters/controllers/page4.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 5 years ago
Size: 625 bytes
 

Contents

Class file image Download
<?php

class page4 {
    public
$_response = null;

    function
forceError($locator) {
        echo
"FORCE ERROR\n";
        return
false;
    }
   
    function
index($locator) {
        if (
$this->_response) {
           
$message = 'Response object set as property by setter injection. ';
        } else {
           
$message = 'Response object created locally, no setter injection. ';
           
$this->_response = $locator->get('Response');
        }
       
$content = "
<html>
<body>
    <h2>Front Controller: Page 4 - Action</h2>
    <p>
$message</p>
    <a href=\"?controller=home\">Return Home</a>
</body>
</html>
"
;
       
$this->_response->setContent($content);
    }

}

?>

For more information send a message to info at phpclasses dot org.