Development

Changeset 4186

You must first sign up to be able to contribute.

Changeset 4186

Show
Ignore:
Timestamp:
06/09/07 09:58:45 (1 year ago)
Author:
fabien
Message:

doc: fixed various typos (closes #1832, #1831, #1830, #1738, #1719, #1640)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.0/book/01-Introducing-Symfony.txt

    r3404 r4186  
    242242        street: Main Street 
    243243        city: Nowheretown 
    244         zipcode: 12345 
     244        zipcode: "12345" 
    245245 
    246246In YAML, structure is shown through indentation, sequence items are denoted by a dash, and key/value pairs within a map are separated by a colon. YAML also has a shorthand syntax to describe the same structure with fewer lines, where arrays are explicitly shown with `[]` and hashes with `{}`. Therefore, the previous YAML data can be written in a shorter way, as follows: 
     
    248248    house: 
    249249      family: { name: Doe, parents: [John, Jane], children: [Paul, Mark, Simone] } 
    250       address: { number: 34, street: Main Street, city: Nowheretown, zipcode: 12345
     250      address: { number: 34, street: Main Street, city: Nowheretown, zipcode: "12345"
    251251 
    252252YAML is an acronym for Yet Another Markup Language and pronounced "yamel." The format has been around since 2001, and YAML parsers exist for a large variety of languages. 
  • doc/branches/1.0/book/05-Configuring-Symfony.txt

    r3773 r4186  
    157157>YAML is just an interface to define settings to be used by PHP code, so the configuration defined in YAML files ends up being transformed into PHP. After browsing an application, check its cached configuration (in `cache/myapp/dev/config/`, for instance). You will see the PHP files corresponding to your YAML configuration. You will learn more about the configuration cache later in this chapter. 
    158158> 
    159 >The good news is that if you don't want to use YAML files, you can still do what the configuration files do by hand, in PHP or via another format (XML, INT, and so on). Throughout this book, you will meet alternative ways to define configuration without YAML, and you will even learn to replace the symfony configuration handlers (in Chapter 19). If you use them wisely, these tricks will enable you to bypass configuration files or define your own configuration format. 
     159>The good news is that if you don't want to use YAML files, you can still do what the configuration files do by hand, in PHP or via another format (XML, INI, and so on). Throughout this book, you will meet alternative ways to define configuration without YAML, and you will even learn to replace the symfony configuration handlers (in Chapter 19). If you use them wisely, these tricks will enable you to bypass configuration files or define your own configuration format. 
    160160 
    161161### Help, a YAML File Killed My App! 
  • doc/branches/1.0/book/09-Links-and-the-Routing-System.txt

    r3567 r4186  
    331331 
    332332    [php] 
    333     <?php echo link_to('my article', 'article/read?title=Finance_in_France', array( 
     333    <?php echo link_to('my article', 'article/read', array( 
    334334      'query_string' => 'title=Finance_in_France' 
    335335    )) ?> 
  • doc/branches/1.0/book/10-Forms.txt

    r3673 r4186  
    209209     => a text input tag together with a calendar widget 
    210210 
    211     // The following helpers require the Date helper group 
    212     <?php use_helper('Date') ?> 
     211    // The following helpers require the DateForm helper group 
     212    <?php use_helper('DateForm') ?> 
     213 
    213214    <?php echo select_day_tag('day', 1, 'include_custom=Choose a day') ?> 
    214215    => <select name="day" id="day"> 
     
    783784      nan_error:    Please enter an integer 
    784785      min:          0 
    785       min_error:    The value must be more than zero 
     786      min_error:    The value must be at least zero 
    786787      max:          100 
    787       max_error:    The value must be less than 100 
     788      max_error:    The value must be less than or equal to 100 
    788789 
    789790#### E-Mail Validator 
  • doc/branches/1.0/book/11-Ajax-Integration.txt

    r3607 r4186  
    755755      order[]=1&order[]=3&order[]=2&_= 
    756756 
    757 The full ordered list is passed as an array (with the format `order[$rank]=$id`, the `$order` starting at 0, and the `$id` based on what comes after the underscore (`_`) in the list element `id` property). The `id` property of the sortable element (`order` in the example) is used to name the array of parameters. 
     757The full ordered list is passed as an array (with the format `order[$rank]=$id`, the `$rank` starting at 0, and the `$id` based on what comes after the underscore (`_`) in the list element `id` property). The `id` property of the sortable element (`order` in the example) is used to name the array of parameters. 
    758758 
    759759The `sortable_element()` helper accepts the following parameters: 
  • doc/branches/1.0/book/12-Caching.txt

    r3743 r4186  
    474474 
    475475>**TIP** 
    476 >Instead of copying an existing one, you can create a new front controller with the `symfony` command line. For instance, to create a `staging` environment for the `myapp` application, called `myapp_staging.php` and where `SF_DEBUG` is `true`, just call `symfony init-controller myapp staging myapp_staging.php true`. 
     476>Instead of copying an existing one, you can create a new front controller with the `symfony` command line. For instance, to create a `staging` environment for the `myapp` application, called `myapp_staging.php` and where `SF_DEBUG` is `true`, just call `symfony init-controller myapp staging myapp_staging true`. 
    477477 
    478478### Monitoring Performance 
  • doc/branches/1.0/book/14-Generators.txt

    r3412 r4186  
    907907### Form Validation 
    908908 
    909 If you take a look at the generated `_edit_form.php` template in your project `cache/` directory, you will see that the form fields use a special naming convention. In a generated `edit` view, the input names result from the concatenation of the module name and the field name between angle brackets. 
    910  
    911 For instance, if the `edit` view for the `article` module has a `title` field, the template will look like Listing 14-35 and the field will be identified as `article[title]`. 
     909If you take a look at the generated `_edit_form.php` template in your project `cache/` directory, you will see that the form fields use a special naming convention. In a generated `edit` view, the input names result from the concatenation of the underscore-syntaxed model class name and the field name between angle brackets. 
     910 
     911For instance, if the `edit` view for the `Article` class has a `title` field, the template will look like Listing 14-35 and the field will be identified as `article[title]`. 
    912912 
    913913Listing 14-35 - Syntax of the Generated Input Names 
     
    10061006    <?php endif; ?> 
    10071007 
    1008 Notice that an edit partial always has access to the current object through a variable having the same name as the module, and that a `list` partial always has access to the current pager through the `$pager` variable. 
     1008Notice that an edit partial always has access to the current object through a variable named after the class, and that a `list` partial always has access to the current pager through the `$pager` variable. 
    10091009 
    10101010>**SIDEBAR** 
  • doc/branches/1.0/book/15-Unit-and-Functional-Testing.txt

    r3743 r4186  
    3232In the test-driven development (TDD) methodology, the tests are written before the code. Writing tests first helps you to focus on the tasks a function should accomplish before actually developing it. It's a good practice that other methodologies, like Extreme Programming (XP), recommend as well. Plus it takes into account the undeniable fact that if you don't write unit tests first, you never write them. 
    3333 
    34 For instance, imagine that you must develop a text-stripping function. The function removes white spaces at the beginning and at the end of the string, replaces nonalphabetical characters by underscores, and transforms all uppercase characters to lowercase ones. In test-driven development, you would first think about all the possible cases and provide an example "nput and expected output for each, as shown in Table 15-1. 
     34For instance, imagine that you must develop a text-stripping function. The function removes white spaces at the beginning and at the end of the string, replaces nonalphabetical characters by underscores, and transforms all uppercase characters to lowercase ones. In test-driven development, you would first think about all the possible cases and provide an example input and expected output for each, as shown in Table 15-1. 
    3535 
    3636Table 15-1 - A List of Test Cases for a Text-Stripping Function 
     
    610610    $b->get('/foobar/edit/id/1')-> 
    611611        isRequestParameter('id', 1)-> 
    612         isStatutsCode()-> 
     612        isStatusCode()-> 
    613613        isResponseHeader('content-type', 'text/html; charset=utf-8')-> 
    614614        responseContains('edit'); 
  • doc/branches/1.0/book/17-Extending-Symfony.txt

    r3412 r4186  
    392392        class: myRequest 
    393393 
    394 Bridges to Other Framework Components 
    395 ------------------------------------- 
     394Bridges to Other Framework's Components 
     395--------------------------------------- 
    396396 
    397397If you need capabilities provided by a third-party class, and if you don't want to copy this class in one of the symfony `lib/` dirs, you will probably install it outside of the usual places where symfony looks for files. In that case, using this class will imply a manual `require` in your code, unless you use the symfony bridge to take advantage of the autoloading. 
  • doc/branches/1.0/book/18-Performance.txt

    r3412 r4186  
    148148    doSelectJoinCategory() 
    149149 
    150     // Retrieve Article objects and hydrate related Author and Category objects 
    151     doSelectJoinAuthorAndCategory() 
     150    // Retrieve Article objects and hydrate related objects except Author 
     151    doSelectJoinAllExceptAuthor() 
    152152 
    153153    // Synonym of