Skip to content

TsScaffoldTask

Properties

cliDoc

public string $cliDoc

path

public string $path

servicesPath

public string $servicesPath

modelsPath

public string $modelsPath

abstractsPath

public string $abstractsPath

interfacesPath

public string $interfacesPath

Methods

getDefinitionsAction

public getDefinitionsAction(string $name): array

Parameters:

Parameter Type Description
$name string

generateExportsAction

public generateExportsAction(): array

runAction

public runAction(): array

appendExport

public appendExport(array $definitions, array& $exports): mixed

Parameters:

Parameter Type Description
$definitions array
$exports array

createInterfaceOutput

public createInterfaceOutput(array $definitions, array $columns): string

Parameters:

Parameter Type Description
$definitions array
$columns array

createAbstractOutput

Creates a typescript abstract model output based on the given definitions.

public createAbstractOutput(array $definitions, array $columns): string

Parameters:

Parameter Type Description
$definitions array
$columns array

createModelOutput

Creates a typescript model output based on the given definitions.

public createModelOutput(array $definitions, array $related): string

Parameters:

Parameter Type Description
$definitions array
$related array

createServiceOutput

public createServiceOutput(array $definitions): mixed

Parameters:

Parameter Type Description
$definitions array

getRelatedImportItems

public getRelatedImportItems(array $related): string

Parameters:

Parameter Type Description
$related array

getRelatedDefaultItems

Returns a formatted string representation of the related default items.

public getRelatedDefaultItems(array $related): string

Parameters:

Parameter Type Description
$related array

getRelatedMapItems

Returns a formatted string representation of the related map items.

public getRelatedMapItems(array $related): string

Parameters:

Parameter Type Description
$related array

getRelatedProperties

Returns a formatted string representation of the related map items.

public getRelatedProperties(array $related): string

Parameters:

Parameter Type Description
$related array

getPropertyItems

Returns a formatted string representation of the property items.

public getPropertyItems(\Phalcon\Db\ColumnInterface[] $columns): string

Parameters:

Parameter Type Description
$columns \Phalcon\Db\ColumnInterface[] An array of column objects.

Return Value:

A string representation of the property items.


getRelatedMeta

public getRelatedMeta(string $modelClassName): array

Parameters:

Parameter Type Description
$modelClassName string

getColumnTsType

public getColumnTsType(\Phalcon\Db\ColumnInterface $column): string

Parameters:

Parameter Type Description
$column \Phalcon\Db\ColumnInterface

getDefaultValue

public getDefaultValue(\Phalcon\Db\ColumnInterface $column, string $type): ?string

Parameters:

Parameter Type Description
$column \Phalcon\Db\ColumnInterface
$type string

getColumnName

public getColumnName(string $name): mixed

Parameters:

Parameter Type Description
$name string

getTableName

public getTableName(string $name): mixed

Parameters:

Parameter Type Description
$name string

getModelInstance

public getModelInstance(string $modelClassName): \Zemit\Mvc\Model

Parameters:

Parameter Type Description
$modelClassName string

getModelNameFromClassName

public getModelNameFromClassName(string $className): mixed

Parameters:

Parameter Type Description
$className string

saveFile

public saveFile(string $file, string $text, bool $force = false): bool

Parameters:

Parameter Type Description
$file string
$text string
$force bool

Inherited methods

beforeExecuteRoute

public beforeExecuteRoute(): void

helpAction

public helpAction(): void

mainAction

public mainAction(): ?array

normalizeResponse

public normalizeResponse(bool $response = true, ?int $code = null, ?string $status = null): array

Parameters:

Parameter Type Description
$response bool
$code ?int
$status ?string

afterExecuteRoute

Handle rest response automagically

public afterExecuteRoute(\Phalcon\Cli\Dispatcher $dispatcher): void

Parameters:

Parameter Type Description
$dispatcher \Phalcon\Cli\Dispatcher

Throws: