Part I. Getting Started

Table of Contents

1. Quick-Start Blog Demo
1.1. Introduction
1.2. Download and Install Solar
1.3. Make a Vendor Space
1.4. Configure the System
1.5. Make a Model From a Database Table
1.6. Make a Basic Application
1.7. Basic Application Setup
1.8. Browse All Public Articles
1.8.1. The "Index" Action Method
1.8.2. The "Index" View Script
1.9. Read One Article
1.9.1. The "Read" Action Method
1.9.2. The "Read" View Script
1.10. Browse All Draft Articles
1.10.1. The "Drafts" Action Method
1.10.2. The "Drafts" View Script
1.11. Edit One Article
1.11.1. The "Edit" Action Method
1.11.2. The "Edit" View Script
1.12. Add One New Article
1.12.1. The "Add" Action Method
1.12.2. The "Add" View Script
1.13. Delete One Article
1.13.1. The "Delete" Action Method
1.13.2. The "Delete" View Scripts
1.14. Set Locale Strings
1.14.1. About Locale Files and Methods
1.14.2. Modify Locale File
1.15. Cleaner URIs with a Virtual Host
2. Dynamic Dispatch Cycle
2.1. Bootstrap and Configuration
2.1.1. The Solar::start() Method
2.1.2. Configuration
2.2. Front Controller
2.2.1. Dynamic Rewrite
2.2.2. Static Routing
2.2.3. Class Stack
2.3. Rewrite Rules
2.3.1. Short Form
2.3.2. Replacement Tokens
2.3.3. Long Form
2.4. Page Controller
2.4.1. Setup and Loading
2.4.2. Running the Action
2.4.3. Rendering the Results
2.4.4. Returning the Response
3. Working With Models
3.1. Introduction
3.2. Major Components and Patterns
3.3. The Model Catalog
3.3.1. Creating A Catalog Instance
3.3.2. Retrieving A Model From The Catalog
3.4. Fetching Data
3.4.1. Fetch Methods
3.4.2. Fetch Parameters
3.4.3. Magic Fetch Methods
3.5. Records and Collections
3.5.1. Record Objects
3.5.2. Collection Objects
3.6. Record Creation, Modification, and Saving
3.6.1. Creating a New Record
3.6.2. Modifying A Record
3.6.3. Saving A Record
3.7. Record Filters
3.7.1. Automatic Filters
3.7.2. Adding Filters
3.7.3. Available "Sanitize" Filters
3.7.4. Available "Validate" Filters
3.8. Special Column Processing
3.8.1. Created Timestamp
3.8.2. Updated Timestamp
3.8.3. Auto-Sequence
3.8.4. PHP Serialize
3.8.5. XML Structs
3.9. Single Table Inheritance
3.9.1. Enable The Model
3.9.2. Extend the Model
3.9.3. Fetching
3.9.4. Creating and Saving
4. Working With Related Models
4.1. Introduction
4.2. Domain Description
4.2.1. A Blogging System
4.2.2. Terminology
4.2.3. Domain Diagram
4.3. Native Model "Has One" Related Foreign Record
4.3.1. Setup
4.3.2. SQL for Lazy-Load
4.3.3. Foreign Key
4.3.4. Has One Or Null
4.3.5. Relationship Definition
4.4. Native Model "Has Many" Related Foreign Records
4.4.1. Setup
4.4.2. SQL for Lazy-Load
4.4.3. Foreign Key
4.4.4. Relationship Definition
4.5. Native Model "Belongs To" Related Foreign Model
4.5.1. Setup
4.5.2. SQL for Lazy-Load
4.5.3. Foreign Key
4.5.4. Relationship Definition
4.6. Native Model "Has Many" Related Foreign Records "Through" An Association
4.6.1. Setup
4.6.2. SQL for Lazy-Load
4.6.3. Foreign Key
4.6.4. Through Key
4.6.5. Relationship Definition
4.7. Eager Fetching
4.7.1. Setting Conditions for Eager Fetches
4.8. Creating, Modifying, and Saving Relateds
4.8.1. Automatic Foreign Key Management
4.8.2. Independent Operation
5. Views and Layouts
5.1. Introduction
5.1.1. Assumptions
5.1.2. Notes
5.2. Location of Views and Layouts
5.3. Nested Views and Partials
5.3.1. Option 1: Use the Solar_View::template() method.
5.3.2. Option 2: Use the Solar_View::partial() method.
5.4. Alternate Formats
5.5. View Helpers
5.6. Layouts
5.6.1. Specify the Default Layout
5.6.2. Create the Default Layout
5.6.3. Create the _head.php Sub-Layout
5.6.4. Create the _body.php Sub-Layout
5.6.5. Create the _header.php and _footer Sub-Layouts
5.6.6. Create the _nav.php and _local.php Sub-Layouts
5.6.7. Create a Stylesheet
5.6.8. Overriding Layouts
6. Models and Forms
6.1. Introduction
6.2. Controller Logic
6.3. The Form Object
6.4. Form Elements
6.4.1. Element Names
6.5. View Presentation
6.6. View Decoration
6.7. Semi-Automatic View Presentation
6.7.1. Fieldsets
6.7.2. Element Groups
6.8. Custom Record Elements
6.9. Locale Strings
6.9.1. Model Strings
6.9.2. Controller Strings
6.9.3. Invalid Strings
7. User Authentication, Roles, and Access Control
7.1. Introduction
7.2. The Solar_User Object
7.3. Authentication Processing
7.3.1. Adapters
7.3.2. General Adapter Configuration
7.3.3. Adapter-Specific Configuration
7.3.4. Handling Authentication Attempts
7.3.5. Usage
7.4. Authentication Forms
7.5. Roles
7.5.1. Adapters
7.5.2. Configuration
7.5.3. Usage
7.6. Access Control
7.6.1. Adapters
7.6.2. Configuration
7.6.3. List Format
7.6.4. Usage
7.7. Integration With Page Controllers
7.7.1. Catch-All Access Control
7.7.2. Intra-Action Access Control
7.8. Ownership Access
7.8.1. Preparing Your Content Objects
7.8.2. Configure Access To Recognize Ownership
7.8.3. Access Control List Entries
7.8.4. Integration With Controllers
8. Command-Line Tools
8.1. Introduction
8.1.1. Vendor-Related Commands
8.1.2. Project-Related Commands
8.1.3. Test-Related Commands
8.1.4. Documentation-Related Commands
8.2. Make Vendor Source
8.2.1. Example
8.3. Link Vendor Source
8.3.1. Example
8.4. Link Public Assets
8.4.1. Example
8.5. Unlink Vendor Source
8.5.1. Example
8.6. Get Help
8.7. Make One Or More Models
8.7.1. Make One Model
8.7.2. Specify a Table Name
8.7.3. Specify a Parent Class
8.7.4. Make Several Models At Once
8.8. Make A Web Application Page
8.8.1. Make A Basic App
8.8.2. Make a Boilerplate BREAD App
8.9. Make A CLI Command
8.10. Make A Test Suite
8.11. Run A Test Suite
8.11.1. Run All Methods
8.11.2. Run Some Methods
8.12. Make Wiki-Like Documentation
8.13. Make DocBook Files
9. Mail
9.1. Introduction
9.2. Composing Messages
9.2.1. Headers and Header Injection
9.3. Message Attachments
9.4. Sending Messages
9.4.1. Using a Transport
9.4.2. Transport Dependency-Injection


Local