Property | Type | Description | |
---|---|---|---|
$content | the newly generated code content | ||
$id | an ID that uniquely identifies this code file. | ||
$operation | the operation to be performed. This can be [[OP_CREATE]], [[OP_OVERWRITE]] or [[OP_SKIP]]. | ||
$path | the file path that the new code should be saved to. |
Method | Description | |
---|---|---|
__construct ( string $path, string $content, array $config = [] ) | Constructor. | |
diff ( ) : boolean | string | Returns diff or false if it cannot be calculated | |
getRelativePath ( ) : string | ||
getType ( ) : string | ||
preview ( ) : boolean | string | Returns preview or false if it cannot be rendered | |
save ( ) : string | boolean | Saves the code into the file specified by [[path]]. |
Method | Description | |
---|---|---|
renderDiff ( mixed $lines1, mixed $lines2 ) : string | Renders diff between two sets of lines |
public getRelativePath ( ) : string | ||
return | string | the code file path relative to the application base path. |
public $operation |