From fb90ebc037c62a9b9944515cd098665252348cb8 Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:03:16 +0100 Subject: [PATCH 1/8] split components documentation --- docs/README.md | 720 ++------------------------- docs/README.template.md | 15 - docs/component/arr.md | 65 +++ docs/component/collection.md | 37 ++ docs/component/data-structure.md | 29 ++ docs/component/dict.md | 57 +++ docs/component/encoding-base64.md | 22 + docs/component/encoding-hex.md | 22 + docs/component/env.md | 31 ++ docs/component/filesystem.md | 60 +++ docs/component/fun.md | 25 + docs/component/hash.md | 27 + docs/component/html.md | 25 + docs/component/iter.md | 79 +++ docs/component/json.md | 23 + docs/component/math.md | 62 +++ docs/component/observer.md | 22 + docs/component/password.md | 30 ++ docs/component/pseudo-random.md | 22 + docs/component/psl.md | 23 + docs/component/regex.md | 25 + docs/component/result.md | 30 ++ docs/component/secure-random.md | 24 + docs/component/shell.md | 23 + docs/component/str-byte.md | 67 +++ docs/component/str-grapheme.md | 42 ++ docs/component/str.md | 82 +++ docs/component/type.md | 68 +++ docs/component/vec.md | 38 ++ docs/documenter.php | 161 +++--- docs/templates/README.template.md | 11 + docs/templates/component.template.md | 15 + 32 files changed, 1214 insertions(+), 768 deletions(-) delete mode 100644 docs/README.template.md create mode 100644 docs/component/arr.md create mode 100644 docs/component/collection.md create mode 100644 docs/component/data-structure.md create mode 100644 docs/component/dict.md create mode 100644 docs/component/encoding-base64.md create mode 100644 docs/component/encoding-hex.md create mode 100644 docs/component/env.md create mode 100644 docs/component/filesystem.md create mode 100644 docs/component/fun.md create mode 100644 docs/component/hash.md create mode 100644 docs/component/html.md create mode 100644 docs/component/iter.md create mode 100644 docs/component/json.md create mode 100644 docs/component/math.md create mode 100644 docs/component/observer.md create mode 100644 docs/component/password.md create mode 100644 docs/component/pseudo-random.md create mode 100644 docs/component/psl.md create mode 100644 docs/component/regex.md create mode 100644 docs/component/result.md create mode 100644 docs/component/secure-random.md create mode 100644 docs/component/shell.md create mode 100644 docs/component/str-byte.md create mode 100644 docs/component/str-grapheme.md create mode 100644 docs/component/str.md create mode 100644 docs/component/type.md create mode 100644 docs/component/vec.md create mode 100644 docs/templates/README.template.md create mode 100644 docs/templates/component.template.md diff --git a/docs/README.md b/docs/README.md index dd0b2e3d9..5c94ea946 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,698 +1,34 @@ -# Documentation - -This documentation contains a list of the functions, interfaces and classes this library provides. - -Please click through to read the docblock comment details for each of them. +# Components API --- - -### `Psl` - -#### `Functions` - -- [invariant](./../src/Psl/invariant.php#L18) -- [invariant_violation](./../src/Psl/invariant_violation.php#L16) -- [sequence](./../src/Psl/sequence.php#L16) - - -### `Psl\Arr` - -#### `Functions` - -- [at](./../src/Psl/Arr/at.php#L27) ( deprecated ) -- [concat](./../src/Psl/Arr/concat.php#L22) ( deprecated ) -- [contains](./../src/Psl/Arr/contains.php#L24) ( deprecated ) -- [contains_key](./../src/Psl/Arr/contains_key.php#L25) ( deprecated ) -- [count](./../src/Psl/Arr/count.php#L36) ( deprecated ) -- [count_values](./../src/Psl/Arr/count_values.php#L22) ( deprecated ) -- [equal](./../src/Psl/Arr/equal.php#L22) ( deprecated ) -- [fill](./../src/Psl/Arr/fill.php#L25) ( deprecated ) -- [first](./../src/Psl/Arr/first.php#L24) ( deprecated ) -- [first_key](./../src/Psl/Arr/first_key.php#L25) ( deprecated ) -- [firstx](./../src/Psl/Arr/firstx.php#L28) ( deprecated ) -- [flatten](./../src/Psl/Arr/flatten.php#L33) ( deprecated ) -- [flat_map](./../src/Psl/Arr/flat_map.php#L22) ( deprecated ) -- [flip](./../src/Psl/Arr/flip.php#L28) ( deprecated ) -- [group_by](./../src/Psl/Arr/group_by.php#L43) ( deprecated ) -- [idx](./../src/Psl/Arr/idx.php#L35) ( deprecated ) -- [keys](./../src/Psl/Arr/keys.php#L22) ( deprecated ) -- [last](./../src/Psl/Arr/last.php#L24) ( deprecated ) -- [last_key](./../src/Psl/Arr/last_key.php#L26) ( deprecated ) -- [lastx](./../src/Psl/Arr/lastx.php#L28) ( deprecated ) -- [merge](./../src/Psl/Arr/merge.php#L32) ( deprecated ) -- [partition](./../src/Psl/Arr/partition.php#L22) ( deprecated ) -- [random](./../src/Psl/Arr/random.php#L25) ( deprecated ) -- [select_keys](./../src/Psl/Arr/select_keys.php#L25) ( deprecated ) -- [shuffle](./../src/Psl/Arr/shuffle.php#L30) ( deprecated ) -- [sort](./../src/Psl/Arr/sort.php#L24) ( deprecated ) -- [sort_by](./../src/Psl/Arr/sort_by.php#L27) ( deprecated ) -- [sort_by_key](./../src/Psl/Arr/sort_by_key.php#L26) ( deprecated ) -- [sort_with_keys](./../src/Psl/Arr/sort_with_keys.php#L25) ( deprecated ) -- [sort_with_keys_by](./../src/Psl/Arr/sort_with_keys_by.php#L29) ( deprecated ) -- [unique](./../src/Psl/Arr/unique.php#L22) ( deprecated ) -- [unique_by](./../src/Psl/Arr/unique_by.php#L26) ( deprecated ) -- [values](./../src/Psl/Arr/values.php#L25) ( deprecated ) -- [drop](./../src/Psl/Arr/drop.php#L31) ( deprecated ) -- [drop_while](./../src/Psl/Arr/drop_while.php#L31) ( deprecated ) -- [slice](./../src/Psl/Arr/slice.php#L35) ( deprecated ) -- [take](./../src/Psl/Arr/take.php#L25) ( deprecated ) -- [take_while](./../src/Psl/Arr/take_while.php#L31) ( deprecated ) -- [filter](./../src/Psl/Arr/filter.php#L34) ( deprecated ) -- [filter_keys](./../src/Psl/Arr/filter_keys.php#L34) ( deprecated ) -- [filter_nulls](./../src/Psl/Arr/filter_nulls.php#L25) ( deprecated ) -- [filter_with_key](./../src/Psl/Arr/filter_with_key.php#L37) ( deprecated ) -- [map](./../src/Psl/Arr/map.php#L34) ( deprecated ) -- [map_keys](./../src/Psl/Arr/map_keys.php#L34) ( deprecated ) -- [map_with_key](./../src/Psl/Arr/map_with_key.php#L34) ( deprecated ) - - -### `Psl\Collection` - -#### `Interfaces` - -- [CollectionInterface](./../src/Psl/Collection/CollectionInterface.php#L21) -- [IndexAccessInterface](./../src/Psl/Collection/IndexAccessInterface.php#L13) -- [MutableCollectionInterface](./../src/Psl/Collection/MutableCollectionInterface.php#L20) -- [MutableIndexAccessInterface](./../src/Psl/Collection/MutableIndexAccessInterface.php#L16) -- [AccessibleCollectionInterface](./../src/Psl/Collection/AccessibleCollectionInterface.php#L18) -- [MutableAccessibleCollectionInterface](./../src/Psl/Collection/MutableAccessibleCollectionInterface.php#L20) -- [VectorInterface](./../src/Psl/Collection/VectorInterface.php#L12) -- [MutableVectorInterface](./../src/Psl/Collection/MutableVectorInterface.php#L13) -- [MapInterface](./../src/Psl/Collection/MapInterface.php#L13) -- [MutableMapInterface](./../src/Psl/Collection/MutableMapInterface.php#L14) - -#### `Classes` - -- [Vector](./../src/Psl/Collection/Vector.php#L17) -- [MutableVector](./../src/Psl/Collection/MutableVector.php#L17) -- [Map](./../src/Psl/Collection/Map.php#L20) -- [MutableMap](./../src/Psl/Collection/MutableMap.php#L18) - - -### `Psl\DataStructure` - -#### `Interfaces` - -- [PriorityQueueInterface](./../src/Psl/DataStructure/PriorityQueueInterface.php#L12) -- [QueueInterface](./../src/Psl/DataStructure/QueueInterface.php#L17) -- [StackInterface](./../src/Psl/DataStructure/StackInterface.php#L17) - -#### `Classes` - -- [PriorityQueue](./../src/Psl/DataStructure/PriorityQueue.php#L18) -- [Queue](./../src/Psl/DataStructure/Queue.php#L19) -- [Stack](./../src/Psl/DataStructure/Stack.php#L19) - - -### `Psl\Dict` - -#### `Functions` - -- [associate](./../src/Psl/Dict/associate.php#L25) -- [count_values](./../src/Psl/Dict/count_values.php#L20) -- [drop](./../src/Psl/Dict/drop.php#L27) -- [drop_while](./../src/Psl/Dict/drop_while.php#L26) -- [equal](./../src/Psl/Dict/equal.php#L19) -- [filter](./../src/Psl/Dict/filter.php#L31) -- [filter_nulls](./../src/Psl/Dict/filter_nulls.php#L21) -- [filter_keys](./../src/Psl/Dict/filter_keys.php#L31) -- [filter_with_key](./../src/Psl/Dict/filter_with_key.php#L34) -- [flatten](./../src/Psl/Dict/flatten.php#L28) -- [flip](./../src/Psl/Dict/flip.php#L27) -- [from_entries](./../src/Psl/Dict/from_entries.php#L18) -- [from_iterable](./../src/Psl/Dict/from_iterable.php#L17) -- [from_keys](./../src/Psl/Dict/from_keys.php#L19) -- [group_by](./../src/Psl/Dict/group_by.php#L41) -- [map](./../src/Psl/Dict/map.php#L29) -- [map_keys](./../src/Psl/Dict/map_keys.php#L29) -- [map_with_key](./../src/Psl/Dict/map_with_key.php#L29) -- [merge](./../src/Psl/Dict/merge.php#L19) -- [partition](./../src/Psl/Dict/partition.php#L19) -- [partition_with_key](./../src/Psl/Dict/partition_with_key.php#L19) -- [pull](./../src/Psl/Dict/pull.php#L35) -- [pull_with_key](./../src/Psl/Dict/pull_with_key.php#L35) -- [reindex](./../src/Psl/Dict/reindex.php#L37) -- [select_keys](./../src/Psl/Dict/select_keys.php#L23) -- [slice](./../src/Psl/Dict/slice.php#L31) -- [sort](./../src/Psl/Dict/sort.php#L24) -- [sort_by](./../src/Psl/Dict/sort_by.php#L24) -- [sort_by_key](./../src/Psl/Dict/sort_by_key.php#L24) -- [take](./../src/Psl/Dict/take.php#L22) -- [take_while](./../src/Psl/Dict/take_while.php#L26) -- [unique](./../src/Psl/Dict/unique.php#L17) -- [unique_by](./../src/Psl/Dict/unique_by.php#L23) -- [diff](./../src/Psl/Dict/diff.php#L24) -- [diff_by_key](./../src/Psl/Dict/diff_by_key.php#L24) -- [intersect](./../src/Psl/Dict/intersect.php#L24) -- [intersect_by_key](./../src/Psl/Dict/intersect_by_key.php#L24) - - -### `Psl\Encoding\Base64` - -#### `Functions` - -- [encode](./../src/Psl/Encoding/Base64/encode.php#L18) -- [decode](./../src/Psl/Encoding/Base64/decode.php#L27) - - -### `Psl\Encoding\Hex` - -#### `Functions` - -- [encode](./../src/Psl/Encoding/Hex/encode.php#L16) -- [decode](./../src/Psl/Encoding/Hex/decode.php#L22) - - -### `Psl\Env` - -#### `Functions` - -- [args](./../src/Psl/Env/args.php#L12) -- [current_dir](./../src/Psl/Env/current_dir.php#L16) -- [current_exec](./../src/Psl/Env/current_exec.php#L18) -- [get_var](./../src/Psl/Env/get_var.php#L18) -- [get_vars](./../src/Psl/Env/get_vars.php#L14) -- [join_paths](./../src/Psl/Env/join_paths.php#L16) -- [remove_var](./../src/Psl/Env/remove_var.php#L18) -- [set_current_dir](./../src/Psl/Env/set_current_dir.php#L16) -- [set_var](./../src/Psl/Env/set_var.php#L19) -- [split_paths](./../src/Psl/Env/split_paths.php#L16) -- [temp_dir](./../src/Psl/Env/temp_dir.php#L20) - - -### `Psl\Filesystem` - -#### `Constants` - -- [SEPARATOR](./../src/Psl/Filesystem/constants.php#L0) - -#### `Functions` - -- [change_group](./../src/Psl/Filesystem/change_group.php#L20) -- [change_owner](./../src/Psl/Filesystem/change_owner.php#L20) -- [change_permissions](./../src/Psl/Filesystem/change_permissions.php#L19) -- [copy](./../src/Psl/Filesystem/copy.php#L21) -- [create_directory](./../src/Psl/Filesystem/create_directory.php#L17) -- [create_file](./../src/Psl/Filesystem/create_file.php#L23) -- [delete_directory](./../src/Psl/Filesystem/delete_directory.php#L23) -- [delete_file](./../src/Psl/Filesystem/delete_file.php#L20) -- [exists](./../src/Psl/Filesystem/exists.php#L19) -- [file_size](./../src/Psl/Filesystem/file_size.php#L17) -- [get_group](./../src/Psl/Filesystem/get_group.php#L18) -- [get_owner](./../src/Psl/Filesystem/get_owner.php#L18) -- [get_permissions](./../src/Psl/Filesystem/get_permissions.php#L18) -- [get_basename](./../src/Psl/Filesystem/get_basename.php#L23) -- [get_directory](./../src/Psl/Filesystem/get_directory.php#L27) -- [get_extension](./../src/Psl/Filesystem/get_extension.php#L16) -- [get_filename](./../src/Psl/Filesystem/get_filename.php#L18) -- [is_directory](./../src/Psl/Filesystem/is_directory.php#L22) -- [is_file](./../src/Psl/Filesystem/is_file.php#L22) -- [is_symbolic_link](./../src/Psl/Filesystem/is_symbolic_link.php#L19) -- [is_readable](./../src/Psl/Filesystem/is_readable.php#L20) -- [is_writable](./../src/Psl/Filesystem/is_writable.php#L20) -- [canonicalize](./../src/Psl/Filesystem/canonicalize.php#L15) -- [is_executable](./../src/Psl/Filesystem/is_executable.php#L20) -- [read_directory](./../src/Psl/Filesystem/read_directory.php#L19) -- [read_file](./../src/Psl/Filesystem/read_file.php#L24) -- [read_symbolic_link](./../src/Psl/Filesystem/read_symbolic_link.php#L21) -- [append_file](./../src/Psl/Filesystem/append_file.php#L18) -- [write_file](./../src/Psl/Filesystem/write_file.php#L18) -- [create_temporary_file](./../src/Psl/Filesystem/create_temporary_file.php#L26) -- [create_hard_link](./../src/Psl/Filesystem/create_hard_link.php#L21) -- [create_symbolic_link](./../src/Psl/Filesystem/create_symbolic_link.php#L21) -- [get_access_time](./../src/Psl/Filesystem/get_access_time.php#L18) -- [get_change_time](./../src/Psl/Filesystem/get_change_time.php#L19) -- [get_modification_time](./../src/Psl/Filesystem/get_modification_time.php#L19) -- [get_inode](./../src/Psl/Filesystem/get_inode.php#L18) - - -### `Psl\Fun` - -#### `Functions` - -- [after](./../src/Psl/Fun/after.php#L37) -- [identity](./../src/Psl/Fun/identity.php#L17) -- [pipe](./../src/Psl/Fun/pipe.php#L34) -- [rethrow](./../src/Psl/Fun/rethrow.php#L17) -- [when](./../src/Psl/Fun/when.php#L33) - - -### `Psl\Hash` - -#### `Functions` - -- [hash](./../src/Psl/Hash/hash.php#L16) -- [algorithms](./../src/Psl/Hash/algorithms.php#L16) -- [equals](./../src/Psl/Hash/equals.php#L14) - -#### `Classes` - -- [Context](./../src/Psl/Hash/Context.php#L31) - - -### `Psl\Html` - -#### `Functions` - -- [encode](./../src/Psl/Html/encode.php#L27) -- [encode_special_characters](./../src/Psl/Html/encode_special_characters.php#L29) -- [decode](./../src/Psl/Html/decode.php#L23) -- [decode_special_characters](./../src/Psl/Html/decode_special_characters.php#L18) -- [strip_tags](./../src/Psl/Html/strip_tags.php#L16) - - -### `Psl\Iter` - -#### `Functions` - -- [all](./../src/Psl/Iter/all.php#L28) -- [any](./../src/Psl/Iter/any.php#L28) -- [apply](./../src/Psl/Iter/apply.php#L27) -- [chain](./../src/Psl/Iter/chain.php#L31) ( deprecated ) -- [chunk](./../src/Psl/Iter/chunk.php#L33) ( deprecated ) -- [chunk_with_keys](./../src/Psl/Iter/chunk_with_keys.php#L30) ( deprecated ) -- [contains](./../src/Psl/Iter/contains.php#L27) -- [contains_key](./../src/Psl/Iter/contains_key.php#L16) -- [count](./../src/Psl/Iter/count.php#L29) -- [diff_by_key](./../src/Psl/Iter/diff_by_key.php#L23) ( deprecated ) -- [drop](./../src/Psl/Iter/drop.php#L31) ( deprecated ) -- [drop_while](./../src/Psl/Iter/drop_while.php#L31) ( deprecated ) -- [enumerate](./../src/Psl/Iter/enumerate.php#L23) ( deprecated ) -- [filter](./../src/Psl/Iter/filter.php#L34) ( deprecated ) -- [filter_keys](./../src/Psl/Iter/filter_keys.php#L36) ( deprecated ) -- [filter_nulls](./../src/Psl/Iter/filter_nulls.php#L26) ( deprecated ) -- [filter_with_key](./../src/Psl/Iter/filter_with_key.php#L39) ( deprecated ) -- [first](./../src/Psl/Iter/first.php#L27) -- [first_key](./../src/Psl/Iter/first_key.php#L30) -- [flat_map](./../src/Psl/Iter/flat_map.php#L22) ( deprecated ) -- [flatten](./../src/Psl/Iter/flatten.php#L24) ( deprecated ) -- [flip](./../src/Psl/Iter/flip.php#L27) ( deprecated ) -- [from_entries](./../src/Psl/Iter/from_entries.php#L24) ( deprecated ) -- [from_keys](./../src/Psl/Iter/from_keys.php#L25) ( deprecated ) -- [is_empty](./../src/Psl/Iter/is_empty.php#L12) -- [keys](./../src/Psl/Iter/keys.php#L28) ( deprecated ) -- [last](./../src/Psl/Iter/last.php#L17) -- [last_key](./../src/Psl/Iter/last_key.php#L17) -- [map](./../src/Psl/Iter/map.php#L35) ( deprecated ) -- [map_keys](./../src/Psl/Iter/map_keys.php#L35) ( deprecated ) -- [map_with_key](./../src/Psl/Iter/map_with_key.php#L33) ( deprecated ) -- [merge](./../src/Psl/Iter/merge.php#L30) ( deprecated ) -- [product](./../src/Psl/Iter/product.php#L34) ( deprecated ) -- [pull](./../src/Psl/Iter/pull.php#L40) ( deprecated ) -- [pull_with_key](./../src/Psl/Iter/pull_with_key.php#L41) ( deprecated ) -- [random](./../src/Psl/Iter/random.php#L23) -- [range](./../src/Psl/Iter/range.php#L45) ( deprecated ) -- [reduce](./../src/Psl/Iter/reduce.php#L32) -- [reduce_keys](./../src/Psl/Iter/reduce_keys.php#L33) -- [reduce_with_keys](./../src/Psl/Iter/reduce_with_keys.php#L40) -- [reductions](./../src/Psl/Iter/reductions.php#L33) ( deprecated ) -- [reindex](./../src/Psl/Iter/reindex.php#L43) ( deprecated ) -- [repeat](./../src/Psl/Iter/repeat.php#L36) ( deprecated ) -- [reproduce](./../src/Psl/Iter/reproduce.php#L33) ( deprecated ) -- [reverse](./../src/Psl/Iter/reverse.php#L26) ( deprecated ) -- [rewindable](./../src/Psl/Iter/rewindable.php#L20) -- [search](./../src/Psl/Iter/search.php#L26) -- [slice](./../src/Psl/Iter/slice.php#L36) ( deprecated ) -- [take](./../src/Psl/Iter/take.php#L25) ( deprecated ) -- [take_while](./../src/Psl/Iter/take_while.php#L32) ( deprecated ) -- [to_array](./../src/Psl/Iter/to_array.php#L21) ( deprecated ) -- [to_array_with_keys](./../src/Psl/Iter/to_array_with_keys.php#L22) ( deprecated ) -- [to_iterator](./../src/Psl/Iter/to_iterator.php#L19) -- [values](./../src/Psl/Iter/values.php#L32) ( deprecated ) -- [zip](./../src/Psl/Iter/zip.php#L38) ( deprecated ) - -#### `Classes` - -- [Iterator](./../src/Psl/Iter/Iterator.php#L18) - - -### `Psl\Json` - -#### `Functions` - -- [encode](./../src/Psl/Json/encode.php#L27) -- [decode](./../src/Psl/Json/decode.php#L24) -- [typed](./../src/Psl/Json/typed.php#L22) - - -### `Psl\Math` - -#### `Constants` - -- [INT64_MAX](./../src/Psl/Math/constants.php#L0) -- [INT64_MIN](./../src/Psl/Math/constants.php#L0) -- [INT53_MAX](./../src/Psl/Math/constants.php#L0) -- [INT53_MIN](./../src/Psl/Math/constants.php#L0) -- [INT32_MAX](./../src/Psl/Math/constants.php#L0) -- [INT32_MIN](./../src/Psl/Math/constants.php#L0) -- [INT16_MAX](./../src/Psl/Math/constants.php#L0) -- [INT16_MIN](./../src/Psl/Math/constants.php#L0) -- [UINT32_MAX](./../src/Psl/Math/constants.php#L0) -- [UINT16_MAX](./../src/Psl/Math/constants.php#L0) -- [PI](./../src/Psl/Math/constants.php#L0) -- [E](./../src/Psl/Math/constants.php#L0) -- [INFINITY](./../src/Psl/Math/constants.php#L0) -- [NAN](./../src/Psl/Math/constants.php#L0) - -#### `Functions` - -- [abs](./../src/Psl/Math/abs.php#L34) -- [base_convert](./../src/Psl/Math/base_convert.php#L39) -- [ceil](./../src/Psl/Math/ceil.php#L25) -- [clamp](./../src/Psl/Math/clamp.php#L24) -- [cos](./../src/Psl/Math/cos.php#L22) -- [div](./../src/Psl/Math/div.php#L32) -- [exp](./../src/Psl/Math/exp.php#L22) -- [floor](./../src/Psl/Math/floor.php#L16) -- [from_base](./../src/Psl/Math/from_base.php#L27) -- [log](./../src/Psl/Math/log.php#L18) -- [max](./../src/Psl/Math/max.php#L19) -- [max_by](./../src/Psl/Math/max_by.php#L21) -- [maxva](./../src/Psl/Math/maxva.php#L20) -- [mean](./../src/Psl/Math/mean.php#L14) -- [median](./../src/Psl/Math/median.php#L15) -- [min](./../src/Psl/Math/min.php#L19) -- [min_by](./../src/Psl/Math/min_by.php#L29) -- [minva](./../src/Psl/Math/minva.php#L20) -- [round](./../src/Psl/Math/round.php#L19) -- [sin](./../src/Psl/Math/sin.php#L14) -- [sqrt](./../src/Psl/Math/sqrt.php#L20) -- [sum](./../src/Psl/Math/sum.php#L14) -- [sum_floats](./../src/Psl/Math/sum_floats.php#L14) -- [tan](./../src/Psl/Math/tan.php#L14) -- [to_base](./../src/Psl/Math/to_base.php#L18) - - -### `Psl\Observer` - -#### `Interfaces` - -- [SubjectInterface](./../src/Psl/Observer/SubjectInterface.php#L7) -- [ObserverInterface](./../src/Psl/Observer/ObserverInterface.php#L10) - - -### `Psl\Password` - -#### `Constants` - -- [DEFAULT_ALGORITHM](./../src/Psl/Password/constants.php#L0) -- [BCRYPT_ALGORITHM](./../src/Psl/Password/constants.php#L0) - -#### `Functions` - -- [algorithms](./../src/Psl/Password/algorithms.php#L14) -- [get_information](./../src/Psl/Password/get_information.php#L24) -- [hash](./../src/Psl/Password/hash.php#L32) -- [needs_rehash](./../src/Psl/Password/needs_rehash.php#L25) -- [verify](./../src/Psl/Password/verify.php#L14) - - -### `Psl\PseudoRandom` - -#### `Functions` - -- [float](./../src/Psl/PseudoRandom/float.php#L12) -- [int](./../src/Psl/PseudoRandom/int.php#L17) - - -### `Psl\Regex` - -#### `Functions` - -- [split](./../src/Psl/Regex/split.php#L29) -- [matches](./../src/Psl/Regex/matches.php#L19) -- [replace](./../src/Psl/Regex/replace.php#L26) -- [replace_with](./../src/Psl/Regex/replace_with.php#L26) -- [replace_every](./../src/Psl/Regex/replace_every.php#L27) - - -### `Psl\Result` - -#### `Functions` - -- [wrap](./../src/Psl/Result/wrap.php#L19) - -#### `Interfaces` - -- [ResultInterface](./../src/Psl/Result/ResultInterface.php#L19) - -#### `Classes` - -- [Failure](./../src/Psl/Result/Failure.php#L17) -- [Success](./../src/Psl/Result/Success.php#L17) - - -### `Psl\SecureRandom` - -#### `Functions` - -- [bytes](./../src/Psl/SecureRandom/bytes.php#L20) -- [float](./../src/Psl/SecureRandom/float.php#L14) -- [int](./../src/Psl/SecureRandom/int.php#L21) -- [string](./../src/Psl/SecureRandom/string.php#L25) - - -### `Psl\Shell` - -#### `Functions` - -- [escape_command](./../src/Psl/Shell/escape_command.php#L14) -- [escape_argument](./../src/Psl/Shell/escape_argument.php#L17) -- [execute](./../src/Psl/Shell/execute.php#L37) - - -### `Psl\Str` - -#### `Constants` - -- [ALPHABET](./../src/Psl/Str/constants.php#L0) -- [ALPHABET_ALPHANUMERIC](./../src/Psl/Str/constants.php#L0) - -#### `Functions` - -- [capitalize](./../src/Psl/Str/capitalize.php#L33) -- [capitalize_words](./../src/Psl/Str/capitalize_words.php#L35) -- [chr](./../src/Psl/Str/chr.php#L27) -- [chunk](./../src/Psl/Str/chunk.php#L40) -- [concat](./../src/Psl/Str/concat.php#L20) -- [contains](./../src/Psl/Str/contains.php#L42) -- [contains_ci](./../src/Psl/Str/contains_ci.php#L42) -- [detect_encoding](./../src/Psl/Str/detect_encoding.php#L21) -- [convert_encoding](./../src/Psl/Str/convert_encoding.php#L19) -- [is_utf8](./../src/Psl/Str/is_utf8.php#L14) -- [ends_with](./../src/Psl/Str/ends_with.php#L39) -- [ends_with_ci](./../src/Psl/Str/ends_with_ci.php#L39) -- [fold](./../src/Psl/Str/fold.php#L22) -- [format](./../src/Psl/Str/format.php#L26) -- [format_number](./../src/Psl/Str/format_number.php#L19) -- [from_code_points](./../src/Psl/Str/from_code_points.php#L20) -- [is_empty](./../src/Psl/Str/is_empty.php#L29) -- [join](./../src/Psl/Str/join.php#L27) -- [length](./../src/Psl/Str/length.php#L30) -- [levenshtein](./../src/Psl/Str/levenshtein.php#L29) -- [lowercase](./../src/Psl/Str/lowercase.php#L35) -- [metaphone](./../src/Psl/Str/metaphone.php#L19) -- [ord](./../src/Psl/Str/ord.php#L27) -- [pad_left](./../src/Psl/Str/pad_left.php#L36) -- [pad_right](./../src/Psl/Str/pad_right.php#L36) -- [repeat](./../src/Psl/Str/repeat.php#L28) -- [replace](./../src/Psl/Str/replace.php#L19) -- [replace_ci](./../src/Psl/Str/replace_ci.php#L20) -- [replace_every](./../src/Psl/Str/replace_every.php#L19) -- [replace_every_ci](./../src/Psl/Str/replace_every_ci.php#L19) -- [search](./../src/Psl/Str/search.php#L25) -- [search_ci](./../src/Psl/Str/search_ci.php#L25) -- [search_last](./../src/Psl/Str/search_last.php#L25) -- [search_last_ci](./../src/Psl/Str/search_last_ci.php#L25) -- [slice](./../src/Psl/Str/slice.php#L25) -- [splice](./../src/Psl/Str/splice.php#L22) -- [split](./../src/Psl/Str/split.php#L24) -- [starts_with](./../src/Psl/Str/starts_with.php#L16) -- [starts_with_ci](./../src/Psl/Str/starts_with_ci.php#L16) -- [strip_prefix](./../src/Psl/Str/strip_prefix.php#L17) -- [strip_suffix](./../src/Psl/Str/strip_suffix.php#L17) -- [to_int](./../src/Psl/Str/to_int.php#L12) -- [trim](./../src/Psl/Str/trim.php#L18) -- [trim_left](./../src/Psl/Str/trim_left.php#L18) -- [trim_right](./../src/Psl/Str/trim_right.php#L18) -- [truncate](./../src/Psl/Str/truncate.php#L29) -- [uppercase](./../src/Psl/Str/uppercase.php#L19) -- [width](./../src/Psl/Str/width.php#L19) -- [wrap](./../src/Psl/Str/wrap.php#L23) -- [after](./../src/Psl/Str/after.php#L15) -- [after_ci](./../src/Psl/Str/after_ci.php#L15) -- [after_last](./../src/Psl/Str/after_last.php#L15) -- [after_last_ci](./../src/Psl/Str/after_last_ci.php#L15) -- [before](./../src/Psl/Str/before.php#L15) -- [before_ci](./../src/Psl/Str/before_ci.php#L15) -- [before_last](./../src/Psl/Str/before_last.php#L15) -- [before_last_ci](./../src/Psl/Str/before_last_ci.php#L15) - - -### `Psl\Str\Byte` - -#### `Functions` - -- [capitalize](./../src/Psl/Str/Byte/capitalize.php#L17) -- [capitalize_words](./../src/Psl/Str/Byte/capitalize_words.php#L17) -- [chr](./../src/Psl/Str/Byte/chr.php#L14) -- [chunk](./../src/Psl/Str/Byte/chunk.php#L27) -- [compare](./../src/Psl/Str/Byte/compare.php#L19) -- [compare_ci](./../src/Psl/Str/Byte/compare_ci.php#L19) -- [contains](./../src/Psl/Str/Byte/contains.php#L21) -- [contains_ci](./../src/Psl/Str/Byte/contains_ci.php#L21) -- [ends_with](./../src/Psl/Str/Byte/ends_with.php#L12) -- [ends_with_ci](./../src/Psl/Str/Byte/ends_with_ci.php#L14) -- [length](./../src/Psl/Str/Byte/length.php#L14) -- [lowercase](./../src/Psl/Str/Byte/lowercase.php#L14) -- [ord](./../src/Psl/Str/Byte/ord.php#L12) -- [pad_left](./../src/Psl/Str/Byte/pad_left.php#L25) -- [pad_right](./../src/Psl/Str/Byte/pad_right.php#L25) -- [replace](./../src/Psl/Str/Byte/replace.php#L15) -- [replace_ci](./../src/Psl/Str/Byte/replace_ci.php#L15) -- [replace_every](./../src/Psl/Str/Byte/replace_every.php#L17) -- [replace_every_ci](./../src/Psl/Str/Byte/replace_every_ci.php#L17) -- [reverse](./../src/Psl/Str/Byte/reverse.php#L10) -- [rot13](./../src/Psl/Str/Byte/rot13.php#L14) -- [search](./../src/Psl/Str/Byte/search.php#L23) -- [search_ci](./../src/Psl/Str/Byte/search_ci.php#L23) -- [search_last](./../src/Psl/Str/Byte/search_last.php#L25) -- [search_last_ci](./../src/Psl/Str/Byte/search_last_ci.php#L23) -- [shuffle](./../src/Psl/Str/Byte/shuffle.php#L14) -- [slice](./../src/Psl/Str/Byte/slice.php#L22) -- [splice](./../src/Psl/Str/Byte/splice.php#L23) -- [split](./../src/Psl/Str/Byte/split.php#L25) -- [starts_with](./../src/Psl/Str/Byte/starts_with.php#L14) -- [starts_with_ci](./../src/Psl/Str/Byte/starts_with_ci.php#L14) -- [strip_prefix](./../src/Psl/Str/Byte/strip_prefix.php#L13) -- [strip_suffix](./../src/Psl/Str/Byte/strip_suffix.php#L13) -- [trim](./../src/Psl/Str/Byte/trim.php#L17) -- [trim_left](./../src/Psl/Str/Byte/trim_left.php#L17) -- [trim_right](./../src/Psl/Str/Byte/trim_right.php#L17) -- [uppercase](./../src/Psl/Str/Byte/uppercase.php#L14) -- [words](./../src/Psl/Str/Byte/words.php#L19) -- [wrap](./../src/Psl/Str/Byte/wrap.php#L21) -- [after](./../src/Psl/Str/Byte/after.php#L14) -- [after_ci](./../src/Psl/Str/Byte/after_ci.php#L14) -- [after_last](./../src/Psl/Str/Byte/after_last.php#L15) -- [after_last_ci](./../src/Psl/Str/Byte/after_last_ci.php#L14) -- [before](./../src/Psl/Str/Byte/before.php#L14) -- [before_ci](./../src/Psl/Str/Byte/before_ci.php#L14) -- [before_last](./../src/Psl/Str/Byte/before_last.php#L14) -- [before_last_ci](./../src/Psl/Str/Byte/before_last_ci.php#L14) - - -### `Psl\Str\Grapheme` - -#### `Functions` - -- [contains](./../src/Psl/Str/Grapheme/contains.php#L21) -- [contains_ci](./../src/Psl/Str/Grapheme/contains_ci.php#L21) -- [ends_with](./../src/Psl/Str/Grapheme/ends_with.php#L17) -- [ends_with_ci](./../src/Psl/Str/Grapheme/ends_with_ci.php#L17) -- [length](./../src/Psl/Str/Grapheme/length.php#L19) -- [search](./../src/Psl/Str/Grapheme/search.php#L24) -- [search_ci](./../src/Psl/Str/Grapheme/search_ci.php#L24) -- [search_last](./../src/Psl/Str/Grapheme/search_last.php#L25) -- [search_last_ci](./../src/Psl/Str/Grapheme/search_last_ci.php#L25) -- [slice](./../src/Psl/Str/Grapheme/slice.php#L21) -- [starts_with](./../src/Psl/Str/Grapheme/starts_with.php#L12) -- [starts_with_ci](./../src/Psl/Str/Grapheme/starts_with_ci.php#L12) -- [strip_prefix](./../src/Psl/Str/Grapheme/strip_prefix.php#L13) -- [strip_suffix](./../src/Psl/Str/Grapheme/strip_suffix.php#L13) -- [after](./../src/Psl/Str/Grapheme/after.php#L14) -- [after_ci](./../src/Psl/Str/Grapheme/after_ci.php#L14) -- [after_last](./../src/Psl/Str/Grapheme/after_last.php#L15) -- [after_last_ci](./../src/Psl/Str/Grapheme/after_last_ci.php#L14) -- [before](./../src/Psl/Str/Grapheme/before.php#L14) -- [before_ci](./../src/Psl/Str/Grapheme/before_ci.php#L14) -- [before_last](./../src/Psl/Str/Grapheme/before_last.php#L14) -- [before_last_ci](./../src/Psl/Str/Grapheme/before_last_ci.php#L14) - - -### `Psl\Type` - -#### `Functions` - -- [map](./../src/Psl/Type/map.php#L21) -- [mutable_map](./../src/Psl/Type/mutable_map.php#L21) -- [vector](./../src/Psl/Type/vector.php#L19) -- [mutable_vector](./../src/Psl/Type/mutable_vector.php#L19) -- [array_key](./../src/Psl/Type/array_key.php#L10) -- [bool](./../src/Psl/Type/bool.php#L10) -- [float](./../src/Psl/Type/float.php#L10) -- [int](./../src/Psl/Type/int.php#L10) -- [intersection](./../src/Psl/Type/intersection.php#L20) -- [iterable](./../src/Psl/Type/iterable.php#L20) -- [mixed](./../src/Psl/Type/mixed.php#L10) -- [null](./../src/Psl/Type/null.php#L10) -- [nullable](./../src/Psl/Type/nullable.php#L18) -- [optional](./../src/Psl/Type/optional.php#L14) -- [num](./../src/Psl/Type/num.php#L10) -- [object](./../src/Psl/Type/object.php#L14) -- [resource](./../src/Psl/Type/resource.php#L12) -- [string](./../src/Psl/Type/string.php#L10) -- [non_empty_string](./../src/Psl/Type/non_empty_string.php#L10) -- [scalar](./../src/Psl/Type/scalar.php#L10) -- [shape](./../src/Psl/Type/shape.php#L15) -- [union](./../src/Psl/Type/union.php#L20) -- [vec](./../src/Psl/Type/vec.php#L18) -- [dict](./../src/Psl/Type/dict.php#L20) -- [is_array](./../src/Psl/Type/is_array.php#L20) ( deprecated ) -- [is_arraykey](./../src/Psl/Type/is_arraykey.php#L18) ( deprecated ) -- [is_bool](./../src/Psl/Type/is_bool.php#L20) ( deprecated ) -- [is_callable](./../src/Psl/Type/is_callable.php#L18) -- [is_float](./../src/Psl/Type/is_float.php#L20) ( deprecated ) -- [is_instanceof](./../src/Psl/Type/is_instanceof.php#L22) ( deprecated ) -- [is_int](./../src/Psl/Type/is_int.php#L20) ( deprecated ) -- [is_iterable](./../src/Psl/Type/is_iterable.php#L20) ( deprecated ) -- [is_nan](./../src/Psl/Type/is_nan.php#L14) -- [is_null](./../src/Psl/Type/is_null.php#L18) ( deprecated ) -- [is_numeric](./../src/Psl/Type/is_numeric.php#L20) ( deprecated ) -- [is_object](./../src/Psl/Type/is_object.php#L20) ( deprecated ) -- [is_resource](./../src/Psl/Type/is_resource.php#L22) ( deprecated ) -- [is_scalar](./../src/Psl/Type/is_scalar.php#L20) ( deprecated ) -- [is_string](./../src/Psl/Type/is_string.php#L20) ( deprecated ) -- [literal_scalar](./../src/Psl/Type/literal_scalar.php#L18) - -#### `Interfaces` - -- [TypeInterface](./../src/Psl/Type/TypeInterface.php#L14) - -#### `Classes` - -- [Type](./../src/Psl/Type/Type.php#L15) - - -### `Psl\Vec` - -#### `Functions` - -- [chunk](./../src/Psl/Vec/chunk.php#L24) -- [chunk_with_keys](./../src/Psl/Vec/chunk_with_keys.php#L27) -- [concat](./../src/Psl/Vec/concat.php#L17) -- [enumerate](./../src/Psl/Vec/enumerate.php#L17) -- [fill](./../src/Psl/Vec/fill.php#L24) -- [filter](./../src/Psl/Vec/filter.php#L30) -- [filter_keys](./../src/Psl/Vec/filter_keys.php#L31) -- [filter_nulls](./../src/Psl/Vec/filter_nulls.php#L20) -- [filter_with_key](./../src/Psl/Vec/filter_with_key.php#L34) -- [flat_map](./../src/Psl/Vec/flat_map.php#L16) -- [keys](./../src/Psl/Vec/keys.php#L17) -- [partition](./../src/Psl/Vec/partition.php#L18) -- [range](./../src/Psl/Vec/range.php#L50) -- [reductions](./../src/Psl/Vec/reductions.php#L27) -- [map](./../src/Psl/Vec/map.php#L27) -- [map_with_key](./../src/Psl/Vec/map_with_key.php#L27) -- [reproduce](./../src/Psl/Vec/reproduce.php#L25) -- [reverse](./../src/Psl/Vec/reverse.php#L22) -- [shuffle](./../src/Psl/Vec/shuffle.php#L26) -- [sort](./../src/Psl/Vec/sort.php#L23) -- [sort_by](./../src/Psl/Vec/sort_by.php#L26) -- [values](./../src/Psl/Vec/values.php#L16) -- [zip](./../src/Psl/Vec/zip.php#L37) - +- [Psl](./component/psl.md) +- [Psl\Arr](./component/arr.md) +- [Psl\Collection](./component/collection.md) +- [Psl\DataStructure](./component/data-structure.md) +- [Psl\Dict](./component/dict.md) +- [Psl\Encoding\Base64](./component/encoding-base64.md) +- [Psl\Encoding\Hex](./component/encoding-hex.md) +- [Psl\Env](./component/env.md) +- [Psl\Filesystem](./component/filesystem.md) +- [Psl\Fun](./component/fun.md) +- [Psl\Hash](./component/hash.md) +- [Psl\Html](./component/html.md) +- [Psl\Iter](./component/iter.md) +- [Psl\Json](./component/json.md) +- [Psl\Math](./component/math.md) +- [Psl\Observer](./component/observer.md) +- [Psl\Password](./component/password.md) +- [Psl\PseudoRandom](./component/pseudo-random.md) +- [Psl\Regex](./component/regex.md) +- [Psl\Result](./component/result.md) +- [Psl\SecureRandom](./component/secure-random.md) +- [Psl\Shell](./component/shell.md) +- [Psl\Str](./component/str.md) +- [Psl\Str\Byte](./component/str-byte.md) +- [Psl\Str\Grapheme](./component/str-grapheme.md) +- [Psl\Type](./component/type.md) +- [Psl\Vec](./component/vec.md) --- diff --git a/docs/README.template.md b/docs/README.template.md deleted file mode 100644 index 872a25739..000000000 --- a/docs/README.template.md +++ /dev/null @@ -1,15 +0,0 @@ -# Documentation - -This documentation contains a list of the functions, interfaces and classes this library provides. - -Please click through to read the docblock comment details for each of them. - ---- - -{{ api }} - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/arr.md b/docs/component/arr.md new file mode 100644 index 000000000..90bb7b3b9 --- /dev/null +++ b/docs/component/arr.md @@ -0,0 +1,65 @@ +> [previous](psl.md) + +--- + +## `Psl\Arr` Component + +### `Functions` + +- [at](./../../src/Psl/Arr/at.php#L27) ( deprecated ) +- [concat](./../../src/Psl/Arr/concat.php#L22) ( deprecated ) +- [contains](./../../src/Psl/Arr/contains.php#L24) ( deprecated ) +- [contains_key](./../../src/Psl/Arr/contains_key.php#L25) ( deprecated ) +- [count](./../../src/Psl/Arr/count.php#L36) ( deprecated ) +- [count_values](./../../src/Psl/Arr/count_values.php#L22) ( deprecated ) +- [equal](./../../src/Psl/Arr/equal.php#L22) ( deprecated ) +- [fill](./../../src/Psl/Arr/fill.php#L25) ( deprecated ) +- [first](./../../src/Psl/Arr/first.php#L24) ( deprecated ) +- [first_key](./../../src/Psl/Arr/first_key.php#L25) ( deprecated ) +- [firstx](./../../src/Psl/Arr/firstx.php#L28) ( deprecated ) +- [flatten](./../../src/Psl/Arr/flatten.php#L33) ( deprecated ) +- [flat_map](./../../src/Psl/Arr/flat_map.php#L22) ( deprecated ) +- [flip](./../../src/Psl/Arr/flip.php#L28) ( deprecated ) +- [group_by](./../../src/Psl/Arr/group_by.php#L43) ( deprecated ) +- [idx](./../../src/Psl/Arr/idx.php#L35) ( deprecated ) +- [keys](./../../src/Psl/Arr/keys.php#L22) ( deprecated ) +- [last](./../../src/Psl/Arr/last.php#L24) ( deprecated ) +- [last_key](./../../src/Psl/Arr/last_key.php#L26) ( deprecated ) +- [lastx](./../../src/Psl/Arr/lastx.php#L28) ( deprecated ) +- [merge](./../../src/Psl/Arr/merge.php#L32) ( deprecated ) +- [partition](./../../src/Psl/Arr/partition.php#L22) ( deprecated ) +- [random](./../../src/Psl/Arr/random.php#L25) ( deprecated ) +- [select_keys](./../../src/Psl/Arr/select_keys.php#L25) ( deprecated ) +- [shuffle](./../../src/Psl/Arr/shuffle.php#L30) ( deprecated ) +- [sort](./../../src/Psl/Arr/sort.php#L24) ( deprecated ) +- [sort_by](./../../src/Psl/Arr/sort_by.php#L27) ( deprecated ) +- [sort_by_key](./../../src/Psl/Arr/sort_by_key.php#L26) ( deprecated ) +- [sort_with_keys](./../../src/Psl/Arr/sort_with_keys.php#L25) ( deprecated ) +- [sort_with_keys_by](./../../src/Psl/Arr/sort_with_keys_by.php#L29) ( deprecated ) +- [unique](./../../src/Psl/Arr/unique.php#L22) ( deprecated ) +- [unique_by](./../../src/Psl/Arr/unique_by.php#L26) ( deprecated ) +- [values](./../../src/Psl/Arr/values.php#L25) ( deprecated ) +- [drop](./../../src/Psl/Arr/drop.php#L31) ( deprecated ) +- [drop_while](./../../src/Psl/Arr/drop_while.php#L31) ( deprecated ) +- [slice](./../../src/Psl/Arr/slice.php#L35) ( deprecated ) +- [take](./../../src/Psl/Arr/take.php#L25) ( deprecated ) +- [take_while](./../../src/Psl/Arr/take_while.php#L31) ( deprecated ) +- [filter](./../../src/Psl/Arr/filter.php#L34) ( deprecated ) +- [filter_keys](./../../src/Psl/Arr/filter_keys.php#L34) ( deprecated ) +- [filter_nulls](./../../src/Psl/Arr/filter_nulls.php#L25) ( deprecated ) +- [filter_with_key](./../../src/Psl/Arr/filter_with_key.php#L37) ( deprecated ) +- [map](./../../src/Psl/Arr/map.php#L34) ( deprecated ) +- [map_keys](./../../src/Psl/Arr/map_keys.php#L34) ( deprecated ) +- [map_with_key](./../../src/Psl/Arr/map_with_key.php#L34) ( deprecated ) + + + +--- + +> [next](collection.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/collection.md b/docs/component/collection.md new file mode 100644 index 000000000..59b75731b --- /dev/null +++ b/docs/component/collection.md @@ -0,0 +1,37 @@ +> [previous](arr.md) + +--- + +## `Psl\Collection` Component + +### `Interfaces` + +- [CollectionInterface](./../../src/Psl/Collection/CollectionInterface.php#L21) +- [IndexAccessInterface](./../../src/Psl/Collection/IndexAccessInterface.php#L13) +- [MutableCollectionInterface](./../../src/Psl/Collection/MutableCollectionInterface.php#L20) +- [MutableIndexAccessInterface](./../../src/Psl/Collection/MutableIndexAccessInterface.php#L16) +- [AccessibleCollectionInterface](./../../src/Psl/Collection/AccessibleCollectionInterface.php#L18) +- [MutableAccessibleCollectionInterface](./../../src/Psl/Collection/MutableAccessibleCollectionInterface.php#L20) +- [VectorInterface](./../../src/Psl/Collection/VectorInterface.php#L12) +- [MutableVectorInterface](./../../src/Psl/Collection/MutableVectorInterface.php#L13) +- [MapInterface](./../../src/Psl/Collection/MapInterface.php#L13) +- [MutableMapInterface](./../../src/Psl/Collection/MutableMapInterface.php#L14) + +### `Classes` + +- [Vector](./../../src/Psl/Collection/Vector.php#L17) +- [MutableVector](./../../src/Psl/Collection/MutableVector.php#L17) +- [Map](./../../src/Psl/Collection/Map.php#L20) +- [MutableMap](./../../src/Psl/Collection/MutableMap.php#L18) + + + +--- + +> [next](data-structure.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/data-structure.md b/docs/component/data-structure.md new file mode 100644 index 000000000..e6011cbf3 --- /dev/null +++ b/docs/component/data-structure.md @@ -0,0 +1,29 @@ +> [previous](collection.md) + +--- + +## `Psl\DataStructure` Component + +### `Interfaces` + +- [PriorityQueueInterface](./../../src/Psl/DataStructure/PriorityQueueInterface.php#L12) +- [QueueInterface](./../../src/Psl/DataStructure/QueueInterface.php#L17) +- [StackInterface](./../../src/Psl/DataStructure/StackInterface.php#L17) + +### `Classes` + +- [PriorityQueue](./../../src/Psl/DataStructure/PriorityQueue.php#L18) +- [Queue](./../../src/Psl/DataStructure/Queue.php#L19) +- [Stack](./../../src/Psl/DataStructure/Stack.php#L19) + + + +--- + +> [next](dict.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/dict.md b/docs/component/dict.md new file mode 100644 index 000000000..7d44075be --- /dev/null +++ b/docs/component/dict.md @@ -0,0 +1,57 @@ +> [previous](data-structure.md) + +--- + +## `Psl\Dict` Component + +### `Functions` + +- [associate](./../../src/Psl/Dict/associate.php#L25) +- [count_values](./../../src/Psl/Dict/count_values.php#L20) +- [drop](./../../src/Psl/Dict/drop.php#L27) +- [drop_while](./../../src/Psl/Dict/drop_while.php#L26) +- [equal](./../../src/Psl/Dict/equal.php#L19) +- [filter](./../../src/Psl/Dict/filter.php#L31) +- [filter_nulls](./../../src/Psl/Dict/filter_nulls.php#L21) +- [filter_keys](./../../src/Psl/Dict/filter_keys.php#L31) +- [filter_with_key](./../../src/Psl/Dict/filter_with_key.php#L34) +- [flatten](./../../src/Psl/Dict/flatten.php#L28) +- [flip](./../../src/Psl/Dict/flip.php#L27) +- [from_entries](./../../src/Psl/Dict/from_entries.php#L18) +- [from_iterable](./../../src/Psl/Dict/from_iterable.php#L17) +- [from_keys](./../../src/Psl/Dict/from_keys.php#L19) +- [group_by](./../../src/Psl/Dict/group_by.php#L41) +- [map](./../../src/Psl/Dict/map.php#L29) +- [map_keys](./../../src/Psl/Dict/map_keys.php#L29) +- [map_with_key](./../../src/Psl/Dict/map_with_key.php#L29) +- [merge](./../../src/Psl/Dict/merge.php#L19) +- [partition](./../../src/Psl/Dict/partition.php#L19) +- [partition_with_key](./../../src/Psl/Dict/partition_with_key.php#L19) +- [pull](./../../src/Psl/Dict/pull.php#L35) +- [pull_with_key](./../../src/Psl/Dict/pull_with_key.php#L35) +- [reindex](./../../src/Psl/Dict/reindex.php#L37) +- [select_keys](./../../src/Psl/Dict/select_keys.php#L23) +- [slice](./../../src/Psl/Dict/slice.php#L31) +- [sort](./../../src/Psl/Dict/sort.php#L24) +- [sort_by](./../../src/Psl/Dict/sort_by.php#L24) +- [sort_by_key](./../../src/Psl/Dict/sort_by_key.php#L24) +- [take](./../../src/Psl/Dict/take.php#L22) +- [take_while](./../../src/Psl/Dict/take_while.php#L26) +- [unique](./../../src/Psl/Dict/unique.php#L17) +- [unique_by](./../../src/Psl/Dict/unique_by.php#L23) +- [diff](./../../src/Psl/Dict/diff.php#L24) +- [diff_by_key](./../../src/Psl/Dict/diff_by_key.php#L24) +- [intersect](./../../src/Psl/Dict/intersect.php#L24) +- [intersect_by_key](./../../src/Psl/Dict/intersect_by_key.php#L24) + + + +--- + +> [next](encoding-base64.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/encoding-base64.md b/docs/component/encoding-base64.md new file mode 100644 index 000000000..4ab68c0f9 --- /dev/null +++ b/docs/component/encoding-base64.md @@ -0,0 +1,22 @@ +> [previous](dict.md) + +--- + +## `Psl\Encoding\Base64` Component + +### `Functions` + +- [encode](./../../src/Psl/Encoding/Base64/encode.php#L18) +- [decode](./../../src/Psl/Encoding/Base64/decode.php#L27) + + + +--- + +> [next](encoding-hex.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/encoding-hex.md b/docs/component/encoding-hex.md new file mode 100644 index 000000000..9d3d8c09b --- /dev/null +++ b/docs/component/encoding-hex.md @@ -0,0 +1,22 @@ +> [previous](encoding-base64.md) + +--- + +## `Psl\Encoding\Hex` Component + +### `Functions` + +- [encode](./../../src/Psl/Encoding/Hex/encode.php#L16) +- [decode](./../../src/Psl/Encoding/Hex/decode.php#L22) + + + +--- + +> [next](env.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/env.md b/docs/component/env.md new file mode 100644 index 000000000..17afc1f19 --- /dev/null +++ b/docs/component/env.md @@ -0,0 +1,31 @@ +> [previous](encoding-hex.md) + +--- + +## `Psl\Env` Component + +### `Functions` + +- [args](./../../src/Psl/Env/args.php#L12) +- [current_dir](./../../src/Psl/Env/current_dir.php#L16) +- [current_exec](./../../src/Psl/Env/current_exec.php#L18) +- [get_var](./../../src/Psl/Env/get_var.php#L18) +- [get_vars](./../../src/Psl/Env/get_vars.php#L14) +- [join_paths](./../../src/Psl/Env/join_paths.php#L16) +- [remove_var](./../../src/Psl/Env/remove_var.php#L18) +- [set_current_dir](./../../src/Psl/Env/set_current_dir.php#L16) +- [set_var](./../../src/Psl/Env/set_var.php#L19) +- [split_paths](./../../src/Psl/Env/split_paths.php#L16) +- [temp_dir](./../../src/Psl/Env/temp_dir.php#L20) + + + +--- + +> [next](filesystem.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/filesystem.md b/docs/component/filesystem.md new file mode 100644 index 000000000..d7178f986 --- /dev/null +++ b/docs/component/filesystem.md @@ -0,0 +1,60 @@ +> [previous](env.md) + +--- + +## `Psl\Filesystem` Component + +### `Constants` + +- [SEPARATOR](./../../src/Psl/Filesystem/constants.php#L0) + +### `Functions` + +- [change_group](./../../src/Psl/Filesystem/change_group.php#L20) +- [change_owner](./../../src/Psl/Filesystem/change_owner.php#L20) +- [change_permissions](./../../src/Psl/Filesystem/change_permissions.php#L19) +- [copy](./../../src/Psl/Filesystem/copy.php#L21) +- [create_directory](./../../src/Psl/Filesystem/create_directory.php#L17) +- [create_file](./../../src/Psl/Filesystem/create_file.php#L23) +- [delete_directory](./../../src/Psl/Filesystem/delete_directory.php#L23) +- [delete_file](./../../src/Psl/Filesystem/delete_file.php#L20) +- [exists](./../../src/Psl/Filesystem/exists.php#L19) +- [file_size](./../../src/Psl/Filesystem/file_size.php#L17) +- [get_group](./../../src/Psl/Filesystem/get_group.php#L18) +- [get_owner](./../../src/Psl/Filesystem/get_owner.php#L18) +- [get_permissions](./../../src/Psl/Filesystem/get_permissions.php#L18) +- [get_basename](./../../src/Psl/Filesystem/get_basename.php#L23) +- [get_directory](./../../src/Psl/Filesystem/get_directory.php#L27) +- [get_extension](./../../src/Psl/Filesystem/get_extension.php#L16) +- [get_filename](./../../src/Psl/Filesystem/get_filename.php#L18) +- [is_directory](./../../src/Psl/Filesystem/is_directory.php#L22) +- [is_file](./../../src/Psl/Filesystem/is_file.php#L22) +- [is_symbolic_link](./../../src/Psl/Filesystem/is_symbolic_link.php#L19) +- [is_readable](./../../src/Psl/Filesystem/is_readable.php#L20) +- [is_writable](./../../src/Psl/Filesystem/is_writable.php#L20) +- [canonicalize](./../../src/Psl/Filesystem/canonicalize.php#L15) +- [is_executable](./../../src/Psl/Filesystem/is_executable.php#L20) +- [read_directory](./../../src/Psl/Filesystem/read_directory.php#L19) +- [read_file](./../../src/Psl/Filesystem/read_file.php#L24) +- [read_symbolic_link](./../../src/Psl/Filesystem/read_symbolic_link.php#L21) +- [append_file](./../../src/Psl/Filesystem/append_file.php#L18) +- [write_file](./../../src/Psl/Filesystem/write_file.php#L18) +- [create_temporary_file](./../../src/Psl/Filesystem/create_temporary_file.php#L26) +- [create_hard_link](./../../src/Psl/Filesystem/create_hard_link.php#L21) +- [create_symbolic_link](./../../src/Psl/Filesystem/create_symbolic_link.php#L21) +- [get_access_time](./../../src/Psl/Filesystem/get_access_time.php#L18) +- [get_change_time](./../../src/Psl/Filesystem/get_change_time.php#L19) +- [get_modification_time](./../../src/Psl/Filesystem/get_modification_time.php#L19) +- [get_inode](./../../src/Psl/Filesystem/get_inode.php#L18) + + + +--- + +> [next](fun.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/fun.md b/docs/component/fun.md new file mode 100644 index 000000000..d1e93cc8a --- /dev/null +++ b/docs/component/fun.md @@ -0,0 +1,25 @@ +> [previous](filesystem.md) + +--- + +## `Psl\Fun` Component + +### `Functions` + +- [after](./../../src/Psl/Fun/after.php#L37) +- [identity](./../../src/Psl/Fun/identity.php#L17) +- [pipe](./../../src/Psl/Fun/pipe.php#L34) +- [rethrow](./../../src/Psl/Fun/rethrow.php#L17) +- [when](./../../src/Psl/Fun/when.php#L33) + + + +--- + +> [next](hash.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/hash.md b/docs/component/hash.md new file mode 100644 index 000000000..8a8461049 --- /dev/null +++ b/docs/component/hash.md @@ -0,0 +1,27 @@ +> [previous](fun.md) + +--- + +## `Psl\Hash` Component + +### `Functions` + +- [hash](./../../src/Psl/Hash/hash.php#L16) +- [algorithms](./../../src/Psl/Hash/algorithms.php#L16) +- [equals](./../../src/Psl/Hash/equals.php#L14) + +### `Classes` + +- [Context](./../../src/Psl/Hash/Context.php#L31) + + + +--- + +> [next](html.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/html.md b/docs/component/html.md new file mode 100644 index 000000000..092ccc703 --- /dev/null +++ b/docs/component/html.md @@ -0,0 +1,25 @@ +> [previous](hash.md) + +--- + +## `Psl\Html` Component + +### `Functions` + +- [encode](./../../src/Psl/Html/encode.php#L27) +- [encode_special_characters](./../../src/Psl/Html/encode_special_characters.php#L29) +- [decode](./../../src/Psl/Html/decode.php#L23) +- [decode_special_characters](./../../src/Psl/Html/decode_special_characters.php#L18) +- [strip_tags](./../../src/Psl/Html/strip_tags.php#L16) + + + +--- + +> [next](iter.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/iter.md b/docs/component/iter.md new file mode 100644 index 000000000..d9dff85b8 --- /dev/null +++ b/docs/component/iter.md @@ -0,0 +1,79 @@ +> [previous](html.md) + +--- + +## `Psl\Iter` Component + +### `Functions` + +- [all](./../../src/Psl/Iter/all.php#L28) +- [any](./../../src/Psl/Iter/any.php#L28) +- [apply](./../../src/Psl/Iter/apply.php#L27) +- [chain](./../../src/Psl/Iter/chain.php#L31) ( deprecated ) +- [chunk](./../../src/Psl/Iter/chunk.php#L33) ( deprecated ) +- [chunk_with_keys](./../../src/Psl/Iter/chunk_with_keys.php#L30) ( deprecated ) +- [contains](./../../src/Psl/Iter/contains.php#L27) +- [contains_key](./../../src/Psl/Iter/contains_key.php#L16) +- [count](./../../src/Psl/Iter/count.php#L29) +- [diff_by_key](./../../src/Psl/Iter/diff_by_key.php#L23) ( deprecated ) +- [drop](./../../src/Psl/Iter/drop.php#L31) ( deprecated ) +- [drop_while](./../../src/Psl/Iter/drop_while.php#L31) ( deprecated ) +- [enumerate](./../../src/Psl/Iter/enumerate.php#L23) ( deprecated ) +- [filter](./../../src/Psl/Iter/filter.php#L34) ( deprecated ) +- [filter_keys](./../../src/Psl/Iter/filter_keys.php#L36) ( deprecated ) +- [filter_nulls](./../../src/Psl/Iter/filter_nulls.php#L26) ( deprecated ) +- [filter_with_key](./../../src/Psl/Iter/filter_with_key.php#L39) ( deprecated ) +- [first](./../../src/Psl/Iter/first.php#L27) +- [first_key](./../../src/Psl/Iter/first_key.php#L30) +- [flat_map](./../../src/Psl/Iter/flat_map.php#L22) ( deprecated ) +- [flatten](./../../src/Psl/Iter/flatten.php#L24) ( deprecated ) +- [flip](./../../src/Psl/Iter/flip.php#L27) ( deprecated ) +- [from_entries](./../../src/Psl/Iter/from_entries.php#L24) ( deprecated ) +- [from_keys](./../../src/Psl/Iter/from_keys.php#L25) ( deprecated ) +- [is_empty](./../../src/Psl/Iter/is_empty.php#L12) +- [keys](./../../src/Psl/Iter/keys.php#L28) ( deprecated ) +- [last](./../../src/Psl/Iter/last.php#L17) +- [last_key](./../../src/Psl/Iter/last_key.php#L17) +- [map](./../../src/Psl/Iter/map.php#L35) ( deprecated ) +- [map_keys](./../../src/Psl/Iter/map_keys.php#L35) ( deprecated ) +- [map_with_key](./../../src/Psl/Iter/map_with_key.php#L33) ( deprecated ) +- [merge](./../../src/Psl/Iter/merge.php#L30) ( deprecated ) +- [product](./../../src/Psl/Iter/product.php#L34) ( deprecated ) +- [pull](./../../src/Psl/Iter/pull.php#L40) ( deprecated ) +- [pull_with_key](./../../src/Psl/Iter/pull_with_key.php#L41) ( deprecated ) +- [random](./../../src/Psl/Iter/random.php#L23) +- [range](./../../src/Psl/Iter/range.php#L45) ( deprecated ) +- [reduce](./../../src/Psl/Iter/reduce.php#L32) +- [reduce_keys](./../../src/Psl/Iter/reduce_keys.php#L33) +- [reduce_with_keys](./../../src/Psl/Iter/reduce_with_keys.php#L40) +- [reductions](./../../src/Psl/Iter/reductions.php#L33) ( deprecated ) +- [reindex](./../../src/Psl/Iter/reindex.php#L43) ( deprecated ) +- [repeat](./../../src/Psl/Iter/repeat.php#L36) ( deprecated ) +- [reproduce](./../../src/Psl/Iter/reproduce.php#L33) ( deprecated ) +- [reverse](./../../src/Psl/Iter/reverse.php#L26) ( deprecated ) +- [rewindable](./../../src/Psl/Iter/rewindable.php#L20) +- [search](./../../src/Psl/Iter/search.php#L26) +- [slice](./../../src/Psl/Iter/slice.php#L36) ( deprecated ) +- [take](./../../src/Psl/Iter/take.php#L25) ( deprecated ) +- [take_while](./../../src/Psl/Iter/take_while.php#L32) ( deprecated ) +- [to_array](./../../src/Psl/Iter/to_array.php#L21) ( deprecated ) +- [to_array_with_keys](./../../src/Psl/Iter/to_array_with_keys.php#L22) ( deprecated ) +- [to_iterator](./../../src/Psl/Iter/to_iterator.php#L19) +- [values](./../../src/Psl/Iter/values.php#L32) ( deprecated ) +- [zip](./../../src/Psl/Iter/zip.php#L38) ( deprecated ) + +### `Classes` + +- [Iterator](./../../src/Psl/Iter/Iterator.php#L18) + + + +--- + +> [next](json.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/json.md b/docs/component/json.md new file mode 100644 index 000000000..666f92c6b --- /dev/null +++ b/docs/component/json.md @@ -0,0 +1,23 @@ +> [previous](iter.md) + +--- + +## `Psl\Json` Component + +### `Functions` + +- [encode](./../../src/Psl/Json/encode.php#L27) +- [decode](./../../src/Psl/Json/decode.php#L24) +- [typed](./../../src/Psl/Json/typed.php#L22) + + + +--- + +> [next](math.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/math.md b/docs/component/math.md new file mode 100644 index 000000000..f74581afb --- /dev/null +++ b/docs/component/math.md @@ -0,0 +1,62 @@ +> [previous](json.md) + +--- + +## `Psl\Math` Component + +### `Constants` + +- [INT64_MAX](./../../src/Psl/Math/constants.php#L0) +- [INT64_MIN](./../../src/Psl/Math/constants.php#L0) +- [INT53_MAX](./../../src/Psl/Math/constants.php#L0) +- [INT53_MIN](./../../src/Psl/Math/constants.php#L0) +- [INT32_MAX](./../../src/Psl/Math/constants.php#L0) +- [INT32_MIN](./../../src/Psl/Math/constants.php#L0) +- [INT16_MAX](./../../src/Psl/Math/constants.php#L0) +- [INT16_MIN](./../../src/Psl/Math/constants.php#L0) +- [UINT32_MAX](./../../src/Psl/Math/constants.php#L0) +- [UINT16_MAX](./../../src/Psl/Math/constants.php#L0) +- [PI](./../../src/Psl/Math/constants.php#L0) +- [E](./../../src/Psl/Math/constants.php#L0) +- [INFINITY](./../../src/Psl/Math/constants.php#L0) +- [NAN](./../../src/Psl/Math/constants.php#L0) + +### `Functions` + +- [abs](./../../src/Psl/Math/abs.php#L34) +- [base_convert](./../../src/Psl/Math/base_convert.php#L39) +- [ceil](./../../src/Psl/Math/ceil.php#L25) +- [clamp](./../../src/Psl/Math/clamp.php#L24) +- [cos](./../../src/Psl/Math/cos.php#L22) +- [div](./../../src/Psl/Math/div.php#L32) +- [exp](./../../src/Psl/Math/exp.php#L22) +- [floor](./../../src/Psl/Math/floor.php#L16) +- [from_base](./../../src/Psl/Math/from_base.php#L27) +- [log](./../../src/Psl/Math/log.php#L18) +- [max](./../../src/Psl/Math/max.php#L19) +- [max_by](./../../src/Psl/Math/max_by.php#L21) +- [maxva](./../../src/Psl/Math/maxva.php#L20) +- [mean](./../../src/Psl/Math/mean.php#L14) +- [median](./../../src/Psl/Math/median.php#L15) +- [min](./../../src/Psl/Math/min.php#L19) +- [min_by](./../../src/Psl/Math/min_by.php#L29) +- [minva](./../../src/Psl/Math/minva.php#L20) +- [round](./../../src/Psl/Math/round.php#L19) +- [sin](./../../src/Psl/Math/sin.php#L14) +- [sqrt](./../../src/Psl/Math/sqrt.php#L20) +- [sum](./../../src/Psl/Math/sum.php#L14) +- [sum_floats](./../../src/Psl/Math/sum_floats.php#L14) +- [tan](./../../src/Psl/Math/tan.php#L14) +- [to_base](./../../src/Psl/Math/to_base.php#L18) + + + +--- + +> [next](observer.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/observer.md b/docs/component/observer.md new file mode 100644 index 000000000..9c0854848 --- /dev/null +++ b/docs/component/observer.md @@ -0,0 +1,22 @@ +> [previous](math.md) + +--- + +## `Psl\Observer` Component + +### `Interfaces` + +- [SubjectInterface](./../../src/Psl/Observer/SubjectInterface.php#L7) +- [ObserverInterface](./../../src/Psl/Observer/ObserverInterface.php#L10) + + + +--- + +> [next](password.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/password.md b/docs/component/password.md new file mode 100644 index 000000000..7f9b6b608 --- /dev/null +++ b/docs/component/password.md @@ -0,0 +1,30 @@ +> [previous](observer.md) + +--- + +## `Psl\Password` Component + +### `Constants` + +- [DEFAULT_ALGORITHM](./../../src/Psl/Password/constants.php#L0) +- [BCRYPT_ALGORITHM](./../../src/Psl/Password/constants.php#L0) + +### `Functions` + +- [algorithms](./../../src/Psl/Password/algorithms.php#L14) +- [get_information](./../../src/Psl/Password/get_information.php#L24) +- [hash](./../../src/Psl/Password/hash.php#L32) +- [needs_rehash](./../../src/Psl/Password/needs_rehash.php#L25) +- [verify](./../../src/Psl/Password/verify.php#L14) + + + +--- + +> [next](pseudo-random.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/pseudo-random.md b/docs/component/pseudo-random.md new file mode 100644 index 000000000..e6f58ece7 --- /dev/null +++ b/docs/component/pseudo-random.md @@ -0,0 +1,22 @@ +> [previous](password.md) + +--- + +## `Psl\PseudoRandom` Component + +### `Functions` + +- [float](./../../src/Psl/PseudoRandom/float.php#L12) +- [int](./../../src/Psl/PseudoRandom/int.php#L17) + + + +--- + +> [next](regex.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/psl.md b/docs/component/psl.md new file mode 100644 index 000000000..28548c1e8 --- /dev/null +++ b/docs/component/psl.md @@ -0,0 +1,23 @@ +> [previous](./../README.md) + +--- + +## `Psl` Component + +### `Functions` + +- [invariant](./../../src/Psl/invariant.php#L18) +- [invariant_violation](./../../src/Psl/invariant_violation.php#L16) +- [sequence](./../../src/Psl/sequence.php#L16) + + + +--- + +> [next](arr.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/regex.md b/docs/component/regex.md new file mode 100644 index 000000000..589d82ec6 --- /dev/null +++ b/docs/component/regex.md @@ -0,0 +1,25 @@ +> [previous](pseudo-random.md) + +--- + +## `Psl\Regex` Component + +### `Functions` + +- [split](./../../src/Psl/Regex/split.php#L29) +- [matches](./../../src/Psl/Regex/matches.php#L19) +- [replace](./../../src/Psl/Regex/replace.php#L26) +- [replace_with](./../../src/Psl/Regex/replace_with.php#L26) +- [replace_every](./../../src/Psl/Regex/replace_every.php#L27) + + + +--- + +> [next](result.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/result.md b/docs/component/result.md new file mode 100644 index 000000000..12ef7c561 --- /dev/null +++ b/docs/component/result.md @@ -0,0 +1,30 @@ +> [previous](regex.md) + +--- + +## `Psl\Result` Component + +### `Functions` + +- [wrap](./../../src/Psl/Result/wrap.php#L19) + +### `Interfaces` + +- [ResultInterface](./../../src/Psl/Result/ResultInterface.php#L19) + +### `Classes` + +- [Failure](./../../src/Psl/Result/Failure.php#L17) +- [Success](./../../src/Psl/Result/Success.php#L17) + + + +--- + +> [next](secure-random.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/secure-random.md b/docs/component/secure-random.md new file mode 100644 index 000000000..01a27afb9 --- /dev/null +++ b/docs/component/secure-random.md @@ -0,0 +1,24 @@ +> [previous](result.md) + +--- + +## `Psl\SecureRandom` Component + +### `Functions` + +- [bytes](./../../src/Psl/SecureRandom/bytes.php#L20) +- [float](./../../src/Psl/SecureRandom/float.php#L14) +- [int](./../../src/Psl/SecureRandom/int.php#L21) +- [string](./../../src/Psl/SecureRandom/string.php#L25) + + + +--- + +> [next](shell.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/shell.md b/docs/component/shell.md new file mode 100644 index 000000000..5d3c09f3f --- /dev/null +++ b/docs/component/shell.md @@ -0,0 +1,23 @@ +> [previous](secure-random.md) + +--- + +## `Psl\Shell` Component + +### `Functions` + +- [escape_command](./../../src/Psl/Shell/escape_command.php#L14) +- [escape_argument](./../../src/Psl/Shell/escape_argument.php#L17) +- [execute](./../../src/Psl/Shell/execute.php#L37) + + + +--- + +> [next](str.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/str-byte.md b/docs/component/str-byte.md new file mode 100644 index 000000000..8ef4ac438 --- /dev/null +++ b/docs/component/str-byte.md @@ -0,0 +1,67 @@ +> [previous](str.md) + +--- + +## `Psl\Str\Byte` Component + +### `Functions` + +- [capitalize](./../../src/Psl/Str/Byte/capitalize.php#L17) +- [capitalize_words](./../../src/Psl/Str/Byte/capitalize_words.php#L17) +- [chr](./../../src/Psl/Str/Byte/chr.php#L14) +- [chunk](./../../src/Psl/Str/Byte/chunk.php#L27) +- [compare](./../../src/Psl/Str/Byte/compare.php#L19) +- [compare_ci](./../../src/Psl/Str/Byte/compare_ci.php#L19) +- [contains](./../../src/Psl/Str/Byte/contains.php#L21) +- [contains_ci](./../../src/Psl/Str/Byte/contains_ci.php#L21) +- [ends_with](./../../src/Psl/Str/Byte/ends_with.php#L12) +- [ends_with_ci](./../../src/Psl/Str/Byte/ends_with_ci.php#L14) +- [length](./../../src/Psl/Str/Byte/length.php#L14) +- [lowercase](./../../src/Psl/Str/Byte/lowercase.php#L14) +- [ord](./../../src/Psl/Str/Byte/ord.php#L12) +- [pad_left](./../../src/Psl/Str/Byte/pad_left.php#L25) +- [pad_right](./../../src/Psl/Str/Byte/pad_right.php#L25) +- [replace](./../../src/Psl/Str/Byte/replace.php#L15) +- [replace_ci](./../../src/Psl/Str/Byte/replace_ci.php#L15) +- [replace_every](./../../src/Psl/Str/Byte/replace_every.php#L17) +- [replace_every_ci](./../../src/Psl/Str/Byte/replace_every_ci.php#L17) +- [reverse](./../../src/Psl/Str/Byte/reverse.php#L10) +- [rot13](./../../src/Psl/Str/Byte/rot13.php#L14) +- [search](./../../src/Psl/Str/Byte/search.php#L23) +- [search_ci](./../../src/Psl/Str/Byte/search_ci.php#L23) +- [search_last](./../../src/Psl/Str/Byte/search_last.php#L25) +- [search_last_ci](./../../src/Psl/Str/Byte/search_last_ci.php#L23) +- [shuffle](./../../src/Psl/Str/Byte/shuffle.php#L14) +- [slice](./../../src/Psl/Str/Byte/slice.php#L22) +- [splice](./../../src/Psl/Str/Byte/splice.php#L23) +- [split](./../../src/Psl/Str/Byte/split.php#L25) +- [starts_with](./../../src/Psl/Str/Byte/starts_with.php#L14) +- [starts_with_ci](./../../src/Psl/Str/Byte/starts_with_ci.php#L14) +- [strip_prefix](./../../src/Psl/Str/Byte/strip_prefix.php#L13) +- [strip_suffix](./../../src/Psl/Str/Byte/strip_suffix.php#L13) +- [trim](./../../src/Psl/Str/Byte/trim.php#L17) +- [trim_left](./../../src/Psl/Str/Byte/trim_left.php#L17) +- [trim_right](./../../src/Psl/Str/Byte/trim_right.php#L17) +- [uppercase](./../../src/Psl/Str/Byte/uppercase.php#L14) +- [words](./../../src/Psl/Str/Byte/words.php#L19) +- [wrap](./../../src/Psl/Str/Byte/wrap.php#L21) +- [after](./../../src/Psl/Str/Byte/after.php#L14) +- [after_ci](./../../src/Psl/Str/Byte/after_ci.php#L14) +- [after_last](./../../src/Psl/Str/Byte/after_last.php#L15) +- [after_last_ci](./../../src/Psl/Str/Byte/after_last_ci.php#L14) +- [before](./../../src/Psl/Str/Byte/before.php#L14) +- [before_ci](./../../src/Psl/Str/Byte/before_ci.php#L14) +- [before_last](./../../src/Psl/Str/Byte/before_last.php#L14) +- [before_last_ci](./../../src/Psl/Str/Byte/before_last_ci.php#L14) + + + +--- + +> [next](str-grapheme.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/str-grapheme.md b/docs/component/str-grapheme.md new file mode 100644 index 000000000..3b22c4a6c --- /dev/null +++ b/docs/component/str-grapheme.md @@ -0,0 +1,42 @@ +> [previous](str-byte.md) + +--- + +## `Psl\Str\Grapheme` Component + +### `Functions` + +- [contains](./../../src/Psl/Str/Grapheme/contains.php#L21) +- [contains_ci](./../../src/Psl/Str/Grapheme/contains_ci.php#L21) +- [ends_with](./../../src/Psl/Str/Grapheme/ends_with.php#L17) +- [ends_with_ci](./../../src/Psl/Str/Grapheme/ends_with_ci.php#L17) +- [length](./../../src/Psl/Str/Grapheme/length.php#L19) +- [search](./../../src/Psl/Str/Grapheme/search.php#L24) +- [search_ci](./../../src/Psl/Str/Grapheme/search_ci.php#L24) +- [search_last](./../../src/Psl/Str/Grapheme/search_last.php#L25) +- [search_last_ci](./../../src/Psl/Str/Grapheme/search_last_ci.php#L25) +- [slice](./../../src/Psl/Str/Grapheme/slice.php#L21) +- [starts_with](./../../src/Psl/Str/Grapheme/starts_with.php#L12) +- [starts_with_ci](./../../src/Psl/Str/Grapheme/starts_with_ci.php#L12) +- [strip_prefix](./../../src/Psl/Str/Grapheme/strip_prefix.php#L13) +- [strip_suffix](./../../src/Psl/Str/Grapheme/strip_suffix.php#L13) +- [after](./../../src/Psl/Str/Grapheme/after.php#L14) +- [after_ci](./../../src/Psl/Str/Grapheme/after_ci.php#L14) +- [after_last](./../../src/Psl/Str/Grapheme/after_last.php#L15) +- [after_last_ci](./../../src/Psl/Str/Grapheme/after_last_ci.php#L14) +- [before](./../../src/Psl/Str/Grapheme/before.php#L14) +- [before_ci](./../../src/Psl/Str/Grapheme/before_ci.php#L14) +- [before_last](./../../src/Psl/Str/Grapheme/before_last.php#L14) +- [before_last_ci](./../../src/Psl/Str/Grapheme/before_last_ci.php#L14) + + + +--- + +> [next](type.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/str.md b/docs/component/str.md new file mode 100644 index 000000000..25811cbd7 --- /dev/null +++ b/docs/component/str.md @@ -0,0 +1,82 @@ +> [previous](shell.md) + +--- + +## `Psl\Str` Component + +### `Constants` + +- [ALPHABET](./../../src/Psl/Str/constants.php#L0) +- [ALPHABET_ALPHANUMERIC](./../../src/Psl/Str/constants.php#L0) + +### `Functions` + +- [capitalize](./../../src/Psl/Str/capitalize.php#L33) +- [capitalize_words](./../../src/Psl/Str/capitalize_words.php#L35) +- [chr](./../../src/Psl/Str/chr.php#L27) +- [chunk](./../../src/Psl/Str/chunk.php#L40) +- [concat](./../../src/Psl/Str/concat.php#L20) +- [contains](./../../src/Psl/Str/contains.php#L42) +- [contains_ci](./../../src/Psl/Str/contains_ci.php#L42) +- [detect_encoding](./../../src/Psl/Str/detect_encoding.php#L21) +- [convert_encoding](./../../src/Psl/Str/convert_encoding.php#L19) +- [is_utf8](./../../src/Psl/Str/is_utf8.php#L14) +- [ends_with](./../../src/Psl/Str/ends_with.php#L39) +- [ends_with_ci](./../../src/Psl/Str/ends_with_ci.php#L39) +- [fold](./../../src/Psl/Str/fold.php#L22) +- [format](./../../src/Psl/Str/format.php#L26) +- [format_number](./../../src/Psl/Str/format_number.php#L19) +- [from_code_points](./../../src/Psl/Str/from_code_points.php#L20) +- [is_empty](./../../src/Psl/Str/is_empty.php#L29) +- [join](./../../src/Psl/Str/join.php#L27) +- [length](./../../src/Psl/Str/length.php#L30) +- [levenshtein](./../../src/Psl/Str/levenshtein.php#L29) +- [lowercase](./../../src/Psl/Str/lowercase.php#L35) +- [metaphone](./../../src/Psl/Str/metaphone.php#L19) +- [ord](./../../src/Psl/Str/ord.php#L27) +- [pad_left](./../../src/Psl/Str/pad_left.php#L36) +- [pad_right](./../../src/Psl/Str/pad_right.php#L36) +- [repeat](./../../src/Psl/Str/repeat.php#L28) +- [replace](./../../src/Psl/Str/replace.php#L19) +- [replace_ci](./../../src/Psl/Str/replace_ci.php#L20) +- [replace_every](./../../src/Psl/Str/replace_every.php#L19) +- [replace_every_ci](./../../src/Psl/Str/replace_every_ci.php#L19) +- [search](./../../src/Psl/Str/search.php#L25) +- [search_ci](./../../src/Psl/Str/search_ci.php#L25) +- [search_last](./../../src/Psl/Str/search_last.php#L25) +- [search_last_ci](./../../src/Psl/Str/search_last_ci.php#L25) +- [slice](./../../src/Psl/Str/slice.php#L25) +- [splice](./../../src/Psl/Str/splice.php#L22) +- [split](./../../src/Psl/Str/split.php#L24) +- [starts_with](./../../src/Psl/Str/starts_with.php#L16) +- [starts_with_ci](./../../src/Psl/Str/starts_with_ci.php#L16) +- [strip_prefix](./../../src/Psl/Str/strip_prefix.php#L17) +- [strip_suffix](./../../src/Psl/Str/strip_suffix.php#L17) +- [to_int](./../../src/Psl/Str/to_int.php#L12) +- [trim](./../../src/Psl/Str/trim.php#L18) +- [trim_left](./../../src/Psl/Str/trim_left.php#L18) +- [trim_right](./../../src/Psl/Str/trim_right.php#L18) +- [truncate](./../../src/Psl/Str/truncate.php#L29) +- [uppercase](./../../src/Psl/Str/uppercase.php#L19) +- [width](./../../src/Psl/Str/width.php#L19) +- [wrap](./../../src/Psl/Str/wrap.php#L23) +- [after](./../../src/Psl/Str/after.php#L15) +- [after_ci](./../../src/Psl/Str/after_ci.php#L15) +- [after_last](./../../src/Psl/Str/after_last.php#L15) +- [after_last_ci](./../../src/Psl/Str/after_last_ci.php#L15) +- [before](./../../src/Psl/Str/before.php#L15) +- [before_ci](./../../src/Psl/Str/before_ci.php#L15) +- [before_last](./../../src/Psl/Str/before_last.php#L15) +- [before_last_ci](./../../src/Psl/Str/before_last_ci.php#L15) + + + +--- + +> [next](str-byte.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/type.md b/docs/component/type.md new file mode 100644 index 000000000..da387b40b --- /dev/null +++ b/docs/component/type.md @@ -0,0 +1,68 @@ +> [previous](str-grapheme.md) + +--- + +## `Psl\Type` Component + +### `Functions` + +- [map](./../../src/Psl/Type/map.php#L21) +- [mutable_map](./../../src/Psl/Type/mutable_map.php#L21) +- [vector](./../../src/Psl/Type/vector.php#L19) +- [mutable_vector](./../../src/Psl/Type/mutable_vector.php#L19) +- [array_key](./../../src/Psl/Type/array_key.php#L10) +- [bool](./../../src/Psl/Type/bool.php#L10) +- [float](./../../src/Psl/Type/float.php#L10) +- [int](./../../src/Psl/Type/int.php#L10) +- [intersection](./../../src/Psl/Type/intersection.php#L20) +- [iterable](./../../src/Psl/Type/iterable.php#L20) +- [mixed](./../../src/Psl/Type/mixed.php#L10) +- [null](./../../src/Psl/Type/null.php#L10) +- [nullable](./../../src/Psl/Type/nullable.php#L18) +- [optional](./../../src/Psl/Type/optional.php#L14) +- [num](./../../src/Psl/Type/num.php#L10) +- [object](./../../src/Psl/Type/object.php#L14) +- [resource](./../../src/Psl/Type/resource.php#L12) +- [string](./../../src/Psl/Type/string.php#L10) +- [non_empty_string](./../../src/Psl/Type/non_empty_string.php#L10) +- [scalar](./../../src/Psl/Type/scalar.php#L10) +- [shape](./../../src/Psl/Type/shape.php#L15) +- [union](./../../src/Psl/Type/union.php#L20) +- [vec](./../../src/Psl/Type/vec.php#L18) +- [dict](./../../src/Psl/Type/dict.php#L20) +- [is_array](./../../src/Psl/Type/is_array.php#L20) ( deprecated ) +- [is_arraykey](./../../src/Psl/Type/is_arraykey.php#L18) ( deprecated ) +- [is_bool](./../../src/Psl/Type/is_bool.php#L20) ( deprecated ) +- [is_callable](./../../src/Psl/Type/is_callable.php#L18) +- [is_float](./../../src/Psl/Type/is_float.php#L20) ( deprecated ) +- [is_instanceof](./../../src/Psl/Type/is_instanceof.php#L22) ( deprecated ) +- [is_int](./../../src/Psl/Type/is_int.php#L20) ( deprecated ) +- [is_iterable](./../../src/Psl/Type/is_iterable.php#L20) ( deprecated ) +- [is_nan](./../../src/Psl/Type/is_nan.php#L14) +- [is_null](./../../src/Psl/Type/is_null.php#L18) ( deprecated ) +- [is_numeric](./../../src/Psl/Type/is_numeric.php#L20) ( deprecated ) +- [is_object](./../../src/Psl/Type/is_object.php#L20) ( deprecated ) +- [is_resource](./../../src/Psl/Type/is_resource.php#L22) ( deprecated ) +- [is_scalar](./../../src/Psl/Type/is_scalar.php#L20) ( deprecated ) +- [is_string](./../../src/Psl/Type/is_string.php#L20) ( deprecated ) +- [literal_scalar](./../../src/Psl/Type/literal_scalar.php#L18) + +### `Interfaces` + +- [TypeInterface](./../../src/Psl/Type/TypeInterface.php#L14) + +### `Classes` + +- [Type](./../../src/Psl/Type/Type.php#L15) + + + +--- + +> [next](vec.md) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/component/vec.md b/docs/component/vec.md new file mode 100644 index 000000000..7e352d2dc --- /dev/null +++ b/docs/component/vec.md @@ -0,0 +1,38 @@ +> [previous](type.md) + +--- + +## `Psl\Vec` Component + +### `Functions` + +- [chunk](./../../src/Psl/Vec/chunk.php#L24) +- [chunk_with_keys](./../../src/Psl/Vec/chunk_with_keys.php#L27) +- [concat](./../../src/Psl/Vec/concat.php#L17) +- [enumerate](./../../src/Psl/Vec/enumerate.php#L17) +- [fill](./../../src/Psl/Vec/fill.php#L24) +- [filter](./../../src/Psl/Vec/filter.php#L30) +- [filter_keys](./../../src/Psl/Vec/filter_keys.php#L31) +- [filter_nulls](./../../src/Psl/Vec/filter_nulls.php#L20) +- [filter_with_key](./../../src/Psl/Vec/filter_with_key.php#L34) +- [flat_map](./../../src/Psl/Vec/flat_map.php#L16) +- [keys](./../../src/Psl/Vec/keys.php#L17) +- [partition](./../../src/Psl/Vec/partition.php#L18) +- [range](./../../src/Psl/Vec/range.php#L50) +- [reductions](./../../src/Psl/Vec/reductions.php#L27) +- [map](./../../src/Psl/Vec/map.php#L27) +- [map_with_key](./../../src/Psl/Vec/map_with_key.php#L27) +- [reproduce](./../../src/Psl/Vec/reproduce.php#L25) +- [reverse](./../../src/Psl/Vec/reverse.php#L22) +- [shuffle](./../../src/Psl/Vec/shuffle.php#L26) +- [sort](./../../src/Psl/Vec/sort.php#L23) +- [sort_by](./../../src/Psl/Vec/sort_by.php#L26) +- [values](./../../src/Psl/Vec/values.php#L16) +- [zip](./../../src/Psl/Vec/zip.php#L37) + + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/documenter.php b/docs/documenter.php index fdb5db70a..7b846c18b 100644 --- a/docs/documenter.php +++ b/docs/documenter.php @@ -6,6 +6,8 @@ use Psl\Filesystem; use Psl\Internal\Loader; use Psl\Iter; +use Psl\Regex; +use Psl\Shell; use Psl\Str; use Psl\Type; use Psl\Vec; @@ -13,19 +15,15 @@ require_once __DIR__ . "/../src/bootstrap.php"; (static function (array $args) { - $documentation_file = __DIR__ . "/README.md"; - $template = Filesystem\read_file(__DIR__ . '/README.template.md'); - $documentation = Str\replace($template, '{{ api }}', generate_documentation()); - - $command = $args[1] ?? 'regenerate'; + $command = Str\lowercase($args[1] ?? 'regenerate'); if ('regenerate' === $command) { - Filesystem\write_file($documentation_file, $documentation); + regenerate_documentation(); exit(0); } if ('check' === $command) { - check_if_documentation_is_up_to_date($documentation_file, $documentation); + check_documentation_diff(); } echo Str\format( @@ -38,58 +36,58 @@ })(Env\args()); /** - * Check if $documentation_file contains $expected_content, line-by-line. - * * @return no-return */ -function check_if_documentation_is_up_to_date($documentation_file, $expected_content): void +function check_documentation_diff(): void { - $expected_lines = Str\split($expected_content, "\n"); - $actual_content = Filesystem\read_file($documentation_file); - $actual_lines = Str\split($actual_content, "\n"); - - if (Iter\count($expected_lines) !== Iter\count($actual_lines)) { - echo "Documentation is out of date, please regenerate by running 'php docs/documenter.php'.\n\n"; - echo "Number of lines don't match.\n"; - exit(-1); - } + regenerate_documentation(); - for ($i = 0, $count = count($expected_lines); $i < $count; ++$i) { - if (Str\trim($expected_lines[$i]) !== Str\trim($actual_lines[$i])) { - echo "Documentation is out of date, please regenerate by running 'php docs/documenter.php'.\n\n"; - echo "Difference on line $i:\n"; - echo "Expected : " . $expected_lines[$i] . "\n"; - echo "Actual : " . $actual_lines[$i] . "\n"; - exit(-1); - } + $diff = Shell\execute('git', ['diff', '--color', '--', 'docs/'], Filesystem\canonicalize(__DIR__ . '/..')); + if ($diff !== '') { + echo $diff; + + exit(1); } - - echo "Documentation is up to date.\n"; + exit(0); } /** * Return documentation for all namespaces. */ -function generate_documentation(): string +function regenerate_documentation(): void { - $lines = []; - $lines[] = ''; + $components_documentation = ''; + $components = get_all_components(); + foreach ($components as $component) { + $components_documentation .= Str\format('- [%s](./component/%s.md)%s', $component, to_filename($component), "\n"); + } + + $readme_template = Filesystem\read_file(__DIR__ . '/templates/README.template.md'); + $readme = Str\replace($readme_template, '{{ list }}', $components_documentation); + Filesystem\write_file(__DIR__ . '/README.md', $readme); - foreach (get_all_namespaces() as $namespace) { - $lines[] = get_namespace_documentation($namespace); + $previous = './../README.md'; + $component = null; + foreach ($components as $component) { + $previous = document_component($component, $previous); } - return Str\join($lines, "\n"); + // remove [next]({{ next }}) line from the last component documentation. + $last_filename = Str\format('%s/component/%s', __DIR__, $previous); + $last_file_content = Filesystem\read_file($last_filename); + Filesystem\write_file($last_filename, Str\replace($last_file_content, "\n\n---\n\n> [next]({{ next }})\n", '')); } /** - * Return documentation for the given namespace. + * Document the given component. + * + * @return string The document filename relative to docs/component/ */ -function get_namespace_documentation(string $namespace): string +function document_component(string $component, string $previous_link): string { $lines = []; - $lines[] = Str\format('### `%s`', $namespace); + $lines[] = Str\format('## `%s` Component', $component); $lines[] = ''; /** @@ -104,7 +102,7 @@ function get_namespace_documentation(string $namespace): string ): array { $lines = []; if (Iter\count($symbols[$type]) > 0) { - $lines[] = Str\format('#### `%s`', get_symbol_type_name($type)); + $lines[] = Str\format('### `%s`', get_symbol_type_name($type)); $lines[] = ''; foreach ($symbols[$type] as $symbol) { @@ -122,7 +120,7 @@ function get_namespace_documentation(string $namespace): string } $definition_line = get_symbol_definition_line($symbol, $type); - $lines[] = Str\format('- [%s](%s#L%d)%s', $symbol_short_name, $symbol_file, $definition_line, $deprecation_notice); + $lines[] = Str\format('- [%s](./.%s#L%d)%s', $symbol_short_name, $symbol_file, $definition_line, $deprecation_notice); } $lines[] = ''; @@ -131,39 +129,56 @@ function get_namespace_documentation(string $namespace): string return $lines; }; - $directory = './../src/' . Str\replace($namespace, '\\', '/'); - $symbols = get_direct_namespace_symbols($namespace); - - return Str\join(Vec\concat( - $lines, - $generator($directory, $symbols, Loader::TYPE_CONSTANTS), - $generator($directory, $symbols, Loader::TYPE_FUNCTION), - $generator($directory, $symbols, Loader::TYPE_INTERFACE), - $generator($directory, $symbols, Loader::TYPE_CLASS), - $generator($directory, $symbols, Loader::TYPE_TRAIT), - [''] - ), "\n"); + $directory = './../src/' . Str\replace($component, '\\', '/'); + $symbols = get_component_members($component); + + $template = Filesystem\read_file(__DIR__ . '/templates/component.template.md'); + $previous_filename = __DIR__ . '/component/' . $previous_link; + $current_link = Str\format('%s.md', to_filename($component)); + if (Filesystem\exists($previous_filename)) { + $previous_content = Filesystem\read_file($previous_filename); + Filesystem\write_file($previous_filename, Str\replace($previous_content, '{{ next }}', $current_link)); + } + + $current_filename = Str\format('%s/component/%s', __DIR__, $current_link); + + $documentation = Str\replace_every($template, [ + '{{ previous }}' => $previous_link, + '{{ api }}' => Str\join(Vec\concat( + $lines, + $generator($directory, $symbols, Loader::TYPE_CONSTANTS), + $generator($directory, $symbols, Loader::TYPE_FUNCTION), + $generator($directory, $symbols, Loader::TYPE_INTERFACE), + $generator($directory, $symbols, Loader::TYPE_CLASS), + $generator($directory, $symbols, Loader::TYPE_TRAIT), + [''] + ), "\n"), + ]); + + Filesystem\write_file($current_filename, $documentation); + + return $current_link; } /** - * Return a shape contains all direct symbols in the given namespace. + * Return a shape contains all direct members in the given component. * * @return array> */ -function get_direct_namespace_symbols(string $namespace): array +function get_component_members(string $component): array { /** @var (callable(list): list) $filter */ $filter = static fn(array $list) => Vec\filter( $list, - static function (string $symbol) use ($namespace): bool { + static function (string $member) use ($component): bool { - if (!Str\starts_with_ci($symbol, $namespace)) { + if (!Str\starts_with_ci($member, $component)) { return false; } - $short_symbol_name = Type\string()->assert(Str\after_ci($symbol, $namespace . '\\')); + $short_member_name = Type\string()->assert(Str\after_ci($member, $component . '\\')); - return !Str\contains($short_symbol_name, '\\'); + return !Str\contains($short_member_name, '\\'); } ); @@ -179,9 +194,9 @@ static function (string $symbol) use ($namespace): bool { /** * @return list */ -function get_all_namespaces(): array +function get_all_components(): array { - return [ + $components = [ 'Psl', 'Psl\Arr', 'Psl\Collection', @@ -210,12 +225,15 @@ function get_all_namespaces(): array 'Psl\Type', 'Psl\Vec', ]; + + return Vec\sort($components); } /** * Return the name of the symbol type. */ -function get_symbol_type_name(int $type): string { +function get_symbol_type_name(int $type): string +{ switch ($type) { case Loader::TYPE_CONSTANTS: return 'Constants'; @@ -247,3 +265,24 @@ function get_symbol_definition_line(string $symbol, int $type): int return $reflection->getStartLine(); } + +/** + * Convert the given namespace to a filename. + * + * Example: + * to_filename('Psl\SecureRandom') + * => Str('secure-random') + * + * to_filename('Psl\Str\Byte') + * => Str('str-byte') + */ +function to_filename(string $namespace): string +{ + return Str\lowercase(Regex\replace( + Regex\replace( + Str\replace(Str\strip_prefix($namespace, 'Psl\\'), '\\', '-'), + '/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '\1-\2', + ), + '/([\p{Ll}0-9])(\p{Lu})/u', '\1-\2', + )); +} diff --git a/docs/templates/README.template.md b/docs/templates/README.template.md new file mode 100644 index 000000000..ede0514fe --- /dev/null +++ b/docs/templates/README.template.md @@ -0,0 +1,11 @@ +# Components API + +--- + +{{ list }} + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. diff --git a/docs/templates/component.template.md b/docs/templates/component.template.md new file mode 100644 index 000000000..fed37b366 --- /dev/null +++ b/docs/templates/component.template.md @@ -0,0 +1,15 @@ +> [previous]({{ previous }}) + +--- + +{{ api }} + +--- + +> [next]({{ next }}) + +--- + +> This markdown file was generated using `docs/documenter.php`. +> +> Any edits to it will likely be lost. From ceec79d4c5133202f8ad35d01fbd25dbc4fb8abc Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:14:37 +0100 Subject: [PATCH 2/8] document all password component constants --- docs/component/password.md | 6 ++++++ src/Psl/Internal/Loader.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/component/password.md b/docs/component/password.md index 7f9b6b608..68b49887e 100644 --- a/docs/component/password.md +++ b/docs/component/password.md @@ -8,6 +8,12 @@ - [DEFAULT_ALGORITHM](./../../src/Psl/Password/constants.php#L0) - [BCRYPT_ALGORITHM](./../../src/Psl/Password/constants.php#L0) +- [BCRYPT_DEFAULT_COST](./../../src/Psl/Password/constants.php#L0) +- [ARGON2I_ALGORITHM](./../../src/Psl/Password/constants.php#L0) +- [ARGON2ID_ALGORITHM](./../../src/Psl/Password/constants.php#L0) +- [ARGON2_DEFAULT_MEMORY_COST](./../../src/Psl/Password/constants.php#L0) +- [ARGON2_DEFAULT_TIME_COST](./../../src/Psl/Password/constants.php#L0) +- [ARGON2_DEFAULT_THREADS](./../../src/Psl/Password/constants.php#L0) ### `Functions` diff --git a/src/Psl/Internal/Loader.php b/src/Psl/Internal/Loader.php index 1d8f13fdc..6877b29dc 100644 --- a/src/Psl/Internal/Loader.php +++ b/src/Psl/Internal/Loader.php @@ -48,6 +48,12 @@ final class Loader 'Psl\Str\ALPHABET_ALPHANUMERIC', 'Psl\Password\DEFAULT_ALGORITHM', 'Psl\Password\BCRYPT_ALGORITHM', + 'Psl\Password\BCRYPT_DEFAULT_COST', + 'Psl\Password\ARGON2I_ALGORITHM', + 'Psl\Password\ARGON2ID_ALGORITHM', + 'Psl\Password\ARGON2_DEFAULT_MEMORY_COST', + 'Psl\Password\ARGON2_DEFAULT_TIME_COST', + 'Psl\Password\ARGON2_DEFAULT_THREADS', 'Psl\Filesystem\SEPARATOR', ]; From c3ead259e9ccc2e86ba0e58ea777ef121f69f22b Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:17:23 +0100 Subject: [PATCH 3/8] remove quoteblock for navigation links --- docs/component/arr.md | 4 ++-- docs/component/collection.md | 4 ++-- docs/component/data-structure.md | 4 ++-- docs/component/dict.md | 4 ++-- docs/component/encoding-base64.md | 4 ++-- docs/component/encoding-hex.md | 4 ++-- docs/component/env.md | 4 ++-- docs/component/filesystem.md | 4 ++-- docs/component/fun.md | 4 ++-- docs/component/hash.md | 4 ++-- docs/component/html.md | 4 ++-- docs/component/iter.md | 4 ++-- docs/component/json.md | 4 ++-- docs/component/math.md | 4 ++-- docs/component/observer.md | 4 ++-- docs/component/password.md | 4 ++-- docs/component/pseudo-random.md | 4 ++-- docs/component/psl.md | 4 ++-- docs/component/regex.md | 4 ++-- docs/component/result.md | 4 ++-- docs/component/secure-random.md | 4 ++-- docs/component/shell.md | 4 ++-- docs/component/str-byte.md | 4 ++-- docs/component/str-grapheme.md | 4 ++-- docs/component/str.md | 4 ++-- docs/component/type.md | 4 ++-- docs/component/vec.md | 7 ++++++- docs/templates/component.template.md | 4 ++-- 28 files changed, 60 insertions(+), 55 deletions(-) diff --git a/docs/component/arr.md b/docs/component/arr.md index 90bb7b3b9..a9a7de0db 100644 --- a/docs/component/arr.md +++ b/docs/component/arr.md @@ -1,4 +1,4 @@ -> [previous](psl.md) +[previous](psl.md) --- @@ -56,7 +56,7 @@ --- -> [next](collection.md) +[next](collection.md) --- diff --git a/docs/component/collection.md b/docs/component/collection.md index 59b75731b..3158d432a 100644 --- a/docs/component/collection.md +++ b/docs/component/collection.md @@ -1,4 +1,4 @@ -> [previous](arr.md) +[previous](arr.md) --- @@ -28,7 +28,7 @@ --- -> [next](data-structure.md) +[next](data-structure.md) --- diff --git a/docs/component/data-structure.md b/docs/component/data-structure.md index e6011cbf3..1a7fd7e0a 100644 --- a/docs/component/data-structure.md +++ b/docs/component/data-structure.md @@ -1,4 +1,4 @@ -> [previous](collection.md) +[previous](collection.md) --- @@ -20,7 +20,7 @@ --- -> [next](dict.md) +[next](dict.md) --- diff --git a/docs/component/dict.md b/docs/component/dict.md index 7d44075be..e8e16a2fb 100644 --- a/docs/component/dict.md +++ b/docs/component/dict.md @@ -1,4 +1,4 @@ -> [previous](data-structure.md) +[previous](data-structure.md) --- @@ -48,7 +48,7 @@ --- -> [next](encoding-base64.md) +[next](encoding-base64.md) --- diff --git a/docs/component/encoding-base64.md b/docs/component/encoding-base64.md index 4ab68c0f9..762b5b63e 100644 --- a/docs/component/encoding-base64.md +++ b/docs/component/encoding-base64.md @@ -1,4 +1,4 @@ -> [previous](dict.md) +[previous](dict.md) --- @@ -13,7 +13,7 @@ --- -> [next](encoding-hex.md) +[next](encoding-hex.md) --- diff --git a/docs/component/encoding-hex.md b/docs/component/encoding-hex.md index 9d3d8c09b..ebf76a729 100644 --- a/docs/component/encoding-hex.md +++ b/docs/component/encoding-hex.md @@ -1,4 +1,4 @@ -> [previous](encoding-base64.md) +[previous](encoding-base64.md) --- @@ -13,7 +13,7 @@ --- -> [next](env.md) +[next](env.md) --- diff --git a/docs/component/env.md b/docs/component/env.md index 17afc1f19..70503124b 100644 --- a/docs/component/env.md +++ b/docs/component/env.md @@ -1,4 +1,4 @@ -> [previous](encoding-hex.md) +[previous](encoding-hex.md) --- @@ -22,7 +22,7 @@ --- -> [next](filesystem.md) +[next](filesystem.md) --- diff --git a/docs/component/filesystem.md b/docs/component/filesystem.md index d7178f986..c3ff7016a 100644 --- a/docs/component/filesystem.md +++ b/docs/component/filesystem.md @@ -1,4 +1,4 @@ -> [previous](env.md) +[previous](env.md) --- @@ -51,7 +51,7 @@ --- -> [next](fun.md) +[next](fun.md) --- diff --git a/docs/component/fun.md b/docs/component/fun.md index d1e93cc8a..fc8fc79af 100644 --- a/docs/component/fun.md +++ b/docs/component/fun.md @@ -1,4 +1,4 @@ -> [previous](filesystem.md) +[previous](filesystem.md) --- @@ -16,7 +16,7 @@ --- -> [next](hash.md) +[next](hash.md) --- diff --git a/docs/component/hash.md b/docs/component/hash.md index 8a8461049..66582657f 100644 --- a/docs/component/hash.md +++ b/docs/component/hash.md @@ -1,4 +1,4 @@ -> [previous](fun.md) +[previous](fun.md) --- @@ -18,7 +18,7 @@ --- -> [next](html.md) +[next](html.md) --- diff --git a/docs/component/html.md b/docs/component/html.md index 092ccc703..5bdf9267b 100644 --- a/docs/component/html.md +++ b/docs/component/html.md @@ -1,4 +1,4 @@ -> [previous](hash.md) +[previous](hash.md) --- @@ -16,7 +16,7 @@ --- -> [next](iter.md) +[next](iter.md) --- diff --git a/docs/component/iter.md b/docs/component/iter.md index d9dff85b8..7e494a58d 100644 --- a/docs/component/iter.md +++ b/docs/component/iter.md @@ -1,4 +1,4 @@ -> [previous](html.md) +[previous](html.md) --- @@ -70,7 +70,7 @@ --- -> [next](json.md) +[next](json.md) --- diff --git a/docs/component/json.md b/docs/component/json.md index 666f92c6b..85132b303 100644 --- a/docs/component/json.md +++ b/docs/component/json.md @@ -1,4 +1,4 @@ -> [previous](iter.md) +[previous](iter.md) --- @@ -14,7 +14,7 @@ --- -> [next](math.md) +[next](math.md) --- diff --git a/docs/component/math.md b/docs/component/math.md index f74581afb..0a3b317aa 100644 --- a/docs/component/math.md +++ b/docs/component/math.md @@ -1,4 +1,4 @@ -> [previous](json.md) +[previous](json.md) --- @@ -53,7 +53,7 @@ --- -> [next](observer.md) +[next](observer.md) --- diff --git a/docs/component/observer.md b/docs/component/observer.md index 9c0854848..ae1cf6290 100644 --- a/docs/component/observer.md +++ b/docs/component/observer.md @@ -1,4 +1,4 @@ -> [previous](math.md) +[previous](math.md) --- @@ -13,7 +13,7 @@ --- -> [next](password.md) +[next](password.md) --- diff --git a/docs/component/password.md b/docs/component/password.md index 68b49887e..0209624b3 100644 --- a/docs/component/password.md +++ b/docs/component/password.md @@ -1,4 +1,4 @@ -> [previous](observer.md) +[previous](observer.md) --- @@ -27,7 +27,7 @@ --- -> [next](pseudo-random.md) +[next](pseudo-random.md) --- diff --git a/docs/component/pseudo-random.md b/docs/component/pseudo-random.md index e6f58ece7..d62921a62 100644 --- a/docs/component/pseudo-random.md +++ b/docs/component/pseudo-random.md @@ -1,4 +1,4 @@ -> [previous](password.md) +[previous](password.md) --- @@ -13,7 +13,7 @@ --- -> [next](regex.md) +[next](regex.md) --- diff --git a/docs/component/psl.md b/docs/component/psl.md index 28548c1e8..4d51cc6f0 100644 --- a/docs/component/psl.md +++ b/docs/component/psl.md @@ -1,4 +1,4 @@ -> [previous](./../README.md) +[previous](./../README.md) --- @@ -14,7 +14,7 @@ --- -> [next](arr.md) +[next](arr.md) --- diff --git a/docs/component/regex.md b/docs/component/regex.md index 589d82ec6..58336fd6d 100644 --- a/docs/component/regex.md +++ b/docs/component/regex.md @@ -1,4 +1,4 @@ -> [previous](pseudo-random.md) +[previous](pseudo-random.md) --- @@ -16,7 +16,7 @@ --- -> [next](result.md) +[next](result.md) --- diff --git a/docs/component/result.md b/docs/component/result.md index 12ef7c561..4c5076ca0 100644 --- a/docs/component/result.md +++ b/docs/component/result.md @@ -1,4 +1,4 @@ -> [previous](regex.md) +[previous](regex.md) --- @@ -21,7 +21,7 @@ --- -> [next](secure-random.md) +[next](secure-random.md) --- diff --git a/docs/component/secure-random.md b/docs/component/secure-random.md index 01a27afb9..aed31b1b6 100644 --- a/docs/component/secure-random.md +++ b/docs/component/secure-random.md @@ -1,4 +1,4 @@ -> [previous](result.md) +[previous](result.md) --- @@ -15,7 +15,7 @@ --- -> [next](shell.md) +[next](shell.md) --- diff --git a/docs/component/shell.md b/docs/component/shell.md index 5d3c09f3f..0ce9e3f4e 100644 --- a/docs/component/shell.md +++ b/docs/component/shell.md @@ -1,4 +1,4 @@ -> [previous](secure-random.md) +[previous](secure-random.md) --- @@ -14,7 +14,7 @@ --- -> [next](str.md) +[next](str.md) --- diff --git a/docs/component/str-byte.md b/docs/component/str-byte.md index 8ef4ac438..a71ec7352 100644 --- a/docs/component/str-byte.md +++ b/docs/component/str-byte.md @@ -1,4 +1,4 @@ -> [previous](str.md) +[previous](str.md) --- @@ -58,7 +58,7 @@ --- -> [next](str-grapheme.md) +[next](str-grapheme.md) --- diff --git a/docs/component/str-grapheme.md b/docs/component/str-grapheme.md index 3b22c4a6c..32169d653 100644 --- a/docs/component/str-grapheme.md +++ b/docs/component/str-grapheme.md @@ -1,4 +1,4 @@ -> [previous](str-byte.md) +[previous](str-byte.md) --- @@ -33,7 +33,7 @@ --- -> [next](type.md) +[next](type.md) --- diff --git a/docs/component/str.md b/docs/component/str.md index 25811cbd7..418be2582 100644 --- a/docs/component/str.md +++ b/docs/component/str.md @@ -1,4 +1,4 @@ -> [previous](shell.md) +[previous](shell.md) --- @@ -73,7 +73,7 @@ --- -> [next](str-byte.md) +[next](str-byte.md) --- diff --git a/docs/component/type.md b/docs/component/type.md index da387b40b..6de9da61b 100644 --- a/docs/component/type.md +++ b/docs/component/type.md @@ -1,4 +1,4 @@ -> [previous](str-grapheme.md) +[previous](str-grapheme.md) --- @@ -59,7 +59,7 @@ --- -> [next](vec.md) +[next](vec.md) --- diff --git a/docs/component/vec.md b/docs/component/vec.md index 7e352d2dc..58c7889d8 100644 --- a/docs/component/vec.md +++ b/docs/component/vec.md @@ -1,4 +1,4 @@ -> [previous](type.md) +[previous](type.md) --- @@ -31,6 +31,11 @@ - [zip](./../../src/Psl/Vec/zip.php#L37) + +--- + +[next]({{ next }}) + --- > This markdown file was generated using `docs/documenter.php`. diff --git a/docs/templates/component.template.md b/docs/templates/component.template.md index fed37b366..32e5ca13f 100644 --- a/docs/templates/component.template.md +++ b/docs/templates/component.template.md @@ -1,4 +1,4 @@ -> [previous]({{ previous }}) +[previous]({{ previous }}) --- @@ -6,7 +6,7 @@ --- -> [next]({{ next }}) +[next]({{ next }}) --- From 32fdeec14edc26071dd92b4e01ca00b538cfa4d7 Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:20:01 +0100 Subject: [PATCH 4/8] update title size --- docs/component/arr.md | 6 ++---- docs/component/collection.md | 8 +++----- docs/component/data-structure.md | 8 +++----- docs/component/dict.md | 6 ++---- docs/component/encoding-base64.md | 6 ++---- docs/component/encoding-hex.md | 6 ++---- docs/component/env.md | 6 ++---- docs/component/filesystem.md | 8 +++----- docs/component/fun.md | 6 ++---- docs/component/hash.md | 8 +++----- docs/component/html.md | 6 ++---- docs/component/iter.md | 8 +++----- docs/component/json.md | 6 ++---- docs/component/math.md | 8 +++----- docs/component/observer.md | 6 ++---- docs/component/password.md | 8 +++----- docs/component/pseudo-random.md | 6 ++---- docs/component/psl.md | 6 ++---- docs/component/regex.md | 6 ++---- docs/component/result.md | 10 ++++------ docs/component/secure-random.md | 6 ++---- docs/component/shell.md | 6 ++---- docs/component/str-byte.md | 6 ++---- docs/component/str-grapheme.md | 6 ++---- docs/component/str.md | 8 +++----- docs/component/type.md | 10 ++++------ docs/component/vec.md | 6 ++---- docs/documenter.php | 4 ++-- docs/templates/component.template.md | 2 -- 29 files changed, 68 insertions(+), 124 deletions(-) diff --git a/docs/component/arr.md b/docs/component/arr.md index a9a7de0db..495ca578f 100644 --- a/docs/component/arr.md +++ b/docs/component/arr.md @@ -2,9 +2,9 @@ --- -## `Psl\Arr` Component +### `Psl\Arr` Component -### `Functions` +#### `Functions` - [at](./../../src/Psl/Arr/at.php#L27) ( deprecated ) - [concat](./../../src/Psl/Arr/concat.php#L22) ( deprecated ) @@ -58,8 +58,6 @@ [next](collection.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/collection.md b/docs/component/collection.md index 3158d432a..83814b633 100644 --- a/docs/component/collection.md +++ b/docs/component/collection.md @@ -2,9 +2,9 @@ --- -## `Psl\Collection` Component +### `Psl\Collection` Component -### `Interfaces` +#### `Interfaces` - [CollectionInterface](./../../src/Psl/Collection/CollectionInterface.php#L21) - [IndexAccessInterface](./../../src/Psl/Collection/IndexAccessInterface.php#L13) @@ -17,7 +17,7 @@ - [MapInterface](./../../src/Psl/Collection/MapInterface.php#L13) - [MutableMapInterface](./../../src/Psl/Collection/MutableMapInterface.php#L14) -### `Classes` +#### `Classes` - [Vector](./../../src/Psl/Collection/Vector.php#L17) - [MutableVector](./../../src/Psl/Collection/MutableVector.php#L17) @@ -30,8 +30,6 @@ [next](data-structure.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/data-structure.md b/docs/component/data-structure.md index 1a7fd7e0a..ac86d435d 100644 --- a/docs/component/data-structure.md +++ b/docs/component/data-structure.md @@ -2,15 +2,15 @@ --- -## `Psl\DataStructure` Component +### `Psl\DataStructure` Component -### `Interfaces` +#### `Interfaces` - [PriorityQueueInterface](./../../src/Psl/DataStructure/PriorityQueueInterface.php#L12) - [QueueInterface](./../../src/Psl/DataStructure/QueueInterface.php#L17) - [StackInterface](./../../src/Psl/DataStructure/StackInterface.php#L17) -### `Classes` +#### `Classes` - [PriorityQueue](./../../src/Psl/DataStructure/PriorityQueue.php#L18) - [Queue](./../../src/Psl/DataStructure/Queue.php#L19) @@ -22,8 +22,6 @@ [next](dict.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/dict.md b/docs/component/dict.md index e8e16a2fb..54805f8a5 100644 --- a/docs/component/dict.md +++ b/docs/component/dict.md @@ -2,9 +2,9 @@ --- -## `Psl\Dict` Component +### `Psl\Dict` Component -### `Functions` +#### `Functions` - [associate](./../../src/Psl/Dict/associate.php#L25) - [count_values](./../../src/Psl/Dict/count_values.php#L20) @@ -50,8 +50,6 @@ [next](encoding-base64.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/encoding-base64.md b/docs/component/encoding-base64.md index 762b5b63e..837289ffc 100644 --- a/docs/component/encoding-base64.md +++ b/docs/component/encoding-base64.md @@ -2,9 +2,9 @@ --- -## `Psl\Encoding\Base64` Component +### `Psl\Encoding\Base64` Component -### `Functions` +#### `Functions` - [encode](./../../src/Psl/Encoding/Base64/encode.php#L18) - [decode](./../../src/Psl/Encoding/Base64/decode.php#L27) @@ -15,8 +15,6 @@ [next](encoding-hex.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/encoding-hex.md b/docs/component/encoding-hex.md index ebf76a729..20b6e25fe 100644 --- a/docs/component/encoding-hex.md +++ b/docs/component/encoding-hex.md @@ -2,9 +2,9 @@ --- -## `Psl\Encoding\Hex` Component +### `Psl\Encoding\Hex` Component -### `Functions` +#### `Functions` - [encode](./../../src/Psl/Encoding/Hex/encode.php#L16) - [decode](./../../src/Psl/Encoding/Hex/decode.php#L22) @@ -15,8 +15,6 @@ [next](env.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/env.md b/docs/component/env.md index 70503124b..0490d6f45 100644 --- a/docs/component/env.md +++ b/docs/component/env.md @@ -2,9 +2,9 @@ --- -## `Psl\Env` Component +### `Psl\Env` Component -### `Functions` +#### `Functions` - [args](./../../src/Psl/Env/args.php#L12) - [current_dir](./../../src/Psl/Env/current_dir.php#L16) @@ -24,8 +24,6 @@ [next](filesystem.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/filesystem.md b/docs/component/filesystem.md index c3ff7016a..150c9b2d7 100644 --- a/docs/component/filesystem.md +++ b/docs/component/filesystem.md @@ -2,13 +2,13 @@ --- -## `Psl\Filesystem` Component +### `Psl\Filesystem` Component -### `Constants` +#### `Constants` - [SEPARATOR](./../../src/Psl/Filesystem/constants.php#L0) -### `Functions` +#### `Functions` - [change_group](./../../src/Psl/Filesystem/change_group.php#L20) - [change_owner](./../../src/Psl/Filesystem/change_owner.php#L20) @@ -53,8 +53,6 @@ [next](fun.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/fun.md b/docs/component/fun.md index fc8fc79af..c27e8189e 100644 --- a/docs/component/fun.md +++ b/docs/component/fun.md @@ -2,9 +2,9 @@ --- -## `Psl\Fun` Component +### `Psl\Fun` Component -### `Functions` +#### `Functions` - [after](./../../src/Psl/Fun/after.php#L37) - [identity](./../../src/Psl/Fun/identity.php#L17) @@ -18,8 +18,6 @@ [next](hash.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/hash.md b/docs/component/hash.md index 66582657f..77f6c11c0 100644 --- a/docs/component/hash.md +++ b/docs/component/hash.md @@ -2,15 +2,15 @@ --- -## `Psl\Hash` Component +### `Psl\Hash` Component -### `Functions` +#### `Functions` - [hash](./../../src/Psl/Hash/hash.php#L16) - [algorithms](./../../src/Psl/Hash/algorithms.php#L16) - [equals](./../../src/Psl/Hash/equals.php#L14) -### `Classes` +#### `Classes` - [Context](./../../src/Psl/Hash/Context.php#L31) @@ -20,8 +20,6 @@ [next](html.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/html.md b/docs/component/html.md index 5bdf9267b..d17ee15ad 100644 --- a/docs/component/html.md +++ b/docs/component/html.md @@ -2,9 +2,9 @@ --- -## `Psl\Html` Component +### `Psl\Html` Component -### `Functions` +#### `Functions` - [encode](./../../src/Psl/Html/encode.php#L27) - [encode_special_characters](./../../src/Psl/Html/encode_special_characters.php#L29) @@ -18,8 +18,6 @@ [next](iter.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/iter.md b/docs/component/iter.md index 7e494a58d..816843d0d 100644 --- a/docs/component/iter.md +++ b/docs/component/iter.md @@ -2,9 +2,9 @@ --- -## `Psl\Iter` Component +### `Psl\Iter` Component -### `Functions` +#### `Functions` - [all](./../../src/Psl/Iter/all.php#L28) - [any](./../../src/Psl/Iter/any.php#L28) @@ -62,7 +62,7 @@ - [values](./../../src/Psl/Iter/values.php#L32) ( deprecated ) - [zip](./../../src/Psl/Iter/zip.php#L38) ( deprecated ) -### `Classes` +#### `Classes` - [Iterator](./../../src/Psl/Iter/Iterator.php#L18) @@ -72,8 +72,6 @@ [next](json.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/json.md b/docs/component/json.md index 85132b303..8c04bb323 100644 --- a/docs/component/json.md +++ b/docs/component/json.md @@ -2,9 +2,9 @@ --- -## `Psl\Json` Component +### `Psl\Json` Component -### `Functions` +#### `Functions` - [encode](./../../src/Psl/Json/encode.php#L27) - [decode](./../../src/Psl/Json/decode.php#L24) @@ -16,8 +16,6 @@ [next](math.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/math.md b/docs/component/math.md index 0a3b317aa..a755a0372 100644 --- a/docs/component/math.md +++ b/docs/component/math.md @@ -2,9 +2,9 @@ --- -## `Psl\Math` Component +### `Psl\Math` Component -### `Constants` +#### `Constants` - [INT64_MAX](./../../src/Psl/Math/constants.php#L0) - [INT64_MIN](./../../src/Psl/Math/constants.php#L0) @@ -21,7 +21,7 @@ - [INFINITY](./../../src/Psl/Math/constants.php#L0) - [NAN](./../../src/Psl/Math/constants.php#L0) -### `Functions` +#### `Functions` - [abs](./../../src/Psl/Math/abs.php#L34) - [base_convert](./../../src/Psl/Math/base_convert.php#L39) @@ -55,8 +55,6 @@ [next](observer.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/observer.md b/docs/component/observer.md index ae1cf6290..b896f8953 100644 --- a/docs/component/observer.md +++ b/docs/component/observer.md @@ -2,9 +2,9 @@ --- -## `Psl\Observer` Component +### `Psl\Observer` Component -### `Interfaces` +#### `Interfaces` - [SubjectInterface](./../../src/Psl/Observer/SubjectInterface.php#L7) - [ObserverInterface](./../../src/Psl/Observer/ObserverInterface.php#L10) @@ -15,8 +15,6 @@ [next](password.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/password.md b/docs/component/password.md index 0209624b3..d18a44d6c 100644 --- a/docs/component/password.md +++ b/docs/component/password.md @@ -2,9 +2,9 @@ --- -## `Psl\Password` Component +### `Psl\Password` Component -### `Constants` +#### `Constants` - [DEFAULT_ALGORITHM](./../../src/Psl/Password/constants.php#L0) - [BCRYPT_ALGORITHM](./../../src/Psl/Password/constants.php#L0) @@ -15,7 +15,7 @@ - [ARGON2_DEFAULT_TIME_COST](./../../src/Psl/Password/constants.php#L0) - [ARGON2_DEFAULT_THREADS](./../../src/Psl/Password/constants.php#L0) -### `Functions` +#### `Functions` - [algorithms](./../../src/Psl/Password/algorithms.php#L14) - [get_information](./../../src/Psl/Password/get_information.php#L24) @@ -29,8 +29,6 @@ [next](pseudo-random.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/pseudo-random.md b/docs/component/pseudo-random.md index d62921a62..d63620282 100644 --- a/docs/component/pseudo-random.md +++ b/docs/component/pseudo-random.md @@ -2,9 +2,9 @@ --- -## `Psl\PseudoRandom` Component +### `Psl\PseudoRandom` Component -### `Functions` +#### `Functions` - [float](./../../src/Psl/PseudoRandom/float.php#L12) - [int](./../../src/Psl/PseudoRandom/int.php#L17) @@ -15,8 +15,6 @@ [next](regex.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/psl.md b/docs/component/psl.md index 4d51cc6f0..f683fb322 100644 --- a/docs/component/psl.md +++ b/docs/component/psl.md @@ -2,9 +2,9 @@ --- -## `Psl` Component +### `Psl` Component -### `Functions` +#### `Functions` - [invariant](./../../src/Psl/invariant.php#L18) - [invariant_violation](./../../src/Psl/invariant_violation.php#L16) @@ -16,8 +16,6 @@ [next](arr.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/regex.md b/docs/component/regex.md index 58336fd6d..bdd3fc58a 100644 --- a/docs/component/regex.md +++ b/docs/component/regex.md @@ -2,9 +2,9 @@ --- -## `Psl\Regex` Component +### `Psl\Regex` Component -### `Functions` +#### `Functions` - [split](./../../src/Psl/Regex/split.php#L29) - [matches](./../../src/Psl/Regex/matches.php#L19) @@ -18,8 +18,6 @@ [next](result.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/result.md b/docs/component/result.md index 4c5076ca0..b40e086c3 100644 --- a/docs/component/result.md +++ b/docs/component/result.md @@ -2,17 +2,17 @@ --- -## `Psl\Result` Component +### `Psl\Result` Component -### `Functions` +#### `Functions` - [wrap](./../../src/Psl/Result/wrap.php#L19) -### `Interfaces` +#### `Interfaces` - [ResultInterface](./../../src/Psl/Result/ResultInterface.php#L19) -### `Classes` +#### `Classes` - [Failure](./../../src/Psl/Result/Failure.php#L17) - [Success](./../../src/Psl/Result/Success.php#L17) @@ -23,8 +23,6 @@ [next](secure-random.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/secure-random.md b/docs/component/secure-random.md index aed31b1b6..b5b49c522 100644 --- a/docs/component/secure-random.md +++ b/docs/component/secure-random.md @@ -2,9 +2,9 @@ --- -## `Psl\SecureRandom` Component +### `Psl\SecureRandom` Component -### `Functions` +#### `Functions` - [bytes](./../../src/Psl/SecureRandom/bytes.php#L20) - [float](./../../src/Psl/SecureRandom/float.php#L14) @@ -17,8 +17,6 @@ [next](shell.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/shell.md b/docs/component/shell.md index 0ce9e3f4e..9b960648d 100644 --- a/docs/component/shell.md +++ b/docs/component/shell.md @@ -2,9 +2,9 @@ --- -## `Psl\Shell` Component +### `Psl\Shell` Component -### `Functions` +#### `Functions` - [escape_command](./../../src/Psl/Shell/escape_command.php#L14) - [escape_argument](./../../src/Psl/Shell/escape_argument.php#L17) @@ -16,8 +16,6 @@ [next](str.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/str-byte.md b/docs/component/str-byte.md index a71ec7352..f40b61d8a 100644 --- a/docs/component/str-byte.md +++ b/docs/component/str-byte.md @@ -2,9 +2,9 @@ --- -## `Psl\Str\Byte` Component +### `Psl\Str\Byte` Component -### `Functions` +#### `Functions` - [capitalize](./../../src/Psl/Str/Byte/capitalize.php#L17) - [capitalize_words](./../../src/Psl/Str/Byte/capitalize_words.php#L17) @@ -60,8 +60,6 @@ [next](str-grapheme.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/str-grapheme.md b/docs/component/str-grapheme.md index 32169d653..2026cfaef 100644 --- a/docs/component/str-grapheme.md +++ b/docs/component/str-grapheme.md @@ -2,9 +2,9 @@ --- -## `Psl\Str\Grapheme` Component +### `Psl\Str\Grapheme` Component -### `Functions` +#### `Functions` - [contains](./../../src/Psl/Str/Grapheme/contains.php#L21) - [contains_ci](./../../src/Psl/Str/Grapheme/contains_ci.php#L21) @@ -35,8 +35,6 @@ [next](type.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/str.md b/docs/component/str.md index 418be2582..31e80dab9 100644 --- a/docs/component/str.md +++ b/docs/component/str.md @@ -2,14 +2,14 @@ --- -## `Psl\Str` Component +### `Psl\Str` Component -### `Constants` +#### `Constants` - [ALPHABET](./../../src/Psl/Str/constants.php#L0) - [ALPHABET_ALPHANUMERIC](./../../src/Psl/Str/constants.php#L0) -### `Functions` +#### `Functions` - [capitalize](./../../src/Psl/Str/capitalize.php#L33) - [capitalize_words](./../../src/Psl/Str/capitalize_words.php#L35) @@ -75,8 +75,6 @@ [next](str-byte.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/type.md b/docs/component/type.md index 6de9da61b..faf140a12 100644 --- a/docs/component/type.md +++ b/docs/component/type.md @@ -2,9 +2,9 @@ --- -## `Psl\Type` Component +### `Psl\Type` Component -### `Functions` +#### `Functions` - [map](./../../src/Psl/Type/map.php#L21) - [mutable_map](./../../src/Psl/Type/mutable_map.php#L21) @@ -47,11 +47,11 @@ - [is_string](./../../src/Psl/Type/is_string.php#L20) ( deprecated ) - [literal_scalar](./../../src/Psl/Type/literal_scalar.php#L18) -### `Interfaces` +#### `Interfaces` - [TypeInterface](./../../src/Psl/Type/TypeInterface.php#L14) -### `Classes` +#### `Classes` - [Type](./../../src/Psl/Type/Type.php#L15) @@ -61,8 +61,6 @@ [next](vec.md) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/vec.md b/docs/component/vec.md index 58c7889d8..d31eb9350 100644 --- a/docs/component/vec.md +++ b/docs/component/vec.md @@ -2,9 +2,9 @@ --- -## `Psl\Vec` Component +### `Psl\Vec` Component -### `Functions` +#### `Functions` - [chunk](./../../src/Psl/Vec/chunk.php#L24) - [chunk_with_keys](./../../src/Psl/Vec/chunk_with_keys.php#L27) @@ -36,8 +36,6 @@ [next]({{ next }}) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/documenter.php b/docs/documenter.php index 7b846c18b..d384767d0 100644 --- a/docs/documenter.php +++ b/docs/documenter.php @@ -87,7 +87,7 @@ function regenerate_documentation(): void function document_component(string $component, string $previous_link): string { $lines = []; - $lines[] = Str\format('## `%s` Component', $component); + $lines[] = Str\format('### `%s` Component', $component); $lines[] = ''; /** @@ -102,7 +102,7 @@ function document_component(string $component, string $previous_link): string ): array { $lines = []; if (Iter\count($symbols[$type]) > 0) { - $lines[] = Str\format('### `%s`', get_symbol_type_name($type)); + $lines[] = Str\format('#### `%s`', get_symbol_type_name($type)); $lines[] = ''; foreach ($symbols[$type] as $symbol) { diff --git a/docs/templates/component.template.md b/docs/templates/component.template.md index 32e5ca13f..ce746882e 100644 --- a/docs/templates/component.template.md +++ b/docs/templates/component.template.md @@ -8,8 +8,6 @@ [next]({{ next }}) ---- - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. From e1c9d51d22b1f9707f4ef36d22d282853f91fd20 Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:22:13 +0100 Subject: [PATCH 5/8] remove next link --- docs/component/arr.md | 2 -- docs/component/collection.md | 2 -- docs/component/data-structure.md | 2 -- docs/component/dict.md | 2 -- docs/component/encoding-base64.md | 2 -- docs/component/encoding-hex.md | 2 -- docs/component/env.md | 2 -- docs/component/filesystem.md | 2 -- docs/component/fun.md | 2 -- docs/component/hash.md | 2 -- docs/component/html.md | 2 -- docs/component/iter.md | 2 -- docs/component/json.md | 2 -- docs/component/math.md | 2 -- docs/component/observer.md | 2 -- docs/component/password.md | 2 -- docs/component/pseudo-random.md | 2 -- docs/component/psl.md | 2 -- docs/component/regex.md | 2 -- docs/component/result.md | 2 -- docs/component/secure-random.md | 2 -- docs/component/shell.md | 2 -- docs/component/str-byte.md | 2 -- docs/component/str-grapheme.md | 2 -- docs/component/str.md | 2 -- docs/component/type.md | 2 -- docs/component/vec.md | 2 -- docs/documenter.php | 11 ----------- docs/templates/component.template.md | 2 -- 29 files changed, 67 deletions(-) diff --git a/docs/component/arr.md b/docs/component/arr.md index 495ca578f..98675fa19 100644 --- a/docs/component/arr.md +++ b/docs/component/arr.md @@ -56,8 +56,6 @@ --- -[next](collection.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/collection.md b/docs/component/collection.md index 83814b633..fea78fd3f 100644 --- a/docs/component/collection.md +++ b/docs/component/collection.md @@ -28,8 +28,6 @@ --- -[next](data-structure.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/data-structure.md b/docs/component/data-structure.md index ac86d435d..d9aaac24f 100644 --- a/docs/component/data-structure.md +++ b/docs/component/data-structure.md @@ -20,8 +20,6 @@ --- -[next](dict.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/dict.md b/docs/component/dict.md index 54805f8a5..c79fcfa69 100644 --- a/docs/component/dict.md +++ b/docs/component/dict.md @@ -48,8 +48,6 @@ --- -[next](encoding-base64.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/encoding-base64.md b/docs/component/encoding-base64.md index 837289ffc..c8b83862c 100644 --- a/docs/component/encoding-base64.md +++ b/docs/component/encoding-base64.md @@ -13,8 +13,6 @@ --- -[next](encoding-hex.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/encoding-hex.md b/docs/component/encoding-hex.md index 20b6e25fe..db1eb5bf4 100644 --- a/docs/component/encoding-hex.md +++ b/docs/component/encoding-hex.md @@ -13,8 +13,6 @@ --- -[next](env.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/env.md b/docs/component/env.md index 0490d6f45..c9ffeebc7 100644 --- a/docs/component/env.md +++ b/docs/component/env.md @@ -22,8 +22,6 @@ --- -[next](filesystem.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/filesystem.md b/docs/component/filesystem.md index 150c9b2d7..f23873d39 100644 --- a/docs/component/filesystem.md +++ b/docs/component/filesystem.md @@ -51,8 +51,6 @@ --- -[next](fun.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/fun.md b/docs/component/fun.md index c27e8189e..b44685d18 100644 --- a/docs/component/fun.md +++ b/docs/component/fun.md @@ -16,8 +16,6 @@ --- -[next](hash.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/hash.md b/docs/component/hash.md index 77f6c11c0..043f25284 100644 --- a/docs/component/hash.md +++ b/docs/component/hash.md @@ -18,8 +18,6 @@ --- -[next](html.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/html.md b/docs/component/html.md index d17ee15ad..13823029f 100644 --- a/docs/component/html.md +++ b/docs/component/html.md @@ -16,8 +16,6 @@ --- -[next](iter.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/iter.md b/docs/component/iter.md index 816843d0d..6f730f03b 100644 --- a/docs/component/iter.md +++ b/docs/component/iter.md @@ -70,8 +70,6 @@ --- -[next](json.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/json.md b/docs/component/json.md index 8c04bb323..0e72f9975 100644 --- a/docs/component/json.md +++ b/docs/component/json.md @@ -14,8 +14,6 @@ --- -[next](math.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/math.md b/docs/component/math.md index a755a0372..79c7386d6 100644 --- a/docs/component/math.md +++ b/docs/component/math.md @@ -53,8 +53,6 @@ --- -[next](observer.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/observer.md b/docs/component/observer.md index b896f8953..b6beee98e 100644 --- a/docs/component/observer.md +++ b/docs/component/observer.md @@ -13,8 +13,6 @@ --- -[next](password.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/password.md b/docs/component/password.md index d18a44d6c..752886b04 100644 --- a/docs/component/password.md +++ b/docs/component/password.md @@ -27,8 +27,6 @@ --- -[next](pseudo-random.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/pseudo-random.md b/docs/component/pseudo-random.md index d63620282..f764d2c88 100644 --- a/docs/component/pseudo-random.md +++ b/docs/component/pseudo-random.md @@ -13,8 +13,6 @@ --- -[next](regex.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/psl.md b/docs/component/psl.md index f683fb322..705c97e42 100644 --- a/docs/component/psl.md +++ b/docs/component/psl.md @@ -14,8 +14,6 @@ --- -[next](arr.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/regex.md b/docs/component/regex.md index bdd3fc58a..9e63ef5f6 100644 --- a/docs/component/regex.md +++ b/docs/component/regex.md @@ -16,8 +16,6 @@ --- -[next](result.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/result.md b/docs/component/result.md index b40e086c3..035396925 100644 --- a/docs/component/result.md +++ b/docs/component/result.md @@ -21,8 +21,6 @@ --- -[next](secure-random.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/secure-random.md b/docs/component/secure-random.md index b5b49c522..2e4b53c3e 100644 --- a/docs/component/secure-random.md +++ b/docs/component/secure-random.md @@ -15,8 +15,6 @@ --- -[next](shell.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/shell.md b/docs/component/shell.md index 9b960648d..e727ddd3d 100644 --- a/docs/component/shell.md +++ b/docs/component/shell.md @@ -14,8 +14,6 @@ --- -[next](str.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/str-byte.md b/docs/component/str-byte.md index f40b61d8a..25362edfc 100644 --- a/docs/component/str-byte.md +++ b/docs/component/str-byte.md @@ -58,8 +58,6 @@ --- -[next](str-grapheme.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/str-grapheme.md b/docs/component/str-grapheme.md index 2026cfaef..09b4890aa 100644 --- a/docs/component/str-grapheme.md +++ b/docs/component/str-grapheme.md @@ -33,8 +33,6 @@ --- -[next](type.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/str.md b/docs/component/str.md index 31e80dab9..07b324df0 100644 --- a/docs/component/str.md +++ b/docs/component/str.md @@ -73,8 +73,6 @@ --- -[next](str-byte.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/type.md b/docs/component/type.md index faf140a12..3b4a647c4 100644 --- a/docs/component/type.md +++ b/docs/component/type.md @@ -59,8 +59,6 @@ --- -[next](vec.md) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/component/vec.md b/docs/component/vec.md index d31eb9350..a60060b77 100644 --- a/docs/component/vec.md +++ b/docs/component/vec.md @@ -34,8 +34,6 @@ --- -[next]({{ next }}) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. diff --git a/docs/documenter.php b/docs/documenter.php index d384767d0..03023df20 100644 --- a/docs/documenter.php +++ b/docs/documenter.php @@ -72,11 +72,6 @@ function regenerate_documentation(): void foreach ($components as $component) { $previous = document_component($component, $previous); } - - // remove [next]({{ next }}) line from the last component documentation. - $last_filename = Str\format('%s/component/%s', __DIR__, $previous); - $last_file_content = Filesystem\read_file($last_filename); - Filesystem\write_file($last_filename, Str\replace($last_file_content, "\n\n---\n\n> [next]({{ next }})\n", '')); } /** @@ -133,13 +128,7 @@ function document_component(string $component, string $previous_link): string $symbols = get_component_members($component); $template = Filesystem\read_file(__DIR__ . '/templates/component.template.md'); - $previous_filename = __DIR__ . '/component/' . $previous_link; $current_link = Str\format('%s.md', to_filename($component)); - if (Filesystem\exists($previous_filename)) { - $previous_content = Filesystem\read_file($previous_filename); - Filesystem\write_file($previous_filename, Str\replace($previous_content, '{{ next }}', $current_link)); - } - $current_filename = Str\format('%s/component/%s', __DIR__, $current_link); $documentation = Str\replace_every($template, [ diff --git a/docs/templates/component.template.md b/docs/templates/component.template.md index ce746882e..b87419ea8 100644 --- a/docs/templates/component.template.md +++ b/docs/templates/component.template.md @@ -6,8 +6,6 @@ --- -[next]({{ next }}) - > This markdown file was generated using `docs/documenter.php`. > > Any edits to it will likely be lost. From ba7f7f6db399054220fd70ea6a6298161cf37419 Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:25:06 +0100 Subject: [PATCH 6/8] replace previous link with index --- docs/README.md | 14 ++++++-------- docs/component/arr.md | 14 +++++++------- docs/component/collection.md | 14 +++++++------- docs/component/data-structure.md | 14 +++++++------- docs/component/dict.md | 14 +++++++------- docs/component/encoding-base64.md | 14 +++++++------- docs/component/encoding-hex.md | 14 +++++++------- docs/component/env.md | 14 +++++++------- docs/component/filesystem.md | 14 +++++++------- docs/component/fun.md | 14 +++++++------- docs/component/hash.md | 14 +++++++------- docs/component/html.md | 14 +++++++------- docs/component/iter.md | 14 +++++++------- docs/component/json.md | 14 +++++++------- docs/component/math.md | 14 +++++++------- docs/component/observer.md | 14 +++++++------- docs/component/password.md | 14 +++++++------- docs/component/pseudo-random.md | 14 +++++++------- docs/component/psl.md | 14 +++++++------- docs/component/regex.md | 14 +++++++------- docs/component/result.md | 14 +++++++------- docs/component/secure-random.md | 14 +++++++------- docs/component/shell.md | 14 +++++++------- docs/component/str-byte.md | 14 +++++++------- docs/component/str-grapheme.md | 14 +++++++------- docs/component/str.md | 14 +++++++------- docs/component/type.md | 14 +++++++------- docs/component/vec.md | 14 +++++++------- docs/documenter.php | 12 +++--------- docs/templates/README.template.md | 14 ++++++-------- docs/templates/component.template.md | 12 ++++++------ 31 files changed, 210 insertions(+), 220 deletions(-) diff --git a/docs/README.md b/docs/README.md index 5c94ea946..a05023a12 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,10 @@ -# Components API + ---- +# Components API - [Psl](./component/psl.md) - [Psl\Arr](./component/arr.md) @@ -30,9 +34,3 @@ - [Psl\Type](./component/type.md) - [Psl\Vec](./component/vec.md) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/arr.md b/docs/component/arr.md index 98675fa19..61b207ffd 100644 --- a/docs/component/arr.md +++ b/docs/component/arr.md @@ -1,4 +1,10 @@ -[previous](psl.md) + + +[*index](./../README.md) --- @@ -53,9 +59,3 @@ - [map_with_key](./../../src/Psl/Arr/map_with_key.php#L34) ( deprecated ) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/collection.md b/docs/component/collection.md index fea78fd3f..e3b93a1b9 100644 --- a/docs/component/collection.md +++ b/docs/component/collection.md @@ -1,4 +1,10 @@ -[previous](arr.md) + + +[*index](./../README.md) --- @@ -25,9 +31,3 @@ - [MutableMap](./../../src/Psl/Collection/MutableMap.php#L18) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/data-structure.md b/docs/component/data-structure.md index d9aaac24f..193e9a3a3 100644 --- a/docs/component/data-structure.md +++ b/docs/component/data-structure.md @@ -1,4 +1,10 @@ -[previous](collection.md) + + +[*index](./../README.md) --- @@ -17,9 +23,3 @@ - [Stack](./../../src/Psl/DataStructure/Stack.php#L19) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/dict.md b/docs/component/dict.md index c79fcfa69..e95cabbd1 100644 --- a/docs/component/dict.md +++ b/docs/component/dict.md @@ -1,4 +1,10 @@ -[previous](data-structure.md) + + +[*index](./../README.md) --- @@ -45,9 +51,3 @@ - [intersect_by_key](./../../src/Psl/Dict/intersect_by_key.php#L24) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/encoding-base64.md b/docs/component/encoding-base64.md index c8b83862c..e7e9c8201 100644 --- a/docs/component/encoding-base64.md +++ b/docs/component/encoding-base64.md @@ -1,4 +1,10 @@ -[previous](dict.md) + + +[*index](./../README.md) --- @@ -10,9 +16,3 @@ - [decode](./../../src/Psl/Encoding/Base64/decode.php#L27) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/encoding-hex.md b/docs/component/encoding-hex.md index db1eb5bf4..9777f2e33 100644 --- a/docs/component/encoding-hex.md +++ b/docs/component/encoding-hex.md @@ -1,4 +1,10 @@ -[previous](encoding-base64.md) + + +[*index](./../README.md) --- @@ -10,9 +16,3 @@ - [decode](./../../src/Psl/Encoding/Hex/decode.php#L22) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/env.md b/docs/component/env.md index c9ffeebc7..4eb6103af 100644 --- a/docs/component/env.md +++ b/docs/component/env.md @@ -1,4 +1,10 @@ -[previous](encoding-hex.md) + + +[*index](./../README.md) --- @@ -19,9 +25,3 @@ - [temp_dir](./../../src/Psl/Env/temp_dir.php#L20) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/filesystem.md b/docs/component/filesystem.md index f23873d39..327e40cf4 100644 --- a/docs/component/filesystem.md +++ b/docs/component/filesystem.md @@ -1,4 +1,10 @@ -[previous](env.md) + + +[*index](./../README.md) --- @@ -48,9 +54,3 @@ - [get_inode](./../../src/Psl/Filesystem/get_inode.php#L18) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/fun.md b/docs/component/fun.md index b44685d18..824896f95 100644 --- a/docs/component/fun.md +++ b/docs/component/fun.md @@ -1,4 +1,10 @@ -[previous](filesystem.md) + + +[*index](./../README.md) --- @@ -13,9 +19,3 @@ - [when](./../../src/Psl/Fun/when.php#L33) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/hash.md b/docs/component/hash.md index 043f25284..1cb9f1aec 100644 --- a/docs/component/hash.md +++ b/docs/component/hash.md @@ -1,4 +1,10 @@ -[previous](fun.md) + + +[*index](./../README.md) --- @@ -15,9 +21,3 @@ - [Context](./../../src/Psl/Hash/Context.php#L31) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/html.md b/docs/component/html.md index 13823029f..2b83e3b2b 100644 --- a/docs/component/html.md +++ b/docs/component/html.md @@ -1,4 +1,10 @@ -[previous](hash.md) + + +[*index](./../README.md) --- @@ -13,9 +19,3 @@ - [strip_tags](./../../src/Psl/Html/strip_tags.php#L16) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/iter.md b/docs/component/iter.md index 6f730f03b..e1084c43c 100644 --- a/docs/component/iter.md +++ b/docs/component/iter.md @@ -1,4 +1,10 @@ -[previous](html.md) + + +[*index](./../README.md) --- @@ -67,9 +73,3 @@ - [Iterator](./../../src/Psl/Iter/Iterator.php#L18) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/json.md b/docs/component/json.md index 0e72f9975..91f8043d5 100644 --- a/docs/component/json.md +++ b/docs/component/json.md @@ -1,4 +1,10 @@ -[previous](iter.md) + + +[*index](./../README.md) --- @@ -11,9 +17,3 @@ - [typed](./../../src/Psl/Json/typed.php#L22) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/math.md b/docs/component/math.md index 79c7386d6..b444a8fde 100644 --- a/docs/component/math.md +++ b/docs/component/math.md @@ -1,4 +1,10 @@ -[previous](json.md) + + +[*index](./../README.md) --- @@ -50,9 +56,3 @@ - [to_base](./../../src/Psl/Math/to_base.php#L18) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/observer.md b/docs/component/observer.md index b6beee98e..af6cfa3d3 100644 --- a/docs/component/observer.md +++ b/docs/component/observer.md @@ -1,4 +1,10 @@ -[previous](math.md) + + +[*index](./../README.md) --- @@ -10,9 +16,3 @@ - [ObserverInterface](./../../src/Psl/Observer/ObserverInterface.php#L10) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/password.md b/docs/component/password.md index 752886b04..eedd951c9 100644 --- a/docs/component/password.md +++ b/docs/component/password.md @@ -1,4 +1,10 @@ -[previous](observer.md) + + +[*index](./../README.md) --- @@ -24,9 +30,3 @@ - [verify](./../../src/Psl/Password/verify.php#L14) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/pseudo-random.md b/docs/component/pseudo-random.md index f764d2c88..eae8d3aa5 100644 --- a/docs/component/pseudo-random.md +++ b/docs/component/pseudo-random.md @@ -1,4 +1,10 @@ -[previous](password.md) + + +[*index](./../README.md) --- @@ -10,9 +16,3 @@ - [int](./../../src/Psl/PseudoRandom/int.php#L17) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/psl.md b/docs/component/psl.md index 705c97e42..3356f8845 100644 --- a/docs/component/psl.md +++ b/docs/component/psl.md @@ -1,4 +1,10 @@ -[previous](./../README.md) + + +[*index](./../README.md) --- @@ -11,9 +17,3 @@ - [sequence](./../../src/Psl/sequence.php#L16) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/regex.md b/docs/component/regex.md index 9e63ef5f6..61daa6e14 100644 --- a/docs/component/regex.md +++ b/docs/component/regex.md @@ -1,4 +1,10 @@ -[previous](pseudo-random.md) + + +[*index](./../README.md) --- @@ -13,9 +19,3 @@ - [replace_every](./../../src/Psl/Regex/replace_every.php#L27) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/result.md b/docs/component/result.md index 035396925..aa4ca65bc 100644 --- a/docs/component/result.md +++ b/docs/component/result.md @@ -1,4 +1,10 @@ -[previous](regex.md) + + +[*index](./../README.md) --- @@ -18,9 +24,3 @@ - [Success](./../../src/Psl/Result/Success.php#L17) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/secure-random.md b/docs/component/secure-random.md index 2e4b53c3e..9d65ee021 100644 --- a/docs/component/secure-random.md +++ b/docs/component/secure-random.md @@ -1,4 +1,10 @@ -[previous](result.md) + + +[*index](./../README.md) --- @@ -12,9 +18,3 @@ - [string](./../../src/Psl/SecureRandom/string.php#L25) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/shell.md b/docs/component/shell.md index e727ddd3d..37334eece 100644 --- a/docs/component/shell.md +++ b/docs/component/shell.md @@ -1,4 +1,10 @@ -[previous](secure-random.md) + + +[*index](./../README.md) --- @@ -11,9 +17,3 @@ - [execute](./../../src/Psl/Shell/execute.php#L37) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/str-byte.md b/docs/component/str-byte.md index 25362edfc..c7c3cd033 100644 --- a/docs/component/str-byte.md +++ b/docs/component/str-byte.md @@ -1,4 +1,10 @@ -[previous](str.md) + + +[*index](./../README.md) --- @@ -55,9 +61,3 @@ - [before_last_ci](./../../src/Psl/Str/Byte/before_last_ci.php#L14) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/str-grapheme.md b/docs/component/str-grapheme.md index 09b4890aa..ba77a75d9 100644 --- a/docs/component/str-grapheme.md +++ b/docs/component/str-grapheme.md @@ -1,4 +1,10 @@ -[previous](str-byte.md) + + +[*index](./../README.md) --- @@ -30,9 +36,3 @@ - [before_last_ci](./../../src/Psl/Str/Grapheme/before_last_ci.php#L14) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/str.md b/docs/component/str.md index 07b324df0..8f7dcb7cf 100644 --- a/docs/component/str.md +++ b/docs/component/str.md @@ -1,4 +1,10 @@ -[previous](shell.md) + + +[*index](./../README.md) --- @@ -70,9 +76,3 @@ - [before_last_ci](./../../src/Psl/Str/before_last_ci.php#L15) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/type.md b/docs/component/type.md index 3b4a647c4..96fdc61c1 100644 --- a/docs/component/type.md +++ b/docs/component/type.md @@ -1,4 +1,10 @@ -[previous](str-grapheme.md) + + +[*index](./../README.md) --- @@ -56,9 +62,3 @@ - [Type](./../../src/Psl/Type/Type.php#L15) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/component/vec.md b/docs/component/vec.md index a60060b77..88af51e4c 100644 --- a/docs/component/vec.md +++ b/docs/component/vec.md @@ -1,4 +1,10 @@ -[previous](type.md) + + +[*index](./../README.md) --- @@ -31,9 +37,3 @@ - [zip](./../../src/Psl/Vec/zip.php#L37) - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. diff --git a/docs/documenter.php b/docs/documenter.php index 03023df20..731690bfc 100644 --- a/docs/documenter.php +++ b/docs/documenter.php @@ -67,19 +67,15 @@ function regenerate_documentation(): void $readme = Str\replace($readme_template, '{{ list }}', $components_documentation); Filesystem\write_file(__DIR__ . '/README.md', $readme); - $previous = './../README.md'; - $component = null; foreach ($components as $component) { - $previous = document_component($component, $previous); + document_component($component, './../README.md'); } } /** * Document the given component. - * - * @return string The document filename relative to docs/component/ */ -function document_component(string $component, string $previous_link): string +function document_component(string $component, string $index_link): void { $lines = []; $lines[] = Str\format('### `%s` Component', $component); @@ -132,7 +128,7 @@ function document_component(string $component, string $previous_link): string $current_filename = Str\format('%s/component/%s', __DIR__, $current_link); $documentation = Str\replace_every($template, [ - '{{ previous }}' => $previous_link, + '{{ index }}' => $index_link, '{{ api }}' => Str\join(Vec\concat( $lines, $generator($directory, $symbols, Loader::TYPE_CONSTANTS), @@ -145,8 +141,6 @@ function document_component(string $component, string $previous_link): string ]); Filesystem\write_file($current_filename, $documentation); - - return $current_link; } /** diff --git a/docs/templates/README.template.md b/docs/templates/README.template.md index ede0514fe..632ec0294 100644 --- a/docs/templates/README.template.md +++ b/docs/templates/README.template.md @@ -1,11 +1,9 @@ -# Components API - ---- + ---- +# Components API -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. +{{ list }} diff --git a/docs/templates/component.template.md b/docs/templates/component.template.md index b87419ea8..7182043ad 100644 --- a/docs/templates/component.template.md +++ b/docs/templates/component.template.md @@ -1,11 +1,11 @@ -[previous]({{ previous }}) + -{{ api }} +[*index]({{ index }}) --- -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. +{{ api }} From 5d6bfd94a652b4fe5e392e662d6a184b00c90e73 Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:32:46 +0100 Subject: [PATCH 7/8] break documentation ( testing ) --- docs/component/str.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/component/str.md b/docs/component/str.md index 8f7dcb7cf..91f9edc30 100644 --- a/docs/component/str.md +++ b/docs/component/str.md @@ -60,10 +60,6 @@ - [strip_suffix](./../../src/Psl/Str/strip_suffix.php#L17) - [to_int](./../../src/Psl/Str/to_int.php#L12) - [trim](./../../src/Psl/Str/trim.php#L18) -- [trim_left](./../../src/Psl/Str/trim_left.php#L18) -- [trim_right](./../../src/Psl/Str/trim_right.php#L18) -- [truncate](./../../src/Psl/Str/truncate.php#L29) -- [uppercase](./../../src/Psl/Str/uppercase.php#L19) - [width](./../../src/Psl/Str/width.php#L19) - [wrap](./../../src/Psl/Str/wrap.php#L23) - [after](./../../src/Psl/Str/after.php#L15) From b13674dc5104b6a77f00097c4de8e22842cd3504 Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 17 Mar 2021 05:34:30 +0100 Subject: [PATCH 8/8] update documentation --- docs/component/str.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/component/str.md b/docs/component/str.md index 91f9edc30..8f7dcb7cf 100644 --- a/docs/component/str.md +++ b/docs/component/str.md @@ -60,6 +60,10 @@ - [strip_suffix](./../../src/Psl/Str/strip_suffix.php#L17) - [to_int](./../../src/Psl/Str/to_int.php#L12) - [trim](./../../src/Psl/Str/trim.php#L18) +- [trim_left](./../../src/Psl/Str/trim_left.php#L18) +- [trim_right](./../../src/Psl/Str/trim_right.php#L18) +- [truncate](./../../src/Psl/Str/truncate.php#L29) +- [uppercase](./../../src/Psl/Str/uppercase.php#L19) - [width](./../../src/Psl/Str/width.php#L19) - [wrap](./../../src/Psl/Str/wrap.php#L23) - [after](./../../src/Psl/Str/after.php#L15)