-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaxonomyInterface.php
More file actions
72 lines (63 loc) · 1.54 KB
/
TaxonomyInterface.php
File metadata and controls
72 lines (63 loc) · 1.54 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
69
70
71
72
<?php
/**
* Taxonomy Interface
*
* @author Whizark <devaloka@whizark.com>
* @see http://whizark.com
* @copyright Copyright (C) 2014 Whizark.
* @license MIT
*/
namespace Devaloka\Component\Taxonomy;
use Devaloka\Component\PostType\PostTypeInterface;
/**
* Interface TaxonomyInterface
*
* @package Devaloka\Commponent\Taxonomy
*
* @codeCoverageIgnore
*/
interface TaxonomyInterface
{
/**
* Gets the Taxonomy key.
*
* @return string $taxonomy The Taxonomy key (must not exceed 32 characters).
*/
public function getName();
/**
* Gets the Taxonomy options.
*
* @return mixed[] The options.
*/
public function getOptions();
/**
* Adds an object type to the Taxonomy.
*
* @param PostTypeInterface|string $objectType The object type.
*/
public function addObjectType($objectType);
/**
* Removes an object type from the Taxonomy.
*
* @param PostTypeInterface|string $objectType The object type.
*/
public function removeObjectType($objectType);
/**
* Gets object types that have the relation with the Taxonomy.
*
* @return PostTypeInterface|string[] The object types.
*/
public function getObjectTypes();
/**
* Registers the Taxonomy.
*
* @throws \RuntimeException If the Taxonomy cannot be registered.
*/
public function register();
/**
* Unregisters the Taxonomy.
*
* @throws \RuntimeException If the Taxonomy cannot be unregistered.
*/
public function unregister();
}