-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPuppet.php
More file actions
68 lines (59 loc) · 1.76 KB
/
Copy pathPuppet.php
File metadata and controls
68 lines (59 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php namespace mjolnir\types;
/**
* A Puppet is a class which has extensive information about it's name as an
* entity (ie. how you would call its singular form, its plural form, etc).
*
* Puppets are useful in modeling and classes that form extensive links between
* one another since at a certain critical mass you will benefit greatly from
* the classes working with code that interacts with other puppets rather then
* you having to write every single explict class when you have 10 or more
* classes doing roughly the same thing but interacting in a dynamic fashion
* with classes of different names.
*
* So in a nutshell puppets keep your code DRY by helping your code scale from
* a maintenance perspective.
*
* It is recomended that you isolate "puppet logic" in traits, whenever
* possible. This also helps avoid accidental overuse.
*
* @package mjolnir
* @category Types
* @author Ibidem Team
* @copyright (c) 2013 Ibidem Team
* @license https://github.com/ibidem/ibidem/blob/master/LICENSE.md
*/
interface Puppet
{
/**
* @return string puppet singlar name
*/
static function singular();
/**
* @return string puppet plural name
*/
static function plural();
/**
* @return string singular with dashes instead of spaces
*/
static function dashsingular();
/**
* @return string plural with dashes instead of spaces
*/
static function dashplural();
/**
* @return string singular that's safe to use in code context
*/
static function codename();
/**
* @return string plural that's safe to use in code context
*/
static function codegroup();
/**
* @return string camel case version
*/
static function camelsingular();
/**
* @return string camel case version
*/
static function camelplural();
} # interface