src/CustomPostType.php 1 location
|
@@ 36-42 (lines=7) @@
|
| 33 |
|
$this->postType = $this->stringHelper::singular($name); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
public static function init(string $name) |
| 37 |
|
{ |
| 38 |
|
if (strlen($name) >= 1 && strlen($name) < 20) { |
| 39 |
|
return new self($name); |
| 40 |
|
} |
| 41 |
|
throw new InvalidArgumentException('A Custom Post type name must be between 1 and 20 characters.'); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
public function setTaxonomies(...$taxonomies) |
| 45 |
|
{ |
src/CustomTaxonomy.php 1 location
|
@@ 34-40 (lines=7) @@
|
| 31 |
|
$this->taxonomy = $this->stringHelper::singular($name); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
public static function init(string $name) |
| 35 |
|
{ |
| 36 |
|
if (strlen($name) >= 1 && strlen($name) < 20) { |
| 37 |
|
return new self($name); |
| 38 |
|
} |
| 39 |
|
throw new InvalidArgumentException('A Custom Taxonomy name must be between 1 and 20 characters.'); |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
public function setObjectTypes(...$objects) |
| 43 |
|
{ |