diff --git a/docs/README.md b/docs/README.md index dd0b2e3d9..a05023a12 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,702 +1,36 @@ -# Documentation + + +# Components API + +- [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) -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. - ---- - - -### `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) - - - ---- - -> This markdown file was generated using `docs/documenter.php`. -> -> Any edits to it will likely be lost. 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..61b207ffd --- /dev/null +++ b/docs/component/arr.md @@ -0,0 +1,61 @@ + + +[*index](./../README.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 ) + + diff --git a/docs/component/collection.md b/docs/component/collection.md new file mode 100644 index 000000000..e3b93a1b9 --- /dev/null +++ b/docs/component/collection.md @@ -0,0 +1,33 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/data-structure.md b/docs/component/data-structure.md new file mode 100644 index 000000000..193e9a3a3 --- /dev/null +++ b/docs/component/data-structure.md @@ -0,0 +1,25 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/dict.md b/docs/component/dict.md new file mode 100644 index 000000000..e95cabbd1 --- /dev/null +++ b/docs/component/dict.md @@ -0,0 +1,53 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/encoding-base64.md b/docs/component/encoding-base64.md new file mode 100644 index 000000000..e7e9c8201 --- /dev/null +++ b/docs/component/encoding-base64.md @@ -0,0 +1,18 @@ + + +[*index](./../README.md) + +--- + +### `Psl\Encoding\Base64` Component + +#### `Functions` + +- [encode](./../../src/Psl/Encoding/Base64/encode.php#L18) +- [decode](./../../src/Psl/Encoding/Base64/decode.php#L27) + + diff --git a/docs/component/encoding-hex.md b/docs/component/encoding-hex.md new file mode 100644 index 000000000..9777f2e33 --- /dev/null +++ b/docs/component/encoding-hex.md @@ -0,0 +1,18 @@ + + +[*index](./../README.md) + +--- + +### `Psl\Encoding\Hex` Component + +#### `Functions` + +- [encode](./../../src/Psl/Encoding/Hex/encode.php#L16) +- [decode](./../../src/Psl/Encoding/Hex/decode.php#L22) + + diff --git a/docs/component/env.md b/docs/component/env.md new file mode 100644 index 000000000..4eb6103af --- /dev/null +++ b/docs/component/env.md @@ -0,0 +1,27 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/filesystem.md b/docs/component/filesystem.md new file mode 100644 index 000000000..327e40cf4 --- /dev/null +++ b/docs/component/filesystem.md @@ -0,0 +1,56 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/fun.md b/docs/component/fun.md new file mode 100644 index 000000000..824896f95 --- /dev/null +++ b/docs/component/fun.md @@ -0,0 +1,21 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/hash.md b/docs/component/hash.md new file mode 100644 index 000000000..1cb9f1aec --- /dev/null +++ b/docs/component/hash.md @@ -0,0 +1,23 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/html.md b/docs/component/html.md new file mode 100644 index 000000000..2b83e3b2b --- /dev/null +++ b/docs/component/html.md @@ -0,0 +1,21 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/iter.md b/docs/component/iter.md new file mode 100644 index 000000000..e1084c43c --- /dev/null +++ b/docs/component/iter.md @@ -0,0 +1,75 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/json.md b/docs/component/json.md new file mode 100644 index 000000000..91f8043d5 --- /dev/null +++ b/docs/component/json.md @@ -0,0 +1,19 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/math.md b/docs/component/math.md new file mode 100644 index 000000000..b444a8fde --- /dev/null +++ b/docs/component/math.md @@ -0,0 +1,58 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/observer.md b/docs/component/observer.md new file mode 100644 index 000000000..af6cfa3d3 --- /dev/null +++ b/docs/component/observer.md @@ -0,0 +1,18 @@ + + +[*index](./../README.md) + +--- + +### `Psl\Observer` Component + +#### `Interfaces` + +- [SubjectInterface](./../../src/Psl/Observer/SubjectInterface.php#L7) +- [ObserverInterface](./../../src/Psl/Observer/ObserverInterface.php#L10) + + diff --git a/docs/component/password.md b/docs/component/password.md new file mode 100644 index 000000000..eedd951c9 --- /dev/null +++ b/docs/component/password.md @@ -0,0 +1,32 @@ + + +[*index](./../README.md) + +--- + +### `Psl\Password` Component + +#### `Constants` + +- [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` + +- [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) + + diff --git a/docs/component/pseudo-random.md b/docs/component/pseudo-random.md new file mode 100644 index 000000000..eae8d3aa5 --- /dev/null +++ b/docs/component/pseudo-random.md @@ -0,0 +1,18 @@ + + +[*index](./../README.md) + +--- + +### `Psl\PseudoRandom` Component + +#### `Functions` + +- [float](./../../src/Psl/PseudoRandom/float.php#L12) +- [int](./../../src/Psl/PseudoRandom/int.php#L17) + + diff --git a/docs/component/psl.md b/docs/component/psl.md new file mode 100644 index 000000000..3356f8845 --- /dev/null +++ b/docs/component/psl.md @@ -0,0 +1,19 @@ + + +[*index](./../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) + + diff --git a/docs/component/regex.md b/docs/component/regex.md new file mode 100644 index 000000000..61daa6e14 --- /dev/null +++ b/docs/component/regex.md @@ -0,0 +1,21 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/result.md b/docs/component/result.md new file mode 100644 index 000000000..aa4ca65bc --- /dev/null +++ b/docs/component/result.md @@ -0,0 +1,26 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/secure-random.md b/docs/component/secure-random.md new file mode 100644 index 000000000..9d65ee021 --- /dev/null +++ b/docs/component/secure-random.md @@ -0,0 +1,20 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/shell.md b/docs/component/shell.md new file mode 100644 index 000000000..37334eece --- /dev/null +++ b/docs/component/shell.md @@ -0,0 +1,19 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/str-byte.md b/docs/component/str-byte.md new file mode 100644 index 000000000..c7c3cd033 --- /dev/null +++ b/docs/component/str-byte.md @@ -0,0 +1,63 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/str-grapheme.md b/docs/component/str-grapheme.md new file mode 100644 index 000000000..ba77a75d9 --- /dev/null +++ b/docs/component/str-grapheme.md @@ -0,0 +1,38 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/str.md b/docs/component/str.md new file mode 100644 index 000000000..8f7dcb7cf --- /dev/null +++ b/docs/component/str.md @@ -0,0 +1,78 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/type.md b/docs/component/type.md new file mode 100644 index 000000000..96fdc61c1 --- /dev/null +++ b/docs/component/type.md @@ -0,0 +1,64 @@ + + +[*index](./../README.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) + + diff --git a/docs/component/vec.md b/docs/component/vec.md new file mode 100644 index 000000000..88af51e4c --- /dev/null +++ b/docs/component/vec.md @@ -0,0 +1,39 @@ + + +[*index](./../README.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) + + diff --git a/docs/documenter.php b/docs/documenter.php index fdb5db70a..731690bfc 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,49 @@ })(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[] = ''; - - foreach (get_all_namespaces() as $namespace) { - $lines[] = get_namespace_documentation($namespace); + $components_documentation = ''; + $components = get_all_components(); + foreach ($components as $component) { + $components_documentation .= Str\format('- [%s](./component/%s.md)%s', $component, to_filename($component), "\n"); } - return Str\join($lines, "\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 ($components as $component) { + document_component($component, './../README.md'); + } } /** - * Return documentation for the given namespace. + * Document the given component. */ -function get_namespace_documentation(string $namespace): string +function document_component(string $component, string $index_link): void { $lines = []; - $lines[] = Str\format('### `%s`', $namespace); + $lines[] = Str\format('### `%s` Component', $component); $lines[] = ''; /** @@ -122,7 +111,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 +120,48 @@ 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'); + $current_link = Str\format('%s.md', to_filename($component)); + $current_filename = Str\format('%s/component/%s', __DIR__, $current_link); + + $documentation = Str\replace_every($template, [ + '{{ index }}' => $index_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 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 +177,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 +208,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 +248,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..632ec0294 --- /dev/null +++ b/docs/templates/README.template.md @@ -0,0 +1,9 @@ + + +# Components API + +{{ list }} diff --git a/docs/templates/component.template.md b/docs/templates/component.template.md new file mode 100644 index 000000000..7182043ad --- /dev/null +++ b/docs/templates/component.template.md @@ -0,0 +1,11 @@ + + +[*index]({{ index }}) + +--- + +{{ api }} 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', ];