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
ac3ea60b
Commit
ac3ea60b
authored
Mar 21, 2014
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tabs to spaces
parent
7499c198
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
24 deletions
+23
-24
apidoc
extensions/apidoc/apidoc
+23
-24
No files found.
extensions/apidoc/apidoc
View file @
ac3ea60b
...
@@ -2,53 +2,52 @@
...
@@ -2,53 +2,52 @@
<?php
<?php
/**
/**
* Yii Framework 2.0 API documentation generator
* Yii Framework 2.0 API documentation generator
*
* @link http://www.yiiframework.com/
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
* @license
http://www.yiiframework.com/license/
*/
*/
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
false
);
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
false
);
$composerAutoload
=
[
$composerAutoload
=
[
__DIR__
.
'/vendor/autoload.php'
,
// standalone with "composer install" run
__DIR__
.
'/vendor/autoload.php'
,
// standalone with "composer install" run
__DIR__
.
'/../../autoload.php'
,
// script is installed as a composer binary
__DIR__
.
'/../../autoload.php'
,
// script is installed as a composer binary
__DIR__
.
'/../../../../autoload.php'
,
// script is run from yii2-dev/extensions
__DIR__
.
'/../../../../autoload.php'
,
// script is run from yii2-dev/extensions
];
];
$vendorPath
=
null
;
$vendorPath
=
null
;
foreach
(
$composerAutoload
as
$autoload
)
{
foreach
(
$composerAutoload
as
$autoload
)
{
if
(
file_exists
(
$autoload
))
{
if
(
file_exists
(
$autoload
))
{
require
(
$autoload
);
require
(
$autoload
);
$vendorPath
=
dirname
(
$autoload
);
$vendorPath
=
dirname
(
$autoload
);
break
;
break
;
}
}
}
}
$yiiDirs
=
[
$yiiDirs
=
[
__DIR__
.
'/../../framework'
,
// in yii2-dev repo
__DIR__
.
'/../../framework'
,
// in yii2-dev repo
__DIR__
.
'/vendor/yiisoft/yii2'
,
// standalone with "composer install" run
__DIR__
.
'/vendor/yiisoft/yii2'
,
// standalone with "composer install" run
__DIR__
.
'/../../yiisoft/yii2'
,
// script is installed as a composer binary
__DIR__
.
'/../../yiisoft/yii2'
,
// script is installed as a composer binary
];
];
foreach
(
$yiiDirs
as
$dir
)
{
foreach
(
$yiiDirs
as
$dir
)
{
if
(
file_exists
(
$dir
.
'/Yii.php'
))
{
if
(
file_exists
(
$dir
.
'/Yii.php'
))
{
require
(
$dir
.
'/Yii.php'
);
require
(
$dir
.
'/Yii.php'
);
break
;
break
;
}
}
}
}
if
(
!
class_exists
(
'Yii'
))
{
if
(
!
class_exists
(
'Yii'
))
{
echo
PHP_EOL
.
"The Yii Framework 2.0 does not seem to be installed. Try running composer install."
.
PHP_EOL
.
PHP_EOL
;
echo
PHP_EOL
.
"The Yii Framework 2.0 does not seem to be installed. Try running composer install."
.
PHP_EOL
.
PHP_EOL
;
exit
(
1
);
exit
(
1
);
}
}
Yii
::
setAlias
(
'@yii/apidoc'
,
__DIR__
);
Yii
::
setAlias
(
'@yii/apidoc'
,
__DIR__
);
$application
=
new
yii\console\Application
([
$application
=
new
yii\console\Application
([
'id'
=>
'yii2-apidoc'
,
'id'
=>
'yii2-apidoc'
,
'basePath'
=>
__DIR__
,
'basePath'
=>
__DIR__
,
'enableCoreCommands'
=>
false
,
'enableCoreCommands'
=>
false
,
'controllerNamespace'
=>
'yii\\apidoc\\commands'
,
'controllerNamespace'
=>
'yii\\apidoc\\commands'
,
]);
]);
if
(
$vendorPath
!==
null
)
{
if
(
$vendorPath
!==
null
)
{
$application
->
setVendorPath
(
$vendorPath
);
$application
->
setVendorPath
(
$vendorPath
);
}
}
$exitCode
=
$application
->
run
();
$exitCode
=
$application
->
run
();
exit
(
$exitCode
);
exit
(
$exitCode
);
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