Yii Project Blueprints
上QQ阅读APP看书,第一时间看更新

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We'll also need to modify our UserIdentity class to allow for socially authenticated users to sign in."

A block of code is set as follows:

<?php
// change the following paths if necessary
$config=dirname(__FILE__).'/config/main.php';
$config = require($config);
require_once('/opt/frameworks/php/yii/framework/yiic.php');

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<div class="form-group">
<?php $selected = array('options' => array(isset($_
GET['id']) ? $_GET['id'] : NULL => array('selected' => true))); ?>
<?php echo CHtml::dropDownList('id', array(), CH
tml::listData(Location::model()->findAll(),'id','name'), 
CMap::mergeArray($selected, array('empty' => 'Select a Location'))); 
?>
</div>
<button type="submit" class="pull-right btn btnprimary">Search</button>
</form>

Any command-line input or output is written as follows:

$ php protected/yiic.php migrate up

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the link titled Model Generator, and then fill in the form on the page that appears."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.