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
6b353bb5
Commit
6b353bb5
authored
Sep 27, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added documentation about #5175
parent
6f9d2c66
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
ApiMarkdownTrait.php
extensions/apidoc/helpers/ApiMarkdownTrait.php
+1
-0
TypeDoc.php
extensions/apidoc/models/TypeDoc.php
+15
-0
No files found.
extensions/apidoc/helpers/ApiMarkdownTrait.php
View file @
6b353bb5
...
@@ -36,6 +36,7 @@ trait ApiMarkdownTrait
...
@@ -36,6 +36,7 @@ trait ApiMarkdownTrait
// Collection resolves relative types
// Collection resolves relative types
$typeName
=
(
new
Collection
([
$typeName
],
$context
->
phpDocContext
))
->
__toString
();
$typeName
=
(
new
Collection
([
$typeName
],
$context
->
phpDocContext
))
->
__toString
();
}
}
/** @var $type TypeDoc */
$type
=
static
::
$renderer
->
apiContext
->
getType
(
$typeName
);
$type
=
static
::
$renderer
->
apiContext
->
getType
(
$typeName
);
if
(
$type
===
null
)
{
if
(
$type
===
null
)
{
static
::
$renderer
->
apiContext
->
errors
[]
=
[
static
::
$renderer
->
apiContext
->
errors
[]
=
[
...
...
extensions/apidoc/models/TypeDoc.php
View file @
6b353bb5
...
@@ -37,6 +37,21 @@ class TypeDoc extends BaseDoc
...
@@ -37,6 +37,21 @@ class TypeDoc extends BaseDoc
public
$namespace
;
public
$namespace
;
/**
* Finds subject (method or property) by name
*
* If there is a property with the same as a method, the method will be returned if the name is not stated
* explicitly by prefixing with `$`.
*
* Example for method `attributes()` and property `$attributes` which both may exist:
*
* - `$subjectName = '$attributes'` finds a property or nothing.
* - `$subjectName = 'attributes()'` finds a method or nothing.
* - `$subjectName = 'attributes'` finds the method if it exists, if not it will find the property.
*
* @param $subjectName
* @return null|MethodDoc|PropertyDoc
*/
public
function
findSubject
(
$subjectName
)
public
function
findSubject
(
$subjectName
)
{
{
if
(
$subjectName
[
0
]
!=
'$'
)
{
if
(
$subjectName
[
0
]
!=
'$'
)
{
...
...
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