ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/www/site BKP/wp-content/plugins/otgs-installer-plugin/fp/core
/
home
mhhtmff
www
site BKP
wp-content
plugins
otgs-installer-plugin
fp
core
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
Functor
-
chmod
Open
Rename
Delete
traits
-
chmod
Open
Rename
Delete
Cast.php
497 B
chmod
View
DL
Edit
Rename
Delete
Debug.php
1.39 MB
chmod
View
DL
Edit
Rename
Delete
Either.php
5.33 MB
chmod
View
DL
Edit
Rename
Delete
Filter.php
1018 B
chmod
View
DL
Edit
Rename
Delete
Fns.php
15.22 MB
chmod
View
DL
Edit
Rename
Delete
FP.php
1.84 MB
chmod
View
DL
Edit
Rename
Delete
functions.php
6.32 MB
chmod
View
DL
Edit
Rename
Delete
Invoker.php
610 B
chmod
View
DL
Edit
Rename
Delete
Json.php
792 B
chmod
View
DL
Edit
Rename
Delete
Logic.php
5.04 MB
chmod
View
DL
Edit
Rename
Delete
Lst.php
11.38 MB
chmod
View
DL
Edit
Rename
Delete
Math.php
733 B
chmod
View
DL
Edit
Rename
Delete
Maybe.php
4.51 MB
chmod
View
DL
Edit
Rename
Delete
Obj.php
13.83 MB
chmod
View
DL
Edit
Rename
Delete
Promise.php
1.47 MB
chmod
View
DL
Edit
Rename
Delete
Relation.php
1.8 MB
chmod
View
DL
Edit
Rename
Delete
Strings.php
3.77 MB
chmod
View
DL
Edit
Rename
Delete
strings_functions.php
1.15 MB
chmod
View
DL
Edit
Rename
Delete
system.php
1.65 MB
chmod
View
DL
Edit
Rename
Delete
SystemClass.php
246 B
chmod
View
DL
Edit
Rename
Delete
Undefined.php
232 B
chmod
View
DL
Edit
Rename
Delete
Validator.php
1004 B
chmod
View
DL
Edit
Rename
Delete
Wrapper.php
941 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/www/site BKP/wp-content/plugins/otgs-installer-plugin/fp/core/functions.php
<?php namespace WPML\INSTALLER\FP; /** * Wraps the given function and returns a function that can take arguments as an array and invokes * the wrapped function with individual arguments * * @param callable $fn * * @return \Closure */ function spreadArgs( callable $fn ) { return function ( $args ) use ( $fn ) { return $fn( ...$args ); }; } /** * Wraps the given function and returns a function that can take individual arguments and invokes * the wrapped function with individual arguments gathered into an array * * @param callable $fn * * @return \Closure */ function gatherArgs( callable $fn ) { return function ( ...$args ) use ( $fn ) { return $fn( $args ); }; } /** * Returns new function which applies each given function to the result of another from right to left * compose(f, g, h)(x) is the same as f(g(h(x))) * * @param callable $f * @param callable $g * * @return callable */ function compose( callable $f, callable $g ) { $functions = func_get_args(); return function () use ( $functions ) { $args = func_get_args(); foreach ( array_reverse( $functions ) as $function ) { $args = array( call_user_func_array( $function, $args ) ); } return current( $args ); }; } /** * Returns new function which applies each given function to the result of another from left to right * pipe(f, g, h)(x) is the same as h(g(f(x))) * * @param callable $f * @param callable $g * * @return callable */ function pipe( callable $f, callable $g ) { return call_user_func_array( 'WPML\INSTALLER\FP\compose', array_reverse( func_get_args() ) ); } /** * Returns new function which will behave like $function with * predefined left arguments passed to partial * * @param callable $function * @param mixed $arg1 * * @return callable */ function partial( callable $function, $arg1 ) { $args = array_slice( func_get_args(), 1 ); return function () use ( $function, $args ) { return call_user_func_array( $function, array_merge( $args, func_get_args() ) ); }; } /** * Returns new partial function which will behave like $function with * predefined right arguments passed to partialRight * * @param callable $function * @param mixed $arg1 * * @return callable */ function partialRight( callable $function, $arg1 ) { $args = array_slice( func_get_args(), 1 ); return function () use ( $function, $args ) { return call_user_func_array( $function, array_merge( func_get_args(), $args ) ); }; } /** * @param callable $fn * * @return \Closure */ function tap( callable $fn ) { return function ( $value ) use ( $fn ) { $fn( $value ); return $value; }; } /** * @param callable $f * @param callable $g * * @return \Closure */ function either( callable $f, callable $g ) { return function ( $value ) use ( $f, $g ) { return $f( $value ) || $g( $value ); }; } /** * @param int $count * @param callable $fn * * @return \Closure */ function curryN( $count, callable $fn ) { $accumulator = function ( array $arguments ) use ( $count, $fn, &$accumulator ) { return function () use ( $count, $fn, $arguments, $accumulator ) { $oldArguments = $arguments; $arguments = array_merge( $arguments, func_get_args() ); $replacementIndex = count( $oldArguments ); for ( $i = 0; $i < $replacementIndex; $i ++ ) { if ( count( $arguments ) <= $replacementIndex ) { break; } if ( $arguments[ $i ] === Fns::__ ) { $arguments[ $i ] = $arguments[ $replacementIndex ]; unset( $arguments[ $replacementIndex ] ); $arguments = array_values( $arguments ); } } if ( ! in_array( Fns::__, $arguments, true ) && $count <= count( $arguments ) ) { return call_user_func_array( $fn, $arguments ); } return $accumulator( $arguments ); }; }; return $accumulator( [] ); } /** * @param callable $fn * @param bool $required * * @return \Closure * @throws \ReflectionException */ function curry( callable $fn, $required = true ) { if ( is_string( $fn ) && strpos( $fn, '::', 1 ) !== false ) { $reflection = new \ReflectionMethod( $fn ); } else if ( is_array( $fn ) && count( $fn ) == 2 ) { $reflection = new \ReflectionMethod( $fn[0], $fn[1] ); } else if ( is_object( $fn ) && method_exists( $fn, '__invoke' ) ) { $reflection = new \ReflectionMethod( $fn, '__invoke' ); } else { $reflection = new \ReflectionFunction( $fn ); } $count = $required ? $reflection->getNumberOfRequiredParameters() : $reflection->getNumberOfParameters(); return curryN( $count, $fn ); } /** * @param string $fnName * * @return \Closure */ function apply( $fnName ) { $args = array_slice( func_get_args(), 1 ); return function ( $container ) use ( $fnName, $args ) { return call_user_func_array( [ $container, $fnName ], $args ); }; } /** * Returns an Invoker that runs the member function. Use `with` to set the arguments * of the member function and then invoke with `()` * * eg. give Test class: * class Test { * * private $times; * * public function __construct( $times ) { * $this->times = $times; * } * * public function multiply( $x ) { * return $x * $this->times; * } * } * * $invoker = invoke( 'multiply' )->with( 10 ); * $result = $invoker( new Test( 2 ) ); // 20 * * * @param string $fnName * * @return _Invoker */ function invoke( $fnName ) { return new _Invoker( $fnName ); } /** * @param callable $fn * * @return \Closure */ function chain( callable $fn ) { return function ( $container ) use ( $fn ) { if ( method_exists( $container, 'chain' ) ) { return $container->chain( $fn ); } elseif ( method_exists( $container, 'flatMap' ) ) { return $container->flatMap( $fn ); } elseif ( method_exists( $container, 'join' ) ) { return $container->map( $fn )->join(); } else { throw new \Exception( 'chainable method not found' ); } }; } /** * @param callable $fn * * @return \Closure */ function flatMap( callable $fn ) { return chain( $fn ); } /** * @param callable $fn * * @return Either */ function tryCatch( callable $fn ) { try { return Right::of( $fn() ); } catch ( \Exception $e ) { return Either::left( $e ); } } /** * @param callable $fn * * @return \Closure */ function flip( callable $fn ) { return function () use ( $fn ) { $args = func_get_args(); if ( count( $args ) > 1 ) { $temp = $args[0]; $args[0] = $args[1]; $args[1] = $temp; } return call_user_func_array( $fn, $args ); }; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply