Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
4c805821
Commit
4c805821
authored
Aug 19, 2013
by
Luciano Baraglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Last typo fixes in guide - I swear - [skip ci]
parent
1503d2e7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
14 deletions
+13
-14
configuration.md
docs/guide/configuration.md
+2
-2
controller.md
docs/guide/controller.md
+1
-1
overview.md
docs/guide/overview.md
+1
-2
performance.md
docs/guide/performance.md
+2
-2
query-builder.md
docs/guide/query-builder.md
+1
-1
security.md
docs/guide/security.md
+1
-1
view.md
docs/guide/view.md
+5
-5
No files found.
docs/guide/configuration.md
View file @
4c805821
...
...
@@ -4,7 +4,7 @@ Configuration
In Yii application and majority of components have sensible defaults so it's unlikely you spend lots of time configuring
it. Still there are some mandatory options such as database connection you should set up.
How application is configured depends on application template but there are some genral principles applying in any case.
How application is configured depends on application template but there are some gen
e
ral principles applying in any case.
Configuring options in bootstrap file
-------------------------------------
...
...
@@ -39,7 +39,7 @@ return array(
);
```
In the above array keys are names of application properties. Depending on application type you can check properies of
In the above array keys are names of application properties. Depending on application type you can check proper
t
ies of
either
`\yii\web\Application`
or
`\yii\console\Application`
. Both are extended from
`\yii\base\Application`
.
> Note that you can configure not only public class properties but anything accessible via setter. For example, to
...
...
docs/guide/controller.md
View file @
4c805821
...
...
@@ -59,7 +59,7 @@ If user isn't specifying any route i.e. using URL like `http://example.com/`, Yi
used. It is determined by
[
[\yii\web\Application::defaultRoute
]
] method and is
`site`
by default meaning that
`SiteController`
will be loaded.
A controller has a default action. When the user request does not specify which action to execute by usi
gn
an URL such as
A controller has a default action. When the user request does not specify which action to execute by usi
ng
an URL such as
`http://example.com/?r=site`
, the default action will be executed. By default, the default action is named as
`index`
.
It can be changed by setting the
[
[\yii\base\Controller::defaultAction
]
] property.
...
...
docs/guide/overview.md
View file @
4c805821
...
...
@@ -37,4 +37,4 @@ How does Yii Compare with Other Frameworks?
-
Syntax and overall development usability are taken seriously.
-
Performance is one of the key goals.
-
We are constantly watching other web frameworks out there and getting the best ideas in. Initial Yii release was heavily
influenced by Ruby on Rails. Still, we aren't blindly copying anyhting.
\ No newline at end of file
influenced by Ruby on Rails. Still, we aren't blindly copying anything.
docs/guide/performance.md
View file @
4c805821
...
...
@@ -116,7 +116,7 @@ If a whole page remains relative static, we can use the page caching approach to
save the rendering cost for the whole page.
### Leveraging HTTP to save procesing time and bandwidth
### Leveraging HTTP to save proces
s
ing time and bandwidth
TBD
...
...
@@ -134,7 +134,7 @@ but it may slow down INSERT, UPDATE or DELETE queries.
For complex queries, it is recommended to create a database view for it instead
of issuing the queries inside the PHP code and asking DBMS to parse them repetitively.
Do not overuse Active Record. Although Active Record is good at model
l
ing data
Do not overuse Active Record. Although Active Record is good at modeling data
in an OOP fashion, it actually degrades performance due to the fact that it needs
to create one or several objects to represent each row of query result. For data
intensive applications, using DAO or database APIs at lower level could be
...
...
docs/guide/query-builder.md
View file @
4c805821
...
...
@@ -169,7 +169,7 @@ WHERE (`status` = 10) AND (`title` LIKE '%yii%')
Order
-----
For odering results
`orderBy`
and
`addOrderBy`
could be used:
For o
r
dering results
`orderBy`
and
`addOrderBy`
could be used:
```
php
$query
->
orderBy
(
array
(
...
...
docs/guide/security.md
View file @
4c805821
Security
========
Hashing and verifyig passwords
Hashing and verifyi
n
g passwords
------------------------------
It is important not to store passwords in plain text but, contrary to popular belief, just using
`md5`
or
`sha1`
to
...
...
docs/guide/view.md
View file @
4c805821
View
====
View is an important part of MVC and is reponsible for how data is presented to the end user.
View is an important part of MVC and is re
s
ponsible for how data is presented to the end user.
Basics
------
...
...
@@ -32,7 +32,7 @@ So the view for the action above should be in `views/site/index.php` and can be
<p>
Hello,
<?php
echo
$username
?>
!
</p>
```
Intead of just scalar values you can pass anything else such as arrays or objects.
In
s
tead of just scalar values you can pass anything else such as arrays or objects.
Widgets
-------
...
...
@@ -108,7 +108,7 @@ Note that besides HTMLPurifier does excellent job making output safe it's not ve
Alternative template languages
------------------------------
There are off
l
icial extensions for
[
Smarty
](
http://www.smarty.net/
)
and
[
Twig
](
http://twig.sensiolabs.org/
)
. In order
There are official extensions for
[
Smarty
](
http://www.smarty.net/
)
and
[
Twig
](
http://twig.sensiolabs.org/
)
. In order
to learn more refer to
[
Using template engines
](
template.md
)
section of the guide.
Using View object in templates
...
...
@@ -128,7 +128,7 @@ $this->title = 'My page title';
### Adding meta tags
Adding meta tags such as encodig, description, keywords is easy with view object as well:
Adding meta tags such as encodi
n
g, description, keywords is easy with view object as well:
```
php
$this
->
registerMetaTag
(
array
(
'encoding'
=>
'utf-8'
));
...
...
@@ -156,7 +156,7 @@ override the former and only a single tag will be rendered:
### Registering link tags
`<link>`
tag is useful in many cases such as customizing favicon, ponting to RSS feed or delegating OpenID to another
`<link>`
tag is useful in many cases such as customizing favicon, po
i
nting to RSS feed or delegating OpenID to another
server. Yii view object has a method to work with these:
```
php
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment