| @@ 361-370 (lines=10) @@ | ||
| 358 | * @return string |
|
| 359 | * @throws InvalidIdentifierException |
|
| 360 | */ |
|
| 361 | private function processIdentifier($identifier) |
|
| 362 | { |
|
| 363 | if ( ! is_string($identifier)) { |
|
| 364 | throw new InvalidIdentifierException( |
|
| 365 | is_object($identifier) ? get_class($identifier) : gettype($identifier), |
|
| 366 | '\Fully\Qualified\ClassName' |
|
| 367 | ); |
|
| 368 | } |
|
| 369 | return ltrim($identifier, '\\'); |
|
| 370 | } |
|
| 371 | ||
| 372 | ||
| 373 | ||
| @@ 156-165 (lines=10) @@ | ||
| 153 | * @param string $identifier Identifier for the entity class that the Recipe applies to |
|
| 154 | * Typically a Fully Qualified Class Name |
|
| 155 | */ |
|
| 156 | public function setIdentifier($identifier) |
|
| 157 | { |
|
| 158 | if ( ! is_string($identifier) || empty($identifier)) { |
|
| 159 | throw new InvalidIdentifierException( |
|
| 160 | is_object($identifier) ? get_class($identifier) : gettype($identifier), |
|
| 161 | __('class identifier (typically a \Fully\Qualified\ClassName)', 'event_espresso') |
|
| 162 | ); |
|
| 163 | } |
|
| 164 | $this->identifier = $identifier; |
|
| 165 | } |
|
| 166 | ||
| 167 | ||
| 168 | ||