codezero/utilities

All-round utilities library

Installs: 307

Dependents: 1

Suggesters: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

1.1.0 2015-02-03 00:25 UTC

README

Build Status Latest Stable Version Total Downloads License

This package includes some all-round methods that might be useful in many projects.

Installation

Download this package or install it through Composer:

"require": {
    "codezero/utilities": "1.*"
}

URL Helper

Join slugs into a well formatted URL
$urlParts = [
    'http://www.mysite.com/',
    '/subdir',
    'someOtherDir/',
    '/somepage.php'
];

use CodeZero\Utilities\UrlHelper;

$urlHelper = new UrlHelper();

$url = $urlHelper->joinSlugs($urlParts);

Returns: http://www.mysite.com/subdir/someOtherDir/somepage.php

This will make sure there is only one slash between each slug.

That's all for now...

Analytics