/** * Is an Array * * @since 3.2.0 */ use IsArray; /** * Constructor. * * @since 3.2.0 */ public function __construct() { $this->setSeparator('|'); } /** * Get that the active keys from a path * * @param string $path The path to determine the location mapper. * * @return array|null The valid array of keys * @since 3.2.0 */ protected function getActiveKeys(string $path): ?array { // Call the parent class's version of this method $keys = parent::getActiveKeys($path); if ($keys === null) { return null; } return $this->modelActiveKeys($keys); } /** * Model that the active key * * @param array $keys The keys to the location mapper. * * @return array|null The valid array of key * @since 3.2.0 */ protected function modelActiveKeys(array $keys): ?array { if (isset($keys[1])) { return [$keys[0], Placefix::_h($keys[1])]; } if (isset($keys[0])) { return [$keys[0]]; } return null; }