$v) { if (!is_string($k)) { throw new Exception(Exception::LIST_INVALID_TYPE, 'String', 'supplied array index', gettype($k)); } if (!$v instanceof Pattern && !$v instanceof PatternList && !$v instanceof Reference) { $type = gettype($v); if ($type === 'object') { $type = get_class($v); } throw new Exception(Exception::LIST_INVALID_TYPE, __NAMESPACE__.'\Pattern, '.__NAMESPACE__.'\PatternList, '.__NAMESPACE__.'\Reference', 'supplied array value', $type); } } $this->storage = $array; } }