OperationData
class OperationData (View source)
| internal |
Holds parameter data for operation objects during operation creation only.
Constants
| MODE |
|
| PATH |
|
| OVERWRITE |
|
| PREPEND |
|
| APPEND |
|
| DEFAULT |
|
| FORCE_APPEND |
|
Properties
| protected array | $data | The parameter data. |
|
| protected string | $destination | The destination path |
Methods
OperationData constructor.
Gets the destination path that this operation data is associated with.
Gets operation mode
Checks if path exists
Gets path
Determines overwrite.
Determines whether 'force-append' has been set.
Checks if prepend path exists.
Gets prepend path.
Checks if append path exists.
Gets append path.
Checks if default path exists.
Gets default path.
Normalizes metadata by converting literal values into arrays.
Performs the conversion-to-array step in normalizeScaffoldMetadata.
Details
__construct($destination, mixed $data)
OperationData constructor.
string
destination()
Gets the destination path that this operation data is associated with.
string
mode()
Gets operation mode
bool
hasPath()
Checks if path exists
string
path()
Gets path
bool
overwrite()
Determines overwrite.
bool
forceAppend()
Determines whether 'force-append' has been set.
bool
hasPrepend()
Checks if prepend path exists.
string
prepend()
Gets prepend path.
bool
hasAppend()
Checks if append path exists.
string
append()
Gets append path.
bool
hasDefault()
Checks if default path exists.
string
default()
Gets default path.
protected array
normalizeScaffoldMetadata(string $destination, mixed $value)
Normalizes metadata by converting literal values into arrays.
Conversions performed include:
- Boolean 'false' means "skip".
- A string means "replace", with the string value becoming the path.
protected array
convertScaffoldMetadata(string $destination, mixed $value)
Performs the conversion-to-array step in normalizeScaffoldMetadata.