PHP
  Home arrow PHP arrow Page 2 - Mach-II for PHP: A Preview
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Mach-II for PHP: A Preview
By: Mike Britton
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 17
    2004-10-18


    Table of Contents:
  • Mach-II for PHP: A Preview
  • Installation
  • Configuration
  • Properties
  • Event Handlers
  • Basic Coding Techniques
  • Creating Views

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Mach-II for PHP: A Preview - Installation
    ( Page 2 of 7 )

    Let’s walk through a basic setup. This is often the most intimidating part of learning a new framework, but with Mach-II it’s surprisingly painless.

    There are two ways to install Mach-II for PHP. The first and preferred method is using the PEAR installer. The second is a manual installation.

    PEAR Installer

    For anyone unfamiliar with using the PEAR installer with PHP, visit this link. It’s a snap to get running and will allow you to install Mach-II from the command line by issuing a command to PHP. Once the PEAR installer is set up, simply install the Mach-II package like any other PEAR package. Then at the command prompt enter the following:

    pear install MachII-x.x.x.tgz

    Manual Installation

    First, open php.ini and make sure the path to your web root is listed (it should be).

    include_path = ".; c:inetpubwwwroot;"

    One feature of Mach-II is its core files only need to be installed once for multiple apps. In the case of the demo app, Mach-II was manually installed in the web root. Obviously you can install the framework anywhere, as long as the core files (and your application) can use the include path ./MachII.

    Next, unarchive the Mach-II core files into a temp directory. You’ll see the following directory structure:

    Getting Started with Mach-II for PHP

    Figure 1  Core files in their directories

    For the purpose of this demonstration, our application’s directory will reside at the same level as the core files. Create a directory in your web root called ./MachII and copy the contents of ./MachII-x.x.x into it. Create a new directory ./simpleApp inside your web root, as well. This is where we’ll put the demonstration application’s files.

    Now unarchive the project files for this article into ./simpleApp. You should see the following directory structure:

    Getting Started with Mach-II for PHP

    Figure 2  Our demo’s directory structure



     
     
    >>> More PHP Articles          >>> More By Mike Britton
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT