PHP 클래스 Puli\Manager\Api\Module\ModuleFile

부터: 1.0
저자: Bernhard Schussek ([email protected])
파일 보기 프로젝트 열기: puli/manager 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string | null $moduleName = null, string | null $path = null ) Creates a new module file.
addBindingDescriptor ( Puli\Manager\Api\Discovery\BindingDescriptor $descriptor ) Adds a binding descriptor.
addDependency ( string $moduleName ) Adds a dependency to a module.
addExtraKeys ( array $values ) Sets multiple extra keys at once.
addPathMapping ( PathMapping $mapping ) Adds a path mapping.
addTypeDescriptor ( Puli\Manager\Api\Discovery\BindingTypeDescriptor $descriptor ) Adds a type descriptor.
clearBindingDescriptors ( ) Removes all binding descriptors.
clearDependencies ( ) Removes all dependencies.
clearExtraKeys ( ) Removes all extra keys.
clearPathMappings ( ) Removes all path mappings.
clearTypeDescriptors ( ) Removes all type descriptors.
getBindingDescriptor ( Rhumsaa\Uuid\Uuid $uuid ) : Puli\Manager\Api\Discovery\BindingDescriptor Returns the binding descriptor with the given UUID.
getBindingDescriptors ( ) : Puli\Manager\Api\Discovery\BindingDescriptor[] Returns the binding descriptors.
getDependencies ( ) : string[] Returns the names of the modules this module overrides.
getExtraKey ( string $key, mixed $default = null ) : mixed Returns the value of an extra key.
getExtraKeys ( ) : array Returns all stored extra keys.
getModuleName ( ) : string | null Returns the module name.
getPath ( ) : string | null Returns the path to the module file.
getPathMapping ( string $repositoryPath ) : PathMapping Returns the path mapping for a repository path.
getPathMappings ( ) : PathMapping[] Returns the path mappings.
getTypeDescriptor ( string $typeName ) : Puli\Manager\Api\Discovery\BindingTypeDescriptor Returns the type descriptor with the given name.
getTypeDescriptors ( ) : Puli\Manager\Api\Discovery\BindingTypeDescriptor[] Returns the type descriptors.
getVersion ( ) : string Returns the version of the module file.
hasBindingDescriptor ( Rhumsaa\Uuid\Uuid $uuid ) : boolean Returns whether the binding descriptor exists in this file.
hasBindingDescriptors ( ) : boolean Returns whether the file contains any binding descriptors.
hasDependencies ( ) : boolean Returns whether the module has dependencies on other modules.
hasDependency ( string $moduleName ) : boolean Returns whether the module depends on a given module.
hasExtraKey ( string $key ) : boolean Returns whether the given extra key exists.
hasExtraKeys ( ) : boolean Returns whether the file contains any extra keys.
hasPathMapping ( string $repositoryPath ) : boolean Returns whether the file contains a path mapping for a repository path.
hasPathMappings ( ) : boolean Returns whether the file contains any path mappings.
hasTypeDescriptor ( string $typeName ) : boolean Returns whether a type is defined in this file.
hasTypeDescriptors ( ) : boolean Returns whether the file contains any type descriptors.
removeBindingDescriptor ( Rhumsaa\Uuid\Uuid $uuid ) Removes a binding descriptor.
removeDependency ( string $moduleName ) Adds a dependency to a module.
removeExtraKey ( string $key ) Removes an extra key.
removePathMapping ( string $repositoryPath ) Removes the path mapping for a repository path.
removeTypeDescriptor ( string $typeName ) Removes a type descriptor.
setDependencies ( array $moduleNames ) Sets the names of the modules this module depends on.
setExtraKey ( string $key, mixed $value ) Sets an extra key in the module file.
setExtraKeys ( array $values ) Sets multiple extra keys at once.
setModuleName ( string | null $moduleName ) Sets the module name.
setVersion ( string $version ) Sets the version of the module file.

메소드 상세

__construct() 공개 메소드

Creates a new module file.
public __construct ( string | null $moduleName = null, string | null $path = null )
$moduleName string | null The module name. Optional.
$path string | null The path where the file is stored or `null` if this configuration is not stored on the file system.

addBindingDescriptor() 공개 메소드

Adds a binding descriptor.
public addBindingDescriptor ( Puli\Manager\Api\Discovery\BindingDescriptor $descriptor )
$descriptor Puli\Manager\Api\Discovery\BindingDescriptor The binding descriptor to add.

addDependency() 공개 메소드

Adds a dependency to a module.
public addDependency ( string $moduleName )
$moduleName string The name of the module.

addExtraKeys() 공개 메소드

Existing extra keys are preserved.
또한 보기: setExtraKey()
public addExtraKeys ( array $values )
$values array The values indexed by their key names.

addPathMapping() 공개 메소드

Adds a path mapping.
public addPathMapping ( PathMapping $mapping )
$mapping Puli\Manager\Api\Repository\PathMapping The path mapping.

addTypeDescriptor() 공개 메소드

Adds a type descriptor.
public addTypeDescriptor ( Puli\Manager\Api\Discovery\BindingTypeDescriptor $descriptor )
$descriptor Puli\Manager\Api\Discovery\BindingTypeDescriptor The type descriptor.

clearBindingDescriptors() 공개 메소드

Removes all binding descriptors.

clearDependencies() 공개 메소드

Removes all dependencies.
public clearDependencies ( )

clearExtraKeys() 공개 메소드

Removes all extra keys.
또한 보기: setExtraKey()
public clearExtraKeys ( )

clearPathMappings() 공개 메소드

Removes all path mappings.
public clearPathMappings ( )

clearTypeDescriptors() 공개 메소드

Removes all type descriptors.

getBindingDescriptor() 공개 메소드

Returns the binding descriptor with the given UUID.
public getBindingDescriptor ( Rhumsaa\Uuid\Uuid $uuid ) : Puli\Manager\Api\Discovery\BindingDescriptor
$uuid Rhumsaa\Uuid\Uuid The UUID of the binding descriptor.
리턴 Puli\Manager\Api\Discovery\BindingDescriptor The binding descriptor.

getBindingDescriptors() 공개 메소드

Returns the binding descriptors.
public getBindingDescriptors ( ) : Puli\Manager\Api\Discovery\BindingDescriptor[]
리턴 Puli\Manager\Api\Discovery\BindingDescriptor[] The binding descriptors.

getDependencies() 공개 메소드

Returns the names of the modules this module overrides.
public getDependencies ( ) : string[]
리턴 string[] The names of the overridden modules.

getExtraKey() 공개 메소드

Returns the value of an extra key.
또한 보기: setExtraKey()
public getExtraKey ( string $key, mixed $default = null ) : mixed
$key string The name of the key.
$default mixed The value to return if the key was not set.
리턴 mixed The value stored for the key.

getExtraKeys() 공개 메소드

Returns all stored extra keys.
또한 보기: setExtraKey()
public getExtraKeys ( ) : array
리턴 array The stored values indexed by their key names.

getModuleName() 공개 메소드

Returns the module name.
public getModuleName ( ) : string | null
리턴 string | null The module name or `null` if none is set.

getPath() 공개 메소드

Returns the path to the module file.
public getPath ( ) : string | null
리턴 string | null The path or `null` if this file is not stored on the file system.

getPathMapping() 공개 메소드

Returns the path mapping for a repository path.
public getPathMapping ( string $repositoryPath ) : PathMapping
$repositoryPath string The repository path.
리턴 Puli\Manager\Api\Repository\PathMapping The corresponding path mapping.

getPathMappings() 공개 메소드

Returns the path mappings.
public getPathMappings ( ) : PathMapping[]
리턴 Puli\Manager\Api\Repository\PathMapping[] The path mappings.

getTypeDescriptor() 공개 메소드

Returns the type descriptor with the given name.
public getTypeDescriptor ( string $typeName ) : Puli\Manager\Api\Discovery\BindingTypeDescriptor
$typeName string The type name.
리턴 Puli\Manager\Api\Discovery\BindingTypeDescriptor The type descriptor.

getTypeDescriptors() 공개 메소드

Returns the type descriptors.
public getTypeDescriptors ( ) : Puli\Manager\Api\Discovery\BindingTypeDescriptor[]
리턴 Puli\Manager\Api\Discovery\BindingTypeDescriptor[] The type descriptors.

getVersion() 공개 메소드

Returns the version of the module file.
public getVersion ( ) : string
리턴 string The module file version.

hasBindingDescriptor() 공개 메소드

Returns whether the binding descriptor exists in this file.
public hasBindingDescriptor ( Rhumsaa\Uuid\Uuid $uuid ) : boolean
$uuid Rhumsaa\Uuid\Uuid The UUID of the binding descriptor.
리턴 boolean Whether the file contains the binding descriptor.

hasBindingDescriptors() 공개 메소드

Returns whether the file contains any binding descriptors.
public hasBindingDescriptors ( ) : boolean
리턴 boolean Returns `true` if the file contains binding descriptors and `false` otherwise.

hasDependencies() 공개 메소드

Returns whether the module has dependencies on other modules.
public hasDependencies ( ) : boolean
리턴 boolean Returns `true` if the module depends on other modules and `false` otherwise.

hasDependency() 공개 메소드

Returns whether the module depends on a given module.
public hasDependency ( string $moduleName ) : boolean
$moduleName string The name of the module.
리턴 boolean Returns `true` if the module depends on the given module.

hasExtraKey() 공개 메소드

Returns whether the given extra key exists.
또한 보기: setExtraKey()
public hasExtraKey ( string $key ) : boolean
$key string The name of the key.
리턴 boolean Returns `true` if the given extra key exists and `false` otherwise.

hasExtraKeys() 공개 메소드

Returns whether the file contains any extra keys.
또한 보기: setExtraKey()
public hasExtraKeys ( ) : boolean
리턴 boolean Returns `true` if the file contains extra keys and `false` otherwise.

hasPathMapping() 공개 메소드

Returns whether the file contains a path mapping for a repository path.
public hasPathMapping ( string $repositoryPath ) : boolean
$repositoryPath string The repository path.
리턴 boolean Returns `true` if the file contains a mapping for the path.

hasPathMappings() 공개 메소드

Returns whether the file contains any path mappings.
public hasPathMappings ( ) : boolean
리턴 boolean Returns `true` if the file contains path mappings and `false` otherwise.

hasTypeDescriptor() 공개 메소드

Returns whether a type is defined in this file.
public hasTypeDescriptor ( string $typeName ) : boolean
$typeName string The type name.
리턴 boolean Whether the type is defined in the file.

hasTypeDescriptors() 공개 메소드

Returns whether the file contains any type descriptors.
public hasTypeDescriptors ( ) : boolean
리턴 boolean Returns `true` if the file contains type descriptors and `false` otherwise.

removeBindingDescriptor() 공개 메소드

Removes a binding descriptor.
public removeBindingDescriptor ( Rhumsaa\Uuid\Uuid $uuid )
$uuid Rhumsaa\Uuid\Uuid The UUID of the binding descriptor to remove.

removeDependency() 공개 메소드

Adds a dependency to a module.
public removeDependency ( string $moduleName )
$moduleName string The name of the module.

removeExtraKey() 공개 메소드

Removes an extra key.
또한 보기: setExtraKey()
public removeExtraKey ( string $key )
$key string The name of the key.

removePathMapping() 공개 메소드

Removes the path mapping for a repository path.
public removePathMapping ( string $repositoryPath )
$repositoryPath string The repository path.

removeTypeDescriptor() 공개 메소드

Removes a type descriptor.
public removeTypeDescriptor ( string $typeName )
$typeName string The type name.

setDependencies() 공개 메소드

Sets the names of the modules this module depends on.
public setDependencies ( array $moduleNames )
$moduleNames array The names of the modules.

setExtraKey() 공개 메소드

Extra keys can be freely set by the user. They are stored in a separate area of the module file and not validated in any way.
public setExtraKey ( string $key, mixed $value )
$key string The name of the key.
$value mixed The value to store.

setExtraKeys() 공개 메소드

Existing extra keys are overridden.
또한 보기: setExtraKey()
public setExtraKeys ( array $values )
$values array The values indexed by their key names.

setModuleName() 공개 메소드

Sets the module name.
public setModuleName ( string | null $moduleName )
$moduleName string | null The module name or `null` to unset.

setVersion() 공개 메소드

Sets the version of the module file.
public setVersion ( string $version )
$version string The module file version.