Development

Changeset 6613

You must first sign up to be able to contribute.

Changeset 6613

Show
Ignore:
Timestamp:
12/20/07 15:39:34 (1 year ago)
Author:
francois
Message:

[doc 1.1] new in dev version -> new in sf 1.1

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.1/book/06-Inside-the-Controller-Layer.txt

    r6611 r6613  
    927927>The `enabled: off` parameter works well to disable your own filters, but you can deactivate the default filters via the `settings.yml` file, by modifying the values of the `web_debug`, `use_security`, and `cache` settings. This is because each of the default filters has a `condition` parameter that tests the value of these settings. 
    928928 
    929 **New in development version** 
     929**New in symfony 1.1** 
    930930 
    931931>**SIDEBAR** 
  • doc/branches/1.1/book/07-Inside-the-View-Layer.txt

    r6117 r6613  
    291291>All the helpers so far were called by `<?php echo functionName() ?>`. The partial helper, however, is simply called by `<?php include_partial() ?>`, without `echo`, to make it behave similar to the regular PHP `include()` statement. If you ever need a function that returns the content of a partial without actually displaying it, use `get_partial()` instead. All the `include_` helpers described in this chapter have a `get_` counterpart that can be called together with an `echo` statement. 
    292292 
    293 >**New in development version**: Instead of resulting in a template, an action can return a partial. The `renderPartial()` method of the action class promotes reusability of code and takes advantage of the caching abilities of the partials (see Chapter 12). The variables defined in the action will be passed to the partial automatically. 
     293>**TIP** 
     294>**New in symfony 1.1**: Instead of resulting in a template, an action can return a partial. The `renderPartial()` method of the action class promotes reusability of code and takes advantage of the caching abilities of the partials (see Chapter 12). The variables defined in the action will be passed to the partial automatically. 
    294295> 
    295296>     [php] 
     
    668669 
    669670    // In the Template 
    670     use_stylesheet('mystyle1'); 
    671     use_stylesheet('mystyle2'); 
    672     use_javascript('myscript'); 
     671    <?php use_stylesheet('mystyle1') ?> 
     672    <?php use_stylesheet('mystyle2') ?> 
     673    <?php use_javascript('myscript') ?> 
    673674     
    674675In each case, the argument is a file name. If the file has a logical extension (`.css` for a style sheet and `.js` for a JavaScript file), you can omit it. If the file has a logical location (`/css/` for a style sheet and `/js/` for a JavaScript file), you can omit it as well. Symfony is smart enough to figure out the correct extension or location. 
     
    743744     
    744745    // In the template 
    745     use_stylesheet('special', 'first'); 
    746  
    747 **New in development version**: You can also decide to bypass the transformation of the asset file name, so that the resulting `<link>` or `<script>` tags refer to the exact location specified, as show in Listing 7-32. 
     746    <?php use_stylesheet('special', 'first') ?> 
     747 
     748**New in symfony 1.1**: You can also decide to bypass the transformation of the asset file name, so that the resulting `<link>` or `<script>` tags refer to the exact location specified, as show in Listing 7-32. 
    748749 
    749750Listing 7-32 - Style Sheet Inclusion with Raw Name 
     
    758759     
    759760    // In the template 
    760     use_stylesheet('paper', '', array('raw_name' => true)); 
     761    <?php use_stylesheet('paper', '', array('raw_name' => true)) ?> 
    761762     
    762763    // Resulting View 
     
    776777     
    777778    // In the template 
    778     use_stylesheet('paper', '', array('media' => 'print')); 
     779    <?php use_stylesheet('paper', '', array('media' => 'print')) ?> 
    779780     
    780781    // Resulting View 
     
    798799     
    799800    // In the template 
    800     decorate_with('my_layout'); 
     801    <?php decorate_with('my_layout') ?> 
    801802 
    802803Some views don't need any layout at all (for instance, plain text pages or RSS feeds). In that case, set `has_layout` to `false`, as shown in Listing 7-35. 
     
    813814     
    814815    // In the template 
    815     decorate_with(false); 
     816    <?php decorate_with(false) ?> 
    816817 
    817818>**NOTE** 
     
    10301031>The usual symfony variables are also escaped when you turn on output escaping. So be aware that `$sf_user`, `$sf_request`, `$sf_param`, and `$sf_context` still work, but their methods return escaped data, unless you add `ESC_RAW` as a final argument to their method calls. 
    10311032 
    1032 **New in development version** 
    1033  
    1034 >**TIP** 
    1035 >Even if XSS is one of the most common exploit of websites, this is not the only one. CSRF is also very popular and symfony provides a simple way to protect your applications. Read the sidebar named "The CSRF Filter" in Chapter 6 for more information. 
     1033>**TIP** 
     1034>**New in symfony 1.1**: Even if XSS is one of the most common exploit of websites, this is not the only one. CSRF is also very popular and symfony provides a simple way to protect your applications. Read the sidebar named "The CSRF Filter" in Chapter 6 for more information. 
    10361035 
    10371036Summary 
  • doc/branches/1.1/book/09-Links-and-the-Routing-System.txt

    r6117 r6613  
    611611The object that handles the routing rules is the `sfRouting` factory. It is available from every part of the code by requiring `sfContext::getInstance()->getRouting()`. Its `prependRoute()` method adds a new rule on top of the existing ones defined in `routing.yml`. It expects four parameters, which are the same as the parameters needed to define a rule: a route label, a pattern, an associative array of default values, and another associative array for requirements. For instance, the routing.yml rule definition shown in Listing 9-18 is equivalent to the PHP code shown in Listing 9-24. 
    612612 
    613 ** New in development version ** 
    614  
    615613>**NOTE** 
    616 >The routing class is configurable in the `factories.yml` configuration file (to change the default routing class, see chapter 17). This chapter talks about the `sfPatternRouting` class, which is the routing class configured by default. 
     614>**New in symfony 1.1**: The routing class is configurable in the `factories.yml` configuration file (to change the default routing class, see chapter 17). This chapter talks about the `sfPatternRouting` class, which is the routing class configured by default. 
    617615 
    618616Listing 9-24 - Defining a Rule in PHP 
  • doc/branches/1.1/book/11-Ajax-Integration.txt

    r6400 r6613  
    231231>Because responsiveness is crucial in Ajax interactions, if the response is not too complex, it might be a good idea to avoid creating a view and instead return the response directly from the action. So you can use the `renderText()` method in the action to skip the template and boost Ajax requests. 
    232232> 
    233 >**New in development version**: Most Ajax actions result in a template that simply includes a partial, because the code of the Ajax response is already used to display the initial page. To avoid creating a template for just one line of code, the action can use the `renderPartial()` method. This method takes advantage of both the reusability of partials, their caching abilities, and the speed of the `renderText()` method. 
     233>**New in symfony 1.1**: Most Ajax actions result in a template that simply includes a partial, because the code of the Ajax response is already used to display the initial page. To avoid creating a template for just one line of code, the action can use the `renderPartial()` method. This method takes advantage of both the reusability of partials, their caching abilities, and the speed of the `renderText()` method. 
    234234> 
    235235>     [php] 
  • doc/branches/1.1/book/13-I18n-and-L10n.txt

    r4360 r6613  
    358358Another way to organize translation dictionaries is to split them by module. Instead of writing a single `messages.XX.xml` file for the whole application, you can write one in each `modules/[module_name]/i18n/` directory. It makes modules more independent from the application, which is necessary if you want to reuse them, such as in plug-ins (see Chapter 17). 
    359359 
    360 **New in development version** 
     360**New in symfony 1.1** 
    361361 
    362362As updating the i18n dictionaries by hand is quite error prone, symfony provides a task to automate the process. The `i18n-extract` task parses a symfony application to extract all the strings that need to be translated. It takes an application and a culture as its arguments: 
  • doc/branches/1.1/book/16-Application-Management-Tools.txt

    r4848 r6613  
    9595 
    9696>**SIDEBAR** 
    97 >Customizing the logging 
    98 
    99 >**New in development version** 
     97>**New in symfony 1.1**: Customizing the logging 
    10098> 
    10199>Symfony's logging system is very simple, yet it is also easy to customize.