[geeklog-cvs] MVCnPHP/quickform index.php,1.2,1.3

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Mon Jul 14 12:36:37 EDT 2003


Update of /usr/cvs/geeklog/MVCnPHP/quickform
In directory internal.geeklog.net:/tmp/cvs-serv6736

Modified Files:
	index.php 
Log Message:
added $mvcBase variable so that editing this file is simple.  Updated the comments as they were copied verbatim from the contact manager.

Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/MVCnPHP/quickform/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.php	14 Jul 2003 16:30:43 -0000	1.2
--- index.php	14 Jul 2003 16:36:35 -0000	1.3
***************
*** 4,10 ****
  * MVCnPHP - Sample Application
  *
! * This is the only viewable page for the contact manager
! * application.  This page instanstiates a controller object
! * sets the require properties and begins to process a request.
  *
  * To change behavior of the controller one only needs to edit the
--- 4,10 ----
  * MVCnPHP - Sample Application
  *
! * This is the only viewable page for the quickform sample
! * application.  This is simply met to show that you can use any
! * other PEAR packages in conjunction with this MVC implementation.
  *
  * To change behavior of the controller one only needs to edit the
***************
*** 26,29 ****
--- 26,38 ----
  */
  
+ // This is the path to the MVCnPHP folder, be sure to include
+ // trailing slash.
+ $mvcBase = '/path/to/MVCnPHP/';
+ 
+ // Force the include_path PHP is using to include the MVC path.  If this is
+ // ever added to PEAR we will be able to get rid of this
+ $curPHPIncludePath = ini_get('include_path');
+ ini_set('include_path', $curPHPIncludePath . ':' . $mvcBase);
+ 
  /**
  * Controller part of the MVC
***************
*** 31,40 ****
  require_once 'Controller.class.php';
  
! $configData = '/path/to/MVCnPHP/quickform/mvcconfig.xml'; 
  $controller = &new Controller($configData, MVC_XML);
! $controller->setMVCBase('/path/to/MVCnPHP/');
! $controller->setBaseURL('http://www.example.com');
! $controller->setViewDir('/path/to/MVCnPHP/quickform/views/');
! $controller->setCommandDir('/path/to/MVCnPHP/quickform/views/');
  $controller->processRequest();
  
--- 40,49 ----
  require_once 'Controller.class.php';
  
! $configData = $mvcBase . 'quickform/mvcconfig.xml'; 
  $controller = &new Controller($configData, MVC_XML);
! $controller->setMVCBase($mvcBase);
! $controller->setBaseURL('http://localhost/MVCnPHP/quickview');
! $controller->setViewDir($mvcBase . 'quickform/views/');
! $controller->setCommandDir($mvcBase . 'quickform/views/');
  $controller->processRequest();
  





More information about the geeklog-cvs mailing list