Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
README ====== Welcome to Chippino, an add-on to Grok-PHP which adds MVC Support. If you're not already familiar with Grok, now's a good time to go over the basics. Grok, the underlying engine of Chippino is a Input, Process, Output model. Each Grok file is the smallest encapsulated piece of logic to perform a given task. Think of it like a function library, on steroids. Once you have that concept, Chippino's layer becomes more clear. Chippino brings to the table: ============================= * Simple functions for creating Chippino calls * A free flow syntax to make calling easier * Support for "instance level" calls (reuse same call as last time) * A base library of functionality, including * Modular config file support * Input sanitization and filtering * Canonical routing through PATH_INFO or $_GET if you want MVC shinies * A TAL-compliant template language with support for Chippino data models Getting Started =============== MVC Setup --------- Copy the index.php file to a public directory. Change the line: require_once dirname(dirname(__FILE__)) . 'chippino.php'; To refer to the path where Chippino is located. Absolute paths tend to be easier to work with, which is why you see dirname(dirname( in the example above. Then change the line: chippino_config()->base_path = dirname(__FILE__); To be the absolute path to your application directory. This way Chippino knows where to find your stuff. Inside of your applications directory, either symlink or copy the library/chippino directory to your-apps/chippino Hit up http://www.example.com and you should see the Chippino welcome page. Yep, you're golden. Time to start building! NON MVC Setup (Because sometimes, that's just overkill) ------------------------------------------------------- just require_once the chippino.php file and you're off and running. It's recommended you also add a line: chippino_config()->base_path = dirname(__FILE__); to refer to where your application will be stored. For most people, they're looking for the MVC. But, if you just want the config functionality and the chip() functions, this is the way to go. A Sample Chippino Setup ======================= /your-root-dir |- public_html |- index.php (moved and edited mvc.php) |- chippino (git link to chippino project) |- apps (your application directory) |- [your app] |- chippino (symlink to ../chippino/library/chippino or copied in) |- [your app] |- [your app]... The above setup is the most ideal. Specifically, Grok and Chippino are both below the public directory, the index.php file is the only public entry point. Grok.php and the Chippino library are linked, making it easier to update both without issue.