Project
in package
implements
Project
FinalYes
Represents the entire project with its files, namespaces and indexes.
Table of Contents
Interfaces
- Project
Properties
- $files : array<string|int, File>
- $name : string
- $namespaces : array<string|int, Namespace_>
- $rootNamespace : Namespace_|null
Methods
- __construct() : mixed
- Initializes this descriptor.
- addFile() : void
- Add a file to this project.
- addNamespace() : void
- Add a namespace to the project.
- getFiles() : array<string|int, File>
- Returns all files with their sub-elements.
- getName() : string
- Returns the name of this project.
- getNamespaces() : array<string|int, Namespace_>
- Returns all namespaces with their sub-elements.
- getRootNamespace() : Namespace_|null
- Returns the root (global) namespace.
Properties
$files
private
array<string|int, File>
$files
= []
$name read-only
private
string
$name
$namespaces
private
array<string|int, Namespace_>
$namespaces
= []
$rootNamespace
private
Namespace_|null
$rootNamespace
= null
Methods
__construct()
Initializes this descriptor.
public
__construct(string $name[, Namespace_|null $rootNamespace = null ]) : mixed
Parameters
- $name : string
-
Name of the current project.
- $rootNamespace : Namespace_|null = null
-
Root namespace of the project.
addFile()
Add a file to this project.
public
addFile(File $file) : void
Parameters
- $file : File
addNamespace()
Add a namespace to the project.
public
addNamespace(Namespace_ $namespace) : void
Parameters
- $namespace : Namespace_
getFiles()
Returns all files with their sub-elements.
public
getFiles() : array<string|int, File>
Return values
array<string|int, File>getName()
Returns the name of this project.
public
getName() : string
Attributes
- #[Override]
Return values
stringgetNamespaces()
Returns all namespaces with their sub-elements.
public
getNamespaces() : array<string|int, Namespace_>
Return values
array<string|int, Namespace_>getRootNamespace()
Returns the root (global) namespace.
public
getRootNamespace() : Namespace_|null