charcoal/core
最新稳定版本:v5.0.0
Composer 安装命令:
composer require charcoal/core
包简介
Charcoal Web Framework
README 文档
README
The Core package provides abstract objects and tools for defining object data models and managing datasource connections.
Installation
composer require charcoal/core
For Charcoal projects, the service provider can be registered from your configuration file:
{
"service_providers": {
"charcoal/model/service-provider/model": {}
}
}
Overview
Loader
TODO
Model
TODO
Source
Source provides storage support to Charcoal models.
Using a Source object directly:
$model = ModelFactory::instance()->create('namespace/model'); $source = SourceFactory::instance()->create('database'); $source->load_item(1, $model);
Using a Storable object, which abstract away the Source completely.
// Model implements StorableInterface with StorableTrait $model = ModelFactory::instance()->create('namespace/model'); // This will load the Model's source from it's metadata $model->load(1);
Available Source
Currently, only the database source is supported.
Database Source
The DatabaseSource source type is currently the only supported storage source.
TODOs
- Implements a
FileSource, at least a basic CSV support. - Move
CollectionLoaderto here, somehow.
Validator
The validator namespace is obsolete and should not be used. Its usage is currently being removed from everywhere in charcoal.
Resources
统计信息
- 总下载量: 89
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-08