Download the PHP package mantu/tp-service without Composer

On this page you can find all versions of the php package mantu/tp-service. 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 tp-service

信息化公共服务

基于tp5进行扩展 //完美支持tp5.1 //5.0兼容说明 /application/common.php新增env函数 use think\Env; if (!function_exists('env')) { function env($str = '',$end = '') { return Env::get($str,$end); } }

.env 配置:TP_VERSION=50

基本使用:

1.配置:使用.env 可能涉及到配置: ;缓存配置(开发环境) REDIS_HOST = '127.0.0.1'; REDIS_PWD = ''; REDIS_PORT = 6379; REDIS_SELECT = 10; REDIS_PREFIX = 'work:';

;公共服务域名地址 COMMON_SERVICE_DOMAIN = 'https://imsapi-dev.xinchao.com/common/api';

2.使用 composer require ims/common-service

use ImsCommonService\CommonService;

$CommonService = new CommonService(); $re= $CommonService->getUser(); p($re);die;

3.基本类库 //公共服务 use ImsCommonService\BaseModel; //基础model(加入缓存封装) use ImsCommonService\BaseModel; 使用: class DemoModel extends BaseModel

//基于tp缓存的封装 use ImsCommonService\TpCacheService; 使用: $cache = new TpCacheService(); $key = 'demo';

//单key使用 //写入 $cache->set($key,time(),20); //读取 $cache->get($key); //删除 $cache->delete($key);

//缓存组使用 $keys = 'demo:'; for ($i=0; $i < 10; $i++) { //写入 $cache->saveWithKey($keys, $key.$i, $i, 100); }

//删除 $cache->delWithKey($keys);


All versions of tp-service with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.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 mantu/tp-service contains the following files

Loading the files please wait ....