Download the PHP package jinlulu/tp6_api without Composer

On this page you can find all versions of the php package jinlulu/tp6_api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tp6_api

安装

composer create-project jinlulu/tp6_api

.env


生成curd基本框架


上线前的优化

生成classmap,优化加载

生成路由缓存,减小路由解析开销

生成数据库表字段缓存

基于tp6做一些微调

config支持多场景配置

根据env的CONFIG_SCENE读取config目录下相应文件夹的配置,实际就是继承App,重写了getConfigPath

Log调整

session

response

限流

BaseModel

添加常用model 子类中需要设置 如下属性

PoPo

// Controller中
public function submitAddress(SubmitAddressParam $param): Response {
    // 输出参数
    echo $param->getId() . PHP_EOL;
    echo $param->getName() . PHP_EOL;
    echo $param->getAddress() . PHP_EOL;
    echo $param->getMobile() . PHP_EOL;
    print_r($param->toArray());
    // 手动触发验证
    $param->validate();
    return $this->outputSuccess();
}

// PoPo参数对象
use app\validate\SubmitAddress;
use ChengYi\abstracts\PoPo;

class SubmitAddressParam extends PoPo
{
    /**
     * @var array $validates 验证器
     */
    protected $validates = [
        SubmitAddress::class => 'create',
    ];

    /**
     * @var int $id
     */
    private int $id = 0;

    /**
     * @var string $name
     */
    private string $name = '';

    /**
     * @var string $address
     */
    private string $address = '';

    /**
     * @var string $mobile
     */
    private string $mobile = '';

    /**
     * @return int
     */
    public function getId(): int {
        return $this->id;
    }

    /**
     * @param int $id
     */
    public function setId(int $id): void {
        $this->id = $id;
    }

    /**
     * @return string
     */
    public function getName(): string {
        return $this->name;
    }

    /**
     * @param string $name
     */
    public function setName(string $name): void {
        $this->name = $name;
    }

    /**
     * @return string
     */
    public function getAddress(): string {
        return $this->address;
    }

    /**
     * @param string $address
     */
    public function setAddress(string $address): void {
        $this->address = $address;
    }

    /**
     * @return string
     */
    public function getMobile(): string {
        return $this->mobile;
    }

    /**
     * @param string $mobile
     */
    public function setMobile(string $mobile): void {
        $this->mobile = $mobile;
    }
}


All versions of tp6_api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
topthink/framework Version ^6.0.0
topthink/think-orm Version ^2.0
firebase/php-jwt Version ^5.2
ext-json Version *
ezyang/htmlpurifier Version ^4.13
chengyi/tp6 Version ~2.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jinlulu/tp6_api contains the following files

Loading the files please wait ....