Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
20 | public function __construct( $slug ) { |
||
21 | |||
22 | parent::__construct( $slug ); |
||
23 | |||
24 | $parts = explode( '\\', $this->slug, 2 ); |
||
25 | |||
26 | if ( isset( $parts[1] ) ) { |
||
27 | |||
28 | $parsed = $this->parse_slug( $this->related_entity_slug ); |
||
29 | |||
30 | $this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts[1]}"; |
||
31 | $this->related_entity_slug = "{$parsed['slug']}\\{$parts[1]}"; |
||
32 | |||
33 | if ( $parsed['is_array'] ) { |
||
34 | $this->related_entity_slug .= '{}'; |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 | |||
57 |