PHP Класс FOF30\Utils\ModelTypeHints

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$className string Name of the class. If empty will be inferred from the current object
$model FOF30\Model\DataModel The model for which to create type hints

Открытые методы

Метод Описание
__construct ( DataModel $model ) Public constructor
getFieldType ( string $type ) : string Translates the database field type into a PHP base type
getHints ( ) : string Returns the docblock with the magic field hints for the model class
getRawHints ( ) : array Return the raw hints array
setClassName ( string $className )

Описание методов

__construct() публичный Метод

Public constructor
public __construct ( DataModel $model )
$model FOF30\Model\DataModel The model to create hints for

getFieldType() публичный статический Метод

Translates the database field type into a PHP base type
public static getFieldType ( string $type ) : string
$type string The type of the field
Результат string The PHP base type

getHints() публичный Метод

Returns the docblock with the magic field hints for the model class
public getHints ( ) : string
Результат string

getRawHints() публичный Метод

Return the raw hints array
public getRawHints ( ) : array
Результат array

setClassName() публичный Метод

public setClassName ( string $className )
$className string

Описание свойств

$className защищенное свойство

Name of the class. If empty will be inferred from the current object
protected string $className
Результат string

$model защищенное свойство

The model for which to create type hints
protected DataModel,FOF30\Model $model
Результат FOF30\Model\DataModel