Show
Ignore:
Timestamp:
12/14/05 01:42:40 (6 years ago)
Author:
john
Message:

add comments and Session::start to dispatcher fix flash in session

Location:
trunk/trax/vendor/trax/action_view
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_view/helpers.php

    r82 r96  
    11<? 
     2 
    23# $Id$ 
    34# 
     
    4344 
    4445    # Examples: 
    45     # * <tt>tag("br") => <br /></tt> 
    46     # * <tt>tag("input", { "type" => "text"}) => <input type="text" /></tt> 
     46    # tag("br") => <br /> 
     47    # tag("input", array("type" => "text")) => <input type="text" /> 
    4748    function tag($name, $options = array(), $open = false) { 
    4849        $html = "<$name "; 
     
    5354 
    5455    # Examples: 
    55     # * <tt>content_tag("p", "Hello world!") => <p>Hello world!</p></tt> 
    56     # * <tt>content_tag("div", content_tag("p", "Hello world!"), "class" => "strong") => </tt> 
    57     #   <tt><div class="strong"><p>Hello world!</p></div></tt> 
     56    # content_tag("p", "Hello world!") => <p>Hello world!</p> 
     57    # content_tag("div", content_tag("p", "Hello world!"), array("class" => "strong")) => 
     58    # <div class="strong"><p>Hello world!</p></div> 
    5859    function content_tag($name, $content, $options = array()) { 
    5960        $html .= "<$name "; 
  • trunk/trax/vendor/trax/action_view/helpers/form_helper.php

    r82 r96  
    11<? 
     2 
     3# $Id$ 
     4# 
     5# Copyright (c) 2005 John Peterson 
     6# 
     7# Permission is hereby granted, free of charge, to any person obtaining 
     8# a copy of this software and associated documentation files (the 
     9# "Software"), to deal in the Software without restriction, including 
     10# without limitation the rights to use, copy, modify, merge, publish, 
     11# distribute, sublicense, and/or sell copies of the Software, and to 
     12# permit persons to whom the Software is furnished to do so, subject to 
     13# the following conditions: 
     14# 
     15# The above copyright notice and this permission notice shall be 
     16# included in all copies or substantial portions of the Software. 
     17# 
     18# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
     19# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     20# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
     21# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
     22# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
     23# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
     24# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    225 
    326class FormHelper extends Helpers { 
  • trunk/trax/vendor/trax/action_view/helpers/url_helper.php

    r82 r96  
    11<? 
     2 
     3# $Id$ 
     4# 
     5# Copyright (c) 2005 John Peterson 
     6# 
     7# Permission is hereby granted, free of charge, to any person obtaining 
     8# a copy of this software and associated documentation files (the 
     9# "Software"), to deal in the Software without restriction, including 
     10# without limitation the rights to use, copy, modify, merge, publish, 
     11# distribute, sublicense, and/or sell copies of the Software, and to 
     12# permit persons to whom the Software is furnished to do so, subject to 
     13# the following conditions: 
     14# 
     15# The above copyright notice and this permission notice shall be 
     16# included in all copies or substantial portions of the Software. 
     17# 
     18# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
     19# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     20# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
     21# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
     22# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
     23# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
     24# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    225 
    326class UrlHelper extends Helpers { 
    427 
    5     # Creates a link tag of the given +name+ using an URL created by the set of +options+. See the valid options in 
    6     # link:classes/ActionController/Base.html#M000021. It's also possible to pass a string instead of an options hash to 
    7     # get a link tag that just points without consideration. If nil is passed as a name, the link itself will become the name. 
    8     # The html_options have a special feature for creating javascript confirm alerts where if you pass :confirm => 'Are you sure?', 
     28    # Creates a link tag of the given +name+ using an URL created by the set of +options+. 
     29    # It's also possible to pass a string instead of an options hash to 
     30    # get a link tag that just points without consideration. If null is passed as a name, the link itself will become the name. 
     31    # The $html_options have a special feature for creating javascript confirm alerts where if you pass ":confirm" => 'Are you sure?', 
    932    # the link will be guarded with a JS popup asking that question. If the user accepts, the link is processed, otherwise not. 
    1033    # 
    1134    # Example: 
    12     #   link_to "Delete this page", { :action => "destroy", :id => @page.id }, :confirm => "Are you sure?" 
     35    #   link_to("Delete this page", array(":action" => "delete", ":id" => $page->id), array(":confirm" => "Are you sure?")) 
    1336    function link_to($name, $options = array(), $html_options = array()) { 
    1437        $html_options = $this->convert_confirm_option_to_javascript($html_options); 
     
    4063    } 
    4164 
    42     # Returns the URL for the set of +options+ provided. This takes the same options 
    43     # as url_for. For a list, see the url_for documentation in link:classes/ActionController/Base.html#M000079. 
     65    # Returns the URL for the set of +options+ provided. 
    4466    function url_for($options = array()) { 
    4567        $url = array();