Main app
base basic MVC
dbeav database extension
pam login authentication
setup system installation tool
image image storage
site site
desktop background operation
ectools e-commerce basics Tools
b2c orders, products, members
search word segmentation index
Directory structure--Project directory structure
ecstore folder
app application directory
config configuration file directory
config.php main configuration file
deploy.xml
install.lock.php installation lock, can only be installed once
mapper.php routing
data data file
demo initialization data directory
public upload file and image directory
themes template file directory
index.php application main entry file
license .txt ECOS software protocol file
readme.txt Installation instructions
rpc.txt ECOS project interconnection software
app directory structure
app/ecbook/model model directory
app/ecbook double-click to view the original image iew view directory
app/ecbook/controller controller directory
app/ecbook double-click View the original image schema database table structure definition
app/ecbook/lang language pack folder
app/ecbook double-click to view the original image b php class library file
app/app.xml app description file
app /desktop.xml app backend first and second level menu structure
app/site.xml app frontend menu structure
app double-click to view the original image rvices.xml services registered by this app
Model call
1. Get the model object
Get the model of this app
$model = $this->app->model('$model');
Get the model of other apps
$model = app::get('b2c')->model($model);;
More general method kernel::single()
$model = kernel::single('b2c_mdl_$model')
2. Obtain the database operation object in the model
By calling the base class member variable $db
$result = $this->db->select($sql);
Through kernel: :database() directly obtains the database operation object
$result = kernel::database()->select($sql);
Methods for instantiating classes in ECOS
1. app::get('$app')->model('$model');
app::get('$app ')->render();
Mainly used to call model, base_render class
2. General method kernel::single('$class');
Mainly used Call the class in lib