20.11.2014 Views

O Guia Definitivo do Yii 1.1

O Guia Definitivo do Yii 1.1

O Guia Definitivo do Yii 1.1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Clip Tags<br />

Like cache tags, clip tags are shortcuts to calling CBaseController::beginClip and<br />

CBaseController::endClip in a view. The syntax is as follows,<br />

<br />

// content for this clip<br />

<br />

where clipID is an identifier that uniquely identifies the clip content. The clip tags will be<br />

translated as<br />

<br />

// content for this clip<br />

<br />

Comment Tags<br />

Comment tags are used to write view comments that should only be visible to developers.<br />

Comment tags will be stripped off when the view is displayed to end users. The syntax for<br />

comment tags is as follows,<br />

<br />

Mixing Template Formats<br />

Starting from version <strong>1.1</strong>.2, it is possible to mix the usage of some alternative template<br />

syntax with the normal PHP syntax. To <strong>do</strong> so, the CViewRenderer::fileExtension property<br />

of the installed view renderer must be configured with a value other than .php. For<br />

example, if the property is set as .tpl, then any view file ending with .tpl will be rendered<br />

using the installed view renderer, while all other view files ending with .php will be treated<br />

as normal PHP view script.<br />

Aplicativos de Console<br />

Console applications are mainly used to perform offline work needed by an online Web<br />

application, such as code generation, search index compiling, email sending, etc. <strong>Yii</strong><br />

provides a framework for writing console applications in an object-oriented way. It allows a<br />

console application to access the resources (e.g. DB connections) that are used by an<br />

online Web application.<br />

Overview

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!