FuelPHP 的工具包

dev-master 2012-08-13 15:17 UTC

This package is auto-updated.

Last update: 2024-09-14 05:42:13 UTC


README

简介

工具包维护了一组基本和常用的辅助方法,这些方法在开发过程中被频繁使用。

用法

获取唯一 ID

Util::getUUID()
//returns a Universally Unique Identifier
//Example: a3424ea0-e558-11e1-aff1-0800200c9a66

字符串转换为标题格式

Util::stringToTitle($title)
//Converts $title to Title Case, and returns the result.

获取时间差,类似于 Facebook

Util:getTimeDifference($time)
//Finds the Time difference for a given time from the current time in words similar to Facebook
//Returns: 12 seconds ago or
//          4 minutes ago