PHP Classes

File: manuscript/Working with Pimf_Util_Identifier.md

Recommend this page to a friend!
  Classes of Gjero Krsteski   PIMF   manuscript/Working with Pimf_Util_Identifier.md   Download  
File: manuscript/Working with Pimf_Util_Identifier.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PIMF
Framework for Web application development
Author: By
Last change: Update of manuscript/Working with Pimf_Util_Identifier.md
Date: 5 months ago
Size: 555 bytes
 

Contents

Class file image Download

Identifier

Identifier util for unified resource generation. For example, you can create a new cache identifier based on the given parameters at the constructor method. Integer and string but not array and objects are allowed.

Common usage

$identifier = new class Pimf\Util\Identifier(
 1, '23', 123, 'ZZ-TOP', 'Some_Class_name'
);

print $identifier; // --> '1_23_123_zz_top_some_class_name'

Usage with custom delimiter

$identifier->setDelimiter('/');

print $identifier->generate(); // --> '1/23/123/zz/top/some/class/name'