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
3bef7365
Commit
3bef7365
authored
Jul 25, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #624: renamed www to web.
parent
ae287f12
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
32 additions
and
32 deletions
+32
-32
README.md
apps/advanced/README.md
+4
-4
AppAsset.php
apps/advanced/backend/config/AppAsset.php
+2
-2
.gitignore
apps/advanced/backend/web/.gitignore
+0
-0
.gitignore
apps/advanced/backend/web/assets/.gitignore
+0
-0
site.css
apps/advanced/backend/web/css/site.css
+0
-0
composer.json
apps/advanced/composer.json
+2
-2
AppAsset.php
apps/advanced/frontend/config/AppAsset.php
+2
-2
.gitignore
apps/advanced/frontend/web/.gitignore
+0
-0
.gitignore
apps/advanced/frontend/web/assets/.gitignore
+0
-0
site.css
apps/advanced/frontend/web/css/site.css
+0
-0
README.md
apps/basic/README.md
+2
-2
composer.json
apps/basic/composer.json
+1
-1
AppAsset.php
apps/basic/config/AppAsset.php
+2
-2
functional.suite.dist.yml
apps/basic/tests/functional.suite.dist.yml
+1
-1
.gitignore
apps/basic/web/assets/.gitignore
+0
-0
site.css
apps/basic/web/css/site.css
+0
-0
index-test.php
apps/basic/web/index-test.php
+0
-0
index.php
apps/basic/web/index.php
+0
-0
bootstrap.md
docs/guide/bootstrap.md
+2
-2
upgrade-from-v1.md
docs/guide/upgrade-from-v1.md
+2
-2
Theme.php
framework/yii/base/Theme.php
+5
-5
AssetController.php
framework/yii/console/controllers/AssetController.php
+3
-3
Application.php
framework/yii/web/Application.php
+2
-2
AssetManager.php
framework/yii/web/AssetManager.php
+2
-2
No files found.
apps/advanced/README.md
View file @
3bef7365
...
...
@@ -34,7 +34,7 @@ backend
models/ contains backend-specific model classes
runtime/ contains files generated during runtime
views/ contains view files for the Web application
w
ww
/ contains the entry script and Web resources
w
eb
/ contains the entry script and Web resources
frontend
assets/ contains application assets such as JavaScript and CSS
config/ contains frontend configurations
...
...
@@ -42,7 +42,7 @@ frontend
models/ contains frontend-specific model classes
runtime/ contains files generated during runtime
views/ contains view files for the Web application
w
ww
/ contains the entry script and Web resources
w
eb
/ contains the entry script and Web resources
vendor/ contains dependent 3rd-party packages
environments/ contains environment-based overrides
```
...
...
@@ -107,8 +107,8 @@ the installed application. You only need to do these once for all.
Now you should be able to access:
-
the frontend using the URL
`http://localhost/yii-advanced/frontend/w
ww
/`
-
the backend using the URL
`http://localhost/yii-advanced/backend/w
ww
/`
-
the frontend using the URL
`http://localhost/yii-advanced/frontend/w
eb
/`
-
the backend using the URL
`http://localhost/yii-advanced/backend/w
eb
/`
assuming
`yii-advanced`
is directly under the document root of your Web server.
apps/advanced/backend/config/AppAsset.php
View file @
3bef7365
...
...
@@ -14,8 +14,8 @@ use yii\web\AssetBundle;
*/
class
AppAsset
extends
AssetBundle
{
public
$basePath
=
'@w
ww
root'
;
public
$baseUrl
=
'@w
ww
'
;
public
$basePath
=
'@w
eb
root'
;
public
$baseUrl
=
'@w
eb
'
;
public
$css
=
array
(
'css/site.css'
,
);
...
...
apps/advanced/backend/w
ww
/.gitignore
→
apps/advanced/backend/w
eb
/.gitignore
View file @
3bef7365
File moved
apps/advanced/backend/w
ww
/assets/.gitignore
→
apps/advanced/backend/w
eb
/assets/.gitignore
View file @
3bef7365
File moved
apps/advanced/backend/w
ww
/css/site.css
→
apps/advanced/backend/w
eb
/css/site.css
View file @
3bef7365
File moved
apps/advanced/composer.json
View file @
3bef7365
...
...
@@ -26,13 +26,13 @@
"extra"
:
{
"yii-install-writable"
:
[
"backend/runtime"
,
"backend/w
ww
/assets"
,
"backend/w
eb
/assets"
,
"console/runtime"
,
"console/migrations"
,
"frontend/runtime"
,
"frontend/w
ww
/assets"
"frontend/w
eb
/assets"
]
}
}
apps/advanced/frontend/config/AppAsset.php
View file @
3bef7365
...
...
@@ -14,8 +14,8 @@ use yii\web\AssetBundle;
*/
class
AppAsset
extends
AssetBundle
{
public
$basePath
=
'@w
ww
root'
;
public
$baseUrl
=
'@w
ww
'
;
public
$basePath
=
'@w
eb
root'
;
public
$baseUrl
=
'@w
eb
'
;
public
$css
=
array
(
'css/site.css'
,
);
...
...
apps/advanced/frontend/w
ww
/.gitignore
→
apps/advanced/frontend/w
eb
/.gitignore
View file @
3bef7365
File moved
apps/advanced/frontend/w
ww
/assets/.gitignore
→
apps/advanced/frontend/w
eb
/assets/.gitignore
View file @
3bef7365
File moved
apps/advanced/frontend/w
ww
/css/site.css
→
apps/advanced/frontend/w
eb
/css/site.css
View file @
3bef7365
File moved
apps/basic/README.md
View file @
3bef7365
...
...
@@ -24,7 +24,7 @@ DIRECTORY STRUCTURE
runtime/ contains files generated during runtime
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
w
ww
/ contains the entry script and Web resources
w
eb
/ contains the entry script and Web resources
...
...
@@ -53,7 +53,7 @@ You can then install the Bootstrap Application using the following command:
php composer.phar create-project --stability=dev yiisoft/yii2-app-basic yii-basic
~~~
Now you should be able to access the application using the URL
`http://localhost/yii-basic/w
ww
/`
,
Now you should be able to access the application using the URL
`http://localhost/yii-basic/w
eb
/`
,
assuming
`yii-basic`
is directly under the document root of your Web server.
...
...
apps/basic/composer.json
View file @
3bef7365
...
...
@@ -26,7 +26,7 @@
"extra"
:
{
"yii-install-writable"
:
[
"runtime"
,
"w
ww
/assets"
"w
eb
/assets"
],
"yii-install-executable"
:
[
"yii"
...
...
apps/basic/config/AppAsset.php
View file @
3bef7365
...
...
@@ -15,8 +15,8 @@ use yii\web\AssetBundle;
*/
class
AppAsset
extends
AssetBundle
{
public
$basePath
=
'@w
ww
root'
;
public
$baseUrl
=
'@w
ww
'
;
public
$basePath
=
'@w
eb
root'
;
public
$baseUrl
=
'@w
eb
'
;
public
$css
=
array
(
'css/site.css'
,
);
...
...
apps/basic/tests/functional.suite.dist.yml
View file @
3bef7365
...
...
@@ -11,5 +11,5 @@ modules:
enabled
:
[
Filesystem
,
TestHelper
,
Yii2
]
config
:
Yii2
:
entryScript
:
'
w
ww
/index-test.php'
entryScript
:
'
w
eb
/index-test.php'
url
:
'
http://localhost/'
apps/basic/w
ww
/assets/.gitignore
→
apps/basic/w
eb
/assets/.gitignore
View file @
3bef7365
File moved
apps/basic/w
ww
/css/site.css
→
apps/basic/w
eb
/css/site.css
View file @
3bef7365
File moved
apps/basic/w
ww
/index-test.php
→
apps/basic/w
eb
/index-test.php
View file @
3bef7365
File moved
apps/basic/w
ww
/index.php
→
apps/basic/w
eb
/index.php
View file @
3bef7365
File moved
docs/guide/bootstrap.md
View file @
3bef7365
...
...
@@ -22,7 +22,7 @@ You can then install the Bootstrap Application using the following command:
php composer.phar create-project --stability=dev yiisoft/yii2-app-basic yii-basic
~~~
Now you should be able to access the Bootstrap Application using the URL
`http://localhost/yii-basic/w
ww
/`
,
Now you should be able to access the Bootstrap Application using the URL
`http://localhost/yii-basic/w
eb
/`
,
assuming
`yii-basic`
is directly under the document root of your Web server.
...
...
@@ -59,7 +59,7 @@ yii-basic/
contact.php the view for the 'contact' action
index.php the view for the 'index' action
login.php the view for the 'login' action
w
ww
/ containing Web-accessible resources
w
eb
/ containing Web-accessible resources
index.php Web application entry script file
assets/ containing published resource files
css/ containing CSS files
...
...
docs/guide/upgrade-from-v1.md
View file @
3bef7365
...
...
@@ -245,8 +245,8 @@ Themes
Themes work completely different in 2.0. They are now based on a path map to "translate" a source
view into a themed view. For example, if the path map for a theme is
`array('/w
ww/views' => '/www
/themes/basic')`
, then the themed version for a view file
`/w
ww/views/site/index.php`
will be
`/www
/themes/basic/site/index.php`
.
`array('/w
eb/views' => '/web
/themes/basic')`
, then the themed version for a view file
`/w
eb/views/site/index.php`
will be
`/web
/themes/basic/site/index.php`
.
For this reason, theme can now be applied to any view file, even if a view rendered outside
of the context of a controller or a widget.
...
...
framework/yii/base/Theme.php
View file @
3bef7365
...
...
@@ -21,9 +21,9 @@ use yii\helpers\FileHelper;
* with its themed version if part of its path matches one of the keys in [[pathMap]].
* Then the matched part will be replaced with the corresponding array value.
*
* For example, if [[pathMap]] is `array('/w
ww/views' => '/www
/themes/basic')`,
* then the themed version for a view file `/w
ww
/views/site/index.php` will be
* `/w
ww
/themes/basic/site/index.php`.
* For example, if [[pathMap]] is `array('/w
eb/views' => '/web
/themes/basic')`,
* then the themed version for a view file `/w
eb
/views/site/index.php` will be
* `/w
eb
/themes/basic/site/index.php`.
*
* To use a theme, you should configure the [[View::theme|theme]] property of the "view" application
* component like the following:
...
...
@@ -31,8 +31,8 @@ use yii\helpers\FileHelper;
* ~~~
* 'view' => array(
* 'theme' => array(
* 'basePath' => '@w
ww
root/themes/basic',
* 'baseUrl' => '@w
ww
/themes/basic',
* 'basePath' => '@w
eb
root/themes/basic',
* 'baseUrl' => '@w
eb
/themes/basic',
* ),
* ),
* ~~~
...
...
framework/yii/console/controllers/AssetController.php
View file @
3bef7365
...
...
@@ -22,7 +22,7 @@ use yii\console\Controller;
* yii asset /path/to/myapp/config.php /path/to/myapp/config/assets_compressed.php
* 4. Adjust your web application config to use compressed assets.
*
* Note: in the console environment some path aliases like '@w
wwroot' and '@www
' may not exist,
* Note: in the console environment some path aliases like '@w
ebroot' and '@web
' may not exist,
* so corresponding paths inside the configuration should be specified directly.
*
* Note: by default this command relies on an external tools to perform actual files compression,
...
...
@@ -587,7 +587,7 @@ EOD;
<?php
/**
* Configuration file for the "yii asset" console command.
* Note that in the console environment, some path aliases like '@w
wwroot' and '@www
' may not exist.
* Note that in the console environment, some path aliases like '@w
ebroot' and '@web
' may not exist.
* Please define these missing path aliases.
*/
return array(
...
...
@@ -599,7 +599,7 @@ return array(
// Asset bundle for compression output:
'targets' => array(
'app\config\AllAsset' => array(
'basePath' => 'path/to/w
ww
',
'basePath' => 'path/to/w
eb
',
'baseUrl' => '',
'js' => 'js/all-{ts}.js',
'css' => 'css/all-{ts}.css',
...
...
framework/yii/web/Application.php
View file @
3bef7365
...
...
@@ -55,8 +55,8 @@ class Application extends \yii\base\Application
*/
public
function
handleRequest
(
$request
)
{
Yii
::
setAlias
(
'@w
ww
root'
,
dirname
(
$request
->
getScriptFile
()));
Yii
::
setAlias
(
'@w
ww
'
,
$request
->
getBaseUrl
());
Yii
::
setAlias
(
'@w
eb
root'
,
dirname
(
$request
->
getScriptFile
()));
Yii
::
setAlias
(
'@w
eb
'
,
$request
->
getBaseUrl
());
if
(
empty
(
$this
->
catchAll
))
{
list
(
$route
,
$params
)
=
$request
->
resolve
();
...
...
framework/yii/web/AssetManager.php
View file @
3bef7365
...
...
@@ -30,11 +30,11 @@ class AssetManager extends Component
/**
* @return string the root directory storing the published asset files.
*/
public
$basePath
=
'@w
ww
root/assets'
;
public
$basePath
=
'@w
eb
root/assets'
;
/**
* @return string the base URL through which the published asset files can be accessed.
*/
public
$baseUrl
=
'@w
ww
/assets'
;
public
$baseUrl
=
'@w
eb
/assets'
;
/**
* @var boolean whether to use symbolic link to publish asset files. Defaults to false, meaning
* asset files are copied to [[basePath]]. Using symbolic links has the benefit that the published
...
...
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