Download the PHP package tourze/base without Composer

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

tourze框架-Base模块

途者框架是一个受Kohana影响深重的框架。 印象中,我的第一个完整的项目(一个新闻发布系统)是使用Kohana开发的,之后第一次创业使用的也是Kohana。 虽然在之后也大量接触了其他优秀框架/类库(如Symfony、Yii),但内心还是对KO感情比较深。

所以我的第一个创业项目,在选型时选择了PHP,选择了Kohana来做开发。

在不断使用的过程中,Kohana的一些缺点不断突出。如CFS的加载规则导致大量重命名类的出现,模块与模块之间的依赖关系难解决。 还有就是一直Kohana官方开发组对命名空间的支持一直态度摇摆,迟迟不肯跟随时代步伐。

然后就有了tourze框架。

tourze框架不是最快的框架,也不是大而全的框架,而是能快速开发的框架,而Base模块是其中的基础部分。

Base模块只包含了一些基础的概念实现和助手类。如果你想要完整实现一个项目,可以看下途者框架其他模块。

因为个人精力有限,Base模块目前不一定解耦很好,但是以后在大家支持下肯定会越来越好。

安装

首先需要下载和安装composer,具体请查看官网的Download页面

在你的composer.json中增加:

"require": {
    "tourze/base": "^1.0"
},

或直接执行

composer require tourze/base:"^1.0"

文件结构

途者每个模块,一般都是上面的目录结构,如果没有其中一部分的话,会没对应的文件夹。

例如Base组件没有cache目录,因为没有地方需要用到cache目录。

对于不明白的内容,如果你清楚对应的类是什么,那么强烈建议你先试下读代码,先尝试去思考。 因为文档不能尽然描述框架功能,而且描述也可能有偏差,如果你能亲自探索过,那么自然能更加容易理解文档。

概念

核心类

默认组件

助手类

Base组件为其他组件提供很多助手方法,用于快速开发:

在NGINX运行

配置文件如下:

log_format  test.tourze.com  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';
server
    {
        listen       80;
        server_name test.tourze.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /vagrant/com.tourze.test/web;

        include other.conf;
        location ~ .*\.(php|php5)?$
            {
                try_files $uri =404;
                fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_index index.php;
                include fcgi.conf;
            }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires      30d;
            }

        location ~ .*\.(js|css)?$
            {
                expires      12h;
            }

        if (!-f $request_filename){
            rewrite ^(.*)$ /index.php;
        }

        access_log  /vagrant/log/test.tourze.com.log  test.tourze.com;
    }

请根据你的具体环境,对上面的配置项进行调整


All versions of base with dependencies

PHP Build Version
Package Version
Requires filp/whoops Version ^1.1
doctrine/inflector Version ^1.0
hassankhan/config Version 0.8.*
respect/validation Version ^0.9.3
egulias/email-validator Version ^1.2
symfony/filesystem Version ^2.7
symfony/var-dumper Version ^2.7
ircmaxell/random-lib Version ^1.1
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 tourze/base contains the following files

Loading the files please wait ....