Download the PHP package duohuo/rapphp without Composer

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

RapPHP 为效率而生的PHP 框架

RapPHP 是什么


RapPHP 框架提供了全面的 IOC,AOP的底层支持,架构设计简洁而有扩展性,开发灵活而有设计感,RapPHP提供了完整的 Web开发需要的核心组件;同时 RapPHP支持 SWOOLE和传统(lamp,lnmp)双部署方案,可以通过 SWOOLE 提供常驻内存的高性能 php 运行环境;

在线文档 https://www.kancloud.cn/tengzhinei/rapphp/539465

github https://github.com/tengzhinei/rapphp

主要特性:


有了 IOC,AOP,SWOOLE神器,可以拉近和编译性语言(JAVA等)的性能;

安利


SWOOLE https://swoole.com/

IOC

对象依赖注入,系统内对象绝对单例


class ToolController{

    /**
     * @var Connection
     */
    private $connection;
    /**
     * @var TenantService
     */
    private $tenantService;

    public function __construct(Connection $connection,TenantService $tenantService){
        $this->connection=$connection;
        $this->tenantService=$tenantService;
    }
}

AOP


前置切面,后置切面,环绕切面, AOP 支持完整可控

在UserLogic调用saveUser,delUser方法前调用UserLogicTestAop的testBefore方法
   AopBuild::before(UserLogic::class)
            ->methods(["saveUser","delUser"])
            ->wave(UserLogicTestAop::class)
            ->using("testBefore")
            ->addPoint();

//在UserLogic调用方法以save或del开头的方法前调用UserLogicTestAop的testAfter方法
        AopBuild::after(UserLogic::class)
            ->methodsStart(["save","del"])
            ->wave(UserLogicTestAop::class)
            ->using("testAfter")
            ->addPoint();

MVC


MVC 路径自动查找,参数自动绑定,返回(页面, json)自动解析


class IndexController 
{
    public function index($name, Response $response)
    {   
        $response->assign('name',$name)
        return 'index';
    }
      public function json($name)
    {
        return ['success'=>true,'data'=>$name];
    }
}

ORM


数据模型,增删改查,二级缓存机制,数据库操作轻松搞定

 $select = Good::select("g.*") -> order("rank desc");
 $select -> join("good_tag gt",'gt.good_id=g.id') -> where("tag_id",$tag);
 $data = $select -> cache() -> page($page,$step);
DB::runInTrans(function() {
               $user = User::getLock(1);
                $user -> name = 'tengzhinei';
                $user -> save();
        });

SWOOLE


一键启动 swoole 服务器,异步任务,定时任务,websocket 轻松搞定

 'swoole_http'=>[
               'ip'=>'0.0.0.0', //正常不需要修改
                'port'=>9501,  //默认使用9501端口
                'document_root'=>ROOT_PATH, 
                'enable_static_handler'=>false, //是否可以访问文件 正常不可以
                'worker_num'=>20,                 //默认开启多少worker进程
                'task_worker_num'=>4,          //默认开启几个 task 进程
                'task_max_request'=>0         //访问多少次释放worker进程
        ],
//启动服务   
php index.php http    
//异步任务
Task::deliver(MyTaskService::class,'task',['key'=>100,'name'=>'test']);
//定时任务
Timer::after('/test/a',['a'=>'1'],10,['tent-header'=>'test']);

数据库连接池


    ,"db"=>[
        'type'=>'mysql',
        'dsn'=>"mysql:dbname=doc;host=db;charset=utf8",
        'username'=>"root",
        'password'=>"root",
        'pool'=>['min'=>1,
                 'max'=>10,
                 'check'=>30,
                 'idle'=>30
        ],
    ],

Redis 连接池

   'cache'=>[
          'type'=>'redis',
          'host'       => 'redis',
          'port'       => 6379,
          'password'   => '',
          'select'     => 1,
          'timeout'    => 0,
          'expire'     => -1,
          'persistent' => false,
          'pool'=>['min'=>1,
                   'max'=>10,
                   'check'=>30,
                   'idle'=>30
          ],
      ]

Rpc 远程调用

  'rpc_service'=>[
        'token'=>'123',
    ],
    'rpc'=>[
       'cloud'=>['register'=>\app\rpc\RPcTestRegister::class,
                 'host' => 'lingxianghui.magshop.sapp.magcloud.net',
                 'port'=>80,
                 'token' => '123',
                 'timeout'=>5,
                 'fuse_time'=>30,//熔断器熔断后多久进入半开状态
                 'fuse_fail_count'=>20,//连续失败多少次开启熔断
                 'pool'=>['min'=>1,
                          'max'=>10,
                          'check'=>30,
                          'idle'=>30
                 ],
       ]
    ]

安利


SWOOLE https://swoole.com/


All versions of rapphp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
monolog/monolog Version ^1.24
mashape/unirest-php Version 3.*
twig/twig Version ~2.0
yosymfony/toml Version *
psr/container Version *
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 duohuo/rapphp contains the following files

Loading the files please wait ....