承接 sledgehammer/core 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sledgehammer/core

Composer 安装命令:

composer require sledgehammer/core

包简介

Sledgehammer - A general purpose PHP toolkit

README 文档

README

A general purpose PHP toolkit, with a focus on debugging.

  • Improved error reporting with Sledgehammer\Core\Debug\ErrorHandler.
  • Improved var_dump() with dump().
  • Improved PDO compatible database connection with Sledgehammer\Core\Database\Connection.

Resources

Scope

  • Debugging, error-reporting, logging and profiling functionality.
  • A collection of global functions (that should be included in PHP, imho)
  • Generic utility classes

Classes

  • ErrorHandler : An error reporting solution.
  • Base : A more strict base class with improved error messages.
  • Sledgehammer/dump() : A colorful var_dump, with copy-pastable array format.
  • Database : PDO Database class enhanced with logging/profiling and improved error/warning detection.
  • Sql : Generating complex queries in a chainable.
  • Collection : Enhanced Array/Iterator handling.
  • Text : Chainable UTF-8 string functions.
  • Url : Read and generate urls in a OOP style.
  • Sledgehammer/cache() : Easy caching api using closures.
  • Json : Reliable JSON encoding and decoding.
  • Autoloader : Detects classes and interfaces in any php file and load them when needed. no more includes.
  • DebugR : Sending debugging information alongside XMLHttpRequests.
  • more...

Installation

Use composer to install sledgehammer modules.

composer require sledgehammer/core:*

Just include('vendor/autoload.php'); and the Sledgehammer Framework (and other installed composer libraries) can be used.

You can try the dump function: dump($var); to check if the installation is successful.

ErrorHandler

Add \Sledgehammer\Core\Debug\ErrorHandler::enable(); to allow the Sledgehammer ErrorHandler to handle the errors, warnings, notices and uncaught exceptions.

The errorhandler can send error reports per email to the address configured in ErrorHandler->email.

Static files

Serve static files from modules by adding a line to your rewrite/index.php.

require("vendor/sledgehammer/core/src/render_public_folders.php");

Autoloader

\Sledgehammer\Core\Debug\Autoloader::enable();

Enables the autoloader, which kicks in when the Composer Autoloader was unable to load the class. The Sledgehammer\Core\Autoloader tries to diagnose the issue and loads the class when it can.

统计信息

  • 总下载量: 2.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 11
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-10-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固