Show
Ignore:
Timestamp:
12/12/2007 12:32:17 PM (13 months ago)
Author:
Shadowhand
Message:

Added toString to Forge.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/forge/libraries/Forge.php

    r1461 r1498  
    1515        protected $hidden = array(); 
    1616 
    17         public function __construct($action = '', $title = '', $method = 'post') 
     17        public function __construct($action = '', $title = '', $method = NULL, $class = NULL) 
    1818        { 
     19                empty($method) and $method = 'post'; 
     20                empty($class)  and $class  = 'form'; 
     21 
    1922                // Set action 
    2023                $this->template['action'] = $action; 
     
    104107        } 
    105108 
     109        /** 
     110         * Creates the form HTML 
     111         * 
     112         * @param   string   form view template name 
     113         * @return  string 
     114         */ 
    106115        public function html($template = 'forge_template') 
    107116        { 
     
    128137        } 
    129138 
     139        /** 
     140         * Returns the form HTML 
     141         */ 
     142        public function __toString() 
     143        { 
     144                return $this->html(); 
     145        } 
     146 
    130147} // End Forge