Browse Source

创建ant基础模块之一——商品模块

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
2ebaef2e31
  1. 14
      vendor/antgoods/goods/AutoloadExample.php
  2. 31
      vendor/antgoods/goods/README.md
  3. 21
      vendor/antgoods/goods/composer.json
  4. 28
      vendor/antgoods/goods/src/Module.php

14
vendor/antgoods/goods/AutoloadExample.php

@ -0,0 +1,14 @@
<?php
namespace antgoods\goods;
/**
* This is just an example.
*/
class AutoloadExample extends \yii\base\Widget
{
public function run()
{
return "Hello!";
}
}

31
vendor/antgoods/goods/README.md

@ -0,0 +1,31 @@
商品模块
====
ant基础模块之一
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist antgoods/goods "*"
```
or add
```
"antgoods/goods": "*"
```
to the require section of your `composer.json` file.
Usage
-----
Once the extension is installed, simply use it in your code by :
```php
<?= \antgoods\goods\AutoloadExample::widget(); ?>```

21
vendor/antgoods/goods/composer.json

@ -0,0 +1,21 @@
{
"name": "antgoods/goods",
"description": "ant基础模块之一",
"type": "yii2-extension",
"keywords": ["goods"],
"license": "MIT",
"authors": [
{
"name": "linyao",
"email": "linyaostalker@gmail.com"
}
],
"require": {
"yiisoft/yii2": "~2.0.0"
},
"autoload": {
"psr-4": {
"antgoods\\goods\\": ""
}
}
}

28
vendor/antgoods/goods/src/Module.php

@ -0,0 +1,28 @@
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/9/13
* Time: 11:47
*/
namespace antgoods\goods;
class Module extends \yii\base\Module
{
/**
* {@inheritdoc}
*/
public $controllerNamespace = 'antgoods\goods\controllers';
/**
* {@inheritdoc}
*/
public function init()
{
parent::init();
// custom initialization code goes here
}
}
Loading…
Cancel
Save