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
ad26b7d3
Commit
ad26b7d3
authored
May 09, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Composer autoload to handle dependency class loading
parent
a51019bb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
22 deletions
+7
-22
index.php
apps/bootstrap/index.php
+7
-2
Markdown.php
framework/helpers/base/Markdown.php
+0
-1
Purifier.php
framework/helpers/base/Purifier.php
+0
-4
SmartyViewRenderer.php
framework/renderers/SmartyViewRenderer.php
+0
-6
TwigViewRenderer.php
framework/renderers/TwigViewRenderer.php
+0
-9
No files found.
apps/bootstrap/index.php
View file @
ad26b7d3
<?php
<?php
// Set to false to disable debug mode
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
require
(
__DIR__
.
'/../../framework/yii.php'
);
$frameworkPath
=
__DIR__
.
'/../../framework/'
;
require
(
$frameworkPath
.
'yii.php'
);
$config
=
require
(
__DIR__
.
'/protected/config/main.php'
);
$config
=
require
(
__DIR__
.
'/protected/config/main.php'
);
$application
=
new
yii\web\Application
(
$config
);
$application
=
new
yii\web\Application
(
$config
);
// Register Composer autoloader
@
include
$frameworkPath
.
'/vendor/autoload.php'
;
$application
->
run
();
$application
->
run
();
framework/helpers/base/Markdown.php
View file @
ad26b7d3
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
namespace
yii\helpers\base
;
namespace
yii\helpers\base
;
\Yii
::
setAlias
(
'@Michelf'
,
\Yii
::
getAlias
(
'@yii/vendor/michelf/php-markdown/Michelf'
));
use
Michelf\MarkdownExtra
;
use
Michelf\MarkdownExtra
;
/**
/**
...
...
framework/helpers/base/Purifier.php
View file @
ad26b7d3
...
@@ -6,10 +6,6 @@
...
@@ -6,10 +6,6 @@
*/
*/
namespace
yii\helpers\base
;
namespace
yii\helpers\base
;
if
(
!
class_exists
(
'HTMLPurifier_Bootstrap'
,
false
))
{
require_once
(
\Yii
::
getAlias
(
'@yii/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php'
));
}
/**
/**
* Purifier provides an ability to clean up HTML from any harmful code.
* Purifier provides an ability to clean up HTML from any harmful code.
*
*
...
...
framework/renderers/SmartyViewRenderer.php
View file @
ad26b7d3
...
@@ -24,11 +24,6 @@ use yii\helpers\Html;
...
@@ -24,11 +24,6 @@ use yii\helpers\Html;
class
SmartyViewRenderer
extends
ViewRenderer
class
SmartyViewRenderer
extends
ViewRenderer
{
{
/**
/**
* @var string the directory or path alias pointing to where Smarty code is located.
*/
public
$smartyPath
=
'@yii/vendor/smarty/smarty/distribution/libs'
;
/**
* @var string the directory or path alias pointing to where Smarty cache will be stored.
* @var string the directory or path alias pointing to where Smarty cache will be stored.
*/
*/
public
$cachePath
=
'@app/runtime/Smarty/cache'
;
public
$cachePath
=
'@app/runtime/Smarty/cache'
;
...
@@ -45,7 +40,6 @@ class SmartyViewRenderer extends ViewRenderer
...
@@ -45,7 +40,6 @@ class SmartyViewRenderer extends ViewRenderer
public
function
init
()
public
function
init
()
{
{
require_once
(
Yii
::
getAlias
(
$this
->
smartyPath
)
.
'/Smarty.class.php'
);
$this
->
smarty
=
new
Smarty
();
$this
->
smarty
=
new
Smarty
();
$this
->
smarty
->
setCompileDir
(
Yii
::
getAlias
(
$this
->
compilePath
));
$this
->
smarty
->
setCompileDir
(
Yii
::
getAlias
(
$this
->
compilePath
));
$this
->
smarty
->
setCacheDir
(
Yii
::
getAlias
(
$this
->
cachePath
));
$this
->
smarty
->
setCacheDir
(
Yii
::
getAlias
(
$this
->
cachePath
));
...
...
framework/renderers/TwigViewRenderer.php
View file @
ad26b7d3
...
@@ -23,11 +23,6 @@ use yii\helpers\Html;
...
@@ -23,11 +23,6 @@ use yii\helpers\Html;
class
TwigViewRenderer
extends
ViewRenderer
class
TwigViewRenderer
extends
ViewRenderer
{
{
/**
/**
* @var string the directory or path alias pointing to where Twig code is located.
*/
public
$twigPath
=
'@yii/vendor/twig/twig/lib/Twig'
;
/**
* @var string the directory or path alias pointing to where Twig cache will be stored.
* @var string the directory or path alias pointing to where Twig cache will be stored.
*/
*/
public
$cachePath
=
'@app/runtime/Twig/cache'
;
public
$cachePath
=
'@app/runtime/Twig/cache'
;
...
@@ -45,10 +40,6 @@ class TwigViewRenderer extends ViewRenderer
...
@@ -45,10 +40,6 @@ class TwigViewRenderer extends ViewRenderer
public
function
init
()
public
function
init
()
{
{
if
(
!
isset
(
Yii
::
$aliases
[
'@Twig'
]))
{
Yii
::
setAlias
(
'@Twig'
,
$this
->
twigPath
);
}
$loader
=
new
\Twig_Loader_String
();
$loader
=
new
\Twig_Loader_String
();
$this
->
twig
=
new
\Twig_Environment
(
$loader
,
array_merge
(
array
(
$this
->
twig
=
new
\Twig_Environment
(
$loader
,
array_merge
(
array
(
...
...
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