From c61784411988d36d9bbd93cd3a97e773990af342 Mon Sep 17 00:00:00 2001 From: yehudah Date: Mon, 25 Nov 2019 08:22:35 +0000 Subject: Adding a folder --- Postman/PostmanPreRequisitesCheck.php | 87 +++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Postman/PostmanPreRequisitesCheck.php (limited to 'Postman/PostmanPreRequisitesCheck.php') diff --git a/Postman/PostmanPreRequisitesCheck.php b/Postman/PostmanPreRequisitesCheck.php new file mode 100644 index 0000000..c187a9b --- /dev/null +++ b/Postman/PostmanPreRequisitesCheck.php @@ -0,0 +1,87 @@ +x,ready=>true|false,required=true|false] + */ + public static function getState() { + $state = array (); + array_push ( $state, array ( + 'name' => 'iconv', + 'ready' => self::checkIconv (), + 'required' => true + ) ); + array_push ( $state, array ( + 'name' => 'spl_autoload', + 'ready' => self::checkSpl (), + 'required' => true + ) ); + array_push ( $state, array ( + 'name' => 'openssl', + 'ready' => self::checkOpenSsl (), + 'required' => false + ) ); + array_push ( $state, array ( + 'name' => 'sockets', + 'ready' => self::checkSockets (), + 'required' => false + ) ); + array_push ( $state, array ( + 'name' => 'allow_url_fopen', + 'ready' => self::checkAllowUrlFopen (), + 'required' => false + ) ); + array_push ( $state, array ( + 'name' => 'mcrypt', + 'ready' => self::checkMcrypt (), + 'required' => false + ) ); + array_push ( $state, array ( + 'name' => 'zlib_encode', + 'ready' => self::checkZlibEncode (), + 'required' => false + ) ); + return $state; + } + /** + * + * @return boolean + */ + public static function isReady() { + $states = self::getState (); + foreach ( $states as $state ) { + if ($state ['ready'] == false && $state ['required'] == true) { + return false; + } + } + + return true; + } + } +} \ No newline at end of file -- cgit v1.2.3