jcb-compiler/src/95d0e03f-24fd-4412-bc2e-f08.../README.md

174 lines
4.7 KiB
Markdown
Raw Permalink Normal View History

2023-03-21 22:52:57 +00:00
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# final class Parser (Details)
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Power**
```uml
@startuml
2023-10-04 18:28:29 +00:00
class Parser << (F,LightGreen) >> #RoyalBlue {
2023-03-21 22:52:57 +00:00
+ code(string $code) : array
2023-04-15 14:49:36 +00:00
+ getClassCode(string $code) : ?string
+ getClassLicense(string $code) : ?string
2023-04-29 23:34:15 +00:00
+ getUseStatements(string $code) : ?array
+ getTraits(string $code) : ?array
2023-03-21 22:52:57 +00:00
- properties(string $code) : ?array
- methods(string $code) : ?array
- extractDocBlock(string $code, string $declaration) : ?string
2023-10-04 18:28:29 +00:00
- extractMethodBody(string $code, int $startPos) : ?string
2023-03-21 22:52:57 +00:00
- extractFunctionArgumentDetails(?string $comment, ?string $arguments) : ?array
- extractReturnType(?string $returnType, ?string $comment) : ?string
- extractArgTypesFromComment(string $comment) : ?array
- extractArgTypesArguments(?string $arguments) : ?array
- extractReturnTypeFromComment(string $comment) : ?string
- extractSinceVersion(?string $comment) : ?string
- extractDeprecatedVersion(?string $comment) : ?string
- removeWhiteSpaceFromComment(string $comment) : string
- mergeArgumentTypes(array $argTypesFromDeclaration, ?array $argTypesFromComments) : array
}
note right of Parser::code
Get properties and method declarations and other details from the given code.
since: 3.2.0
return: array
end note
2023-04-15 14:49:36 +00:00
note left of Parser::getClassCode
Get the class body
since: 3.2.0
return: ?string
end note
note right of Parser::getClassLicense
Get the class license
since: 3.2.0
return: ?string
end note
2023-04-29 23:34:15 +00:00
note left of Parser::getUseStatements
Extracts the first consecutive `use` statements from the given PHP class.
since: 3.2.0
return: ?array
end note
note right of Parser::getTraits
Extracts trait use statements from the given code.
since: 3.2.0
return: ?array
end note
2023-03-21 22:52:57 +00:00
note left of Parser::properties
Extracts properties declarations and other details from the given code.
since: 3.2.0
return: ?array
end note
note right of Parser::methods
Extracts method declarations and other details from the given code.
since: 3.2.0
return: ?array
end note
note left of Parser::extractDocBlock
Extracts the PHPDoc block for a given function declaration.
since: 3.2.0
return: ?string
end note
2023-10-04 18:28:29 +00:00
note right of Parser::extractMethodBody
Extracts method body based on starting position of method declaration.
since: 3.2.0
return: ?string
end note
note left of Parser::extractFunctionArgumentDetails
2023-03-21 22:52:57 +00:00
Extracts the function argument details.
since: 3.2.0
return: ?array
end note
2023-10-04 18:28:29 +00:00
note right of Parser::extractReturnType
2023-03-21 22:52:57 +00:00
Extracts the function return type.
since: 3.2.0
return: ?string
end note
2023-10-04 18:28:29 +00:00
note left of Parser::extractArgTypesFromComment
2023-03-21 22:52:57 +00:00
Extracts argument types from a given comment.
since: 3.2.0
return: ?array
end note
2023-10-04 18:28:29 +00:00
note right of Parser::extractArgTypesArguments
2023-03-21 22:52:57 +00:00
Extracts argument types from a given declaration.
since: 3.2.0
return: ?array
end note
2023-10-04 18:28:29 +00:00
note left of Parser::extractReturnTypeFromComment
2023-03-21 22:52:57 +00:00
Extracts return type from a given declaration.
since: 3.2.0
return: ?string
end note
2023-10-04 18:28:29 +00:00
note right of Parser::extractSinceVersion
2023-03-21 22:52:57 +00:00
Extracts the version number from the @since tag in the given comment.
since: 3.2.0
return: ?string
end note
2023-10-04 18:28:29 +00:00
note left of Parser::extractDeprecatedVersion
2023-03-21 22:52:57 +00:00
Extracts the version number from the deprecated tag in the given comment.
since: 3.2.0
return: ?string
end note
2023-10-04 18:28:29 +00:00
note right of Parser::removeWhiteSpaceFromComment
2023-03-21 22:52:57 +00:00
Remove all white space from each line of the comment
since: 3.2.0
return: string
end note
2023-10-04 18:28:29 +00:00
note left of Parser::mergeArgumentTypes
2023-03-21 22:52:57 +00:00
Merges the types from the comments and the arguments.
since: 3.2.0
return: array
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)