Download the PHP package aicode/focusphp without Composer

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

FocusPHP

FocusPHP is a micro php framework

Build Status

TODO

备注

数据库文件中,username=admin, password=administrator

安装使用

composer require aicode/focusphp

MVC支持

框架本身可选的对MVC提供了支持,只需要在创建Focus\Server对象时注册Focus\MVC\Router对象即可。

$server->registerRouter(new Focus\MVC\Router('Demo\Controllers'));

创建Focus\MVC\Router是需要提供控制器命名空间作为参数,这样框架就回到该命名空间下寻找适合处理当前请求的控制器。

视图对象

视图类需要实现Focus\MVC\View接口,框架内置了一套简单的视图实现Focus\MVC\SimpleView, 该实现使用.php文件作为视图文件模板,在模板文件中,直接使用原始的PHP语法即可。

默认视图Focus\MVC\SimpleView提供了layout支持。

隐藏的模板变量

变量名 说明
__body__ 解析模板后的内容,该变量只在layout中可用
__data__ 给模板对象传递的字符串数据(无key)

框架异常消息

消息 含义
INVALID_ROUTER 路由不合法
INVALID_ROUTER_ARGS 路由参数不合法
INVALID_ROUTER_FUNC 路由规则执行函数不合法
NONSUPPORT_PHP_VERSION PHP版本不支持,请使用5.6.0以上版本
CONFIG_FILE_NOT_FOUND 配置文件不存在
INVALID_CONFIG_FORMAT 不合法的配置文件格式

日志

如果定义了FOCUS_DEBUG常量,并且该常量的值为true,则启用框架日志,框架日志将合并到应用的debug日志中, 默认情况下是不开启框架的日志的.

框架记录的所有日志均为debug日志


All versions of focusphp with dependencies

PHP Build Version
Package Version
Requires container-interop/container-interop Version ^1.1.0
psr/log Version ^1.0@dev
php Version >=5.6
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 aicode/focusphp contains the following files

Loading the files please wait ....