Documentation is available at BaseView.php
- <?php
- /**
- * MVCnPHP - BaseView.class.php
- *
- * This source file is subject to version 2.02 of the PHP license,
- * that is bundled with this package in the file LICENSE, and is
- * available at through the world-wide-web at
- * http://www.php.net/license/2_02.txt.
- * If you did not receive a copy of the PHP license and are unable to
- * obtain it through the world-wide-web, please send a note to
- * license@php.net so we can mail you a copy immediately.
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @copyright Tony Bibbs 2003
- * @package net.geeklog.mvc
- * @version $Id: BaseView.class.php,v 1.2 2003/08/28 01:31:22 tony Exp $
- *
- */
- require_once 'ViewInterface.php';
- /**
- * Interface class for views
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @package net.geeklog.mvc
- *
- */
- abstract class MVCnPHP_BaseView implements MVCnPHP_ViewInterface {
- /**
- * @access private
- * @var int
- */
- public $outputMethod = MVC_PRINT;
- /**
- * Returns if view should be printed
- *
- * View can be printed using echo or returned as a string.
- * This method is a tool used by the controller to determine
- * if it needs to return a string or not
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @access public
- * @return boolean True if view is printed, otherwise false
- *
- */
- public function printView()
- {
- if ($this->outputMethod == MVC_PRINT) {
- return true;
- } else {
- return false;
- }
- }
- /**
- * Sets views output method
- *
- * View can either be printed immediately using PHP's
- * echo command or the view can be returned as a string
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @access public
- * @param int $method One of two constanst, _PRINT or _STRING
- *
- */
- public function setOutputMethod($method)
- {
- if ($method == MVC_PRINT) {
- $this->outputMethod = MVC_PRINT;
- } else {
- $this->outputMethod = MVC_STRING;
- }
- }
- }
- ?>
Documentation generated on Mon, 7 Mar 2005 22:36:20 -0600 by phpDocumentor 1.3.0RC3