承接 kleisli/milly-tools 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kleisli/milly-tools

Composer 安装命令:

composer require kleisli/milly-tools

包简介

README 文档

README

Reflection and MVC mapping tools for Neos Flow

This package has been implemented to be used in Milly.CrudForms but might also be of use for others.

ClassMappingService

Determine what Model, Repository and Controller classes belong together. Mapping is done based on the Flow conventions and can be overruled by defining the constant ENTITY_CLASSNAME in either a Repository or a Controller class.

const ENTITY_CLASSNAME = ModelToBeMapped::class;

public functions

getRepositoryClassByModel

@param object|string $model An object (class instance) or a string (class name) of a domain model

@return string

getControllerClassByModel

@param object|string $model An object (class instance) or a string (class name) of a domain model

@return string

get*Class functions

  • getModelClass
  • getRepositoryClass
  • getControllerClass

@param string $className a Controller, Model or Repository class name

@return string class

get*Name functions

  • getPackageName
  • getControllerName
  • getModelName

@param string $className a Controller, Model or Repository class name

@return string just the name of the package, controller or model without the class path

convertClass

to convert a class of type Model, Repository or Controller into another of these types

@param string $className a Controller, Model or Repository class name

@param string $type one of the ClassMappingService::TYPE_* constants

@return string className of type ClassMappingService::TYPE_*

ReflectionService

getTypeOfProperty

@param $className

@param $propertyName

@return string

getTypeOfRelation

@param $className

@param $relationName

@return string

isToOneRelation / isToManyRelation

@param $className

@param $relationName

@return bool

isPropertyPublic

@param object|string $class An object (class instance) or a string (class name)

@param $propertyName

@return bool

cleanClassName

get the real class name, from a doctrine proxy class

@param $className

@return string

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-05-17