diff options
Diffstat (limited to 'vendor')
411 files changed, 77318 insertions, 1042 deletions
diff --git a/vendor/OTPHP/Base32.php b/vendor/OTPHP/Base32.php deleted file mode 100644 index f0dc2f16b..000000000 --- a/vendor/OTPHP/Base32.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -namespace OTPHP; - -/** - * Encode in Base32 based on RFC 4648. - * Requires 20% more space than base64 - * Great for case-insensitive filesystems like Windows and URL's (except for = char which can be excluded using the pad option for urls) - * - * @package default - * @author Bryan Ruiz - **/ -class Base32 { - - private static $map = array( - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7 - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15 - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23 - 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31 - '=' // padding char - ); - - private static $flippedMap = array( - 'A'=>'0', 'B'=>'1', 'C'=>'2', 'D'=>'3', 'E'=>'4', 'F'=>'5', 'G'=>'6', 'H'=>'7', - 'I'=>'8', 'J'=>'9', 'K'=>'10', 'L'=>'11', 'M'=>'12', 'N'=>'13', 'O'=>'14', 'P'=>'15', - 'Q'=>'16', 'R'=>'17', 'S'=>'18', 'T'=>'19', 'U'=>'20', 'V'=>'21', 'W'=>'22', 'X'=>'23', - 'Y'=>'24', 'Z'=>'25', '2'=>'26', '3'=>'27', '4'=>'28', '5'=>'29', '6'=>'30', '7'=>'31' - ); - - /** - * Use padding false when encoding for urls - * - * @return base32 encoded string - * @author Bryan Ruiz - **/ - public static function encode($input, $padding = true) { - if(empty($input)) return ""; - $input = str_split($input); - $binaryString = ""; - for($i = 0; $i < count($input); $i++) { - $binaryString .= str_pad(base_convert(ord($input[$i]), 10, 2), 8, '0', STR_PAD_LEFT); - } - $fiveBitBinaryArray = str_split($binaryString, 5); - $base32 = ""; - $i=0; - while($i < count($fiveBitBinaryArray)) { - $base32 .= self::$map[base_convert(str_pad($fiveBitBinaryArray[$i], 5,'0'), 2, 10)]; - $i++; - } - if($padding && ($x = strlen($binaryString) % 40) != 0) { - if($x == 8) $base32 .= str_repeat(self::$map[32], 6); - else if($x == 16) $base32 .= str_repeat(self::$map[32], 4); - else if($x == 24) $base32 .= str_repeat(self::$map[32], 3); - else if($x == 32) $base32 .= self::$map[32]; - } - return $base32; - } - - public static function decode($input) { - if(empty($input)) return; - $paddingCharCount = substr_count($input, self::$map[32]); - $allowedValues = array(6,4,3,1,0); - if(!in_array($paddingCharCount, $allowedValues)) return false; - for($i=0; $i<4; $i++){ - if($paddingCharCount == $allowedValues[$i] && - substr($input, -($allowedValues[$i])) != str_repeat(self::$map[32], $allowedValues[$i])) return false; - } - $input = str_replace('=','', $input); - $input = str_split($input); - $binaryString = ""; - for($i=0; $i < count($input); $i = $i+8) { - $x = ""; - if(!in_array($input[$i], self::$map)) return false; - for($j=0; $j < 8; $j++) { - $x .= str_pad(base_convert(@self::$flippedMap[@$input[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT); - } - $eightBits = str_split($x, 8); - for($z = 0; $z < count($eightBits); $z++) { - $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y:""; - } - } - return $binaryString; - } -} - diff --git a/vendor/OTPHP/HOTP.php b/vendor/OTPHP/HOTP.php deleted file mode 100644 index 7092fd9ff..000000000 --- a/vendor/OTPHP/HOTP.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/* - * Copyright (c) 2011 Le Lag - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace OTPHP { - /** - * HOTP - One time password generator - * - * The HOTP class allow for the generation - * and verification of one-time password using - * the HOTP specified algorithm. - * - * This class is meant to be compatible with - * Google Authenticator - * - * This class was originally ported from the rotp - * ruby library available at https://github.com/mdp/rotp - */ - class HOTP extends OTP { - /** - * Get the password for a specific counter value - * @param integer $count the counter which is used to - * seed the hmac hash function. - * @return integer the One Time Password - */ - public function at($count) { - return $this->generateOTP($count); - } - - - /** - * Verify if a password is valid for a specific counter value - * - * @param integer $otp the one-time password - * @param integer $counter the counter value - * @return bool true if the counter is valid, false otherwise - */ - public function verify($otp, $counter) { - return ($otp == $this->at($counter)); - } - - /** - * Returns the uri for a specific secret for hotp method. - * Can be encoded as a image for simple configuration in - * Google Authenticator. - * - * @param string $name the name of the account / profile - * @param integer $initial_count the initial counter - * @return string the uri for the hmac secret - */ - public function provisioning_uri($name, $initial_count) { - return "otpauth://hotp/".urlencode($name)."?secret={$this->secret}&counter=$initial_count"; - } - } - -} diff --git a/vendor/OTPHP/OTP.php b/vendor/OTPHP/OTP.php deleted file mode 100644 index d1995ef99..000000000 --- a/vendor/OTPHP/OTP.php +++ /dev/null @@ -1,120 +0,0 @@ -<?php -/* - * Copyright (c) 2011 Le Lag - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace OTPHP { -/** - * One Time Password Generator - * - * The OTP class allow the generation of one-time - * password that is described in rfc 4xxx. - * - * This is class is meant to be compatible with - * Google Authenticator. - * - * This class was originally ported from the rotp - * ruby library available at https://github.com/mdp/rotp - */ -class OTP { - /** - * The base32 encoded secret key - * @var string - */ - public $secret; - - /** - * The algorithm used for the hmac hash function - * @var string - */ - public $digest; - - /** - * The number of digits in the one-time password - * @var integer - */ - public $digits; - - /** - * Constructor for the OTP class - * @param string $secret the secret key - * @param array $opt options array can contain the - * following keys : - * @param integer digits : the number of digits in the one time password - * Currently Google Authenticator only support 6. Defaults to 6. - * @param string digest : the algorithm used for the hmac hash function - * Google Authenticator only support sha1. Defaults to sha1 - * - * @return new OTP class. - */ - public function __construct($secret, $opt = Array()) { - $this->digits = isset($opt['digits']) ? $opt['digits'] : 6; - $this->digest = isset($opt['digest']) ? $opt['digest'] : 'sha1'; - $this->secret = $secret; - } - - /** - * Generate a one-time password - * - * @param integer $input : number used to seed the hmac hash function. - * This number is usually a counter (HOTP) or calculated based on the current - * timestamp (see TOTP class). - * @return integer the one-time password - */ - public function generateOTP($input) { - $hash = hash_hmac($this->digest, $this->intToBytestring($input), $this->byteSecret()); - foreach(str_split($hash, 2) as $hex) { // stupid PHP has bin2hex but no hex2bin WTF - $hmac[] = hexdec($hex); - } - $offset = $hmac[19] & 0xf; - $code = ($hmac[$offset+0] & 0x7F) << 24 | - ($hmac[$offset + 1] & 0xFF) << 16 | - ($hmac[$offset + 2] & 0xFF) << 8 | - ($hmac[$offset + 3] & 0xFF); - return $code % pow(10, $this->digits); - } - - /** - * Returns the binary value of the base32 encoded secret - * @access private - * This method should be private but was left public for - * phpunit tests to work. - * @return binary secret key - */ - public function byteSecret() { - return Base32::decode($this->secret); - } - - /** - * Turns an integer in a OATH bytestring - * @param integer $int - * @access private - * @return string bytestring - */ - public function intToBytestring($int) { - $result = Array(); - while($int != 0) { - $result[] = chr($int & 0xFF); - $int >>= 8; - } - return str_pad(join(array_reverse($result)), 8, "\000", STR_PAD_LEFT); - } - } -} diff --git a/vendor/OTPHP/OTPHP.php b/vendor/OTPHP/OTPHP.php deleted file mode 100644 index a6c6f8d66..000000000 --- a/vendor/OTPHP/OTPHP.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/* - * Copyright (c) 2011 Le Lag - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -require_once dirname(__FILE__).'/../vendor/libs.php'; -require_once dirname(__FILE__).'/otp.php'; -require_once dirname(__FILE__).'/hotp.php'; -require_once dirname(__FILE__).'/totp.php'; - diff --git a/vendor/OTPHP/TOTP.php b/vendor/OTPHP/TOTP.php deleted file mode 100644 index 10a1f42f3..000000000 --- a/vendor/OTPHP/TOTP.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -/* - * Copyright (c) 2011 Le Lag - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace OTPHP { - /** - * TOTP - One time password generator - * - * The TOTP class allow for the generation - * and verification of one-time password using - * the TOTP specified algorithm. - * - * This class is meant to be compatible with - * Google Authenticator - * - * This class was originally ported from the rotp - * ruby library available at https://github.com/mdp/rotp - */ - class TOTP extends OTP { - /** - * The interval in seconds for a one-time password timeframe - * Defaults to 30 - * @var integer - */ - public $interval; - - public function __construct($s, $opt = Array()) { - $this->interval = isset($opt['interval']) ? $opt['interval'] : 30; - parent::__construct($s, $opt); - } - - /** - * Get the password for a specific timestamp value - * - * @param integer $timestamp the timestamp which is timecoded and - * used to seed the hmac hash function. - * @return integer the One Time Password - */ - public function at($timestamp) { - return $this->generateOTP($this->timecode($timestamp)); - } - - /** - * Get the password for the current timestamp value - * - * @return integer the current One Time Password - */ - public function now() { - return $this->generateOTP($this->timecode(time())); - } - - /** - * Verify if a password is valid for a specific counter value - * - * @param integer $otp the one-time password - * @param integer $timestamp the timestamp for the a given time, defaults to current time. - * @return bool true if the counter is valid, false otherwise - */ - public function verify($otp, $timestamp = null) { - if($timestamp === null) - $timestamp = time(); - return ($otp == $this->at($timestamp)); - } - - /** - * Returns the uri for a specific secret for totp method. - * Can be encoded as a image for simple configuration in - * Google Authenticator. - * - * @param string $name the name of the account / profile - * @return string the uri for the hmac secret - */ - public function provisioning_uri($name) { - return "otpauth://totp/".urlencode($name)."?secret={$this->secret}"; - } - - /** - * Transform a timestamp in a counter based on specified internal - * - * @param integer $timestamp - * @return integer the timecode - */ - protected function timecode($timestamp) { - return (int)( (((int)$timestamp * 1000) / ($this->interval * 1000))); - } - } - -} diff --git a/vendor/Psr/Log/AbstractLogger.php b/vendor/Psr/Log/AbstractLogger.php deleted file mode 100644 index 90e721af2..000000000 --- a/vendor/Psr/Log/AbstractLogger.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * This is a simple Logger implementation that other Loggers can inherit from. - * - * It simply delegates all log-level-specific methods to the `log` method to - * reduce boilerplate code that a simple Logger that does the same thing with - * messages regardless of the error level has to implement. - */ -abstract class AbstractLogger implements LoggerInterface -{ - /** - * System is unusable. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function emergency($message, array $context = array()) - { - $this->log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } -} diff --git a/vendor/Psr/Log/InvalidArgumentException.php b/vendor/Psr/Log/InvalidArgumentException.php deleted file mode 100644 index 67f852d1d..000000000 --- a/vendor/Psr/Log/InvalidArgumentException.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Psr\Log; - -class InvalidArgumentException extends \InvalidArgumentException -{ -} diff --git a/vendor/Psr/Log/LogLevel.php b/vendor/Psr/Log/LogLevel.php deleted file mode 100644 index 9cebcace6..000000000 --- a/vendor/Psr/Log/LogLevel.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Describes log levels. - */ -class LogLevel -{ - const EMERGENCY = 'emergency'; - const ALERT = 'alert'; - const CRITICAL = 'critical'; - const ERROR = 'error'; - const WARNING = 'warning'; - const NOTICE = 'notice'; - const INFO = 'info'; - const DEBUG = 'debug'; -} diff --git a/vendor/Psr/Log/LoggerAwareInterface.php b/vendor/Psr/Log/LoggerAwareInterface.php deleted file mode 100644 index 4d64f4786..000000000 --- a/vendor/Psr/Log/LoggerAwareInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Describes a logger-aware instance. - */ -interface LoggerAwareInterface -{ - /** - * Sets a logger instance on the object. - * - * @param LoggerInterface $logger - * - * @return void - */ - public function setLogger(LoggerInterface $logger); -} diff --git a/vendor/Psr/Log/LoggerAwareTrait.php b/vendor/Psr/Log/LoggerAwareTrait.php deleted file mode 100644 index 639f79bda..000000000 --- a/vendor/Psr/Log/LoggerAwareTrait.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Basic Implementation of LoggerAwareInterface. - */ -trait LoggerAwareTrait -{ - /** - * The logger instance. - * - * @var LoggerInterface - */ - protected $logger; - - /** - * Sets a logger. - * - * @param LoggerInterface $logger - */ - public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - } -} diff --git a/vendor/Psr/Log/LoggerInterface.php b/vendor/Psr/Log/LoggerInterface.php deleted file mode 100644 index 5ea72438b..000000000 --- a/vendor/Psr/Log/LoggerInterface.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Describes a logger instance. - * - * The message MUST be a string or object implementing __toString(). - * - * The message MAY contain placeholders in the form: {foo} where foo - * will be replaced by the context data in key "foo". - * - * The context array can contain arbitrary data. The only assumption that - * can be made by implementors is that if an Exception instance is given - * to produce a stack trace, it MUST be in a key named "exception". - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md - * for the full interface specification. - */ -interface LoggerInterface -{ - /** - * System is unusable. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function emergency($message, array $context = array()); - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()); - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()); - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()); - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()); - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()); - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()); - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()); - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - */ - public function log($level, $message, array $context = array()); -} diff --git a/vendor/Psr/Log/LoggerTrait.php b/vendor/Psr/Log/LoggerTrait.php deleted file mode 100644 index 867225df1..000000000 --- a/vendor/Psr/Log/LoggerTrait.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * This is a simple Logger trait that classes unable to extend AbstractLogger - * (because they extend another class, etc) can include. - * - * It simply delegates all log-level-specific methods to the `log` method to - * reduce boilerplate code that a simple Logger that does the same thing with - * messages regardless of the error level has to implement. - */ -trait LoggerTrait -{ - /** - * System is unusable. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function emergency($message, array $context = array()) - { - $this->log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - */ - abstract public function log($level, $message, array $context = array()); -} diff --git a/vendor/Psr/Log/NullLogger.php b/vendor/Psr/Log/NullLogger.php deleted file mode 100644 index d8cd682c8..000000000 --- a/vendor/Psr/Log/NullLogger.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * This Logger can be used to avoid conditional log calls. - * - * Logging should always be optional, and if no logger is provided to your - * library creating a NullLogger instance to have something to throw logs at - * is a good way to avoid littering your code with `if ($this->logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - */ - public function log($level, $message, array $context = array()) - { - // noop - } -} diff --git a/vendor/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/Psr/Log/Test/LoggerInterfaceTest.php deleted file mode 100644 index a0391a52b..000000000 --- a/vendor/Psr/Log/Test/LoggerInterfaceTest.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php - -namespace Psr\Log\Test; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; - -/** - * Provides a base test class for ensuring compliance with the LoggerInterface. - * - * Implementors can extend the class and implement abstract methods to run this - * as part of their test suite. - */ -abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @return LoggerInterface - */ - abstract public function getLogger(); - - /** - * This must return the log messages in order. - * - * The simple formatting of the messages is: "<LOG LEVEL> <MESSAGE>". - * - * Example ->error('Foo') would yield "error Foo". - * - * @return string[] - */ - abstract public function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); - } else { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - - $expected = array('warning DUMMY'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextCanContainAnything() - { - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - ); - - $this->getLogger()->warning('Crazy context data', $context); - - $expected = array('warning Crazy context data'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - - $expected = array( - 'warning Random message', - 'critical Uncaught Exception!' - ); - $this->assertEquals($expected, $this->getLogs()); - } -} - -class DummyTest -{ - public function __toString() - { - } -} diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 000000000..e6e3ad736 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ +<?php + +// autoload.php @generated by Composer + +require_once __DIR__ . '/composer/autoload_real.php'; + +return ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056::getLoader(); diff --git a/vendor/beberlei/assert/LICENSE b/vendor/beberlei/assert/LICENSE new file mode 100644 index 000000000..43672e7e6 --- /dev/null +++ b/vendor/beberlei/assert/LICENSE @@ -0,0 +1,11 @@ +Copyright (c) 2011-2013, Benjamin Eberlei +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. diff --git a/vendor/beberlei/assert/composer.json b/vendor/beberlei/assert/composer.json new file mode 100644 index 000000000..e11870470 --- /dev/null +++ b/vendor/beberlei/assert/composer.json @@ -0,0 +1,63 @@ +{ + "name": "beberlei/assert", + "description": "Thin assertion library for input validation in business models.", + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "[email protected]", + "role": "Lead Developer" + }, + { + "name": "Richard Quadling", + "email": "[email protected]", + "role": "Collaborator" + } + ], + "license": "BSD-2-Clause", + "keywords": [ + "assert", + "assertion", + "validation" + ], + "autoload": { + "psr-4": { + "Assert\\": "lib/Assert" + }, + "files": [ + "lib/Assert/functions.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Assert\\Tests\\": "tests/Assert/Tests" + }, + "files": [ + "tests/Assert/Tests/Fixtures/functions.php" + ] + }, + "config": { + "sort-packages": true + }, + "require": { + "php": "^7", + "ext-simplexml": "*", + "ext-mbstring": "*", + "ext-ctype": "*", + "ext-json": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "*", + "phpstan/phpstan-shim": "*", + "phpunit/phpunit": ">=6.0.0 <8" + }, + "scripts": { + "assert:generate-docs": "php bin/generate_method_docs.php", + "assert:cs-lint": "php-cs-fixer fix --diff -vvv --dry-run", + "assert:cs-fix": "php-cs-fixer fix . -vvv || true", + "assert:sa-code": "vendor/bin/phpstan analyse --configuration=phpstan-code.neon --no-progress --ansi -l 7 bin lib", + "assert:sa-tests": "vendor/bin/phpstan analyse --configuration=phpstan-tests.neon --no-progress --ansi -l 7 tests" + }, + "suggest": { + "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles" + } +} diff --git a/vendor/beberlei/assert/lib/Assert/Assert.php b/vendor/beberlei/assert/lib/Assert/Assert.php new file mode 100644 index 000000000..6910258d6 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/Assert.php @@ -0,0 +1,96 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +/** + * AssertionChain factory. + */ +abstract class Assert +{ + /** @var string */ + protected static $lazyAssertionExceptionClass = LazyAssertionException::class; + + /** @var string */ + protected static $assertionClass = Assertion::class; + + /** + * Start validation on a value, returns {@link AssertionChain}. + * + * The invocation of this method starts an assertion chain + * that is happening on the passed value. + * + * @param mixed $value + * @param string|callable|null $defaultMessage + * @param string|null $defaultPropertyPath + * + * @return AssertionChain + * + * @example + * + * Assert::that($value)->notEmpty()->integer(); + * Assert::that($value)->nullOr()->string()->startsWith("Foo"); + * + * The assertion chain can be stateful, that means be careful when you reuse + * it. You should never pass around the chain. + */ + public static function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain + { + $assertionChain = new AssertionChain($value, $defaultMessage, $defaultPropertyPath); + + return $assertionChain->setAssertionClassName(static::$assertionClass); + } + + /** + * Start validation on a set of values, returns {@link AssertionChain}. + * + * @param mixed $values + * @param string|callable|null $defaultMessage + * @param string|null $defaultPropertyPath + * + * @return AssertionChain + */ + public static function thatAll($values, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain + { + return static::that($values, $defaultMessage, $defaultPropertyPath)->all(); + } + + /** + * Start validation and allow NULL, returns {@link AssertionChain}. + * + * @param mixed $value + * @param string|callable|null $defaultMessage + * @param string|null $defaultPropertyPath + * + * @return AssertionChain + */ + public static function thatNullOr($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain + { + return static::that($value, $defaultMessage, $defaultPropertyPath)->nullOr(); + } + + /** + * Create a lazy assertion object. + * + * @return LazyAssertion + */ + public static function lazy(): LazyAssertion + { + $lazyAssertion = new LazyAssertion(); + + return $lazyAssertion + ->setAssertClass(\get_called_class()) + ->setExceptionClass(static::$lazyAssertionExceptionClass); + } +} diff --git a/vendor/beberlei/assert/lib/Assert/Assertion.php b/vendor/beberlei/assert/lib/Assert/Assertion.php new file mode 100644 index 000000000..a8b04e529 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/Assertion.php @@ -0,0 +1,2825 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +use ArrayAccess; +use BadMethodCallException; +use Countable; +use DateTime; +use ReflectionClass; +use ReflectionException; +use ResourceBundle; +use SimpleXMLElement; +use Throwable; +use Traversable; + +/** + * Assert library. + * + * @author Benjamin Eberlei <[email protected]> + * + * @method static bool allAlnum(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric for all values. + * @method static bool allBase64(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined for all values. + * @method static bool allBetween(mixed[] $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit for all values. + * @method static bool allBetweenExclusive(mixed[] $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit for all values. + * @method static bool allBetweenLength(mixed[] $value, int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths for all values. + * @method static bool allBoolean(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is php boolean for all values. + * @method static bool allChoice(mixed[] $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices for all values. + * @method static bool allChoicesNotEmpty(array[] $values, array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content for all values. + * @method static bool allClassExists(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the class exists for all values. + * @method static bool allContains(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars for all values. + * @method static bool allCount(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count for all values. + * @method static bool allDate(string[] $value, string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format for all values. + * @method static bool allDefined(mixed[] $constant, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined for all values. + * @method static bool allDigit(mixed[] $value, string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit for all values. + * @method static bool allDirectory(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that a directory exists for all values. + * @method static bool allE164(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number for all values. + * @method static bool allEmail(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL) for all values. + * @method static bool allEndsWith(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars for all values. + * @method static bool allEq(mixed[] $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==) for all values. + * @method static bool allEqArraySubset(mixed[] $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset for all values. + * @method static bool allExtensionLoaded(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded for all values. + * @method static bool allExtensionVersion(string[] $extension, string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed for all values. + * @method static bool allFalse(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False for all values. + * @method static bool allFile(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that a file exists for all values. + * @method static bool allFloat(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php float for all values. + * @method static bool allGreaterOrEqualThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit for all values. + * @method static bool allGreaterThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit for all values. + * @method static bool allImplementsInterface(mixed[] $class, string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface for all values. + * @method static bool allInArray(mixed[] $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice() for all values. + * @method static bool allInteger(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer for all values. + * @method static bool allIntegerish(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish for all values. + * @method static bool allInterfaceExists(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the interface exists for all values. + * @method static bool allIp(string[] $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address for all values. + * @method static bool allIpv4(string[] $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address for all values. + * @method static bool allIpv6(string[] $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address for all values. + * @method static bool allIsArray(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array for all values. + * @method static bool allIsArrayAccessible(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object for all values. + * @method static bool allIsCallable(mixed[] $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable for all values. + * @method static bool allIsCountable(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is countable for all values. + * @method static bool allIsInstanceOf(mixed[] $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name for all values. + * @method static bool allIsJsonString(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string for all values. + * @method static bool allIsObject(mixed[] $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object for all values. + * @method static bool allIsResource(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a resource for all values. + * @method static bool allIsTraversable(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object for all values. + * @method static bool allKeyExists(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array for all values. + * @method static bool allKeyIsset(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset() for all values. + * @method static bool allKeyNotExists(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array for all values. + * @method static bool allLength(mixed[] $value, int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length for all values. + * @method static bool allLessOrEqualThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit for all values. + * @method static bool allLessThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit for all values. + * @method static bool allMax(mixed[] $value, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit for all values. + * @method static bool allMaxCount(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements for all values. + * @method static bool allMaxLength(mixed[] $value, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars for all values. + * @method static bool allMethodExists(string[] $value, mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object for all values. + * @method static bool allMin(mixed[] $value, mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit for all values. + * @method static bool allMinCount(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements for all values. + * @method static bool allMinLength(mixed[] $value, int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long for all values. + * @method static bool allNoContent(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty for all values. + * @method static bool allNotBlank(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is not blank for all values. + * @method static bool allNotContains(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars for all values. + * @method static bool allNotEmpty(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is not empty for all values. + * @method static bool allNotEmptyKey(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty for all values. + * @method static bool allNotEq(mixed[] $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==) for all values. + * @method static bool allNotInArray(mixed[] $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices for all values. + * @method static bool allNotIsInstanceOf(mixed[] $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name for all values. + * @method static bool allNotNull(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is not null for all values. + * @method static bool allNotRegex(mixed[] $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex for all values. + * @method static bool allNotSame(mixed[] $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===) for all values. + * @method static bool allNull(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is null for all values. + * @method static bool allNumeric(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is numeric for all values. + * @method static bool allObjectOrClass(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists for all values. + * @method static bool allPhpVersion(string[] $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version for all values. + * @method static bool allPropertiesExist(mixed[] $value, array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist for all values. + * @method static bool allPropertyExists(mixed[] $value, string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists for all values. + * @method static bool allRange(mixed[] $value, mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers for all values. + * @method static bool allReadable(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something readable for all values. + * @method static bool allRegex(mixed[] $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex for all values. + * @method static bool allSame(mixed[] $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===) for all values. + * @method static bool allSatisfy(mixed[] $value, callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback for all values. + * @method static bool allScalar(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar for all values. + * @method static bool allStartsWith(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars for all values. + * @method static bool allString(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a string for all values. + * @method static bool allSubclassOf(mixed[] $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name for all values. + * @method static bool allTrue(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True for all values. + * @method static bool allUrl(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an URL for all values. + * @method static bool allUuid(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID for all values. + * @method static bool allVersion(string[] $version1, string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions for all values. + * @method static bool allWriteable(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable for all values. + * @method static bool nullOrAlnum(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric or that the value is null. + * @method static bool nullOrBase64(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined or that the value is null. + * @method static bool nullOrBetween(mixed|null $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit or that the value is null. + * @method static bool nullOrBetweenExclusive(mixed|null $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit or that the value is null. + * @method static bool nullOrBetweenLength(mixed|null $value, int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths or that the value is null. + * @method static bool nullOrBoolean(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is php boolean or that the value is null. + * @method static bool nullOrChoice(mixed|null $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices or that the value is null. + * @method static bool nullOrChoicesNotEmpty(array|null $values, array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content or that the value is null. + * @method static bool nullOrClassExists(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the class exists or that the value is null. + * @method static bool nullOrContains(mixed|null $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars or that the value is null. + * @method static bool nullOrCount(array|Countable|ResourceBundle|SimpleXMLElement|null $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count or that the value is null. + * @method static bool nullOrDate(string|null $value, string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format or that the value is null. + * @method static bool nullOrDefined(mixed|null $constant, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined or that the value is null. + * @method static bool nullOrDigit(mixed|null $value, string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit or that the value is null. + * @method static bool nullOrDirectory(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that a directory exists or that the value is null. + * @method static bool nullOrE164(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number or that the value is null. + * @method static bool nullOrEmail(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL) or that the value is null. + * @method static bool nullOrEndsWith(mixed|null $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars or that the value is null. + * @method static bool nullOrEq(mixed|null $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==) or that the value is null. + * @method static bool nullOrEqArraySubset(mixed|null $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset or that the value is null. + * @method static bool nullOrExtensionLoaded(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded or that the value is null. + * @method static bool nullOrExtensionVersion(string|null $extension, string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed or that the value is null. + * @method static bool nullOrFalse(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False or that the value is null. + * @method static bool nullOrFile(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that a file exists or that the value is null. + * @method static bool nullOrFloat(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php float or that the value is null. + * @method static bool nullOrGreaterOrEqualThan(mixed|null $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit or that the value is null. + * @method static bool nullOrGreaterThan(mixed|null $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit or that the value is null. + * @method static bool nullOrImplementsInterface(mixed|null $class, string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface or that the value is null. + * @method static bool nullOrInArray(mixed|null $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice() or that the value is null. + * @method static bool nullOrInteger(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer or that the value is null. + * @method static bool nullOrIntegerish(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish or that the value is null. + * @method static bool nullOrInterfaceExists(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the interface exists or that the value is null. + * @method static bool nullOrIp(string|null $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address or that the value is null. + * @method static bool nullOrIpv4(string|null $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address or that the value is null. + * @method static bool nullOrIpv6(string|null $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address or that the value is null. + * @method static bool nullOrIsArray(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or that the value is null. + * @method static bool nullOrIsArrayAccessible(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object or that the value is null. + * @method static bool nullOrIsCallable(mixed|null $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable or that the value is null. + * @method static bool nullOrIsCountable(array|Countable|ResourceBundle|SimpleXMLElement|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is countable or that the value is null. + * @method static bool nullOrIsInstanceOf(mixed|null $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name or that the value is null. + * @method static bool nullOrIsJsonString(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string or that the value is null. + * @method static bool nullOrIsObject(mixed|null $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object or that the value is null. + * @method static bool nullOrIsResource(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a resource or that the value is null. + * @method static bool nullOrIsTraversable(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object or that the value is null. + * @method static bool nullOrKeyExists(mixed|null $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array or that the value is null. + * @method static bool nullOrKeyIsset(mixed|null $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset() or that the value is null. + * @method static bool nullOrKeyNotExists(mixed|null $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array or that the value is null. + * @method static bool nullOrLength(mixed|null $value, int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length or that the value is null. + * @method static bool nullOrLessOrEqualThan(mixed|null $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit or that the value is null. + * @method static bool nullOrLessThan(mixed|null $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit or that the value is null. + * @method static bool nullOrMax(mixed|null $value, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit or that the value is null. + * @method static bool nullOrMaxCount(array|Countable|ResourceBundle|SimpleXMLElement|null $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements or that the value is null. + * @method static bool nullOrMaxLength(mixed|null $value, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars or that the value is null. + * @method static bool nullOrMethodExists(string|null $value, mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object or that the value is null. + * @method static bool nullOrMin(mixed|null $value, mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit or that the value is null. + * @method static bool nullOrMinCount(array|Countable|ResourceBundle|SimpleXMLElement|null $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements or that the value is null. + * @method static bool nullOrMinLength(mixed|null $value, int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long or that the value is null. + * @method static bool nullOrNoContent(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty or that the value is null. + * @method static bool nullOrNotBlank(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is not blank or that the value is null. + * @method static bool nullOrNotContains(mixed|null $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars or that the value is null. + * @method static bool nullOrNotEmpty(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is not empty or that the value is null. + * @method static bool nullOrNotEmptyKey(mixed|null $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty or that the value is null. + * @method static bool nullOrNotEq(mixed|null $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==) or that the value is null. + * @method static bool nullOrNotInArray(mixed|null $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices or that the value is null. + * @method static bool nullOrNotIsInstanceOf(mixed|null $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name or that the value is null. + * @method static bool nullOrNotNull(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is not null or that the value is null. + * @method static bool nullOrNotRegex(mixed|null $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex or that the value is null. + * @method static bool nullOrNotSame(mixed|null $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===) or that the value is null. + * @method static bool nullOrNull(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is null or that the value is null. + * @method static bool nullOrNumeric(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is numeric or that the value is null. + * @method static bool nullOrObjectOrClass(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists or that the value is null. + * @method static bool nullOrPhpVersion(string|null $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version or that the value is null. + * @method static bool nullOrPropertiesExist(mixed|null $value, array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist or that the value is null. + * @method static bool nullOrPropertyExists(mixed|null $value, string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists or that the value is null. + * @method static bool nullOrRange(mixed|null $value, mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers or that the value is null. + * @method static bool nullOrReadable(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something readable or that the value is null. + * @method static bool nullOrRegex(mixed|null $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex or that the value is null. + * @method static bool nullOrSame(mixed|null $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===) or that the value is null. + * @method static bool nullOrSatisfy(mixed|null $value, callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback or that the value is null. + * @method static bool nullOrScalar(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar or that the value is null. + * @method static bool nullOrStartsWith(mixed|null $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars or that the value is null. + * @method static bool nullOrString(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a string or that the value is null. + * @method static bool nullOrSubclassOf(mixed|null $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name or that the value is null. + * @method static bool nullOrTrue(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True or that the value is null. + * @method static bool nullOrUrl(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an URL or that the value is null. + * @method static bool nullOrUuid(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID or that the value is null. + * @method static bool nullOrVersion(string|null $version1, string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions or that the value is null. + * @method static bool nullOrWriteable(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable or that the value is null. + */ +class Assertion +{ + const INVALID_FLOAT = 9; + const INVALID_INTEGER = 10; + const INVALID_DIGIT = 11; + const INVALID_INTEGERISH = 12; + const INVALID_BOOLEAN = 13; + const VALUE_EMPTY = 14; + const VALUE_NULL = 15; + const VALUE_NOT_NULL = 25; + const INVALID_STRING = 16; + const INVALID_REGEX = 17; + const INVALID_MIN_LENGTH = 18; + const INVALID_MAX_LENGTH = 19; + const INVALID_STRING_START = 20; + const INVALID_STRING_CONTAINS = 21; + const INVALID_CHOICE = 22; + const INVALID_NUMERIC = 23; + const INVALID_ARRAY = 24; + const INVALID_KEY_EXISTS = 26; + const INVALID_NOT_BLANK = 27; + const INVALID_INSTANCE_OF = 28; + const INVALID_SUBCLASS_OF = 29; + const INVALID_RANGE = 30; + const INVALID_ALNUM = 31; + const INVALID_TRUE = 32; + const INVALID_EQ = 33; + const INVALID_SAME = 34; + const INVALID_MIN = 35; + const INVALID_MAX = 36; + const INVALID_LENGTH = 37; + const INVALID_FALSE = 38; + const INVALID_STRING_END = 39; + const INVALID_UUID = 40; + const INVALID_COUNT = 41; + const INVALID_NOT_EQ = 42; + const INVALID_NOT_SAME = 43; + const INVALID_TRAVERSABLE = 44; + const INVALID_ARRAY_ACCESSIBLE = 45; + const INVALID_KEY_ISSET = 46; + const INVALID_VALUE_IN_ARRAY = 47; + const INVALID_E164 = 48; + const INVALID_BASE64 = 49; + const INVALID_NOT_REGEX = 50; + const INVALID_DIRECTORY = 101; + const INVALID_FILE = 102; + const INVALID_READABLE = 103; + const INVALID_WRITEABLE = 104; + const INVALID_CLASS = 105; + const INVALID_INTERFACE = 106; + const INVALID_FILE_NOT_EXISTS = 107; + const INVALID_EMAIL = 201; + const INTERFACE_NOT_IMPLEMENTED = 202; + const INVALID_URL = 203; + const INVALID_NOT_INSTANCE_OF = 204; + const VALUE_NOT_EMPTY = 205; + const INVALID_JSON_STRING = 206; + const INVALID_OBJECT = 207; + const INVALID_METHOD = 208; + const INVALID_SCALAR = 209; + const INVALID_LESS = 210; + const INVALID_LESS_OR_EQUAL = 211; + const INVALID_GREATER = 212; + const INVALID_GREATER_OR_EQUAL = 213; + const INVALID_DATE = 214; + const INVALID_CALLABLE = 215; + const INVALID_KEY_NOT_EXISTS = 216; + const INVALID_SATISFY = 217; + const INVALID_IP = 218; + const INVALID_BETWEEN = 219; + const INVALID_BETWEEN_EXCLUSIVE = 220; + const INVALID_EXTENSION = 222; + const INVALID_CONSTANT = 221; + const INVALID_VERSION = 223; + const INVALID_PROPERTY = 224; + const INVALID_RESOURCE = 225; + const INVALID_COUNTABLE = 226; + const INVALID_MIN_COUNT = 227; + const INVALID_MAX_COUNT = 228; + const INVALID_STRING_NOT_CONTAINS = 229; + + /** + * Exception to throw when an assertion failed. + * + * @var string + */ + protected static $exceptionClass = InvalidArgumentException::class; + + /** + * Assert that two values are equal (using ==). + * + * @param mixed $value + * @param mixed $value2 + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function eq($value, $value2, $message = null, string $propertyPath = null): bool + { + if ($value != $value2) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" does not equal expected value "%s".'), + static::stringify($value), + static::stringify($value2) + ); + + throw static::createException($value, $message, static::INVALID_EQ, $propertyPath, ['expected' => $value2]); + } + + return true; + } + + /** + * Assert that the array contains the subset. + * + * @param mixed $value + * @param mixed $value2 + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function eqArraySubset($value, $value2, $message = null, string $propertyPath = null): bool + { + static::isArray($value, $message, $propertyPath); + static::isArray($value2, $message, $propertyPath); + + $patched = \array_replace_recursive($value, $value2); + static::eq($patched, $value, $message, $propertyPath); + + return true; + } + + /** + * Assert that two values are the same (using ===). + * + * @param mixed $value + * @param mixed $value2 + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function same($value, $value2, $message = null, string $propertyPath = null): bool + { + if ($value !== $value2) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not the same as expected value "%s".'), + static::stringify($value), + static::stringify($value2) + ); + + throw static::createException($value, $message, static::INVALID_SAME, $propertyPath, ['expected' => $value2]); + } + + return true; + } + + /** + * Assert that two values are not equal (using ==). + * + * @param mixed $value1 + * @param mixed $value2 + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notEq($value1, $value2, $message = null, string $propertyPath = null): bool + { + if ($value1 == $value2) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" was not expected to be equal to value "%s".'), + static::stringify($value1), + static::stringify($value2) + ); + throw static::createException($value1, $message, static::INVALID_NOT_EQ, $propertyPath, ['expected' => $value2]); + } + + return true; + } + + /** + * Assert that two values are not the same (using ===). + * + * @param mixed $value1 + * @param mixed $value2 + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notSame($value1, $value2, $message = null, string $propertyPath = null): bool + { + if ($value1 === $value2) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" was not expected to be the same as value "%s".'), + static::stringify($value1), + static::stringify($value2) + ); + throw static::createException($value1, $message, static::INVALID_NOT_SAME, $propertyPath, ['expected' => $value2]); + } + + return true; + } + + /** + * Assert that value is not in array of choices. + * + * @param mixed $value + * @param array $choices + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notInArray($value, array $choices, $message = null, string $propertyPath = null): bool + { + if (true === \in_array($value, $choices)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" was not expected to be an element of the values: %s'), + static::stringify($value), + static::stringify($choices) + ); + throw static::createException($value, $message, static::INVALID_VALUE_IN_ARRAY, $propertyPath, ['choices' => $choices]); + } + + return true; + } + + /** + * Assert that value is a php integer. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function integer($value, $message = null, string $propertyPath = null): bool + { + if (!\is_int($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an integer.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_INTEGER, $propertyPath); + } + + return true; + } + + /** + * Assert that value is a php float. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function float($value, $message = null, string $propertyPath = null): bool + { + if (!\is_float($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a float.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_FLOAT, $propertyPath); + } + + return true; + } + + /** + * Validates if an integer or integerish is a digit. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function digit($value, $message = null, string $propertyPath = null): bool + { + if (!\ctype_digit((string)$value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a digit.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_DIGIT, $propertyPath); + } + + return true; + } + + /** + * Assert that value is a php integer'ish. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function integerish($value, $message = null, string $propertyPath = null): bool + { + if ( + \is_resource($value) || + \is_object($value) || + \is_bool($value) || + \is_null($value) || + \is_array($value) || + (\is_string($value) && '' == $value) || + ( + \strval(\intval($value)) !== \strval($value) && + \strval(\intval($value)) !== \strval(\ltrim($value, '0')) && + '' !== \strval(\intval($value)) && + '' !== \strval(\ltrim($value, '0')) + ) + ) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an integer or a number castable to integer.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_INTEGERISH, $propertyPath); + } + + return true; + } + + /** + * Assert that value is php boolean. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function boolean($value, $message = null, string $propertyPath = null): bool + { + if (!\is_bool($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a boolean.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_BOOLEAN, $propertyPath); + } + + return true; + } + + /** + * Assert that value is a PHP scalar. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function scalar($value, $message = null, string $propertyPath = null): bool + { + if (!\is_scalar($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a scalar.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_SCALAR, $propertyPath); + } + + return true; + } + + /** + * Assert that value is not empty. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notEmpty($value, $message = null, string $propertyPath = null): bool + { + if (empty($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is empty, but non empty value was expected.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::VALUE_EMPTY, $propertyPath); + } + + return true; + } + + /** + * Assert that value is empty. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function noContent($value, $message = null, string $propertyPath = null): bool + { + if (!empty($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not empty, but empty value was expected.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::VALUE_NOT_EMPTY, $propertyPath); + } + + return true; + } + + /** + * Assert that value is null. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + */ + public static function null($value, $message = null, string $propertyPath = null): bool + { + if (null !== $value) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not null, but null value was expected.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::VALUE_NOT_NULL, $propertyPath); + } + + return true; + } + + /** + * Assert that value is not null. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notNull($value, $message = null, string $propertyPath = null): bool + { + if (null === $value) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is null, but non null value was expected.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::VALUE_NULL, $propertyPath); + } + + return true; + } + + /** + * Assert that value is a string. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function string($value, $message = null, string $propertyPath = null) + { + if (!\is_string($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" expected to be string, type %s given.'), + static::stringify($value), + \gettype($value) + ); + + throw static::createException($value, $message, static::INVALID_STRING, $propertyPath); + } + + return true; + } + + /** + * Assert that value matches a regex. + * + * @param mixed $value + * @param string $pattern + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function regex($value, $pattern, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + if (!\preg_match($pattern, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" does not match expression.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_REGEX, $propertyPath, ['pattern' => $pattern]); + } + + return true; + } + + /** + * Assert that value does not match a regex. + * + * @param mixed $value + * @param string $pattern + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notRegex($value, $pattern, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + if (\preg_match($pattern, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" matches expression.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_NOT_REGEX, $propertyPath, ['pattern' => $pattern]); + } + + return true; + } + + /** + * Assert that string has a given length. + * + * @param mixed $value + * @param int $length + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function length($value, $length, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($value, $message, $propertyPath); + + if (\mb_strlen($value, $encoding) !== $length) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" has to be %d exactly characters long, but length is %d.'), + static::stringify($value), + $length, + \mb_strlen($value, $encoding) + ); + + throw static::createException($value, $message, static::INVALID_LENGTH, $propertyPath, ['length' => $length, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that a string is at least $minLength chars long. + * + * @param mixed $value + * @param int $minLength + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function minLength($value, $minLength, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($value, $message, $propertyPath); + + if (\mb_strlen($value, $encoding) < $minLength) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is too short, it should have at least %d characters, but only has %d characters.'), + static::stringify($value), + $minLength, + \mb_strlen($value, $encoding) + ); + + throw static::createException($value, $message, static::INVALID_MIN_LENGTH, $propertyPath, ['min_length' => $minLength, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that string value is not longer than $maxLength chars. + * + * @param mixed $value + * @param int $maxLength + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function maxLength($value, $maxLength, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($value, $message, $propertyPath); + + if (\mb_strlen($value, $encoding) > $maxLength) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is too long, it should have no more than %d characters, but has %d characters.'), + static::stringify($value), + $maxLength, + \mb_strlen($value, $encoding) + ); + + throw static::createException($value, $message, static::INVALID_MAX_LENGTH, $propertyPath, ['max_length' => $maxLength, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that string length is between min and max lengths. + * + * @param mixed $value + * @param int $minLength + * @param int $maxLength + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function betweenLength($value, $minLength, $maxLength, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($value, $message, $propertyPath); + static::minLength($value, $minLength, $message, $propertyPath, $encoding); + static::maxLength($value, $maxLength, $message, $propertyPath, $encoding); + + return true; + } + + /** + * Assert that string starts with a sequence of chars. + * + * @param mixed $string + * @param string $needle + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function startsWith($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($string, $message, $propertyPath); + + if (0 !== \mb_strpos($string, $needle, null, $encoding)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" does not start with "%s".'), + static::stringify($string), + static::stringify($needle) + ); + + throw static::createException($string, $message, static::INVALID_STRING_START, $propertyPath, ['needle' => $needle, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that string ends with a sequence of chars. + * + * @param mixed $string + * @param string $needle + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function endsWith($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($string, $message, $propertyPath); + + $stringPosition = \mb_strlen($string, $encoding) - \mb_strlen($needle, $encoding); + + if (\mb_strripos($string, $needle, null, $encoding) !== $stringPosition) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" does not end with "%s".'), + static::stringify($string), + static::stringify($needle) + ); + + throw static::createException($string, $message, static::INVALID_STRING_END, $propertyPath, ['needle' => $needle, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that string contains a sequence of chars. + * + * @param mixed $string + * @param string $needle + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function contains($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($string, $message, $propertyPath); + + if (false === \mb_strpos($string, $needle, null, $encoding)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" does not contain "%s".'), + static::stringify($string), + static::stringify($needle) + ); + + throw static::createException($string, $message, static::INVALID_STRING_CONTAINS, $propertyPath, ['needle' => $needle, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that string does not contains a sequence of chars. + * + * @param mixed $string + * @param string $needle + * @param string|callable|null $message + * @param string|null $propertyPath + * @param string $encoding + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notContains($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool + { + static::string($string, $message, $propertyPath); + + if (false !== \mb_strpos($string, $needle, null, $encoding)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" contains "%s".'), + static::stringify($string), + static::stringify($needle) + ); + + throw static::createException($string, $message, static::INVALID_STRING_NOT_CONTAINS, $propertyPath, ['needle' => $needle, 'encoding' => $encoding]); + } + + return true; + } + + /** + * Assert that value is in array of choices. + * + * @param mixed $value + * @param array $choices + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function choice($value, array $choices, $message = null, string $propertyPath = null): bool + { + if (!\in_array($value, $choices, true)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an element of the valid values: %s'), + static::stringify($value), + \implode(', ', \array_map([\get_called_class(), 'stringify'], $choices)) + ); + + throw static::createException($value, $message, static::INVALID_CHOICE, $propertyPath, ['choices' => $choices]); + } + + return true; + } + + /** + * Assert that value is in array of choices. + * + * This is an alias of {@see choice()}. + * + * @param mixed $value + * @param array $choices + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function inArray($value, array $choices, $message = null, string $propertyPath = null): bool + { + return static::choice($value, $choices, $message, $propertyPath); + } + + /** + * Assert that value is numeric. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function numeric($value, $message = null, string $propertyPath = null): bool + { + if (!\is_numeric($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not numeric.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_NUMERIC, $propertyPath); + } + + return true; + } + + /** + * Assert that value is a resource. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + */ + public static function isResource($value, $message = null, string $propertyPath = null): bool + { + if (!\is_resource($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a resource.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_RESOURCE, $propertyPath); + } + + return true; + } + + /** + * Assert that value is an array. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isArray($value, $message = null, string $propertyPath = null): bool + { + if (!\is_array($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an array.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_ARRAY, $propertyPath); + } + + return true; + } + + /** + * Assert that value is an array or a traversable object. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isTraversable($value, $message = null, string $propertyPath = null): bool + { + if (!\is_array($value) && !$value instanceof Traversable) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an array and does not implement Traversable.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_TRAVERSABLE, $propertyPath); + } + + return true; + } + + /** + * Assert that value is an array or an array-accessible object. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isArrayAccessible($value, $message = null, string $propertyPath = null): bool + { + if (!\is_array($value) && !$value instanceof ArrayAccess) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an array and does not implement ArrayAccess.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_ARRAY_ACCESSIBLE, $propertyPath); + } + + return true; + } + + /** + * Assert that value is countable. + * + * @param array|Countable|ResourceBundle|SimpleXMLElement $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isCountable($value, $message = null, string $propertyPath = null): bool + { + if (\function_exists('is_countable')) { + $assert = \is_countable($value); + } else { + $assert = \is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXMLElement; + } + + if (!$assert) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not an array and does not implement Countable.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_COUNTABLE, $propertyPath); + } + + return true; + } + + /** + * Assert that key exists in an array. + * + * @param mixed $value + * @param string|int $key + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function keyExists($value, $key, $message = null, string $propertyPath = null): bool + { + static::isArray($value, $message, $propertyPath); + + if (!\array_key_exists($key, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Array does not contain an element with key "%s"'), + static::stringify($key) + ); + + throw static::createException($value, $message, static::INVALID_KEY_EXISTS, $propertyPath, ['key' => $key]); + } + + return true; + } + + /** + * Assert that key does not exist in an array. + * + * @param mixed $value + * @param string|int $key + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function keyNotExists($value, $key, $message = null, string $propertyPath = null): bool + { + static::isArray($value, $message, $propertyPath); + + if (\array_key_exists($key, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Array contains an element with key "%s"'), + static::stringify($key) + ); + + throw static::createException($value, $message, static::INVALID_KEY_NOT_EXISTS, $propertyPath, ['key' => $key]); + } + + return true; + } + + /** + * Assert that key exists in an array/array-accessible object using isset(). + * + * @param mixed $value + * @param string|int $key + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function keyIsset($value, $key, $message = null, string $propertyPath = null): bool + { + static::isArrayAccessible($value, $message, $propertyPath); + + if (!isset($value[$key])) { + $message = \sprintf( + static::generateMessage($message ?: 'The element with key "%s" was not found'), + static::stringify($key) + ); + + throw static::createException($value, $message, static::INVALID_KEY_ISSET, $propertyPath, ['key' => $key]); + } + + return true; + } + + /** + * Assert that key exists in an array/array-accessible object and its value is not empty. + * + * @param mixed $value + * @param string|int $key + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notEmptyKey($value, $key, $message = null, string $propertyPath = null): bool + { + static::keyIsset($value, $key, $message, $propertyPath); + static::notEmpty($value[$key], $message, $propertyPath); + + return true; + } + + /** + * Assert that value is not blank. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notBlank($value, $message = null, string $propertyPath = null): bool + { + if (false === $value || (empty($value) && '0' != $value) || (\is_string($value) && '' === \trim($value))) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is blank, but was expected to contain a value.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_NOT_BLANK, $propertyPath); + } + + return true; + } + + /** + * Assert that value is instance of given class-name. + * + * @param mixed $value + * @param string $className + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isInstanceOf($value, $className, $message = null, string $propertyPath = null): bool + { + if (!($value instanceof $className)) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" was expected to be instanceof of "%s" but is not.'), + static::stringify($value), + $className + ); + + throw static::createException($value, $message, static::INVALID_INSTANCE_OF, $propertyPath, ['class' => $className]); + } + + return true; + } + + /** + * Assert that value is not instance of given class-name. + * + * @param mixed $value + * @param string $className + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function notIsInstanceOf($value, $className, $message = null, string $propertyPath = null): bool + { + if ($value instanceof $className) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" was not expected to be instanceof of "%s".'), + static::stringify($value), + $className + ); + + throw static::createException($value, $message, static::INVALID_NOT_INSTANCE_OF, $propertyPath, ['class' => $className]); + } + + return true; + } + + /** + * Assert that value is subclass of given class-name. + * + * @param mixed $value + * @param string $className + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function subclassOf($value, $className, $message = null, string $propertyPath = null): bool + { + if (!\is_subclass_of($value, $className)) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" was expected to be subclass of "%s".'), + static::stringify($value), + $className + ); + + throw static::createException($value, $message, static::INVALID_SUBCLASS_OF, $propertyPath, ['class' => $className]); + } + + return true; + } + + /** + * Assert that value is in range of numbers. + * + * @param mixed $value + * @param mixed $minValue + * @param mixed $maxValue + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function range($value, $minValue, $maxValue, $message = null, string $propertyPath = null): bool + { + static::numeric($value, $message, $propertyPath); + + if ($value < $minValue || $value > $maxValue) { + $message = \sprintf( + static::generateMessage($message ?: 'Number "%s" was expected to be at least "%d" and at most "%d".'), + static::stringify($value), + static::stringify($minValue), + static::stringify($maxValue) + ); + + throw static::createException($value, $message, static::INVALID_RANGE, $propertyPath, ['min' => $minValue, 'max' => $maxValue]); + } + + return true; + } + + /** + * Assert that a value is at least as big as a given limit. + * + * @param mixed $value + * @param mixed $minValue + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function min($value, $minValue, $message = null, string $propertyPath = null): bool + { + static::numeric($value, $message, $propertyPath); + + if ($value < $minValue) { + $message = \sprintf( + static::generateMessage($message ?: 'Number "%s" was expected to be at least "%s".'), + static::stringify($value), + static::stringify($minValue) + ); + + throw static::createException($value, $message, static::INVALID_MIN, $propertyPath, ['min' => $minValue]); + } + + return true; + } + + /** + * Assert that a number is smaller as a given limit. + * + * @param mixed $value + * @param mixed $maxValue + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function max($value, $maxValue, $message = null, string $propertyPath = null): bool + { + static::numeric($value, $message, $propertyPath); + + if ($value > $maxValue) { + $message = \sprintf( + static::generateMessage($message ?: 'Number "%s" was expected to be at most "%s".'), + static::stringify($value), + static::stringify($maxValue) + ); + + throw static::createException($value, $message, static::INVALID_MAX, $propertyPath, ['max' => $maxValue]); + } + + return true; + } + + /** + * Assert that a file exists. + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function file($value, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + static::notEmpty($value, $message, $propertyPath); + + if (!\is_file($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'File "%s" was expected to exist.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_FILE, $propertyPath); + } + + return true; + } + + /** + * Assert that a directory exists. + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function directory($value, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + if (!\is_dir($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Path "%s" was expected to be a directory.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_DIRECTORY, $propertyPath); + } + + return true; + } + + /** + * Assert that the value is something readable. + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function readable($value, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + if (!\is_readable($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Path "%s" was expected to be readable.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_READABLE, $propertyPath); + } + + return true; + } + + /** + * Assert that the value is something writeable. + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function writeable($value, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + if (!\is_writable($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Path "%s" was expected to be writeable.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_WRITEABLE, $propertyPath); + } + + return true; + } + + /** + * Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL). + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function email($value, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + if (!\filter_var($value, FILTER_VALIDATE_EMAIL)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" was expected to be a valid e-mail address.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_EMAIL, $propertyPath); + } + + return true; + } + + /** + * Assert that value is an URL. + * + * This code snipped was taken from the Symfony project and modified to the special demands of this method. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + * + * @see https://github.com/symfony/Validator/blob/master/Constraints/UrlValidator.php + * @see https://github.com/symfony/Validator/blob/master/Constraints/Url.php + */ + public static function url($value, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + + $protocols = ['http', 'https']; + + $pattern = '~^ + (%s):// # protocol + (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth + ( + ([\pL\pN\pS\-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or + \[ + (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) + \] # an IPv6 address + ) + (:[0-9]+)? # a port (optional) + (?:/ (?:[\pL\pN\-._\~!$&\'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path + (?:\? (?:[\pL\pN\-._\~!$&\'\[\]()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional) + (?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional) + $~ixu'; + + $pattern = \sprintf($pattern, \implode('|', $protocols)); + + if (!\preg_match($pattern, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" was expected to be a valid URL starting with http or https'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_URL, $propertyPath); + } + + return true; + } + + /** + * Assert that value is alphanumeric. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function alnum($value, $message = null, string $propertyPath = null): bool + { + try { + static::regex($value, '(^([a-zA-Z]{1}[a-zA-Z0-9]*)$)', $message, $propertyPath); + } catch (Throwable $e) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not alphanumeric, starting with letters and containing only letters and numbers.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_ALNUM, $propertyPath); + } + + return true; + } + + /** + * Assert that the value is boolean True. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function true($value, $message = null, string $propertyPath = null): bool + { + if (true !== $value) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not TRUE.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_TRUE, $propertyPath); + } + + return true; + } + + /** + * Assert that the value is boolean False. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function false($value, $message = null, string $propertyPath = null): bool + { + if (false !== $value) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not FALSE.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_FALSE, $propertyPath); + } + + return true; + } + + /** + * Assert that the class exists. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function classExists($value, $message = null, string $propertyPath = null): bool + { + if (!\class_exists($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" does not exist.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_CLASS, $propertyPath); + } + + return true; + } + + /** + * Assert that the interface exists. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function interfaceExists($value, $message = null, string $propertyPath = null): bool + { + if (!\interface_exists($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Interface "%s" does not exist.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_INTERFACE, $propertyPath); + } + + return true; + } + + /** + * Assert that the class implements the interface. + * + * @param mixed $class + * @param string $interfaceName + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function implementsInterface($class, $interfaceName, $message = null, string $propertyPath = null): bool + { + try { + $reflection = new ReflectionClass($class); + if (!$reflection->implementsInterface($interfaceName)) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" does not implement interface "%s".'), + static::stringify($class), + static::stringify($interfaceName) + ); + + throw static::createException($class, $message, static::INTERFACE_NOT_IMPLEMENTED, $propertyPath, ['interface' => $interfaceName]); + } + } catch (ReflectionException $e) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" failed reflection.'), + static::stringify($class) + ); + throw static::createException($class, $message, static::INTERFACE_NOT_IMPLEMENTED, $propertyPath, ['interface' => $interfaceName]); + } + + return true; + } + + /** + * Assert that the given string is a valid json string. + * + * NOTICE: + * Since this does a json_decode to determine its validity + * you probably should consider, when using the variable + * content afterwards, just to decode and check for yourself instead + * of using this assertion. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isJsonString($value, $message = null, string $propertyPath = null): bool + { + if (null === \json_decode($value) && JSON_ERROR_NONE !== \json_last_error()) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a valid JSON string.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_JSON_STRING, $propertyPath); + } + + return true; + } + + /** + * Assert that the given string is a valid UUID. + * + * Uses code from {@link https://github.com/ramsey/uuid} that is MIT licensed. + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function uuid($value, $message = null, string $propertyPath = null): bool + { + $value = \str_replace(['urn:', 'uuid:', '{', '}'], '', $value); + + if ('00000000-0000-0000-0000-000000000000' === $value) { + return true; + } + + if (!\preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a valid UUID.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_UUID, $propertyPath); + } + + return true; + } + + /** + * Assert that the given string is a valid E164 Phone Number. + * + * @see https://en.wikipedia.org/wiki/E.164 + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function e164($value, $message = null, string $propertyPath = null): bool + { + if (!\preg_match('/^\+?[1-9]\d{1,14}$/', $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" is not a valid E164.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_E164, $propertyPath); + } + + return true; + } + + /** + * Assert that the count of countable is equal to count. + * + * @param array|Countable|ResourceBundle|SimpleXMLElement $countable + * @param int $count + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function count($countable, $count, $message = null, string $propertyPath = null): bool + { + if ($count !== \count($countable)) { + $message = \sprintf( + static::generateMessage($message ?: 'List does not contain exactly %d elements (%d given).'), + static::stringify($count), + static::stringify(\count($countable)) + ); + + throw static::createException($countable, $message, static::INVALID_COUNT, $propertyPath, ['count' => $count]); + } + + return true; + } + + /** + * Assert that the countable have at least $count elements. + * + * @param array|Countable|ResourceBundle|SimpleXMLElement $countable + * @param int $count + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function minCount($countable, $count, $message = null, string $propertyPath = null): bool + { + if ($count > \count($countable)) { + $message = \sprintf( + static::generateMessage($message ?: 'List should have at least %d elements, but has %d elements.'), + static::stringify($count), + static::stringify(\count($countable)) + ); + + throw static::createException($countable, $message, static::INVALID_MIN_COUNT, $propertyPath, ['count' => $count]); + } + + return true; + } + + /** + * Assert that the countable have at most $count elements. + * + * @param array|Countable|ResourceBundle|SimpleXMLElement $countable + * @param int $count + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function maxCount($countable, $count, $message = null, string $propertyPath = null): bool + { + if ($count < \count($countable)) { + $message = \sprintf( + static::generateMessage($message ?: 'List should have at most %d elements, but has %d elements.'), + static::stringify($count), + static::stringify(\count($countable)) + ); + + throw static::createException($countable, $message, static::INVALID_MAX_COUNT, $propertyPath, ['count' => $count]); + } + + return true; + } + + /** + * static call handler to implement: + * - "null or assertion" delegation + * - "all" delegation. + * + * @param string $method + * @param array $args + * + * @return bool|mixed + * + * @throws AssertionFailedException + */ + public static function __callStatic($method, $args) + { + if (0 === \strpos($method, 'nullOr')) { + if (!\array_key_exists(0, $args)) { + throw new BadMethodCallException('Missing the first argument.'); + } + + if (null === $args[0]) { + return true; + } + + $method = \substr($method, 6); + + return \call_user_func_array([\get_called_class(), $method], $args); + } + + if (0 === \strpos($method, 'all')) { + if (!\array_key_exists(0, $args)) { + throw new BadMethodCallException('Missing the first argument.'); + } + + static::isTraversable($args[0]); + + $method = \substr($method, 3); + $values = \array_shift($args); + $calledClass = \get_called_class(); + + foreach ($values as $value) { + \call_user_func_array([$calledClass, $method], \array_merge([$value], $args)); + } + + return true; + } + + throw new BadMethodCallException('No assertion Assertion#'.$method.' exists.'); + } + + /** + * Determines if the values array has every choice as key and that this choice has content. + * + * @param array $values + * @param array $choices + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function choicesNotEmpty(array $values, array $choices, $message = null, string $propertyPath = null): bool + { + static::notEmpty($values, $message, $propertyPath); + + foreach ($choices as $choice) { + static::notEmptyKey($values, $choice, $message, $propertyPath); + } + + return true; + } + + /** + * Determines that the named method is defined in the provided object. + * + * @param string $value + * @param mixed $object + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function methodExists($value, $object, $message = null, string $propertyPath = null): bool + { + static::isObject($object, $message, $propertyPath); + + if (!\method_exists($object, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Expected "%s" does not exist in provided object.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_METHOD, $propertyPath, ['object' => \get_class($object)]); + } + + return true; + } + + /** + * Determines that the provided value is an object. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isObject($value, $message = null, string $propertyPath = null): bool + { + if (!\is_object($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is not a valid object.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_OBJECT, $propertyPath); + } + + return true; + } + + /** + * Determines if the value is less than given limit. + * + * @param mixed $value + * @param mixed $limit + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function lessThan($value, $limit, $message = null, string $propertyPath = null): bool + { + if ($value >= $limit) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is not less than "%s".'), + static::stringify($value), + static::stringify($limit) + ); + + throw static::createException($value, $message, static::INVALID_LESS, $propertyPath, ['limit' => $limit]); + } + + return true; + } + + /** + * Determines if the value is less or equal than given limit. + * + * @param mixed $value + * @param mixed $limit + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function lessOrEqualThan($value, $limit, $message = null, string $propertyPath = null): bool + { + if ($value > $limit) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is not less or equal than "%s".'), + static::stringify($value), + static::stringify($limit) + ); + + throw static::createException($value, $message, static::INVALID_LESS_OR_EQUAL, $propertyPath, ['limit' => $limit]); + } + + return true; + } + + /** + * Determines if the value is greater than given limit. + * + * @param mixed $value + * @param mixed $limit + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function greaterThan($value, $limit, $message = null, string $propertyPath = null): bool + { + if ($value <= $limit) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is not greater than "%s".'), + static::stringify($value), + static::stringify($limit) + ); + + throw static::createException($value, $message, static::INVALID_GREATER, $propertyPath, ['limit' => $limit]); + } + + return true; + } + + /** + * Determines if the value is greater or equal than given limit. + * + * @param mixed $value + * @param mixed $limit + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function greaterOrEqualThan($value, $limit, $message = null, string $propertyPath = null): bool + { + if ($value < $limit) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is not greater or equal than "%s".'), + static::stringify($value), + static::stringify($limit) + ); + + throw static::createException($value, $message, static::INVALID_GREATER_OR_EQUAL, $propertyPath, ['limit' => $limit]); + } + + return true; + } + + /** + * Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit. + * + * @param mixed $value + * @param mixed $lowerLimit + * @param mixed $upperLimit + * @param string|callable|null $message + * @param string $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function between($value, $lowerLimit, $upperLimit, $message = null, string $propertyPath = null): bool + { + if ($lowerLimit > $value || $value > $upperLimit) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is neither greater than or equal to "%s" nor less than or equal to "%s".'), + static::stringify($value), + static::stringify($lowerLimit), + static::stringify($upperLimit) + ); + + throw static::createException($value, $message, static::INVALID_BETWEEN, $propertyPath, ['lower' => $lowerLimit, 'upper' => $upperLimit]); + } + + return true; + } + + /** + * Assert that a value is greater than a lower limit, and less than an upper limit. + * + * @param mixed $value + * @param mixed $lowerLimit + * @param mixed $upperLimit + * @param string|callable|null $message + * @param string $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function betweenExclusive($value, $lowerLimit, $upperLimit, $message = null, string $propertyPath = null): bool + { + if ($lowerLimit >= $value || $value >= $upperLimit) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is neither greater than "%s" nor less than "%s".'), + static::stringify($value), + static::stringify($lowerLimit), + static::stringify($upperLimit) + ); + + throw static::createException($value, $message, static::INVALID_BETWEEN_EXCLUSIVE, $propertyPath, ['lower' => $lowerLimit, 'upper' => $upperLimit]); + } + + return true; + } + + /** + * Assert that extension is loaded. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function extensionLoaded($value, $message = null, string $propertyPath = null): bool + { + if (!\extension_loaded($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Extension "%s" is required.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_EXTENSION, $propertyPath); + } + + return true; + } + + /** + * Assert that date is valid and corresponds to the given format. + * + * @param string $value + * @param string $format supports all of the options date(), except for the following: + * N, w, W, t, L, o, B, a, A, g, h, I, O, P, Z, c, r + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + * + * @see http://php.net/manual/function.date.php#refsect1-function.date-parameters + */ + public static function date($value, $format, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + static::string($format, $message, $propertyPath); + + $dateTime = DateTime::createFromFormat('!'.$format, $value); + + if (false === $dateTime || $value !== $dateTime->format($format)) { + $message = \sprintf( + static::generateMessage($message ?: 'Date "%s" is invalid or does not match format "%s".'), + static::stringify($value), + static::stringify($format) + ); + + throw static::createException($value, $message, static::INVALID_DATE, $propertyPath, ['format' => $format]); + } + + return true; + } + + /** + * Assert that the value is an object, or a class that exists. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function objectOrClass($value, $message = null, string $propertyPath = null): bool + { + if (!\is_object($value)) { + static::classExists($value, $message, $propertyPath); + } + + return true; + } + + /** + * Assert that the value is an object or class, and that the property exists. + * + * @param mixed $value + * @param string $property + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function propertyExists($value, $property, $message = null, string $propertyPath = null): bool + { + static::objectOrClass($value); + + if (!\property_exists($value, $property)) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" does not have property "%s".'), + static::stringify($value), + static::stringify($property) + ); + + throw static::createException($value, $message, static::INVALID_PROPERTY, $propertyPath, ['property' => $property]); + } + + return true; + } + + /** + * Assert that the value is an object or class, and that the properties all exist. + * + * @param mixed $value + * @param array $properties + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function propertiesExist($value, array $properties, $message = null, string $propertyPath = null): bool + { + static::objectOrClass($value); + static::allString($properties, $message, $propertyPath); + + $invalidProperties = []; + foreach ($properties as $property) { + if (!\property_exists($value, $property)) { + $invalidProperties[] = $property; + } + } + + if ($invalidProperties) { + $message = \sprintf( + static::generateMessage($message ?: 'Class "%s" does not have these properties: %s.'), + static::stringify($value), + static::stringify(\implode(', ', $invalidProperties)) + ); + + throw static::createException($value, $message, static::INVALID_PROPERTY, $propertyPath, ['properties' => $properties]); + } + + return true; + } + + /** + * Assert comparison of two versions. + * + * @param string $version1 + * @param string $operator + * @param string $version2 + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function version($version1, $operator, $version2, $message = null, string $propertyPath = null): bool + { + static::notEmpty($operator, 'versionCompare operator is required and cannot be empty.'); + + if (true !== \version_compare($version1, $version2, $operator)) { + $message = \sprintf( + static::generateMessage($message ?: 'Version "%s" is not "%s" version "%s".'), + static::stringify($version1), + static::stringify($operator), + static::stringify($version2) + ); + + throw static::createException($version1, $message, static::INVALID_VERSION, $propertyPath, ['operator' => $operator, 'version' => $version2]); + } + + return true; + } + + /** + * Assert on PHP version. + * + * @param string $operator + * @param mixed $version + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function phpVersion($operator, $version, $message = null, string $propertyPath = null): bool + { + static::defined('PHP_VERSION'); + + return static::version(PHP_VERSION, $operator, $version, $message, $propertyPath); + } + + /** + * Assert that extension is loaded and a specific version is installed. + * + * @param string $extension + * @param string $operator + * @param mixed $version + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function extensionVersion($extension, $operator, $version, $message = null, string $propertyPath = null): bool + { + static::extensionLoaded($extension, $message, $propertyPath); + + return static::version(\phpversion($extension), $operator, $version, $message, $propertyPath); + } + + /** + * Determines that the provided value is callable. + * + * @param mixed $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function isCallable($value, $message = null, string $propertyPath = null): bool + { + if (!\is_callable($value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is not a callable.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_CALLABLE, $propertyPath); + } + + return true; + } + + /** + * Assert that the provided value is valid according to a callback. + * + * If the callback returns `false` the assertion will fail. + * + * @param mixed $value + * @param callable $callback + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function satisfy($value, $callback, $message = null, string $propertyPath = null): bool + { + static::isCallable($callback); + + if (false === \call_user_func($callback, $value)) { + $message = \sprintf( + static::generateMessage($message ?: 'Provided "%s" is invalid according to custom rule.'), + static::stringify($value) + ); + + throw static::createException($value, $message, static::INVALID_SATISFY, $propertyPath); + } + + return true; + } + + /** + * Assert that value is an IPv4 or IPv6 address + * (using input_filter/FILTER_VALIDATE_IP). + * + * @param string $value + * @param int|null $flag + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + * + * @see http://php.net/manual/filter.filters.flags.php + */ + public static function ip($value, $flag = null, $message = null, string $propertyPath = null): bool + { + static::string($value, $message, $propertyPath); + if (!\filter_var($value, FILTER_VALIDATE_IP, $flag)) { + $message = \sprintf( + static::generateMessage($message ?: 'Value "%s" was expected to be a valid IP address.'), + static::stringify($value) + ); + throw static::createException($value, $message, static::INVALID_IP, $propertyPath, ['flag' => $flag]); + } + + return true; + } + + /** + * Assert that value is an IPv4 address + * (using input_filter/FILTER_VALIDATE_IP). + * + * @param string $value + * @param int|null $flag + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + * + * @see http://php.net/manual/filter.filters.flags.php + */ + public static function ipv4($value, $flag = null, $message = null, string $propertyPath = null): bool + { + static::ip($value, $flag | FILTER_FLAG_IPV4, static::generateMessage($message ?: 'Value "%s" was expected to be a valid IPv4 address.'), $propertyPath); + + return true; + } + + /** + * Assert that value is an IPv6 address + * (using input_filter/FILTER_VALIDATE_IP). + * + * @param string $value + * @param int|null $flag + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + * + * @see http://php.net/manual/filter.filters.flags.php + */ + public static function ipv6($value, $flag = null, $message = null, string $propertyPath = null): bool + { + static::ip($value, $flag | FILTER_FLAG_IPV6, static::generateMessage($message ?: 'Value "%s" was expected to be a valid IPv6 address.'), $propertyPath); + + return true; + } + + /** + * Assert that a constant is defined. + * + * @param mixed $constant + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + */ + public static function defined($constant, $message = null, string $propertyPath = null): bool + { + if (!\defined($constant)) { + $message = \sprintf(static::generateMessage($message ?: 'Value "%s" expected to be a defined constant.'), $constant); + + throw static::createException($constant, $message, static::INVALID_CONSTANT, $propertyPath); + } + + return true; + } + + /** + * Assert that a constant is defined. + * + * @param string $value + * @param string|callable|null $message + * @param string|null $propertyPath + * + * @return bool + * + * @throws AssertionFailedException + */ + public static function base64($value, $message = null, string $propertyPath = null): bool + { + if (false === \base64_decode($value, true)) { + $message = \sprintf(static::generateMessage($message ?: 'Value "%s" is not a valid base64 string.'), $value); + + throw static::createException($value, $message, static::INVALID_BASE64, $propertyPath); + } + + return true; + } + + /** + * Helper method that handles building the assertion failure exceptions. + * They are returned from this method so that the stack trace still shows + * the assertions method. + * + * @param mixed $value + * @param string|callable|null $message + * @param int $code + * @param string|null $propertyPath + * @param array $constraints + * + * @return mixed + */ + protected static function createException($value, $message, $code, $propertyPath = null, array $constraints = []) + { + $exceptionClass = static::$exceptionClass; + + return new $exceptionClass($message, $code, $propertyPath, $value, $constraints); + } + + /** + * Make a string version of a value. + * + * @param mixed $value + * + * @return string + */ + protected static function stringify($value): string + { + $result = \gettype($value); + + if (\is_bool($value)) { + $result = $value ? '<TRUE>' : '<FALSE>'; + } elseif (\is_scalar($value)) { + $val = (string)$value; + + if (\mb_strlen($val) > 100) { + $val = \mb_substr($val, 0, 97).'...'; + } + + $result = $val; + } elseif (\is_array($value)) { + $result = '<ARRAY>'; + } elseif (\is_object($value)) { + $result = \get_class($value); + } elseif (\is_resource($value)) { + $result = \get_resource_type($value); + } elseif (null === $value) { + $result = '<NULL>'; + } + + return $result; + } + + /** + * Generate the message. + * + * @param string|callable|null $message + * + * @return string + */ + protected static function generateMessage($message): string + { + if (\is_callable($message)) { + $traces = \debug_backtrace(0); + + $parameters = []; + + try { + $reflection = new ReflectionClass($traces[1]['class']); + $method = $reflection->getMethod($traces[1]['function']); + foreach ($method->getParameters() as $index => $parameter) { + if ('message' !== $parameter->getName()) { + $parameters[$parameter->getName()] = \array_key_exists($index, $traces[1]['args']) + ? $traces[1]['args'][$index] + : $parameter->getDefaultValue(); + } + } + + $parameters['::assertion'] = \sprintf('%s%s%s', $traces[1]['class'], $traces[1]['type'], $traces[1]['function']); + + $message = \call_user_func_array($message, [$parameters]); + } // @codeCoverageIgnoreStart + catch (Throwable $exception) { + $message = \sprintf('Unable to generate message : %s', $exception->getMessage()); + } // @codeCoverageIgnoreEnd + } + + return (string)$message; + } +} diff --git a/vendor/beberlei/assert/lib/Assert/AssertionChain.php b/vendor/beberlei/assert/lib/Assert/AssertionChain.php new file mode 100644 index 000000000..dbb6e839b --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/AssertionChain.php @@ -0,0 +1,254 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +use LogicException; +use ReflectionClass; + +/** + * Chaining builder for assertions. + * + * @author Benjamin Eberlei <[email protected]> + * + * @method AssertionChain alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric. + * @method AssertionChain base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. + * @method AssertionChain between(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit. + * @method AssertionChain betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit. + * @method AssertionChain betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths. + * @method AssertionChain boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean. + * @method AssertionChain choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. + * @method AssertionChain choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content. + * @method AssertionChain classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists. + * @method AssertionChain contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars. + * @method AssertionChain count(int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count. + * @method AssertionChain date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format. + * @method AssertionChain defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. + * @method AssertionChain digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit. + * @method AssertionChain directory(string|callable $message = null, string $propertyPath = null) Assert that a directory exists. + * @method AssertionChain e164(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number. + * @method AssertionChain email(string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL). + * @method AssertionChain endsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars. + * @method AssertionChain eq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==). + * @method AssertionChain eqArraySubset(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset. + * @method AssertionChain extensionLoaded(string|callable $message = null, string $propertyPath = null) Assert that extension is loaded. + * @method AssertionChain extensionVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed. + * @method AssertionChain false(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False. + * @method AssertionChain file(string|callable $message = null, string $propertyPath = null) Assert that a file exists. + * @method AssertionChain float(string|callable $message = null, string $propertyPath = null) Assert that value is a php float. + * @method AssertionChain greaterOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit. + * @method AssertionChain greaterThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit. + * @method AssertionChain implementsInterface(string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface. + * @method AssertionChain inArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice(). + * @method AssertionChain integer(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer. + * @method AssertionChain integerish(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish. + * @method AssertionChain interfaceExists(string|callable $message = null, string $propertyPath = null) Assert that the interface exists. + * @method AssertionChain ip(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address. + * @method AssertionChain ipv4(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address. + * @method AssertionChain ipv6(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address. + * @method AssertionChain isArray(string|callable $message = null, string $propertyPath = null) Assert that value is an array. + * @method AssertionChain isArrayAccessible(string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object. + * @method AssertionChain isCallable(string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable. + * @method AssertionChain isCountable(string|callable $message = null, string $propertyPath = null) Assert that value is countable. + * @method AssertionChain isInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name. + * @method AssertionChain isJsonString(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string. + * @method AssertionChain isObject(string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object. + * @method AssertionChain isResource(string|callable $message = null, string $propertyPath = null) Assert that value is a resource. + * @method AssertionChain isTraversable(string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object. + * @method AssertionChain keyExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array. + * @method AssertionChain keyIsset(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset(). + * @method AssertionChain keyNotExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array. + * @method AssertionChain length(int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length. + * @method AssertionChain lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit. + * @method AssertionChain lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit. + * @method AssertionChain max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit. + * @method AssertionChain maxCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements. + * @method AssertionChain maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars. + * @method AssertionChain methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object. + * @method AssertionChain min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit. + * @method AssertionChain minCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements. + * @method AssertionChain minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long. + * @method AssertionChain noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty. + * @method AssertionChain notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank. + * @method AssertionChain notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars. + * @method AssertionChain notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty. + * @method AssertionChain notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty. + * @method AssertionChain notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==). + * @method AssertionChain notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices. + * @method AssertionChain notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name. + * @method AssertionChain notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null. + * @method AssertionChain notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex. + * @method AssertionChain notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===). + * @method AssertionChain null(string|callable $message = null, string $propertyPath = null) Assert that value is null. + * @method AssertionChain numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric. + * @method AssertionChain objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists. + * @method AssertionChain phpVersion(mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version. + * @method AssertionChain propertiesExist(array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist. + * @method AssertionChain propertyExists(string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists. + * @method AssertionChain range(mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers. + * @method AssertionChain readable(string|callable $message = null, string $propertyPath = null) Assert that the value is something readable. + * @method AssertionChain regex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex. + * @method AssertionChain same(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===). + * @method AssertionChain satisfy(callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback. + * @method AssertionChain scalar(string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar. + * @method AssertionChain startsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars. + * @method AssertionChain string(string|callable $message = null, string $propertyPath = null) Assert that value is a string. + * @method AssertionChain subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name. + * @method AssertionChain true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True. + * @method AssertionChain url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL. + * @method AssertionChain uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID. + * @method AssertionChain version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions. + * @method AssertionChain writeable(string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable. + */ +class AssertionChain +{ + /** + * @var mixed + */ + private $value; + + /** + * @var string|callable|null + */ + private $defaultMessage; + + /** + * @var string|null + */ + private $defaultPropertyPath; + + /** + * Return each assertion as always valid. + * + * @var bool + */ + private $alwaysValid = false; + + /** + * Perform assertion on every element of array or traversable. + * + * @var bool + */ + private $all = false; + + /** @var string|Assertion Class to use for assertion calls */ + private $assertionClassName = 'Assert\Assertion'; + + /** + * AssertionChain constructor. + * + * @param mixed $value + * @param string|callable|null $defaultMessage + * @param string|null $defaultPropertyPath + */ + public function __construct($value, $defaultMessage = null, string $defaultPropertyPath = null) + { + $this->value = $value; + $this->defaultMessage = $defaultMessage; + $this->defaultPropertyPath = $defaultPropertyPath; + } + + /** + * Call assertion on the current value in the chain. + * + * @param string $methodName + * @param array $args + * + * @return AssertionChain + */ + public function __call($methodName, $args): AssertionChain + { + if (true === $this->alwaysValid) { + return $this; + } + + if (!\method_exists($this->assertionClassName, $methodName)) { + throw new \RuntimeException("Assertion '".$methodName."' does not exist."); + } + + $reflClass = new ReflectionClass($this->assertionClassName); + $method = $reflClass->getMethod($methodName); + + \array_unshift($args, $this->value); + $params = $method->getParameters(); + + foreach ($params as $idx => $param) { + if (isset($args[$idx])) { + continue; + } + + if ('message' == $param->getName()) { + $args[$idx] = $this->defaultMessage; + } + + if ('propertyPath' == $param->getName()) { + $args[$idx] = $this->defaultPropertyPath; + } + } + + if ($this->all) { + $methodName = 'all'.$methodName; + } + + \call_user_func_array([$this->assertionClassName, $methodName], $args); + + return $this; + } + + /** + * Switch chain into validation mode for an array of values. + * + * @return AssertionChain + */ + public function all(): AssertionChain + { + $this->all = true; + + return $this; + } + + /** + * Switch chain into mode allowing nulls, ignoring further assertions. + * + * @return AssertionChain + */ + public function nullOr(): AssertionChain + { + if (null === $this->value) { + $this->alwaysValid = true; + } + + return $this; + } + + /** + * @param string $className + * + * @return $this + */ + public function setAssertionClassName($className): AssertionChain + { + if (!\is_string($className)) { + throw new LogicException('Exception class name must be passed as a string'); + } + + if (Assertion::class !== $className && !\is_subclass_of($className, Assertion::class)) { + throw new LogicException($className.' is not (a subclass of) '.Assertion::class); + } + + $this->assertionClassName = $className; + + return $this; + } +} diff --git a/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php b/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php new file mode 100644 index 000000000..c18483884 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php @@ -0,0 +1,35 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +use Throwable; + +interface AssertionFailedException extends Throwable +{ + /** + * @return string|null + */ + public function getPropertyPath(); + + /** + * @return mixed + */ + public function getValue(); + + /** + * @return array + */ + public function getConstraints(): array; +} diff --git a/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php b/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php new file mode 100644 index 000000000..acd966544 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php @@ -0,0 +1,76 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +class InvalidArgumentException extends \InvalidArgumentException implements AssertionFailedException +{ + /** + * @var string|null + */ + private $propertyPath; + + /** + * @var mixed + */ + private $value; + + /** + * @var array + */ + private $constraints; + + public function __construct($message, $code, string $propertyPath = null, $value = null, array $constraints = []) + { + parent::__construct($message, $code); + + $this->propertyPath = $propertyPath; + $this->value = $value; + $this->constraints = $constraints; + } + + /** + * User controlled way to define a sub-property causing + * the failure of a currently asserted objects. + * + * Useful to transport information about the nature of the error + * back to higher layers. + * + * @return string|null + */ + public function getPropertyPath() + { + return $this->propertyPath; + } + + /** + * Get the value that caused the assertion to fail. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Get the constraints that applied to the failed assertion. + * + * @return array + */ + public function getConstraints(): array + { + return $this->constraints; + } +} diff --git a/vendor/beberlei/assert/lib/Assert/LazyAssertion.php b/vendor/beberlei/assert/lib/Assert/LazyAssertion.php new file mode 100644 index 000000000..6ccd64236 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/LazyAssertion.php @@ -0,0 +1,230 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +use LogicException; + +/** + * Chaining builder for lazy assertions. + * + * @author Benjamin Eberlei <[email protected]> + * + * @method LazyAssertion alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric. + * @method LazyAssertion base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. + * @method LazyAssertion between(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit. + * @method LazyAssertion betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit. + * @method LazyAssertion betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths. + * @method LazyAssertion boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean. + * @method LazyAssertion choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. + * @method LazyAssertion choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content. + * @method LazyAssertion classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists. + * @method LazyAssertion contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars. + * @method LazyAssertion count(int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count. + * @method LazyAssertion date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format. + * @method LazyAssertion defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. + * @method LazyAssertion digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit. + * @method LazyAssertion directory(string|callable $message = null, string $propertyPath = null) Assert that a directory exists. + * @method LazyAssertion e164(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number. + * @method LazyAssertion email(string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL). + * @method LazyAssertion endsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars. + * @method LazyAssertion eq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==). + * @method LazyAssertion eqArraySubset(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset. + * @method LazyAssertion extensionLoaded(string|callable $message = null, string $propertyPath = null) Assert that extension is loaded. + * @method LazyAssertion extensionVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed. + * @method LazyAssertion false(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False. + * @method LazyAssertion file(string|callable $message = null, string $propertyPath = null) Assert that a file exists. + * @method LazyAssertion float(string|callable $message = null, string $propertyPath = null) Assert that value is a php float. + * @method LazyAssertion greaterOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit. + * @method LazyAssertion greaterThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit. + * @method LazyAssertion implementsInterface(string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface. + * @method LazyAssertion inArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice(). + * @method LazyAssertion integer(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer. + * @method LazyAssertion integerish(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish. + * @method LazyAssertion interfaceExists(string|callable $message = null, string $propertyPath = null) Assert that the interface exists. + * @method LazyAssertion ip(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address. + * @method LazyAssertion ipv4(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address. + * @method LazyAssertion ipv6(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address. + * @method LazyAssertion isArray(string|callable $message = null, string $propertyPath = null) Assert that value is an array. + * @method LazyAssertion isArrayAccessible(string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object. + * @method LazyAssertion isCallable(string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable. + * @method LazyAssertion isCountable(string|callable $message = null, string $propertyPath = null) Assert that value is countable. + * @method LazyAssertion isInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name. + * @method LazyAssertion isJsonString(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string. + * @method LazyAssertion isObject(string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object. + * @method LazyAssertion isResource(string|callable $message = null, string $propertyPath = null) Assert that value is a resource. + * @method LazyAssertion isTraversable(string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object. + * @method LazyAssertion keyExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array. + * @method LazyAssertion keyIsset(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset(). + * @method LazyAssertion keyNotExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array. + * @method LazyAssertion length(int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length. + * @method LazyAssertion lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit. + * @method LazyAssertion lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit. + * @method LazyAssertion max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit. + * @method LazyAssertion maxCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements. + * @method LazyAssertion maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars. + * @method LazyAssertion methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object. + * @method LazyAssertion min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit. + * @method LazyAssertion minCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements. + * @method LazyAssertion minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long. + * @method LazyAssertion noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty. + * @method LazyAssertion notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank. + * @method LazyAssertion notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars. + * @method LazyAssertion notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty. + * @method LazyAssertion notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty. + * @method LazyAssertion notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==). + * @method LazyAssertion notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices. + * @method LazyAssertion notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name. + * @method LazyAssertion notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null. + * @method LazyAssertion notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex. + * @method LazyAssertion notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===). + * @method LazyAssertion null(string|callable $message = null, string $propertyPath = null) Assert that value is null. + * @method LazyAssertion numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric. + * @method LazyAssertion objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists. + * @method LazyAssertion phpVersion(mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version. + * @method LazyAssertion propertiesExist(array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist. + * @method LazyAssertion propertyExists(string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists. + * @method LazyAssertion range(mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers. + * @method LazyAssertion readable(string|callable $message = null, string $propertyPath = null) Assert that the value is something readable. + * @method LazyAssertion regex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex. + * @method LazyAssertion same(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===). + * @method LazyAssertion satisfy(callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback. + * @method LazyAssertion scalar(string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar. + * @method LazyAssertion startsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars. + * @method LazyAssertion string(string|callable $message = null, string $propertyPath = null) Assert that value is a string. + * @method LazyAssertion subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name. + * @method LazyAssertion true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True. + * @method LazyAssertion url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL. + * @method LazyAssertion uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID. + * @method LazyAssertion version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions. + * @method LazyAssertion writeable(string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable. + * @method LazyAssertion all() Switch chain into validation mode for an array of values. + * @method LazyAssertion nullOr() Switch chain into mode allowing nulls, ignoring further assertions. + */ +class LazyAssertion +{ + private $currentChainFailed = false; + private $alwaysTryAll = false; + private $thisChainTryAll = false; + private $currentChain; + private $errors = []; + + /** @var string The class to use as AssertionChain factory */ + private $assertClass = Assert::class; + + /** @var string|LazyAssertionException The class to use for exceptions */ + private $exceptionClass = LazyAssertionException::class; + + /** + * @param mixed $value + * @param string|null $propertyPath + * @param string|callable|null $defaultMessage + * + * @return static + */ + public function that($value, string $propertyPath = null, $defaultMessage = null) + { + $this->currentChainFailed = false; + $this->thisChainTryAll = false; + $assertClass = $this->assertClass; + $this->currentChain = $assertClass::that($value, $defaultMessage, $propertyPath); + + return $this; + } + + /** + * @return static + */ + public function tryAll() + { + if (!$this->currentChain) { + $this->alwaysTryAll = true; + } + + $this->thisChainTryAll = true; + + return $this; + } + + /** + * @param string $method + * @param array $args + * + * @return static + */ + public function __call($method, $args) + { + if (false === $this->alwaysTryAll + && false === $this->thisChainTryAll + && true === $this->currentChainFailed + ) { + return $this; + } + + try { + \call_user_func_array([$this->currentChain, $method], $args); + } catch (AssertionFailedException $e) { + $this->errors[] = $e; + $this->currentChainFailed = true; + } + + return $this; + } + + /** + * @return bool + * + * @throws LazyAssertionException + */ + public function verifyNow(): bool + { + if ($this->errors) { + throw \call_user_func([$this->exceptionClass, 'fromErrors'], $this->errors); + } + + return true; + } + + /** + * @param string $className + * + * @return static + */ + public function setAssertClass(string $className) + { + if (Assert::class !== $className && !\is_subclass_of($className, Assert::class)) { + throw new LogicException($className.' is not (a subclass of) '.Assert::class); + } + + $this->assertClass = $className; + + return $this; + } + + /** + * @param string $className + * + * @return static + */ + public function setExceptionClass(string $className) + { + if (LazyAssertionException::class !== $className && !\is_subclass_of($className, LazyAssertionException::class)) { + throw new LogicException($className.' is not (a subclass of) '.LazyAssertionException::class); + } + + $this->exceptionClass = $className; + + return $this; + } +} diff --git a/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php b/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php new file mode 100644 index 000000000..f76ecc699 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php @@ -0,0 +1,55 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +class LazyAssertionException extends InvalidArgumentException +{ + /** + * @var InvalidArgumentException[] + */ + private $errors = []; + + /** + * @param InvalidArgumentException[] $errors + * + * @return self + */ + public static function fromErrors(array $errors): self + { + $message = \sprintf('The following %d assertions failed:', \count($errors))."\n"; + + $i = 1; + foreach ($errors as $error) { + $message .= \sprintf("%d) %s: %s\n", $i++, $error->getPropertyPath(), $error->getMessage()); + } + + return new static($message, $errors); + } + + public function __construct($message, array $errors) + { + parent::__construct($message, 0, null, null); + + $this->errors = $errors; + } + + /** + * @return InvalidArgumentException[] + */ + public function getErrorExceptions(): array + { + return $this->errors; + } +} diff --git a/vendor/beberlei/assert/lib/Assert/functions.php b/vendor/beberlei/assert/lib/Assert/functions.php new file mode 100644 index 000000000..e0ccbd7d9 --- /dev/null +++ b/vendor/beberlei/assert/lib/Assert/functions.php @@ -0,0 +1,80 @@ +<?php + +/** + * Assert + * + * LICENSE + * + * This source file is subject to the MIT license that is bundled + * with this package in the file LICENSE.txt. + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to [email protected] so I can send you a copy immediately. + */ + +namespace Assert; + +/** + * Start validation on a value, returns {@link AssertionChain}. + * + * The invocation of this method starts an assertion chain + * that is happening on the passed value. + * + * @param mixed $value + * @param string|callable|null $defaultMessage + * @param string $defaultPropertyPath + * + * @return AssertionChain + * + * @example + * + * \Assert\that($value)->notEmpty()->integer(); + * \Assert\that($value)->nullOr()->string()->startsWith("Foo"); + * + * The assertion chain can be stateful, that means be careful when you reuse + * it. You should never pass around the chain. + */ +function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain +{ + return Assert::that($value, $defaultMessage, $defaultPropertyPath); +} + +/** + * Start validation on a set of values, returns {@link AssertionChain}. + * + * @param mixed $values + * @param string|callable|null $defaultMessage + * @param string $defaultPropertyPath + * + * @return AssertionChain + */ +function thatAll($values, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain +{ + return Assert::thatAll($values, $defaultMessage, $defaultPropertyPath); +} + +/** + * Start validation and allow NULL, returns {@link AssertionChain}. + * + * @param mixed $value + * @param string|callable|null $defaultMessage + * @param string $defaultPropertyPath + * + * @return AssertionChain + * + * @deprecated In favour of Assert::thatNullOr($value, $defaultMessage = null, $defaultPropertyPath = null) + */ +function thatNullOr($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain +{ + return Assert::thatNullOr($value, $defaultMessage, $defaultPropertyPath); +} + +/** + * Create a lazy assertion object. + * + * @return LazyAssertion + */ +function lazy(): LazyAssertion +{ + return Assert::lazy(); +} diff --git a/vendor/beberlei/assert/phpstan-code.neon b/vendor/beberlei/assert/phpstan-code.neon new file mode 100644 index 000000000..49aa5723f --- /dev/null +++ b/vendor/beberlei/assert/phpstan-code.neon @@ -0,0 +1,10 @@ +parameters: + autoload_files: + - bin/MethodDocGenerator.php + ignoreErrors: + # is_countable() is available only in PHP 7.3+ + - '#Function is_countable not found#' + + # Calling count() on ResourceBundle and SimpleXMLElement is valid from PHP 7.0+, but does not correctly advertise + # the fact, and so PHPStan has an issue with this. This will be fixed in PHP 7.4+ + - '#Call to function count\(\) with argument type array|Countable|ResourceBundle|SimpleXMLElement will always result in number 1#' diff --git a/vendor/beberlei/assert/phpstan-tests.neon b/vendor/beberlei/assert/phpstan-tests.neon new file mode 100644 index 000000000..e9ab0bcf9 --- /dev/null +++ b/vendor/beberlei/assert/phpstan-tests.neon @@ -0,0 +1,10 @@ +parameters: + ignoreErrors: + # The following errors are ignored as they are testing for errors and exceptions that static analysis correctly identifies as problems. + - '#Call to an undefined method Assert\\AssertionChain::unknownAssertion\(\)#' + - '#Call to an undefined static method Assert\\Assertion::nullOrAssertionDoesNotExist\(\)#' + - '#Class Foo not found#' + - '#Parameter \#1 $value of static method Assert\\Assertion::isCountable\(\) expects array|Countable|ResourceBundle|SimpleXMLElement, string given#' + - '#Parameter \#2 \$operator of static method Assert\\Assertion::version\(\) expects string, null given#' + - '#Static method Assert\\Assertion::allTrue\(\) invoked with 0 parameters, 1-3 required#' + - '#Static method Assert\\Assertion::nullOrMax\(\) invoked with 0 parameters, 2-4 required#' diff --git a/vendor/chillerlan/php-qrcode/.github/FUNDING.yml b/vendor/chillerlan/php-qrcode/.github/FUNDING.yml new file mode 100644 index 000000000..fc89a6739 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/.github/FUNDING.yml @@ -0,0 +1 @@ +ko_fi: codemasher diff --git a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml new file mode 100644 index 000000000..5dd343abd --- /dev/null +++ b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml @@ -0,0 +1,55 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions +# https://github.com/localheinz/php-library-template/blob/master/.github/workflows/continuous-integration.yml +# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml + +on: + - pull_request + - push + +name: "Continuous Integration" + +jobs: + + tests: + name: "Unit Tests" + runs-on: ubuntu-latest + + strategy: + matrix: + php-binary: + - php7.2 + - php7.3 + - php7.4 + + steps: + - name: "Checkout" + uses: actions/[email protected] + + - name: "Install dependencies with composer" + run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest + + - name: "Run unit tests with phpunit" + run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=phpunit.xml --no-coverage + + + code-coverage: + name: "Code Coverage" + runs-on: ubuntu-latest + + steps: + - name: "Checkout" + uses: actions/[email protected] + + - name: "Install locked dependencies with composer" + run: php7.4 $(which composer) install --no-interaction --no-progress --no-suggest + + - name: "Dump Xdebug filter with phpunit/phpunit" + run: php7.4 vendor/bin/phpunit --configuration=phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php + + - name: "Collect code coverage with Xdebug and phpunit/phpunit" + run: php7.4 vendor/bin/phpunit --configuration=phpunit.xml --prepend=.build/phpunit/xdebug-filter.php + + - name: "Send code coverage report to Codecov.io" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: bash <(curl -s https://codecov.io/bash) diff --git a/vendor/chillerlan/php-qrcode/.gitignore b/vendor/chillerlan/php-qrcode/.gitignore new file mode 100644 index 000000000..ecebb9964 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/.gitignore @@ -0,0 +1,5 @@ +.build/* +.idea/* +vendor/* +composer.lock +*.phpunit.result.cache diff --git a/vendor/chillerlan/php-qrcode/.scrutinizer.yml b/vendor/chillerlan/php-qrcode/.scrutinizer.yml new file mode 100644 index 000000000..7fdd2a4dc --- /dev/null +++ b/vendor/chillerlan/php-qrcode/.scrutinizer.yml @@ -0,0 +1,5 @@ +filter: + excluded_paths: + - examples/* + - tests/* + - vendor/* diff --git a/vendor/chillerlan/php-qrcode/.travis.yml b/vendor/chillerlan/php-qrcode/.travis.yml new file mode 100644 index 000000000..78b8d79e9 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/.travis.yml @@ -0,0 +1,19 @@ +addons: + apt: + packages: + - imagemagick + +language: php + +matrix: + include: + - php: 7.2 + - php: 7.3 + - php: 7.4 + +before_install: + - pecl channel-update pecl.php.net + - printf "\n" | pecl install imagick +install: travis_retry composer install --no-interaction --prefer-source +script: vendor/bin/phpunit --configuration phpunit.xml --coverage-clover clover.xml +after_script: bash <(curl -s https://codecov.io/bash) diff --git a/vendor/OTPHP/LICENCE b/vendor/chillerlan/php-qrcode/LICENSE index d14cbc23c..dac852818 100644 --- a/vendor/OTPHP/LICENCE +++ b/vendor/chillerlan/php-qrcode/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2011 Le Lag +The MIT License (MIT) + +Copyright (c) 2015 Smiley <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -17,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/vendor/chillerlan/php-qrcode/README.md b/vendor/chillerlan/php-qrcode/README.md new file mode 100644 index 000000000..075b2a376 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/README.md @@ -0,0 +1,392 @@ +# chillerlan/php-qrcode + +A PHP7.2+ QR Code library based on the [implementation](https://github.com/kazuhikoarase/qrcode-generator) by [Kazuhiko Arase](https://github.com/kazuhikoarase), +namespaced, cleaned up, improved and other stuff. + +[![Packagist version][packagist-badge]][packagist] +[![License][license-badge]][license] +[![Travis CI][travis-badge]][travis] +[![CodeCov][coverage-badge]][coverage] +[![Scrunitizer CI][scrutinizer-badge]][scrutinizer] +[![Packagist downloads][downloads-badge]][downloads] +[![PayPal donate][donate-badge]][donate] + +[![Continuous Integration][gh-action-badge]][gh-action] + +[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-qrcode.svg?style=flat-square +[packagist]: https://packagist.org/packages/chillerlan/php-qrcode +[license-badge]: https://img.shields.io/github/license/chillerlan/php-qrcode.svg?style=flat-square +[license]: https://github.com/chillerlan/php-qrcode/blob/main/LICENSE +[travis-badge]: https://img.shields.io/travis/chillerlan/php-qrcode.svg?style=flat-square +[travis]: https://travis-ci.org/chillerlan/php-qrcode +[coverage-badge]: https://img.shields.io/codecov/c/github/chillerlan/php-qrcode.svg?style=flat-square +[coverage]: https://codecov.io/github/chillerlan/php-qrcode +[scrutinizer-badge]: https://img.shields.io/scrutinizer/g/chillerlan/php-qrcode.svg?style=flat-square +[scrutinizer]: https://scrutinizer-ci.com/g/chillerlan/php-qrcode +[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-qrcode.svg?style=flat-square +[downloads]: https://packagist.org/packages/chillerlan/php-qrcode/stats +[donate-badge]: https://img.shields.io/badge/donate-paypal-ff33aa.svg?style=flat-square +[donate]: https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4 +[gh-action-badge]: https://github.com/chillerlan/php-qrcode/workflows/Continuous%20Integration/badge.svg +[gh-action]: https://github.com/chillerlan/php-qrcode/actions + +## Documentation + +### Requirements +- PHP 7.2+ + - `ext-mbstring` + - optional: + - `ext-json`, `ext-gd` + - `ext-imagick` with [ImageMagick](https://imagemagick.org) installed + - [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module + +### Installation +**requires [composer](https://getcomposer.org)** + +via terminal: `composer require chillerlan/php-qrcode` + +*composer.json* (note: replace `dev-master` with a [version boundary](https://getcomposer.org/doc/articles/versions.md), e.g. `^3.2`) +```json +{ + "require": { + "php": "^7.2", + "chillerlan/php-qrcode": "^3.4" + } +} +``` + +### Usage +We want to encode this URI for a mobile authenticator into a QRcode image: +```php +$data = 'otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net'; + +//quick and simple: +echo '<img src="'.(new QRCode)->render($data).'" alt="QR Code" />'; +``` + +<p align="center"> + <img alt="QR codes are awesome!" src="https://raw.githubusercontent.com/chillerlan/php-qrcode/main/examples/example_image.png"> + <img alt="QR codes are awesome!" src="https://raw.githubusercontent.com/chillerlan/php-qrcode/main/examples/example_svg.png"> +</p> + +Wait, what was that? Please again, slower! + +### Advanced usage + +Ok, step by step. First you'll need a `QRCode` instance, which can be optionally invoked with a `QROptions` (or a [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerInterface.php), respectively) object as the only parameter. + +```php +$options = new QROptions([ + 'version' => 5, + 'outputType' => QRCode::OUTPUT_MARKUP_SVG, + 'eccLevel' => QRCode::ECC_L, +]); + +// invoke a fresh QRCode instance +$qrcode = new QRCode($options); + +// and dump the output +$qrcode->render($data); + +// ...with additional cache file +$qrcode->render($data, '/path/to/file.svg'); +``` + +In case you just want the raw QR code matrix, call `QRCode::getMatrix()` - this method is also called internally from `QRCode::render()`. See also [Custom output modules](#custom-qroutputinterface). + +```php +$matrix = $qrcode->getMatrix($data); + +foreach($matrix->matrix() as $y => $row){ + foreach($row as $x => $module){ + + // get a module's value + $value = $module; + $value = $matrix->get($x, $y); + + // boolean check a module + if($matrix->check($x, $y)){ // if($module >> 8 > 0) + // do stuff, the module is dark + } + else{ + // do other stuff, the module is light + } + + } +} +``` + +Have a look [in this folder](https://github.com/chillerlan/php-qrcode/tree/master/examples) for some more usage examples. + +#### Custom module values +Previous versions of `QRCode` held only boolean matrix values that only allowed to determine whether a module was dark or not. Now you can distinguish between different parts of the matrix, namely the several required patterns from the QR Code specification, and use them in different ways. + +The dark value is the module (light) value shifted by 8 bits to the left: `$value = $M_TYPE << ($bool ? 8 : 0);`, where `$M_TYPE` is one of the `QRMatrix::M_*` constants. +You can check the value for a type explicitly like... +```php +// for true (dark) +$value >> 8 === $M_TYPE; + +//for false (light) +$value === $M_TYPE; +``` +...or you can perform a loose check, ignoring the module value +```php +// for true +$value >> 8 > 0; + +// for false +$value >> 8 === 0 +``` + +See also `QRMatrix::set()`, `QRMatrix::check()` and [`QRMatrix` constants](#qrmatrix-constants). + +To map the values and properly render the modules for the given `QROutputInterface`, it's necessary to overwrite the default values: +```php +$options = new QROptions; + +// for HTML, SVG and ImageMagick +$options->moduleValues = [ + // finder + 1536 => '#A71111', // dark (true) + 6 => '#FFBFBF', // light (false) + // alignment + 2560 => '#A70364', + 10 => '#FFC9C9', + // timing + 3072 => '#98005D', + 12 => '#FFB8E9', + // format + 3584 => '#003804', + 14 => '#00FB12', + // version + 4096 => '#650098', + 16 => '#E0B8FF', + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + // darkmodule + 512 => '#080063', + // separator + 8 => '#AFBFBF', + // quietzone + 18 => '#FFFFFF', +]; + +// for the image output types +$options->moduleValues = [ + 512 => [0, 0, 0], + // ... +]; + +// for string/text output +$options->moduleValues = [ + 512 => '#', + // ... +]; +``` + +#### Custom `QROutputInterface` +Instead of bloating your code you can simply create your own output interface by extending `QROutputAbstract`. Have a look at the [built-in output modules](https://github.com/chillerlan/php-qrcode/tree/master/src/Output). + +```php +class MyCustomOutput extends QROutputAbstract{ + + // inherited from QROutputAbstract + protected $matrix; // QRMatrix + protected $moduleCount; // modules QRMatrix::size() + protected $options; // MyCustomOptions or QROptions + protected $scale; // scale factor from options + protected $length; // length of the matrix ($moduleCount * $scale) + + // ...check/set default module values (abstract method, called by the constructor) + protected function setModuleValues():void{ + // $this->moduleValues = ... + } + + // QROutputInterface::dump() + public function dump(string $file = null):string{ + $output = ''; + + for($row = 0; $row < $this->moduleCount; $row++){ + for($col = 0; $col < $this->moduleCount; $col++){ + $output .= (int)$this->matrix->check($col, $row); + } + } + + return $output; + } + +} +``` + +In case you need additional settings for your output module, just extend `QROptions`... +``` +class MyCustomOptions extends QROptions{ + protected $myParam = 'defaultValue'; + + // ... +} +``` +...or use the [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerInterface.php), which is the more flexible approach. + +```php +trait MyCustomOptionsTrait{ + protected $myParam = 'defaultValue'; + + // ... +} +``` +set the options: +```php +$myOptions = [ + 'version' => 5, + 'eccLevel' => QRCode::ECC_L, + 'outputType' => QRCode::OUTPUT_CUSTOM, + 'outputInterface' => MyCustomOutput::class, + // your custom settings + 'myParam' => 'whatever value', + ]; + +// extends QROptions +$myCustomOptions = new MyCustomOptions($myOptions); + +// using the SettingsContainerInterface +$myCustomOptions = new class($myOptions) extends SettingsContainerAbstract{ + use QROptionsTrait, MyCustomOptionsTrait; +}; + +``` + +You can then call `QRCode` with the custom modules... +```php +(new QRCode($myCustomOptions))->render($data); +``` +...or invoke the `QROutputInterface` manually. +```php +$qrOutputInterface = new MyCustomOutput($myCustomOptions, (new QRCode($myCustomOptions))->getMatrix($data)); + +//dump the output, which is equivalent to QRCode::render() +$qrOutputInterface->dump(); +``` + +### API + +#### `QRCode` methods +method | return | description +------ | ------ | ----------- +`__construct(QROptions $options = null)` | - | see [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerInterface.php) +`render(string $data, string $file = null)` | mixed, `QROutputInterface::dump()` | renders a QR Code for the given `$data` and `QROptions`, saves `$file` optional +`getMatrix(string $data)` | `QRMatrix` | returns a `QRMatrix` object for the given `$data` and current `QROptions` +`initDataInterface(string $data)` | `QRDataInterface` | returns a fresh `QRDataInterface` for the given `$data` +`isNumber(string $string)` | bool | checks if a string qualifies for `Number` +`isAlphaNum(string $string)` | bool | checks if a string qualifies for `AlphaNum` +`isKanji(string $string)` | bool | checks if a string qualifies for `Kanji` + +#### `QRCode` constants +name | description +---- | ----------- +`VERSION_AUTO` | `QROptions::$version` +`MASK_PATTERN_AUTO` | `QROptions::$maskPattern` +`OUTPUT_MARKUP_SVG`, `OUTPUT_MARKUP_HTML` | `QROptions::$outputType` markup +`OUTPUT_IMAGE_PNG`, `OUTPUT_IMAGE_JPG`, `OUTPUT_IMAGE_GIF` | `QROptions::$outputType` image +`OUTPUT_STRING_JSON`, `OUTPUT_STRING_TEXT` | `QROptions::$outputType` string +`OUTPUT_IMAGICK` | `QROptions::$outputType` ImageMagick +`OUTPUT_FPDF` | `QROptions::$outputType` PDF, using [FPDF](https://github.com/setasign/fpdf) +`OUTPUT_CUSTOM` | `QROptions::$outputType`, requires `QROptions::$outputInterface` +`ECC_L`, `ECC_M`, `ECC_Q`, `ECC_H`, | ECC-Level: 7%, 15%, 25%, 30% in `QROptions::$eccLevel` +`DATA_NUMBER`, `DATA_ALPHANUM`, `DATA_BYTE`, `DATA_KANJI` | `QRDataInterface::$datamode` + +#### `QROptions` properties +property | type | default | allowed | description +-------- | ---- | ------- | ------- | ----------- +`$version` | int | `QRCode::VERSION_AUTO` | 1...40 | the [QR Code version number](http://www.qrcode.com/en/about/version.html) +`$versionMin` | int | 1 | 1...40 | Minimum QR version (if `$version = QRCode::VERSION_AUTO`) +`$versionMax` | int | 40 | 1...40 | Maximum QR version (if `$version = QRCode::VERSION_AUTO`) +`$eccLevel` | int | `QRCode::ECC_L` | `QRCode::ECC_X` | Error correct level, where X = L (7%), M (15%), Q (25%), H (30%) +`$maskPattern` | int | `QRCode::MASK_PATTERN_AUTO` | 0...7 | Mask Pattern to use +`$addQuietzone` | bool | `true` | - | Add a "quiet zone" (margin) according to the QR code spec +`$quietzoneSize` | int | 4 | clamped to 0 ... `$matrixSize / 2` | Size of the quiet zone +`$dataMode` | string | `null` | `Number`, `AlphaNum`, `Kanji`, `Byte` | allows overriding the data type detection +`$outputType` | string | `QRCode::OUTPUT_IMAGE_PNG` | `QRCode::OUTPUT_*` | built-in output type +`$outputInterface` | string | `null` | * | FQCN of the custom `QROutputInterface` if `QROptions::$outputType` is set to `QRCode::OUTPUT_CUSTOM` +`$cachefile` | string | `null` | * | optional cache file path +`$eol` | string | `PHP_EOL` | * | newline string (HTML, SVG, TEXT) +`$scale` | int | 5 | * | size of a QR code pixel (SVG, IMAGE_*), HTML -> via CSS +`$cssClass` | string | `null` | * | a common css class +`$svgOpacity` | float | 1.0 | 0...1 | +`$svgDefs` | string | * | * | anything between [`<defs>`](https://developer.mozilla.org/docs/Web/SVG/Element/defs) +`$svgViewBoxSize` | int | `null` | * | a positive integer which defines width/height of the [viewBox attribute](https://css-tricks.com/scale-svg/#article-header-id-3) +`$textDark` | string | '🔴' | * | string substitute for dark +`$textLight` | string | '⭕' | * | string substitute for light +`$markupDark` | string | '#000' | * | markup substitute for dark (CSS value) +`$markupLight` | string | '#fff' | * | markup substitute for light (CSS value) +`$imageBase64` | bool | `true` | - | whether to return the image data as base64 or raw like from `file_get_contents()` +`$imageTransparent` | bool | `true` | - | toggle transparency (no jpeg support) +`$imageTransparencyBG` | array | `[255, 255, 255]` | `[R, G, B]` | the RGB values for the transparent color, see [`imagecolortransparent()`](http://php.net/manual/function.imagecolortransparent.php) +`$pngCompression` | int | -1 | -1 ... 9 | `imagepng()` compression level, -1 = auto +`$jpegQuality` | int | 85 | 0 - 100 | `imagejpeg()` quality +`$imagickFormat` | string | 'png' | * | ImageMagick output type, see `Imagick::setType()` +`$imagickBG` | string | `null` | * | ImageMagick background color, see `ImagickPixel::__construct()` +`$moduleValues` | array | `null` | * | Module values map, see [Custom output modules](#custom-qroutputinterface) and `QROutputInterface::DEFAULT_MODULE_VALUES` + +#### `QRMatrix` methods +method | return | description +------ | ------ | ----------- +`__construct(int $version, int $eclevel)` | - | - +`matrix()` | array | the internal matrix representation as a 2 dimensional array +`version()` | int | the current QR Code version +`eccLevel()` | int | current ECC level +`maskPattern()` | int | the used mask pattern +`size()` | int | the absoulute size of the matrix, including quiet zone (if set). `$version * 4 + 17 + 2 * $quietzone` +`get(int $x, int $y)` | int | returns the value of the module +`set(int $x, int $y, bool $value, int $M_TYPE)` | `QRMatrix` | sets the `$M_TYPE` value for the module +`check(int $x, int $y)` | bool | checks whether a module is true (dark) or false (light) +`setLogoSpace(int $width, int $height, int $startX = null, int $startY = null)` | `QRMatrix` | creates a logo space in the matrix + +#### `QRMatrix` constants +name | light (false) | dark (true) | description +---- | ------------- | ----------- | ----------- +`M_NULL` | 0 | - | module not set (should never appear. if so, there's an error) +`M_DARKMODULE` | - | 512 | once per matrix at `$xy = [8, 4 * $version + 9]` +`M_DATA` | 4 | 1024 | the actual encoded data +`M_FINDER` | 6 | 1536 | the 7x7 finder patterns +`M_SEPARATOR` | 8 | - | separator lines around the finder patterns +`M_ALIGNMENT` | 10 | 2560 | the 5x5 alignment patterns +`M_TIMING` | 12 | 3072 | the timing pattern lines +`M_FORMAT` | 14 | 3584 | format information pattern +`M_VERSION` | 16 | 4096 | version information pattern +`M_QUIETZONE` | 18 | - | margin around the QR Code +`M_LOGO` | 20 | - | space for a logo image (not used yet) +`M_TEST` | 255 | 65280 | test value + + +### Notes +The QR encoder, especially the subroutines for mask pattern testing, can cause high CPU load on increased matrix size. +You can avoid a part of this load by choosing a fast output module, like `OUTPUT_IMAGE_*` and setting the mask pattern manually (which may result in unreadable QR Codes). +Oh hey and don't forget to sanitize any user input! + +### Disclaimer! +I don't take responsibility for molten CPUs, misled applications, failed log-ins etc.. Use at your own risk! + +#### Trademark Notice + +The word "QR Code" is registered trademark of *DENSO WAVE INCORPORATED*<br> +http://www.denso-wave.com/qrcode/faqpatent-e.html + +### Framework Integration +- Drupal [Google Authenticator Login `ga_login`](https://www.drupal.org/project/ga_login) +- WordPress [`wp-two-factor-auth`](https://github.com/sjinks/wp-two-factor-auth) +- WordPress [Simple 2FA `simple-2fa`](https://wordpress.org/plugins/simple-2fa/) +- WoltLab Suite [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/) +- [Cachet](https://github.com/CachetHQ/Cachet) +- [Appwrite](https://github.com/appwrite/appwrite) +- other uses: [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE) + + +Hi, please check out my other projects that are way cooler than qrcodes! + +- [php-oauth-core](https://github.com/chillerlan/php-oauth-core) - an OAuth 1/2 client library along with a bunch of [providers](https://github.com/chillerlan/php-oauth-providers) +- [php-httpinterface](https://github.com/chillerlan/php-httpinterface) - a PSR-7/15/17/18 implemetation +- [php-database](https://github.com/chillerlan/php-database) - a database client & querybuilder for MySQL, Postgres, SQLite, MSSQL, Firebird + diff --git a/vendor/chillerlan/php-qrcode/composer.json b/vendor/chillerlan/php-qrcode/composer.json new file mode 100644 index 000000000..c2299a350 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/composer.json @@ -0,0 +1,51 @@ +{ + "name": "chillerlan/php-qrcode", + "description": "A QR code generator. PHP 7.2+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "license": "MIT", + "minimum-stability": "stable", + "type": "library", + "keywords": [ + "QR code", "qrcode", "qr", "qrcode-generator", "phpqrcode" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase" + }, + { + "name": "Smiley", + "email": "[email protected]", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage":"https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "require": { + "php": "^7.2", + "ext-mbstring": "*", + "chillerlan/php-settings-container": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5", + "setasign/fpdf": "^1.8.2" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output." + }, + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "chillerlan\\QRCodePublic\\": "public/", + "chillerlan\\QRCodeTest\\": "tests/", + "chillerlan\\QRCodeExamples\\": "examples/" + } + } +} diff --git a/vendor/chillerlan/php-qrcode/examples/MyCustomOutput.php b/vendor/chillerlan/php-qrcode/examples/MyCustomOutput.php new file mode 100644 index 000000000..3c01f8646 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/MyCustomOutput.php @@ -0,0 +1,36 @@ +<?php +/** + * Class MyCustomOutput + * + * @filesource MyCustomOutput.php + * @created 24.12.2017 + * @package chillerlan\QRCodeExamples + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\Output\QROutputAbstract; + +class MyCustomOutput extends QROutputAbstract{ + + protected function setModuleValues():void{ + // TODO: Implement setModuleValues() method. + } + + public function dump(string $file = null){ + + $output = ''; + + for($row = 0; $row < $this->moduleCount; $row++){ + for($col = 0; $col < $this->moduleCount; $col++){ + $output .= (int)$this->matrix->check($col, $row); + } + } + + return $output; + } + +} diff --git a/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php b/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php new file mode 100644 index 000000000..f9d94ae34 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php @@ -0,0 +1,81 @@ +<?php +/** + * Class QRImageWithLogo + * + * @filesource QRImageWithLogo.php + * @created 18.11.2020 + * @package chillerlan\QRCodeExamples + * @author smiley <[email protected]> + * @copyright 2020 smiley + * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\Output\{QRCodeOutputException, QRImage}; + +use function imagecopyresampled, imagecreatefrompng, imagesx, imagesy, is_file, is_readable; + +/** + * @property \chillerlan\QRCodeExamples\LogoOptions $options + */ +class QRImageWithLogo extends QRImage{ + + /** + * @param string|null $file + * @param string|null $logo + * + * @return string + * @throws \chillerlan\QRCode\Output\QRCodeOutputException + */ + public function dump(string $file = null, string $logo = null):string{ + // set returnResource to true to skip further processing for now + $this->options->returnResource = true; + + // of course you could accept other formats too (such as resource or Imagick) + // i'm not checking for the file type either for simplicity reasons (assuming PNG) + if(!is_file($logo) || !is_readable($logo)){ + throw new QRCodeOutputException('invalid logo'); + } + + $this->matrix->setLogoSpace( + $this->options->logoWidth, + $this->options->logoHeight + // not utilizing the position here + ); + + // there's no need to save the result of dump() into $this->image here + parent::dump($file); + + $im = imagecreatefrompng($logo); + + // get logo image size + $w = imagesx($im); + $h = imagesy($im); + + // set new logo size, leave a border of 1 module + $lw = ($this->options->logoWidth - 2) * $this->options->scale; + $lh = ($this->options->logoHeight - 2) * $this->options->scale; + + // get the qrcode size + $ql = $this->matrix->size() * $this->options->scale; + + // scale the logo and copy it over. done! + imagecopyresampled($this->image, $im, ($ql - $lw) / 2, ($ql - $lh) / 2, 0, 0, $lw, $lh, $w, $h); + + $imageData = $this->dumpImage(); + + if($file !== null){ + $this->saveToFile($imageData, $file); + } + + if($this->options->imageBase64){ + $imageData = 'data:image/'.$this->options->outputType.';base64,'.base64_encode($imageData); + } + + return $imageData; + } + +} diff --git a/vendor/chillerlan/php-qrcode/examples/QRImageWithText.php b/vendor/chillerlan/php-qrcode/examples/QRImageWithText.php new file mode 100644 index 000000000..5ca572f30 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/QRImageWithText.php @@ -0,0 +1,104 @@ +<?php +/** + * Class QRImageWithText + * + * example for additional text + * + * @link https://github.com/chillerlan/php-qrcode/issues/35 + * + * @filesource QRImageWithText.php + * @created 22.06.2019 + * @package chillerlan\QRCodeExamples + * @author smiley <[email protected]> + * @copyright 2019 smiley + * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\Output\QRImage; +use function base64_encode, imagechar, imagecolorallocate, imagecolortransparent, imagecopymerge, imagecreatetruecolor, + imagedestroy, imagefilledrectangle, imagefontwidth, in_array, round, str_split, strlen; + +class QRImageWithText extends QRImage{ + + /** + * @param string|null $file + * @param string|null $text + * + * @return string + */ + public function dump(string $file = null, string $text = null):string{ + $this->image = imagecreatetruecolor($this->length, $this->length); + $background = imagecolorallocate($this->image, ...$this->options->imageTransparencyBG); + + if((bool)$this->options->imageTransparent && in_array($this->options->outputType, $this::TRANSPARENCY_TYPES, true)){ + imagecolortransparent($this->image, $background); + } + + imagefilledrectangle($this->image, 0, 0, $this->length, $this->length, $background); + + foreach($this->matrix->matrix() as $y => $row){ + foreach($row as $x => $M_TYPE){ + $this->setPixel($x, $y, $this->moduleValues[$M_TYPE]); + } + } + + // render text output if a string is given + if($text !== null){ + $this->addText($text); + } + + $imageData = $this->dumpImage($file); + + if((bool)$this->options->imageBase64){ + $imageData = 'data:image/'.$this->options->outputType.';base64,'.base64_encode($imageData); + } + + return $imageData; + } + + /** + * @param string $text + */ + protected function addText(string $text):void{ + // save the qrcode image + $qrcode = $this->image; + + // options things + $textSize = 3; // see imagefontheight() and imagefontwidth() + $textBG = [200, 200, 200]; + $textColor = [50, 50, 50]; + + $bgWidth = $this->length; + $bgHeight = $bgWidth + 20; // 20px extra space + + // create a new image with additional space + $this->image = imagecreatetruecolor($bgWidth, $bgHeight); + $background = imagecolorallocate($this->image, ...$textBG); + + // allow transparency + if((bool)$this->options->imageTransparent && in_array($this->options->outputType, $this::TRANSPARENCY_TYPES, true)){ + imagecolortransparent($this->image, $background); + } + + // fill the background + imagefilledrectangle($this->image, 0, 0, $bgWidth, $bgHeight, $background); + + // copy over the qrcode + imagecopymerge($this->image, $qrcode, 0, 0, 0, 0, $this->length, $this->length, 100); + imagedestroy($qrcode); + + $fontColor = imagecolorallocate($this->image, ...$textColor); + $w = imagefontwidth($textSize); + $x = round(($bgWidth - strlen($text) * $w) / 2); + + // loop through the string and draw the letters + foreach(str_split($text) as $i => $chr){ + imagechar($this->image, $textSize, $i * $w + $x, $this->length, $chr, $fontColor); + } + } + +} diff --git a/vendor/chillerlan/php-qrcode/examples/custom_output.php b/vendor/chillerlan/php-qrcode/examples/custom_output.php new file mode 100644 index 000000000..71ea62682 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/custom_output.php @@ -0,0 +1,38 @@ +<?php +/** + * + * @filesource custom_output.php + * @created 24.12.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + +// invoke the QROutputInterface manually +$options = new QROptions([ + 'version' => 5, + 'eccLevel' => QRCode::ECC_L, +]); + +$qrOutputInterface = new MyCustomOutput($options, (new QRCode($options))->getMatrix($data)); + +var_dump($qrOutputInterface->dump()); + + +// or just +$options = new QROptions([ + 'version' => 5, + 'eccLevel' => QRCode::ECC_L, + 'outputType' => QRCode::OUTPUT_CUSTOM, + 'outputInterface' => MyCustomOutput::class, +]); + +var_dump((new QRCode($options))->render($data)); diff --git a/vendor/chillerlan/php-qrcode/examples/example_image.png b/vendor/chillerlan/php-qrcode/examples/example_image.png Binary files differnew file mode 100644 index 000000000..b4a80f2ab --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/example_image.png diff --git a/vendor/chillerlan/php-qrcode/examples/example_svg.png b/vendor/chillerlan/php-qrcode/examples/example_svg.png Binary files differnew file mode 100644 index 000000000..f1e7b32f7 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/example_svg.png diff --git a/vendor/chillerlan/php-qrcode/examples/fpdf.php b/vendor/chillerlan/php-qrcode/examples/fpdf.php new file mode 100644 index 000000000..9c690a7f7 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/fpdf.php @@ -0,0 +1,47 @@ +<?php + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__ . '/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + +$options = new QROptions([ + 'version' => 7, + 'outputType' => QRCode::OUTPUT_FPDF, + 'eccLevel' => QRCode::ECC_L, + 'scale' => 5, + 'imageBase64' => false, + 'moduleValues' => [ + // finder + 1536 => [0, 63, 255], // dark (true) + 6 => [255, 255, 255], // light (false), white is the transparency color and is enabled by default + // alignment + 2560 => [255, 0, 255], + 10 => [255, 255, 255], + // timing + 3072 => [255, 0, 0], + 12 => [255, 255, 255], + // format + 3584 => [67, 191, 84], + 14 => [255, 255, 255], + // version + 4096 => [62, 174, 190], + 16 => [255, 255, 255], + // data + 1024 => [0, 0, 0], + 4 => [255, 255, 255], + // darkmodule + 512 => [0, 0, 0], + // separator + 8 => [255, 255, 255], + // quietzone + 18 => [255, 255, 255], + ], +]); + +\header('Content-type: application/pdf'); + +echo (new QRCode($options))->render($data); diff --git a/vendor/chillerlan/php-qrcode/examples/html.php b/vendor/chillerlan/php-qrcode/examples/html.php new file mode 100644 index 000000000..aa5305d24 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/html.php @@ -0,0 +1,102 @@ +<?php +/** + * + * @filesource html.php + * @created 21.12.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once '../vendor/autoload.php'; + +header('Content-Type: text/html; charset=utf-8'); + +?> +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <title>QRCode test</title> + <style> + body{ + margin: 5em; + padding: 0; + } + + div.qrcode{ + margin: 0; + padding: 0; + } + + /* rows */ + div.qrcode > div { + margin: 0; + padding: 0; + height: 10px; + } + + /* modules */ + div.qrcode > div > span { + display: inline-block; + width: 10px; + height: 10px; + } + + div.qrcode > div > span { + background-color: #ccc; + } + </style> +</head> +<body> + <div class="qrcode"> +<?php + + $data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + + $options = new QROptions([ + 'version' => 5, + 'outputType' => QRCode::OUTPUT_MARKUP_HTML, + 'eccLevel' => QRCode::ECC_L, + 'moduleValues' => [ + // finder + 1536 => '#A71111', // dark (true) + 6 => '#FFBFBF', // light (false) + // alignment + 2560 => '#A70364', + 10 => '#FFC9C9', + // timing + 3072 => '#98005D', + 12 => '#FFB8E9', + // format + 3584 => '#003804', + 14 => '#00FB12', + // version + 4096 => '#650098', + 16 => '#E0B8FF', + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + // darkmodule + 512 => '#080063', + // separator + 8 => '#AFBFBF', + // quietzone + 18 => '#FFFFFF', + ], + ]); + + echo (new QRCode($options))->render($data); + +?> + </div> +</body> +</html> + + + diff --git a/vendor/chillerlan/php-qrcode/examples/image.php b/vendor/chillerlan/php-qrcode/examples/image.php new file mode 100644 index 000000000..89ba2a9a8 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/image.php @@ -0,0 +1,60 @@ +<?php +/** + * + * @filesource image.php + * @created 24.12.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + +$options = new QROptions([ + 'version' => 7, + 'outputType' => QRCode::OUTPUT_IMAGE_PNG, + 'eccLevel' => QRCode::ECC_L, + 'scale' => 5, + 'imageBase64' => false, + 'moduleValues' => [ + // finder + 1536 => [0, 63, 255], // dark (true) + 6 => [255, 255, 255], // light (false), white is the transparency color and is enabled by default + // alignment + 2560 => [255, 0, 255], + 10 => [255, 255, 255], + // timing + 3072 => [255, 0, 0], + 12 => [255, 255, 255], + // format + 3584 => [67, 191, 84], + 14 => [255, 255, 255], + // version + 4096 => [62, 174, 190], + 16 => [255, 255, 255], + // data + 1024 => [0, 0, 0], + 4 => [255, 255, 255], + // darkmodule + 512 => [0, 0, 0], + // separator + 8 => [255, 255, 255], + // quietzone + 18 => [255, 255, 255], + ], +]); + +header('Content-type: image/png'); + +echo (new QRCode($options))->render($data); + + + + + diff --git a/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php b/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php new file mode 100644 index 000000000..987e10c11 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php @@ -0,0 +1,44 @@ +<?php +/** + * + * @filesource imageWithLogo.php + * @created 18.11.2020 + * @author smiley <[email protected]> + * @copyright 2020 smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; +/** + * @property int $logoWidth + * @property int $logoHeight + * + * @noinspection PhpIllegalPsrClassPathInspection + */ +class LogoOptions extends QROptions{ + protected $logoWidth; + protected $logoHeight; +} + +$options = new LogoOptions; + +$options->version = 7; +$options->eccLevel = QRCode::ECC_H; +$options->imageBase64 = false; +$options->logoWidth = 13; +$options->logoHeight = 13; +$options->scale = 5; +$options->imageTransparent = false; + +header('Content-type: image/png'); + +$qrOutputInterface = new QRImageWithLogo($options, (new QRCode($options))->getMatrix($data)); + +// dump the output, with an additional logo +echo $qrOutputInterface->dump(null, __DIR__.'/octocat.png'); diff --git a/vendor/chillerlan/php-qrcode/examples/imageWithText.php b/vendor/chillerlan/php-qrcode/examples/imageWithText.php new file mode 100644 index 000000000..050781cba --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/imageWithText.php @@ -0,0 +1,33 @@ +<?php +/** + * example for additional text + * @link https://github.com/chillerlan/php-qrcode/issues/35 + * + * @filesource imageWithText.php + * @created 22.06.2019 + * @author Smiley <[email protected]> + * @copyright 2019 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + +$options = new QROptions([ + 'version' => 7, + 'outputType' => QRCode::OUTPUT_IMAGE_PNG, + 'scale' => 3, + 'imageBase64' => false, +]); + +header('Content-type: image/png'); + +$qrOutputInterface = new QRImageWithText($options, (new QRCode($options))->getMatrix($data)); + +// dump the output, with additional text +echo $qrOutputInterface->dump(null, 'example text'); diff --git a/vendor/chillerlan/php-qrcode/examples/imagick.php b/vendor/chillerlan/php-qrcode/examples/imagick.php new file mode 100644 index 000000000..6bec4d02e --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/imagick.php @@ -0,0 +1,59 @@ +<?php +/** + * + * @filesource image.php + * @created 24.12.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + +$options = new QROptions([ + 'version' => 7, + 'outputType' => QRCode::OUTPUT_IMAGICK, + 'eccLevel' => QRCode::ECC_L, + 'scale' => 5, + 'moduleValues' => [ + // finder + 1536 => '#A71111', // dark (true) + 6 => '#FFBFBF', // light (false) + // alignment + 2560 => '#A70364', + 10 => '#FFC9C9', + // timing + 3072 => '#98005D', + 12 => '#FFB8E9', + // format + 3584 => '#003804', + 14 => '#00FB12', + // version + 4096 => '#650098', + 16 => '#E0B8FF', + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + // darkmodule + 512 => '#080063', + // separator + 8 => '#DDDDDD', + // quietzone + 18 => '#DDDDDD', + ], +]); + +header('Content-type: image/png'); + +echo (new QRCode($options))->render($data); + + + + + diff --git a/vendor/chillerlan/php-qrcode/examples/octocat.png b/vendor/chillerlan/php-qrcode/examples/octocat.png Binary files differnew file mode 100644 index 000000000..f9050b935 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/octocat.png diff --git a/vendor/chillerlan/php-qrcode/examples/svg.php b/vendor/chillerlan/php-qrcode/examples/svg.php new file mode 100644 index 000000000..a7a159d70 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/svg.php @@ -0,0 +1,77 @@ +<?php +/** + * + * @filesource svg.php + * @created 21.12.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; +$gzip = true; + +$options = new QROptions([ + 'version' => 7, + 'outputType' => QRCode::OUTPUT_MARKUP_SVG, + 'eccLevel' => QRCode::ECC_L, + 'svgViewBoxSize' => 530, + 'addQuietzone' => true, + 'cssClass' => 'my-css-class', + 'svgOpacity' => 1.0, + 'svgDefs' => ' + <linearGradient id="g2"> + <stop offset="0%" stop-color="#39F" /> + <stop offset="100%" stop-color="#F3F" /> + </linearGradient> + <linearGradient id="g1"> + <stop offset="0%" stop-color="#F3F" /> + <stop offset="100%" stop-color="#39F" /> + </linearGradient> + <style>rect{shape-rendering:crispEdges}</style>', + 'moduleValues' => [ + // finder + 1536 => 'url(#g1)', // dark (true) + 6 => '#fff', // light (false) + // alignment + 2560 => 'url(#g1)', + 10 => '#fff', + // timing + 3072 => 'url(#g1)', + 12 => '#fff', + // format + 3584 => 'url(#g1)', + 14 => '#fff', + // version + 4096 => 'url(#g1)', + 16 => '#fff', + // data + 1024 => 'url(#g2)', + 4 => '#fff', + // darkmodule + 512 => 'url(#g1)', + // separator + 8 => '#fff', + // quietzone + 18 => '#fff', + ], +]); + +$qrcode = (new QRCode($options))->render($data); + +header('Content-type: image/svg+xml'); + +if($gzip === true){ + header('Vary: Accept-Encoding'); + header('Content-Encoding: gzip'); + $qrcode = gzencode($qrcode ,9); +} +echo $qrcode; + + diff --git a/vendor/chillerlan/php-qrcode/examples/text.php b/vendor/chillerlan/php-qrcode/examples/text.php new file mode 100644 index 000000000..9bdf154f0 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/examples/text.php @@ -0,0 +1,68 @@ +<?php +/** + * + * @filesource text.php + * @created 21.12.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeExamples; + +use chillerlan\QRCode\{QRCode, QROptions}; + +require_once __DIR__.'/../vendor/autoload.php'; + +$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; + +$options = new QROptions([ + 'version' => 5, + 'outputType' => QRCode::OUTPUT_STRING_TEXT, + 'eccLevel' => QRCode::ECC_L, +]); + +// <pre> to view it in a browser +echo '<pre style="font-size: 75%; line-height: 1;">'.(new QRCode($options))->render($data).'</pre>'; + + +// custom values +$options = new QROptions([ + 'version' => 5, + 'outputType' => QRCode::OUTPUT_STRING_TEXT, + 'eccLevel' => QRCode::ECC_L, + 'moduleValues' => [ + // finder + 1536 => 'A', // dark (true) + 6 => 'a', // light (false) + // alignment + 2560 => 'B', + 10 => 'b', + // timing + 3072 => 'C', + 12 => 'c', + // format + 3584 => 'D', + 14 => 'd', + // version + 4096 => 'E', + 16 => 'e', + // data + 1024 => 'F', + 4 => 'f', + // darkmodule + 512 => 'G', + // separator + 8 => 'h', + // quietzone + 18 => 'i', + ], +]); + +// <pre> to view it in a browser +echo '<pre style="font-size: 75%; line-height: 1;">'.(new QRCode($options))->render($data).'</pre>'; + + + + + diff --git a/vendor/chillerlan/php-qrcode/phpdoc.xml b/vendor/chillerlan/php-qrcode/phpdoc.xml new file mode 100644 index 000000000..d191e98ee --- /dev/null +++ b/vendor/chillerlan/php-qrcode/phpdoc.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<phpdoc> + <parser> + <target>public/docs</target> + </parser> + <transformer> + <target>public/docs</target> + </transformer> + <files> + <directory>src</directory> + </files> + <transformations> + <template name="responsive-twig"/> + </transformations> +</phpdoc>
\ No newline at end of file diff --git a/vendor/chillerlan/php-qrcode/phpmd.xml b/vendor/chillerlan/php-qrcode/phpmd.xml new file mode 100644 index 000000000..a70f7e3a1 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/phpmd.xml @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<ruleset name="codemasher/php-qrcode PMD ruleset" + xmlns="http://pmd.sf.net/ruleset/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> + <description>codemasher/php-qrcode PMD ruleset</description> + <exclude-pattern>*/examples/*</exclude-pattern> + <exclude-pattern>*/tests/*</exclude-pattern> + <rule ref="rulesets/cleancode.xml"> + <exclude name="BooleanArgumentFlag"/> + </rule> + <rule ref="rulesets/codesize.xml/CyclomaticComplexity"> + <priority>1</priority> + <properties> + <property name="maximum" value="200" /> + </properties> + </rule> + <rule ref="rulesets/controversial.xml"> + <exclude name="CamelCaseMethodName"/> + <exclude name="CamelCasePropertyName"/> + <exclude name="CamelCaseParameterName"/> + <exclude name="CamelCaseVariableName"/> + </rule> + <rule ref="rulesets/design.xml"> + </rule> + <rule ref="rulesets/naming.xml"> + <exclude name="LongVariable"/> + <exclude name="ShortVariable"/> + </rule> + <rule ref="rulesets/unusedcode.xml"> + <exclude name="UnusedFormalParameter"/> + </rule> +</ruleset> diff --git a/vendor/chillerlan/php-qrcode/phpunit.xml b/vendor/chillerlan/php-qrcode/phpunit.xml new file mode 100644 index 000000000..3a9b678d2 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/phpunit.xml @@ -0,0 +1,23 @@ +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" + bootstrap="vendor/autoload.php" + cacheResultFile=".build/phpunit.result.cache" + colors="true" + verbose="true" +> + <filter> + <whitelist processUncoveredFilesFromWhitelist="true"> + <directory suffix=".php">./src</directory> + </whitelist> + </filter> + <testsuites> + <testsuite name="php-qrcode test suite"> + <directory suffix=".php">./tests/</directory> + </testsuite> + </testsuites> + <logging> + <log type="coverage-clover" target=".build/coverage/clover.xml"/> + <log type="coverage-xml" target=".build/coverage/coverage-xml"/> + <log type="junit" target=".build/logs/junit.xml"/> + </logging> +</phpunit> diff --git a/vendor/chillerlan/php-qrcode/public/index.html b/vendor/chillerlan/php-qrcode/public/index.html new file mode 100644 index 000000000..d7bf6c891 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/public/index.html @@ -0,0 +1,163 @@ +<!DOCTYPE html> +<html lang="en" > +<head > + <meta charset="UTF-8" > + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title >QR Code Generator</title > + <style > + body{ font-size: 20px; line-height: 1.4em; font-family: "Trebuchet MS", sans-serif; color: #000;} + input, textarea, select{font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 75%; line-height: 1.25em; border: 1px solid #aaa; } + input:focus, textarea:focus, select:focus{ border: 1px solid #ccc; } + label{ cursor: pointer; } + #qrcode-settings, div#qrcode-output{ text-align: center; } + div#qrcode-output > div {margin: 0;padding: 0;height: 3px;} + div#qrcode-output > div > span {display: inline-block;width: 3px;height: 3px;} + div#qrcode-output > div > span {background-color: lightgrey;} + </style > +</head > +<body > + +<form id="qrcode-settings" > + + <label for="inputstring" >Input String</label ><br /><textarea name="inputstring" id="inputstring" cols="80" rows="3" autocomplete="off" spellcheck="false"></textarea ><br /> + + <label for="version" >Version</label > + <input id="version" name="version" class="options" type="number" min="1" max="40" value="5" placeholder="version" /> + + <label for="maskpattern" >Mask Pattern</label > + <input id="maskpattern" name="maskpattern" class="options" type="number" min="-1" max="7" value="-1" placeholder="mask pattern" /> + + <label for="ecc" >ECC</label > + <select class="options" id="ecc" name="ecc" > + <option value="L" selected="selected" >L - 7%</option > + <option value="M" >M - 15%</option > + <option value="Q" >Q - 25%</option > + <option value="H" >H - 30%</option > + </select > + + <br /> + + <label for="quietzone" >Quiet Zone + <input id="quietzone" name="quietzone" class="options" type="checkbox" value="true" /> + </label > + + <label for="quietzonesize" >size</label > + <input id="quietzonesize" name="quietzonesize" class="options" type="number" min="0" max="100" value="4" placeholder="quiet zone" /> + + <br /> + + <label for="output_type" >Output</label > + <select class="options" id="output_type" name="output_type" > + <option value="html" >Markup - HTML</option > + <option value="svg" selected="selected" >Markup - SVG</option > + <option value="png">Image - png</option > + <option value="jpg" >Image - jpg</option > + <option value="gif" >Image - gif</option > + <option value="text" >String - text</option > + <option value="json" >String - json</option > + </select > + + <label for="scale" >scale</label > + <input id="scale" name="scale" class="options" type="number" min="1" max="10" value="5" placeholder="scale" /> + + <div>Finder</div> + <label for="m_finder_light" > + <input type="text" id="m_finder_light" name="m_finder_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_finder_dark" > + <input type="text" id="m_finder_dark" name="m_finder_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Alignment</div> + <label for="m_alignment_light" > + <input type="text" id="m_alignment_light" name="m_alignment_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_alignment_dark" > + <input type="text" id="m_alignment_dark" name="m_alignment_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Timing</div> + <label for="m_timing_light" > + <input type="text" id="m_timing_light" name="m_timing_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_timing_dark" > + <input type="text" id="m_timing_dark" name="m_timing_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Format</div> + <label for="m_format_light" > + <input type="text" id="m_format_light" name="m_format_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_format_dark" > + <input type="text" id="m_format_dark" name="m_format_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Version</div> + <label for="m_version_light" > + <input type="text" id="m_version_light" name="m_version_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_version_dark" > + <input type="text" id="m_version_dark" name="m_version_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Data</div> + <label for="m_data_light" > + <input type="text" id="m_data_light" name="m_data_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_data_dark" > + <input type="text" id="m_data_dark" name="m_data_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Dark Module</div> + <label for="m_darkmodule_light" > + <input disabled="disabled" type="text" id="m_darkmodule_light" class="options" value="" autocomplete="off" spellcheck="false" /> + </label > + <label for="m_darkmodule_dark" > + <input type="text" id="m_darkmodule_dark" name="m_darkmodule_dark" class="jscolor options" value="000000" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + + <div>Separator</div> + <label for="m_separator_light" > + <input type="text" id="m_separator_light" name="m_separator_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_separator_dark" > + <input disabled="disabled" type="text" id="m_separator_dark" class="options" value="" autocomplete="off" spellcheck="false" /> + </label > + + <div>Quiet Zone</div> + <label for="m_quietzone_light" > + <input type="text" id="m_quietzone_light" name="m_quietzone_light" class="jscolor options" value="ffffff" autocomplete="off" spellcheck="false" minlength="6" maxlength="6" /> + </label > + <label for="m_quietzone_dark" > + <input disabled="disabled" type="text" id="m_quietzone_dark" class="options" value="" autocomplete="off" spellcheck="false" /> + </label > + + <br /> + <button type="submit" >generate</button > +</form > +<div id="qrcode-output" ></div > + +<div><a href="https://play.google.com/store/apps/details?id=com.google.zxing.client.android" >ZXing Barcode Scanner</a ></div> +<script src="https://cdnjs.cloudflare.com/ajax/libs/prototype/1.7.3/prototype.js" ></script > +<script src="https://cdnjs.cloudflare.com/ajax/libs/jscolor/2.0.4/jscolor.js" ></script > +<script > + ((form, output, url) => { + + $(form).observe('submit', ev => { + Event.stop(ev); + + new Ajax.Request(url, { + method: 'post', + parameters: ev.target.serialize(true), + onUninitialized: $(output).update(), + onLoading: $(output).update('[portlandia_screaming.gif]'), + onFailure: response => $(output).update(response.responseJSON.error), + onSuccess: response => $(output).update(response.responseJSON.qrcode), + }); + + }); + })('qrcode-settings', 'qrcode-output', './qrcode.php'); +</script > + +</body > +</html >
\ No newline at end of file diff --git a/vendor/chillerlan/php-qrcode/public/qrcode.php b/vendor/chillerlan/php-qrcode/public/qrcode.php new file mode 100644 index 000000000..1f8427c7e --- /dev/null +++ b/vendor/chillerlan/php-qrcode/public/qrcode.php @@ -0,0 +1,97 @@ +<?php +/** + * @filesource qrcode.php + * @created 18.11.2017 + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodePublic; + +use chillerlan\QRCode\QRCode; +use chillerlan\QRCode\QROptions; + +require_once '../vendor/autoload.php'; + +try{ + + $moduleValues = [ + // finder + 1536 => $_POST['m_finder_dark'], + 6 => $_POST['m_finder_light'], + // alignment + 2560 => $_POST['m_alignment_dark'], + 10 => $_POST['m_alignment_light'], + // timing + 3072 => $_POST['m_timing_dark'], + 12 => $_POST['m_timing_light'], + // format + 3584 => $_POST['m_format_dark'], + 14 => $_POST['m_format_light'], + // version + 4096 => $_POST['m_version_dark'], + 16 => $_POST['m_version_light'], + // data + 1024 => $_POST['m_data_dark'], + 4 => $_POST['m_data_light'], + // darkmodule + 512 => $_POST['m_darkmodule_dark'], + // separator + 8 => $_POST['m_separator_light'], + // quietzone + 18 => $_POST['m_quietzone_light'], + ]; + + $moduleValues = array_map(function($v){ + if(preg_match('/[a-f\d]{6}/i', $v) === 1){ + return in_array($_POST['output_type'], ['png', 'jpg', 'gif']) + ? array_map('hexdec', str_split($v, 2)) + : '#'.$v ; + } + return null; + }, $moduleValues); + + + $ecc = in_array($_POST['ecc'], ['L', 'M', 'Q', 'H'], true) ? $_POST['ecc'] : 'L'; + + $qro = new QROptions; + + $qro->version = (int)$_POST['version']; + $qro->eccLevel = constant('chillerlan\\QRCode\\QRCode::ECC_'.$ecc); + $qro->maskPattern = (int)$_POST['maskpattern']; + $qro->addQuietzone = isset($_POST['quietzone']); + $qro->quietzoneSize = (int)$_POST['quietzonesize']; + $qro->moduleValues = $moduleValues; + $qro->outputType = $_POST['output_type']; + $qro->scale = (int)$_POST['scale']; + $qro->imageTransparent = false; + + $qrcode = (new QRCode($qro))->render($_POST['inputstring']); + + if(in_array($_POST['output_type'], ['png', 'jpg', 'gif'])){ + $qrcode = '<img src="'.$qrcode.'" />'; + } + elseif($_POST['output_type'] === 'text'){ + $qrcode = '<pre style="font-size: 75%; line-height: 1;">'.$qrcode.'</pre>'; + } + elseif($_POST['output_type'] === 'json'){ + $qrcode = '<pre style="font-size: 75%; overflow-x: auto;">'.$qrcode.'</pre>'; + } + + send_response(['qrcode' => $qrcode]); +} +// Pokémon exception handler +catch(\Exception $e){ + header('HTTP/1.1 500 Internal Server Error'); + send_response(['error' => $e->getMessage()]); +} + +/** + * @param array $response + */ +function send_response(array $response){ + header('Content-type: application/json;charset=utf-8;'); + echo json_encode($response); + exit; +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/AlphaNum.php b/vendor/chillerlan/php-qrcode/src/Data/AlphaNum.php new file mode 100644 index 000000000..c6d34e76f --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/AlphaNum.php @@ -0,0 +1,65 @@ +<?php +/** + * Class AlphaNum + * + * @filesource AlphaNum.php + * @created 25.11.2015 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\QRCode; + +use function array_search, ord, sprintf; + +/** + * Alphanumeric mode: 0 to 9, A to Z, space, $ % * + - . / : + */ +class AlphaNum extends QRDataAbstract{ + + /** + * @inheritdoc + */ + protected $datamode = QRCode::DATA_ALPHANUM; + + /** + * @inheritdoc + */ + protected $lengthBits = [9, 11, 13]; + + /** + * @inheritdoc + */ + protected function write(string $data):void{ + + for($i = 0; $i + 1 < $this->strlen; $i += 2){ + $this->bitBuffer->put($this->getCharCode($data[$i]) * 45 + $this->getCharCode($data[$i + 1]), 11); + } + + if($i < $this->strlen){ + $this->bitBuffer->put($this->getCharCode($data[$i]), 6); + } + + } + + /** + * @param string $chr + * + * @return int + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + protected function getCharCode(string $chr):int{ + $i = array_search($chr, $this::ALPHANUM_CHAR_MAP); + + if($i !== false){ + return $i; + } + + throw new QRCodeDataException(sprintf('illegal char: "%s" [%d]', $chr, ord($chr))); + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/Byte.php b/vendor/chillerlan/php-qrcode/src/Data/Byte.php new file mode 100644 index 000000000..f1955645a --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/Byte.php @@ -0,0 +1,47 @@ +<?php +/** + * Class Byte + * + * @filesource Byte.php + * @created 25.11.2015 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\QRCode; + +use function ord; + +/** + * Byte mode, ISO-8859-1 or UTF-8 + */ +class Byte extends QRDataAbstract{ + + /** + * @inheritdoc + */ + protected $datamode = QRCode::DATA_BYTE; + + /** + * @inheritdoc + */ + protected $lengthBits = [8, 16, 16]; + + /** + * @inheritdoc + */ + protected function write(string $data):void{ + $i = 0; + + while($i < $this->strlen){ + $this->bitBuffer->put(ord($data[$i]), 8); + $i++; + } + + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/Kanji.php b/vendor/chillerlan/php-qrcode/src/Data/Kanji.php new file mode 100644 index 000000000..ce600d4ff --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/Kanji.php @@ -0,0 +1,70 @@ +<?php +/** + * Class Kanji + * + * @filesource Kanji.php + * @created 25.11.2015 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\QRCode; + +use function mb_strlen, ord, sprintf, strlen; + +/** + * Kanji mode: double-byte characters from the Shift JIS character set + */ +class Kanji extends QRDataAbstract{ + + /** + * @inheritdoc + */ + protected $datamode = QRCode::DATA_KANJI; + + /** + * @inheritdoc + */ + protected $lengthBits = [8, 10, 12]; + + /** + * @inheritdoc + */ + protected function getLength(string $data):int{ + return mb_strlen($data, 'SJIS'); + } + + /** + * @inheritdoc + */ + protected function write(string $data):void{ + $len = strlen($data); + + for($i = 0; $i + 1 < $len; $i += 2){ + $c = ((0xff & ord($data[$i])) << 8) | (0xff & ord($data[$i + 1])); + + if(0x8140 <= $c && $c <= 0x9FFC){ + $c -= 0x8140; + } + elseif(0xE040 <= $c && $c <= 0xEBBF){ + $c -= 0xC140; + } + else{ + throw new QRCodeDataException(sprintf('illegal char at %d [%d]', $i + 1, $c)); + } + + $this->bitBuffer->put((($c >> 8) & 0xff) * 0xC0 + ($c & 0xff), 13); + + } + + if($i < $len){ + throw new QRCodeDataException(sprintf('illegal char at %d', $i + 1)); + } + + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/MaskPatternTester.php b/vendor/chillerlan/php-qrcode/src/Data/MaskPatternTester.php new file mode 100644 index 000000000..8dfd24180 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/MaskPatternTester.php @@ -0,0 +1,203 @@ +<?php +/** + * Class MaskPatternTester + * + * @filesource MaskPatternTester.php + * @created 22.11.2017 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use function abs, call_user_func_array; + +/** + * The sole purpose of this class is to receive a QRMatrix object and run the pattern tests on it. + * + * @link http://www.thonky.com/qr-code-tutorial/data-masking + */ +class MaskPatternTester{ + + /** + * @var \chillerlan\QRCode\Data\QRMatrix + */ + protected $matrix; + + /** + * @var int + */ + protected $moduleCount; + + /** + * Receives the matrix an sets the module count + * + * @see \chillerlan\QRCode\QROptions::$maskPattern + * @see \chillerlan\QRCode\Data\QRMatrix::$maskPattern + * @see \chillerlan\QRCode\QRCode::getBestMaskPattern() + * + * @param \chillerlan\QRCode\Data\QRMatrix $matrix + */ + public function __construct(QRMatrix $matrix){ + $this->matrix = $matrix; + $this->moduleCount = $this->matrix->size(); + } + + /** + * Returns the penalty for the given mask pattern + * + * @see \chillerlan\QRCode\QROptions::$maskPattern + * @see \chillerlan\QRCode\Data\QRMatrix::$maskPattern + * @see \chillerlan\QRCode\QRCode::getBestMaskPattern() + * + * @return int + */ + public function testPattern():int{ + $penalty = 0; + + for($level = 1; $level <= 4; $level++){ + $penalty += call_user_func_array([$this, 'testLevel'.$level], [$this->matrix->matrix(true)]); + } + + return (int)$penalty; + } + + /** + * Checks for each group of five or more same-colored modules in a row (or column) + * + * @return int + */ + protected function testLevel1(array $m):int{ + $penalty = 0; + + foreach($m as $y => $row){ + foreach($row as $x => $val){ + $count = 0; + + for($ry = -1; $ry <= 1; $ry++){ + + if($y + $ry < 0 || $this->moduleCount <= $y + $ry){ + continue; + } + + for($rx = -1; $rx <= 1; $rx++){ + + if(($ry === 0 && $rx === 0) || (($x + $rx) < 0 || $this->moduleCount <= ($x + $rx))){ + continue; + } + + if($m[$y + $ry][$x + $rx] === $val){ + $count++; + } + + } + } + + if($count > 5){ + $penalty += (3 + $count - 5); + } + + } + } + + return $penalty; + } + + /** + * Checks for each 2x2 area of same-colored modules in the matrix + * + * @return int + */ + protected function testLevel2(array $m):int{ + $penalty = 0; + + foreach($m as $y => $row){ + + if($y > ($this->moduleCount - 2)){ + break; + } + + foreach($row as $x => $val){ + + if($x > ($this->moduleCount - 2)){ + break; + } + + if( + $val === $m[$y][$x + 1] + && $val === $m[$y + 1][$x] + && $val === $m[$y + 1][$x + 1] + ){ + $penalty++; + } + } + } + + return 3 * $penalty; + } + + /** + * Checks if there are patterns that look similar to the finder patterns (1:1:3:1:1 ratio) + * + * @return int + */ + protected function testLevel3(array $m):int{ + $penalties = 0; + + foreach($m as $y => $row){ + foreach($row as $x => $val){ + + if( + ($x + 6) < $this->moduleCount + && $val + && !$m[$y][$x + 1] + && $m[$y][$x + 2] + && $m[$y][$x + 3] + && $m[$y][$x + 4] + && !$m[$y][$x + 5] + && $m[$y][$x + 6] + ){ + $penalties++; + } + + if( + ($y + 6) < $this->moduleCount + && $val + && !$m[$y + 1][$x] + && $m[$y + 2][$x] + && $m[$y + 3][$x] + && $m[$y + 4][$x] + && !$m[$y + 5][$x] + && $m[$y + 6][$x] + ){ + $penalties++; + } + + } + } + + return $penalties * 40; + } + + /** + * Checks if more than half of the modules are dark or light, with a larger penalty for a larger difference + * + * @return float + */ + protected function testLevel4(array $m):float{ + $count = 0; + + foreach($m as $y => $row){ + foreach($row as $x => $val){ + if($val){ + $count++; + } + } + } + + return (abs(100 * $count / $this->moduleCount / $this->moduleCount - 50) / 5) * 10; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/Number.php b/vendor/chillerlan/php-qrcode/src/Data/Number.php new file mode 100644 index 000000000..3936d12c3 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/Number.php @@ -0,0 +1,82 @@ +<?php +/** + * Class Number + * + * @filesource Number.php + * @created 26.11.2015 + * @package QRCode + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\QRCode; + +use function ord, sprintf, substr; + +/** + * Numeric mode: decimal digits 0 through 9 + */ +class Number extends QRDataAbstract{ + + /** + * @inheritdoc + */ + protected $datamode = QRCode::DATA_NUMBER; + + /** + * @inheritdoc + */ + protected $lengthBits = [10, 12, 14]; + + /** + * @inheritdoc + */ + protected function write(string $data):void{ + $i = 0; + + while($i + 2 < $this->strlen){ + $this->bitBuffer->put($this->parseInt(substr($data, $i, 3)), 10); + $i += 3; + } + + if($i < $this->strlen){ + + if($this->strlen - $i === 1){ + $this->bitBuffer->put($this->parseInt(substr($data, $i, $i + 1)), 4); + } + elseif($this->strlen - $i === 2){ + $this->bitBuffer->put($this->parseInt(substr($data, $i, $i + 2)), 7); + } + + } + + } + + /** + * @param string $string + * + * @return int + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + protected function parseInt(string $string):int{ + $num = 0; + + $len = strlen($string); + for($i = 0; $i < $len; $i++){ + $c = ord($string[$i]); + + if(!in_array($string[$i], $this::NUMBER_CHAR_MAP, true)){ + throw new QRCodeDataException(sprintf('illegal char: "%s" [%d]', $string[$i], $c)); + } + + $c = $c - 48; // ord('0') + $num = $num * 10 + $c; + } + + return $num; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/QRCodeDataException.php b/vendor/chillerlan/php-qrcode/src/Data/QRCodeDataException.php new file mode 100644 index 000000000..862f57ba0 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/QRCodeDataException.php @@ -0,0 +1,17 @@ +<?php +/** + * Class QRCodeDataException + * + * @filesource QRCodeDataException.php + * @created 09.12.2015 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\QRCodeException; + +class QRCodeDataException extends QRCodeException{} diff --git a/vendor/chillerlan/php-qrcode/src/Data/QRDataAbstract.php b/vendor/chillerlan/php-qrcode/src/Data/QRDataAbstract.php new file mode 100644 index 000000000..f52767e38 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/QRDataAbstract.php @@ -0,0 +1,351 @@ +<?php +/** + * Class QRDataAbstract + * + * @filesource QRDataAbstract.php + * @created 25.11.2015 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\{QRCode, QRCodeException}; +use chillerlan\QRCode\Helpers\{BitBuffer, Polynomial}; +use chillerlan\Settings\SettingsContainerInterface; + +use function array_fill, array_merge, count, max, mb_convert_encoding, mb_detect_encoding, range, sprintf, strlen; + +/** + * Processes the binary data and maps it on a matrix which is then being returned + */ +abstract class QRDataAbstract implements QRDataInterface{ + + /** + * the string byte count + * + * @var int + */ + protected $strlen; + + /** + * the current data mode: Num, Alphanum, Kanji, Byte + * + * @var int + */ + protected $datamode; + + /** + * mode length bits for the version breakpoints 1-9, 10-26 and 27-40 + * + * @var array + */ + protected $lengthBits = [0, 0, 0]; + + /** + * current QR Code version + * + * @var int + */ + protected $version; + + /** + * the raw data that's being passed to QRMatrix::mapData() + * + * @var array + */ + protected $matrixdata; + + /** + * ECC temp data + * + * @var array + */ + protected $ecdata; + + /** + * ECC temp data + * + * @var array + */ + protected $dcdata; + + /** + * @var \chillerlan\QRCode\QROptions + */ + protected $options; + + /** + * @var \chillerlan\QRCode\Helpers\BitBuffer + */ + protected $bitBuffer; + + /** + * QRDataInterface constructor. + * + * @param \chillerlan\Settings\SettingsContainerInterface $options + * @param string|null $data + */ + public function __construct(SettingsContainerInterface $options, string $data = null){ + $this->options = $options; + + if($data !== null){ + $this->setData($data); + } + } + + /** + * @inheritDoc + */ + public function setData(string $data):QRDataInterface{ + + if($this->datamode === QRCode::DATA_KANJI){ + $data = mb_convert_encoding($data, 'SJIS', mb_detect_encoding($data)); + } + + $this->strlen = $this->getLength($data); + $this->version = $this->options->version === QRCode::VERSION_AUTO + ? $this->getMinimumVersion() + : $this->options->version; + + $this->matrixdata = $this + ->writeBitBuffer($data) + ->maskECC() + ; + + return $this; + } + + /** + * @inheritDoc + */ + public function initMatrix(int $maskPattern, bool $test = null):QRMatrix{ + return (new QRMatrix($this->version, $this->options->eccLevel)) + ->setFinderPattern() + ->setSeparators() + ->setAlignmentPattern() + ->setTimingPattern() + ->setVersionNumber($test) + ->setFormatInfo($maskPattern, $test) + ->setDarkModule() + ->mapData($this->matrixdata, $maskPattern) + ; + } + + /** + * returns the length bits for the version breakpoints 1-9, 10-26 and 27-40 + * + * @return int + * @throws \chillerlan\QRCode\Data\QRCodeDataException + * @codeCoverageIgnore + */ + protected function getLengthBits():int{ + + foreach([9, 26, 40] as $key => $breakpoint){ + if($this->version <= $breakpoint){ + return $this->lengthBits[$key]; + } + } + + throw new QRCodeDataException(sprintf('invalid version number: %d', $this->version)); + } + + /** + * returns the byte count of the $data string + * + * @param string $data + * + * @return int + */ + protected function getLength(string $data):int{ + return strlen($data); + } + + /** + * returns the minimum version number for the given string + * + * @return int + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + protected function getMinimumVersion():int{ + $maxlength = 0; + + // guess the version number within the given range + foreach(range($this->options->versionMin, $this->options->versionMax) as $version){ + $maxlength = $this::MAX_LENGTH[$version][QRCode::DATA_MODES[$this->datamode]][QRCode::ECC_MODES[$this->options->eccLevel]]; + + if($this->strlen <= $maxlength){ + return $version; + } + } + + throw new QRCodeDataException(sprintf('data exceeds %d characters', $maxlength)); + } + + /** + * writes the actual data string to the BitBuffer + * + * @see \chillerlan\QRCode\Data\QRDataAbstract::writeBitBuffer() + * + * @param string $data + * + * @return void + */ + abstract protected function write(string $data):void; + + /** + * creates a BitBuffer and writes the string data to it + * + * @param string $data + * + * @return \chillerlan\QRCode\Data\QRDataAbstract + * @throws \chillerlan\QRCode\QRCodeException + */ + protected function writeBitBuffer(string $data):QRDataInterface{ + $this->bitBuffer = new BitBuffer; + + $MAX_BITS = $this::MAX_BITS[$this->version][QRCode::ECC_MODES[$this->options->eccLevel]]; + + $this->bitBuffer + ->clear() + ->put($this->datamode, 4) + ->put($this->strlen, $this->getLengthBits()) + ; + + $this->write($data); + + // there was an error writing the BitBuffer data, which is... unlikely. + if($this->bitBuffer->length > $MAX_BITS){ + throw new QRCodeException(sprintf('code length overflow. (%d > %d bit)', $this->bitBuffer->length, $MAX_BITS)); // @codeCoverageIgnore + } + + // end code. + if($this->bitBuffer->length + 4 <= $MAX_BITS){ + $this->bitBuffer->put(0, 4); + } + + // padding + while($this->bitBuffer->length % 8 !== 0){ + $this->bitBuffer->putBit(false); + } + + // padding + while(true){ + + if($this->bitBuffer->length >= $MAX_BITS){ + break; + } + + $this->bitBuffer->put(0xEC, 8); + + if($this->bitBuffer->length >= $MAX_BITS){ + break; + } + + $this->bitBuffer->put(0x11, 8); + } + + return $this; + } + + /** + * ECC masking + * + * @link http://www.thonky.com/qr-code-tutorial/error-correction-coding + * + * @return array + */ + protected function maskECC():array{ + [$l1, $l2, $b1, $b2] = $this::RSBLOCKS[$this->version][QRCode::ECC_MODES[$this->options->eccLevel]]; + + $rsBlocks = array_fill(0, $l1, [$b1, $b2]); + $rsCount = $l1 + $l2; + $this->ecdata = array_fill(0, $rsCount, null); + $this->dcdata = $this->ecdata; + + if($l2 > 0){ + $rsBlocks = array_merge($rsBlocks, array_fill(0, $l2, [$b1 + 1, $b2 + 1])); + } + + $totalCodeCount = 0; + $maxDcCount = 0; + $maxEcCount = 0; + $offset = 0; + + foreach($rsBlocks as $key => $block){ + [$rsBlockTotal, $dcCount] = $block; + + $ecCount = $rsBlockTotal - $dcCount; + $maxDcCount = max($maxDcCount, $dcCount); + $maxEcCount = max($maxEcCount, $ecCount); + $this->dcdata[$key] = array_fill(0, $dcCount, null); + + foreach($this->dcdata[$key] as $a => $_z){ + $this->dcdata[$key][$a] = 0xff & $this->bitBuffer->buffer[$a + $offset]; + } + + [$num, $add] = $this->poly($key, $ecCount); + + foreach($this->ecdata[$key] as $c => $_z){ + $modIndex = $c + $add; + $this->ecdata[$key][$c] = $modIndex >= 0 ? $num[$modIndex] : 0; + } + + $offset += $dcCount; + $totalCodeCount += $rsBlockTotal; + } + + $data = array_fill(0, $totalCodeCount, null); + $index = 0; + + $mask = function($arr, $count) use (&$data, &$index, $rsCount){ + for($x = 0; $x < $count; $x++){ + for($y = 0; $y < $rsCount; $y++){ + if($x < count($arr[$y])){ + $data[$index] = $arr[$y][$x]; + $index++; + } + } + } + }; + + $mask($this->dcdata, $maxDcCount); + $mask($this->ecdata, $maxEcCount); + + return $data; + } + + /** + * @param int $key + * @param int $count + * + * @return int[] + */ + protected function poly(int $key, int $count):array{ + $rsPoly = new Polynomial; + $modPoly = new Polynomial; + + for($i = 0; $i < $count; $i++){ + $modPoly->setNum([1, $modPoly->gexp($i)]); + $rsPoly->multiply($modPoly->getNum()); + } + + $rsPolyCount = count($rsPoly->getNum()); + + $modPoly + ->setNum($this->dcdata[$key], $rsPolyCount - 1) + ->mod($rsPoly->getNum()) + ; + + $this->ecdata[$key] = array_fill(0, $rsPolyCount - 1, null); + $num = $modPoly->getNum(); + + return [ + $num, + count($num) - count($this->ecdata[$key]), + ]; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/QRDataInterface.php b/vendor/chillerlan/php-qrcode/src/Data/QRDataInterface.php new file mode 100644 index 000000000..653386222 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/QRDataInterface.php @@ -0,0 +1,187 @@ +<?php +/** + * Interface QRDataInterface + * + * @filesource QRDataInterface.php + * @created 01.12.2015 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +/** + * + */ +interface QRDataInterface{ + + const NUMBER_CHAR_MAP = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; + + const ALPHANUM_CHAR_MAP = [ + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', + 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + 'W', 'X', 'Y', 'Z', ' ', '$', '%', '*', + '+', '-', '.', '/', ':', + ]; + + /** + * @link http://www.qrcode.com/en/about/version.html + */ + const MAX_LENGTH =[ + // v => [NUMERIC => [L, M, Q, H ], ALPHANUM => [L, M, Q, H], BINARY => [L, M, Q, H ], KANJI => [L, M, Q, H ]] // modules + 1 => [[ 41, 34, 27, 17], [ 25, 20, 16, 10], [ 17, 14, 11, 7], [ 10, 8, 7, 4]], // 21 + 2 => [[ 77, 63, 48, 34], [ 47, 38, 29, 20], [ 32, 26, 20, 14], [ 20, 16, 12, 8]], // 25 + 3 => [[ 127, 101, 77, 58], [ 77, 61, 47, 35], [ 53, 42, 32, 24], [ 32, 26, 20, 15]], // 29 + 4 => [[ 187, 149, 111, 82], [ 114, 90, 67, 50], [ 78, 62, 46, 34], [ 48, 38, 28, 21]], // 33 + 5 => [[ 255, 202, 144, 106], [ 154, 122, 87, 64], [ 106, 84, 60, 44], [ 65, 52, 37, 27]], // 37 + 6 => [[ 322, 255, 178, 139], [ 195, 154, 108, 84], [ 134, 106, 74, 58], [ 82, 65, 45, 36]], // 41 + 7 => [[ 370, 293, 207, 154], [ 224, 178, 125, 93], [ 154, 122, 86, 64], [ 95, 75, 53, 39]], // 45 + 8 => [[ 461, 365, 259, 202], [ 279, 221, 157, 122], [ 192, 152, 108, 84], [ 118, 93, 66, 52]], // 49 + 9 => [[ 552, 432, 312, 235], [ 335, 262, 189, 143], [ 230, 180, 130, 98], [ 141, 111, 80, 60]], // 53 + 10 => [[ 652, 513, 364, 288], [ 395, 311, 221, 174], [ 271, 213, 151, 119], [ 167, 131, 93, 74]], // 57 + 11 => [[ 772, 604, 427, 331], [ 468, 366, 259, 200], [ 321, 251, 177, 137], [ 198, 155, 109, 85]], // 61 + 12 => [[ 883, 691, 489, 374], [ 535, 419, 296, 227], [ 367, 287, 203, 155], [ 226, 177, 125, 96]], // 65 + 13 => [[1022, 796, 580, 427], [ 619, 483, 352, 259], [ 425, 331, 241, 177], [ 262, 204, 149, 109]], // 69 NICE! + 14 => [[1101, 871, 621, 468], [ 667, 528, 376, 283], [ 458, 362, 258, 194], [ 282, 223, 159, 120]], // 73 + 15 => [[1250, 991, 703, 530], [ 758, 600, 426, 321], [ 520, 412, 292, 220], [ 320, 254, 180, 136]], // 77 + 16 => [[1408, 1082, 775, 602], [ 854, 656, 470, 365], [ 586, 450, 322, 250], [ 361, 277, 198, 154]], // 81 + 17 => [[1548, 1212, 876, 674], [ 938, 734, 531, 408], [ 644, 504, 364, 280], [ 397, 310, 224, 173]], // 85 + 18 => [[1725, 1346, 948, 746], [1046, 816, 574, 452], [ 718, 560, 394, 310], [ 442, 345, 243, 191]], // 89 + 19 => [[1903, 1500, 1063, 813], [1153, 909, 644, 493], [ 792, 624, 442, 338], [ 488, 384, 272, 208]], // 93 + 20 => [[2061, 1600, 1159, 919], [1249, 970, 702, 557], [ 858, 666, 482, 382], [ 528, 410, 297, 235]], // 97 + 21 => [[2232, 1708, 1224, 969], [1352, 1035, 742, 587], [ 929, 711, 509, 403], [ 572, 438, 314, 248]], // 101 + 22 => [[2409, 1872, 1358, 1056], [1460, 1134, 823, 640], [1003, 779, 565, 439], [ 618, 480, 348, 270]], // 105 + 23 => [[2620, 2059, 1468, 1108], [1588, 1248, 890, 672], [1091, 857, 611, 461], [ 672, 528, 376, 284]], // 109 + 24 => [[2812, 2188, 1588, 1228], [1704, 1326, 963, 744], [1171, 911, 661, 511], [ 721, 561, 407, 315]], // 113 + 25 => [[3057, 2395, 1718, 1286], [1853, 1451, 1041, 779], [1273, 997, 715, 535], [ 784, 614, 440, 330]], // 117 + 26 => [[3283, 2544, 1804, 1425], [1990, 1542, 1094, 864], [1367, 1059, 751, 593], [ 842, 652, 462, 365]], // 121 + 27 => [[3517, 2701, 1933, 1501], [2132, 1637, 1172, 910], [1465, 1125, 805, 625], [ 902, 692, 496, 385]], // 125 + 28 => [[3669, 2857, 2085, 1581], [2223, 1732, 1263, 958], [1528, 1190, 868, 658], [ 940, 732, 534, 405]], // 129 + 29 => [[3909, 3035, 2181, 1677], [2369, 1839, 1322, 1016], [1628, 1264, 908, 698], [1002, 778, 559, 430]], // 133 + 30 => [[4158, 3289, 2358, 1782], [2520, 1994, 1429, 1080], [1732, 1370, 982, 742], [1066, 843, 604, 457]], // 137 + 31 => [[4417, 3486, 2473, 1897], [2677, 2113, 1499, 1150], [1840, 1452, 1030, 790], [1132, 894, 634, 486]], // 141 + 32 => [[4686, 3693, 2670, 2022], [2840, 2238, 1618, 1226], [1952, 1538, 1112, 842], [1201, 947, 684, 518]], // 145 + 33 => [[4965, 3909, 2805, 2157], [3009, 2369, 1700, 1307], [2068, 1628, 1168, 898], [1273, 1002, 719, 553]], // 149 + 34 => [[5253, 4134, 2949, 2301], [3183, 2506, 1787, 1394], [2188, 1722, 1228, 958], [1347, 1060, 756, 590]], // 153 + 35 => [[5529, 4343, 3081, 2361], [3351, 2632, 1867, 1431], [2303, 1809, 1283, 983], [1417, 1113, 790, 605]], // 157 + 36 => [[5836, 4588, 3244, 2524], [3537, 2780, 1966, 1530], [2431, 1911, 1351, 1051], [1496, 1176, 832, 647]], // 161 + 37 => [[6153, 4775, 3417, 2625], [3729, 2894, 2071, 1591], [2563, 1989, 1423, 1093], [1577, 1224, 876, 673]], // 165 + 38 => [[6479, 5039, 3599, 2735], [3927, 3054, 2181, 1658], [2699, 2099, 1499, 1139], [1661, 1292, 923, 701]], // 169 + 39 => [[6743, 5313, 3791, 2927], [4087, 3220, 2298, 1774], [2809, 2213, 1579, 1219], [1729, 1362, 972, 750]], // 173 + 40 => [[7089, 5596, 3993, 3057], [4296, 3391, 2420, 1852], [2953, 2331, 1663, 1273], [1817, 1435, 1024, 784]], // 177 + ]; + + const MAX_BITS = [ + // version => [L, M, Q, H ] + 1 => [ 152, 128, 104, 72], + 2 => [ 272, 224, 176, 128], + 3 => [ 440, 352, 272, 208], + 4 => [ 640, 512, 384, 288], + 5 => [ 864, 688, 496, 368], + 6 => [ 1088, 864, 608, 480], + 7 => [ 1248, 992, 704, 528], + 8 => [ 1552, 1232, 880, 688], + 9 => [ 1856, 1456, 1056, 800], + 10 => [ 2192, 1728, 1232, 976], + 11 => [ 2592, 2032, 1440, 1120], + 12 => [ 2960, 2320, 1648, 1264], + 13 => [ 3424, 2672, 1952, 1440], + 14 => [ 3688, 2920, 2088, 1576], + 15 => [ 4184, 3320, 2360, 1784], + 16 => [ 4712, 3624, 2600, 2024], + 17 => [ 5176, 4056, 2936, 2264], + 18 => [ 5768, 4504, 3176, 2504], + 19 => [ 6360, 5016, 3560, 2728], + 20 => [ 6888, 5352, 3880, 3080], + 21 => [ 7456, 5712, 4096, 3248], + 22 => [ 8048, 6256, 4544, 3536], + 23 => [ 8752, 6880, 4912, 3712], + 24 => [ 9392, 7312, 5312, 4112], + 25 => [10208, 8000, 5744, 4304], + 26 => [10960, 8496, 6032, 4768], + 27 => [11744, 9024, 6464, 5024], + 28 => [12248, 9544, 6968, 5288], + 29 => [13048, 10136, 7288, 5608], + 30 => [13880, 10984, 7880, 5960], + 31 => [14744, 11640, 8264, 6344], + 32 => [15640, 12328, 8920, 6760], + 33 => [16568, 13048, 9368, 7208], + 34 => [17528, 13800, 9848, 7688], + 35 => [18448, 14496, 10288, 7888], + 36 => [19472, 15312, 10832, 8432], + 37 => [20528, 15936, 11408, 8768], + 38 => [21616, 16816, 12016, 9136], + 39 => [22496, 17728, 12656, 9776], + 40 => [23648, 18672, 13328, 10208], + ]; + + /** + * @link http://www.thonky.com/qr-code-tutorial/error-correction-table + */ + const RSBLOCKS = [ + 1 => [[ 1, 0, 26, 19], [ 1, 0, 26, 16], [ 1, 0, 26, 13], [ 1, 0, 26, 9]], + 2 => [[ 1, 0, 44, 34], [ 1, 0, 44, 28], [ 1, 0, 44, 22], [ 1, 0, 44, 16]], + 3 => [[ 1, 0, 70, 55], [ 1, 0, 70, 44], [ 2, 0, 35, 17], [ 2, 0, 35, 13]], + 4 => [[ 1, 0, 100, 80], [ 2, 0, 50, 32], [ 2, 0, 50, 24], [ 4, 0, 25, 9]], + 5 => [[ 1, 0, 134, 108], [ 2, 0, 67, 43], [ 2, 2, 33, 15], [ 2, 2, 33, 11]], + 6 => [[ 2, 0, 86, 68], [ 4, 0, 43, 27], [ 4, 0, 43, 19], [ 4, 0, 43, 15]], + 7 => [[ 2, 0, 98, 78], [ 4, 0, 49, 31], [ 2, 4, 32, 14], [ 4, 1, 39, 13]], + 8 => [[ 2, 0, 121, 97], [ 2, 2, 60, 38], [ 4, 2, 40, 18], [ 4, 2, 40, 14]], + 9 => [[ 2, 0, 146, 116], [ 3, 2, 58, 36], [ 4, 4, 36, 16], [ 4, 4, 36, 12]], + 10 => [[ 2, 2, 86, 68], [ 4, 1, 69, 43], [ 6, 2, 43, 19], [ 6, 2, 43, 15]], + 11 => [[ 4, 0, 101, 81], [ 1, 4, 80, 50], [ 4, 4, 50, 22], [ 3, 8, 36, 12]], + 12 => [[ 2, 2, 116, 92], [ 6, 2, 58, 36], [ 4, 6, 46, 20], [ 7, 4, 42, 14]], + 13 => [[ 4, 0, 133, 107], [ 8, 1, 59, 37], [ 8, 4, 44, 20], [12, 4, 33, 11]], + 14 => [[ 3, 1, 145, 115], [ 4, 5, 64, 40], [11, 5, 36, 16], [11, 5, 36, 12]], + 15 => [[ 5, 1, 109, 87], [ 5, 5, 65, 41], [ 5, 7, 54, 24], [11, 7, 36, 12]], + 16 => [[ 5, 1, 122, 98], [ 7, 3, 73, 45], [15, 2, 43, 19], [ 3, 13, 45, 15]], + 17 => [[ 1, 5, 135, 107], [10, 1, 74, 46], [ 1, 15, 50, 22], [ 2, 17, 42, 14]], + 18 => [[ 5, 1, 150, 120], [ 9, 4, 69, 43], [17, 1, 50, 22], [ 2, 19, 42, 14]], + 19 => [[ 3, 4, 141, 113], [ 3, 11, 70, 44], [17, 4, 47, 21], [ 9, 16, 39, 13]], + 20 => [[ 3, 5, 135, 107], [ 3, 13, 67, 41], [15, 5, 54, 24], [15, 10, 43, 15]], + 21 => [[ 4, 4, 144, 116], [17, 0, 68, 42], [17, 6, 50, 22], [19, 6, 46, 16]], + 22 => [[ 2, 7, 139, 111], [17, 0, 74, 46], [ 7, 16, 54, 24], [34, 0, 37, 13]], + 23 => [[ 4, 5, 151, 121], [ 4, 14, 75, 47], [11, 14, 54, 24], [16, 14, 45, 15]], + 24 => [[ 6, 4, 147, 117], [ 6, 14, 73, 45], [11, 16, 54, 24], [30, 2, 46, 16]], + 25 => [[ 8, 4, 132, 106], [ 8, 13, 75, 47], [ 7, 22, 54, 24], [22, 13, 45, 15]], + 26 => [[10, 2, 142, 114], [19, 4, 74, 46], [28, 6, 50, 22], [33, 4, 46, 16]], + 27 => [[ 8, 4, 152, 122], [22, 3, 73, 45], [ 8, 26, 53, 23], [12, 28, 45, 15]], + 28 => [[ 3, 10, 147, 117], [ 3, 23, 73, 45], [ 4, 31, 54, 24], [11, 31, 45, 15]], + 29 => [[ 7, 7, 146, 116], [21, 7, 73, 45], [ 1, 37, 53, 23], [19, 26, 45, 15]], + 30 => [[ 5, 10, 145, 115], [19, 10, 75, 47], [15, 25, 54, 24], [23, 25, 45, 15]], + 31 => [[13, 3, 145, 115], [ 2, 29, 74, 46], [42, 1, 54, 24], [23, 28, 45, 15]], + 32 => [[17, 0, 145, 115], [10, 23, 74, 46], [10, 35, 54, 24], [19, 35, 45, 15]], + 33 => [[17, 1, 145, 115], [14, 21, 74, 46], [29, 19, 54, 24], [11, 46, 45, 15]], + 34 => [[13, 6, 145, 115], [14, 23, 74, 46], [44, 7, 54, 24], [59, 1, 46, 16]], + 35 => [[12, 7, 151, 121], [12, 26, 75, 47], [39, 14, 54, 24], [22, 41, 45, 15]], + 36 => [[ 6, 14, 151, 121], [ 6, 34, 75, 47], [46, 10, 54, 24], [ 2, 64, 45, 15]], + 37 => [[17, 4, 152, 122], [29, 14, 74, 46], [49, 10, 54, 24], [24, 46, 45, 15]], + 38 => [[ 4, 18, 152, 122], [13, 32, 74, 46], [48, 14, 54, 24], [42, 32, 45, 15]], + 39 => [[20, 4, 147, 117], [40, 7, 75, 47], [43, 22, 54, 24], [10, 67, 45, 15]], + 40 => [[19, 6, 148, 118], [18, 31, 75, 47], [34, 34, 54, 24], [20, 61, 45, 15]], + ]; + + /** + * Sets the data string (internally called by the constructor) + * + * @param string $data + * + * @return \chillerlan\QRCode\Data\QRDataInterface + */ + public function setData(string $data):QRDataInterface; + + /** + * returns a fresh matrix object with the data written for the given $maskPattern + * + * @param int $maskPattern + * @param bool|null $test + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function initMatrix(int $maskPattern, bool $test = null):QRMatrix; + +} diff --git a/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php b/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php new file mode 100644 index 000000000..a6d8b09e2 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php @@ -0,0 +1,733 @@ +<?php +/** + * Class QRMatrix + * + * @filesource QRMatrix.php + * @created 15.11.2017 + * @package chillerlan\QRCode\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Data; + +use chillerlan\QRCode\QRCode; +use Closure; + +use function array_fill, array_key_exists, array_push, array_unshift, count, floor, in_array, max, min, range; + +/** + * @link http://www.thonky.com/qr-code-tutorial/format-version-information + */ +class QRMatrix{ + + public const M_NULL = 0x00; + public const M_DARKMODULE = 0x02; + public const M_DATA = 0x04; + public const M_FINDER = 0x06; + public const M_SEPARATOR = 0x08; + public const M_ALIGNMENT = 0x0a; + public const M_TIMING = 0x0c; + public const M_FORMAT = 0x0e; + public const M_VERSION = 0x10; + public const M_QUIETZONE = 0x12; + public const M_LOGO = 0x14; + public const M_FINDER_DOT = 0x16; + + public const M_TEST = 0xff; + + /** + * @link http://www.thonky.com/qr-code-tutorial/alignment-pattern-locations + * + * version -> pattern + */ + protected const alignmentPattern = [ + 1 => [], + 2 => [6, 18], + 3 => [6, 22], + 4 => [6, 26], + 5 => [6, 30], + 6 => [6, 34], + 7 => [6, 22, 38], + 8 => [6, 24, 42], + 9 => [6, 26, 46], + 10 => [6, 28, 50], + 11 => [6, 30, 54], + 12 => [6, 32, 58], + 13 => [6, 34, 62], + 14 => [6, 26, 46, 66], + 15 => [6, 26, 48, 70], + 16 => [6, 26, 50, 74], + 17 => [6, 30, 54, 78], + 18 => [6, 30, 56, 82], + 19 => [6, 30, 58, 86], + 20 => [6, 34, 62, 90], + 21 => [6, 28, 50, 72, 94], + 22 => [6, 26, 50, 74, 98], + 23 => [6, 30, 54, 78, 102], + 24 => [6, 28, 54, 80, 106], + 25 => [6, 32, 58, 84, 110], + 26 => [6, 30, 58, 86, 114], + 27 => [6, 34, 62, 90, 118], + 28 => [6, 26, 50, 74, 98, 122], + 29 => [6, 30, 54, 78, 102, 126], + 30 => [6, 26, 52, 78, 104, 130], + 31 => [6, 30, 56, 82, 108, 134], + 32 => [6, 34, 60, 86, 112, 138], + 33 => [6, 30, 58, 86, 114, 142], + 34 => [6, 34, 62, 90, 118, 146], + 35 => [6, 30, 54, 78, 102, 126, 150], + 36 => [6, 24, 50, 76, 102, 128, 154], + 37 => [6, 28, 54, 80, 106, 132, 158], + 38 => [6, 32, 58, 84, 110, 136, 162], + 39 => [6, 26, 54, 82, 110, 138, 166], + 40 => [6, 30, 58, 86, 114, 142, 170], + ]; + + /** + * @link http://www.thonky.com/qr-code-tutorial/format-version-tables + * + * no version pattern for QR Codes < 7 + */ + protected const versionPattern = [ + 7 => 0b000111110010010100, + 8 => 0b001000010110111100, + 9 => 0b001001101010011001, + 10 => 0b001010010011010011, + 11 => 0b001011101111110110, + 12 => 0b001100011101100010, + 13 => 0b001101100001000111, + 14 => 0b001110011000001101, + 15 => 0b001111100100101000, + 16 => 0b010000101101111000, + 17 => 0b010001010001011101, + 18 => 0b010010101000010111, + 19 => 0b010011010100110010, + 20 => 0b010100100110100110, + 21 => 0b010101011010000011, + 22 => 0b010110100011001001, + 23 => 0b010111011111101100, + 24 => 0b011000111011000100, + 25 => 0b011001000111100001, + 26 => 0b011010111110101011, + 27 => 0b011011000010001110, + 28 => 0b011100110000011010, + 29 => 0b011101001100111111, + 30 => 0b011110110101110101, + 31 => 0b011111001001010000, + 32 => 0b100000100111010101, + 33 => 0b100001011011110000, + 34 => 0b100010100010111010, + 35 => 0b100011011110011111, + 36 => 0b100100101100001011, + 37 => 0b100101010000101110, + 38 => 0b100110101001100100, + 39 => 0b100111010101000001, + 40 => 0b101000110001101001, + ]; + + // ECC level -> mask pattern + protected const formatPattern = [ + [ // L + 0b111011111000100, + 0b111001011110011, + 0b111110110101010, + 0b111100010011101, + 0b110011000101111, + 0b110001100011000, + 0b110110001000001, + 0b110100101110110, + ], + [ // M + 0b101010000010010, + 0b101000100100101, + 0b101111001111100, + 0b101101101001011, + 0b100010111111001, + 0b100000011001110, + 0b100111110010111, + 0b100101010100000, + ], + [ // Q + 0b011010101011111, + 0b011000001101000, + 0b011111100110001, + 0b011101000000110, + 0b010010010110100, + 0b010000110000011, + 0b010111011011010, + 0b010101111101101, + ], + [ // H + 0b001011010001001, + 0b001001110111110, + 0b001110011100111, + 0b001100111010000, + 0b000011101100010, + 0b000001001010101, + 0b000110100001100, + 0b000100000111011, + ], + ]; + + /** + * @var int + */ + protected $version; + + /** + * @var int + */ + protected $eclevel; + + /** + * @var int + */ + protected $maskPattern = QRCode::MASK_PATTERN_AUTO; + + /** + * @var int + */ + protected $moduleCount; + + /** + * @var mixed[] + */ + protected $matrix; + + /** + * QRMatrix constructor. + * + * @param int $version + * @param int $eclevel + * + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + public function __construct(int $version, int $eclevel){ + + if(!in_array($version, range(1, 40), true)){ + throw new QRCodeDataException('invalid QR Code version'); + } + + if(!array_key_exists($eclevel, QRCode::ECC_MODES)){ + throw new QRCodeDataException('invalid ecc level'); + } + + $this->version = $version; + $this->eclevel = $eclevel; + $this->moduleCount = $this->version * 4 + 17; + $this->matrix = array_fill(0, $this->moduleCount, array_fill(0, $this->moduleCount, $this::M_NULL)); + } + + /** + * Returns the data matrix, returns a pure boolean representation if $boolean is set to true + * + * @return int[][]|bool[][] + */ + public function matrix(bool $boolean = false):array{ + + if(!$boolean){ + return $this->matrix; + } + + $matrix = []; + + foreach($this->matrix as $y => $row){ + $matrix[$y] = []; + + foreach($row as $x => $val){ + $matrix[$y][$x] = ($val >> 8) > 0; + } + } + + return $matrix; + } + + /** + * @return int + */ + public function version():int{ + return $this->version; + } + + /** + * @return int + */ + public function eccLevel():int{ + return $this->eclevel; + } + + /** + * @return int + */ + public function maskPattern():int{ + return $this->maskPattern; + } + + /** + * Returns the absoulute size of the matrix, including quiet zone (after setting it). + * + * size = version * 4 + 17 [ + 2 * quietzone size] + * + * @return int + */ + public function size():int{ + return $this->moduleCount; + } + + /** + * Returns the value of the module at position [$x, $y] + * + * @param int $x + * @param int $y + * + * @return int + */ + public function get(int $x, int $y):int{ + return $this->matrix[$y][$x]; + } + + /** + * Sets the $M_TYPE value for the module at position [$x, $y] + * + * true => $M_TYPE << 8 + * false => $M_TYPE + * + * @param int $x + * @param int $y + * @param int $M_TYPE + * @param bool $value + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function set(int $x, int $y, bool $value, int $M_TYPE):QRMatrix{ + $this->matrix[$y][$x] = $M_TYPE << ($value ? 8 : 0); + + return $this; + } + + /** + * Checks whether a module is true (dark) or false (light) + * + * true => $value >> 8 === $M_TYPE + * $value >> 8 > 0 + * + * false => $value === $M_TYPE + * $value >> 8 === 0 + * + * @param int $x + * @param int $y + * + * @return bool + */ + public function check(int $x, int $y):bool{ + return $this->matrix[$y][$x] >> 8 > 0; + } + + + /** + * Sets the "dark module", that is always on the same position 1x1px away from the bottom left finder + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setDarkModule():QRMatrix{ + $this->set(8, 4 * $this->version + 9, true, $this::M_DARKMODULE); + + return $this; + } + + /** + * Draws the 7x7 finder patterns in the corners top left/right and bottom left + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setFinderPattern():QRMatrix{ + + $pos = [ + [0, 0], // top left + [$this->moduleCount - 7, 0], // bottom left + [0, $this->moduleCount - 7], // top right + ]; + + foreach($pos as $c){ + for($y = 0; $y < 7; $y++){ + for($x = 0; $x < 7; $x++){ + // outer (dark) 7*7 square + if($x === 0 || $x === 6 || $y === 0 || $y === 6){ + $this->set($c[0] + $y, $c[1] + $x, true, $this::M_FINDER); + } + // inner (light) 5*5 square + elseif($x === 1 || $x === 5 || $y === 1 || $y === 5){ + $this->set($c[0] + $y, $c[1] + $x, false, $this::M_FINDER); + } + // 3*3 dot + else{ + $this->set($c[0] + $y, $c[1] + $x, true, $this::M_FINDER_DOT); + } + } + } + } + + return $this; + } + + /** + * Draws the separator lines around the finder patterns + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setSeparators():QRMatrix{ + + $h = [ + [7, 0], + [$this->moduleCount - 8, 0], + [7, $this->moduleCount - 8], + ]; + + $v = [ + [7, 7], + [$this->moduleCount - 1, 7], + [7, $this->moduleCount - 8], + ]; + + for($c = 0; $c < 3; $c++){ + for($i = 0; $i < 8; $i++){ + $this->set($h[$c][0] , $h[$c][1] + $i, false, $this::M_SEPARATOR); + $this->set($v[$c][0] - $i, $v[$c][1] , false, $this::M_SEPARATOR); + } + } + + return $this; + } + + + /** + * Draws the 5x5 alignment patterns + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setAlignmentPattern():QRMatrix{ + + foreach($this::alignmentPattern[$this->version] as $y){ + foreach($this::alignmentPattern[$this->version] as $x){ + + // skip existing patterns + if($this->matrix[$y][$x] !== $this::M_NULL){ + continue; + } + + for($ry = -2; $ry <= 2; $ry++){ + for($rx = -2; $rx <= 2; $rx++){ + $v = ($ry === 0 && $rx === 0) || $ry === 2 || $ry === -2 || $rx === 2 || $rx === -2; + + $this->set($x + $rx, $y + $ry, $v, $this::M_ALIGNMENT); + } + } + + } + } + + return $this; + } + + + /** + * Draws the timing pattern (h/v checkered line between the finder patterns) + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setTimingPattern():QRMatrix{ + + foreach(range(8, $this->moduleCount - 8 - 1) as $i){ + + if($this->matrix[6][$i] !== $this::M_NULL || $this->matrix[$i][6] !== $this::M_NULL){ + continue; + } + + $v = $i % 2 === 0; + + $this->set($i, 6, $v, $this::M_TIMING); // h + $this->set(6, $i, $v, $this::M_TIMING); // v + } + + return $this; + } + + /** + * Draws the version information, 2x 3x6 pixel + * + * @param bool|null $test + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setVersionNumber(bool $test = null):QRMatrix{ + $bits = $this::versionPattern[$this->version] ?? false; + + if($bits !== false){ + + for($i = 0; $i < 18; $i++){ + $a = (int)floor($i / 3); + $b = $i % 3 + $this->moduleCount - 8 - 3; + $v = !$test && (($bits >> $i) & 1) === 1; + + $this->set($b, $a, $v, $this::M_VERSION); // ne + $this->set($a, $b, $v, $this::M_VERSION); // sw + } + + } + + return $this; + } + + /** + * Draws the format info along the finder patterns + * + * @param int $maskPattern + * @param bool|null $test + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function setFormatInfo(int $maskPattern, bool $test = null):QRMatrix{ + $bits = $this::formatPattern[QRCode::ECC_MODES[$this->eclevel]][$maskPattern] ?? 0; + + for($i = 0; $i < 15; $i++){ + $v = !$test && (($bits >> $i) & 1) === 1; + + if($i < 6){ + $this->set(8, $i, $v, $this::M_FORMAT); + } + elseif($i < 8){ + $this->set(8, $i + 1, $v, $this::M_FORMAT); + } + else{ + $this->set(8, $this->moduleCount - 15 + $i, $v, $this::M_FORMAT); + } + + if($i < 8){ + $this->set($this->moduleCount - $i - 1, 8, $v, $this::M_FORMAT); + } + elseif($i < 9){ + $this->set(15 - $i, 8, $v, $this::M_FORMAT); + } + else{ + $this->set(15 - $i - 1, 8, $v, $this::M_FORMAT); + } + + } + + $this->set(8, $this->moduleCount - 8, !$test, $this::M_FORMAT); + + return $this; + } + + /** + * Draws the "quiet zone" of $size around the matrix + * + * @param int|null $size + * + * @return \chillerlan\QRCode\Data\QRMatrix + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + public function setQuietZone(int $size = null):QRMatrix{ + + if($this->matrix[$this->moduleCount - 1][$this->moduleCount - 1] === $this::M_NULL){ + throw new QRCodeDataException('use only after writing data'); + } + + $size = $size !== null + ? max(0, min($size, floor($this->moduleCount / 2))) + : 4; + + for($y = 0; $y < $this->moduleCount; $y++){ + for($i = 0; $i < $size; $i++){ + array_unshift($this->matrix[$y], $this::M_QUIETZONE); + array_push($this->matrix[$y], $this::M_QUIETZONE); + } + } + + $this->moduleCount += ($size * 2); + + $r = array_fill(0, $this->moduleCount, $this::M_QUIETZONE); + + for($i = 0; $i < $size; $i++){ + array_unshift($this->matrix, $r); + array_push($this->matrix, $r); + } + + return $this; + } + + /** + * Clears a space of $width * $height in order to add a logo or text. + * + * Additionally, the logo space can be positioned within the QR Code - respecting the main functional patterns - + * using $startX and $startY. If either of these are null, the logo space will be centered in that direction. + * ECC level "H" (30%) is required. + * + * Please note that adding a logo space minimizes the error correction capacity of the QR Code and + * created images may become unreadable, especially when printed with a chance to receive damage. + * Please test thoroughly before using this feature in production. + * + * This method should be called from within an output module (after the matrix has been filled with data). + * Note that there is no restiction on how many times this method could be called on the same matrix instance. + * + * @link https://github.com/chillerlan/php-qrcode/issues/52 + * + * @param int $width + * @param int $height + * @param int|null $startX + * @param int|null $startY + * + * @return \chillerlan\QRCode\Data\QRMatrix + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + public function setLogoSpace(int $width, int $height, int $startX = null, int $startY = null):QRMatrix{ + + // for logos we operate in ECC H (30%) only + if($this->eclevel !== 0b10){ + throw new QRCodeDataException('ECC level "H" required to add logo space'); + } + + // we need uneven sizes, adjust if needed + if(($width % 2) === 0){ + $width++; + } + + if(($height % 2) === 0){ + $height++; + } + + // $this->moduleCount includes the quiet zone (if created), we need the QR size here + $length = $this->version * 4 + 17; + + // throw if the logo space exceeds the maximum error correction capacity + if($width * $height > floor($length * $length * 0.2)){ + throw new QRCodeDataException('logo space exceeds the maximum error correction capacity'); + } + + // quiet zone size + $qz = ($this->moduleCount - $length) / 2; + // skip quiet zone and the first 9 rows/columns (finder-, mode-, version- and timing patterns) + $start = $qz + 9; + // skip quiet zone + $end = $this->moduleCount - $qz; + + // determine start coordinates + $startX = ($startX !== null ? $startX : ($length - $width) / 2) + $qz; + $startY = ($startY !== null ? $startY : ($length - $height) / 2) + $qz; + + // clear the space + foreach($this->matrix as $y => $row){ + foreach($row as $x => $val){ + // out of bounds, skip + if($x < $start || $y < $start ||$x >= $end || $y >= $end){ + continue; + } + // a match + if($x >= $startX && $x < ($startX + $width) && $y >= $startY && $y < ($startY + $height)){ + $this->set($x, $y, false, $this::M_LOGO); + } + } + } + + return $this; + } + + /** + * Maps the binary $data array from QRDataInterface::maskECC() on the matrix, using $maskPattern + * + * @see \chillerlan\QRCode\Data\QRDataAbstract::maskECC() + * + * @param int[] $data + * @param int $maskPattern + * + * @return \chillerlan\QRCode\Data\QRMatrix + */ + public function mapData(array $data, int $maskPattern):QRMatrix{ + $this->maskPattern = $maskPattern; + $byteCount = count($data); + $size = $this->moduleCount - 1; + $mask = $this->getMask($this->maskPattern); + + for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex = 7; $i > 0; $i -= 2){ + + if($i === 6){ + $i--; + } + + while(true){ + for($c = 0; $c < 2; $c++){ + $x = $i - $c; + + if($this->matrix[$y][$x] === $this::M_NULL){ + $v = false; + + if($byteIndex < $byteCount){ + $v = (($data[$byteIndex] >> $bitIndex) & 1) === 1; + } + + if($mask($x, $y) === 0){ + $v = !$v; + } + + $this->matrix[$y][$x] = $this::M_DATA << ($v ? 8 : 0); + $bitIndex--; + + if($bitIndex === -1){ + $byteIndex++; + $bitIndex = 7; + } + + } + } + + $y += $inc; + + if($y < 0 || $this->moduleCount <= $y){ + $y -= $inc; + $inc = -$inc; + + break; + } + + } + } + + return $this; + } + + /** + * ISO/IEC 18004:2000 Section 8.8.1 + * + * Note that some versions of the QR code standard have had errors in the section about mask patterns. + * The information below has been corrected. (https://www.thonky.com/qr-code-tutorial/mask-patterns) + * + * @see \chillerlan\QRCode\QRMatrix::mapData() + * + * @internal + * + * @param int $maskPattern + * + * @return \Closure + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + protected function getMask(int $maskPattern):Closure{ + + if((0b111 & $maskPattern) !== $maskPattern){ + throw new QRCodeDataException('invalid mask pattern'); // @codeCoverageIgnore + } + + return [ + 0b000 => function($x, $y):int{ return ($x + $y) % 2; }, + 0b001 => function($x, $y):int{ return $y % 2; }, + 0b010 => function($x, $y):int{ return $x % 3; }, + 0b011 => function($x, $y):int{ return ($x + $y) % 3; }, + 0b100 => function($x, $y):int{ return ((int)($y / 2) + (int)($x / 3)) % 2; }, + 0b101 => function($x, $y):int{ return (($x * $y) % 2) + (($x * $y) % 3); }, + 0b110 => function($x, $y):int{ return ((($x * $y) % 2) + (($x * $y) % 3)) % 2; }, + 0b111 => function($x, $y):int{ return ((($x * $y) % 3) + (($x + $y) % 2)) % 2; }, + ][$maskPattern]; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Helpers/BitBuffer.php b/vendor/chillerlan/php-qrcode/src/Helpers/BitBuffer.php new file mode 100644 index 000000000..0b4ff6a77 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Helpers/BitBuffer.php @@ -0,0 +1,75 @@ +<?php +/** + * Class BitBuffer + * + * @filesource BitBuffer.php + * @created 25.11.2015 + * @package chillerlan\QRCode\Helpers + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Helpers; + +use function count, floor; + +class BitBuffer{ + + /** + * @var int[] + */ + public $buffer = []; + + /** + * @var int + */ + public $length = 0; + + /** + * @return \chillerlan\QRCode\Helpers\BitBuffer + */ + public function clear():BitBuffer{ + $this->buffer = []; + $this->length = 0; + + return $this; + } + + /** + * @param int $num + * @param int $length + * + * @return \chillerlan\QRCode\Helpers\BitBuffer + */ + public function put(int $num, int $length):BitBuffer{ + + for($i = 0; $i < $length; $i++){ + $this->putBit((($num >> ($length - $i - 1)) & 1) === 1); + } + + return $this; + } + + /** + * @param bool $bit + * + * @return \chillerlan\QRCode\Helpers\BitBuffer + */ + public function putBit(bool $bit):BitBuffer{ + $bufIndex = floor($this->length / 8); + + if(count($this->buffer) <= $bufIndex){ + $this->buffer[] = 0; + } + + if($bit === true){ + $this->buffer[(int)$bufIndex] |= (0x80 >> ($this->length % 8)); + } + + $this->length++; + + return $this; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Helpers/Polynomial.php b/vendor/chillerlan/php-qrcode/src/Helpers/Polynomial.php new file mode 100644 index 000000000..abe11d0cc --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Helpers/Polynomial.php @@ -0,0 +1,184 @@ +<?php +/** + * Class Polynomial + * + * @filesource Polynomial.php + * @created 25.11.2015 + * @package chillerlan\QRCode\Helpers + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Helpers; + +use chillerlan\QRCode\QRCodeException; + +use function array_fill, count, sprintf; + +/** + * @link http://www.thonky.com/qr-code-tutorial/error-correction-coding + */ +class Polynomial{ + + /** + * @link http://www.thonky.com/qr-code-tutorial/log-antilog-table + */ + protected const table = [ + [ 1, 0], [ 2, 0], [ 4, 1], [ 8, 25], [ 16, 2], [ 32, 50], [ 64, 26], [128, 198], + [ 29, 3], [ 58, 223], [116, 51], [232, 238], [205, 27], [135, 104], [ 19, 199], [ 38, 75], + [ 76, 4], [152, 100], [ 45, 224], [ 90, 14], [180, 52], [117, 141], [234, 239], [201, 129], + [143, 28], [ 3, 193], [ 6, 105], [ 12, 248], [ 24, 200], [ 48, 8], [ 96, 76], [192, 113], + [157, 5], [ 39, 138], [ 78, 101], [156, 47], [ 37, 225], [ 74, 36], [148, 15], [ 53, 33], + [106, 53], [212, 147], [181, 142], [119, 218], [238, 240], [193, 18], [159, 130], [ 35, 69], + [ 70, 29], [140, 181], [ 5, 194], [ 10, 125], [ 20, 106], [ 40, 39], [ 80, 249], [160, 185], + [ 93, 201], [186, 154], [105, 9], [210, 120], [185, 77], [111, 228], [222, 114], [161, 166], + [ 95, 6], [190, 191], [ 97, 139], [194, 98], [153, 102], [ 47, 221], [ 94, 48], [188, 253], + [101, 226], [202, 152], [137, 37], [ 15, 179], [ 30, 16], [ 60, 145], [120, 34], [240, 136], + [253, 54], [231, 208], [211, 148], [187, 206], [107, 143], [214, 150], [177, 219], [127, 189], + [254, 241], [225, 210], [223, 19], [163, 92], [ 91, 131], [182, 56], [113, 70], [226, 64], + [217, 30], [175, 66], [ 67, 182], [134, 163], [ 17, 195], [ 34, 72], [ 68, 126], [136, 110], + [ 13, 107], [ 26, 58], [ 52, 40], [104, 84], [208, 250], [189, 133], [103, 186], [206, 61], + [129, 202], [ 31, 94], [ 62, 155], [124, 159], [248, 10], [237, 21], [199, 121], [147, 43], + [ 59, 78], [118, 212], [236, 229], [197, 172], [151, 115], [ 51, 243], [102, 167], [204, 87], + [133, 7], [ 23, 112], [ 46, 192], [ 92, 247], [184, 140], [109, 128], [218, 99], [169, 13], + [ 79, 103], [158, 74], [ 33, 222], [ 66, 237], [132, 49], [ 21, 197], [ 42, 254], [ 84, 24], + [168, 227], [ 77, 165], [154, 153], [ 41, 119], [ 82, 38], [164, 184], [ 85, 180], [170, 124], + [ 73, 17], [146, 68], [ 57, 146], [114, 217], [228, 35], [213, 32], [183, 137], [115, 46], + [230, 55], [209, 63], [191, 209], [ 99, 91], [198, 149], [145, 188], [ 63, 207], [126, 205], + [252, 144], [229, 135], [215, 151], [179, 178], [123, 220], [246, 252], [241, 190], [255, 97], + [227, 242], [219, 86], [171, 211], [ 75, 171], [150, 20], [ 49, 42], [ 98, 93], [196, 158], + [149, 132], [ 55, 60], [110, 57], [220, 83], [165, 71], [ 87, 109], [174, 65], [ 65, 162], + [130, 31], [ 25, 45], [ 50, 67], [100, 216], [200, 183], [141, 123], [ 7, 164], [ 14, 118], + [ 28, 196], [ 56, 23], [112, 73], [224, 236], [221, 127], [167, 12], [ 83, 111], [166, 246], + [ 81, 108], [162, 161], [ 89, 59], [178, 82], [121, 41], [242, 157], [249, 85], [239, 170], + [195, 251], [155, 96], [ 43, 134], [ 86, 177], [172, 187], [ 69, 204], [138, 62], [ 9, 90], + [ 18, 203], [ 36, 89], [ 72, 95], [144, 176], [ 61, 156], [122, 169], [244, 160], [245, 81], + [247, 11], [243, 245], [251, 22], [235, 235], [203, 122], [139, 117], [ 11, 44], [ 22, 215], + [ 44, 79], [ 88, 174], [176, 213], [125, 233], [250, 230], [233, 231], [207, 173], [131, 232], + [ 27, 116], [ 54, 214], [108, 244], [216, 234], [173, 168], [ 71, 80], [142, 88], [ 1, 175], + ]; + + /** + * @var array + */ + protected $num = []; + + /** + * Polynomial constructor. + * + * @param array|null $num + * @param int|null $shift + */ + public function __construct(array $num = null, int $shift = null){ + $this->setNum($num ?? [1], $shift); + } + + /** + * @return array + */ + public function getNum():array{ + return $this->num; + } + + /** + * @param array $num + * @param int|null $shift + * + * @return \chillerlan\QRCode\Helpers\Polynomial + */ + public function setNum(array $num, int $shift = null):Polynomial{ + $offset = 0; + $numCount = count($num); + + while($offset < $numCount && $num[$offset] === 0){ + $offset++; + } + + $this->num = array_fill(0, $numCount - $offset + ($shift ?? 0), 0); + + for($i = 0; $i < $numCount - $offset; $i++){ + $this->num[$i] = $num[$i + $offset]; + } + + return $this; + } + + /** + * @param array $e + * + * @return \chillerlan\QRCode\Helpers\Polynomial + */ + public function multiply(array $e):Polynomial{ + $n = array_fill(0, count($this->num) + count($e) - 1, 0); + + foreach($this->num as $i => $vi){ + $vi = $this->glog($vi); + + foreach($e as $j => $vj){ + $n[$i + $j] ^= $this->gexp($vi + $this->glog($vj)); + } + + } + + $this->setNum($n); + + return $this; + } + + /** + * @param array $e + * + * @return \chillerlan\QRCode\Helpers\Polynomial + */ + public function mod(array $e):Polynomial{ + $n = $this->num; + + if(count($n) - count($e) < 0){ + return $this; + } + + $ratio = $this->glog($n[0]) - $this->glog($e[0]); + + foreach($e as $i => $v){ + $n[$i] ^= $this->gexp($this->glog($v) + $ratio); + } + + $this->setNum($n)->mod($e); + + return $this; + } + + /** + * @param int $n + * + * @return int + * @throws \chillerlan\QRCode\QRCodeException + */ + public function glog(int $n):int{ + + if($n < 1){ + throw new QRCodeException(sprintf('log(%s)', $n)); + } + + return Polynomial::table[$n][1]; + } + + /** + * @param int $n + * + * @return int + */ + public function gexp(int $n):int{ + + if($n < 0){ + $n += 255; + } + elseif($n >= 256){ + $n -= 255; + } + + return Polynomial::table[$n][0]; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRCodeOutputException.php b/vendor/chillerlan/php-qrcode/src/Output/QRCodeOutputException.php new file mode 100644 index 000000000..639bdd111 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRCodeOutputException.php @@ -0,0 +1,17 @@ +<?php +/** + * Class QRCodeOutputException + * + * @filesource QRCodeOutputException.php + * @created 09.12.2015 + * @package chillerlan\QRCode\Output + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\QRCodeException; + +class QRCodeOutputException extends QRCodeException{} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRFpdf.php b/vendor/chillerlan/php-qrcode/src/Output/QRFpdf.php new file mode 100644 index 000000000..a706685af --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRFpdf.php @@ -0,0 +1,112 @@ +<?php +/** + * Class QRFpdf + * + * https://github.com/chillerlan/php-qrcode/pull/49 + * + * @filesource QRFpdf.php + * @created 03.06.2020 + * @package chillerlan\QRCode\Output + * @author Maximilian Kresse + * + * @license MIT + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\Data\QRMatrix; +use chillerlan\QRCode\QRCodeException; +use chillerlan\Settings\SettingsContainerInterface; +use FPDF; + +use function array_values, class_exists, count, is_array; + +/** + * QRFpdf output module (requires fpdf) + * + * @see https://github.com/Setasign/FPDF + * @see http://www.fpdf.org/ + */ +class QRFpdf extends QROutputAbstract{ + + public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){ + + if(!class_exists(FPDF::class)){ + // @codeCoverageIgnoreStart + throw new QRCodeException( + 'The QRFpdf output requires FPDF as dependency but the class "\FPDF" couldn\'t be found.' + ); + // @codeCoverageIgnoreEnd + } + + parent::__construct($options, $matrix); + } + + /** + * @inheritDoc + */ + protected function setModuleValues():void{ + + foreach($this::DEFAULT_MODULE_VALUES as $M_TYPE => $defaultValue){ + $v = $this->options->moduleValues[$M_TYPE] ?? null; + + if(!is_array($v) || count($v) < 3){ + $this->moduleValues[$M_TYPE] = $defaultValue + ? [0, 0, 0] + : [255, 255, 255]; + } + else{ + $this->moduleValues[$M_TYPE] = array_values($v); + } + + } + + } + + /** + * @inheritDoc + * + * @return string|\FPDF + */ + public function dump(string $file = null){ + $file = $file ?? $this->options->cachefile; + + $fpdf = new FPDF('P', $this->options->fpdfMeasureUnit, [$this->length, $this->length]); + $fpdf->AddPage(); + + $prevColor = null; + + foreach($this->matrix->matrix() as $y => $row){ + + foreach($row as $x => $M_TYPE){ + /** @var int $M_TYPE */ + $color = $this->moduleValues[$M_TYPE]; + + if($prevColor === null || $prevColor !== $color){ + $fpdf->SetFillColor(...$color); + $prevColor = $color; + } + + $fpdf->Rect($x * $this->scale, $y * $this->scale, 1 * $this->scale, 1 * $this->scale, 'F'); + } + + } + + if($this->options->returnResource){ + return $fpdf; + } + + $pdfData = $fpdf->Output('S'); + + if($file !== null){ + $this->saveToFile($pdfData, $file); + } + + if($this->options->imageBase64){ + $pdfData = sprintf('data:application/pdf;base64,%s', base64_encode($pdfData)); + } + + return $pdfData; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRImage.php b/vendor/chillerlan/php-qrcode/src/Output/QRImage.php new file mode 100644 index 000000000..598948c94 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRImage.php @@ -0,0 +1,208 @@ +<?php +/** + * Class QRImage + * + * @filesource QRImage.php + * @created 05.12.2015 + * @package chillerlan\QRCode\Output + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\Data\QRMatrix; +use chillerlan\QRCode\{QRCode, QRCodeException}; +use chillerlan\Settings\SettingsContainerInterface; +use Exception; + +use function array_values, base64_encode, call_user_func, count, imagecolorallocate, imagecolortransparent, + imagecreatetruecolor, imagedestroy, imagefilledrectangle, imagegif, imagejpeg, imagepng, in_array, + is_array, ob_end_clean, ob_get_contents, ob_start, range, sprintf; + +/** + * Converts the matrix into GD images, raw or base64 output + * requires ext-gd + * @link http://php.net/manual/book.image.php + */ +class QRImage extends QROutputAbstract{ + + protected const TRANSPARENCY_TYPES = [ + QRCode::OUTPUT_IMAGE_PNG, + QRCode::OUTPUT_IMAGE_GIF, + ]; + + /** + * @var string + */ + protected $defaultMode = QRCode::OUTPUT_IMAGE_PNG; + + /** + * @see imagecreatetruecolor() + * @var resource + */ + protected $image; + + /** + * @inheritDoc + * + * @throws \chillerlan\QRCode\QRCodeException + */ + public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){ + + if(!extension_loaded('gd')){ + throw new QRCodeException('ext-gd not loaded'); // @codeCoverageIgnore + } + + parent::__construct($options, $matrix); + } + + /** + * @inheritDoc + */ + protected function setModuleValues():void{ + + foreach($this::DEFAULT_MODULE_VALUES as $M_TYPE => $defaultValue){ + $v = $this->options->moduleValues[$M_TYPE] ?? null; + + if(!is_array($v) || count($v) < 3){ + $this->moduleValues[$M_TYPE] = $defaultValue + ? [0, 0, 0] + : [255, 255, 255]; + } + else{ + $this->moduleValues[$M_TYPE] = array_values($v); + } + + } + + } + + /** + * @inheritDoc + * + * @return string|resource + */ + public function dump(string $file = null){ + $this->image = imagecreatetruecolor($this->length, $this->length); + + // avoid: Indirect modification of overloaded property $imageTransparencyBG has no effect + // https://stackoverflow.com/a/10455217 + $tbg = $this->options->imageTransparencyBG; + $background = imagecolorallocate($this->image, ...$tbg); + + if((bool)$this->options->imageTransparent && in_array($this->options->outputType, $this::TRANSPARENCY_TYPES, true)){ + imagecolortransparent($this->image, $background); + } + + imagefilledrectangle($this->image, 0, 0, $this->length, $this->length, $background); + + foreach($this->matrix->matrix() as $y => $row){ + foreach($row as $x => $M_TYPE){ + $this->setPixel($x, $y, $this->moduleValues[$M_TYPE]); + } + } + + if($this->options->returnResource){ + return $this->image; + } + + $imageData = $this->dumpImage($file); + + if($this->options->imageBase64){ + $imageData = sprintf('data:image/%s;base64,%s', $this->options->outputType, base64_encode($imageData)); + } + + return $imageData; + } + + /** + * @param int $x + * @param int $y + * @param array $rgb + * + * @return void + */ + protected function setPixel(int $x, int $y, array $rgb):void{ + imagefilledrectangle( + $this->image, + $x * $this->scale, + $y * $this->scale, + ($x + 1) * $this->scale, + ($y + 1) * $this->scale, + imagecolorallocate($this->image, ...$rgb) + ); + } + + /** + * @param string|null $file + * + * @return string + + * @throws \chillerlan\QRCode\Output\QRCodeOutputException + */ + protected function dumpImage(string $file = null):string{ + $file = $file ?? $this->options->cachefile; + + ob_start(); + + try{ + call_user_func([$this, $this->outputMode ?? $this->defaultMode]); + } + // not going to cover edge cases + // @codeCoverageIgnoreStart + catch(Exception $e){ + throw new QRCodeOutputException($e->getMessage()); + } + // @codeCoverageIgnoreEnd + + $imageData = ob_get_contents(); + imagedestroy($this->image); + + ob_end_clean(); + + if($file !== null){ + $this->saveToFile($imageData, $file); + } + + return $imageData; + } + + /** + * @return void + */ + protected function png():void{ + imagepng( + $this->image, + null, + in_array($this->options->pngCompression, range(-1, 9), true) + ? $this->options->pngCompression + : -1 + ); + } + + /** + * Jiff - like... JitHub! + * @return void + */ + protected function gif():void{ + imagegif($this->image); + } + + /** + * @return void + */ + protected function jpg():void{ + imagejpeg( + $this->image, + null, + in_array($this->options->jpegQuality, range(0, 100), true) + ? $this->options->jpegQuality + : 85 + ); + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRImagick.php b/vendor/chillerlan/php-qrcode/src/Output/QRImagick.php new file mode 100644 index 000000000..03886cf3b --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRImagick.php @@ -0,0 +1,123 @@ +<?php +/** + * Class QRImagick + * + * @filesource QRImagick.php + * @created 04.07.2018 + * @package chillerlan\QRCode\Output + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\Data\QRMatrix; +use chillerlan\QRCode\QRCodeException; +use chillerlan\Settings\SettingsContainerInterface; +use Imagick, ImagickDraw, ImagickPixel; + +use function is_string; + +/** + * ImageMagick output module + * requires ext-imagick + * @link http://php.net/manual/book.imagick.php + * @link http://phpimagick.com + */ +class QRImagick extends QROutputAbstract{ + + /** + * @var \Imagick + */ + protected $imagick; + + /** + * @inheritDoc + * @throws \chillerlan\QRCode\QRCodeException + */ + public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){ + + if(!extension_loaded('imagick')){ + throw new QRCodeException('ext-imagick not loaded'); // @codeCoverageIgnore + } + + parent::__construct($options, $matrix); + } + + /** + * @inheritDoc + */ + protected function setModuleValues():void{ + + foreach($this::DEFAULT_MODULE_VALUES as $type => $defaultValue){ + $v = $this->options->moduleValues[$type] ?? null; + + if(!is_string($v)){ + $this->moduleValues[$type] = $defaultValue + ? new ImagickPixel($this->options->markupDark) + : new ImagickPixel($this->options->markupLight); + } + else{ + $this->moduleValues[$type] = new ImagickPixel($v); + } + } + } + + /** + * @inheritDoc + * + * @return string|\Imagick + */ + public function dump(string $file = null){ + $file = $file ?? $this->options->cachefile; + $this->imagick = new Imagick; + + $this->imagick->newImage( + $this->length, + $this->length, + new ImagickPixel($this->options->imagickBG ?? 'transparent'), + $this->options->imagickFormat + ); + + $this->drawImage(); + + if($this->options->returnResource){ + return $this->imagick; + } + + $imageData = $this->imagick->getImageBlob(); + + if($file !== null){ + $this->saveToFile($imageData, $file); + } + + return $imageData; + } + + /** + * @return void + */ + protected function drawImage():void{ + $draw = new ImagickDraw; + + foreach($this->matrix->matrix() as $y => $row){ + foreach($row as $x => $M_TYPE){ + $draw->setStrokeColor($this->moduleValues[$M_TYPE]); + $draw->setFillColor($this->moduleValues[$M_TYPE]); + $draw->rectangle( + $x * $this->scale, + $y * $this->scale, + ($x + 1) * $this->scale, + ($y + 1) * $this->scale + ); + + } + } + + $this->imagick->drawImage($draw); + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php b/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php new file mode 100644 index 000000000..15559dae0 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php @@ -0,0 +1,151 @@ +<?php +/** + * Class QRMarkup + * + * @filesource QRMarkup.php + * @created 17.12.2016 + * @package chillerlan\QRCode\Output + * @author Smiley <[email protected]> + * @copyright 2016 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\QRCode; + +use function is_string, sprintf, strip_tags, trim; + +/** + * Converts the matrix into markup types: HTML, SVG, ... + */ +class QRMarkup extends QROutputAbstract{ + + /** + * @var string + */ + protected $defaultMode = QRCode::OUTPUT_MARKUP_SVG; + + /** + * @see \sprintf() + * + * @var string + */ + protected $svgHeader = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="qr-svg %1$s" style="width: 100%%; height: auto;" viewBox="0 0 %2$d %2$d">'; + + /** + * @inheritDoc + */ + protected function setModuleValues():void{ + + foreach($this::DEFAULT_MODULE_VALUES as $M_TYPE => $defaultValue){ + $v = $this->options->moduleValues[$M_TYPE] ?? null; + + if(!is_string($v)){ + $this->moduleValues[$M_TYPE] = $defaultValue + ? $this->options->markupDark + : $this->options->markupLight; + } + else{ + $this->moduleValues[$M_TYPE] = trim(strip_tags($v), '\'"'); + } + + } + + } + + /** + * @return string + */ + protected function html():string{ + $html = '<div class="'.$this->options->cssClass.'">'.$this->options->eol; + + foreach($this->matrix->matrix() as $row){ + $html .= '<div>'; + + foreach($row as $M_TYPE){ + $html .= '<span style="background: '.$this->moduleValues[$M_TYPE].';"></span>'; + } + + $html .= '</div>'.$this->options->eol; + } + + $html .= '</div>'.$this->options->eol; + + if($this->options->cachefile){ + return '<!DOCTYPE html><head><meta charset="UTF-8"></head><body>'.$this->options->eol.$html.'</body>'; + } + + return $html; + } + + /** + * @link https://github.com/codemasher/php-qrcode/pull/5 + * + * @return string + */ + protected function svg():string{ + $matrix = $this->matrix->matrix(); + + $svg = sprintf($this->svgHeader, $this->options->cssClass, $this->options->svgViewBoxSize ?? $this->moduleCount) + .$this->options->eol + .'<defs>'.$this->options->svgDefs.'</defs>' + .$this->options->eol; + + foreach($this->moduleValues as $M_TYPE => $value){ + $path = ''; + + foreach($matrix as $y => $row){ + //we'll combine active blocks within a single row as a lightweight compression technique + $start = null; + $count = 0; + + foreach($row as $x => $module){ + + if($module === $M_TYPE){ + $count++; + + if($start === null){ + $start = $x; + } + + if(isset($row[$x + 1])){ + continue; + } + } + + if($count > 0){ + $len = $count; + $path .= sprintf('M%s %s h%s v1 h-%sZ ', $start, $y, $len, $len); + + // reset count + $count = 0; + $start = null; + } + + } + + } + + if(!empty($path)){ + $svg .= sprintf('<path class="qr-%s %s" stroke="transparent" fill="%s" fill-opacity="%s" d="%s" />', $M_TYPE, $this->options->cssClass, $value, $this->options->svgOpacity, $path); + } + + } + + // close svg + $svg .= '</svg>'.$this->options->eol; + + // if saving to file, append the correct headers + if($this->options->cachefile){ + return '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'.$this->options->eol.$svg; + } + + if($this->options->imageBase64){ + $svg = sprintf('data:image/svg+xml;base64,%s', base64_encode($svg)); + } + + return $svg; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QROutputAbstract.php b/vendor/chillerlan/php-qrcode/src/Output/QROutputAbstract.php new file mode 100644 index 000000000..4ec47de24 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QROutputAbstract.php @@ -0,0 +1,130 @@ +<?php +/** + * Class QROutputAbstract + * + * @filesource QROutputAbstract.php + * @created 09.12.2015 + * @package chillerlan\QRCode\Output + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\{Data\QRMatrix, QRCode}; +use chillerlan\Settings\SettingsContainerInterface; + +use function call_user_func, dirname, file_put_contents, get_called_class, in_array, is_writable, sprintf; + +/** + * common output abstract + */ +abstract class QROutputAbstract implements QROutputInterface{ + + /** + * @var int + */ + protected $moduleCount; + + /** + * @param \chillerlan\QRCode\Data\QRMatrix $matrix + */ + protected $matrix; + + /** + * @var \chillerlan\QRCode\QROptions + */ + protected $options; + + /** + * @var string + */ + protected $outputMode; + + /** + * @var string; + */ + protected $defaultMode; + + /** + * @var int + */ + protected $scale; + + /** + * @var int + */ + protected $length; + + /** + * @var array + */ + protected $moduleValues; + + /** + * QROutputAbstract constructor. + * + * @param \chillerlan\Settings\SettingsContainerInterface $options + * @param \chillerlan\QRCode\Data\QRMatrix $matrix + */ + public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){ + $this->options = $options; + $this->matrix = $matrix; + $this->moduleCount = $this->matrix->size(); + $this->scale = $this->options->scale; + $this->length = $this->moduleCount * $this->scale; + + $class = get_called_class(); + + if(isset(QRCode::OUTPUT_MODES[$class]) && in_array($this->options->outputType, QRCode::OUTPUT_MODES[$class])){ + $this->outputMode = $this->options->outputType; + } + + $this->setModuleValues(); + } + + /** + * Sets the initial module values (clean-up & defaults) + * + * @return void + */ + abstract protected function setModuleValues():void; + + /** + * saves the qr data to a file + * + * @see file_put_contents() + * @see \chillerlan\QRCode\QROptions::cachefile + * + * @param string $data + * @param string $file + * + * @return bool + * @throws \chillerlan\QRCode\Output\QRCodeOutputException + */ + protected function saveToFile(string $data, string $file):bool{ + + if(!is_writable(dirname($file))){ + throw new QRCodeOutputException(sprintf('Could not write data to cache file: %s', $file)); + } + + return (bool)file_put_contents($file, $data); + } + + /** + * @inheritDoc + */ + public function dump(string $file = null){ + // call the built-in output method + $data = call_user_func([$this, $this->outputMode ?? $this->defaultMode]); + $file = $file ?? $this->options->cachefile; + + if($file !== null){ + $this->saveToFile($data, $file); + } + + return $data; + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QROutputInterface.php b/vendor/chillerlan/php-qrcode/src/Output/QROutputInterface.php new file mode 100644 index 000000000..d9149b0f7 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QROutputInterface.php @@ -0,0 +1,55 @@ +<?php +/** + * Interface QROutputInterface, + * + * @filesource QROutputInterface.php + * @created 02.12.2015 + * @package chillerlan\QRCode\Output + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\Data\QRMatrix; + +/** + * Converts the data matrix into readable output + */ +interface QROutputInterface{ + + const DEFAULT_MODULE_VALUES = [ + // light + QRMatrix::M_DATA => false, // 4 + QRMatrix::M_FINDER => false, // 6 + QRMatrix::M_SEPARATOR => false, // 8 + QRMatrix::M_ALIGNMENT => false, // 10 + QRMatrix::M_TIMING => false, // 12 + QRMatrix::M_FORMAT => false, // 14 + QRMatrix::M_VERSION => false, // 16 + QRMatrix::M_QUIETZONE => false, // 18 + QRMatrix::M_LOGO => false, // 20 + QRMatrix::M_TEST => false, // 255 + // dark + QRMatrix::M_DARKMODULE << 8 => true, // 512 + QRMatrix::M_DATA << 8 => true, // 1024 + QRMatrix::M_FINDER << 8 => true, // 1536 + QRMatrix::M_ALIGNMENT << 8 => true, // 2560 + QRMatrix::M_TIMING << 8 => true, // 3072 + QRMatrix::M_FORMAT << 8 => true, // 3584 + QRMatrix::M_VERSION << 8 => true, // 4096 + QRMatrix::M_FINDER_DOT << 8 => true, // 5632 + QRMatrix::M_TEST << 8 => true, // 65280 + ]; + + /** + * generates the output, optionally dumps it to a file, and returns it + * + * @param string|null $file + * + * @return mixed + */ + public function dump(string $file = null); + +} diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRString.php b/vendor/chillerlan/php-qrcode/src/Output/QRString.php new file mode 100644 index 000000000..ba8d83675 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRString.php @@ -0,0 +1,76 @@ +<?php +/** + * Class QRString + * + * @filesource QRString.php + * @created 05.12.2015 + * @package chillerlan\QRCode\Output + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode\Output; + +use chillerlan\QRCode\QRCode; + +use function implode, is_string, json_encode; + +/** + * Converts the matrix data into string types + */ +class QRString extends QROutputAbstract{ + + /** + * @var string + */ + protected $defaultMode = QRCode::OUTPUT_STRING_TEXT; + + /** + * @inheritDoc + */ + protected function setModuleValues():void{ + + foreach($this::DEFAULT_MODULE_VALUES as $M_TYPE => $defaultValue){ + $v = $this->options->moduleValues[$M_TYPE] ?? null; + + if(!is_string($v)){ + $this->moduleValues[$M_TYPE] = $defaultValue + ? $this->options->textDark + : $this->options->textLight; + } + else{ + $this->moduleValues[$M_TYPE] = $v; + } + + } + + } + + /** + * @return string + */ + protected function text():string{ + $str = []; + + foreach($this->matrix->matrix() as $row){ + $r = []; + + foreach($row as $M_TYPE){ + $r[] = $this->moduleValues[$M_TYPE]; + } + + $str[] = implode('', $r); + } + + return implode($this->options->eol, $str); + } + + /** + * @return string + */ + protected function json():string{ + return json_encode($this->matrix->matrix()); + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/QRCode.php b/vendor/chillerlan/php-qrcode/src/QRCode.php new file mode 100644 index 000000000..91f7aa0eb --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/QRCode.php @@ -0,0 +1,310 @@ +<?php +/** + * Class QRCode + * + * @filesource QRCode.php + * @created 26.11.2015 + * @package chillerlan\QRCode + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode; + +use chillerlan\QRCode\Data\{ + MaskPatternTester, QRCodeDataException, QRDataInterface, QRMatrix +}; +use chillerlan\QRCode\Output\{ + QRCodeOutputException, QRFpdf, QRImage, QRImagick, QRMarkup, QROutputInterface, QRString +}; +use chillerlan\Settings\SettingsContainerInterface; + +use function array_search, call_user_func_array, class_exists, in_array, min, ord, strlen; + +/** + * Turns a text string into a Model 2 QR Code + * + * @link https://github.com/kazuhikoarase/qrcode-generator/tree/master/php + * @link http://www.qrcode.com/en/codes/model12.html + * @link http://www.thonky.com/qr-code-tutorial/ + */ +class QRCode{ + + /** + * API constants + */ + public const OUTPUT_MARKUP_HTML = 'html'; + public const OUTPUT_MARKUP_SVG = 'svg'; + public const OUTPUT_IMAGE_PNG = 'png'; + public const OUTPUT_IMAGE_JPG = 'jpg'; + public const OUTPUT_IMAGE_GIF = 'gif'; + public const OUTPUT_STRING_JSON = 'json'; + public const OUTPUT_STRING_TEXT = 'text'; + public const OUTPUT_IMAGICK = 'imagick'; + public const OUTPUT_FPDF = 'fpdf'; + public const OUTPUT_CUSTOM = 'custom'; + + public const VERSION_AUTO = -1; + public const MASK_PATTERN_AUTO = -1; + + public const ECC_L = 0b01; // 7%. + public const ECC_M = 0b00; // 15%. + public const ECC_Q = 0b11; // 25%. + public const ECC_H = 0b10; // 30%. + + public const DATA_NUMBER = 0b0001; + public const DATA_ALPHANUM = 0b0010; + public const DATA_BYTE = 0b0100; + public const DATA_KANJI = 0b1000; + + public const ECC_MODES = [ + self::ECC_L => 0, + self::ECC_M => 1, + self::ECC_Q => 2, + self::ECC_H => 3, + ]; + + public const DATA_MODES = [ + self::DATA_NUMBER => 0, + self::DATA_ALPHANUM => 1, + self::DATA_BYTE => 2, + self::DATA_KANJI => 3, + ]; + + public const OUTPUT_MODES = [ + QRMarkup::class => [ + self::OUTPUT_MARKUP_SVG, + self::OUTPUT_MARKUP_HTML, + ], + QRImage::class => [ + self::OUTPUT_IMAGE_PNG, + self::OUTPUT_IMAGE_GIF, + self::OUTPUT_IMAGE_JPG, + ], + QRString::class => [ + self::OUTPUT_STRING_JSON, + self::OUTPUT_STRING_TEXT, + ], + QRImagick::class => [ + self::OUTPUT_IMAGICK, + ], + QRFpdf::class => [ + self::OUTPUT_FPDF + ] + ]; + + /** + * @var \chillerlan\QRCode\QROptions|\chillerlan\Settings\SettingsContainerInterface + */ + protected $options; + + /** + * @var \chillerlan\QRCode\Data\QRDataInterface + */ + protected $dataInterface; + + /** + * QRCode constructor. + * + * @param \chillerlan\Settings\SettingsContainerInterface|null $options + */ + public function __construct(SettingsContainerInterface $options = null){ + $this->options = $options ?? new QROptions; + } + + /** + * Renders a QR Code for the given $data and QROptions + * + * @param string $data + * @param string|null $file + * + * @return mixed + */ + public function render(string $data, string $file = null){ + return $this->initOutputInterface($data)->dump($file); + } + + /** + * Returns a QRMatrix object for the given $data and current QROptions + * + * @param string $data + * + * @return \chillerlan\QRCode\Data\QRMatrix + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + public function getMatrix(string $data):QRMatrix{ + + if(empty($data)){ + throw new QRCodeDataException('QRCode::getMatrix() No data given.'); + } + + $this->dataInterface = $this->initDataInterface($data); + + $maskPattern = $this->options->maskPattern === $this::MASK_PATTERN_AUTO + ? $this->getBestMaskPattern() + : $this->options->maskPattern; + + $matrix = $this->dataInterface->initMatrix($maskPattern); + + if((bool)$this->options->addQuietzone){ + $matrix->setQuietZone($this->options->quietzoneSize); + } + + return $matrix; + } + + /** + * shoves a QRMatrix through the MaskPatternTester to find the lowest penalty mask pattern + * + * @see \chillerlan\QRCode\Data\MaskPatternTester + * + * @return int + */ + protected function getBestMaskPattern():int{ + $penalties = []; + + for($pattern = 0; $pattern < 8; $pattern++){ + $tester = new MaskPatternTester($this->dataInterface->initMatrix($pattern, true)); + + $penalties[$pattern] = $tester->testPattern(); + } + + return array_search(min($penalties), $penalties, true); + } + + /** + * returns a fresh QRDataInterface for the given $data + * + * @param string $data + * + * @return \chillerlan\QRCode\Data\QRDataInterface + * @throws \chillerlan\QRCode\Data\QRCodeDataException + */ + public function initDataInterface(string $data):QRDataInterface{ + $dataModes = ['Number', 'AlphaNum', 'Kanji', 'Byte']; + $dataNamespace = __NAMESPACE__.'\\Data\\'; + + // allow forcing the data mode + // see https://github.com/chillerlan/php-qrcode/issues/39 + if(in_array($this->options->dataMode, $dataModes, true)){ + $dataInterface = $dataNamespace.$this->options->dataMode; + + return new $dataInterface($this->options, $data); + } + + foreach($dataModes as $mode){ + $dataInterface = $dataNamespace.$mode; + + if(call_user_func_array([$this, 'is'.$mode], [$data]) && class_exists($dataInterface)){ + return new $dataInterface($this->options, $data); + } + + } + + throw new QRCodeDataException('invalid data type'); // @codeCoverageIgnore + } + + /** + * returns a fresh (built-in) QROutputInterface + * + * @param string $data + * + * @return \chillerlan\QRCode\Output\QROutputInterface + * @throws \chillerlan\QRCode\Output\QRCodeOutputException + */ + protected function initOutputInterface(string $data):QROutputInterface{ + + if($this->options->outputType === $this::OUTPUT_CUSTOM && class_exists($this->options->outputInterface)){ + return new $this->options->outputInterface($this->options, $this->getMatrix($data)); + } + + foreach($this::OUTPUT_MODES as $outputInterface => $modes){ + + if(in_array($this->options->outputType, $modes, true) && class_exists($outputInterface)){ + return new $outputInterface($this->options, $this->getMatrix($data)); + } + + } + + throw new QRCodeOutputException('invalid output type'); + } + + /** + * checks if a string qualifies as numeric + * + * @param string $string + * + * @return bool + */ + public function isNumber(string $string):bool{ + return $this->checkString($string, QRDataInterface::NUMBER_CHAR_MAP); + } + + /** + * checks if a string qualifies as alphanumeric + * + * @param string $string + * + * @return bool + */ + public function isAlphaNum(string $string):bool{ + return $this->checkString($string, QRDataInterface::ALPHANUM_CHAR_MAP); + } + + /** + * checks is a given $string matches the characters of a given $charmap, returns false on the first invalid occurence. + * + * @param string $string + * @param array $charmap + * + * @return bool + */ + protected function checkString(string $string, array $charmap):bool{ + $len = strlen($string); + + for($i = 0; $i < $len; $i++){ + if(!in_array($string[$i], $charmap, true)){ + return false; + } + } + + return true; + } + + /** + * checks if a string qualifies as Kanji + * + * @param string $string + * + * @return bool + */ + public function isKanji(string $string):bool{ + $i = 0; + $len = strlen($string); + + while($i + 1 < $len){ + $c = ((0xff & ord($string[$i])) << 8) | (0xff & ord($string[$i + 1])); + + if(!($c >= 0x8140 && $c <= 0x9FFC) && !($c >= 0xE040 && $c <= 0xEBBF)){ + return false; + } + + $i += 2; + } + + return $i >= $len; + } + + /** + * a dummy + * + * @param $data + * + * @return bool + */ + protected function isByte(string $data):bool{ + return !empty($data); + } + +} diff --git a/vendor/chillerlan/php-qrcode/src/QRCodeException.php b/vendor/chillerlan/php-qrcode/src/QRCodeException.php new file mode 100644 index 000000000..68af380ff --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/QRCodeException.php @@ -0,0 +1,15 @@ +<?php +/** + * Class QRCodeException + * + * @filesource QRCodeException.php + * @created 27.11.2015 + * @package chillerlan\QRCode + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode; + +class QRCodeException extends \Exception{} diff --git a/vendor/chillerlan/php-qrcode/src/QROptions.php b/vendor/chillerlan/php-qrcode/src/QROptions.php new file mode 100644 index 000000000..778ae0407 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/QROptions.php @@ -0,0 +1,61 @@ +<?php +/** + * Class QROptions + * + * @filesource QROptions.php + * @created 08.12.2015 + * @package chillerlan\QRCode + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCode; + +use chillerlan\Settings\SettingsContainerAbstract; + +/** + * @property int $version + * @property int $versionMin + * @property int $versionMax + * @property int $eccLevel + * @property int $maskPattern + * @property bool $addQuietzone + * @property bool $quietzoneSize + * + * @property string $dataMode + * @property string $outputType + * @property string $outputInterface + * @property string $cachefile + * + * @property string $eol + * @property int $scale + * + * @property string $cssClass + * @property string $svgOpacity + * @property string $svgDefs + * @property int $svgViewBoxSize + * + * @property string $textDark + * @property string $textLight + * + * @property string $markupDark + * @property string $markupLight + * + * @property bool $returnResource + * @property bool $imageBase64 + * @property bool $imageTransparent + * @property array $imageTransparencyBG + * @property int $pngCompression + * @property int $jpegQuality + * + * @property string $imagickFormat + * @property string $imagickBG + * + * @property string $fpdfMeasureUnit + * + * @property array $moduleValues + */ +class QROptions extends SettingsContainerAbstract{ + use QROptionsTrait; +} diff --git a/vendor/chillerlan/php-qrcode/src/QROptionsTrait.php b/vendor/chillerlan/php-qrcode/src/QROptionsTrait.php new file mode 100644 index 000000000..45d4cb415 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/QROptionsTrait.php @@ -0,0 +1,408 @@ +<?php +/** + * Trait QROptionsTrait + * + * @filesource QROptionsTrait.php + * @created 10.03.2018 + * @package chillerlan\QRCode + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + */ + +namespace chillerlan\QRCode; + +use function array_values, count, in_array, is_array, is_numeric, max, min, sprintf, strtolower; + +trait QROptionsTrait{ + + /** + * QR Code version number + * + * [1 ... 40] or QRCode::VERSION_AUTO + * + * @var int + */ + protected $version = QRCode::VERSION_AUTO; + + /** + * Minimum QR version (if $version = QRCode::VERSION_AUTO) + * + * @var int + */ + protected $versionMin = 1; + + /** + * Maximum QR version + * + * @var int + */ + protected $versionMax = 40; + + /** + * Error correct level + * + * QRCode::ECC_X where X is + * L => 7% + * M => 15% + * Q => 25% + * H => 30% + * + * @var int + */ + protected $eccLevel = QRCode::ECC_L; + + /** + * Mask Pattern to use + * + * [0...7] or QRCode::MASK_PATTERN_AUTO + * + * @var int + */ + protected $maskPattern = QRCode::MASK_PATTERN_AUTO; + + /** + * Add a "quiet zone" (margin) according to the QR code spec + * + * @var bool + */ + protected $addQuietzone = true; + + /** + * Size of the quiet zone + * + * internally clamped to [0 ... $moduleCount / 2], defaults to 4 modules + * + * @var int + */ + protected $quietzoneSize = 4; + + /** + * Use this to circumvent the data mode detection and force the usage of the given mode. + * valid modes are: Number, AlphaNum, Kanji, Byte + * + * @see https://github.com/chillerlan/php-qrcode/issues/39 + * + * @var string|null + */ + protected $dataMode = null; + + /** + * QRCode::OUTPUT_MARKUP_XXXX where XXXX = HTML, SVG + * QRCode::OUTPUT_IMAGE_XXX where XXX = PNG, GIF, JPG + * QRCode::OUTPUT_STRING_XXXX where XXXX = TEXT, JSON + * QRCode::OUTPUT_CUSTOM + * + * @var string + */ + protected $outputType = QRCode::OUTPUT_IMAGE_PNG; + + /** + * the FQCN of the custom QROutputInterface if $outputType is set to QRCode::OUTPUT_CUSTOM + * + * @var string|null + */ + protected $outputInterface = null; + + /** + * /path/to/cache.file + * + * @var string|null + */ + protected $cachefile = null; + + /** + * newline string [HTML, SVG, TEXT] + * + * @var string + */ + protected $eol = PHP_EOL; + + /** + * size of a QR code pixel [SVG, IMAGE_*] + * HTML -> via CSS + * + * @var int + */ + protected $scale = 5; + + /** + * a common css class + * + * @var string + */ + protected $cssClass = ''; + + /** + * SVG opacity + * + * @var float + */ + protected $svgOpacity = 1.0; + + /** + * anything between <defs> + * + * @see https://developer.mozilla.org/docs/Web/SVG/Element/defs + * + * @var string + */ + protected $svgDefs = '<style>rect{shape-rendering:crispEdges}</style>'; + + /** + * SVG viewBox size. a single integer number which defines width/height of the viewBox attribute. + * + * viewBox="0 0 x x" + * + * @see https://css-tricks.com/scale-svg/#article-header-id-3 + * + * @var int|null + */ + protected $svgViewBoxSize = null; + + /** + * string substitute for dark + * + * @var string + */ + protected $textDark = '🔴'; + + /** + * string substitute for light + * + * @var string + */ + protected $textLight = '⭕'; + + /** + * markup substitute for dark (CSS value) + * + * @var string + */ + protected $markupDark = '#000'; + + /** + * markup substitute for light (CSS value) + * + * @var string + */ + protected $markupLight = '#fff'; + + /** + * Return the image resource instead of a render if applicable. + * This option overrides other output options, such as $cachefile and $imageBase64. + * + * Supported by the following modules: + * + * - QRImage: resource + * - QRImagick: Imagick + * - QRFpdf: FPDF + * + * @see \chillerlan\QRCode\Output\QROutputInterface::dump() + * + * @var bool + */ + protected $returnResource = false; + + /** + * toggle base64 or raw image data + * + * @var bool + */ + protected $imageBase64 = true; + + /** + * toggle transparency, not supported by jpg + * + * @var bool + */ + protected $imageTransparent = true; + + /** + * @see imagecolortransparent() + * + * @var array [R, G, B] + */ + protected $imageTransparencyBG = [255, 255, 255]; + + /** + * @see imagepng() + * + * @var int + */ + protected $pngCompression = -1; + + /** + * @see imagejpeg() + * + * @var int + */ + protected $jpegQuality = 85; + + /** + * Imagick output format + * + * @see Imagick::setType() + * + * @var string + */ + protected $imagickFormat = 'png'; + + /** + * Imagick background color (defaults to "transparent") + * + * @see \ImagickPixel::__construct() + * + * @var string|null + */ + protected $imagickBG = null; + + /** + * Measurement unit for FPDF output: pt, mm, cm, in (defaults to "pt") + * + * @see \FPDF::__construct() + */ + protected $fpdfMeasureUnit = 'pt'; + + /** + * Module values map + * + * HTML, IMAGICK: #ABCDEF, cssname, rgb(), rgba()... + * IMAGE: [63, 127, 255] // R, G, B + * + * @var array|null + */ + protected $moduleValues = null; + + /** + * clamp min/max version number + * + * @param int $versionMin + * @param int $versionMax + * + * @return void + */ + protected function setMinMaxVersion(int $versionMin, int $versionMax):void{ + $min = max(1, min(40, $versionMin)); + $max = max(1, min(40, $versionMax)); + + $this->versionMin = min($min, $max); + $this->versionMax = max($min, $max); + } + + /** + * sets the minimum version number + * + * @param int $version + * + * @return void + */ + protected function set_versionMin(int $version):void{ + $this->setMinMaxVersion($version, $this->versionMax); + } + + /** + * sets the maximum version number + * + * @param int $version + * + * @return void + */ + protected function set_versionMax(int $version):void{ + $this->setMinMaxVersion($this->versionMin, $version); + } + + /** + * sets the error correction level + * + * @param int $eccLevel + * + * @return void + * @throws \chillerlan\QRCode\QRCodeException + */ + protected function set_eccLevel(int $eccLevel):void{ + + if(!isset(QRCode::ECC_MODES[$eccLevel])){ + throw new QRCodeException(sprintf('Invalid error correct level: %s', $eccLevel)); + } + + $this->eccLevel = $eccLevel; + } + + /** + * sets/clamps the mask pattern + * + * @param int $maskPattern + * + * @return void + */ + protected function set_maskPattern(int $maskPattern):void{ + + if($maskPattern !== QRCode::MASK_PATTERN_AUTO){ + $this->maskPattern = max(0, min(7, $maskPattern)); + } + + } + + /** + * sets the transparency background color + * + * @param mixed $imageTransparencyBG + * + * @return void + * @throws \chillerlan\QRCode\QRCodeException + */ + protected function set_imageTransparencyBG($imageTransparencyBG):void{ + + // invalid value - set to white as default + if(!is_array($imageTransparencyBG) || count($imageTransparencyBG) < 3){ + $this->imageTransparencyBG = [255, 255, 255]; + + return; + } + + foreach($imageTransparencyBG as $k => $v){ + + if(!is_numeric($v)){ + throw new QRCodeException('Invalid RGB value.'); + } + + // clamp the values + $this->imageTransparencyBG[$k] = max(0, min(255, (int)$v)); + } + + // use the array values to not run into errors with the spread operator (...$arr) + $this->imageTransparencyBG = array_values($this->imageTransparencyBG); + } + + /** + * sets/clamps the version number + * + * @param int $version + * + * @return void + */ + protected function set_version(int $version):void{ + + if($version !== QRCode::VERSION_AUTO){ + $this->version = max(1, min(40, $version)); + } + + } + + /** + * sets the FPDF measurement unit + * + * @codeCoverageIgnore + */ + protected function set_fpdfMeasureUnit(string $unit):void{ + $unit = strtolower($unit); + + if(in_array($unit, ['cm', 'in', 'mm', 'pt'], true)){ + $this->fpdfMeasureUnit = $unit; + } + + // @todo throw or ignore silently? + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php b/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php new file mode 100644 index 000000000..c29b1f639 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php @@ -0,0 +1,44 @@ +<?php +/** + * Class AlphaNumTest + * + * @filesource AlphaNumTest.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\Data\{AlphaNum, QRCodeDataException}; + +class AlphaNumTest extends DatainterfaceTestAbstract{ + + protected $FQCN = AlphaNum::class; + protected $testdata = '0 $%*+-./:'; + protected $expected = [ + 32, 80, 36, 212, 252, 15, 175, 251, + 176, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 112, 43, 9, 248, 200, 194, 75, 25, + 205, 173, 154, 68, 191, 16, 128, + 92, 112, 20, 198, 27 + ]; + + public function testGetCharCodeException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char: "#" [35]'); + + $this->dataInterface->setData('#'); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/ByteTest.php b/vendor/chillerlan/php-qrcode/tests/Data/ByteTest.php new file mode 100644 index 000000000..cbfe1fab2 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/ByteTest.php @@ -0,0 +1,38 @@ +<?php +/** + * Class ByteTest + * + * @filesource ByteTest.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\Data\Byte; + +class ByteTest extends DatainterfaceTestAbstract{ + + protected $FQCN = Byte::class; + protected $testdata = '[¯\_(ツ)_/¯]'; + protected $expected = [ + 64, 245, 188, 42, 245, 197, 242, 142, + 56, 56, 66, 149, 242, 252, 42, 245, + 208, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 79, 89, 226, 48, 209, 89, 151, 1, + 12, 73, 42, 163, 11, 34, 255, 205, + 21, 47, 250, 101 + ]; + + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/DatainterfaceTestAbstract.php b/vendor/chillerlan/php-qrcode/tests/Data/DatainterfaceTestAbstract.php new file mode 100644 index 000000000..19d74617a --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/DatainterfaceTestAbstract.php @@ -0,0 +1,65 @@ +<?php +/** + * Class DatainterfaceTestAbstract + * + * @filesource DatainterfaceTestAbstract.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\QROptions; +use chillerlan\QRCode\Data\{QRCodeDataException, QRDataInterface, QRMatrix}; +use chillerlan\QRCodeTest\QRTestAbstract; + +abstract class DatainterfaceTestAbstract extends QRTestAbstract{ + + /** + * @var \chillerlan\QRCode\Data\QRDataAbstract + */ + protected $dataInterface; + + protected $testdata; + protected $expected; + + protected function setUp():void{ + parent::setUp(); + + $this->dataInterface = $this->reflection->newInstanceArgs([new QROptions(['version' => 4])]); + } + + public function testInstance(){ + $this->dataInterface = $this->reflection->newInstanceArgs([new QROptions, $this->testdata]); + + $this->assertInstanceOf(QRDataInterface::class, $this->dataInterface); + } + + public function testSetData(){ + $this->dataInterface->setData($this->testdata); + + $this->assertSame($this->expected, $this->getProperty('matrixdata')->getValue($this->dataInterface)); + } + + public function testInitMatrix(){ + $m = $this->dataInterface->setData($this->testdata)->initMatrix(0); + + $this->assertInstanceOf(QRMatrix::class, $m); + } + + public function testGetMinimumVersion(){ + $this->assertSame(1, $this->getMethod('getMinimumVersion')->invoke($this->dataInterface)); + } + + public function testGetMinimumVersionException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('data exceeds'); + + $this->getProperty('strlen')->setValue($this->dataInterface, 13370); + $this->getMethod('getMinimumVersion')->invoke($this->dataInterface); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php b/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php new file mode 100644 index 000000000..108b8fed7 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php @@ -0,0 +1,50 @@ +<?php +/** + * Class KanjiTest + * + * @filesource KanjiTest.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\Data\{Kanji, QRCodeDataException}; + +class KanjiTest extends DatainterfaceTestAbstract{ + + protected $FQCN = Kanji::class; + protected $testdata = '茗荷茗荷茗荷茗荷茗荷'; + protected $expected = [ + 128, 173, 85, 26, 95, 85, 70, 151, + 213, 81, 165, 245, 84, 105, 125, 85, + 26, 92, 0, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 195, 11, 221, 91, 141, 220, 163, 46, + 165, 37, 163, 176, 79, 0, 64, 68, + 96, 113, 54, 191 + ]; + + public function testIllegalCharException1(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char at 1 [16191]'); + + $this->dataInterface->setData('ÃÃ'); + } + + public function testIllegalCharException2(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char at 1'); + + $this->dataInterface->setData('Ã'); + } +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/MaskPatternTesterTest.php b/vendor/chillerlan/php-qrcode/tests/Data/MaskPatternTesterTest.php new file mode 100644 index 000000000..ae4af9f29 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/MaskPatternTesterTest.php @@ -0,0 +1,29 @@ +<?php +/** + * Class MaskPatternTesterTest + * + * @filesource MaskPatternTesterTest.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\{QROptions, Data\Byte, Data\MaskPatternTester}; +use chillerlan\QRCodeTest\QRTestAbstract; + +class MaskPatternTesterTest extends QRTestAbstract{ + + protected $FQCN = MaskPatternTester::class; + + // coverage + public function testMaskpattern(){ + $matrix = (new Byte(new QROptions(['version' => 10]), 'test'))->initMatrix(3, true); + + $this->assertSame(4243, (new MaskPatternTester($matrix))->testPattern()); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php b/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php new file mode 100644 index 000000000..983346a34 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php @@ -0,0 +1,44 @@ +<?php +/** + * Class NumberTest + * + * @filesource NumberTest.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\Data\{Number, QRCodeDataException}; + +class NumberTest extends DatainterfaceTestAbstract{ + + protected $FQCN = Number::class; + protected $testdata = '0123456789'; + protected $expected = [ + 16, 40, 12, 86, 106, 105, 0, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 201, 141, 102, 116, 238, 162, 239, 230, + 222, 37, 79, 192, 42, 109, 188, 72, + 89, 63, 168, 151 + ]; + + public function testGetCharCodeException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char: "#" [35]'); + + $this->dataInterface->setData('#'); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Data/QRMatrixTest.php b/vendor/chillerlan/php-qrcode/tests/Data/QRMatrixTest.php new file mode 100644 index 000000000..531c82eb2 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/QRMatrixTest.php @@ -0,0 +1,260 @@ +<?php +/** + * Class QRMatrixTest + * + * @filesource QRMatrixTest.php + * @created 17.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\QRCode; +use chillerlan\QRCode\QROptions; +use chillerlan\QRCode\Data\{QRCodeDataException, QRMatrix}; +use chillerlan\QRCodeTest\QRTestAbstract; +use ReflectionClass; + +class QRMatrixTest extends QRTestAbstract{ + + protected $FQCN = QRMatrix::class; + + protected $version = 7; + + /** + * @var \chillerlan\QRCode\Data\QRMatrix + */ + protected $matrix; + + protected function setUp():void{ + parent::setUp(); + + $this->matrix = $this->reflection->newInstanceArgs([$this->version, QRCode::ECC_L]); + } + + public function testInvalidVersionException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('invalid QR Code version'); + + $this->reflection->newInstanceArgs([42, 0]); + } + + public function testInvalidEccException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('invalid ecc level'); + + $this->reflection->newInstanceArgs([1, 42]); + } + + public function testInstance(){ + $this->assertInstanceOf($this->FQCN, $this->matrix); + } + + public function testSize(){ + $this->assertCount($this->matrix->size(), $this->matrix->matrix()); + } + + public function testVersion(){ + $this->assertSame($this->version, $this->matrix->version()); + } + + public function testECC(){ + $this->assertSame(QRCode::ECC_L, $this->matrix->eccLevel()); + } + + public function testMaskPattern(){ + $this->assertSame(-1, $this->matrix->maskPattern()); + } + + public function testGetSetCheck(){ + $this->matrix->set(10, 10, true, QRMatrix::M_TEST); + $this->assertSame(65280, $this->matrix->get(10, 10)); + $this->assertTrue($this->matrix->check(10, 10)); + + $this->matrix->set(20, 20, false, QRMatrix::M_TEST); + $this->assertSame(255, $this->matrix->get(20, 20)); + $this->assertFalse($this->matrix->check(20, 20)); + } + + public function testSetDarkModule(){ + $this->matrix->setDarkModule(); + + $this->assertSame(QRMatrix::M_DARKMODULE << 8, $this->matrix->get(8, $this->matrix->size() - 8)); + } + + public function testSetFinderPattern(){ + $this->matrix->setFinderPattern(); + + $this->assertSame(QRMatrix::M_FINDER << 8, $this->matrix->get(0, 0)); + $this->assertSame(QRMatrix::M_FINDER << 8, $this->matrix->get(0, $this->matrix->size() - 1)); + $this->assertSame(QRMatrix::M_FINDER << 8, $this->matrix->get($this->matrix->size() - 1, 0)); + } + + public function testSetSeparators(){ + $this->matrix->setSeparators(); + + $this->assertSame(QRMatrix::M_SEPARATOR, $this->matrix->get(7, 0)); + $this->assertSame(QRMatrix::M_SEPARATOR, $this->matrix->get(0, 7)); + $this->assertSame(QRMatrix::M_SEPARATOR, $this->matrix->get(0, $this->matrix->size() - 8)); + $this->assertSame(QRMatrix::M_SEPARATOR, $this->matrix->get($this->matrix->size() - 8, 0)); + } + + public function testSetAlignmentPattern(){ + $this->matrix + ->setFinderPattern() + ->setAlignmentPattern() + ; + + $alignmentPattern = (new ReflectionClass(QRMatrix::class))->getConstant('alignmentPattern')[$this->version]; + + foreach($alignmentPattern as $py){ + foreach($alignmentPattern as $px){ + + if($this->matrix->get($px, $py) === QRMatrix::M_FINDER << 8){ + $this->assertSame(QRMatrix::M_FINDER << 8, $this->matrix->get($px, $py), 'skipped finder pattern'); + continue; + } + + $this->assertSame(QRMatrix::M_ALIGNMENT << 8, $this->matrix->get($px, $py)); + } + } + + } + + public function testSetTimingPattern(){ + $this->matrix + ->setAlignmentPattern() + ->setTimingPattern() + ; + + $size = $this->matrix->size(); + + for($i = 7; $i < $size - 7; $i++){ + if($i % 2 === 0){ + $p1 = $this->matrix->get(6, $i); + + if($p1 === QRMatrix::M_ALIGNMENT << 8){ + $this->assertSame(QRMatrix::M_ALIGNMENT << 8, $p1, 'skipped alignment pattern'); + continue; + } + + $this->assertSame(QRMatrix::M_TIMING << 8, $p1); + $this->assertSame(QRMatrix::M_TIMING << 8, $this->matrix->get($i, 6)); + } + } + } + + public function testSetVersionNumber(){ + $this->matrix->setVersionNumber(true); + + $this->assertSame(QRMatrix::M_VERSION, $this->matrix->get($this->matrix->size() - 9, 0)); + $this->assertSame(QRMatrix::M_VERSION, $this->matrix->get($this->matrix->size() - 11, 5)); + $this->assertSame(QRMatrix::M_VERSION, $this->matrix->get(0, $this->matrix->size() - 9)); + $this->assertSame(QRMatrix::M_VERSION, $this->matrix->get(5, $this->matrix->size() - 11)); + } + + public function testSetFormatInfo(){ + $this->matrix->setFormatInfo(0, true); + + $this->assertSame(QRMatrix::M_FORMAT, $this->matrix->get(8, 0)); + $this->assertSame(QRMatrix::M_FORMAT, $this->matrix->get(0, 8)); + $this->assertSame(QRMatrix::M_FORMAT, $this->matrix->get($this->matrix->size() - 1, 8)); + $this->assertSame(QRMatrix::M_FORMAT, $this->matrix->get($this->matrix->size() - 8, 8)); + } + + public function testSetQuietZone(){ + $size = $this->matrix->size(); + $q = 5; + + $this->matrix->set(0, 0, true, QRMatrix::M_TEST); + $this->matrix->set($size - 1, $size - 1, true, QRMatrix::M_TEST); + + $this->matrix->setQuietZone($q); + + $this->assertCount($size + 2 * $q, $this->matrix->matrix()); + $this->assertCount($size + 2 * $q, $this->matrix->matrix()[$size - 1]); + + $size = $this->matrix->size(); + $this->assertSame(QRMatrix::M_QUIETZONE, $this->matrix->get(0, 0)); + $this->assertSame(QRMatrix::M_QUIETZONE, $this->matrix->get($size - 1, $size - 1)); + + $this->assertSame(QRMatrix::M_TEST << 8, $this->matrix->get($q, $q)); + $this->assertSame(QRMatrix::M_TEST << 8, $this->matrix->get($size - 1 - $q, $size - 1 - $q)); + } + + public function testSetQuietZoneException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('use only after writing data'); + + $this->matrix->setQuietZone(); + } + + public function testSetLogoSpaceOrientation():void{ + $o = new QROptions; + $o->version = 10; + $o->eccLevel = QRCode::ECC_H; + $o->addQuietzone = false; + + $matrix = (new QRCode($o))->getMatrix('testdata'); + // also testing size adjustment to uneven numbers + $matrix->setLogoSpace(20, 14); + + // NW corner + $this::assertNotSame(QRMatrix::M_LOGO, $matrix->get(17, 20)); + $this::assertSame(QRMatrix::M_LOGO, $matrix->get(18, 21)); + + // SE corner + $this::assertSame(QRMatrix::M_LOGO, $matrix->get(38, 35)); + $this::assertNotSame(QRMatrix::M_LOGO, $matrix->get(39, 36)); + } + + public function testSetLogoSpacePosition():void{ + $o = new QROptions; + $o->version = 10; + $o->eccLevel = QRCode::ECC_H; + $o->addQuietzone = true; + $o->quietzoneSize = 10; + + $m = (new QRCode($o))->getMatrix('testdata'); + + // logo space should not overwrite quiet zone & function patterns + $m->setLogoSpace(21, 21, -10, -10); + $this::assertSame(QRMatrix::M_QUIETZONE, $m->get(9, 9)); + $this::assertSame(QRMatrix::M_FINDER << 8, $m->get(10, 10)); + $this::assertSame(QRMatrix::M_FINDER << 8, $m->get(16, 16)); + $this::assertSame(QRMatrix::M_SEPARATOR, $m->get(17, 17)); + $this::assertSame(QRMatrix::M_FORMAT << 8, $m->get(18, 18)); + $this::assertSame(QRMatrix::M_LOGO, $m->get(19, 19)); + $this::assertSame(QRMatrix::M_LOGO, $m->get(20, 20)); + $this::assertNotSame(QRMatrix::M_LOGO, $m->get(21, 21)); + + // i just realized that setLogoSpace() could be called multiple times + // on the same instance and i'm not going to do anything about it :P + $m->setLogoSpace(21, 21, 45, 45); + $this::assertNotSame(QRMatrix::M_LOGO, $m->get(54, 54)); + $this::assertSame(QRMatrix::M_LOGO, $m->get(55, 55)); + $this::assertSame(QRMatrix::M_QUIETZONE, $m->get(67, 67)); + } + + public function testSetLogoSpaceInvalidEccException():void{ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('ECC level "H" required to add logo space'); + + (new QRCode)->getMatrix('testdata')->setLogoSpace(50, 50); + } + + public function testSetLogoSpaceMaxSizeException():void{ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('logo space exceeds the maximum error correction capacity'); + + $o = new QROptions; + $o->version = 5; + $o->eccLevel = QRCode::ECC_H; + + (new QRCode($o))->getMatrix('testdata')->setLogoSpace(50, 50); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Helpers/BitBufferTest.php b/vendor/chillerlan/php-qrcode/tests/Helpers/BitBufferTest.php new file mode 100644 index 000000000..25d1c3504 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Helpers/BitBufferTest.php @@ -0,0 +1,53 @@ +<?php +/** + * Class BitBufferTest + * + * @filesource BitBufferTest.php + * @created 08.02.2016 + * @package chillerlan\QRCodeTest\Helpers + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Helpers; + +use chillerlan\QRCode\{QRCode, Helpers\BitBuffer}; +use chillerlan\QRCodeTest\QRTestAbstract; + +class BitBufferTest extends QRTestAbstract{ + + /** + * @var \chillerlan\QRCode\Helpers\BitBuffer + */ + protected $bitBuffer; + + protected function setUp():void{ + $this->bitBuffer = new BitBuffer; + } + + public function bitProvider(){ + return [ + 'number' => [QRCode::DATA_NUMBER, 16], + 'alphanum' => [QRCode::DATA_ALPHANUM, 32], + 'byte' => [QRCode::DATA_BYTE, 64], + 'kanji' => [QRCode::DATA_KANJI, 128], + ]; + } + + /** + * @dataProvider bitProvider + */ + public function testPut($data, $value){ + $this->bitBuffer->put($data, 4); + $this->assertSame($value, $this->bitBuffer->buffer[0]); + $this->assertSame(4, $this->bitBuffer->length); + } + + public function testClear(){ + $this->bitBuffer->clear(); + $this->assertSame([], $this->bitBuffer->buffer); + $this->assertSame(0, $this->bitBuffer->length); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Helpers/PolynomialTest.php b/vendor/chillerlan/php-qrcode/tests/Helpers/PolynomialTest.php new file mode 100644 index 000000000..7f6da303c --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Helpers/PolynomialTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Class PolynomialTest + * + * @filesource PolynomialTest.php + * @created 09.02.2016 + * @package chillerlan\QRCodeTest\Helpers + * @author Smiley <[email protected]> + * @copyright 2015 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Helpers; + +use chillerlan\QRCode\Helpers\Polynomial; +use chillerlan\QRCode\QRCodeException; +use chillerlan\QRCodeTest\QRTestAbstract; + +class PolynomialTest extends QRTestAbstract{ + + /** + * @var \chillerlan\QRCode\Helpers\Polynomial + */ + protected $polynomial; + + protected function setUp():void{ + $this->polynomial = new Polynomial; + } + + public function testGexp(){ + $this->assertSame(142, $this->polynomial->gexp(-1)); + $this->assertSame(133, $this->polynomial->gexp(128)); + $this->assertSame(2, $this->polynomial->gexp(256)); + } + + public function testGlogException(){ + $this->expectException(QRCodeException::class); + $this->expectExceptionMessage('log(0)'); + + $this->polynomial->glog(0); + } +} diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QRFpdfTest.php b/vendor/chillerlan/php-qrcode/tests/Output/QRFpdfTest.php new file mode 100644 index 000000000..1b49182d2 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Output/QRFpdfTest.php @@ -0,0 +1,83 @@ +<?php +/** + * Class QRFpdfTest + * + * @filesource QRFpdfTest.php + * @created 03.06.2020 + * @package chillerlan\QRCodeTest\Output + * @author smiley <[email protected]> + * @copyright 2020 smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Output; + +use FPDF; +use chillerlan\QRCode\Output\{QRFpdf, QROutputInterface}; +use chillerlan\QRCode\{QRCode, QROptions}; + +use function class_exists, substr; + +/** + * Tests the QRFpdf output module + */ +class QRFpdfTest extends QROutputTestAbstract{ + + protected $FQCN = QRFpdf::class; + + /** + * @inheritDoc + * @internal + */ + public function setUp():void{ + + if(!class_exists(FPDF::class)){ + $this->markTestSkipped('FPDF not available'); + return; + } + + parent::setUp(); + } + + /** + * @inheritDoc + */ + public function testSetModuleValues():void{ + + $this->options->moduleValues = [ + // data + 1024 => [0, 0, 0], + 4 => [255, 255, 255], + ]; + + $this->outputInterface->dump(); + + $this::assertTrue(true); // tricking the code coverage + } + + /** + * @inheritDoc + */ + public function testRenderImage():void{ + $type = QRCode::OUTPUT_FPDF; + + $this->options->outputType = $type; + $this->options->imageBase64 = false; + $this->outputInterface->dump($this::cachefile.$type); + + // substr() to avoid CreationDate + $expected = substr(file_get_contents($this::cachefile.$type), 0, 2000); + $actual = substr($this->outputInterface->dump(), 0, 2000); + + $this::assertSame($expected, $actual); + } + + public function testOutputGetResource():void{ + $this->options->returnResource = true; + + $this->setOutputInterface(); + + $this::assertInstanceOf(FPDF::class, $this->outputInterface->dump()); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php b/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php new file mode 100644 index 000000000..34ecf4f91 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Class QRImageTest + * + * @filesource QRImageTest.php + * @created 24.12.2017 + * @package chillerlan\QRCodeTest\Output + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Output; + +use chillerlan\QRCode\{QRCode, Output\QRImage}; + +class QRImageTest extends QROutputTestAbstract{ + + protected $FQCN = QRImage::class; + + public function types(){ + return [ + 'png' => [QRCode::OUTPUT_IMAGE_PNG], + 'gif' => [QRCode::OUTPUT_IMAGE_GIF], + 'jpg' => [QRCode::OUTPUT_IMAGE_JPG], + ]; + } + + /** + * @dataProvider types + * @param $type + */ + public function testImageOutput($type){ + $this->options->outputType = $type; + $this->options->imageBase64 = false; + + $this->setOutputInterface(); + $this->outputInterface->dump($this::cachefile.$type); + $img = $this->outputInterface->dump(); + + if($type === QRCode::OUTPUT_IMAGE_JPG){ // jpeg encoding may cause different results + $this->markAsRisky(); + } + + $this->assertSame($img, file_get_contents($this::cachefile.$type)); + } + + public function testSetModuleValues(){ + + $this->options->moduleValues = [ + // data + 1024 => [0, 0, 0], + 4 => [255, 255, 255], + ]; + + $this->setOutputInterface()->dump(); + + $this->assertTrue(true); // tricking the code coverage + } + + public function testOutputGetResource():void{ + $this->options->returnResource = true; + + $this->setOutputInterface(); + + $this::assertIsResource($this->outputInterface->dump()); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QRImagickTest.php b/vendor/chillerlan/php-qrcode/tests/Output/QRImagickTest.php new file mode 100644 index 000000000..c927cc64e --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Output/QRImagickTest.php @@ -0,0 +1,66 @@ +<?php +/** + * Class QRImagickTest + * + * @filesource QRImagickTest.php + * @created 04.07.2018 + * @package chillerlan\QRCodeTest\Output + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection + */ + +namespace chillerlan\QRCodeTest\Output; + +use Imagick; +use chillerlan\QRCode\{QRCode, Output\QRImagick}; + +class QRImagickTest extends QROutputTestAbstract{ + + protected $FQCN = QRImagick::class; + + public function setUp():void{ + + if(!extension_loaded('imagick')){ + $this->markTestSkipped('ext-imagick not loaded'); + return; + } + + parent::setUp(); + } + + public function testImageOutput(){ + $type = QRCode::OUTPUT_IMAGICK; + + $this->options->outputType = $type; + $this->setOutputInterface(); + $this->outputInterface->dump($this::cachefile.$type); + $img = $this->outputInterface->dump(); + + $this->assertSame($img, file_get_contents($this::cachefile.$type)); + } + + public function testSetModuleValues(){ + + $this->options->moduleValues = [ + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + ]; + + $this->setOutputInterface()->dump(); + + $this->assertTrue(true); // tricking the code coverage + } + + public function testOutputGetResource():void{ + $this->options->returnResource = true; + + $this->setOutputInterface(); + + $this::assertInstanceOf(Imagick::class, $this->outputInterface->dump()); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QRMarkupTest.php b/vendor/chillerlan/php-qrcode/tests/Output/QRMarkupTest.php new file mode 100644 index 000000000..24fdc3ce6 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Output/QRMarkupTest.php @@ -0,0 +1,79 @@ +<?php +/** + * Class QRMarkupTest + * + * @filesource QRMarkupTest.php + * @created 24.12.2017 + * @package chillerlan\QRCodeTest\Output + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Output; + +use chillerlan\QRCode\{QRCode, Output\QRMarkup}; + +class QRMarkupTest extends QROutputTestAbstract{ + + protected $FQCN = QRMarkup::class; + + public function types(){ + return [ + 'html' => [QRCode::OUTPUT_MARKUP_HTML], + 'svg' => [QRCode::OUTPUT_MARKUP_SVG], + ]; + } + + /** + * @dataProvider types + * @param $type + */ + public function testMarkupOutputFile($type){ + $this->options->outputType = $type; + $this->options->cachefile = $this::cachefile.$type; + $this->setOutputInterface(); + $data = $this->outputInterface->dump(); + + $this->assertSame($data, file_get_contents($this->options->cachefile)); + } + + /** + * @dataProvider types + * @param $type + */ + public function testMarkupOutput($type){ + $this->options->imageBase64 = false; + $this->options->outputType = $type; + $this->setOutputInterface(); + + $expected = explode($this->options->eol, file_get_contents($this::cachefile.$type)); + // cut off the doctype & head + array_shift($expected); + + if($type === QRCode::OUTPUT_MARKUP_HTML){ + // cut off the </body> tag + array_pop($expected); + } + + $expected = implode($this->options->eol, $expected); + + $this->assertSame(trim($expected), trim($this->outputInterface->dump())); + } + + public function testSetModuleValues(){ + + $this->options->imageBase64 = false; + $this->options->moduleValues = [ + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + ]; + + $this->setOutputInterface(); + $data = $this->outputInterface->dump(); + $this->assertStringContainsString('#4A6000', $data); + $this->assertStringContainsString('#ECF9BE', $data); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QROutputTestAbstract.php b/vendor/chillerlan/php-qrcode/tests/Output/QROutputTestAbstract.php new file mode 100644 index 000000000..6cd95d080 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Output/QROutputTestAbstract.php @@ -0,0 +1,71 @@ +<?php +/** + * Class QROutputTestAbstract + * + * @filesource QROutputTestAbstract.php + * @created 24.12.2017 + * @package chillerlan\QRCodeTest\Output + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Output; + +use chillerlan\QRCode\QROptions; +use chillerlan\QRCode\Data\Byte; +use chillerlan\QRCode\Output\{QRCodeOutputException, QROutputInterface}; +use chillerlan\QRCodeTest\QRTestAbstract; + +use function dirname, file_exists, mkdir; + +abstract class QROutputTestAbstract extends QRTestAbstract{ + + const cachefile = __DIR__.'/../../.build/output_test/test.'; + + /** + * @var \chillerlan\QRCode\Output\QROutputInterface + */ + protected $outputInterface; + + /** + * @var \chillerlan\QRCode\QROptions + */ + protected $options; + + /** + * @var \chillerlan\QRCode\Data\QRMatrix + */ + protected $matrix; + + protected function setUp():void{ + parent::setUp(); + + $buildDir = dirname($this::cachefile); + if(!file_exists($buildDir)){ + mkdir($buildDir, 0777, true); + } + + $this->options = new QROptions; + $this->setOutputInterface(); + } + + protected function setOutputInterface(){ + $this->outputInterface = $this->reflection->newInstanceArgs([$this->options, (new Byte($this->options, 'testdata'))->initMatrix(0)]); + return $this->outputInterface; + } + + public function testInstance(){ + $this->assertInstanceOf(QROutputInterface::class, $this->outputInterface); + } + + public function testSaveException(){ + $this->expectException(QRCodeOutputException::class); + $this->expectExceptionMessage('Could not write data to cache file: /foo'); + + $this->options->cachefile = '/foo'; + $this->setOutputInterface(); + $this->outputInterface->dump(); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QRStringTest.php b/vendor/chillerlan/php-qrcode/tests/Output/QRStringTest.php new file mode 100644 index 000000000..5dbd34010 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Output/QRStringTest.php @@ -0,0 +1,56 @@ +<?php +/** + * Class QRStringTest + * + * @filesource QRStringTest.php + * @created 24.12.2017 + * @package chillerlan\QRCodeTest\Output + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Output; + +use chillerlan\QRCode\{QRCode, Output\QRString}; + +class QRStringTest extends QROutputTestAbstract{ + + protected $FQCN = QRString::class; + + public function types(){ + return [ + 'json' => [QRCode::OUTPUT_STRING_JSON], + 'text' => [QRCode::OUTPUT_STRING_TEXT], + ]; + } + + /** + * @dataProvider types + * @param $type + */ + public function testStringOutput($type){ + $this->options->outputType = $type; + $this->options->cachefile = $this::cachefile.$type; + $this->setOutputInterface(); + $data = $this->outputInterface->dump(); + + $this->assertSame($data, file_get_contents($this->options->cachefile)); + } + + public function testSetModuleValues(){ + + $this->options->moduleValues = [ + // data + 1024 => 'A', + 4 => 'B', + ]; + + $this->setOutputInterface(); + $data = $this->outputInterface->dump(); + + $this->assertStringContainsString('A', $data); + $this->assertStringContainsString('B', $data); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/QRCodeTest.php b/vendor/chillerlan/php-qrcode/tests/QRCodeTest.php new file mode 100644 index 000000000..8613c961f --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/QRCodeTest.php @@ -0,0 +1,140 @@ +<?php +/** + * Class QRCodeTest + * + * @filesource QRCodeTest.php + * @created 17.11.2017 + * @package chillerlan\QRCodeTest + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest; + +use chillerlan\QRCode\{QROptions, QRCode}; +use chillerlan\QRCode\Data\{AlphaNum, Byte, Number, QRCodeDataException}; +use chillerlan\QRCode\Output\QRCodeOutputException; +use chillerlan\QRCodeExamples\MyCustomOutput; + +use function random_bytes; + +class QRCodeTest extends QRTestAbstract{ + + protected $FQCN = QRCode::class; + + /** + * @var \chillerlan\QRCode\QRCode + */ + protected $qrcode; + + protected function setUp():void{ + parent::setUp(); + + $this->qrcode = $this->reflection->newInstance(); + } + + public function testIsNumber(){ + $this->assertTrue($this->qrcode->isNumber('0123456789')); + $this->assertFalse($this->qrcode->isNumber('ABC')); + } + + public function testIsAlphaNum(){ + $this->assertTrue($this->qrcode->isAlphaNum('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:')); + $this->assertFalse($this->qrcode->isAlphaNum('abc')); + } + + public function testIsKanji(){ + $this->assertTrue($this->qrcode->isKanji('茗荷')); + $this->assertFalse($this->qrcode->isKanji('Ã')); + } + + // coverage + + public function typeDataProvider(){ + return [ + 'png' => [QRCode::OUTPUT_IMAGE_PNG, 'data:image/png;base64,'], + 'gif' => [QRCode::OUTPUT_IMAGE_GIF, 'data:image/gif;base64,'], + 'jpg' => [QRCode::OUTPUT_IMAGE_JPG, 'data:image/jpg;base64,'], + 'svg' => [QRCode::OUTPUT_MARKUP_SVG, 'data:image/svg+xml;base64,'], + 'html' => [QRCode::OUTPUT_MARKUP_HTML, '<div><span style="background:'], + 'text' => [QRCode::OUTPUT_STRING_TEXT, '⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕⭕'.PHP_EOL], + 'json' => [QRCode::OUTPUT_STRING_JSON, '[[18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18],'], + ]; + } + + /** + * @dataProvider typeDataProvider + * @param $type + */ + public function testRenderImage($type, $expected){ + $this->qrcode = $this->reflection->newInstanceArgs([new QROptions(['outputType' => $type])]); + + $this->assertStringContainsString($expected, $this->qrcode->render('test')); + } + + public function testInitDataInterfaceException(){ + $this->expectException(QRCodeOutputException::class); + $this->expectExceptionMessage('invalid output type'); + + (new QRCode(new QROptions(['outputType' => 'foo'])))->render('test'); + } + + public function testGetMatrixException(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('QRCode::getMatrix() No data given.'); + + $this->qrcode->getMatrix(''); + } + + public function testTrim() { + $m1 = $this->qrcode->getMatrix('hello'); + $m2 = $this->qrcode->getMatrix('hello '); // added space + + $this->assertNotEquals($m1, $m2); + } + + public function testImageTransparencyBGDefault(){ + $this->qrcode = $this->reflection->newInstanceArgs([new QROptions(['imageTransparencyBG' => 'foo'])]); + + $this->assertSame([255,255,255], $this->getProperty('options')->getValue($this->qrcode)->imageTransparencyBG); + } + + public function testCustomOutput(){ + + $options = new QROptions([ + 'version' => 5, + 'eccLevel' => QRCode::ECC_L, + 'outputType' => QRCode::OUTPUT_CUSTOM, + 'outputInterface' => MyCustomOutput::class, + ]); + + $expected = '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111110111010000101111010000011111110000000010000010111000001101011000001010000010000000010111010101101011000001101011010111010000000010111010110100111110010100111010111010000000010111010000001101011000001101010111010000000010000010100111110010100111110010000010000000011111110101010101010101010101011111110000000000000000010010100111110010100000000000000000011001110000101111010000101111001011110000000000000000111010000101111010000111100010000000001011010100111110010100111110011001010000000010000101111101011000001101011110011110000000000011010100011000001101011000101110100000000011001100001001101011000001101010011010000000010110111110000001101011000001100110100000000010000100100010100111110010100001100100000000011111110111101111010000101111010100110000000011010000111010000101111010000111100100000000010101111111111110010100111110011001000000000010110001110101011000001101011110011010000000001001111100011000001101011000101110010000000011000100110001101011000001101010011100000000001000011001000001101011000001100110000000000011101001011010100111110010100001100000000000010111010001101111010000101111010100110000000011100000001010000101111010000111100000000000000001110110111110010100111110011001000000000000011001011101011000001101011110011100000000011111110101011000001101011001111110110000000000000000110001101011000001101000111100000000011111110001000001101011000011010110000000000010000010101010100111110010101000100100000000010111010111101111010000101111111100110000000010111010011010000101111010001101100010000000010111010000111110010100111100101101100000000010000010101101011000001101001100111100000000011111110101011000001101011000110010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; + + $this->assertSame($expected, $this->reflection->newInstanceArgs([$options])->render('test')); + } + + public function testDataModeOverride(){ + $this->qrcode = $this->reflection->newInstance(); + + $this->assertInstanceOf(Number::class, $this->qrcode->initDataInterface('123')); + $this->assertInstanceOf(AlphaNum::class, $this->qrcode->initDataInterface('ABC123')); + $this->assertInstanceOf(Byte::class, $this->qrcode->initDataInterface(random_bytes(32))); + + $this->qrcode = $this->reflection->newInstanceArgs([new QROptions(['dataMode' => 'Byte'])]); + + $this->assertInstanceOf(Byte::class, $this->qrcode->initDataInterface('123')); + $this->assertInstanceOf(Byte::class, $this->qrcode->initDataInterface('ABC123')); + $this->assertInstanceOf(Byte::class, $this->qrcode->initDataInterface(random_bytes(32))); + } + + public function testDataModeOverrideError(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char:'); + + $this->qrcode = $this->reflection->newInstanceArgs([new QROptions(['dataMode' => 'AlphaNum'])]); + + $this->qrcode->initDataInterface(random_bytes(32)); + } + +} diff --git a/vendor/chillerlan/php-qrcode/tests/QROptionsTest.php b/vendor/chillerlan/php-qrcode/tests/QROptionsTest.php new file mode 100644 index 000000000..41bf69ced --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/QROptionsTest.php @@ -0,0 +1,80 @@ +<?php +/** + * Class QROptionsTest + * + * @filesource QROptionsTest.php + * @created 08.11.2018 + * @package chillerlan\QRCodeTest + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest; + +use chillerlan\QRCode\{QRCode, QRCodeException, QROptions}; +use PHPUnit\Framework\TestCase; + +class QROptionsTest extends TestCase{ + + /** + * @var \chillerlan\QRCode\QROptions + */ + protected $options; + + public function testVersionClamp(){ + $this->assertSame(40, (new QROptions(['version' => 42]))->version); + $this->assertSame(1, (new QROptions(['version' => -42]))->version); + $this->assertSame(21, (new QROptions(['version' => 21]))->version); + $this->assertSame(QRCode::VERSION_AUTO, (new QROptions)->version); // QRCode::VERSION_AUTO = -1, default + } + + public function testVersionMinMaxClamp(){ + // normal clamp + $o = new QROptions(['versionMin' => 5, 'versionMax' => 10]); + $this->assertSame(5, $o->versionMin); + $this->assertSame(10, $o->versionMax); + + // exceeding values + $o = new QROptions(['versionMin' => -42, 'versionMax' => 42]); + $this->assertSame(1, $o->versionMin); + $this->assertSame(40, $o->versionMax); + + // min > max + $o = new QROptions(['versionMin' => 10, 'versionMax' => 5]); + $this->assertSame(5, $o->versionMin); + $this->assertSame(10, $o->versionMax); + + $o = new QROptions(['versionMin' => 42, 'versionMax' => -42]); + $this->assertSame(1, $o->versionMin); + $this->assertSame(40, $o->versionMax); + } + + public function testMaskPatternClamp(){ + $this->assertSame(7, (new QROptions(['maskPattern' => 42]))->maskPattern); + $this->assertSame(0, (new QROptions(['maskPattern' => -42]))->maskPattern); + $this->assertSame(QRCode::MASK_PATTERN_AUTO, (new QROptions)->maskPattern); // QRCode::MASK_PATTERN_AUTO = -1, default + } + + public function testInvalidEccLevelException(){ + $this->expectException(QRCodeException::class); + $this->expectExceptionMessage('Invalid error correct level: 42'); + + new QROptions(['eccLevel' => 42]); + } + + public function testClampRGBValues(){ + $o = new QROptions(['imageTransparencyBG' => [-1, 0, 999]]); + + $this->assertSame(0, $o->imageTransparencyBG[0]); + $this->assertSame(0, $o->imageTransparencyBG[1]); + $this->assertSame(255, $o->imageTransparencyBG[2]); + } + + public function testInvalidRGBValueException(){ + $this->expectException(QRCodeException::class); + $this->expectExceptionMessage('Invalid RGB value.'); + + new QROptions(['imageTransparencyBG' => ['r', 'g', 'b']]); + } +} diff --git a/vendor/chillerlan/php-qrcode/tests/QRTestAbstract.php b/vendor/chillerlan/php-qrcode/tests/QRTestAbstract.php new file mode 100644 index 000000000..7b9eb8049 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/QRTestAbstract.php @@ -0,0 +1,72 @@ +<?php +/** + * Class QRTestAbstract + * + * @filesource QRTestAbstract.php + * @created 17.11.2017 + * @package chillerlan\QRCodeTest + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest; + +use PHPUnit\Framework\TestCase; +use ReflectionClass, ReflectionMethod, ReflectionProperty; + +abstract class QRTestAbstract extends TestCase{ + + /** + * @var \ReflectionClass + */ + protected $reflection; + + /** + * @var string + */ + protected $FQCN; + + protected function setUp():void{ + $this->reflection = new ReflectionClass($this->FQCN); + } + + /** + * @param string $method + * + * @return \ReflectionMethod + */ + protected function getMethod(string $method):ReflectionMethod { + $method = $this->reflection->getMethod($method); + $method->setAccessible(true); + + return $method; + } + + /** + * @param string $property + * + * @return \ReflectionProperty + */ + protected function getProperty(string $property):ReflectionProperty{ + $property = $this->reflection->getProperty($property); + $property->setAccessible(true); + + return $property; + } + + /** + * @param $object + * @param string $property + * @param $value + * + * @return void + */ + protected function setProperty($object, string $property, $value){ + $property = $this->getProperty($property); + $property->setAccessible(true); + $property->setValue($object, $value); + } + + +} diff --git a/vendor/chillerlan/php-settings-container/.gitignore b/vendor/chillerlan/php-settings-container/.gitignore new file mode 100644 index 000000000..e313cba45 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/.gitignore @@ -0,0 +1,4 @@ +.idea +.vendor +composer.lock +*.phpunit.result.cache diff --git a/vendor/chillerlan/php-settings-container/.scrutinizer.yml b/vendor/chillerlan/php-settings-container/.scrutinizer.yml new file mode 100644 index 000000000..7fdd2a4dc --- /dev/null +++ b/vendor/chillerlan/php-settings-container/.scrutinizer.yml @@ -0,0 +1,5 @@ +filter: + excluded_paths: + - examples/* + - tests/* + - vendor/* diff --git a/vendor/chillerlan/php-settings-container/.travis.yml b/vendor/chillerlan/php-settings-container/.travis.yml new file mode 100644 index 000000000..208cdeb6a --- /dev/null +++ b/vendor/chillerlan/php-settings-container/.travis.yml @@ -0,0 +1,18 @@ +language: php + +matrix: + include: + - php: 7.2 + - php: 7.3 + - php: 7.4snapshot + - php: nightly + allow_failures: + - php: 7.4snapshot + - php: nightly + + +before_script: travis_retry composer install --no-interaction --prefer-source + +script: vendor/bin/phpunit --configuration phpunit.xml --coverage-clover clover.xml + +after_script: bash <(curl -s https://codecov.io/bash) diff --git a/vendor/chillerlan/php-settings-container/LICENSE b/vendor/chillerlan/php-settings-container/LICENSE new file mode 100644 index 000000000..25d371fc3 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Smiley <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/chillerlan/php-settings-container/README.md b/vendor/chillerlan/php-settings-container/README.md new file mode 100644 index 000000000..7d0ccf09d --- /dev/null +++ b/vendor/chillerlan/php-settings-container/README.md @@ -0,0 +1,153 @@ +# chillerlan/php-settings-container + +A container class for immutable settings objects. Not a DI container. PHP 7.2+ +- [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerInterface.php) provides immutable properties with magic getter & setter and some fancy + +[![version][packagist-badge]][packagist] +[![license][license-badge]][license] +[![Travis][travis-badge]][travis] +[![Coverage][coverage-badge]][coverage] +[![Scrunitizer][scrutinizer-badge]][scrutinizer] +[![Packagist downloads][downloads-badge]][downloads] +[![PayPal donate][donate-badge]][donate] + +[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-settings-container.svg?style=flat-square +[packagist]: https://packagist.org/packages/chillerlan/php-settings-container +[license-badge]: https://img.shields.io/github/license/chillerlan/php-settings-container.svg?style=flat-square +[license]: https://github.com/chillerlan/php-settings-container/blob/master/LICENSE +[travis-badge]: https://img.shields.io/travis/chillerlan/php-settings-container.svg?style=flat-square +[travis]: https://travis-ci.org/chillerlan/php-settings-container +[coverage-badge]: https://img.shields.io/codecov/c/github/chillerlan/php-settings-container.svg?style=flat-square +[coverage]: https://codecov.io/github/chillerlan/php-settings-container +[scrutinizer-badge]: https://img.shields.io/scrutinizer/g/chillerlan/php-settings-container.svg?style=flat-square +[scrutinizer]: https://scrutinizer-ci.com/g/chillerlan/php-settings-container +[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-settings-container.svg?style=flat-square +[downloads]: https://packagist.org/packages/chillerlan/php-settings-container/stats +[donate-badge]: https://img.shields.io/badge/donate-paypal-ff33aa.svg?style=flat-square +[donate]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WLYUNAT9ZTJZ4 + +## Documentation + +### Installation +**requires [composer](https://getcomposer.org)** + +*composer.json* (note: replace `dev-master` with a version boundary) +```json +{ + "require": { + "php": "^7.2", + "chillerlan/php-settings-container": "^1.0" + } +} +``` + +### Manual installation +Download the desired version of the package from [master](https://github.com/chillerlan/php-settings-container/archive/master.zip) or +[release](https://github.com/chillerlan/php-settings-container/releases) and extract the contents to your project folder. After that: +- run `composer install` to install the required dependencies and generate `/vendor/autoload.php`. +- if you use a custom autoloader, point the namespace `chillerlan\Settings` to the folder `src` of the package + +Profit! + +## Usage + +The `SettingsContainerInterface` (wrapped in`SettingsContainerAbstract` ) provides plug-in functionality for immutable object variables and adds some fancy, like loading/saving JSON, arrays etc. +It takes iterable as the only constructor argument and calls a method with the trait's name on invocation (`MyTrait::MyTrait()`) for each used trait. + +### Simple usage +```php +class MyContainer extends SettingsContainerAbstract{ + protected $foo; + protected $bar; +} +``` + +```php +// use it just like a \stdClass +$container = new MyContainer; +$container->foo = 'what'; +$container->bar = 'foo'; + +// which is equivalent to +$container = new MyContainer(['bar' => 'foo', 'foo' => 'what']); +// ...or try +$container->fromJSON('{"foo": "what", "bar": "foo"}'); + + +// fetch all properties as array +$container->toArray(); // -> ['foo' => 'what', 'bar' => 'foo'] +// or JSON +$container->toJSON(); // -> {"foo": "what", "bar": "foo"} + +//non-existing properties will be ignored: +$container->nope = 'what'; + +var_dump($container->nope); // -> null +``` + +### Advanced usage +```php +trait SomeOptions{ + protected $foo; + protected $what; + + // this method will be called in SettingsContainerAbstract::construct() + // after the properties have been set + protected function SomeOptions(){ + // just some constructor stuff... + $this->foo = strtoupper($this->foo); + } + + // this method will be called from __set() when property $what is set + protected function set_what(string $value){ + $this->what = md5($value); + } +} + +trait MoreOptions{ + protected $bar = 'whatever'; // provide default values +} +``` + +```php +$commonOptions = [ + // SomeOptions + 'foo' => 'whatever', + // MoreOptions + 'bar' => 'nothing', +]; + +// now plug the several library options together to a single object +$container = new class ($commonOptions) extends SettingsContainerAbstract{ + use SomeOptions, MoreOptions; +}; + +var_dump($container->foo); // -> WHATEVER (constructor ran strtoupper on the value) +var_dump($container->bar); // -> nothing + +$container->what = 'some value'; +var_dump($container->what); // -> md5 hash of "some value" +``` + +### API + +#### [`SettingsContainerAbstract`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerAbstract.php) + +method | return | info +-------- | ---- | ----------- +`__construct(iterable $properties = null)` | - | calls `construct()` internally after the properties have been set +(protected) `construct()` | void | calls a method with trait name as replacement constructor for each used trait +`__get(string $property)` | mixed | calls `$this->{'get_'.$property}()` if such a method exists +`__set(string $property, $value)` | void | calls `$this->{'set_'.$property}($value)` if such a method exists +`__isset(string $property)` | bool | +`__unset(string $property)` | void | +`__toString()` | string | a JSON string +`toArray()` | array | +`fromIterable(iterable $properties)` | `SettingsContainerInterface` | +`toJSON(int $jsonOptions = null)` | string | accepts [JSON options constants](http://php.net/manual/json.constants.php) +`fromJSON(string $json)` | `SettingsContainerInterface` | +`jsonSerialize()` | mixed | implements the [`JsonSerializable`](https://www.php.net/manual/en/jsonserializable.jsonserialize.php) interface + +## Disclaimer +This might be either an utterly genius or completely stupid idea - you decide. However, i like it and it works. +Also, this is not a dependency injection container. Stop using DI containers FFS. diff --git a/vendor/chillerlan/php-settings-container/composer.json b/vendor/chillerlan/php-settings-container/composer.json new file mode 100644 index 000000000..4dc758665 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/composer.json @@ -0,0 +1,40 @@ +{ + "name": "chillerlan/php-settings-container", + "description": "A container class for immutable settings objects. Not a DI container. PHP 7.2+", + "homepage": "https://github.com/chillerlan/php-settings-container", + "license": "MIT", + "type": "library", + "minimum-stability": "stable", + "keywords": [ + "php7", "helper", "container", "settings" + ], + "authors": [ + { + "name": "Smiley", + "email": "[email protected]", + "homepage": "https://github.com/codemasher" + } + ], + "support": { + "issues": "https://github.com/chillerlan/php-settings-container/issues", + "source": "https://github.com/chillerlan/php-settings-container" + }, + "require": { + "php": "^7.2", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^8.3" + }, + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "chillerlan\\SettingsTest\\": "tests/", + "chillerlan\\SettingsExamples\\": "examples/" + } + } +} diff --git a/vendor/chillerlan/php-settings-container/examples/advanced.php b/vendor/chillerlan/php-settings-container/examples/advanced.php new file mode 100644 index 000000000..1030b0a29 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/examples/advanced.php @@ -0,0 +1,46 @@ +<?php +/** + * @filesource advanced.php + * @created 28.08.2018 + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + */ + +namespace chillerlan\SettingsExamples; + +use chillerlan\Settings\SettingsContainerAbstract; + +require_once __DIR__.'/../vendor/autoload.php'; + +// from library #1 +trait SomeOptions{ + protected $foo; + + // this method will be called in SettingsContainerAbstract::__construct() after the properties have been set + protected function SomeOptions(){ + // just some constructor stuff... + $this->foo = strtoupper($this->foo); + } +} + +// from library #2 +trait MoreOptions{ + protected $bar = 'whatever'; // provide default values +} + +$commonOptions = [ + // SomeOptions + 'foo' => 'whatever', + // MoreOptions + 'bar' => 'nothing', +]; + +// now plug the several library options together to a single object +/** @var \chillerlan\Settings\SettingsContainerInterface $container */ +$container = new class ($commonOptions) extends SettingsContainerAbstract{ + use SomeOptions, MoreOptions; // ... +}; + +var_dump($container->foo); // -> WHATEVER (constructor ran strtoupper on the value) +var_dump($container->bar); // -> nothing diff --git a/vendor/chillerlan/php-settings-container/examples/simple.php b/vendor/chillerlan/php-settings-container/examples/simple.php new file mode 100644 index 000000000..d8d81095b --- /dev/null +++ b/vendor/chillerlan/php-settings-container/examples/simple.php @@ -0,0 +1,30 @@ +<?php +/** + * @filesource simple.php + * @created 28.08.2018 + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + */ + +namespace chillerlan\SettingsExamples; + +use chillerlan\Settings\SettingsContainerAbstract; + +require_once __DIR__.'/../vendor/autoload.php'; + +class MyContainer extends SettingsContainerAbstract{ + protected $foo; + protected $bar; +} + +/** @var \chillerlan\Settings\SettingsContainerInterface $container */ +$container = new MyContainer(['foo' => 'what']); +$container->bar = 'foo'; + +var_dump($container->toJSON()); // -> {"foo":"what","bar":"foo"} + +// non-existing properties will be ignored: +$container->nope = 'what'; + +var_dump($container->nope); // -> NULL diff --git a/vendor/chillerlan/php-settings-container/phpmd.xml b/vendor/chillerlan/php-settings-container/phpmd.xml new file mode 100644 index 000000000..3ba7e11b7 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/phpmd.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<ruleset name="codemasher/php-settings-container PMD ruleset" + xmlns="http://pmd.sf.net/ruleset/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> + <description>codemasher/php-settings-container PMD ruleset</description> + <exclude-pattern>*/examples/*</exclude-pattern> + <exclude-pattern>*/tests/*</exclude-pattern> + <exclude-pattern>*/vendor/*</exclude-pattern> + <rule ref="rulesets/cleancode.xml"> + <exclude name="BooleanArgumentFlag"/> + </rule> + <rule ref="rulesets/codesize.xml/CyclomaticComplexity"> + <priority>1</priority> + <properties> + <property name="maximum" value="150" /> + </properties> + </rule> + <rule ref="rulesets/controversial.xml"> + <exclude name="CamelCaseMethodName"/> + <exclude name="CamelCasePropertyName"/> + <exclude name="CamelCaseParameterName"/> + <exclude name="CamelCaseVariableName"/> + </rule> + <rule ref="rulesets/design.xml"> + </rule> + <rule ref="rulesets/naming.xml"> + <exclude name="LongVariable"/> + <exclude name="ShortVariable"/> + </rule> + <rule ref="rulesets/unusedcode.xml"> + <exclude name="UnusedFormalParameter"/> + </rule> +</ruleset> diff --git a/vendor/chillerlan/php-settings-container/phpunit.xml b/vendor/chillerlan/php-settings-container/phpunit.xml new file mode 100644 index 000000000..bb05d1289 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/phpunit.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit backupGlobals="false" + backupStaticAttributes="false" + bootstrap="vendor/autoload.php" + colors="true" + convertErrorsToExceptions="true" + convertNoticesToExceptions="true" + convertWarningsToExceptions="true" + processIsolation="false" + stopOnFailure="false" +> + <filter> + <whitelist processUncoveredFilesFromWhitelist="true"> + <directory suffix=".php">./src</directory> + </whitelist> + </filter> + <testsuites> + <testsuite name="php-settings-container test suite"> + <directory suffix=".php">./tests/</directory> + </testsuite> + </testsuites> +</phpunit> diff --git a/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php b/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php new file mode 100644 index 000000000..1ccc1a0e2 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php @@ -0,0 +1,172 @@ +<?php +/** + * Class SettingsContainerAbstract + * + * @filesource SettingsContainerAbstract.php + * @created 28.08.2018 + * @package chillerlan\Settings + * @author Smiley <[email protected]> + * @copyright 2018 Smiley + * @license MIT + */ + +namespace chillerlan\Settings; + +use Exception, ReflectionClass, ReflectionProperty; + +use function call_user_func, call_user_func_array, get_object_vars, json_decode, json_encode, method_exists, property_exists; + +abstract class SettingsContainerAbstract implements SettingsContainerInterface{ + + /** + * SettingsContainerAbstract constructor. + * + * @param iterable|null $properties + */ + public function __construct(iterable $properties = null){ + + if(!empty($properties)){ + $this->fromIterable($properties); + } + + $this->construct(); + } + + /** + * calls a method with trait name as replacement constructor for each used trait + * (remember pre-php5 classname constructors? yeah, basically this.) + * + * @return void + */ + protected function construct():void{ + $traits = (new ReflectionClass($this))->getTraits(); + + foreach($traits as $trait){ + $method = $trait->getShortName(); + + if(method_exists($this, $method)){ + call_user_func([$this, $method]); + } + } + + } + + /** + * @inheritdoc + */ + public function __get(string $property){ + + if(property_exists($this, $property) && !$this->isPrivate($property)){ + + if(method_exists($this, 'get_'.$property)){ + return call_user_func([$this, 'get_'.$property]); + } + + return $this->{$property}; + } + + return null; + } + + /** + * @inheritdoc + */ + public function __set(string $property, $value):void{ + + if(!property_exists($this, $property) || $this->isPrivate($property)){ + return; + } + + if(method_exists($this, 'set_'.$property)){ + call_user_func_array([$this, 'set_'.$property], [$value]); + + return; + } + + $this->{$property} = $value; + } + + /** + * @inheritdoc + */ + public function __isset(string $property):bool{ + return isset($this->{$property}) && !$this->isPrivate($property); + } + + /** + * @internal Checks if a property is private + * + * @param string $property + * + * @return bool + */ + protected function isPrivate(string $property):bool{ + return (new ReflectionProperty($this, $property))->isPrivate(); + } + + /** + * @inheritdoc + */ + public function __unset(string $property):void{ + + if($this->__isset($property)){ + unset($this->{$property}); + } + + } + + /** + * @inheritdoc + */ + public function __toString():string{ + return $this->toJSON(); + } + + /** + * @inheritdoc + */ + public function toArray():array{ + return get_object_vars($this); + } + + /** + * @inheritdoc + */ + public function fromIterable(iterable $properties):SettingsContainerInterface{ + + foreach($properties as $key => $value){ + $this->__set($key, $value); + } + + return $this; + } + + /** + * @inheritdoc + */ + public function toJSON(int $jsonOptions = null):string{ + return json_encode($this, $jsonOptions ?? 0); + } + + /** + * @inheritdoc + */ + public function fromJSON(string $json):SettingsContainerInterface{ + + $data = json_decode($json, true); // as of PHP 7.3: JSON_THROW_ON_ERROR + + if($data === false || $data === null){ + throw new Exception('error while decoding JSON'); + } + + return $this->fromIterable($data); + } + + /** + * @inheritdoc + */ + public function jsonSerialize(){ + return $this->toArray(); + } + +} diff --git a/vendor/chillerlan/php-settings-container/src/SettingsContainerInterface.php b/vendor/chillerlan/php-settings-container/src/SettingsContainerInterface.php new file mode 100644 index 000000000..59cef6232 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/src/SettingsContainerInterface.php @@ -0,0 +1,104 @@ +<?php +/** + * Interface SettingsContainerInterface + * + * @filesource SettingsContainerInterface.php + * @created 28.08.2018 + * @package chillerlan\Settings + * @author Smiley <[email protected]> + * @copyright 2018 Smiley + * @license MIT + */ + +namespace chillerlan\Settings; + +use JsonSerializable; + +/** + * a generic container with magic getter and setter + */ +interface SettingsContainerInterface extends JsonSerializable{ + + /** + * Retrieve the value of $property + * + * @param string $property + * + * @return mixed + */ + public function __get(string $property); + + /** + * Set $property to $value while avoiding private and non-existing properties + * + * @param string $property + * @param mixed $value + * + * @return void + */ + public function __set(string $property, $value):void; + + /** + * Checks if $property is set (aka. not null), excluding private properties + * + * @param string $property + * + * @return bool + */ + public function __isset(string $property):bool; + + /** + * Unsets $property while avoiding private and non-existing properties + * + * @param string $property + * + * @return void + */ + public function __unset(string $property):void; + + /** + * @see SettingsContainerInterface::toJSON() + * + * @return string + */ + public function __toString():string; + + /** + * Returns an array representation of the settings object + * + * @return array + */ + public function toArray():array; + + /** + * Sets properties from a given iterable + * + * @param iterable $properties + * + * @return \chillerlan\Settings\SettingsContainerInterface + */ + public function fromIterable(iterable $properties):SettingsContainerInterface; + + /** + * Returns a JSON representation of the settings object + * @see \json_encode() + * + * @param int|null $jsonOptions + * + * @return string + */ + public function toJSON(int $jsonOptions = null):string; + + /** + * Sets properties from a given JSON string + * + * @param string $json + * + * @return \chillerlan\Settings\SettingsContainerInterface + * + * @throws \Exception + * @throws \JsonException + */ + public function fromJSON(string $json):SettingsContainerInterface; + +} diff --git a/vendor/chillerlan/php-settings-container/tests/ContainerTest.php b/vendor/chillerlan/php-settings-container/tests/ContainerTest.php new file mode 100644 index 000000000..ddae538f3 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/tests/ContainerTest.php @@ -0,0 +1,105 @@ +<?php +/** + * Class ContainerTraitTest + * + * @filesource ContainerTraitTest.php + * @created 28.08.2018 + * @package chillerlan\SettingsTest + * @author Smiley <[email protected]> + * @copyright 2018 Smiley + * @license MIT + */ + +namespace chillerlan\SettingsTest; + +use PHPUnit\Framework\TestCase; +use Exception, TypeError; + +class ContainerTraitTest extends TestCase{ + + public function testConstruct(){ + $container = new TestContainer([ + 'test1' => 'test1', + 'test2' => 'test2', + 'test3' => 'test3', + 'test4' => 'test4', + ]); + + $this->assertSame('test1', $container->test1); + $this->assertSame('test2', $container->test2); + $this->assertNull($container->test3); + $this->assertSame('test4', $container->test4); + + $this->assertSame('success', $container->testConstruct); + } + + public function testGet(){ + $container = new TestContainer; + + $this->assertSame('foo', $container->test1); + $this->assertNull($container->test2); + $this->assertNull($container->test3); + $this->assertNull($container->test4); + $this->assertNull($container->foo); + + // isset test + $this->assertTrue(isset($container->test1)); + $this->assertFalse(isset($container->test2)); + $this->assertFalse(isset($container->test3)); + $this->assertFalse(isset($container->test4)); + $this->assertFalse(isset($container->foo)); + + // custom getter + $container->test6 = 'foo'; + $this->assertSame(sha1('foo'), $container->test6); + // nullable/isset test + $container->test6 = null; + $this->assertFalse(isset($container->test6)); + $this->assertSame('null', $container->test6); + } + + public function testSet(){ + $container = new TestContainer; + $container->test1 = 'bar'; + $container->test2 = 'what'; + $container->test3 = 'nope'; + + $this->assertSame('bar', $container->test1); + $this->assertSame('what', $container->test2); + $this->assertNull($container->test3); + + // unset + unset($container->test1); + $this->assertFalse(isset($container->test1)); + + // custom setter + $container->test5 = 'bar'; + $this->assertSame('bar_test5', $container->test5); + } + + public function testToArray(){ + $container = new TestContainer(['test1' => 'no', 'test2' => true, 'testConstruct' => 'success']); + + $this->assertSame(['test1' => 'no', 'test2' => true, 'testConstruct' => 'success', 'test4' => null, 'test5' => null, 'test6' => null], $container->toArray()); + } + + public function testToJSON(){ + $container = (new TestContainer)->fromJSON('{"test1":"no","test2":true,"testConstruct":"success"}'); + + $expected = '{"test1":"no","test2":true,"testConstruct":"success","test4":null,"test5":null,"test6":null}'; + + $this->assertSame($expected, $container->toJSON()); + $this->assertSame($expected, (string)$container); + } + + public function testFromJsonException(){ + $this->expectException(Exception::class); + (new TestContainer)->fromJSON('-'); + + } + public function testFromJsonTypeError(){ + $this->expectException(TypeError::class); + (new TestContainer)->fromJSON('2'); + } + +} diff --git a/vendor/chillerlan/php-settings-container/tests/TestContainer.php b/vendor/chillerlan/php-settings-container/tests/TestContainer.php new file mode 100644 index 000000000..a35f75277 --- /dev/null +++ b/vendor/chillerlan/php-settings-container/tests/TestContainer.php @@ -0,0 +1,29 @@ +<?php +/** + * Class TestContainer + * + * @filesource TestContainer.php + * @created 28.08.2018 + * @package chillerlan\SettingsTest + * @author Smiley <[email protected]> + * @copyright 2018 Smiley + * @license MIT + */ + +namespace chillerlan\SettingsTest; + +use chillerlan\Settings\SettingsContainerAbstract; + +/** + * @property $test1 + * @property $test2 + * @property $test3 + * @property $test4 + * @property $test5 + * @property $test6 + */ +class TestContainer extends SettingsContainerAbstract{ + use TestOptionsTrait; + + private $test3 = 'what'; +} diff --git a/vendor/chillerlan/php-settings-container/tests/TestOptionsTrait.php b/vendor/chillerlan/php-settings-container/tests/TestOptionsTrait.php new file mode 100644 index 000000000..261f533ac --- /dev/null +++ b/vendor/chillerlan/php-settings-container/tests/TestOptionsTrait.php @@ -0,0 +1,42 @@ +<?php +/** + * Trait TestOptionsTrait + * + * @filesource TestOptionsTrait.php + * @created 28.08.2018 + * @package chillerlan\SettingsTest + * @author smiley <[email protected]> + * @copyright 2018 smiley + * @license MIT + */ + +namespace chillerlan\SettingsTest; + +trait TestOptionsTrait{ + + protected $test1 = 'foo'; + + protected $test2; + + protected $testConstruct; + + protected $test4; + + protected $test5; + + protected $test6; + + protected function TestOptionsTrait(){ + $this->testConstruct = 'success'; + } + + protected function set_test5($value){ + $this->test5 = $value.'_test5'; + } + + protected function get_test6(){ + return $this->test6 === null + ? 'null' + : sha1($this->test6); + } +} diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100644 index 000000000..247294d66 --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,479 @@ +<?php + +/* + * This file is part of Composer. + * + * (c) Nils Adermann <[email protected]> + * Jordi Boggiano <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier <[email protected]> + * @author Jordi Boggiano <[email protected]> + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + private $vendorDir; + + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 000000000..e17d3b0a7 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,364 @@ +<?php + + + + + + + + + + + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + + + + + + +class InstalledVersions +{ +private static $installed = array ( + 'root' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => 'f96abd2b52b9de5eac3651594ca32c6a4023c3e3', + 'dev-requirement' => true, + 'name' => '__root__', + ), + 'versions' => + array ( + '__root__' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => 'f96abd2b52b9de5eac3651594ca32c6a4023c3e3', + 'dev-requirement' => false, + ), + 'beberlei/assert' => + array ( + 'pretty_version' => 'v3.2.7', + 'version' => '3.2.7.0', + 'aliases' => + array ( + ), + 'reference' => 'd63a6943fc4fd1a2aedb65994e3548715105abcf', + 'dev-requirement' => false, + ), + 'chillerlan/php-qrcode' => + array ( + 'pretty_version' => '3.4.0', + 'version' => '3.4.0.0', + 'aliases' => + array ( + ), + 'reference' => 'd8bf297e6843a53aeaa8f3285ce04fc349d133d6', + 'dev-requirement' => false, + ), + 'chillerlan/php-settings-container' => + array ( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'aliases' => + array ( + ), + 'reference' => 'b9b0431dffd74102ee92348a63b4c33fc8ba639b', + 'dev-requirement' => false, + ), + 'j4mie/idiorm' => + array ( + 'pretty_version' => 'v1.5.7', + 'version' => '1.5.7.0', + 'aliases' => + array ( + ), + 'reference' => 'd23f97053ef5d0b988a02c6a71eb5c6118b2f5b4', + 'dev-requirement' => false, + ), + 'mervick/material-design-icons' => + array ( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'aliases' => + array ( + ), + 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a', + 'dev-requirement' => false, + ), + 'paragonie/constant_time_encoding' => + array ( + 'pretty_version' => 'v2.4.0', + 'version' => '2.4.0.0', + 'aliases' => + array ( + ), + 'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c', + 'dev-requirement' => false, + ), + 'spomky-labs/otphp' => + array ( + 'pretty_version' => 'v10.0.1', + 'version' => '10.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'f44cce5a9db4b8da410215d992110482c931232f', + 'dev-requirement' => false, + ), + 'thecodingmachine/safe' => + array ( + 'pretty_version' => 'v1.3.3', + 'version' => '1.3.3.0', + 'aliases' => + array ( + ), + 'reference' => 'a8ab0876305a4cdaef31b2350fcb9811b5608dbc', + 'dev-requirement' => false, + ), + ), +); +private static $canGetVendors; +private static $installedByVendor = array(); + + + + + + + +public static function getInstalledPackages() +{ +$packages = array(); +foreach (self::getInstalled() as $installed) { +$packages[] = array_keys($installed['versions']); +} + +if (1 === \count($packages)) { +return $packages[0]; +} + +return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); +} + + + + + + + + + + +public static function isInstalled($packageName, $includeDevRequirements = true) +{ +foreach (self::getInstalled() as $installed) { +if (isset($installed['versions'][$packageName])) { +return $includeDevRequirements || empty($installed['versions'][$packageName]['dev-requirement']); +} +} + +return false; +} + + + + + + + + + + + + + +public static function satisfies(VersionParser $parser, $packageName, $constraint) +{ +$constraint = $parser->parseConstraints($constraint); +$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + +return $provided->matches($constraint); +} + + + + + + + + + + +public static function getVersionRanges($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +$ranges = array(); +if (isset($installed['versions'][$packageName]['pretty_version'])) { +$ranges[] = $installed['versions'][$packageName]['pretty_version']; +} +if (array_key_exists('aliases', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); +} +if (array_key_exists('replaced', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); +} +if (array_key_exists('provided', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); +} + +return implode(' || ', $ranges); +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['version'])) { +return null; +} + +return $installed['versions'][$packageName]['version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getPrettyVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['pretty_version'])) { +return null; +} + +return $installed['versions'][$packageName]['pretty_version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getReference($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['reference'])) { +return null; +} + +return $installed['versions'][$packageName]['reference']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getRootPackage() +{ +$installed = self::getInstalled(); + +return $installed[0]['root']; +} + + + + + + + +public static function getRawData() +{ +return self::$installed; +} + + + + + + + + + + + + + + + + + + + +public static function reload($data) +{ +self::$installed = $data; +self::$installedByVendor = array(); +} + + + + +private static function getInstalled() +{ +if (null === self::$canGetVendors) { +self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); +} + +$installed = array(); + +if (self::$canGetVendors) { +foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { +if (isset(self::$installedByVendor[$vendorDir])) { +$installed[] = self::$installedByVendor[$vendorDir]; +} elseif (is_file($vendorDir.'/composer/installed.php')) { +$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; +} +} +} + +$installed[] = self::$installed; + +return $installed; +} +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 000000000..f27399a04 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 000000000..429869e46 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,15 @@ +<?php + +// autoload_classmap.php @generated by Composer + +$vendorDir = dirname(dirname(__FILE__)); +$baseDir = dirname($vendorDir); + +return array( + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'IdiormMethodMissingException' => $vendorDir . '/j4mie/idiorm/idiorm.php', + 'IdiormResultSet' => $vendorDir . '/j4mie/idiorm/idiorm.php', + 'IdiormString' => $vendorDir . '/j4mie/idiorm/idiorm.php', + 'IdiormStringException' => $vendorDir . '/j4mie/idiorm/idiorm.php', + 'ORM' => $vendorDir . '/j4mie/idiorm/idiorm.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 000000000..a2686669c --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,99 @@ +<?php + +// autoload_files.php @generated by Composer + +$vendorDir = dirname(dirname(__FILE__)); +$baseDir = dirname($vendorDir); + +return array( + 'a4ecaeafb8cfb009ad0e052c90355e98' => $vendorDir . '/beberlei/assert/lib/Assert/functions.php', + '51fcf4e06c07cc00c920b44bcd900e7a' => $vendorDir . '/thecodingmachine/safe/deprecated/apc.php', + '47f619d9197b36cf5ab70738d7743fe2' => $vendorDir . '/thecodingmachine/safe/deprecated/libevent.php', + 'ea6bb8a12ef9b68f6ada99058e530760' => $vendorDir . '/thecodingmachine/safe/deprecated/mssql.php', + '9a29089eb3ce41a446744c68a00f118c' => $vendorDir . '/thecodingmachine/safe/deprecated/stats.php', + '72243e5536b63e298acb6476f01f1aff' => $vendorDir . '/thecodingmachine/safe/lib/special_cases.php', + '3f648889e687f31c52f949ba8a9d0873' => $vendorDir . '/thecodingmachine/safe/generated/apache.php', + 'eeb4581d958421a4244aaa4167c6a575' => $vendorDir . '/thecodingmachine/safe/generated/apcu.php', + '04cb0b3c1dac5b5ddb23c14e3d66dbe9' => $vendorDir . '/thecodingmachine/safe/generated/array.php', + '450b332a74a9a21e043c5e953485a791' => $vendorDir . '/thecodingmachine/safe/generated/bzip2.php', + '6e9b7954ecfd7cbb9ca239319d1acdb6' => $vendorDir . '/thecodingmachine/safe/generated/calendar.php', + '2c6d7e8bd2de9a272a9d4d43b0a4304a' => $vendorDir . '/thecodingmachine/safe/generated/classobj.php', + '0b8231c1ad0865447c988a4c16b4001f' => $vendorDir . '/thecodingmachine/safe/generated/com.php', + '7643a71fe1c3256058c8fee234cb86e5' => $vendorDir . '/thecodingmachine/safe/generated/cubrid.php', + '68e1365710575942efc1d55000032cee' => $vendorDir . '/thecodingmachine/safe/generated/curl.php', + '02fd26bca803106c5b942a7197c3ad8b' => $vendorDir . '/thecodingmachine/safe/generated/datetime.php', + 'f4817dcbd956cd221b1c31f6fbd5749c' => $vendorDir . '/thecodingmachine/safe/generated/dir.php', + '51c3f2d10ca61a70dbcea0e38d8e902d' => $vendorDir . '/thecodingmachine/safe/generated/eio.php', + '1d34f34327ca3e81535963016e3be2c3' => $vendorDir . '/thecodingmachine/safe/generated/errorfunc.php', + '4fd0ba2d3717b0424d474bebfdafa2b4' => $vendorDir . '/thecodingmachine/safe/generated/exec.php', + '98f4dae054bc7fb19c13be14935cbdd3' => $vendorDir . '/thecodingmachine/safe/generated/fileinfo.php', + '5530ae063ba88323eaf0a07904efdf85' => $vendorDir . '/thecodingmachine/safe/generated/filesystem.php', + '633f4f134975d70e97bddad83348e91a' => $vendorDir . '/thecodingmachine/safe/generated/filter.php', + 'fbd163fc68c5faf73d5ed4002ffd836d' => $vendorDir . '/thecodingmachine/safe/generated/fpm.php', + '21b511999d61411fab0692ff8795bbed' => $vendorDir . '/thecodingmachine/safe/generated/ftp.php', + '85fbd73fc92365cd90526b0ea03cae3a' => $vendorDir . '/thecodingmachine/safe/generated/funchand.php', + '51df9c146e0b7dcbdf358d8abd24dbdc' => $vendorDir . '/thecodingmachine/safe/generated/gmp.php', + '93bb7fe678d7dcfb1322f8e3475a48b0' => $vendorDir . '/thecodingmachine/safe/generated/gnupg.php', + 'c171ba99cf316379ff66468392bf4950' => $vendorDir . '/thecodingmachine/safe/generated/hash.php', + '5ab4aad4c28e468209fbfcceb2e5e6a5' => $vendorDir . '/thecodingmachine/safe/generated/ibase.php', + '4d57409c5e8e576b0c64c08d9d731cfb' => $vendorDir . '/thecodingmachine/safe/generated/ibmDb2.php', + 'eeb246d5403972a9d62106e4a4883496' => $vendorDir . '/thecodingmachine/safe/generated/iconv.php', + 'c28a05f498c01b810a714f7214b7a8da' => $vendorDir . '/thecodingmachine/safe/generated/image.php', + '8063cd92acdf00fd978b5599eb7cc142' => $vendorDir . '/thecodingmachine/safe/generated/imap.php', + '8bd26dbe768e9c9599edad7b198e5446' => $vendorDir . '/thecodingmachine/safe/generated/info.php', + '0c577fe603b029d4b65c84376b15dbd5' => $vendorDir . '/thecodingmachine/safe/generated/ingres-ii.php', + 'd4362910bde43c0f956b52527effd7d4' => $vendorDir . '/thecodingmachine/safe/generated/inotify.php', + '696ba49197d9b55f0428a12bb5a818e1' => $vendorDir . '/thecodingmachine/safe/generated/json.php', + '9818aaa99c8647c63f8ef62b7a368160' => $vendorDir . '/thecodingmachine/safe/generated/ldap.php', + 'bcf523ff2a195eb08e0fbb668ed784d0' => $vendorDir . '/thecodingmachine/safe/generated/libxml.php', + '68be68a9a8b95bb56cab6109ff03bc88' => $vendorDir . '/thecodingmachine/safe/generated/lzf.php', + 'bdca804bb0904ea9f53f328dfc0bb8a5' => $vendorDir . '/thecodingmachine/safe/generated/mailparse.php', + 'b0a3fcac3eaf55445796d6af26b89366' => $vendorDir . '/thecodingmachine/safe/generated/mbstring.php', + '98de16b8db03eb0cb4d318b4402215a6' => $vendorDir . '/thecodingmachine/safe/generated/misc.php', + 'c112440003b56e243b192c11fa9d836e' => $vendorDir . '/thecodingmachine/safe/generated/msql.php', + '7cefd81607cd21b8b3a15656eb6465f5' => $vendorDir . '/thecodingmachine/safe/generated/mysql.php', + 'aaf438b080089c6d0686679cd34aa72e' => $vendorDir . '/thecodingmachine/safe/generated/mysqli.php', + 'df0ef890e9afbf95f3924feb1c7a89f3' => $vendorDir . '/thecodingmachine/safe/generated/mysqlndMs.php', + 'db595fee5972867e45c5327010d78735' => $vendorDir . '/thecodingmachine/safe/generated/mysqlndQc.php', + 'cbac956836b72483dcff1ac39d5c0a0f' => $vendorDir . '/thecodingmachine/safe/generated/network.php', + '6c8f89dfbdc117d7871f572269363f25' => $vendorDir . '/thecodingmachine/safe/generated/oci8.php', + '169a669966a45c06bf55ed029122729b' => $vendorDir . '/thecodingmachine/safe/generated/opcache.php', + 'def61bf4fecd4d4bca7354919cd69302' => $vendorDir . '/thecodingmachine/safe/generated/openssl.php', + '26bb010649a6d32d4120181458aa6ef2' => $vendorDir . '/thecodingmachine/safe/generated/outcontrol.php', + '1212c201fe43c7492a085b2c71505e0f' => $vendorDir . '/thecodingmachine/safe/generated/password.php', + '002ebcb842e2c0d5b7f67fe64cc93158' => $vendorDir . '/thecodingmachine/safe/generated/pcntl.php', + '86df38612982dade72c7085ce7eca81f' => $vendorDir . '/thecodingmachine/safe/generated/pcre.php', + '1cacc3e65f82a473fbd5507c7ce4385d' => $vendorDir . '/thecodingmachine/safe/generated/pdf.php', + '1fc22f445c69ea8706e82fce301c0831' => $vendorDir . '/thecodingmachine/safe/generated/pgsql.php', + 'c70b42561584f7144bff38cd63c4eef3' => $vendorDir . '/thecodingmachine/safe/generated/posix.php', + '9923214639c32ca5173db03a177d3b63' => $vendorDir . '/thecodingmachine/safe/generated/ps.php', + '7e9c3f8eae2b5bf42205c4f1295cb7a7' => $vendorDir . '/thecodingmachine/safe/generated/pspell.php', + '91aa91f6245c349c2e2e88bd0025f199' => $vendorDir . '/thecodingmachine/safe/generated/readline.php', + 'd43773cacb9e5e8e897aa255e32007d1' => $vendorDir . '/thecodingmachine/safe/generated/rpminfo.php', + 'f053a3849e9e8383762b34b91db0320b' => $vendorDir . '/thecodingmachine/safe/generated/rrd.php', + '775b964f72f827a1bf87c65ab5b10800' => $vendorDir . '/thecodingmachine/safe/generated/sem.php', + '816428bd69c29ab5e1ed622af5dca0cd' => $vendorDir . '/thecodingmachine/safe/generated/session.php', + '5093e233bedbefaef0df262bfbab0a5c' => $vendorDir . '/thecodingmachine/safe/generated/shmop.php', + '01352920b0151f17e671266e44b52536' => $vendorDir . '/thecodingmachine/safe/generated/simplexml.php', + 'b080617b1d949683c2e37f8f01dc0e15' => $vendorDir . '/thecodingmachine/safe/generated/sockets.php', + '2708aa182ddcfe6ce27c96acaaa40f69' => $vendorDir . '/thecodingmachine/safe/generated/sodium.php', + 'f1b96cb260a5baeea9a7285cda82a1ec' => $vendorDir . '/thecodingmachine/safe/generated/solr.php', + '3fd8853757d0fe3557c179efb807afeb' => $vendorDir . '/thecodingmachine/safe/generated/spl.php', + '9312ce96a51c846913fcda5f186d58dd' => $vendorDir . '/thecodingmachine/safe/generated/sqlsrv.php', + 'd3eb383ad0b8b962b29dc4afd29d6715' => $vendorDir . '/thecodingmachine/safe/generated/ssdeep.php', + '42a09bc448f441a0b9f9367ea975c0bf' => $vendorDir . '/thecodingmachine/safe/generated/ssh2.php', + 'ef711077d356d1b33ca0b10b67b0be8f' => $vendorDir . '/thecodingmachine/safe/generated/stream.php', + '764b09f6df081cbb2807b97c6ace3866' => $vendorDir . '/thecodingmachine/safe/generated/strings.php', + 'ef241678769fee4a44aaa288f3b78aa1' => $vendorDir . '/thecodingmachine/safe/generated/swoole.php', + '0efc8f6778cba932b9e2a89e28de2452' => $vendorDir . '/thecodingmachine/safe/generated/uodbc.php', + 'd383d32907b98af53ee9208c62204fd0' => $vendorDir . '/thecodingmachine/safe/generated/uopz.php', + '2fd2e4060f7fe772660f002ce38f0b71' => $vendorDir . '/thecodingmachine/safe/generated/url.php', + '782249e03deebeaf57b9991ff5493aa0' => $vendorDir . '/thecodingmachine/safe/generated/var.php', + '344440cd1cd7200fdb4f12af0d3c587f' => $vendorDir . '/thecodingmachine/safe/generated/xdiff.php', + '3599f369219c658a5fb6c4fe66832f62' => $vendorDir . '/thecodingmachine/safe/generated/xml.php', + '7fcd313da9fae337051b091b3492c21b' => $vendorDir . '/thecodingmachine/safe/generated/xmlrpc.php', + 'd668c74cfa92d893b582356733d9a80e' => $vendorDir . '/thecodingmachine/safe/generated/yaml.php', + '4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php', + 'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php', + '356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 000000000..b7fc0125d --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ +<?php + +// autoload_namespaces.php @generated by Composer + +$vendorDir = dirname(dirname(__FILE__)); +$baseDir = dirname($vendorDir); + +return array( +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 000000000..b739220a2 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,15 @@ +<?php + +// autoload_psr4.php @generated by Composer + +$vendorDir = dirname(dirname(__FILE__)); +$baseDir = dirname($vendorDir); + +return array( + 'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'), + 'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'), + 'Safe\\' => array($vendorDir . '/thecodingmachine/safe/lib', $vendorDir . '/thecodingmachine/safe/deprecated', $vendorDir . '/thecodingmachine/safe/generated'), + 'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'), + 'OTPHP\\' => array($vendorDir . '/spomky-labs/otphp/src'), + 'Assert\\' => array($vendorDir . '/beberlei/assert/lib/Assert'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 000000000..34b3b7ad0 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,75 @@ +<?php + +// autoload_real.php @generated by Composer + +class ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056 +{ + private static $loader; + + public static function loadClassLoader($class) + { + if ('Composer\Autoload\ClassLoader' === $class) { + require __DIR__ . '/ClassLoader.php'; + } + } + + /** + * @return \Composer\Autoload\ClassLoader + */ + public static function getLoader() + { + if (null !== self::$loader) { + return self::$loader; + } + + require __DIR__ . '/platform_check.php'; + + spl_autoload_register(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'), true, true); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + spl_autoload_unregister(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader')); + + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 000000000..6f1c238b1 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,173 @@ +<?php + +// autoload_static.php @generated by Composer + +namespace Composer\Autoload; + +class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056 +{ + public static $files = array ( + 'a4ecaeafb8cfb009ad0e052c90355e98' => __DIR__ . '/..' . '/beberlei/assert/lib/Assert/functions.php', + '51fcf4e06c07cc00c920b44bcd900e7a' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/apc.php', + '47f619d9197b36cf5ab70738d7743fe2' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/libevent.php', + 'ea6bb8a12ef9b68f6ada99058e530760' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/mssql.php', + '9a29089eb3ce41a446744c68a00f118c' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/stats.php', + '72243e5536b63e298acb6476f01f1aff' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/special_cases.php', + '3f648889e687f31c52f949ba8a9d0873' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apache.php', + 'eeb4581d958421a4244aaa4167c6a575' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apcu.php', + '04cb0b3c1dac5b5ddb23c14e3d66dbe9' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/array.php', + '450b332a74a9a21e043c5e953485a791' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/bzip2.php', + '6e9b7954ecfd7cbb9ca239319d1acdb6' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/calendar.php', + '2c6d7e8bd2de9a272a9d4d43b0a4304a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/classobj.php', + '0b8231c1ad0865447c988a4c16b4001f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/com.php', + '7643a71fe1c3256058c8fee234cb86e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/cubrid.php', + '68e1365710575942efc1d55000032cee' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/curl.php', + '02fd26bca803106c5b942a7197c3ad8b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/datetime.php', + 'f4817dcbd956cd221b1c31f6fbd5749c' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/dir.php', + '51c3f2d10ca61a70dbcea0e38d8e902d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/eio.php', + '1d34f34327ca3e81535963016e3be2c3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/errorfunc.php', + '4fd0ba2d3717b0424d474bebfdafa2b4' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/exec.php', + '98f4dae054bc7fb19c13be14935cbdd3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/fileinfo.php', + '5530ae063ba88323eaf0a07904efdf85' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/filesystem.php', + '633f4f134975d70e97bddad83348e91a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/filter.php', + 'fbd163fc68c5faf73d5ed4002ffd836d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/fpm.php', + '21b511999d61411fab0692ff8795bbed' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ftp.php', + '85fbd73fc92365cd90526b0ea03cae3a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/funchand.php', + '51df9c146e0b7dcbdf358d8abd24dbdc' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gmp.php', + '93bb7fe678d7dcfb1322f8e3475a48b0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gnupg.php', + 'c171ba99cf316379ff66468392bf4950' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/hash.php', + '5ab4aad4c28e468209fbfcceb2e5e6a5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ibase.php', + '4d57409c5e8e576b0c64c08d9d731cfb' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ibmDb2.php', + 'eeb246d5403972a9d62106e4a4883496' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/iconv.php', + 'c28a05f498c01b810a714f7214b7a8da' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/image.php', + '8063cd92acdf00fd978b5599eb7cc142' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/imap.php', + '8bd26dbe768e9c9599edad7b198e5446' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/info.php', + '0c577fe603b029d4b65c84376b15dbd5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ingres-ii.php', + 'd4362910bde43c0f956b52527effd7d4' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/inotify.php', + '696ba49197d9b55f0428a12bb5a818e1' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/json.php', + '9818aaa99c8647c63f8ef62b7a368160' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ldap.php', + 'bcf523ff2a195eb08e0fbb668ed784d0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/libxml.php', + '68be68a9a8b95bb56cab6109ff03bc88' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/lzf.php', + 'bdca804bb0904ea9f53f328dfc0bb8a5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mailparse.php', + 'b0a3fcac3eaf55445796d6af26b89366' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mbstring.php', + '98de16b8db03eb0cb4d318b4402215a6' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/misc.php', + 'c112440003b56e243b192c11fa9d836e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/msql.php', + '7cefd81607cd21b8b3a15656eb6465f5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysql.php', + 'aaf438b080089c6d0686679cd34aa72e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqli.php', + 'df0ef890e9afbf95f3924feb1c7a89f3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqlndMs.php', + 'db595fee5972867e45c5327010d78735' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqlndQc.php', + 'cbac956836b72483dcff1ac39d5c0a0f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/network.php', + '6c8f89dfbdc117d7871f572269363f25' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/oci8.php', + '169a669966a45c06bf55ed029122729b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/opcache.php', + 'def61bf4fecd4d4bca7354919cd69302' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/openssl.php', + '26bb010649a6d32d4120181458aa6ef2' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/outcontrol.php', + '1212c201fe43c7492a085b2c71505e0f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/password.php', + '002ebcb842e2c0d5b7f67fe64cc93158' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pcntl.php', + '86df38612982dade72c7085ce7eca81f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pcre.php', + '1cacc3e65f82a473fbd5507c7ce4385d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pdf.php', + '1fc22f445c69ea8706e82fce301c0831' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pgsql.php', + 'c70b42561584f7144bff38cd63c4eef3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/posix.php', + '9923214639c32ca5173db03a177d3b63' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ps.php', + '7e9c3f8eae2b5bf42205c4f1295cb7a7' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pspell.php', + '91aa91f6245c349c2e2e88bd0025f199' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/readline.php', + 'd43773cacb9e5e8e897aa255e32007d1' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/rpminfo.php', + 'f053a3849e9e8383762b34b91db0320b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/rrd.php', + '775b964f72f827a1bf87c65ab5b10800' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sem.php', + '816428bd69c29ab5e1ed622af5dca0cd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/session.php', + '5093e233bedbefaef0df262bfbab0a5c' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/shmop.php', + '01352920b0151f17e671266e44b52536' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/simplexml.php', + 'b080617b1d949683c2e37f8f01dc0e15' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sockets.php', + '2708aa182ddcfe6ce27c96acaaa40f69' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sodium.php', + 'f1b96cb260a5baeea9a7285cda82a1ec' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/solr.php', + '3fd8853757d0fe3557c179efb807afeb' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/spl.php', + '9312ce96a51c846913fcda5f186d58dd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sqlsrv.php', + 'd3eb383ad0b8b962b29dc4afd29d6715' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ssdeep.php', + '42a09bc448f441a0b9f9367ea975c0bf' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ssh2.php', + 'ef711077d356d1b33ca0b10b67b0be8f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/stream.php', + '764b09f6df081cbb2807b97c6ace3866' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/strings.php', + 'ef241678769fee4a44aaa288f3b78aa1' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/swoole.php', + '0efc8f6778cba932b9e2a89e28de2452' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/uodbc.php', + 'd383d32907b98af53ee9208c62204fd0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/uopz.php', + '2fd2e4060f7fe772660f002ce38f0b71' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/url.php', + '782249e03deebeaf57b9991ff5493aa0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/var.php', + '344440cd1cd7200fdb4f12af0d3c587f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/xdiff.php', + '3599f369219c658a5fb6c4fe66832f62' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/xml.php', + '7fcd313da9fae337051b091b3492c21b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/xmlrpc.php', + 'd668c74cfa92d893b582356733d9a80e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaml.php', + '4af1dca6db8c527c6eed27bff85ff0e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaz.php', + 'fe43ca06499ac37bc2dedd823af71eb5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zip.php', + '356736db98a6834f0a886b8d509b0ecd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zlib.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'c' => + array ( + 'chillerlan\\Settings\\' => 20, + 'chillerlan\\QRCode\\' => 18, + ), + 'S' => + array ( + 'Safe\\' => 5, + ), + 'P' => + array ( + 'ParagonIE\\ConstantTime\\' => 23, + ), + 'O' => + array ( + 'OTPHP\\' => 6, + ), + 'A' => + array ( + 'Assert\\' => 7, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'chillerlan\\Settings\\' => + array ( + 0 => __DIR__ . '/..' . '/chillerlan/php-settings-container/src', + ), + 'chillerlan\\QRCode\\' => + array ( + 0 => __DIR__ . '/..' . '/chillerlan/php-qrcode/src', + ), + 'Safe\\' => + array ( + 0 => __DIR__ . '/..' . '/thecodingmachine/safe/lib', + 1 => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated', + 2 => __DIR__ . '/..' . '/thecodingmachine/safe/generated', + ), + 'ParagonIE\\ConstantTime\\' => + array ( + 0 => __DIR__ . '/..' . '/paragonie/constant_time_encoding/src', + ), + 'OTPHP\\' => + array ( + 0 => __DIR__ . '/..' . '/spomky-labs/otphp/src', + ), + 'Assert\\' => + array ( + 0 => __DIR__ . '/..' . '/beberlei/assert/lib/Assert', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'IdiormMethodMissingException' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php', + 'IdiormResultSet' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php', + 'IdiormString' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php', + 'IdiormStringException' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php', + 'ORM' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 000000000..7de696894 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,615 @@ +{ + "packages": [ + { + "name": "beberlei/assert", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/beberlei/assert.git", + "reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beberlei/assert/zipball/d63a6943fc4fd1a2aedb65994e3548715105abcf", + "reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "php": "^7" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "*", + "phpstan/phpstan-shim": "*", + "phpunit/phpunit": ">=6.0.0 <8" + }, + "suggest": { + "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles" + }, + "time": "2019-12-19T17:51:41+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Assert\\": "lib/Assert" + }, + "files": [ + "lib/Assert/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "[email protected]", + "role": "Lead Developer" + }, + { + "name": "Richard Quadling", + "email": "[email protected]", + "role": "Collaborator" + } + ], + "description": "Thin assertion library for input validation in business models.", + "keywords": [ + "assert", + "assertion", + "validation" + ], + "support": { + "issues": "https://github.com/beberlei/assert/issues", + "source": "https://github.com/beberlei/assert/tree/v3" + }, + "install-path": "../beberlei/assert" + }, + { + "name": "chillerlan/php-qrcode", + "version": "3.4.0", + "version_normalized": "3.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-qrcode.git", + "reference": "d8bf297e6843a53aeaa8f3285ce04fc349d133d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/d8bf297e6843a53aeaa8f3285ce04fc349d133d6", + "reference": "d8bf297e6843a53aeaa8f3285ce04fc349d133d6", + "shasum": "" + }, + "require": { + "chillerlan/php-settings-container": "^1.2", + "ext-mbstring": "*", + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5", + "setasign/fpdf": "^1.8.2" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output." + }, + "time": "2020-11-18T20:51:41+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase" + }, + { + "name": "Smiley", + "email": "[email protected]", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "description": "A QR code generator. PHP 7.2+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "keywords": [ + "phpqrcode", + "qr", + "qr code", + "qrcode", + "qrcode-generator" + ], + "support": { + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode/tree/3.4.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "install-path": "../chillerlan/php-qrcode" + }, + { + "name": "chillerlan/php-settings-container", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-settings-container.git", + "reference": "b9b0431dffd74102ee92348a63b4c33fc8ba639b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/b9b0431dffd74102ee92348a63b4c33fc8ba639b", + "reference": "b9b0431dffd74102ee92348a63b4c33fc8ba639b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.3" + }, + "time": "2019-09-10T00:09:44+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Smiley", + "email": "[email protected]", + "homepage": "https://github.com/codemasher" + } + ], + "description": "A container class for immutable settings objects. Not a DI container. PHP 7.2+", + "homepage": "https://github.com/chillerlan/php-settings-container", + "keywords": [ + "PHP7", + "Settings", + "container", + "helper" + ], + "support": { + "issues": "https://github.com/chillerlan/php-settings-container/issues", + "source": "https://github.com/chillerlan/php-settings-container" + }, + "install-path": "../chillerlan/php-settings-container" + }, + { + "name": "j4mie/idiorm", + "version": "v1.5.7", + "version_normalized": "1.5.7.0", + "source": { + "type": "git", + "url": "https://github.com/j4mie/idiorm.git", + "reference": "d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/j4mie/idiorm/zipball/d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4", + "reference": "d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "phpunit/phpunit": "^4.8" + }, + "time": "2020-04-29T00:37:09+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "idiorm.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause", + "BSD-3-Clause", + "BSD-4-Clause" + ], + "authors": [ + { + "name": "Jamie Matthews", + "email": "[email protected]", + "homepage": "http://j4mie.org", + "role": "Developer" + }, + { + "name": "Simon Holywell", + "email": "[email protected]", + "homepage": "http://simonholywell.com", + "role": "Maintainer" + }, + { + "name": "Durham Hale", + "email": "[email protected]", + "homepage": "http://durhamhale.com", + "role": "Maintainer" + } + ], + "description": "A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5", + "homepage": "http://j4mie.github.com/idiormandparis", + "keywords": [ + "idiorm", + "orm", + "query builder" + ], + "support": { + "issues": "https://github.com/j4mie/idiorm/issues", + "source": "https://github.com/j4mie/idiorm" + }, + "install-path": "../j4mie/idiorm" + }, + { + "name": "mervick/material-design-icons", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/mervick/material-design-icons.git", + "reference": "635435c8d3df3a6da3241648caf8a65d1c07cc1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mervick/material-design-icons/zipball/635435c8d3df3a6da3241648caf8a65d1c07cc1a", + "reference": "635435c8d3df3a6da3241648caf8a65d1c07cc1a", + "shasum": "" + }, + "time": "2016-02-22T01:05:40+00:00", + "type": "library", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "CC-BY-4.0" + ], + "authors": [ + { + "name": "Andrey Izman", + "email": "[email protected]" + } + ], + "description": "Google Material Design Icons For Using With Bootstrap", + "homepage": "http://github.com/mervick/material-design-icons", + "keywords": [ + "bootstrap", + "google", + "icons", + "icons-web-font", + "material", + "material-design", + "web-font" + ], + "support": { + "issues": "https://github.com/mervick/material-design-icons/issues", + "source": "http://github.com/mervick/material-design-icons" + }, + "install-path": "../mervick/material-design-icons" + }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.4.0", + "version_normalized": "2.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", + "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "time": "2020-12-06T15:14:20+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "[email protected]", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "[email protected]", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "[email protected]", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "install-path": "../paragonie/constant_time_encoding" + }, + { + "name": "spomky-labs/otphp", + "version": "v10.0.1", + "version_normalized": "10.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/Spomky-Labs/otphp.git", + "reference": "f44cce5a9db4b8da410215d992110482c931232f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/f44cce5a9db4b8da410215d992110482c931232f", + "reference": "f44cce5a9db4b8da410215d992110482c931232f", + "shasum": "" + }, + "require": { + "beberlei/assert": "^3.0", + "ext-mbstring": "*", + "paragonie/constant_time_encoding": "^2.0", + "php": "^7.2|^8.0", + "thecodingmachine/safe": "^0.1.14|^1.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-beberlei-assert": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^8.0", + "thecodingmachine/phpstan-safe-rule": "^1.0" + }, + "time": "2020-01-28T09:24:19+00:00", + "type": "library", + "extra": { + "branch-alias": { + "v10.0": "10.0.x-dev", + "v9.0": "9.0.x-dev", + "v8.3": "8.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "OTPHP\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florent Morselli", + "homepage": "https://github.com/Spomky" + }, + { + "name": "All contributors", + "homepage": "https://github.com/Spomky-Labs/otphp/contributors" + } + ], + "description": "A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm) and compatible with Google Authenticator", + "homepage": "https://github.com/Spomky-Labs/otphp", + "keywords": [ + "FreeOTP", + "RFC 4226", + "RFC 6238", + "google authenticator", + "hotp", + "otp", + "totp" + ], + "support": { + "issues": "https://github.com/Spomky-Labs/otphp/issues", + "source": "https://github.com/Spomky-Labs/otphp/tree/v10.0.1" + }, + "install-path": "../spomky-labs/otphp" + }, + { + "name": "thecodingmachine/safe", + "version": "v1.3.3", + "version_normalized": "1.3.3.0", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.12" + }, + "time": "2020-10-28T17:51:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "deprecated/", + "generated/" + ] + }, + "files": [ + "deprecated/apc.php", + "deprecated/libevent.php", + "deprecated/mssql.php", + "deprecated/stats.php", + "lib/special_cases.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "support": { + "issues": "https://github.com/thecodingmachine/safe/issues", + "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" + }, + "install-path": "../thecodingmachine/safe" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 000000000..59d40508a --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,106 @@ +<?php return array ( + 'root' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => 'f96abd2b52b9de5eac3651594ca32c6a4023c3e3', + 'dev-requirement' => true, + 'name' => '__root__', + ), + 'versions' => + array ( + '__root__' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => 'f96abd2b52b9de5eac3651594ca32c6a4023c3e3', + 'dev-requirement' => false, + ), + 'beberlei/assert' => + array ( + 'pretty_version' => 'v3.2.7', + 'version' => '3.2.7.0', + 'aliases' => + array ( + ), + 'reference' => 'd63a6943fc4fd1a2aedb65994e3548715105abcf', + 'dev-requirement' => false, + ), + 'chillerlan/php-qrcode' => + array ( + 'pretty_version' => '3.4.0', + 'version' => '3.4.0.0', + 'aliases' => + array ( + ), + 'reference' => 'd8bf297e6843a53aeaa8f3285ce04fc349d133d6', + 'dev-requirement' => false, + ), + 'chillerlan/php-settings-container' => + array ( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'aliases' => + array ( + ), + 'reference' => 'b9b0431dffd74102ee92348a63b4c33fc8ba639b', + 'dev-requirement' => false, + ), + 'j4mie/idiorm' => + array ( + 'pretty_version' => 'v1.5.7', + 'version' => '1.5.7.0', + 'aliases' => + array ( + ), + 'reference' => 'd23f97053ef5d0b988a02c6a71eb5c6118b2f5b4', + 'dev-requirement' => false, + ), + 'mervick/material-design-icons' => + array ( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'aliases' => + array ( + ), + 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a', + 'dev-requirement' => false, + ), + 'paragonie/constant_time_encoding' => + array ( + 'pretty_version' => 'v2.4.0', + 'version' => '2.4.0.0', + 'aliases' => + array ( + ), + 'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c', + 'dev-requirement' => false, + ), + 'spomky-labs/otphp' => + array ( + 'pretty_version' => 'v10.0.1', + 'version' => '10.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'f44cce5a9db4b8da410215d992110482c931232f', + 'dev-requirement' => false, + ), + 'thecodingmachine/safe' => + array ( + 'pretty_version' => 'v1.3.3', + 'version' => '1.3.3.0', + 'aliases' => + array ( + ), + 'reference' => 'a8ab0876305a4cdaef31b2350fcb9811b5608dbc', + 'dev-requirement' => false, + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 000000000..589e9e770 --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ +<?php + +// platform_check.php @generated by Composer + +$issues = array(); + +if (!(PHP_VERSION_ID >= 70200)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/vendor/j4mie/idiorm/CONTRIBUTING.md b/vendor/j4mie/idiorm/CONTRIBUTING.md new file mode 100644 index 000000000..914737217 --- /dev/null +++ b/vendor/j4mie/idiorm/CONTRIBUTING.md @@ -0,0 +1,16 @@ +--- +### Feature complete + +Idiorm is now considered to be feature complete as of version 1.5.0. Whilst it will continue to be maintained with bug fixes there will be no further new features added. + +**Please do not submit feature requests or pull requests adding new features as they will be closed without ceremony.** + +--- + +When making a pull request please include the following aspects: + +- Update the changelog in the README.markdown file to include details of the pull request +- If the documentation in the README or Sphinx docs needs to be amended please do so in the pull request +- Include unit tests for any changes - if it is a bug include at least one regression test + + diff --git a/vendor/j4mie/idiorm/README.markdown b/vendor/j4mie/idiorm/README.markdown new file mode 100644 index 000000000..eebb1a2d0 --- /dev/null +++ b/vendor/j4mie/idiorm/README.markdown @@ -0,0 +1,239 @@ +Idiorm +====== + +[![Build Status](https://travis-ci.org/j4mie/idiorm.png?branch=master)](https://travis-ci.org/j4mie/idiorm) [![Latest Stable Version](https://poser.pugx.org/j4mie/idiorm/v/stable.png)](https://packagist.org/packages/j4mie/idiorm) [![Total Downloads](https://poser.pugx.org/j4mie/idiorm/downloads.png)](https://packagist.org/packages/j4mie/idiorm) [![Code Climate](https://codeclimate.com/github/j4mie/idiorm/badges/gpa.svg)](https://codeclimate.com/github/j4mie/idiorm) + +[http://j4mie.github.com/idiormandparis/](http://j4mie.github.com/idiormandparis/) + +--- +### Feature/API complete + +Idiorm is now considered to be feature complete as of version 1.5.0. Whilst it will continue to be maintained with bug fixes there will be no further new features added from this point on. This means that if a pull request makes breaking changes to the API or requires anything other than a patch version bump of the library then it will not be merged. + +**Please do not submit feature requests or API breaking changes as they will be closed without ceremony.** + +--- + +A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5 and above. + +Tested on PHP 5.2.0+ - may work on earlier versions with PDO and the correct database drivers. + +Released under a [BSD license](http://en.wikipedia.org/wiki/BSD_licenses). + +**See Also: [Paris](http://github.com/j4mie/paris), an Active Record implementation built on top of Idiorm.** + +Features +-------- + +* Makes simple queries and simple CRUD operations completely painless. +* Gets out of the way when more complex SQL is required. +* Built on top of [PDO](http://php.net/pdo). +* Uses [prepared statements](http://uk.php.net/manual/en/pdo.prepared-statements.php) throughout to protect against [SQL injection](http://en.wikipedia.org/wiki/SQL_injection) attacks. +* Requires no model classes, no XML configuration and no code generation: works out of the box, given only a connection string. +* Consists of one main class called `ORM`. Additional classes are prefixed with `Idiorm`. Minimal global namespace pollution. +* Database agnostic. Currently supports SQLite, MySQL, Firebird and PostgreSQL. May support others, please give it a try! +* Supports collections of models with method chaining to filter or apply actions to multiple results at once. +* Multiple connections supported +* PSR-1 compliant methods (any method can be called in camelCase instead of underscores eg. `find_many()` becomes `findMany()`) - you'll need PHP 5.3+ + +Documentation +------------- + +The documentation is hosted on Read the Docs: [idiorm.rtfd.org](http://idiorm.rtfd.org) + +### Building the Docs ### + +You will need to install [Sphinx](http://sphinx-doc.org/) and then in the docs folder run: + + make html + +The documentation will now be in docs/_build/html/index.html + +Let's See Some Code +------------------- + +```php +$user = ORM::for_table('user') + ->where_equal('username', 'j4mie') + ->find_one(); + +$user->first_name = 'Jamie'; +$user->save(); + +$tweets = ORM::for_table('tweet') + ->select('tweet.*') + ->join('user', array( + 'user.id', '=', 'tweet.user_id' + )) + ->where_equal('user.username', 'j4mie') + ->find_many(); + +foreach ($tweets as $tweet) { + echo $tweet->text; +} +``` + +Tests +----- + +Tests are written with PHPUnit and be run through composer + + composer test + +To make testing on PHP 5.2 (Idiorm maintains support back to this version of PHP) there +is a Docker setup in `./test/docker_for_php52` - check the readme in there for more. + +Changelog +--------- + +#### 1.5.7 - released 2020-04-29 + +* Fix argument order in call to join() [[CatalinFrancu](https://github.com/CatalinFrancu)] - [issue #357](https://github.com/j4mie/idiorm/pull/357) + +#### 1.5.6 - released 2018-05-31 + +* Assign `null` to `self::$_db` on `reset_db()` to ensure PDO closes the connections [[bleakgadfly](https://github.com/bleakgadfly)] - [issue #338](https://github.com/j4mie/idiorm/issues/338) + +#### 1.5.5 - released 2018-01-05 + +* Add a docker setup for testing with PHP 5.2 (uses PHPUnit 3.6.12, which is the last version released compatible with PHP 5.2) [[Treffynnon](https://github.com/treffynnon)] + +#### 1.5.4 - released 2018-01-04 + +* Reset Idiorm state when a cached result is returned [[fayland](https://github.com/fayland) (and [Treffynnon](https://github.com/treffynnon))] - [issue #319](https://github.com/j4mie/idiorm/issues/319) +* Fix travis builds for PHP 5.2+ (adding 7.0 and 7.1) and document support for newer PHP versions [[Treffynnon](https://github.com/treffynnon)] +* Correct PHPDoc comments for `selectMany()` [[kawausokun](https://github.com/kawausokun)] - [issue #325](github.com/j4mie/idiorm/issues/325) +* Add pdo_sqlite to the composer require-dev dependencies [[qyanu](https://github.com/qyanu)] - [issue #328](github.com/j4mie/idiorm/issues/328) + +#### 1.5.3 - released 2017-03-21 + +* Document the `raw_execute()` method and add a note for `get_db()` in the querying documentation - [[Treffynnon](https://github.com/treffynnon)] + +#### 1.5.2 - released 2016-12-14 + +* Fix autoincremented compound keys inserts [[lrlopez](https://github.com/lrlopez)] - [issue #233](https://github.com/j4mie/idiorm/issues/233) and [pull #235](https://github.com/j4mie/idiorm/pull/235) +* Add @method tags for magic methods [[stellis](https://github.com/stellis)] - [issue #237](https://github.com/j4mie/idiorm/issues/237) +* Ensure `is_dirty()` returns correctly when fed null or an empty string [[tentwofour](https://github.com/tentwofour)] - [issue #268](https://github.com/j4mie/idiorm/issues/268) +* Adding Code Climate badge to the readme file [[e3betht](https://github.com/e3betht)] - [issue #260](https://github.com/j4mie/idiorm/issues/260) +* Typo in navigation [[leongersen](https://github.com/leongersen)] - [issue #257](https://github.com/j4mie/idiorm/issues/257) +* Support named placeholders logging and test [[m92o](https://github.com/m92o)] - [issue #223](https://github.com/j4mie/idiorm/issues/223) +* `having_id_is()` reference undefined variable `$value` [[Treffynnon](https://github.com/treffynnon)] - [issue #224](https://github.com/j4mie/idiorm/issues/224) +* Documentation fix - ORM query output for `where_any_is()` [[uovidiu](https://github.com/uovidiu)] - [issue #306](https://github.com/j4mie/idiorm/issues/306) +* Code style fix preventing nested loops from using the same variable names [[mkkeck](https://github.com/mkkeck)] - [issue #301](https://github.com/j4mie/idiorm/issues/301) +* Document shortcomings of the built in query logger [[Treffynnon](https://github.com/treffynnon)] - [issue #307](https://github.com/j4mie/idiorm/issues/307) +* Add phpunit to dev dependencies, add `composer test` script shortcut and fix PDO mock in test bootstrap [[Treffynnon](https://github.com/treffynnon)] +* New test for multiple raw where clauses [[Treffynnon](https://github.com/treffynnon)] - [issue #236](https://github.com/j4mie/idiorm/issues/236) +* Remove PHP 5.2 from travis-ci containers to test against (**note** Idiorm still supports PHP 5.2 despite this) [[Treffynnon](https://github.com/treffynnon)] + +#### 1.5.1 - released 2014-06-23 + +* Binding of named parameters was broken [[cainmi](https://github.com/cainmi)] - [issue #221](https://github.com/j4mie/idiorm/pull/221) + +#### 1.5.0 - released 2014-06-22 + +* Multiple OR'ed conditions support [[lrlopez](https://github.com/lrlopez)] - [issue #201](https://github.com/j4mie/idiorm/issues/201) +* `where_id_in()` for selecting multiple records by primary key [[lrlopez](https://github.com/lrlopez)] - [issue #202](https://github.com/j4mie/idiorm/issues/202) +* Add compound primary key support [[lrlopez](https://github.com/lrlopez)] - [issue #171](https://github.com/j4mie/idiorm/issues/171) +* Add a RAW JOIN source to the query [[moiseevigor](https://github.com/moiseevigor)] - [issue #163](https://github.com/j4mie/idiorm/issues/163) +* offsetExists() should return true for null values, resolves [#181](https://github.com/j4mie/idiorm/issues/181) [[cainmi](https://github.com/cainmi)] - [issue #214](https://github.com/j4mie/idiorm/pull/214) +* Custom cache callback functions [[peter-mw](https://github.com/peter-mw)] - [issue #216](https://github.com/j4mie/idiorm/pull/216) +* Restrict null primary keys on update/delete, resolves [#203](https://github.com/j4mie/idiorm/issues/203) [[cainmi](https://github.com/cainmi)] - [issue #205](https://github.com/j4mie/idiorm/issues/205) +* Ensure parameters treated by type correctly [[charsleysa](https://github.com/charsleysa)] & [[SneakyBobito](https://github.com/SneakyBobito)] - [issue #206](https://github.com/j4mie/idiorm/issues/206) & [issue #208](https://github.com/j4mie/idiorm/issues/208) +* Reduce the type casting on aggregate functions to allow characters [[herroffizier](https://github.com/herroffizier)] - [issue #150](https://github.com/j4mie/idiorm/issues/150) +* Prevent invalid method calls from triggering infinite recursion [[michaelward82](https://github.com/michaelward82)] - [issue #152](https://github.com/j4mie/idiorm/issues/152) +* Add time to query logging - adds query time parameter to external logger callback function [[AgelxNash](https://github.com/AgelxNash)] - [issue #180](https://github.com/j4mie/idiorm/issues/180) +* Changed database array access to ensure it's always properly setup [[falmp](https://github.com/falmp)] - [issue #159](https://github.com/j4mie/idiorm/issues/159) +* Allow unsetting the db (`ORM::set_db(null)`) to make the test work again [[borrel](https://github.com/borrel)] - [issue #160](https://github.com/j4mie/idiorm/issues/160) +* Correct [issue #176](https://github.com/j4mie/idiorm/issues/176): Ensure database setup before building select [[kendru](https://github.com/kendru)] - [issue #197](https://github.com/j4mie/idiorm/issues/197) +* Add HHVM to travis-ci build matrix [[ptarjan](https://github.com/ptarjan)] - [issue #168](https://github.com/j4mie/idiorm/issues/168) +* Improve where statement precendence documentation [[thomasahle](https://github.com/thomasahle)] - [issue #190](https://github.com/j4mie/idiorm/issues/190) +* Improve testing checks [[charsleysa](https://github.com/charsleysa)] - [issue #173](https://github.com/j4mie/idiorm/issues/173) + +#### 1.4.1 - released 2013-12-12 + +**Patch update to remove a broken pull request** - may have consequences for users of 1.4.0 that exploited the "`find_many()` now returns an associative array with the databases primary ID as the array keys" change that was merged in 1.4.0. + +* Back out pull request/issue [#133](https://github.com/j4mie/idiorm/pull/133) as it breaks backwards compatibility in previously unexpected ways (see [#162](https://github.com/j4mie/idiorm/pull/162), [#156](https://github.com/j4mie/idiorm/issues/156) and [#133](https://github.com/j4mie/idiorm/pull/133#issuecomment-29063108)) - sorry for merging this change into Idiorm - closes [issue 156](https://github.com/j4mie/idiorm/issues/156) + +#### 1.4.0 - released 2013-09-05 + +* `find_many()` now returns an associative array with the databases primary ID as the array keys [[Surt](https://github.com/Surt)] - [issue #133](https://github.com/j4mie/idiorm/issues/133) +* Calls to `set()` and `set_expr()` return `$this` allowing them to be chained [[Surt](https://github.com/Surt)] +* Add PSR-1 compliant camelCase method calls to Idiorm (PHP 5.3+ required) [[crhayes](https://github.com/crhayes)] - [issue #108](https://github.com/j4mie/idiorm/issues/108) +* Add static method `get_config()` to access current configuration [[javierd](https://github.com/mikejestes)] - [issue #141](https://github.com/j4mie/idiorm/issues/141) +* Add logging callback functionality [[lalop](https://github.com/lalop)] - [issue #130](https://github.com/j4mie/idiorm/issues/130) +* Add support for MS SQL ``TOP`` limit style (automatically used for PDO drivers: sqlsrv, dblib and mssql) [[numkem](https://github.com/numkem)] - [issue #116](https://github.com/j4mie/idiorm/issues/116) +* Uses table aliases in `WHERE` clauses [[vicvicvic](https://github.com/vicvicvic)] - [issue #140](https://github.com/j4mie/idiorm/issues/140) +* Ignore result columns when calling an aggregate function [[tassoevan](https://github.com/tassoevan)] - [issue #120](https://github.com/j4mie/idiorm/issues/120) +* Improve documentation [[bruston](https://github.com/bruston)] - [issue #111](https://github.com/j4mie/idiorm/issues/111) +* Improve PHPDoc on `get_db()` [[mailopl](https://github.com/mailopl)] - [issue #106](https://github.com/j4mie/idiorm/issues/106) +* Improve documentation [[sjparsons](https://github.com/sjparsons)] - [issue #103](https://github.com/j4mie/idiorm/issues/103) +* Make tests/bootstrap.php HHVM compatible [[JoelMarcey](https://github.com/JoelMarcey)] - [issue #143](https://github.com/j4mie/idiorm/issues/143) +* Fix docblock [[ulrikjohansson](https://github.com/ulrikjohansson)] - [issue #147](https://github.com/j4mie/idiorm/issues/147) +* Fix incorrect variable name in querying documentation [[fridde](https://github.com/fridde)] - [issue #146](https://github.com/j4mie/idiorm/issues/146) + +#### 1.3.0 - released 2013-01-31 + +* Documentation moved to [idiorm.rtfd.org](http://idiorm.rtfd.org) and now built using [Sphinx](http://sphinx-doc.org/) +* Add support for multiple database connections - closes [issue #15](https://github.com/j4mie/idiorm/issues/15) [[tag](https://github.com/tag)] +* Add in raw_execute - closes [issue #40](https://github.com/j4mie/idiorm/issues/40) [[tag](https://github.com/tag)] +* Add `get_last_statement()` - closes [issue #84](https://github.com/j4mie/idiorm/issues/84) [[tag](https://github.com/tag)] +* Add HAVING clause functionality - closes [issue #50](https://github.com/j4mie/idiorm/issues/50) +* Add `is_new` method - closes [issue #85](https://github.com/j4mie/idiorm/issues/85) +* Add `ArrayAccess` support to the model instances allowing property access via `$model['field']` as well as `$model->field` - [issue #51](https://github.com/j4mie/idiorm/issues/51) +* Add a result set object for collections of models that can support method chains to filter or apply actions to multiple results at once - issue [#51](https://github.com/j4mie/idiorm/issues/51) and [#22](https://github.com/j4mie/idiorm/issues/22) +* Add support for [Firebird](http://www.firebirdsql.org) with `ROWS` and `TO` result set limiting and identifier quoting [[mapner](https://github.com/mapner)] - [issue #98](https://github.com/j4mie/idiorm/issues/98) +* Fix last insert ID for PostgreSQL using RETURNING - closes issues [#62](https://github.com/j4mie/idiorm/issues/62) and [#89](https://github.com/j4mie/idiorm/issues/89) [[laacz](https://github.com/laacz)] +* Reset Idiorm after performing a query to allow for calling `count()` and then `find_many()` [[fayland](https://github.com/fayland)] - [issue #97](https://github.com/j4mie/idiorm/issues/97) +* Change Composer to use a classmap so that autoloading is better supported [[javierd](https://github.com/javiervd)] - [issue #96](https://github.com/j4mie/idiorm/issues/96) +* Add query logging to `delete_many` [[tag](https://github.com/tag)] +* Fix when using `set_expr` alone it doesn't trigger query creation - closes [issue #90](https://github.com/j4mie/idiorm/issues/90) +* Escape quote symbols in "_quote_identifier_part" - close [issue #74](https://github.com/j4mie/idiorm/issues/74) +* Fix issue with aggregate functions always returning `int` when is `float` sometimes required - closes [issue #92](https://github.com/j4mie/idiorm/issues/92) +* Move testing into PHPUnit to unify method testing and query generation testing + +#### 1.2.3 - released 2012-11-28 + +* Fix [issue #78](https://github.com/j4mie/idiorm/issues/78) - remove use of PHP 5.3 static call + +#### 1.2.2 - released 2012-11-15 + +* Fix bug where input parameters were sent as part-indexed, part associative + +#### 1.2.1 - released 2012-11-15 + +* Fix minor bug caused by IdiormStringException not extending Exception + +#### 1.2.0 - released 2012-11-14 + +* Setup composer for installation via packagist (j4mie/idiorm) +* Add `order_by_expr` method [[sandermarechal](http://github.com/sandermarechal)] +* Add support for raw queries without parameters argument [[sandermarechal](http://github.com/sandermarechal)] +* Add support to set multiple properties at once by passing an associative array to `set` method [[sandermarechal](http://github.com/sandermarechal)] +* Allow an associative array to be passed to `configure` method [[jordanlev](http://github.com/jordanlev)] +* Patch to allow empty Paris models to be saved ([[j4mie/paris](http://github.com/j4mie/paris)]) - [issue #58](https://github.com/j4mie/idiorm/issues/58) +* Add `select_many` and `select_many_expr` - closing issues [#49](https://github.com/j4mie/idiorm/issues/49) and [#69](https://github.com/j4mie/idiorm/issues/69) +* Add support for `MIN`, `AVG`, `MAX` and `SUM` - closes [issue #16](https://github.com/j4mie/idiorm/issues/16) +* Add `group_by_expr` - closes [issue #24](https://github.com/j4mie/idiorm/issues/24) +* Add `set_expr` to allow database expressions to be set as ORM properties - closes issues [#59](https://github.com/j4mie/idiorm/issues/59) and [#43](https://github.com/j4mie/idiorm/issues/43) [[brianherbert](https://github.com/brianherbert)] +* Prevent ambiguous column names when joining tables - [issue #66](https://github.com/j4mie/idiorm/issues/66) [[hellogerard](https://github.com/hellogerard)] +* Add `delete_many` method [[CBeerta](https://github.com/CBeerta)] +* Allow unsetting of ORM parameters [[CBeerta](https://github.com/CBeerta)] +* Add `find_array` to get the records as associative arrays [[Surt](https://github.com/Surt)] - closes [issue #17](https://github.com/j4mie/idiorm/issues/17) +* Fix bug in `_log_query` with `?` and `%` supplied in raw where statements etc. - closes [issue #57](https://github.com/j4mie/idiorm/issues/57) [[ridgerunner](https://github.com/ridgerunner)] + +#### 1.1.1 - released 2011-01-30 + +* Fix bug in quoting column wildcard. j4mie/paris#12 +* Small documentation improvements + +#### 1.1.0 - released 2011-01-24 + +* Add `is_dirty` method +* Add basic query caching +* Add `distinct` method +* Add `group_by` method + +#### 1.0.0 - released 2010-12-01 + +* Initial release diff --git a/vendor/j4mie/idiorm/composer.json b/vendor/j4mie/idiorm/composer.json new file mode 100644 index 000000000..8e19087ba --- /dev/null +++ b/vendor/j4mie/idiorm/composer.json @@ -0,0 +1,49 @@ +{ + "name": "j4mie/idiorm", + "type": "library", + "description": "A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5", + "keywords": ["idiorm", "orm", "query builder"], + "homepage": "http://j4mie.github.com/idiormandparis", + "support": { + "issues": "https://github.com/j4mie/idiorm/issues", + "source": "https://github.com/j4mie/idiorm" + }, + "authors": [ + { + "name": "Jamie Matthews", + "email": "[email protected]", + "homepage": "http://j4mie.org", + "role": "Developer" + }, + { + "name": "Simon Holywell", + "email": "[email protected]", + "homepage": "http://simonholywell.com", + "role": "Maintainer" + }, + { + "name": "Durham Hale", + "email": "[email protected]", + "homepage": "http://durhamhale.com", + "role": "Maintainer" + } + ], + "scripts": { + "test": "phpunit -c ./phpunit.xml" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "ext-pdo_sqlite": "*" + }, + "license": [ + "BSD-2-Clause", + "BSD-3-Clause", + "BSD-4-Clause" + ], + "require": { + "php": ">=5.2.0" + }, + "autoload": { + "classmap": ["idiorm.php"] + } +} diff --git a/vendor/j4mie/idiorm/demo.php b/vendor/j4mie/idiorm/demo.php new file mode 100644 index 000000000..771f48a2e --- /dev/null +++ b/vendor/j4mie/idiorm/demo.php @@ -0,0 +1,81 @@ +<?php + + // ------------------- // + // --- Idiorm Demo --- // + // ------------------- // + + // Note: This is just about the simplest database-driven webapp it's possible to create + // and is designed only for the purpose of demonstrating how Idiorm works. + + // In case it's not obvious: this is not the correct way to build web applications! + + // Require the idiorm file + require_once("idiorm.php"); + + // Connect to the demo database file + ORM::configure('sqlite:./demo.sqlite'); + + // This grabs the raw database connection from the ORM + // class and creates the table if it doesn't already exist. + // Wouldn't normally be needed if the table is already there. + $db = ORM::get_db(); + $db->exec(" + CREATE TABLE IF NOT EXISTS contact ( + id INTEGER PRIMARY KEY, + name TEXT, + email TEXT + );" + ); + + // Handle POST submission + if (!empty($_POST)) { + + // Create a new contact object + $contact = ORM::for_table('contact')->create(); + + // SHOULD BE MORE ERROR CHECKING HERE! + + // Set the properties of the object + $contact->name = $_POST['name']; + $contact->email = $_POST['email']; + + // Save the object to the database + $contact->save(); + + // Redirect to self. + header('Location: ' . basename(__FILE__)); + exit; + } + + // Get a list of all contacts from the database + $count = ORM::for_table('contact')->count(); + $contact_list = ORM::for_table('contact')->find_many(); +?> + +<html> + <head> + <title>Idiorm Demo</title> + </head> + + <body> + + <h1>Idiorm Demo</h1> + + <h2>Contact List (<?php echo $count; ?> contacts)</h2> + <ul> + <?php foreach ($contact_list as $contact): ?> + <li> + <strong><?php echo $contact->name ?></strong> + <a href="mailto:<?php echo $contact->email; ?>"><?php echo $contact->email; ?></a> + </li> + <?php endforeach; ?> + </ul> + + <form method="post" action=""> + <h2>Add Contact</h2> + <p><label for="name">Name:</label> <input type="text" name="name" /></p> + <p><label for="email">Email:</label> <input type="email" name="email" /></p> + <input type="submit" value="Create" /> + </form> + </body> +</html> diff --git a/vendor/j4mie/idiorm/docs/Makefile b/vendor/j4mie/idiorm/docs/Makefile new file mode 100644 index 000000000..4dbea877c --- /dev/null +++ b/vendor/j4mie/idiorm/docs/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Idiorm.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Idiorm.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/Idiorm" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Idiorm" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/vendor/j4mie/idiorm/docs/conf.py b/vendor/j4mie/idiorm/docs/conf.py new file mode 100644 index 000000000..87e17925f --- /dev/null +++ b/vendor/j4mie/idiorm/docs/conf.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +# +# Idiorm documentation build configuration file, created by +# sphinx-quickstart on Wed Nov 28 15:39:16 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Idiorm' +copyright = u'2014, Jamie Matthews and Simon Holywell' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '' +# The full version, including alpha/beta/rc tags. +release = '' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Idiormdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'Idiorm.tex', u'Idiorm Documentation', + u'Jamie Matthews and Simon Holywell', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'idiorm', u'Idiorm Documentation', + [u'Jamie Matthews and Simon Holywell'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'Idiorm', u'Idiorm Documentation', + u'Jamie Matthews and Simon Holywell', 'Idiorm', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' diff --git a/vendor/j4mie/idiorm/docs/configuration.rst b/vendor/j4mie/idiorm/docs/configuration.rst new file mode 100644 index 000000000..fb90dfa0f --- /dev/null +++ b/vendor/j4mie/idiorm/docs/configuration.rst @@ -0,0 +1,378 @@ +Configuration +============= + +The first thing you need to know about Idiorm is that *you don’t need to +define any model classes to use it*. With almost every other ORM, the +first thing to do is set up your models and map them to database tables +(through configuration variables, XML files or similar). With Idiorm, +you can start using the ORM straight away. + +Setup +~~~~~ + +First, ``require`` the Idiorm source file: + +.. code-block:: php + + <?php + require_once 'idiorm.php'; + +Then, pass a *Data Source Name* connection string to the ``configure`` +method of the ORM class. This is used by PDO to connect to your +database. For more information, see the `PDO documentation`_. + +.. code-block:: php + + <?php + ORM::configure('sqlite:./example.db'); + +You may also need to pass a username and password to your database +driver, using the ``username`` and ``password`` configuration options. +For example, if you are using MySQL: + +.. code-block:: php + + <?php + ORM::configure('mysql:host=localhost;dbname=my_database'); + ORM::configure('username', 'database_user'); + ORM::configure('password', 'top_secret'); + +Also see “Configuration” section below. + +Configuration +~~~~~~~~~~~~~ + +Other than setting the DSN string for the database connection (see +above), the ``configure`` method can be used to set some other simple +options on the ORM class. Modifying settings involves passing a +key/value pair to the ``configure`` method, representing the setting you +wish to modify and the value you wish to set it to. + +.. code-block:: php + + <?php + ORM::configure('setting_name', 'value_for_setting'); + +A shortcut is provided to allow passing multiple key/value pairs at +once. + +.. code-block:: php + + <?php + ORM::configure(array( + 'setting_name_1' => 'value_for_setting_1', + 'setting_name_2' => 'value_for_setting_2', + 'etc' => 'etc' + )); + +Use the ``get_config`` method to read current settings. + +.. code-block:: php + + <?php + $isLoggingEnabled = ORM::get_config('logging'); + ORM::configure('logging', false); + // some crazy loop we don't want to log + ORM::configure('logging', $isLoggingEnabled); + +Database authentication details +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Settings: ``username`` and ``password`` + +Some database adapters (such as MySQL) require a username and password +to be supplied separately to the DSN string. These settings allow you to +provide these values. A typical MySQL connection setup might look like +this: + +.. code-block:: php + + <?php + ORM::configure('mysql:host=localhost;dbname=my_database'); + ORM::configure('username', 'database_user'); + ORM::configure('password', 'top_secret'); + +Or you can combine the connection setup into a single line using the +configuration array shortcut: + +.. code-block:: php + + <?php + ORM::configure(array( + 'connection_string' => 'mysql:host=localhost;dbname=my_database', + 'username' => 'database_user', + 'password' => 'top_secret' + )); + +Result sets +^^^^^^^^^^^ + +Setting: ``return_result_sets`` + +Collections of results can be returned as an array (default) or as a result set. +See the `find_result_set()` documentation for more information. + +.. code-block:: php + + <?php + ORM::configure('return_result_sets', true); // returns result sets + + +.. note:: + + It is recommended that you setup your projects to use result sets as they + are more flexible. + +PDO Driver Options +^^^^^^^^^^^^^^^^^^ + +Setting: ``driver_options`` + +Some database adapters require (or allow) an array of driver-specific +configuration options. This setting allows you to pass these options +through to the PDO constructor. For more information, see `the PDO +documentation`_. For example, to force the MySQL driver to use UTF-8 for +the connection: + +.. code-block:: php + + <?php + ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); + +PDO Error Mode +^^^^^^^^^^^^^^ + +Setting: ``error_mode`` + +This can be used to set the ``PDO::ATTR_ERRMODE`` setting on the +database connection class used by Idiorm. It should be passed one of the +class constants defined by PDO. For example: + +.. code-block:: php + + <?php + ORM::configure('error_mode', PDO::ERRMODE_WARNING); + +The default setting is ``PDO::ERRMODE_EXCEPTION``. For full details of +the error modes available, see `the PDO set attribute documentation`_. + +PDO object access +^^^^^^^^^^^^^^^^^ + +Should it ever be necessary, the PDO object used by Idiorm may be +accessed directly through ``ORM::get_db()``, or set directly via +``ORM::set_db()``. This should be an unusual occurance. + +After a statement has been executed by any means, such as ``::save()`` +or ``::raw_execute()``, the ``PDOStatement`` instance used may be +accessed via ``ORM::get_last_statement()``. This may be useful in order +to access ``PDOStatement::errorCode()``, if PDO exceptions are turned +off, or to access the ``PDOStatement::rowCount()`` method, which returns +differing results based on the underlying database. For more +information, see the `PDOStatement documentation`_. + +Identifier quote character +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Setting: ``identifier_quote_character`` + +Set the character used to quote identifiers (eg table name, column +name). If this is not set, it will be autodetected based on the database +driver being used by PDO. + +ID Column +^^^^^^^^^ + +By default, the ORM assumes that all your tables have a primary key +column called ``id``. There are two ways to override this: for all +tables in the database, or on a per-table basis. + +Setting: ``id_column`` + +This setting is used to configure the name of the primary key column for +all tables. If your ID column is called ``primary_key``, use: + +.. code-block:: php + + <?php + ORM::configure('id_column', 'primary_key'); + +You can specify a compound primary key using an array: + +.. code-block:: php + + <?php + ORM::configure('id_column', array('pk_1', 'pk_2')); + +Note: If you use a auto-increment column in the compound primary key then it +should be the first one defined into the array. + +Setting: ``id_column_overrides`` + +This setting is used to specify the primary key column name for each +table separately. It takes an associative array mapping table names to +column names. If, for example, your ID column names include the name of +the table, you can use the following configuration: + +.. code-block:: php + + <?php + ORM::configure('id_column_overrides', array( + 'person' => 'person_id', + 'role' => 'role_id', + )); + +As with ``id_column`` setting, you can specify a compound primary key +using an array. + +Limit clause style +^^^^^^^^^^^^^^^^^^ + +Setting: ``limit_clause_style`` + +You can specify the limit clause style in the configuration. This is to facilitate +a MS SQL style limit clause that uses the ``TOP`` syntax. + +Acceptable values are ``ORM::LIMIT_STYLE_TOP_N`` and ``ORM::LIMIT_STYLE_LIMIT``. + +.. note:: + + If the PDO driver you are using is one of sqlsrv, dblib or mssql then Idiorm + will automatically select the ``ORM::LIMIT_STYLE_TOP_N`` for you unless you + override the setting. + +Query logging +^^^^^^^^^^^^^ + +Setting: ``logging`` + +Idiorm can log all queries it executes. To enable query logging, set the +``logging`` option to ``true`` (it is ``false`` by default). + +When query logging is enabled, you can use two static methods to access +the log. ``ORM::get_last_query()`` returns the most recent query +executed. ``ORM::get_query_log()`` returns an array of all queries +executed. + +.. note:: + + The code that does the query log is an approximation of that provided by PDO/the + database (see the Idiorm source code for detail). The actual query isn't even available + to idiorm to log as the database/PDO handles the binding outside of idiorm's reach and + doesn't pass it back. + + This means that you might come across some inconsistencies between what is logged and + what is actually run. In these case you'll need to look at the query log provided by + your database vendor (eg. MySQL). + +Query logger +^^^^^^^^^^^^ + +Setting: ``logger`` + +.. note:: + + You must enable ``logging`` for this setting to have any effect. + +It is possible to supply a ``callable`` to this configuration setting, which will +be executed for every query that idiorm executes. In PHP a ``callable`` is anything +that can be executed as if it were a function. Most commonly this will take the +form of a anonymous function. + +This setting is useful if you wish to log queries with an external library as it +allows you too whatever you would like from inside the callback function. + +.. code-block:: php + + <?php + ORM::configure('logger', function($log_string, $query_time) { + echo $log_string . ' in ' . $query_time; + }); + +Query caching +^^^^^^^^^^^^^ + +Setting: ``caching`` + +Idiorm can cache the queries it executes during a request. To enable +query caching, set the ``caching`` option to ``true`` (it is ``false`` +by default). + +.. code-block:: php + + <?php + ORM::configure('caching', true); + + +Setting: ``caching_auto_clear`` + +Idiorm's cache is never cleared by default. If you wish to automatically clear it on save, set ``caching_auto_clear`` to ``true`` + +.. code-block:: php + + <?php + ORM::configure('caching_auto_clear', true); + +When query caching is enabled, Idiorm will cache the results of every +``SELECT`` query it executes. If Idiorm encounters a query that has +already been run, it will fetch the results directly from its cache and +not perform a database query. + +Warnings and gotchas +'''''''''''''''''''' + +- Note that this is an in-memory cache that only persists data for the + duration of a single request. This is *not* a replacement for a + persistent cache such as `Memcached`_. + +- Idiorm’s cache is very simple, and does not attempt to invalidate + itself when data changes. This means that if you run a query to + retrieve some data, modify and save it, and then run the same query + again, the results will be stale (ie, they will not reflect your + modifications). This could potentially cause subtle bugs in your + application. If you have caching enabled and you are experiencing odd + behaviour, disable it and try again. If you do need to perform such + operations but still wish to use the cache, you can call the + ``ORM::clear_cache()`` to clear all existing cached queries. + +- Enabling the cache will increase the memory usage of your + application, as all database rows that are fetched during each + request are held in memory. If you are working with large quantities + of data, you may wish to disable the cache. + +Custom caching +'''''''''''''' + +If you wish to use custom caching functions, you can set them from the configure options. + +.. code-block:: php + + <?php + $my_cache = array(); + ORM::configure('cache_query_result', function ($cache_key, $value, $table_name, $connection_name) use (&$my_cache) { + $my_cache[$cache_key] = $value; + }); + ORM::configure('check_query_cache', function ($cache_key, $table_name, $connection_name) use (&$my_cache) { + if(isset($my_cache[$cache_key])){ + return $my_cache[$cache_key]; + } else { + return false; + } + }); + ORM::configure('clear_cache', function ($table_name, $connection_name) use (&$my_cache) { + $my_cache = array(); + }); + + ORM::configure('create_cache_key', function ($query, $parameters, $table_name, $connection_name) { + $parameter_string = join(',', $parameters); + $key = $query . ':' . $parameter_string; + $my_key = 'my-prefix'.crc32($key); + return $my_key; + }); + + +.. _PDO documentation: http://php.net/manual/en/pdo.construct.php +.. _the PDO documentation: http://php.net/manual/en/pdo.construct.php +.. _the PDO set attribute documentation: http://php.net/manual/en/pdo.setattribute.php +.. _PDOStatement documentation: http://php.net/manual/en/class.pdostatement.php +.. _Memcached: http://www.memcached.org/ diff --git a/vendor/j4mie/idiorm/docs/connections.rst b/vendor/j4mie/idiorm/docs/connections.rst new file mode 100644 index 000000000..20fb08f0e --- /dev/null +++ b/vendor/j4mie/idiorm/docs/connections.rst @@ -0,0 +1,80 @@ +Multiple Connections +==================== +Idiorm now works with multiple conections. Most of the static functions +work with an optional connection name as an extra parameter. For the +``ORM::configure`` method, this means that when passing connection +strings for a new connection, the second parameter, which is typically +omitted, should be ``null``. In all cases, if a connection name is not +provided, it defaults to ``ORM::DEFAULT_CONNECTION``. + +When chaining, once ``for_table()`` has been used in the chain, remaining +calls in the chain use the correct connection. + +.. code-block:: php + + <?php + // Default connection + ORM::configure('sqlite:./example.db'); + + // A named connection, where 'remote' is an arbitrary key name + ORM::configure('mysql:host=localhost;dbname=my_database', null, 'remote'); + ORM::configure('username', 'database_user', 'remote'); + ORM::configure('password', 'top_secret', 'remote'); + + // Using default connection + $person = ORM::for_table('person')->find_one(5); + + // Using default connection, explicitly + $person = ORM::for_table('person', ORM::DEFAULT_CONNECTION)->find_one(5); + + // Using named connection + $person = ORM::for_table('different_person', 'remote')->find_one(5); + + + +Supported Methods +^^^^^^^^^^^^^^^^^ +In each of these cases, the ``$connection_name`` parameter is optional, and is +an arbitrary key identifying the named connection. + +* ``ORM::configure($key, $value, $connection_name)`` +* ``ORM::for_table($table_name, $connection_name)`` +* ``ORM::set_db($pdo, $connection_name)`` +* ``ORM::get_db($connection_name)`` +* ``ORM::raw_execute($query, $parameters, $connection_name)`` +* ``ORM::get_last_query($connection_name)`` +* ``ORM::get_query_log($connection_name)`` + +Of these methods, only ``ORM::get_last_query($connection_name)`` does *not* +fallback to the default connection when no connection name is passed. +Instead, passing no connection name (or ``null``) returns the most recent +query on *any* connection. + +.. code-block:: php + + <?php + // Using default connection, explicitly + $person = ORM::for_table('person')->find_one(5); + + // Using named connection + $person = ORM::for_table('different_person', 'remote')->find_one(5); + + // Last query on *any* connection + ORM::get_last_query(); // returns query on 'different_person' using 'remote' + + // returns query on 'person' using default by passing in the connection name + ORM::get_last_query(ORM::DEFAULT_CONNECTION); + +Notes +~~~~~ +* **There is no support for joins across connections** +* Multiple connections do not share configuration settings. This means if + one connection has logging set to ``true`` and the other does not, only + queries from the logged connection will be available via + ``ORM::get_last_query()`` and ``ORM::get_query_log()``. +* A new method has been added, ``ORM::get_connection_names()``, which returns + an array of connection names. +* Caching *should* work with multiple connections (remember to turn caching + on for each connection), but the unit tests are not robust. Please report + any errors. + diff --git a/vendor/j4mie/idiorm/docs/index.rst b/vendor/j4mie/idiorm/docs/index.rst new file mode 100644 index 000000000..d4e4bb97b --- /dev/null +++ b/vendor/j4mie/idiorm/docs/index.rst @@ -0,0 +1,29 @@ +.. Idiorm documentation master file, created by + sphinx-quickstart on Wed Nov 28 15:39:16 2012. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Idiorm's documentation! +================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + + philosophy + installation + configuration + querying + models + transactions + connections + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/vendor/j4mie/idiorm/docs/installation.rst b/vendor/j4mie/idiorm/docs/installation.rst new file mode 100644 index 000000000..255ea62a8 --- /dev/null +++ b/vendor/j4mie/idiorm/docs/installation.rst @@ -0,0 +1,19 @@ +Installation +============ + +Packagist +~~~~~~~~~ + +This library is available through Packagist with the vendor and package +identifier of ``j4mie/idiorm`` + +Please see the `Packagist documentation`_ for further information. + +Download +~~~~~~~~ + +You can clone the git repository, download idiorm.php or a release tag +and then drop the idiorm.php file in the vendors/3rd party/libs +directory of your project. + +.. _Packagist documentation: http://packagist.org/
\ No newline at end of file diff --git a/vendor/j4mie/idiorm/docs/make.bat b/vendor/j4mie/idiorm/docs/make.bat new file mode 100644 index 000000000..c09073569 --- /dev/null +++ b/vendor/j4mie/idiorm/docs/make.bat @@ -0,0 +1,190 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^<target^>` where ^<target^> is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Idiorm.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Idiorm.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end diff --git a/vendor/j4mie/idiorm/docs/models.rst b/vendor/j4mie/idiorm/docs/models.rst new file mode 100644 index 000000000..d72e27d7d --- /dev/null +++ b/vendor/j4mie/idiorm/docs/models.rst @@ -0,0 +1,161 @@ +Models +====== + +Getting data from objects +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Once you've got a set of records (objects) back from a query, you can +access properties on those objects (the values stored in the columns in +its corresponding table) in two ways: by using the ``get`` method, or +simply by accessing the property on the object directly: + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->find_one(5); + + // The following two forms are equivalent + $name = $person->get('name'); + $name = $person->name; + +You can also get the all the data wrapped by an ORM instance using the +``as_array`` method. This will return an associative array mapping +column names (keys) to their values. + +The ``as_array`` method takes column names as optional arguments. If one +or more of these arguments is supplied, only matching column names will +be returned. + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->create(); + + $person->first_name = 'Fred'; + $person->surname = 'Bloggs'; + $person->age = 50; + + // Returns array('first_name' => 'Fred', 'surname' => 'Bloggs', 'age' => 50) + $data = $person->as_array(); + + // Returns array('first_name' => 'Fred', 'age' => 50) + $data = $person->as_array('first_name', 'age'); + +Updating records +~~~~~~~~~~~~~~~~ + +To update the database, change one or more of the properties of the +object, then call the ``save`` method to commit the changes to the +database. Again, you can change the values of the object's properties +either by using the ``set`` method or by setting the value of the +property directly. By using the ``set`` method it is also possible to +update multiple properties at once, by passing in an associative array: + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->find_one(5); + + // The following two forms are equivalent + $person->set('name', 'Bob Smith'); + $person->age = 20; + + // This is equivalent to the above two assignments + $person->set(array( + 'name' => 'Bob Smith', + 'age' => 20 + )); + + // Syncronise the object with the database + $person->save(); + +Properties containing expressions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is possible to set properties on the model that contain database +expressions using the ``set_expr`` method. + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->find_one(5); + $person->set('name', 'Bob Smith'); + $person->age = 20; + $person->set_expr('updated', 'NOW()'); + $person->save(); + +The ``updated`` column's value will be inserted into query in its raw +form therefore allowing the database to execute any functions referenced +- such as ``NOW()`` in this case. + +Creating new records +~~~~~~~~~~~~~~~~~~~~ + +To add a new record, you need to first create an "empty" object +instance. You then set values on the object as normal, and save it. + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->create(); + + $person->name = 'Joe Bloggs'; + $person->age = 40; + + $person->save(); + +After the object has been saved, you can call its ``id()`` method to +find the autogenerated primary key value that the database assigned to +it. + +Properties containing expressions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is possible to set properties on the model that contain database +expressions using the ``set_expr`` method. + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->create(); + $person->set('name', 'Bob Smith'); + $person->age = 20; + $person->set_expr('added', 'NOW()'); + $person->save(); + +The ``added`` column's value will be inserted into query in its raw form +therefore allowing the database to execute any functions referenced - +such as ``NOW()`` in this case. + +Checking whether a property has been modified +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To check whether a property has been changed since the object was +created (or last saved), call the ``is_dirty`` method: + +.. code-block:: php + + <?php + $name_has_changed = $person->is_dirty('name'); // Returns true or false + +Deleting records +~~~~~~~~~~~~~~~~ + +To delete an object from the database, simply call its ``delete`` +method. + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->find_one(5); + $person->delete(); + +To delete more than one object from the database, build a query: + +.. code-block:: php + + <?php + $person = ORM::for_table('person') + ->where_equal('zipcode', 55555) + ->delete_many(); + diff --git a/vendor/j4mie/idiorm/docs/philosophy.rst b/vendor/j4mie/idiorm/docs/philosophy.rst new file mode 100644 index 000000000..a11d4210f --- /dev/null +++ b/vendor/j4mie/idiorm/docs/philosophy.rst @@ -0,0 +1,34 @@ +Philosophy +========== + +The `Pareto Principle`_ states that *roughly 80% of the effects come +from 20% of the causes.* In software development terms, this could be +translated into something along the lines of *80% of the results come +from 20% of the complexity*. In other words, you can get pretty far by +being pretty stupid. + +**Idiorm is deliberately simple**. Where other ORMs consist of dozens of +classes with complex inheritance hierarchies, Idiorm has only one class, +``ORM``, which functions as both a fluent ``SELECT`` query API and a +simple CRUD model class. If my hunch is correct, this should be quite +enough for many real-world applications. Let’s face it: most of us +aren’t building Facebook. We’re working on small-to-medium-sized +projects, where the emphasis is on simplicity and rapid development +rather than infinite flexibility and features. + +You might think of **Idiorm** as a *micro-ORM*. It could, perhaps, be +“the tie to go along with `Slim`_\ ’s tux” (to borrow a turn of phrase +from `DocumentCloud`_). Or it could be an effective bit of spring +cleaning for one of those horrendous SQL-littered legacy PHP apps you +have to support. + +**Idiorm** might also provide a good base upon which to build +higher-level, more complex database abstractions. For example, `Paris`_ +is an implementation of the `Active Record pattern`_ built on top of +Idiorm. + +.. _Pareto Principle: http://en.wikipedia.org/wiki/Pareto_principle +.. _Slim: http://github.com/codeguy/slim/ +.. _DocumentCloud: http://github.com/documentcloud/underscore +.. _Paris: http://github.com/j4mie/paris +.. _Active Record pattern: http://martinfowler.com/eaaCatalog/activeRecord.html
\ No newline at end of file diff --git a/vendor/j4mie/idiorm/docs/querying.rst b/vendor/j4mie/idiorm/docs/querying.rst new file mode 100644 index 000000000..1ea5a2549 --- /dev/null +++ b/vendor/j4mie/idiorm/docs/querying.rst @@ -0,0 +1,896 @@ +Querying +======== + +Idiorm provides a `*fluent +interface* <http://en.wikipedia.org/wiki/Fluent_interface>`_ to enable +simple queries to be built without writing a single character of SQL. If +you've used `jQuery <http://jquery.com>`_ at all, you'll be familiar +with the concept of a fluent interface. It just means that you can +*chain* method calls together, one after another. This can make your +code more readable, as the method calls strung together in order can +start to look a bit like a sentence. + +All Idiorm queries start with a call to the ``for_table`` static method +on the ORM class. This tells the ORM which table to use when making the +query. + +*Note that this method **does not** escape its query parameter and so +the table name should **not** be passed directly from user input.* + +Method calls which add filters and constraints to your query are then +strung together. Finally, the chain is finished by calling either +``find_one()`` or ``find_many()``, which executes the query and returns +the result. + +Let's start with a simple example. Say we have a table called ``person`` +which contains the columns ``id`` (the primary key of the record - +Idiorm assumes the primary key column is called ``id`` but this is +configurable, see below), ``name``, ``age`` and ``gender``. + +A note on PSR-1 and camelCase +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +All the methods detailed in the documentation can also be called in a PSR-1 way: +underscores (_) become camelCase. Here follows an example of one query chain +being converted to a PSR-1 compliant style. + +.. code-block:: php + + <?php + // documented and default style + $person = ORM::for_table('person')->where('name', 'Fred Bloggs')->find_one(); + + // PSR-1 compliant style + $person = ORM::forTable('person')->where('name', 'Fred Bloggs')->findOne(); + +As you can see any method can be changed from the documented underscore (_) format +to that of a camelCase method name. + +.. note:: + + In the background the PSR-1 compliant style uses the `__call()` and + `__callStatic()` magic methods to map the camelCase method name you supply + to the original underscore method name. It then uses `call_user_func_array()` + to apply the arguments to the method. If this minimal overhead is too great + then you can simply revert to using the underscore methods to avoid it. In + general this will not be a bottle neck in any application however and should + be considered a micro-optimisation. + + As `__callStatic()` was added in PHP 5.3.0 you will need at least that version + of PHP to use this feature in any meaningful way. + +Single records +^^^^^^^^^^^^^^ + +Any method chain that ends in ``find_one()`` will return either a +*single* instance of the ORM class representing the database row you +requested, or ``false`` if no matching record was found. + +To find a single record where the ``name`` column has the value "Fred +Bloggs": + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->where('name', 'Fred Bloggs')->find_one(); + +This roughly translates into the following SQL: +``SELECT * FROM person WHERE name = "Fred Bloggs"`` + +To find a single record by ID, you can pass the ID directly to the +``find_one`` method: + +.. code-block:: php + + <?php + $person = ORM::for_table('person')->find_one(5); + +If you are using a compound primary key, you can find the records +using an array as the parameter: + +.. code-block:: php + + <?php + $person = ORM::for_table('user_role')->find_one(array( + 'user_id' => 34, + 'role_id' => 10 + )); + + +Multiple records +^^^^^^^^^^^^^^^^ + +.. note:: + + It is recommended that you use results sets over arrays - see `As a result set` + below. + +Any method chain that ends in ``find_many()`` will return an *array* of +ORM class instances, one for each row matched by your query. If no rows +were found, an empty array will be returned. + +To find all records in the table: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->find_many(); + +To find all records where the ``gender`` is ``female``: + +.. code-block:: php + + <?php + $females = ORM::for_table('person')->where('gender', 'female')->find_many(); + +As a result set +''''''''''''''' + +.. note:: + + There is a configuration setting ``return_result_sets`` that will cause + ``find_many()`` to return result sets by default. It is recommended that you + turn this setting on: + + :: + + ORM::configure('return_result_sets', true); + +You can also find many records as a result set instead of an array of Idiorm +instances. This gives you the advantage that you can run batch operations on a +set of results. + +So for example instead of running this: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->find_many(); + foreach ($people as $person) { + $person->age = 50; + $person->save(); + } + +You can simply do this instead: + +.. code-block:: php + + <?php + ORM::for_table('person')->find_result_set() + ->set('age', 50) + ->save(); + +To do this substitute any call to ``find_many()`` with +``find_result_set()``. + +A result set will also behave like an array so you can `count()` it and `foreach` +over it just like an array. + +.. code-block:: php + + <?php + foreach(ORM::for_table('person')->find_result_set() as $record) { + echo $record->name; + } + +.. code-block:: php + + <?php + echo count(ORM::for_table('person')->find_result_set()); + +.. note:: + + For deleting many records it is recommended that you use `delete_many()` as it + is more efficient than calling `delete()` on a result set. + +As an associative array +''''''''''''''''''''''' + +You can also find many records as an associative array instead of Idiorm +instances. To do this substitute any call to ``find_many()`` with +``find_array()``. + +.. code-block:: php + + <?php + $females = ORM::for_table('person')->where('gender', 'female')->find_array(); + +This is useful if you need to serialise the the query output into a +format like JSON and you do not need the ability to update the returned +records. + +Counting results +^^^^^^^^^^^^^^^^ + +To return a count of the number of rows that would be returned by a +query, call the ``count()`` method. + +.. code-block:: php + + <?php + $number_of_people = ORM::for_table('person')->count(); + +Filtering results +^^^^^^^^^^^^^^^^^ + +Idiorm provides a family of methods to extract only records which +satisfy some condition or conditions. These methods may be called +multiple times to build up your query, and Idiorm's fluent interface +allows method calls to be *chained* to create readable and +simple-to-understand queries. + +*Caveats* +''''''''' + +Only a subset of the available conditions supported by SQL are available +when using Idiorm. Additionally, all the ``WHERE`` clauses will be +``AND``\ ed together when the query is run. Support for ``OR``\ ing +``WHERE`` clauses is not currently present. + +These limits are deliberate: these are by far the most commonly used +criteria, and by avoiding support for very complex queries, the Idiorm +codebase can remain small and simple. + +Some support for more complex conditions and queries is provided by the +``where_raw`` and ``raw_query`` methods (see below). If you find +yourself regularly requiring more functionality than Idiorm can provide, +it may be time to consider using a more full-featured ORM. + +Equality: ``where``, ``where_equal``, ``where_not_equal`` +''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +By default, calling ``where`` with two parameters (the column name and +the value) will combine them using an equals operator (``=``). For +example, calling ``where('name', 'Fred')`` will result in the clause +``WHERE name = "Fred"``. + +If your coding style favours clarity over brevity, you may prefer to use +the ``where_equal`` method: this is identical to ``where``. + +The ``where_not_equal`` method adds a ``WHERE column != "value"`` clause +to your query. + +You can specify multiple columns and their values in the same call. In this +case you should pass an associative array as the first parameter. The array +notation uses keys as column names. + +.. code-block:: php + + <?php + $people = ORM::for_table('person') + ->where(array( + 'name' => 'Fred', + 'age' => 20 + )) + ->find_many(); + + // Creates SQL: + SELECT * FROM `person` WHERE `name` = "Fred" AND `age` = "20"; + +Shortcut: ``where_id_is`` +''''''''''''''''''''''''' + +This is a simple helper method to query the table by primary key. +Respects the ID column specified in the config. If you are using a compound +primary key, you must pass an array where the key is the column name. Columns +that don't belong to the key will be ignored. + +Shortcut: ``where_id_in`` +''''''''''''''''''''''''' + +This helper method is similar to ``where_id_is`, but it expects an array of +primary keys to be selected. It is compound primary keys aware. + +Less than / greater than: ``where_lt``, ``where_gt``, ``where_lte``, ``where_gte`` +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +There are four methods available for inequalities: + +- Less than: + ``$people = ORM::for_table('person')->where_lt('age', 10)->find_many();`` +- Greater than: + ``$people = ORM::for_table('person')->where_gt('age', 5)->find_many();`` +- Less than or equal: + ``$people = ORM::for_table('person')->where_lte('age', 10)->find_many();`` +- Greater than or equal: + ``$people = ORM::for_table('person')->where_gte('age', 5)->find_many();`` + +String comparision: ``where_like`` and ``where_not_like`` +''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +To add a ``WHERE ... LIKE`` clause, use: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->where_like('name', '%fred%')->find_many(); + +Similarly, to add a ``WHERE ... NOT LIKE`` clause, use: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->where_not_like('name', '%bob%')->find_many(); + +Multiple OR'ed conditions +''''''''''''''''''''''''' + +You can add simple OR'ed conditions to the same WHERE clause using ``where_any_is``. You +should specify multiple conditions using an array of items. Each item will be an +associative array that contains a multiple conditions. + +.. code-block:: php + + <?php + $people = ORM::for_table('person') + ->where_any_is(array( + array('name' => 'Joe', 'age' => 10), + array('name' => 'Fred', 'age' => 20))) + ->find_many(); + + // Creates SQL: + SELECT * FROM `widget` WHERE (( `name` = 'Joe' AND `age` = '10' ) OR ( `name` = 'Fred' AND `age` = '20' )); + +By default, it uses the equal operator for every column, but it can be overriden for any +column using a second parameter: + +.. code-block:: php + + <?php + $people = ORM::for_table('person') + ->where_any_is(array( + array('name' => 'Joe', 'age' => 10), + array('name' => 'Fred', 'age' => 20)), array('age' => '>')) + ->find_many(); + + // Creates SQL: + SELECT * FROM `widget` WHERE (( `name` = 'Joe' AND `age` = '10' ) OR ( `name` = 'Fred' AND `age` > '20' )); + +If you want to set the default operator for all the columns, just pass it as the second parameter: + +.. code-block:: php + + <?php + $people = ORM::for_table('person') + ->where_any_is(array( + array('score' => '5', 'age' => 10), + array('score' => '15', 'age' => 20)), '>') + ->find_many(); + + // Creates SQL: + SELECT * FROM `widget` WHERE (( `score` > '5' AND `age` > '10' ) OR ( `score` > '15' AND `age` > '20' )); + +Set membership: ``where_in`` and ``where_not_in`` +''''''''''''''''''''''''''''''''''''''''''''''''' + +To add a ``WHERE ... IN ()`` or ``WHERE ... NOT IN ()`` clause, use the +``where_in`` and ``where_not_in`` methods respectively. + +Both methods accept two arguments. The first is the column name to +compare against. The second is an *array* of possible values. As all the +``where_`` methods, you can specify multiple columns using an associative +*array* as the only parameter. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->where_in('name', array('Fred', 'Joe', 'John'))->find_many(); + +Working with ``NULL`` values: ``where_null`` and ``where_not_null`` +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +To add a ``WHERE column IS NULL`` or ``WHERE column IS NOT NULL`` +clause, use the ``where_null`` and ``where_not_null`` methods +respectively. Both methods accept a single parameter: the column name to +test. + +Raw WHERE clauses +''''''''''''''''' + +If you require a more complex query, you can use the ``where_raw`` +method to specify the SQL fragment for the WHERE clause exactly. This +method takes two arguments: the string to add to the query, and an +(optional) array of parameters which will be bound to the string. If +parameters are supplied, the string should contain question mark +characters (``?``) to represent the values to be bound, and the +parameter array should contain the values to be substituted into the +string in the correct order. + +This method may be used in a method chain alongside other ``where_*`` +methods as well as methods such as ``offset``, ``limit`` and +``order_by_*``. The contents of the string you supply will be connected +with preceding and following WHERE clauses with AND. + +.. code-block:: php + + <?php + $people = ORM::for_table('person') + ->where('name', 'Fred') + ->where_raw('(`age` = ? OR `age` = ?)', array(20, 25)) + ->order_by_asc('name') + ->find_many(); + + // Creates SQL: + SELECT * FROM `person` WHERE `name` = "Fred" AND (`age` = 20 OR `age` = 25) ORDER BY `name` ASC; + +.. note:: + + You must wrap your expression in parentheses when using any of ``ALL``, + ``ANY``, ``BETWEEN``, ``IN``, ``LIKE``, ``OR`` and ``SOME``. Otherwise + the precedence of ``AND`` will bind stronger and in the above example + you would effectively get ``WHERE (`name` = "Fred" AND `age` = 20) OR `age` = 25`` + +Note that this method only supports "question mark placeholder" syntax, +and NOT "named placeholder" syntax. This is because PDO does not allow +queries that contain a mixture of placeholder types. Also, you should +ensure that the number of question mark placeholders in the string +exactly matches the number of elements in the array. + +If you require yet more flexibility, you can manually specify the entire +query. See *Raw queries* below. + +Limits and offsets +'''''''''''''''''' + +*Note that these methods **do not** escape their query parameters and so +these should **not** be passed directly from user input.* + +The ``limit`` and ``offset`` methods map pretty closely to their SQL +equivalents. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->where('gender', 'female')->limit(5)->offset(10)->find_many(); + +Ordering +'''''''' + +*Note that these methods **do not** escape their query parameters and so +these should **not** be passed directly from user input.* + +Two methods are provided to add ``ORDER BY`` clauses to your query. +These are ``order_by_desc`` and ``order_by_asc``, each of which takes a +column name to sort by. The column names will be quoted. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->order_by_asc('gender')->order_by_desc('name')->find_many(); + +If you want to order by something other than a column name, then use the +``order_by_expr`` method to add an unquoted SQL expression as an +``ORDER BY`` clause. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->order_by_expr('SOUNDEX(`name`)')->find_many(); + +Grouping +^^^^^^^^ + +*Note that this method **does not** escape it query parameter and so +this should **not** by passed directly from user input.* + +To add a ``GROUP BY`` clause to your query, call the ``group_by`` +method, passing in the column name. You can call this method multiple +times to add further columns. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->where('gender', 'female')->group_by('name')->find_many(); + +It is also possible to ``GROUP BY`` a database expression: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->where('gender', 'female')->group_by_expr("FROM_UNIXTIME(`time`, '%Y-%m')")->find_many(); + +Having +^^^^^^ + +When using aggregate functions in combination with a ``GROUP BY`` you can use +``HAVING`` to filter based on those values. + +``HAVING`` works in exactly the same way as all of the ``where*`` functions in Idiorm. +Substitute ``where_`` for ``having_`` to make use of these functions. + +For example: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->group_by('name')->having_not_like('name', '%bob%')->find_many(); + +Result columns +^^^^^^^^^^^^^^ + +By default, all columns in the ``SELECT`` statement are returned from +your query. That is, calling: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT * FROM `person`; + +The ``select`` method gives you control over which columns are returned. +Call ``select`` multiple times to specify columns to return or use +```select_many`` <#shortcuts-for-specifying-many-columns>`_ to specify +many columns at once. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->select('name')->select('age')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT `name`, `age` FROM `person`; + +Optionally, you may also supply a second argument to ``select`` to +specify an alias for the column: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->select('name', 'person_name')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT `name` AS `person_name` FROM `person`; + +Column names passed to ``select`` are quoted automatically, even if they +contain ``table.column``-style identifiers: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->select('person.name', 'person_name')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT `person`.`name` AS `person_name` FROM `person`; + +If you wish to override this behaviour (for example, to supply a +database expression) you should instead use the ``select_expr`` method. +Again, this takes the alias as an optional second argument. You can +specify multiple expressions by calling ``select_expr`` multiple times +or use ```select_many_expr`` <#shortcuts-for-specifying-many-columns>`_ +to specify many expressions at once. + +.. code-block:: php + + <?php + // NOTE: For illustrative purposes only. To perform a count query, use the count() method. + $people_count = ORM::for_table('person')->select_expr('COUNT(*)', 'count')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT COUNT(*) AS `count` FROM `person`; + +Shortcuts for specifying many columns +''''''''''''''''''''''''''''''''''''' + +``select_many`` and ``select_many_expr`` are very similar, but they +allow you to specify more than one column at once. For example: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->select_many('name', 'age')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT `name`, `age` FROM `person`; + +To specify aliases you need to pass in an array (aliases are set as the +key in an associative array): + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->select_many(array('first_name' => 'name'), 'age', 'height')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT `name` AS `first_name`, `age`, `height` FROM `person`; + +You can pass the the following styles into ``select_many`` and +``select_many_expr`` by mixing and matching arrays and parameters: + +.. code-block:: php + + <?php + select_many(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5') + select_many('column', 'column2', 'column3') + select_many(array('column', 'column2', 'column3'), 'column4', 'column5') + +All the select methods can also be chained with each other so you could +do the following to get a neat select query including an expression: + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->select_many('name', 'age', 'height')->select_expr('NOW()', 'timestamp')->find_many(); + +Will result in the query: + +.. code-block:: php + + <?php + SELECT `name`, `age`, `height`, NOW() AS `timestamp` FROM `person`; + +DISTINCT +^^^^^^^^ + +To add a ``DISTINCT`` keyword before the list of result columns in your +query, add a call to ``distinct()`` to your query chain. + +.. code-block:: php + + <?php + $distinct_names = ORM::for_table('person')->distinct()->select('name')->find_many(); + +This will result in the query: + +.. code-block:: php + + <?php + SELECT DISTINCT `name` FROM `person`; + +Joins +^^^^^ + +Idiorm has a family of methods for adding different types of ``JOIN``\ s +to the queries it constructs: + +Methods: ``join``, ``inner_join``, ``left_outer_join``, +``right_outer_join``, ``full_outer_join``. + +Each of these methods takes the same set of arguments. The following +description will use the basic ``join`` method as an example, but the +same applies to each method. + +The first two arguments are mandatory. The first is the name of the +table to join, and the second supplies the conditions for the join. The +recommended way to specify the conditions is as an *array* containing +three components: the first column, the operator, and the second column. +The table and column names will be automatically quoted. For example: + +.. code-block:: php + + <?php + $results = ORM::for_table('person')->join('person_profile', array('person.id', '=', 'person_profile.person_id'))->find_many(); + +It is also possible to specify the condition as a string, which will be +inserted as-is into the query. However, in this case the column names +will **not** be escaped, and so this method should be used with caution. + +.. code-block:: php + + <?php + // Not recommended because the join condition will not be escaped. + $results = ORM::for_table('person')->join('person_profile', 'person.id = person_profile.person_id')->find_many(); + +The ``join`` methods also take an optional third parameter, which is an +``alias`` for the table in the query. This is useful if you wish to join +the table to *itself* to create a hierarchical structure. In this case, +it is best combined with the ``table_alias`` method, which will add an +alias to the *main* table associated with the ORM, and the ``select`` +method to control which columns get returned. + +.. code-block:: php + + <?php + $results = ORM::for_table('person') + ->table_alias('p1') + ->select('p1.*') + ->select('p2.name', 'parent_name') + ->join('person', array('p1.parent', '=', 'p2.id'), 'p2') + ->find_many(); + +Raw JOIN clauses +''''''''''''''''' + +If you need to construct a more complex query, you can use the ``raw_join`` +method to specify the SQL fragment for the JOIN clause exactly. This +method takes four required arguments: the string to add to the query, +the conditions is as an *array* containing three components: +the first column, the operator, and the second column, the table alias and +(optional) the parameters array. If parameters are supplied, +the string should contain question mark characters (``?``) to represent +the values to be bound, and the parameter array should contain the values +to be substituted into the string in the correct order. + +This method may be used in a method chain alongside other ``*_join`` +methods as well as methods such as ``offset``, ``limit`` and +``order_by_*``. The contents of the string you supply will be connected +with preceding and following JOIN clauses. + +.. code-block:: php + + <?php + $people = ORM::for_table('person') + ->raw_join( + 'JOIN (SELECT * FROM role WHERE role.name = ?)', + array('person.role_id', '=', 'role.id'), + 'role', + array('role' => 'janitor')) + ->order_by_asc('person.name') + ->find_many(); + + // Creates SQL: + SELECT * FROM `person` JOIN (SELECT * FROM role WHERE role.name = 'janitor') `role` ON `person`.`role_id` = `role`.`id` ORDER BY `person`.`name` ASC + +Note that this method only supports "question mark placeholder" syntax, +and NOT "named placeholder" syntax. This is because PDO does not allow +queries that contain a mixture of placeholder types. Also, you should +ensure that the number of question mark placeholders in the string +exactly matches the number of elements in the array. + +If you require yet more flexibility, you can manually specify the entire +query. See *Raw queries* below. + + +Aggregate functions +^^^^^^^^^^^^^^^^^^^ + +There is support for ``MIN``, ``AVG``, ``MAX`` and ``SUM`` in addition +to ``COUNT`` (documented earlier). + +To return a minimum value of column, call the ``min()`` method. + +.. code-block:: php + + <?php + $min = ORM::for_table('person')->min('height'); + +The other functions (``AVG``, ``MAX`` and ``SUM``) work in exactly the +same manner. Supply a column name to perform the aggregate function on +and it will return an integer. + +Raw queries +^^^^^^^^^^^ + +If you need to perform more complex queries, you can completely specify +the query to execute by using the ``raw_query`` method. This method +takes a string and optionally an array of parameters. The string can +contain placeholders, either in question mark or named placeholder +syntax, which will be used to bind the parameters to the query. + +.. code-block:: php + + <?php + $people = ORM::for_table('person')->raw_query('SELECT p.* FROM person p JOIN role r ON p.role_id = r.id WHERE r.name = :role', array('role' => 'janitor'))->find_many(); + +The ORM class instance(s) returned will contain data for all the columns +returned by the query. Note that you still must call ``for_table`` to +bind the instances to a particular table, even though there is nothing +to stop you from specifying a completely different table in the query. +This is because if you wish to later called ``save``, the ORM will need +to know which table to update. + +.. note:: + + Using ``raw_query`` is advanced and possibly dangerous, and + Idiorm does not make any attempt to protect you from making errors when + using this method. If you find yourself calling ``raw_query`` often, you + may have misunderstood the purpose of using an ORM, or your application + may be too complex for Idiorm. Consider using a more full-featured + database abstraction system. + +Raw SQL execution using PDO +''''''''''''''''''''''''''' + +.. warning:: + + By using this function you're dropping down to PHPs PDO directly. Idiorm + does not make any attempt to protect you from making errors when using this + method. + + You're essentially just using Idiorm to manage the connection and configuration + when you implement ``raw_execute()``. + +It can be handy, in some instances, to make use of the PDO instance underneath +Idiorm to make advanced queries. These can be things like dropping a table from +the database that Idiorm doesn't support and will not support in the future. These +are operations that fall outside the 80/20 philosophy of Idiorm. That said there is +a lot of interest in this function and quite a lot of support requests related to +it. + +This method directly maps to `PDOStatement::execute()`_ underneath so please +familiarise yourself with it's documentation. + +Dropping tables +~~~~~~~~~~~~~~~ + +This can be done very simply using ``raw_execute()``. + +.. code-block:: php + + <?php + if (ORM::raw_execute('DROP TABLE my_table')) { + echo "Table dropped"; + } else { + echo "Drop query failed"; + } + +Selecting rows +~~~~~~~~~~~~~~ + +.. warning:: + + You really, should not be doing this, use Idiorm with ``raw_query()`` instead + where possible. + +Here is a simple query implemented using ``raw_execute()`` - note the call to +``ORM::get_last_statement()`` as ``raw_execute()`` returns a boolean as per the +`PDOStatement::execute()`_ underneath. + +.. code-block:: php + + <?php + $res = ORM::raw_execute('SHOW TABLES'); + $statement = ORM::get_last_statement(); + $rows = array(); + while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { + var_dump($row); + } + +It is also worth noting that ``$statement`` is a ``PDOStatement`` instance so calling +its ``fetch()`` method is the same as if you had called against PDO without Idiorm. + +Getting the PDO instance +'''''''''''''''''''''''' + +.. warning:: + + By using this function you're dropping down to PHPs PDO directly. Idiorm + does not make any attempt to protect you from making errors when using this + method. + + You're essentially just using Idiorm to manage the connection and configuration + when you implement against ``get_db()``. + +If none of the preceeding methods suit your purposes then you can also get direct +access to the PDO instance underneath Idiorm using ``ORM::get_db()``. This will +return a configured instance of `PDO`_. + +.. code-block:: php + + <?php + $pdo = ORM::get_db(); + foreach($pdo->query('SHOW TABLES') as $row) { + var_dump($row); + } + +.. _PDOStatement::execute(): https://secure.php.net/manual/en/pdostatement.execute.php +.. _PDO: https://secure.php.net/manual/en/class.pdo.php diff --git a/vendor/j4mie/idiorm/docs/transactions.rst b/vendor/j4mie/idiorm/docs/transactions.rst new file mode 100644 index 000000000..23e6e3178 --- /dev/null +++ b/vendor/j4mie/idiorm/docs/transactions.rst @@ -0,0 +1,21 @@ +Transactions +============ + +Idiorm doesn’t supply any extra methods to deal with transactions, but +it’s very easy to use PDO’s built-in methods: + +.. code-block:: php + + <?php + // Start a transaction + ORM::get_db()->beginTransaction(); + + // Commit a transaction + ORM::get_db()->commit(); + + // Roll back a transaction + ORM::get_db()->rollBack(); + +For more details, see `the PDO documentation on Transactions`_. + +.. _the PDO documentation on Transactions: https://secure.php.net/manual/en/pdo.transactions.php
\ No newline at end of file diff --git a/vendor/j4mie/idiorm/idiorm.php b/vendor/j4mie/idiorm/idiorm.php new file mode 100644 index 000000000..2b1f38ca0 --- /dev/null +++ b/vendor/j4mie/idiorm/idiorm.php @@ -0,0 +1,2539 @@ +<?php + + /** + * + * Idiorm + * + * http://github.com/j4mie/idiorm/ + * + * A single-class super-simple database abstraction layer for PHP. + * Provides (nearly) zero-configuration object-relational mapping + * and a fluent interface for building basic, commonly-used queries. + * + * BSD Licensed. + * + * Copyright (c) 2010, Jamie Matthews + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * The methods documented below are magic methods that conform to PSR-1. + * This documentation exposes these methods to doc generators and IDEs. + * @see http://www.php-fig.org/psr/psr-1/ + * + * @method static array|string getConfig($key = null, $connection_name = self::DEFAULT_CONNECTION) + * @method static null resetConfig() + * @method static \ORM forTable($table_name, $connection_name = self::DEFAULT_CONNECTION) + * @method static null setDb($db, $connection_name = self::DEFAULT_CONNECTION) + * @method static null resetDb() + * @method static null setupLimitClauseStyle($connection_name) + * @method static \PDO getDb($connection_name = self::DEFAULT_CONNECTION) + * @method static bool rawExecute($query, $parameters = array()) + * @method static \PDOStatement getLastStatement() + * @method static string getLastQuery($connection_name = null) + * @method static array getQueryLog($connection_name = self::DEFAULT_CONNECTION) + * @method array getConnectionNames() + * @method $this useIdColumn($id_column) + * @method \ORM|bool findOne($id=null) + * @method array|\IdiormResultSet findMany() + * @method \IdiormResultSet findResultSet() + * @method array findArray() + * @method $this forceAllDirty() + * @method $this rawQuery($query, $parameters = array()) + * @method $this tableAlias($alias) + * @method int countNullIdColumns() + * @method $this selectExpr($expr, $alias=null) + * @method \ORM selectMany($values) + * @method \ORM selectManyExpr($values) + * @method $this rawJoin($table, $constraint, $table_alias, $parameters = array()) + * @method $this innerJoin($table, $constraint, $table_alias=null) + * @method $this leftOuterJoin($table, $constraint, $table_alias=null) + * @method $this rightOuterJoin($table, $constraint, $table_alias=null) + * @method $this fullOuterJoin($table, $constraint, $table_alias=null) + * @method $this whereEqual($column_name, $value=null) + * @method $this whereNotEqual($column_name, $value=null) + * @method $this whereIdIs($id) + * @method $this whereAnyIs($values, $operator='=') + * @method array|string whereIdIn($ids) + * @method $this whereLike($column_name, $value=null) + * @method $this whereNotLike($column_name, $value=null) + * @method $this whereGt($column_name, $value=null) + * @method $this whereLt($column_name, $value=null) + * @method $this whereGte($column_name, $value=null) + * @method $this whereLte($column_name, $value=null) + * @method $this whereIn($column_name, $values) + * @method $this whereNotIn($column_name, $values) + * @method $this whereNull($column_name) + * @method $this whereNotNull($column_name) + * @method $this whereRaw($clause, $parameters=array()) + * @method $this orderByDesc($column_name) + * @method $this orderByAsc($column_name) + * @method $this orderByExpr($clause) + * @method $this groupBy($column_name) + * @method $this groupByExpr($expr) + * @method $this havingEqual($column_name, $value=null) + * @method $this havingNotEqual($column_name, $value=null) + * @method $this havingIdIs($id) + * @method $this havingLike($column_name, $value=null) + * @method $this havingNotLike($column_name, $value=null) + * @method $this havingGt($column_name, $value=null) + * @method $this havingLt($column_name, $value=null) + * @method $this havingGte($column_name, $value=null) + * @method $this havingLte($column_name, $value=null) + * @method $this havingIn($column_name, $values=null) + * @method $this havingNotIn($column_name, $values=null) + * @method $this havingNull($column_name) + * @method $this havingNotNull($column_name) + * @method $this havingRaw($clause, $parameters=array()) + * @method static this clearCache($table_name = null, $connection_name = self::DEFAULT_CONNECTION) + * @method array asArray() + * @method bool setExpr($key, $value = null) + * @method bool isDirty($key) + * @method bool isNew() + */ + + class ORM implements ArrayAccess { + + // ----------------------- // + // --- CLASS CONSTANTS --- // + // ----------------------- // + + // WHERE and HAVING condition array keys + const CONDITION_FRAGMENT = 0; + const CONDITION_VALUES = 1; + + const DEFAULT_CONNECTION = 'default'; + + // Limit clause style + const LIMIT_STYLE_TOP_N = "top"; + const LIMIT_STYLE_LIMIT = "limit"; + + // ------------------------ // + // --- CLASS PROPERTIES --- // + // ------------------------ // + + // Class configuration + protected static $_default_config = array( + 'connection_string' => 'sqlite::memory:', + 'id_column' => 'id', + 'id_column_overrides' => array(), + 'error_mode' => PDO::ERRMODE_EXCEPTION, + 'username' => null, + 'password' => null, + 'driver_options' => null, + 'identifier_quote_character' => null, // if this is null, will be autodetected + 'limit_clause_style' => null, // if this is null, will be autodetected + 'logging' => false, + 'logger' => null, + 'caching' => false, + 'caching_auto_clear' => false, + 'return_result_sets' => false, + ); + + // Map of configuration settings + protected static $_config = array(); + + // Map of database connections, instances of the PDO class + protected static $_db = array(); + + // Last query run, only populated if logging is enabled + protected static $_last_query; + + // Log of all queries run, mapped by connection key, only populated if logging is enabled + protected static $_query_log = array(); + + // Query cache, only used if query caching is enabled + protected static $_query_cache = array(); + + // Reference to previously used PDOStatement object to enable low-level access, if needed + protected static $_last_statement = null; + + // --------------------------- // + // --- INSTANCE PROPERTIES --- // + // --------------------------- // + + // Key name of the connections in self::$_db used by this instance + protected $_connection_name; + + // The name of the table the current ORM instance is associated with + protected $_table_name; + + // Alias for the table to be used in SELECT queries + protected $_table_alias = null; + + // Values to be bound to the query + protected $_values = array(); + + // Columns to select in the result + protected $_result_columns = array('*'); + + // Are we using the default result column or have these been manually changed? + protected $_using_default_result_columns = true; + + // Join sources + protected $_join_sources = array(); + + // Should the query include a DISTINCT keyword? + protected $_distinct = false; + + // Is this a raw query? + protected $_is_raw_query = false; + + // The raw query + protected $_raw_query = ''; + + // The raw query parameters + protected $_raw_parameters = array(); + + // Array of WHERE clauses + protected $_where_conditions = array(); + + // LIMIT + protected $_limit = null; + + // OFFSET + protected $_offset = null; + + // ORDER BY + protected $_order_by = array(); + + // GROUP BY + protected $_group_by = array(); + + // HAVING + protected $_having_conditions = array(); + + // The data for a hydrated instance of the class + protected $_data = array(); + + // Fields that have been modified during the + // lifetime of the object + protected $_dirty_fields = array(); + + // Fields that are to be inserted in the DB raw + protected $_expr_fields = array(); + + // Is this a new object (has create() been called)? + protected $_is_new = false; + + // Name of the column to use as the primary key for + // this instance only. Overrides the config settings. + protected $_instance_id_column = null; + + // ---------------------- // + // --- STATIC METHODS --- // + // ---------------------- // + + /** + * Pass configuration settings to the class in the form of + * key/value pairs. As a shortcut, if the second argument + * is omitted and the key is a string, the setting is + * assumed to be the DSN string used by PDO to connect + * to the database (often, this will be the only configuration + * required to use Idiorm). If you have more than one setting + * you wish to configure, another shortcut is to pass an array + * of settings (and omit the second argument). + * @param string|array $key + * @param mixed $value + * @param string $connection_name Which connection to use + */ + public static function configure($key, $value = null, $connection_name = self::DEFAULT_CONNECTION) { + self::_setup_db_config($connection_name); //ensures at least default config is set + + if (is_array($key)) { + // Shortcut: If only one array argument is passed, + // assume it's an array of configuration settings + foreach ($key as $conf_key => $conf_value) { + self::configure($conf_key, $conf_value, $connection_name); + } + } else { + if (is_null($value)) { + // Shortcut: If only one string argument is passed, + // assume it's a connection string + $value = $key; + $key = 'connection_string'; + } + self::$_config[$connection_name][$key] = $value; + } + } + + /** + * Retrieve configuration options by key, or as whole array. + * @param string $key + * @param string $connection_name Which connection to use + */ + public static function get_config($key = null, $connection_name = self::DEFAULT_CONNECTION) { + if ($key) { + return self::$_config[$connection_name][$key]; + } else { + return self::$_config[$connection_name]; + } + } + + /** + * Delete all configs in _config array. + */ + public static function reset_config() { + self::$_config = array(); + } + + /** + * Despite its slightly odd name, this is actually the factory + * method used to acquire instances of the class. It is named + * this way for the sake of a readable interface, ie + * ORM::for_table('table_name')->find_one()-> etc. As such, + * this will normally be the first method called in a chain. + * @param string $table_name + * @param string $connection_name Which connection to use + * @return ORM + */ + public static function for_table($table_name, $connection_name = self::DEFAULT_CONNECTION) { + self::_setup_db($connection_name); + return new self($table_name, array(), $connection_name); + } + + /** + * Set up the database connection used by the class + * @param string $connection_name Which connection to use + */ + protected static function _setup_db($connection_name = self::DEFAULT_CONNECTION) { + if (!array_key_exists($connection_name, self::$_db) || + !is_object(self::$_db[$connection_name])) { + self::_setup_db_config($connection_name); + + $db = new PDO( + self::$_config[$connection_name]['connection_string'], + self::$_config[$connection_name]['username'], + self::$_config[$connection_name]['password'], + self::$_config[$connection_name]['driver_options'] + ); + + $db->setAttribute(PDO::ATTR_ERRMODE, self::$_config[$connection_name]['error_mode']); + self::set_db($db, $connection_name); + } + } + + /** + * Ensures configuration (multiple connections) is at least set to default. + * @param string $connection_name Which connection to use + */ + protected static function _setup_db_config($connection_name) { + if (!array_key_exists($connection_name, self::$_config)) { + self::$_config[$connection_name] = self::$_default_config; + } + } + + /** + * Set the PDO object used by Idiorm to communicate with the database. + * This is public in case the ORM should use a ready-instantiated + * PDO object as its database connection. Accepts an optional string key + * to identify the connection if multiple connections are used. + * @param PDO $db + * @param string $connection_name Which connection to use + */ + public static function set_db($db, $connection_name = self::DEFAULT_CONNECTION) { + self::_setup_db_config($connection_name); + self::$_db[$connection_name] = $db; + if(!is_null(self::$_db[$connection_name])) { + self::_setup_identifier_quote_character($connection_name); + self::_setup_limit_clause_style($connection_name); + } + } + + /** + * Close and delete all registered PDO objects in _db array. + */ + public static function reset_db() { + self::$_db = null; + + self::$_db = array(); + } + + /** + * Detect and initialise the character used to quote identifiers + * (table names, column names etc). If this has been specified + * manually using ORM::configure('identifier_quote_character', 'some-char'), + * this will do nothing. + * @param string $connection_name Which connection to use + */ + protected static function _setup_identifier_quote_character($connection_name) { + if (is_null(self::$_config[$connection_name]['identifier_quote_character'])) { + self::$_config[$connection_name]['identifier_quote_character'] = + self::_detect_identifier_quote_character($connection_name); + } + } + + /** + * Detect and initialise the limit clause style ("SELECT TOP 5" / + * "... LIMIT 5"). If this has been specified manually using + * ORM::configure('limit_clause_style', 'top'), this will do nothing. + * @param string $connection_name Which connection to use + */ + public static function _setup_limit_clause_style($connection_name) { + if (is_null(self::$_config[$connection_name]['limit_clause_style'])) { + self::$_config[$connection_name]['limit_clause_style'] = + self::_detect_limit_clause_style($connection_name); + } + } + + /** + * Return the correct character used to quote identifiers (table + * names, column names etc) by looking at the driver being used by PDO. + * @param string $connection_name Which connection to use + * @return string + */ + protected static function _detect_identifier_quote_character($connection_name) { + switch(self::get_db($connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME)) { + case 'pgsql': + case 'sqlsrv': + case 'dblib': + case 'mssql': + case 'sybase': + case 'firebird': + return '"'; + case 'mysql': + case 'sqlite': + case 'sqlite2': + default: + return '`'; + } + } + + /** + * Returns a constant after determining the appropriate limit clause + * style + * @param string $connection_name Which connection to use + * @return string Limit clause style keyword/constant + */ + protected static function _detect_limit_clause_style($connection_name) { + switch(self::get_db($connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME)) { + case 'sqlsrv': + case 'dblib': + case 'mssql': + return ORM::LIMIT_STYLE_TOP_N; + default: + return ORM::LIMIT_STYLE_LIMIT; + } + } + + /** + * Returns the PDO instance used by the the ORM to communicate with + * the database. This can be called if any low-level DB access is + * required outside the class. If multiple connections are used, + * accepts an optional key name for the connection. + * @param string $connection_name Which connection to use + * @return PDO + */ + public static function get_db($connection_name = self::DEFAULT_CONNECTION) { + self::_setup_db($connection_name); // required in case this is called before Idiorm is instantiated + return self::$_db[$connection_name]; + } + + /** + * Executes a raw query as a wrapper for PDOStatement::execute. + * Useful for queries that can't be accomplished through Idiorm, + * particularly those using engine-specific features. + * @example raw_execute('SELECT `name`, AVG(`order`) FROM `customer` GROUP BY `name` HAVING AVG(`order`) > 10') + * @example raw_execute('INSERT OR REPLACE INTO `widget` (`id`, `name`) SELECT `id`, `name` FROM `other_table`') + * @param string $query The raw SQL query + * @param array $parameters Optional bound parameters + * @param string $connection_name Which connection to use + * @return bool Success + */ + public static function raw_execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) { + self::_setup_db($connection_name); + return self::_execute($query, $parameters, $connection_name); + } + + /** + * Returns the PDOStatement instance last used by any connection wrapped by the ORM. + * Useful for access to PDOStatement::rowCount() or error information + * @return PDOStatement + */ + public static function get_last_statement() { + return self::$_last_statement; + } + + /** + * Internal helper method for executing statments. Logs queries, and + * stores statement object in ::_last_statment, accessible publicly + * through ::get_last_statement() + * @param string $query + * @param array $parameters An array of parameters to be bound in to the query + * @param string $connection_name Which connection to use + * @return bool Response of PDOStatement::execute() + */ + protected static function _execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) { + $statement = self::get_db($connection_name)->prepare($query); + self::$_last_statement = $statement; + $time = microtime(true); + + foreach ($parameters as $key => &$param) { + if (is_null($param)) { + $type = PDO::PARAM_NULL; + } else if (is_bool($param)) { + $type = PDO::PARAM_BOOL; + } else if (is_int($param)) { + $type = PDO::PARAM_INT; + } else { + $type = PDO::PARAM_STR; + } + + $statement->bindParam(is_int($key) ? ++$key : $key, $param, $type); + } + + $q = $statement->execute(); + self::_log_query($query, $parameters, $connection_name, (microtime(true)-$time)); + + return $q; + } + + /** + * Add a query to the internal query log. Only works if the + * 'logging' config option is set to true. + * + * This works by manually binding the parameters to the query - the + * query isn't executed like this (PDO normally passes the query and + * parameters to the database which takes care of the binding) but + * doing it this way makes the logged queries more readable. + * @param string $query + * @param array $parameters An array of parameters to be bound in to the query + * @param string $connection_name Which connection to use + * @param float $query_time Query time + * @return bool + */ + protected static function _log_query($query, $parameters, $connection_name, $query_time) { + // If logging is not enabled, do nothing + if (!self::$_config[$connection_name]['logging']) { + return false; + } + + if (!isset(self::$_query_log[$connection_name])) { + self::$_query_log[$connection_name] = array(); + } + + if (empty($parameters)) { + $bound_query = $query; + } else { + // Escape the parameters + $parameters = array_map(array(self::get_db($connection_name), 'quote'), $parameters); + + if (array_values($parameters) === $parameters) { + // ? placeholders + // Avoid %format collision for vsprintf + $query = str_replace("%", "%%", $query); + + // Replace placeholders in the query for vsprintf + if(false !== strpos($query, "'") || false !== strpos($query, '"')) { + $query = IdiormString::str_replace_outside_quotes("?", "%s", $query); + } else { + $query = str_replace("?", "%s", $query); + } + + // Replace the question marks in the query with the parameters + $bound_query = vsprintf($query, $parameters); + } else { + // named placeholders + foreach ($parameters as $key => $val) { + $query = str_replace($key, $val, $query); + } + $bound_query = $query; + } + } + + self::$_last_query = $bound_query; + self::$_query_log[$connection_name][] = $bound_query; + + + if(is_callable(self::$_config[$connection_name]['logger'])){ + $logger = self::$_config[$connection_name]['logger']; + $logger($bound_query, $query_time); + } + + return true; + } + + /** + * Get the last query executed. Only works if the + * 'logging' config option is set to true. Otherwise + * this will return null. Returns last query from all connections if + * no connection_name is specified + * @param null|string $connection_name Which connection to use + * @return string + */ + public static function get_last_query($connection_name = null) { + if ($connection_name === null) { + return self::$_last_query; + } + if (!isset(self::$_query_log[$connection_name])) { + return ''; + } + + return end(self::$_query_log[$connection_name]); + } + + /** + * Get an array containing all the queries run on a + * specified connection up to now. + * Only works if the 'logging' config option is + * set to true. Otherwise, returned array will be empty. + * @param string $connection_name Which connection to use + */ + public static function get_query_log($connection_name = self::DEFAULT_CONNECTION) { + if (isset(self::$_query_log[$connection_name])) { + return self::$_query_log[$connection_name]; + } + return array(); + } + + /** + * Get a list of the available connection names + * @return array + */ + public static function get_connection_names() { + return array_keys(self::$_db); + } + + // ------------------------ // + // --- INSTANCE METHODS --- // + // ------------------------ // + + /** + * "Private" constructor; shouldn't be called directly. + * Use the ORM::for_table factory method instead. + */ + protected function __construct($table_name, $data = array(), $connection_name = self::DEFAULT_CONNECTION) { + $this->_table_name = $table_name; + $this->_data = $data; + + $this->_connection_name = $connection_name; + self::_setup_db_config($connection_name); + } + + /** + * Create a new, empty instance of the class. Used + * to add a new row to your database. May optionally + * be passed an associative array of data to populate + * the instance. If so, all fields will be flagged as + * dirty so all will be saved to the database when + * save() is called. + */ + public function create($data=null) { + $this->_is_new = true; + if (!is_null($data)) { + return $this->hydrate($data)->force_all_dirty(); + } + return $this; + } + + /** + * Specify the ID column to use for this instance or array of instances only. + * This overrides the id_column and id_column_overrides settings. + * + * This is mostly useful for libraries built on top of Idiorm, and will + * not normally be used in manually built queries. If you don't know why + * you would want to use this, you should probably just ignore it. + */ + public function use_id_column($id_column) { + $this->_instance_id_column = $id_column; + return $this; + } + + /** + * Create an ORM instance from the given row (an associative + * array of data fetched from the database) + */ + protected function _create_instance_from_row($row) { + $instance = self::for_table($this->_table_name, $this->_connection_name); + $instance->use_id_column($this->_instance_id_column); + $instance->hydrate($row); + return $instance; + } + + /** + * Tell the ORM that you are expecting a single result + * back from your query, and execute it. Will return + * a single instance of the ORM class, or false if no + * rows were returned. + * As a shortcut, you may supply an ID as a parameter + * to this method. This will perform a primary key + * lookup on the table. + */ + public function find_one($id=null) { + if (!is_null($id)) { + $this->where_id_is($id); + } + $this->limit(1); + $rows = $this->_run(); + + if (empty($rows)) { + return false; + } + + return $this->_create_instance_from_row($rows[0]); + } + + /** + * Tell the ORM that you are expecting multiple results + * from your query, and execute it. Will return an array + * of instances of the ORM class, or an empty array if + * no rows were returned. + * @return array|\IdiormResultSet + */ + public function find_many() { + if(self::$_config[$this->_connection_name]['return_result_sets']) { + return $this->find_result_set(); + } + return $this->_find_many(); + } + + /** + * Tell the ORM that you are expecting multiple results + * from your query, and execute it. Will return an array + * of instances of the ORM class, or an empty array if + * no rows were returned. + * @return array + */ + protected function _find_many() { + $rows = $this->_run(); + return array_map(array($this, '_create_instance_from_row'), $rows); + } + + /** + * Tell the ORM that you are expecting multiple results + * from your query, and execute it. Will return a result set object + * containing instances of the ORM class. + * @return \IdiormResultSet + */ + public function find_result_set() { + return new IdiormResultSet($this->_find_many()); + } + + /** + * Tell the ORM that you are expecting multiple results + * from your query, and execute it. Will return an array, + * or an empty array if no rows were returned. + * @return array + */ + public function find_array() { + return $this->_run(); + } + + /** + * Tell the ORM that you wish to execute a COUNT query. + * Will return an integer representing the number of + * rows returned. + */ + public function count($column = '*') { + return $this->_call_aggregate_db_function(__FUNCTION__, $column); + } + + /** + * Tell the ORM that you wish to execute a MAX query. + * Will return the max value of the choosen column. + */ + public function max($column) { + return $this->_call_aggregate_db_function(__FUNCTION__, $column); + } + + /** + * Tell the ORM that you wish to execute a MIN query. + * Will return the min value of the choosen column. + */ + public function min($column) { + return $this->_call_aggregate_db_function(__FUNCTION__, $column); + } + + /** + * Tell the ORM that you wish to execute a AVG query. + * Will return the average value of the choosen column. + */ + public function avg($column) { + return $this->_call_aggregate_db_function(__FUNCTION__, $column); + } + + /** + * Tell the ORM that you wish to execute a SUM query. + * Will return the sum of the choosen column. + */ + public function sum($column) { + return $this->_call_aggregate_db_function(__FUNCTION__, $column); + } + + /** + * Execute an aggregate query on the current connection. + * @param string $sql_function The aggregate function to call eg. MIN, COUNT, etc + * @param string $column The column to execute the aggregate query against + * @return int + */ + protected function _call_aggregate_db_function($sql_function, $column) { + $alias = strtolower($sql_function); + $sql_function = strtoupper($sql_function); + if('*' != $column) { + $column = $this->_quote_identifier($column); + } + $result_columns = $this->_result_columns; + $this->_result_columns = array(); + $this->select_expr("$sql_function($column)", $alias); + $result = $this->find_one(); + $this->_result_columns = $result_columns; + + $return_value = 0; + if($result !== false && isset($result->$alias)) { + if (!is_numeric($result->$alias)) { + $return_value = $result->$alias; + } + elseif((int) $result->$alias == (float) $result->$alias) { + $return_value = (int) $result->$alias; + } else { + $return_value = (float) $result->$alias; + } + } + return $return_value; + } + + /** + * This method can be called to hydrate (populate) this + * instance of the class from an associative array of data. + * This will usually be called only from inside the class, + * but it's public in case you need to call it directly. + */ + public function hydrate($data=array()) { + $this->_data = $data; + return $this; + } + + /** + * Force the ORM to flag all the fields in the $data array + * as "dirty" and therefore update them when save() is called. + */ + public function force_all_dirty() { + $this->_dirty_fields = $this->_data; + return $this; + } + + /** + * Perform a raw query. The query can contain placeholders in + * either named or question mark style. If placeholders are + * used, the parameters should be an array of values which will + * be bound to the placeholders in the query. If this method + * is called, all other query building methods will be ignored. + */ + public function raw_query($query, $parameters = array()) { + $this->_is_raw_query = true; + $this->_raw_query = $query; + $this->_raw_parameters = $parameters; + return $this; + } + + /** + * Add an alias for the main table to be used in SELECT queries + */ + public function table_alias($alias) { + $this->_table_alias = $alias; + return $this; + } + + /** + * Internal method to add an unquoted expression to the set + * of columns returned by the SELECT query. The second optional + * argument is the alias to return the expression as. + */ + protected function _add_result_column($expr, $alias=null) { + if (!is_null($alias)) { + $expr .= " AS " . $this->_quote_identifier($alias); + } + + if ($this->_using_default_result_columns) { + $this->_result_columns = array($expr); + $this->_using_default_result_columns = false; + } else { + $this->_result_columns[] = $expr; + } + return $this; + } + + /** + * Counts the number of columns that belong to the primary + * key and their value is null. + */ + public function count_null_id_columns() { + if (is_array($this->_get_id_column_name())) { + return count(array_filter($this->id(), 'is_null')); + } else { + return is_null($this->id()) ? 1 : 0; + } + } + + /** + * Add a column to the list of columns returned by the SELECT + * query. This defaults to '*'. The second optional argument is + * the alias to return the column as. + */ + public function select($column, $alias=null) { + $column = $this->_quote_identifier($column); + return $this->_add_result_column($column, $alias); + } + + /** + * Add an unquoted expression to the list of columns returned + * by the SELECT query. The second optional argument is + * the alias to return the column as. + */ + public function select_expr($expr, $alias=null) { + return $this->_add_result_column($expr, $alias); + } + + /** + * Add columns to the list of columns returned by the SELECT + * query. This defaults to '*'. Many columns can be supplied + * as either an array or as a list of parameters to the method. + * + * Note that the alias must not be numeric - if you want a + * numeric alias then prepend it with some alpha chars. eg. a1 + * + * @example select_many(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5'); + * @example select_many('column', 'column2', 'column3'); + * @example select_many(array('column', 'column2', 'column3'), 'column4', 'column5'); + * + * @return \ORM + */ + public function select_many() { + $columns = func_get_args(); + if(!empty($columns)) { + $columns = $this->_normalise_select_many_columns($columns); + foreach($columns as $alias => $column) { + if(is_numeric($alias)) { + $alias = null; + } + $this->select($column, $alias); + } + } + return $this; + } + + /** + * Add an unquoted expression to the list of columns returned + * by the SELECT query. Many columns can be supplied as either + * an array or as a list of parameters to the method. + * + * Note that the alias must not be numeric - if you want a + * numeric alias then prepend it with some alpha chars. eg. a1 + * + * @example select_many_expr(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5') + * @example select_many_expr('column', 'column2', 'column3') + * @example select_many_expr(array('column', 'column2', 'column3'), 'column4', 'column5') + * + * @return \ORM + */ + public function select_many_expr() { + $columns = func_get_args(); + if(!empty($columns)) { + $columns = $this->_normalise_select_many_columns($columns); + foreach($columns as $alias => $column) { + if(is_numeric($alias)) { + $alias = null; + } + $this->select_expr($column, $alias); + } + } + return $this; + } + + /** + * Take a column specification for the select many methods and convert it + * into a normalised array of columns and aliases. + * + * It is designed to turn the following styles into a normalised array: + * + * array(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5')) + * + * @param array $columns + * @return array + */ + protected function _normalise_select_many_columns($columns) { + $return = array(); + foreach($columns as $column) { + if(is_array($column)) { + foreach($column as $key => $value) { + if(!is_numeric($key)) { + $return[$key] = $value; + } else { + $return[] = $value; + } + } + } else { + $return[] = $column; + } + } + return $return; + } + + /** + * Add a DISTINCT keyword before the list of columns in the SELECT query + */ + public function distinct() { + $this->_distinct = true; + return $this; + } + + /** + * Internal method to add a JOIN source to the query. + * + * The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this + * will be prepended to JOIN. + * + * The table should be the name of the table to join to. + * + * The constraint may be either a string or an array with three elements. If it + * is a string, it will be compiled into the query as-is, with no escaping. The + * recommended way to supply the constraint is as an array with three elements: + * + * first_column, operator, second_column + * + * Example: array('user.id', '=', 'profile.user_id') + * + * will compile to + * + * ON `user`.`id` = `profile`.`user_id` + * + * The final (optional) argument specifies an alias for the joined table. + */ + protected function _add_join_source($join_operator, $table, $constraint, $table_alias=null) { + + $join_operator = trim("{$join_operator} JOIN"); + + $table = $this->_quote_identifier($table); + + // Add table alias if present + if (!is_null($table_alias)) { + $table_alias = $this->_quote_identifier($table_alias); + $table .= " {$table_alias}"; + } + + // Build the constraint + if (is_array($constraint)) { + list($first_column, $operator, $second_column) = $constraint; + $first_column = $this->_quote_identifier($first_column); + $second_column = $this->_quote_identifier($second_column); + $constraint = "{$first_column} {$operator} {$second_column}"; + } + + $this->_join_sources[] = "{$join_operator} {$table} ON {$constraint}"; + return $this; + } + + /** + * Add a RAW JOIN source to the query + */ + public function raw_join($table, $constraint, $table_alias, $parameters = array()) { + // Add table alias if present + if (!is_null($table_alias)) { + $table_alias = $this->_quote_identifier($table_alias); + $table .= " {$table_alias}"; + } + + $this->_values = array_merge($this->_values, $parameters); + + // Build the constraint + if (is_array($constraint)) { + list($first_column, $operator, $second_column) = $constraint; + $first_column = $this->_quote_identifier($first_column); + $second_column = $this->_quote_identifier($second_column); + $constraint = "{$first_column} {$operator} {$second_column}"; + } + + $this->_join_sources[] = "{$table} ON {$constraint}"; + return $this; + } + + /** + * Add a simple JOIN source to the query + */ + public function join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("", $table, $constraint, $table_alias); + } + + /** + * Add an INNER JOIN souce to the query + */ + public function inner_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("INNER", $table, $constraint, $table_alias); + } + + /** + * Add a LEFT OUTER JOIN souce to the query + */ + public function left_outer_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("LEFT OUTER", $table, $constraint, $table_alias); + } + + /** + * Add an RIGHT OUTER JOIN souce to the query + */ + public function right_outer_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("RIGHT OUTER", $table, $constraint, $table_alias); + } + + /** + * Add an FULL OUTER JOIN souce to the query + */ + public function full_outer_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("FULL OUTER", $table, $constraint, $table_alias); + } + + /** + * Internal method to add a HAVING condition to the query + */ + protected function _add_having($fragment, $values=array()) { + return $this->_add_condition('having', $fragment, $values); + } + + /** + * Internal method to add a HAVING condition to the query + */ + protected function _add_simple_having($column_name, $separator, $value) { + return $this->_add_simple_condition('having', $column_name, $separator, $value); + } + + /** + * Internal method to add a HAVING clause with multiple values (like IN and NOT IN) + */ + public function _add_having_placeholder($column_name, $separator, $values) { + if (!is_array($column_name)) { + $data = array($column_name => $values); + } else { + $data = $column_name; + } + $result = $this; + foreach ($data as $key => $val) { + $column = $result->_quote_identifier($key); + $placeholders = $result->_create_placeholders($val); + $result = $result->_add_having("{$column} {$separator} ({$placeholders})", $val); + } + return $result; + } + + /** + * Internal method to add a HAVING clause with no parameters(like IS NULL and IS NOT NULL) + */ + public function _add_having_no_value($column_name, $operator) { + $conditions = (is_array($column_name)) ? $column_name : array($column_name); + $result = $this; + foreach($conditions as $column) { + $column = $this->_quote_identifier($column); + $result = $result->_add_having("{$column} {$operator}"); + } + return $result; + } + + /** + * Internal method to add a WHERE condition to the query + */ + protected function _add_where($fragment, $values=array()) { + return $this->_add_condition('where', $fragment, $values); + } + + /** + * Internal method to add a WHERE condition to the query + */ + protected function _add_simple_where($column_name, $separator, $value) { + return $this->_add_simple_condition('where', $column_name, $separator, $value); + } + + /** + * Add a WHERE clause with multiple values (like IN and NOT IN) + */ + public function _add_where_placeholder($column_name, $separator, $values) { + if (!is_array($column_name)) { + $data = array($column_name => $values); + } else { + $data = $column_name; + } + $result = $this; + foreach ($data as $key => $val) { + $column = $result->_quote_identifier($key); + $placeholders = $result->_create_placeholders($val); + $result = $result->_add_where("{$column} {$separator} ({$placeholders})", $val); + } + return $result; + } + + /** + * Add a WHERE clause with no parameters(like IS NULL and IS NOT NULL) + */ + public function _add_where_no_value($column_name, $operator) { + $conditions = (is_array($column_name)) ? $column_name : array($column_name); + $result = $this; + foreach($conditions as $column) { + $column = $this->_quote_identifier($column); + $result = $result->_add_where("{$column} {$operator}"); + } + return $result; + } + + /** + * Internal method to add a HAVING or WHERE condition to the query + */ + protected function _add_condition($type, $fragment, $values=array()) { + $conditions_class_property_name = "_{$type}_conditions"; + if (!is_array($values)) { + $values = array($values); + } + array_push($this->$conditions_class_property_name, array( + self::CONDITION_FRAGMENT => $fragment, + self::CONDITION_VALUES => $values, + )); + return $this; + } + + /** + * Helper method to compile a simple COLUMN SEPARATOR VALUE + * style HAVING or WHERE condition into a string and value ready to + * be passed to the _add_condition method. Avoids duplication + * of the call to _quote_identifier + * + * If column_name is an associative array, it will add a condition for each column + */ + protected function _add_simple_condition($type, $column_name, $separator, $value) { + $multiple = is_array($column_name) ? $column_name : array($column_name => $value); + $result = $this; + + foreach($multiple as $key => $val) { + // Add the table name in case of ambiguous columns + if (count($result->_join_sources) > 0 && strpos($key, '.') === false) { + $table = $result->_table_name; + if (!is_null($result->_table_alias)) { + $table = $result->_table_alias; + } + + $key = "{$table}.{$key}"; + } + $key = $result->_quote_identifier($key); + $result = $result->_add_condition($type, "{$key} {$separator} ?", $val); + } + return $result; + } + + /** + * Return a string containing the given number of question marks, + * separated by commas. Eg "?, ?, ?" + */ + protected function _create_placeholders($fields) { + if(!empty($fields)) { + $db_fields = array(); + foreach($fields as $key => $value) { + // Process expression fields directly into the query + if(array_key_exists($key, $this->_expr_fields)) { + $db_fields[] = $value; + } else { + $db_fields[] = '?'; + } + } + return implode(', ', $db_fields); + } + } + + /** + * Helper method that filters a column/value array returning only those + * columns that belong to a compound primary key. + * + * If the key contains a column that does not exist in the given array, + * a null value will be returned for it. + */ + protected function _get_compound_id_column_values($value) { + $filtered = array(); + foreach($this->_get_id_column_name() as $key) { + $filtered[$key] = isset($value[$key]) ? $value[$key] : null; + } + return $filtered; + } + + /** + * Helper method that filters an array containing compound column/value + * arrays. + */ + protected function _get_compound_id_column_values_array($values) { + $filtered = array(); + foreach($values as $value) { + $filtered[] = $this->_get_compound_id_column_values($value); + } + return $filtered; + } + + /** + * Add a WHERE column = value clause to your query. Each time + * this is called in the chain, an additional WHERE will be + * added, and these will be ANDed together when the final query + * is built. + * + * If you use an array in $column_name, a new clause will be + * added for each element. In this case, $value is ignored. + */ + public function where($column_name, $value=null) { + return $this->where_equal($column_name, $value); + } + + /** + * More explicitly named version of for the where() method. + * Can be used if preferred. + */ + public function where_equal($column_name, $value=null) { + return $this->_add_simple_where($column_name, '=', $value); + } + + /** + * Add a WHERE column != value clause to your query. + */ + public function where_not_equal($column_name, $value=null) { + return $this->_add_simple_where($column_name, '!=', $value); + } + + /** + * Special method to query the table by its primary key + * + * If primary key is compound, only the columns that + * belong to they key will be used for the query + */ + public function where_id_is($id) { + return (is_array($this->_get_id_column_name())) ? + $this->where($this->_get_compound_id_column_values($id), null) : + $this->where($this->_get_id_column_name(), $id); + } + + /** + * Allows adding a WHERE clause that matches any of the conditions + * specified in the array. Each element in the associative array will + * be a different condition, where the key will be the column name. + * + * By default, an equal operator will be used against all columns, but + * it can be overriden for any or every column using the second parameter. + * + * Each condition will be ORed together when added to the final query. + */ + public function where_any_is($values, $operator='=') { + $data = array(); + $query = array("(("); + $first = true; + foreach ($values as $value) { + if ($first) { + $first = false; + } else { + $query[] = ") OR ("; + } + $firstsub = true; + foreach($value as $key => $item) { + $op = is_string($operator) ? $operator : (isset($operator[$key]) ? $operator[$key] : '='); + if ($firstsub) { + $firstsub = false; + } else { + $query[] = "AND"; + } + $query[] = $this->_quote_identifier($key); + $data[] = $item; + $query[] = $op . " ?"; + } + } + $query[] = "))"; + return $this->where_raw(join(' ', $query), $data); + } + + /** + * Similar to where_id_is() but allowing multiple primary keys. + * + * If primary key is compound, only the columns that + * belong to they key will be used for the query + */ + public function where_id_in($ids) { + return (is_array($this->_get_id_column_name())) ? + $this->where_any_is($this->_get_compound_id_column_values_array($ids)) : + $this->where_in($this->_get_id_column_name(), $ids); + } + + /** + * Add a WHERE ... LIKE clause to your query. + */ + public function where_like($column_name, $value=null) { + return $this->_add_simple_where($column_name, 'LIKE', $value); + } + + /** + * Add where WHERE ... NOT LIKE clause to your query. + */ + public function where_not_like($column_name, $value=null) { + return $this->_add_simple_where($column_name, 'NOT LIKE', $value); + } + + /** + * Add a WHERE ... > clause to your query + */ + public function where_gt($column_name, $value=null) { + return $this->_add_simple_where($column_name, '>', $value); + } + + /** + * Add a WHERE ... < clause to your query + */ + public function where_lt($column_name, $value=null) { + return $this->_add_simple_where($column_name, '<', $value); + } + + /** + * Add a WHERE ... >= clause to your query + */ + public function where_gte($column_name, $value=null) { + return $this->_add_simple_where($column_name, '>=', $value); + } + + /** + * Add a WHERE ... <= clause to your query + */ + public function where_lte($column_name, $value=null) { + return $this->_add_simple_where($column_name, '<=', $value); + } + + /** + * Add a WHERE ... IN clause to your query + */ + public function where_in($column_name, $values) { + return $this->_add_where_placeholder($column_name, 'IN', $values); + } + + /** + * Add a WHERE ... NOT IN clause to your query + */ + public function where_not_in($column_name, $values) { + return $this->_add_where_placeholder($column_name, 'NOT IN', $values); + } + + /** + * Add a WHERE column IS NULL clause to your query + */ + public function where_null($column_name) { + return $this->_add_where_no_value($column_name, "IS NULL"); + } + + /** + * Add a WHERE column IS NOT NULL clause to your query + */ + public function where_not_null($column_name) { + return $this->_add_where_no_value($column_name, "IS NOT NULL"); + } + + /** + * Add a raw WHERE clause to the query. The clause should + * contain question mark placeholders, which will be bound + * to the parameters supplied in the second argument. + */ + public function where_raw($clause, $parameters=array()) { + return $this->_add_where($clause, $parameters); + } + + /** + * Add a LIMIT to the query + */ + public function limit($limit) { + $this->_limit = $limit; + return $this; + } + + /** + * Add an OFFSET to the query + */ + public function offset($offset) { + $this->_offset = $offset; + return $this; + } + + /** + * Add an ORDER BY clause to the query + */ + protected function _add_order_by($column_name, $ordering) { + $column_name = $this->_quote_identifier($column_name); + $this->_order_by[] = "{$column_name} {$ordering}"; + return $this; + } + + /** + * Add an ORDER BY column DESC clause + */ + public function order_by_desc($column_name) { + return $this->_add_order_by($column_name, 'DESC'); + } + + /** + * Add an ORDER BY column ASC clause + */ + public function order_by_asc($column_name) { + return $this->_add_order_by($column_name, 'ASC'); + } + + /** + * Add an unquoted expression as an ORDER BY clause + */ + public function order_by_expr($clause) { + $this->_order_by[] = $clause; + return $this; + } + + /** + * Add a column to the list of columns to GROUP BY + */ + public function group_by($column_name) { + $column_name = $this->_quote_identifier($column_name); + $this->_group_by[] = $column_name; + return $this; + } + + /** + * Add an unquoted expression to the list of columns to GROUP BY + */ + public function group_by_expr($expr) { + $this->_group_by[] = $expr; + return $this; + } + + /** + * Add a HAVING column = value clause to your query. Each time + * this is called in the chain, an additional HAVING will be + * added, and these will be ANDed together when the final query + * is built. + * + * If you use an array in $column_name, a new clause will be + * added for each element. In this case, $value is ignored. + */ + public function having($column_name, $value=null) { + return $this->having_equal($column_name, $value); + } + + /** + * More explicitly named version of for the having() method. + * Can be used if preferred. + */ + public function having_equal($column_name, $value=null) { + return $this->_add_simple_having($column_name, '=', $value); + } + + /** + * Add a HAVING column != value clause to your query. + */ + public function having_not_equal($column_name, $value=null) { + return $this->_add_simple_having($column_name, '!=', $value); + } + + /** + * Special method to query the table by its primary key. + * + * If primary key is compound, only the columns that + * belong to they key will be used for the query + */ + public function having_id_is($id) { + return (is_array($this->_get_id_column_name())) ? + $this->having($this->_get_compound_id_column_values($id), null) : + $this->having($this->_get_id_column_name(), $id); + } + + /** + * Add a HAVING ... LIKE clause to your query. + */ + public function having_like($column_name, $value=null) { + return $this->_add_simple_having($column_name, 'LIKE', $value); + } + + /** + * Add where HAVING ... NOT LIKE clause to your query. + */ + public function having_not_like($column_name, $value=null) { + return $this->_add_simple_having($column_name, 'NOT LIKE', $value); + } + + /** + * Add a HAVING ... > clause to your query + */ + public function having_gt($column_name, $value=null) { + return $this->_add_simple_having($column_name, '>', $value); + } + + /** + * Add a HAVING ... < clause to your query + */ + public function having_lt($column_name, $value=null) { + return $this->_add_simple_having($column_name, '<', $value); + } + + /** + * Add a HAVING ... >= clause to your query + */ + public function having_gte($column_name, $value=null) { + return $this->_add_simple_having($column_name, '>=', $value); + } + + /** + * Add a HAVING ... <= clause to your query + */ + public function having_lte($column_name, $value=null) { + return $this->_add_simple_having($column_name, '<=', $value); + } + + /** + * Add a HAVING ... IN clause to your query + */ + public function having_in($column_name, $values=null) { + return $this->_add_having_placeholder($column_name, 'IN', $values); + } + + /** + * Add a HAVING ... NOT IN clause to your query + */ + public function having_not_in($column_name, $values=null) { + return $this->_add_having_placeholder($column_name, 'NOT IN', $values); + } + + /** + * Add a HAVING column IS NULL clause to your query + */ + public function having_null($column_name) { + return $this->_add_having_no_value($column_name, 'IS NULL'); + } + + /** + * Add a HAVING column IS NOT NULL clause to your query + */ + public function having_not_null($column_name) { + return $this->_add_having_no_value($column_name, 'IS NOT NULL'); + } + + /** + * Add a raw HAVING clause to the query. The clause should + * contain question mark placeholders, which will be bound + * to the parameters supplied in the second argument. + */ + public function having_raw($clause, $parameters=array()) { + return $this->_add_having($clause, $parameters); + } + + /** + * Build a SELECT statement based on the clauses that have + * been passed to this instance by chaining method calls. + */ + protected function _build_select() { + // If the query is raw, just set the $this->_values to be + // the raw query parameters and return the raw query + if ($this->_is_raw_query) { + $this->_values = $this->_raw_parameters; + return $this->_raw_query; + } + + // Build and return the full SELECT statement by concatenating + // the results of calling each separate builder method. + return $this->_join_if_not_empty(" ", array( + $this->_build_select_start(), + $this->_build_join(), + $this->_build_where(), + $this->_build_group_by(), + $this->_build_having(), + $this->_build_order_by(), + $this->_build_limit(), + $this->_build_offset(), + )); + } + + /** + * Build the start of the SELECT statement + */ + protected function _build_select_start() { + $fragment = 'SELECT '; + $result_columns = join(', ', $this->_result_columns); + + if (!is_null($this->_limit) && + self::$_config[$this->_connection_name]['limit_clause_style'] === ORM::LIMIT_STYLE_TOP_N) { + $fragment .= "TOP {$this->_limit} "; + } + + if ($this->_distinct) { + $result_columns = 'DISTINCT ' . $result_columns; + } + + $fragment .= "{$result_columns} FROM " . $this->_quote_identifier($this->_table_name); + + if (!is_null($this->_table_alias)) { + $fragment .= " " . $this->_quote_identifier($this->_table_alias); + } + return $fragment; + } + + /** + * Build the JOIN sources + */ + protected function _build_join() { + if (count($this->_join_sources) === 0) { + return ''; + } + + return join(" ", $this->_join_sources); + } + + /** + * Build the WHERE clause(s) + */ + protected function _build_where() { + return $this->_build_conditions('where'); + } + + /** + * Build the HAVING clause(s) + */ + protected function _build_having() { + return $this->_build_conditions('having'); + } + + /** + * Build GROUP BY + */ + protected function _build_group_by() { + if (count($this->_group_by) === 0) { + return ''; + } + return "GROUP BY " . join(", ", $this->_group_by); + } + + /** + * Build a WHERE or HAVING clause + * @param string $type + * @return string + */ + protected function _build_conditions($type) { + $conditions_class_property_name = "_{$type}_conditions"; + // If there are no clauses, return empty string + if (count($this->$conditions_class_property_name) === 0) { + return ''; + } + + $conditions = array(); + foreach ($this->$conditions_class_property_name as $condition) { + $conditions[] = $condition[self::CONDITION_FRAGMENT]; + $this->_values = array_merge($this->_values, $condition[self::CONDITION_VALUES]); + } + + return strtoupper($type) . " " . join(" AND ", $conditions); + } + + /** + * Build ORDER BY + */ + protected function _build_order_by() { + if (count($this->_order_by) === 0) { + return ''; + } + return "ORDER BY " . join(", ", $this->_order_by); + } + + /** + * Build LIMIT + */ + protected function _build_limit() { + $fragment = ''; + if (!is_null($this->_limit) && + self::$_config[$this->_connection_name]['limit_clause_style'] == ORM::LIMIT_STYLE_LIMIT) { + if (self::get_db($this->_connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') { + $fragment = 'ROWS'; + } else { + $fragment = 'LIMIT'; + } + $fragment .= " {$this->_limit}"; + } + return $fragment; + } + + /** + * Build OFFSET + */ + protected function _build_offset() { + if (!is_null($this->_offset)) { + $clause = 'OFFSET'; + if (self::get_db($this->_connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') { + $clause = 'TO'; + } + return "$clause " . $this->_offset; + } + return ''; + } + + /** + * Wrapper around PHP's join function which + * only adds the pieces if they are not empty. + */ + protected function _join_if_not_empty($glue, $pieces) { + $filtered_pieces = array(); + foreach ($pieces as $piece) { + if (is_string($piece)) { + $piece = trim($piece); + } + if (!empty($piece)) { + $filtered_pieces[] = $piece; + } + } + return join($glue, $filtered_pieces); + } + + /** + * Quote a string that is used as an identifier + * (table names, column names etc). This method can + * also deal with dot-separated identifiers eg table.column + */ + protected function _quote_one_identifier($identifier) { + $parts = explode('.', $identifier); + $parts = array_map(array($this, '_quote_identifier_part'), $parts); + return join('.', $parts); + } + + /** + * Quote a string that is used as an identifier + * (table names, column names etc) or an array containing + * multiple identifiers. This method can also deal with + * dot-separated identifiers eg table.column + */ + protected function _quote_identifier($identifier) { + if (is_array($identifier)) { + $result = array_map(array($this, '_quote_one_identifier'), $identifier); + return join(', ', $result); + } else { + return $this->_quote_one_identifier($identifier); + } + } + + /** + * This method performs the actual quoting of a single + * part of an identifier, using the identifier quote + * character specified in the config (or autodetected). + */ + protected function _quote_identifier_part($part) { + if ($part === '*') { + return $part; + } + + $quote_character = self::$_config[$this->_connection_name]['identifier_quote_character']; + // double up any identifier quotes to escape them + return $quote_character . + str_replace($quote_character, + $quote_character . $quote_character, + $part + ) . $quote_character; + } + + /** + * Create a cache key for the given query and parameters. + */ + protected static function _create_cache_key($query, $parameters, $table_name = null, $connection_name = self::DEFAULT_CONNECTION) { + if(isset(self::$_config[$connection_name]['create_cache_key']) and is_callable(self::$_config[$connection_name]['create_cache_key'])){ + return call_user_func_array(self::$_config[$connection_name]['create_cache_key'], array($query, $parameters, $table_name, $connection_name)); + } + $parameter_string = join(',', $parameters); + $key = $query . ':' . $parameter_string; + return sha1($key); + } + + /** + * Check the query cache for the given cache key. If a value + * is cached for the key, return the value. Otherwise, return false. + */ + protected static function _check_query_cache($cache_key, $table_name = null, $connection_name = self::DEFAULT_CONNECTION) { + if(isset(self::$_config[$connection_name]['check_query_cache']) and is_callable(self::$_config[$connection_name]['check_query_cache'])){ + return call_user_func_array(self::$_config[$connection_name]['check_query_cache'], array($cache_key, $table_name, $connection_name)); + } elseif (isset(self::$_query_cache[$connection_name][$cache_key])) { + return self::$_query_cache[$connection_name][$cache_key]; + } + return false; + } + + /** + * Clear the query cache + */ + public static function clear_cache($table_name = null, $connection_name = self::DEFAULT_CONNECTION) { + self::$_query_cache = array(); + if(isset(self::$_config[$connection_name]['clear_cache']) and is_callable(self::$_config[$connection_name]['clear_cache'])){ + return call_user_func_array(self::$_config[$connection_name]['clear_cache'], array($table_name, $connection_name)); + } + } + + /** + * Add the given value to the query cache. + */ + protected static function _cache_query_result($cache_key, $value, $table_name = null, $connection_name = self::DEFAULT_CONNECTION) { + if(isset(self::$_config[$connection_name]['cache_query_result']) and is_callable(self::$_config[$connection_name]['cache_query_result'])){ + return call_user_func_array(self::$_config[$connection_name]['cache_query_result'], array($cache_key, $value, $table_name, $connection_name)); + } elseif (!isset(self::$_query_cache[$connection_name])) { + self::$_query_cache[$connection_name] = array(); + } + self::$_query_cache[$connection_name][$cache_key] = $value; + } + + /** + * Execute the SELECT query that has been built up by chaining methods + * on this class. Return an array of rows as associative arrays. + */ + protected function _run() { + $query = $this->_build_select(); + $caching_enabled = self::$_config[$this->_connection_name]['caching']; + + if ($caching_enabled) { + $cache_key = self::_create_cache_key($query, $this->_values, $this->_table_name, $this->_connection_name); + $cached_result = self::_check_query_cache($cache_key, $this->_table_name, $this->_connection_name); + + if ($cached_result !== false) { + $this->_reset_idiorm_state(); + return $cached_result; + } + } + + self::_execute($query, $this->_values, $this->_connection_name); + $statement = self::get_last_statement(); + + $rows = array(); + while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { + $rows[] = $row; + } + + if ($caching_enabled) { + self::_cache_query_result($cache_key, $rows, $this->_table_name, $this->_connection_name); + } + + $this->_reset_idiorm_state(); + return $rows; + } + + /** + * Reset the Idiorm instance state + */ + private function _reset_idiorm_state() { + $this->_values = array(); + $this->_result_columns = array('*'); + $this->_using_default_result_columns = true; + } + + /** + * Return the raw data wrapped by this ORM + * instance as an associative array. Column + * names may optionally be supplied as arguments, + * if so, only those keys will be returned. + */ + public function as_array() { + if (func_num_args() === 0) { + return $this->_data; + } + $args = func_get_args(); + return array_intersect_key($this->_data, array_flip($args)); + } + + /** + * Return the value of a property of this object (database row) + * or null if not present. + * + * If a column-names array is passed, it will return a associative array + * with the value of each column or null if it is not present. + */ + public function get($key) { + if (is_array($key)) { + $result = array(); + foreach($key as $column) { + $result[$column] = isset($this->_data[$column]) ? $this->_data[$column] : null; + } + return $result; + } else { + return isset($this->_data[$key]) ? $this->_data[$key] : null; + } + } + + /** + * Return the name of the column in the database table which contains + * the primary key ID of the row. + */ + protected function _get_id_column_name() { + if (!is_null($this->_instance_id_column)) { + return $this->_instance_id_column; + } + if (isset(self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name])) { + return self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name]; + } + return self::$_config[$this->_connection_name]['id_column']; + } + + /** + * Get the primary key ID of this object. + */ + public function id($disallow_null = false) { + $id = $this->get($this->_get_id_column_name()); + + if ($disallow_null) { + if (is_array($id)) { + foreach ($id as $id_part) { + if ($id_part === null) { + throw new Exception('Primary key ID contains null value(s)'); + } + } + } else if ($id === null) { + throw new Exception('Primary key ID missing from row or is null'); + } + } + + return $id; + } + + /** + * Set a property to a particular value on this object. + * To set multiple properties at once, pass an associative array + * as the first parameter and leave out the second parameter. + * Flags the properties as 'dirty' so they will be saved to the + * database when save() is called. + */ + public function set($key, $value = null) { + return $this->_set_orm_property($key, $value); + } + + /** + * Set a property to a particular value on this object. + * To set multiple properties at once, pass an associative array + * as the first parameter and leave out the second parameter. + * Flags the properties as 'dirty' so they will be saved to the + * database when save() is called. + * @param string|array $key + * @param string|null $value + */ + public function set_expr($key, $value = null) { + return $this->_set_orm_property($key, $value, true); + } + + /** + * Set a property on the ORM object. + * @param string|array $key + * @param string|null $value + * @param bool $raw Whether this value should be treated as raw or not + */ + protected function _set_orm_property($key, $value = null, $expr = false) { + if (!is_array($key)) { + $key = array($key => $value); + } + foreach ($key as $field => $value) { + $this->_data[$field] = $value; + $this->_dirty_fields[$field] = $value; + if (false === $expr and isset($this->_expr_fields[$field])) { + unset($this->_expr_fields[$field]); + } else if (true === $expr) { + $this->_expr_fields[$field] = true; + } + } + return $this; + } + + /** + * Check whether the given field has been changed since this + * object was saved. + */ + public function is_dirty($key) { + return array_key_exists($key, $this->_dirty_fields); + } + + /** + * Check whether the model was the result of a call to create() or not + * @return bool + */ + public function is_new() { + return $this->_is_new; + } + + /** + * Save any fields which have been modified on this object + * to the database. + */ + public function save() { + $query = array(); + + // remove any expression fields as they are already baked into the query + $values = array_values(array_diff_key($this->_dirty_fields, $this->_expr_fields)); + + if (!$this->_is_new) { // UPDATE + // If there are no dirty values, do nothing + if (empty($values) && empty($this->_expr_fields)) { + return true; + } + $query = $this->_build_update(); + $id = $this->id(true); + if (is_array($id)) { + $values = array_merge($values, array_values($id)); + } else { + $values[] = $id; + } + } else { // INSERT + $query = $this->_build_insert(); + } + + $success = self::_execute($query, $values, $this->_connection_name); + $caching_auto_clear_enabled = self::$_config[$this->_connection_name]['caching_auto_clear']; + if($caching_auto_clear_enabled){ + self::clear_cache($this->_table_name, $this->_connection_name); + } + // If we've just inserted a new record, set the ID of this object + if ($this->_is_new) { + $this->_is_new = false; + if ($this->count_null_id_columns() != 0) { + $db = self::get_db($this->_connection_name); + if($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') { + // it may return several columns if a compound primary + // key is used + $row = self::get_last_statement()->fetch(PDO::FETCH_ASSOC); + foreach($row as $key => $value) { + $this->_data[$key] = $value; + } + } else { + $column = $this->_get_id_column_name(); + // if the primary key is compound, assign the last inserted id + // to the first column + if (is_array($column)) { + $column = reset($column); + } + $this->_data[$column] = $db->lastInsertId(); + } + } + } + + $this->_dirty_fields = $this->_expr_fields = array(); + return $success; + } + + /** + * Add a WHERE clause for every column that belongs to the primary key + */ + public function _add_id_column_conditions(&$query) { + $query[] = "WHERE"; + $keys = is_array($this->_get_id_column_name()) ? $this->_get_id_column_name() : array( $this->_get_id_column_name() ); + $first = true; + foreach($keys as $key) { + if ($first) { + $first = false; + } + else { + $query[] = "AND"; + } + $query[] = $this->_quote_identifier($key); + $query[] = "= ?"; + } + } + + /** + * Build an UPDATE query + */ + protected function _build_update() { + $query = array(); + $query[] = "UPDATE {$this->_quote_identifier($this->_table_name)} SET"; + + $field_list = array(); + foreach ($this->_dirty_fields as $key => $value) { + if(!array_key_exists($key, $this->_expr_fields)) { + $value = '?'; + } + $field_list[] = "{$this->_quote_identifier($key)} = $value"; + } + $query[] = join(", ", $field_list); + $this->_add_id_column_conditions($query); + return join(" ", $query); + } + + /** + * Build an INSERT query + */ + protected function _build_insert() { + $query[] = "INSERT INTO"; + $query[] = $this->_quote_identifier($this->_table_name); + $field_list = array_map(array($this, '_quote_identifier'), array_keys($this->_dirty_fields)); + $query[] = "(" . join(", ", $field_list) . ")"; + $query[] = "VALUES"; + + $placeholders = $this->_create_placeholders($this->_dirty_fields); + $query[] = "({$placeholders})"; + + if (self::get_db($this->_connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') { + $query[] = 'RETURNING ' . $this->_quote_identifier($this->_get_id_column_name()); + } + + return join(" ", $query); + } + + /** + * Delete this record from the database + */ + public function delete() { + $query = array( + "DELETE FROM", + $this->_quote_identifier($this->_table_name) + ); + $this->_add_id_column_conditions($query); + return self::_execute(join(" ", $query), is_array($this->id(true)) ? array_values($this->id(true)) : array($this->id(true)), $this->_connection_name); + } + + /** + * Delete many records from the database + */ + public function delete_many() { + // Build and return the full DELETE statement by concatenating + // the results of calling each separate builder method. + $query = $this->_join_if_not_empty(" ", array( + "DELETE FROM", + $this->_quote_identifier($this->_table_name), + $this->_build_where(), + )); + + return self::_execute($query, $this->_values, $this->_connection_name); + } + + // --------------------- // + // --- ArrayAccess --- // + // --------------------- // + + public function offsetExists($key) { + return array_key_exists($key, $this->_data); + } + + public function offsetGet($key) { + return $this->get($key); + } + + public function offsetSet($key, $value) { + if(is_null($key)) { + throw new InvalidArgumentException('You must specify a key/array index.'); + } + $this->set($key, $value); + } + + public function offsetUnset($key) { + unset($this->_data[$key]); + unset($this->_dirty_fields[$key]); + } + + // --------------------- // + // --- MAGIC METHODS --- // + // --------------------- // + public function __get($key) { + return $this->offsetGet($key); + } + + public function __set($key, $value) { + $this->offsetSet($key, $value); + } + + public function __unset($key) { + $this->offsetUnset($key); + } + + + public function __isset($key) { + return $this->offsetExists($key); + } + + /** + * Magic method to capture calls to undefined class methods. + * In this case we are attempting to convert camel case formatted + * methods into underscore formatted methods. + * + * This allows us to call ORM methods using camel case and remain + * backwards compatible. + * + * @param string $name + * @param array $arguments + * @return ORM + */ + public function __call($name, $arguments) + { + $method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name)); + + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } else { + throw new IdiormMethodMissingException("Method $name() does not exist in class " . get_class($this)); + } + } + + /** + * Magic method to capture calls to undefined static class methods. + * In this case we are attempting to convert camel case formatted + * methods into underscore formatted methods. + * + * This allows us to call ORM methods using camel case and remain + * backwards compatible. + * + * @param string $name + * @param array $arguments + * @return ORM + */ + public static function __callStatic($name, $arguments) + { + $method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name)); + + return call_user_func_array(array('ORM', $method), $arguments); + } + } + + /** + * A class to handle str_replace operations that involve quoted strings + * @example IdiormString::str_replace_outside_quotes('?', '%s', 'columnA = "Hello?" AND columnB = ?'); + * @example IdiormString::value('columnA = "Hello?" AND columnB = ?')->replace_outside_quotes('?', '%s'); + * @author Jeff Roberson <[email protected]> + * @author Simon Holywell <[email protected]> + * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer + */ + class IdiormString { + protected $subject; + protected $search; + protected $replace; + + /** + * Get an easy to use instance of the class + * @param string $subject + * @return \self + */ + public static function value($subject) { + return new self($subject); + } + + /** + * Shortcut method: Replace all occurrences of the search string with the replacement + * string where they appear outside quotes. + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + public static function str_replace_outside_quotes($search, $replace, $subject) { + return self::value($subject)->replace_outside_quotes($search, $replace); + } + + /** + * Set the base string object + * @param string $subject + */ + public function __construct($subject) { + $this->subject = (string) $subject; + } + + /** + * Replace all occurrences of the search string with the replacement + * string where they appear outside quotes + * @param string $search + * @param string $replace + * @return string + */ + public function replace_outside_quotes($search, $replace) { + $this->search = $search; + $this->replace = $replace; + return $this->_str_replace_outside_quotes(); + } + + /** + * Validate an input string and perform a replace on all ocurrences + * of $this->search with $this->replace + * @author Jeff Roberson <[email protected]> + * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer + * @return string + */ + protected function _str_replace_outside_quotes(){ + $re_valid = '/ + # Validate string having embedded quoted substrings. + ^ # Anchor to start of string. + (?: # Zero or more string chunks. + "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" # Either a double quoted chunk, + | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' # or a single quoted chunk, + | [^\'"\\\\]+ # or an unquoted chunk (no escapes). + )* # Zero or more string chunks. + \z # Anchor to end of string. + /sx'; + if (!preg_match($re_valid, $this->subject)) { + throw new IdiormStringException("Subject string is not valid in the replace_outside_quotes context."); + } + $re_parse = '/ + # Match one chunk of a valid string having embedded quoted substrings. + ( # Either $1: Quoted chunk. + "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" # Either a double quoted chunk, + | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' # or a single quoted chunk. + ) # End $1: Quoted chunk. + | ([^\'"\\\\]+) # or $2: an unquoted chunk (no escapes). + /sx'; + return preg_replace_callback($re_parse, array($this, '_str_replace_outside_quotes_cb'), $this->subject); + } + + /** + * Process each matching chunk from preg_replace_callback replacing + * each occurrence of $this->search with $this->replace + * @author Jeff Roberson <[email protected]> + * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer + * @param array $matches + * @return string + */ + protected function _str_replace_outside_quotes_cb($matches) { + // Return quoted string chunks (in group $1) unaltered. + if ($matches[1]) return $matches[1]; + // Process only unquoted chunks (in group $2). + return preg_replace('/'. preg_quote($this->search, '/') .'/', + $this->replace, $matches[2]); + } + } + + /** + * A result set class for working with collections of model instances + * @author Simon Holywell <[email protected]> + * @method null setResults(array $results) + * @method array getResults() + */ + class IdiormResultSet implements Countable, IteratorAggregate, ArrayAccess, Serializable { + /** + * The current result set as an array + * @var array + */ + protected $_results = array(); + + /** + * Optionally set the contents of the result set by passing in array + * @param array $results + */ + public function __construct(array $results = array()) { + $this->set_results($results); + } + + /** + * Set the contents of the result set by passing in array + * @param array $results + */ + public function set_results(array $results) { + $this->_results = $results; + } + + /** + * Get the current result set as an array + * @return array + */ + public function get_results() { + return $this->_results; + } + + /** + * Get the current result set as an array + * @return array + */ + public function as_array() { + return $this->get_results(); + } + + /** + * Get the number of records in the result set + * @return int + */ + public function count() { + return count($this->_results); + } + + /** + * Get an iterator for this object. In this case it supports foreaching + * over the result set. + * @return \ArrayIterator + */ + public function getIterator() { + return new ArrayIterator($this->_results); + } + + /** + * ArrayAccess + * @param int|string $offset + * @return bool + */ + public function offsetExists($offset) { + return isset($this->_results[$offset]); + } + + /** + * ArrayAccess + * @param int|string $offset + * @return mixed + */ + public function offsetGet($offset) { + return $this->_results[$offset]; + } + + /** + * ArrayAccess + * @param int|string $offset + * @param mixed $value + */ + public function offsetSet($offset, $value) { + $this->_results[$offset] = $value; + } + + /** + * ArrayAccess + * @param int|string $offset + */ + public function offsetUnset($offset) { + unset($this->_results[$offset]); + } + + /** + * Serializable + * @return string + */ + public function serialize() { + return serialize($this->_results); + } + + /** + * Serializable + * @param string $serialized + * @return array + */ + public function unserialize($serialized) { + return unserialize($serialized); + } + + /** + * Call a method on all models in a result set. This allows for method + * chaining such as setting a property on all models in a result set or + * any other batch operation across models. + * @example ORM::for_table('Widget')->find_many()->set('field', 'value')->save(); + * @param string $method + * @param array $params + * @return \IdiormResultSet + */ + public function __call($method, $params = array()) { + foreach($this->_results as $model) { + if (method_exists($model, $method)) { + call_user_func_array(array($model, $method), $params); + } else { + throw new IdiormMethodMissingException("Method $method() does not exist in class " . get_class($this)); + } + } + return $this; + } + } + + /** + * A placeholder for exceptions eminating from the IdiormString class + */ + class IdiormStringException extends Exception {} + + class IdiormMethodMissingException extends Exception {} diff --git a/vendor/mervick/material-design-icons/.gitignore b/vendor/mervick/material-design-icons/.gitignore new file mode 100644 index 000000000..2b9b3875f --- /dev/null +++ b/vendor/mervick/material-design-icons/.gitignore @@ -0,0 +1,28 @@ +# phpstorm project files +.idea + +# netbeans project files +nbproject + +# zend studio for eclipse project files +.buildpath +.project +.settings + +# windows thumbnail cache +Thumbs.db + +# Mac DS_Store Files +.DS_Store + +# Compass config +config.rb + +# Sass cache +.sass-cache + +# Node modules +node_modules + +# Vendors +vendor diff --git a/vendor/mervick/material-design-icons/Gruntfile.js b/vendor/mervick/material-design-icons/Gruntfile.js new file mode 100644 index 000000000..d70e7305d --- /dev/null +++ b/vendor/mervick/material-design-icons/Gruntfile.js @@ -0,0 +1,63 @@ +/* jshint nod: true */ +"use strict"; + +var livereload = { + host: 'localhost', + port: 35729, +}; + +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + sass: { + dist: { + options: { + sourcemap: 'none', + unixNewlines: true, + compass: true, + lineNumbers: false, + }, + files: { + 'css/material-icons.css' : 'scss/material-icons.scss' + } + }, + demo: { + options: { + sourcemap: 'none', + unixNewlines: true, + compass: true, + lineNumbers: true, + }, + files: { + 'demo/style/main.css' : 'demo/style/main.scss' + } + }, + }, + cssmin: { + options: { + sourceMap: true + }, + target: { + files: { + 'css/material-icons.min.css': ['css/material-icons.css'] + } + } + }, + watch: { + css: { + files: [ + 'scss/*.scss', + 'demo/style/*.scss' + ], + tasks: ['sass'], + options: { + livereload: livereload + } + } + } + }); + grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.registerTask('default', ['sass', 'watch']); +}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/Gulpfile.js b/vendor/mervick/material-design-icons/Gulpfile.js new file mode 100644 index 000000000..df47545d1 --- /dev/null +++ b/vendor/mervick/material-design-icons/Gulpfile.js @@ -0,0 +1,141 @@ +/* jshint node: true */ +"use strict"; + +var _ = require('lodash'), + fs = require('fs'), + gulp = require('gulp'), + gutil = require('gulp-util'), + changed = require('gulp-changed'), + File = require('vinyl'), + path = require('path'), + through2 = require('through2'); + + +var sassClassPrefix = 'md-css-prefix', + modulePath = './node_modules/material-design-icons', + srcCodepoints = modulePath + '/iconfont/codepoints', + fontsPath = './fonts', + dstCodepoints = fontsPath + '/codepoints', + sassFile = 'scss/_icons.scss', + sassHeader = '@import "variables";\n\n', + demoDataFile = 'demo/js/data.js' + + +function generateSassCodepoints(filepath) { + return through2.obj(function(codepointsFile, encoding, callback) { + function codepointsToSass(codepoints) { + return _(codepoints) + .split('\n') + .reject(_.isEmpty) + .reduce(function(file, line) { + let codepoint = line.split(' '); + file += '.#{$' + sassClassPrefix + '}-' + codepoint[0].replace(/_/g, '-') + + ':before { content: "\\' + codepoint[1] + '"; }\n'; + return file; + }, sassHeader); + } + callback(null, new File({ + path: filepath, + contents: new Buffer(codepointsToSass(codepointsFile.contents), 'utf8') + })); + }); +} + + +gulp.task('update-sass', function() { + gulp.src(srcCodepoints) + .pipe(changed(fontsPath, {hasChanged: changed.compareSha1Digest})) + .pipe(generateSassCodepoints(sassFile)) + .pipe(gulp.dest('.')); +}); + +function generateDataCodepoints(filepath) { + return through2.obj(function(codepointsFile, encoding, callback) { + var countIcons = 0, + newIcons = 0; + + function codepoints2obj(codepoints) { + return _(codepoints) + .split('\n') + .reject(_.isEmpty) + .reduce(function(obj, line) { + let codepoint = line.split(' '); + obj[codepoint[0]] = codepoint[1]; + return obj; + }, {}); + } + + function scanCategories(dir, codes) { + var categories = {}; + fs.readdirSync(dir) + .filter(function (file) { + return fs.statSync(path.join(dir, file)).isDirectory() + && fs.existsSync(path.join(dir, file, "svg/production")); + }) + .forEach(function (category) { + categories[category] = {}; + let catPath = path.join(dir, category, "svg/production"); + fs.readdirSync(catPath) + .filter(function(file) { + return file.match(/^ic_(.+?)_\d+px\.svg$/); + }) + .forEach(function(file) { + let matches; + if (matches = /^ic_(.+?)_\d+px\.svg$/.exec(file)) { + let icon = matches[1]; + if (codes[icon]) { + if (!categories[category][icon]) { + categories[category][icon] = codes[icon]; + countIcons ++; + } + } + } + }); + }); + return categories; + } + + function calculateNewIcons(categories, codes, old) { + var cats = categories; + Object.keys(categories).forEach(function(name) { + let category = categories[name]; + Object.keys(category).forEach(function(icon) { + let code = category[icon]; + cats[name][icon] = [code, !old[icon]]; + if (!old[icon]) { + newIcons ++; + } + }); + }); + return cats; + } + + var codes = codepoints2obj(codepointsFile.contents); + var categories = scanCategories(modulePath, codes); + categories = calculateNewIcons(categories, codes, + codepoints2obj(fs.readFileSync(dstCodepoints).toString())); + + gutil.log('Was found', gutil.colors.red(newIcons), 'new icons'); + gutil.log('Total found', gutil.colors.red(countIcons), 'icons.'); + + callback(null, new File({ + path: filepath, + contents: new Buffer( + 'window.data = ' + JSON.stringify(categories) + ';', 'utf8') + })); + }); +} + +gulp.task('update-demo-data', function() { + gulp.src(srcCodepoints) + .pipe(changed(fontsPath, {hasChanged: changed.compareSha1Digest})) + .pipe(generateDataCodepoints(demoDataFile)) + .pipe(gulp.dest('.')); +}); + +gulp.task('update-codepoints', function() { + gulp.src(srcCodepoints) + .pipe(gulp.dest(fontsPath)); +}) + +gulp.task('default', ['update-sass', 'update-demo-data']); diff --git a/vendor/mervick/material-design-icons/LICENSE b/vendor/mervick/material-design-icons/LICENSE new file mode 100644 index 000000000..b110c636d --- /dev/null +++ b/vendor/mervick/material-design-icons/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Andrey Izman <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/mervick/material-design-icons/README.md b/vendor/mervick/material-design-icons/README.md new file mode 100644 index 000000000..7db6ed662 --- /dev/null +++ b/vendor/mervick/material-design-icons/README.md @@ -0,0 +1,91 @@ +# Material Design Icons +[mervick.github.io/material-design-icons](http://mervick.github.io/material-design-icons/) + +Material design icons are the official [icon set](http://www.google.com/design/spec/style/icons.html#icons-system-icons) +from Google that are designed under the [material design guidelines](http://www.google.com/design/spec). + +In the official package the icons uses a typographic feature called [ligatures](http://alistapart.com/article/the-era-of-symbol-fonts), +which allows rendering of an icon glyph simply by using its textual name. + +In this repository also implemented the ability to use the icons in the bootstrap-style, +like in `glyphicon`, `font-awesome` or `ionicons`. + +## Installation + +You may install this package using Component, Composer, Bower or npm: +- Component: `component install mervick/material-design-icons` +- Composer: `composer require mervick/material-design-icons` +- Bower: `bower install bootstrap-material-design-icons` +- npm: `npm install bootstrap-material-design-icons` + +## Usage + +Add to your html page in the `head` area +```html +<link rel="stylesheet" href="css/material-icons.css"> +``` + +#### Where are two ways to use: + +- Ligature, this one is awesome but have some troubles +```html +<i class="material-icons">accessibility</i> +<i class="material-icons">3d_rotation</i> +<i class="material-icons">airline_seat_legroom_reduced</i> +``` + +- Bootstrap-style, +```html +<i class="mdi mdi-accessibility"></i> +<i class="mdi mdi-3d-rotation"></i> +<i class="mdi mdi-airline-seat-legroom-reduced"></i> +``` + +Using bootstrap-style, you can also use additional features such as in Font Awesome: +```html +<!-- Inverse --> +<i class="mdi mdi-attachment mdi-inverse"></i> + +<!-- Animated --> +<i class="mdi mdi-attachment mdi-spin"></i> +<i class="mdi mdi-attachment mdi-pulse"></i> + +<!-- Fixed width --> +<i class="mdi mdi-attachment mdi-fw"></i> + +<!-- Bordered --> +<i class="mdi mdi-attachment mdi-border"></i> + +<!-- Pulled --> +<i class="mdi mdi-attachment pull-left"></i> +<i class="mdi mdi-attachment pull-right"></i> + +<!-- Sizes --> +<i class="mdi mdi-attachment mdi-lg"></i> +<i class="mdi mdi-attachment mdi-2x"></i> +<i class="mdi mdi-attachment mdi-3x"></i> +<i class="mdi mdi-attachment mdi-4x"></i> +<i class="mdi mdi-attachment mdi-5x"></i> + +<!-- Rotations --> +<i class="mdi mdi-attachment mdi-rotate-90"></i> +<i class="mdi mdi-attachment mdi-rotate-180"></i> +<i class="mdi mdi-attachment mdi-rotate-270"></i> + +<!-- Flips --> +<i class="mdi mdi-attachment mdi-flip-horizontal"></i> +<i class="mdi mdi-attachment mdi-flip-vertical"></i> + +<!-- In lists --> +<ul class="mdi-ul"> + <li><i class="mdi-li mdi mdi-keyboard-arrow-right"></i>Lorem ipsum dolor ...</li> +</ul> +``` + + +##License + +- Google Material Design Icons fonts is licensed under the CC-BY-4.0: + - https://github.com/google/material-design-icons/blob/master/LICENSE +- Bootstrap Material Icons CSS and Sass files are licensed under the MIT License: + - http://opensource.org/licenses/mit-license.html diff --git a/vendor/mervick/material-design-icons/bower.json b/vendor/mervick/material-design-icons/bower.json new file mode 100644 index 000000000..84e228fe7 --- /dev/null +++ b/vendor/mervick/material-design-icons/bower.json @@ -0,0 +1,33 @@ +{ + "name": "bootstrap-material-design-icons", + "version": "2.2.0", + "authors": [ + { + "name": "Andrey Izman", + "email": "[email protected]" + } + ], + "description": "Google Material Design Icons For Using With Bootstrap", + "keywords": [ + "icons", + "material", + "material-design", + "google", + "icons-web-font", + "web-font", + "bootstrap" + ], + "license": ["MIT", "CC-BY-4.0"], + "main": [ + "./css/material-icons.*", + "./fonts/MaterialIcons-Regular.*" + ], + "ignore": [ + ".gitignore", + "*.json", + "*.md" + ], + "dependencies": {}, + "devDependencies": {}, + "homepage": "http://github.com/mervick/material-design-icons" +}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/component.json b/vendor/mervick/material-design-icons/component.json new file mode 100644 index 000000000..6c3d840c2 --- /dev/null +++ b/vendor/mervick/material-design-icons/component.json @@ -0,0 +1,37 @@ +{ + "name": "material-design-icons", + "version": "2.2.0", + "repo": "mervick/material-design-icons", + "description": "Google Material Design Icons For Using With Bootstrap", + "authors": [ + { + "name": "Andrey Izman", + "email": "[email protected]" + } + ], + "keywords": [ + "icons", + "material", + "material-design", + "google", + "icons-web-font", + "web-font", + "bootstrap" + ], + "dependencies": {}, + "development": {}, + "license": "MIT, CC-BY-4.0", + "homepage": "http://github.com/mervick/material-design-icons", + "support": { + "source": "http://github.com/mervick/material-design-icons" + }, + "styles": [ + "css/material-icons.css" + ], + "fonts": [ + "fonts/MaterialIcons-Regular.eot", + "fonts/MaterialIcons-Regular.ttf", + "fonts/MaterialIcons-Regular.woff", + "fonts/MaterialIcons-Regular.woff2" + ] +}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/composer.json b/vendor/mervick/material-design-icons/composer.json new file mode 100644 index 000000000..0cf444534 --- /dev/null +++ b/vendor/mervick/material-design-icons/composer.json @@ -0,0 +1,25 @@ +{ + "name": "mervick/material-design-icons", + "version": "2.2.0", + "description": "Google Material Design Icons For Using With Bootstrap", + "authors": [ + { + "name": "Andrey Izman", + "email": "[email protected]" + } + ], + "keywords": [ + "icons", + "material", + "material-design", + "google", + "icons-web-font", + "web-font", + "bootstrap" + ], + "homepage": "http://github.com/mervick/material-design-icons", + "license": ["MIT", "CC-BY-4.0"], + "support": { + "source": "http://github.com/mervick/material-design-icons" + } +} diff --git a/vendor/mervick/material-design-icons/css/material-icons.css b/vendor/mervick/material-design-icons/css/material-icons.css new file mode 100644 index 000000000..19dc74aae --- /dev/null +++ b/vendor/mervick/material-design-icons/css/material-icons.css @@ -0,0 +1,2963 @@ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: "Material Design Icons"; + font-style: normal; + font-weight: 400; + src: url("../fonts/MaterialIcons-Regular.eot?v=2.2.1"); + src: url("../fonts/MaterialIcons-Regular.eot?v=2.2.1#iefix") format("embedded-opentype"), url("../fonts/MaterialIcons-Regular.woff2?v=2.2.1") format("woff2"), url("../fonts/MaterialIcons-Regular.woff?v=2.2.1") format("woff"), url("../fonts/MaterialIcons-Regular.ttf?v=2.2.1") format("truetype"), url("../fonts/MaterialIcons-Regular.svg?v=2.2.1#materialiconsregular") format("svg"); } +.mdi, .material-icons { + font: normal normal normal 14px/1 "Material Design Icons"; + font-size: inherit; + display: inline-block; + text-transform: none; + letter-spacing: normal; + line-height: 1; + position: relative; + word-wrap: normal; + top: 1px; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); } + +.material-icons { + width: 1em; + height: 1em; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for IE. */ + font-feature-settings: 'liga'; } + +/* makes the font 33% larger relative to the icon container */ +.mdi-lg, .mdi-size-lg { + font-size: 1.33333em; + line-height: 0.75em; + vertical-align: -15%; } + +.mdi-2x, .mdi-size-2x { + font-size: 2em; } + +.mdi-3x, .mdi-size-3x { + font-size: 3em; } + +.mdi-4x, .mdi-size-4x { + font-size: 4em; } + +.mdi-5x, .mdi-size-5x { + font-size: 5em; } + +.mdi-fw { + width: 1.28571em; + text-align: center; } + +.mdi-ul { + padding-left: 0; + margin-left: 2.14286em; + list-style-type: none; } + .mdi-ul > li { + position: relative; } + +.mdi-li { + position: absolute; + left: -2.14286em; + width: 2.14286em; + top: 0.14286em; + text-align: center; } + .mdi-li.mdi-lg { + left: -1.85714em; } + +.mdi-border { + padding: .2em .25em .15em; + border: solid 0.08em #eee; + border-radius: .1em; } + +.pull-right { + float: right; } + +.pull-left { + float: left; } + +.mdi.pull-left { + margin-right: .3em; } +.mdi.pull-right { + margin-left: .3em; } + +.mdi-spin { + -webkit-animation: md-spin 2s infinite linear; + animation: md-spin 2s infinite linear; } + +.mdi-pulse { + -webkit-animation: md-spin 1s infinite steps(8); + animation: md-spin 1s infinite steps(8); } + +@-webkit-keyframes md-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); } } +@keyframes md-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); } } +.mdi-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); } + +.mdi-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); } + +.mdi-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); } + +.mdi-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); } + +.mdi-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); } + +:root .mdi-rotate-90, +:root .mdi-rotate-180, +:root .mdi-rotate-270, +:root .mdi-flip-horizontal, +:root .mdi-flip-vertical { + filter: none; } + +.mdi-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; } + +.mdi-stack-1x, .mdi-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; } + +.mdi-stack-1x { + line-height: inherit; } + +.mdi-stack-2x { + font-size: 2em; } + +.mdi-inverse { + color: #fff; } + +.mdi-3d-rotation:before { + content: "\e84d"; } + +.mdi-ac-unit:before { + content: "\eb3b"; } + +.mdi-access-alarm:before { + content: "\e190"; } + +.mdi-access-alarms:before { + content: "\e191"; } + +.mdi-access-time:before { + content: "\e192"; } + +.mdi-accessibility:before { + content: "\e84e"; } + +.mdi-accessible:before { + content: "\e914"; } + +.mdi-account-balance:before { + content: "\e84f"; } + +.mdi-account-balance-wallet:before { + content: "\e850"; } + +.mdi-account-box:before { + content: "\e851"; } + +.mdi-account-circle:before { + content: "\e853"; } + +.mdi-adb:before { + content: "\e60e"; } + +.mdi-add:before { + content: "\e145"; } + +.mdi-add-a-photo:before { + content: "\e439"; } + +.mdi-add-alarm:before { + content: "\e193"; } + +.mdi-add-alert:before { + content: "\e003"; } + +.mdi-add-box:before { + content: "\e146"; } + +.mdi-add-circle:before { + content: "\e147"; } + +.mdi-add-circle-outline:before { + content: "\e148"; } + +.mdi-add-location:before { + content: "\e567"; } + +.mdi-add-shopping-cart:before { + content: "\e854"; } + +.mdi-add-to-photos:before { + content: "\e39d"; } + +.mdi-add-to-queue:before { + content: "\e05c"; } + +.mdi-adjust:before { + content: "\e39e"; } + +.mdi-airline-seat-flat:before { + content: "\e630"; } + +.mdi-airline-seat-flat-angled:before { + content: "\e631"; } + +.mdi-airline-seat-individual-suite:before { + content: "\e632"; } + +.mdi-airline-seat-legroom-extra:before { + content: "\e633"; } + +.mdi-airline-seat-legroom-normal:before { + content: "\e634"; } + +.mdi-airline-seat-legroom-reduced:before { + content: "\e635"; } + +.mdi-airline-seat-recline-extra:before { + content: "\e636"; } + +.mdi-airline-seat-recline-normal:before { + content: "\e637"; } + +.mdi-airplanemode-active:before { + content: "\e195"; } + +.mdi-airplanemode-inactive:before { + content: "\e194"; } + +.mdi-airplay:before { + content: "\e055"; } + +.mdi-airport-shuttle:before { + content: "\eb3c"; } + +.mdi-alarm:before { + content: "\e855"; } + +.mdi-alarm-add:before { + content: "\e856"; } + +.mdi-alarm-off:before { + content: "\e857"; } + +.mdi-alarm-on:before { + content: "\e858"; } + +.mdi-album:before { + content: "\e019"; } + +.mdi-all-inclusive:before { + content: "\eb3d"; } + +.mdi-all-out:before { + content: "\e90b"; } + +.mdi-android:before { + content: "\e859"; } + +.mdi-announcement:before { + content: "\e85a"; } + +.mdi-apps:before { + content: "\e5c3"; } + +.mdi-archive:before { + content: "\e149"; } + +.mdi-arrow-back:before { + content: "\e5c4"; } + +.mdi-arrow-downward:before { + content: "\e5db"; } + +.mdi-arrow-drop-down:before { + content: "\e5c5"; } + +.mdi-arrow-drop-down-circle:before { + content: "\e5c6"; } + +.mdi-arrow-drop-up:before { + content: "\e5c7"; } + +.mdi-arrow-forward:before { + content: "\e5c8"; } + +.mdi-arrow-upward:before { + content: "\e5d8"; } + +.mdi-art-track:before { + content: "\e060"; } + +.mdi-aspect-ratio:before { + content: "\e85b"; } + +.mdi-assessment:before { + content: "\e85c"; } + +.mdi-assignment:before { + content: "\e85d"; } + +.mdi-assignment-ind:before { + content: "\e85e"; } + +.mdi-assignment-late:before { + content: "\e85f"; } + +.mdi-assignment-return:before { + content: "\e860"; } + +.mdi-assignment-returned:before { + content: "\e861"; } + +.mdi-assignment-turned-in:before { + content: "\e862"; } + +.mdi-assistant:before { + content: "\e39f"; } + +.mdi-assistant-photo:before { + content: "\e3a0"; } + +.mdi-attach-file:before { + content: "\e226"; } + +.mdi-attach-money:before { + content: "\e227"; } + +.mdi-attachment:before { + content: "\e2bc"; } + +.mdi-audiotrack:before { + content: "\e3a1"; } + +.mdi-autorenew:before { + content: "\e863"; } + +.mdi-av-timer:before { + content: "\e01b"; } + +.mdi-backspace:before { + content: "\e14a"; } + +.mdi-backup:before { + content: "\e864"; } + +.mdi-battery-alert:before { + content: "\e19c"; } + +.mdi-battery-charging-full:before { + content: "\e1a3"; } + +.mdi-battery-full:before { + content: "\e1a4"; } + +.mdi-battery-std:before { + content: "\e1a5"; } + +.mdi-battery-unknown:before { + content: "\e1a6"; } + +.mdi-beach-access:before { + content: "\eb3e"; } + +.mdi-beenhere:before { + content: "\e52d"; } + +.mdi-block:before { + content: "\e14b"; } + +.mdi-bluetooth:before { + content: "\e1a7"; } + +.mdi-bluetooth-audio:before { + content: "\e60f"; } + +.mdi-bluetooth-connected:before { + content: "\e1a8"; } + +.mdi-bluetooth-disabled:before { + content: "\e1a9"; } + +.mdi-bluetooth-searching:before { + content: "\e1aa"; } + +.mdi-blur-circular:before { + content: "\e3a2"; } + +.mdi-blur-linear:before { + content: "\e3a3"; } + +.mdi-blur-off:before { + content: "\e3a4"; } + +.mdi-blur-on:before { + content: "\e3a5"; } + +.mdi-book:before { + content: "\e865"; } + +.mdi-bookmark:before { + content: "\e866"; } + +.mdi-bookmark-border:before { + content: "\e867"; } + +.mdi-border-all:before { + content: "\e228"; } + +.mdi-border-bottom:before { + content: "\e229"; } + +.mdi-border-clear:before { + content: "\e22a"; } + +.mdi-border-color:before { + content: "\e22b"; } + +.mdi-border-horizontal:before { + content: "\e22c"; } + +.mdi-border-inner:before { + content: "\e22d"; } + +.mdi-border-left:before { + content: "\e22e"; } + +.mdi-border-outer:before { + content: "\e22f"; } + +.mdi-border-right:before { + content: "\e230"; } + +.mdi-border-style:before { + content: "\e231"; } + +.mdi-border-top:before { + content: "\e232"; } + +.mdi-border-vertical:before { + content: "\e233"; } + +.mdi-branding-watermark:before { + content: "\e06b"; } + +.mdi-brightness-1:before { + content: "\e3a6"; } + +.mdi-brightness-2:before { + content: "\e3a7"; } + +.mdi-brightness-3:before { + content: "\e3a8"; } + +.mdi-brightness-4:before { + content: "\e3a9"; } + +.mdi-brightness-5:before { + content: "\e3aa"; } + +.mdi-brightness-6:before { + content: "\e3ab"; } + +.mdi-brightness-7:before { + content: "\e3ac"; } + +.mdi-brightness-auto:before { + content: "\e1ab"; } + +.mdi-brightness-high:before { + content: "\e1ac"; } + +.mdi-brightness-low:before { + content: "\e1ad"; } + +.mdi-brightness-medium:before { + content: "\e1ae"; } + +.mdi-broken-image:before { + content: "\e3ad"; } + +.mdi-brush:before { + content: "\e3ae"; } + +.mdi-bubble-chart:before { + content: "\e6dd"; } + +.mdi-bug-report:before { + content: "\e868"; } + +.mdi-build:before { + content: "\e869"; } + +.mdi-burst-mode:before { + content: "\e43c"; } + +.mdi-business:before { + content: "\e0af"; } + +.mdi-business-center:before { + content: "\eb3f"; } + +.mdi-cached:before { + content: "\e86a"; } + +.mdi-cake:before { + content: "\e7e9"; } + +.mdi-call:before { + content: "\e0b0"; } + +.mdi-call-end:before { + content: "\e0b1"; } + +.mdi-call-made:before { + content: "\e0b2"; } + +.mdi-call-merge:before { + content: "\e0b3"; } + +.mdi-call-missed:before { + content: "\e0b4"; } + +.mdi-call-missed-outgoing:before { + content: "\e0e4"; } + +.mdi-call-received:before { + content: "\e0b5"; } + +.mdi-call-split:before { + content: "\e0b6"; } + +.mdi-call-to-action:before { + content: "\e06c"; } + +.mdi-camera:before { + content: "\e3af"; } + +.mdi-camera-alt:before { + content: "\e3b0"; } + +.mdi-camera-enhance:before { + content: "\e8fc"; } + +.mdi-camera-front:before { + content: "\e3b1"; } + +.mdi-camera-rear:before { + content: "\e3b2"; } + +.mdi-camera-roll:before { + content: "\e3b3"; } + +.mdi-cancel:before { + content: "\e5c9"; } + +.mdi-card-giftcard:before { + content: "\e8f6"; } + +.mdi-card-membership:before { + content: "\e8f7"; } + +.mdi-card-travel:before { + content: "\e8f8"; } + +.mdi-casino:before { + content: "\eb40"; } + +.mdi-cast:before { + content: "\e307"; } + +.mdi-cast-connected:before { + content: "\e308"; } + +.mdi-center-focus-strong:before { + content: "\e3b4"; } + +.mdi-center-focus-weak:before { + content: "\e3b5"; } + +.mdi-change-history:before { + content: "\e86b"; } + +.mdi-chat:before { + content: "\e0b7"; } + +.mdi-chat-bubble:before { + content: "\e0ca"; } + +.mdi-chat-bubble-outline:before { + content: "\e0cb"; } + +.mdi-check:before { + content: "\e5ca"; } + +.mdi-check-box:before { + content: "\e834"; } + +.mdi-check-box-outline-blank:before { + content: "\e835"; } + +.mdi-check-circle:before { + content: "\e86c"; } + +.mdi-chevron-left:before { + content: "\e5cb"; } + +.mdi-chevron-right:before { + content: "\e5cc"; } + +.mdi-child-care:before { + content: "\eb41"; } + +.mdi-child-friendly:before { + content: "\eb42"; } + +.mdi-chrome-reader-mode:before { + content: "\e86d"; } + +.mdi-class:before { + content: "\e86e"; } + +.mdi-clear:before { + content: "\e14c"; } + +.mdi-clear-all:before { + content: "\e0b8"; } + +.mdi-close:before { + content: "\e5cd"; } + +.mdi-closed-caption:before { + content: "\e01c"; } + +.mdi-cloud:before { + content: "\e2bd"; } + +.mdi-cloud-circle:before { + content: "\e2be"; } + +.mdi-cloud-done:before { + content: "\e2bf"; } + +.mdi-cloud-download:before { + content: "\e2c0"; } + +.mdi-cloud-off:before { + content: "\e2c1"; } + +.mdi-cloud-queue:before { + content: "\e2c2"; } + +.mdi-cloud-upload:before { + content: "\e2c3"; } + +.mdi-code:before { + content: "\e86f"; } + +.mdi-collections:before { + content: "\e3b6"; } + +.mdi-collections-bookmark:before { + content: "\e431"; } + +.mdi-color-lens:before { + content: "\e3b7"; } + +.mdi-colorize:before { + content: "\e3b8"; } + +.mdi-comment:before { + content: "\e0b9"; } + +.mdi-compare:before { + content: "\e3b9"; } + +.mdi-compare-arrows:before { + content: "\e915"; } + +.mdi-computer:before { + content: "\e30a"; } + +.mdi-confirmation-number:before { + content: "\e638"; } + +.mdi-contact-mail:before { + content: "\e0d0"; } + +.mdi-contact-phone:before { + content: "\e0cf"; } + +.mdi-contacts:before { + content: "\e0ba"; } + +.mdi-content-copy:before { + content: "\e14d"; } + +.mdi-content-cut:before { + content: "\e14e"; } + +.mdi-content-paste:before { + content: "\e14f"; } + +.mdi-control-point:before { + content: "\e3ba"; } + +.mdi-control-point-duplicate:before { + content: "\e3bb"; } + +.mdi-copyright:before { + content: "\e90c"; } + +.mdi-create:before { + content: "\e150"; } + +.mdi-create-new-folder:before { + content: "\e2cc"; } + +.mdi-credit-card:before { + content: "\e870"; } + +.mdi-crop:before { + content: "\e3be"; } + +.mdi-crop-16-9:before { + content: "\e3bc"; } + +.mdi-crop-3-2:before { + content: "\e3bd"; } + +.mdi-crop-5-4:before { + content: "\e3bf"; } + +.mdi-crop-7-5:before { + content: "\e3c0"; } + +.mdi-crop-din:before { + content: "\e3c1"; } + +.mdi-crop-free:before { + content: "\e3c2"; } + +.mdi-crop-landscape:before { + content: "\e3c3"; } + +.mdi-crop-original:before { + content: "\e3c4"; } + +.mdi-crop-portrait:before { + content: "\e3c5"; } + +.mdi-crop-rotate:before { + content: "\e437"; } + +.mdi-crop-square:before { + content: "\e3c6"; } + +.mdi-dashboard:before { + content: "\e871"; } + +.mdi-data-usage:before { + content: "\e1af"; } + +.mdi-date-range:before { + content: "\e916"; } + +.mdi-dehaze:before { + content: "\e3c7"; } + +.mdi-delete:before { + content: "\e872"; } + +.mdi-delete-forever:before { + content: "\e92b"; } + +.mdi-delete-sweep:before { + content: "\e16c"; } + +.mdi-description:before { + content: "\e873"; } + +.mdi-desktop-mac:before { + content: "\e30b"; } + +.mdi-desktop-windows:before { + content: "\e30c"; } + +.mdi-details:before { + content: "\e3c8"; } + +.mdi-developer-board:before { + content: "\e30d"; } + +.mdi-developer-mode:before { + content: "\e1b0"; } + +.mdi-device-hub:before { + content: "\e335"; } + +.mdi-devices:before { + content: "\e1b1"; } + +.mdi-devices-other:before { + content: "\e337"; } + +.mdi-dialer-sip:before { + content: "\e0bb"; } + +.mdi-dialpad:before { + content: "\e0bc"; } + +.mdi-directions:before { + content: "\e52e"; } + +.mdi-directions-bike:before { + content: "\e52f"; } + +.mdi-directions-boat:before { + content: "\e532"; } + +.mdi-directions-bus:before { + content: "\e530"; } + +.mdi-directions-car:before { + content: "\e531"; } + +.mdi-directions-railway:before { + content: "\e534"; } + +.mdi-directions-run:before { + content: "\e566"; } + +.mdi-directions-subway:before { + content: "\e533"; } + +.mdi-directions-transit:before { + content: "\e535"; } + +.mdi-directions-walk:before { + content: "\e536"; } + +.mdi-disc-full:before { + content: "\e610"; } + +.mdi-dns:before { + content: "\e875"; } + +.mdi-do-not-disturb:before { + content: "\e612"; } + +.mdi-do-not-disturb-alt:before { + content: "\e611"; } + +.mdi-do-not-disturb-off:before { + content: "\e643"; } + +.mdi-do-not-disturb-on:before { + content: "\e644"; } + +.mdi-dock:before { + content: "\e30e"; } + +.mdi-domain:before { + content: "\e7ee"; } + +.mdi-done:before { + content: "\e876"; } + +.mdi-done-all:before { + content: "\e877"; } + +.mdi-donut-large:before { + content: "\e917"; } + +.mdi-donut-small:before { + content: "\e918"; } + +.mdi-drafts:before { + content: "\e151"; } + +.mdi-drag-handle:before { + content: "\e25d"; } + +.mdi-drive-eta:before { + content: "\e613"; } + +.mdi-dvr:before { + content: "\e1b2"; } + +.mdi-edit:before { + content: "\e3c9"; } + +.mdi-edit-location:before { + content: "\e568"; } + +.mdi-eject:before { + content: "\e8fb"; } + +.mdi-email:before { + content: "\e0be"; } + +.mdi-enhanced-encryption:before { + content: "\e63f"; } + +.mdi-equalizer:before { + content: "\e01d"; } + +.mdi-error:before { + content: "\e000"; } + +.mdi-error-outline:before { + content: "\e001"; } + +.mdi-euro-symbol:before { + content: "\e926"; } + +.mdi-ev-station:before { + content: "\e56d"; } + +.mdi-event:before { + content: "\e878"; } + +.mdi-event-available:before { + content: "\e614"; } + +.mdi-event-busy:before { + content: "\e615"; } + +.mdi-event-note:before { + content: "\e616"; } + +.mdi-event-seat:before { + content: "\e903"; } + +.mdi-exit-to-app:before { + content: "\e879"; } + +.mdi-expand-less:before { + content: "\e5ce"; } + +.mdi-expand-more:before { + content: "\e5cf"; } + +.mdi-explicit:before { + content: "\e01e"; } + +.mdi-explore:before { + content: "\e87a"; } + +.mdi-exposure:before { + content: "\e3ca"; } + +.mdi-exposure-neg-1:before { + content: "\e3cb"; } + +.mdi-exposure-neg-2:before { + content: "\e3cc"; } + +.mdi-exposure-plus-1:before { + content: "\e3cd"; } + +.mdi-exposure-plus-2:before { + content: "\e3ce"; } + +.mdi-exposure-zero:before { + content: "\e3cf"; } + +.mdi-extension:before { + content: "\e87b"; } + +.mdi-face:before { + content: "\e87c"; } + +.mdi-fast-forward:before { + content: "\e01f"; } + +.mdi-fast-rewind:before { + content: "\e020"; } + +.mdi-favorite:before { + content: "\e87d"; } + +.mdi-favorite-border:before { + content: "\e87e"; } + +.mdi-featured-play-list:before { + content: "\e06d"; } + +.mdi-featured-video:before { + content: "\e06e"; } + +.mdi-feedback:before { + content: "\e87f"; } + +.mdi-fiber-dvr:before { + content: "\e05d"; } + +.mdi-fiber-manual-record:before { + content: "\e061"; } + +.mdi-fiber-new:before { + content: "\e05e"; } + +.mdi-fiber-pin:before { + content: "\e06a"; } + +.mdi-fiber-smart-record:before { + content: "\e062"; } + +.mdi-file-download:before { + content: "\e2c4"; } + +.mdi-file-upload:before { + content: "\e2c6"; } + +.mdi-filter:before { + content: "\e3d3"; } + +.mdi-filter-1:before { + content: "\e3d0"; } + +.mdi-filter-2:before { + content: "\e3d1"; } + +.mdi-filter-3:before { + content: "\e3d2"; } + +.mdi-filter-4:before { + content: "\e3d4"; } + +.mdi-filter-5:before { + content: "\e3d5"; } + +.mdi-filter-6:before { + content: "\e3d6"; } + +.mdi-filter-7:before { + content: "\e3d7"; } + +.mdi-filter-8:before { + content: "\e3d8"; } + +.mdi-filter-9:before { + content: "\e3d9"; } + +.mdi-filter-9-plus:before { + content: "\e3da"; } + +.mdi-filter-b-and-w:before { + content: "\e3db"; } + +.mdi-filter-center-focus:before { + content: "\e3dc"; } + +.mdi-filter-drama:before { + content: "\e3dd"; } + +.mdi-filter-frames:before { + content: "\e3de"; } + +.mdi-filter-hdr:before { + content: "\e3df"; } + +.mdi-filter-list:before { + content: "\e152"; } + +.mdi-filter-none:before { + content: "\e3e0"; } + +.mdi-filter-tilt-shift:before { + content: "\e3e2"; } + +.mdi-filter-vintage:before { + content: "\e3e3"; } + +.mdi-find-in-page:before { + content: "\e880"; } + +.mdi-find-replace:before { + content: "\e881"; } + +.mdi-fingerprint:before { + content: "\e90d"; } + +.mdi-first-page:before { + content: "\e5dc"; } + +.mdi-fitness-center:before { + content: "\eb43"; } + +.mdi-flag:before { + content: "\e153"; } + +.mdi-flare:before { + content: "\e3e4"; } + +.mdi-flash-auto:before { + content: "\e3e5"; } + +.mdi-flash-off:before { + content: "\e3e6"; } + +.mdi-flash-on:before { + content: "\e3e7"; } + +.mdi-flight:before { + content: "\e539"; } + +.mdi-flight-land:before { + content: "\e904"; } + +.mdi-flight-takeoff:before { + content: "\e905"; } + +.mdi-flip:before { + content: "\e3e8"; } + +.mdi-flip-to-back:before { + content: "\e882"; } + +.mdi-flip-to-front:before { + content: "\e883"; } + +.mdi-folder:before { + content: "\e2c7"; } + +.mdi-folder-open:before { + content: "\e2c8"; } + +.mdi-folder-shared:before { + content: "\e2c9"; } + +.mdi-folder-special:before { + content: "\e617"; } + +.mdi-font-download:before { + content: "\e167"; } + +.mdi-format-align-center:before { + content: "\e234"; } + +.mdi-format-align-justify:before { + content: "\e235"; } + +.mdi-format-align-left:before { + content: "\e236"; } + +.mdi-format-align-right:before { + content: "\e237"; } + +.mdi-format-bold:before { + content: "\e238"; } + +.mdi-format-clear:before { + content: "\e239"; } + +.mdi-format-color-fill:before { + content: "\e23a"; } + +.mdi-format-color-reset:before { + content: "\e23b"; } + +.mdi-format-color-text:before { + content: "\e23c"; } + +.mdi-format-indent-decrease:before { + content: "\e23d"; } + +.mdi-format-indent-increase:before { + content: "\e23e"; } + +.mdi-format-italic:before { + content: "\e23f"; } + +.mdi-format-line-spacing:before { + content: "\e240"; } + +.mdi-format-list-bulleted:before { + content: "\e241"; } + +.mdi-format-list-numbered:before { + content: "\e242"; } + +.mdi-format-paint:before { + content: "\e243"; } + +.mdi-format-quote:before { + content: "\e244"; } + +.mdi-format-shapes:before { + content: "\e25e"; } + +.mdi-format-size:before { + content: "\e245"; } + +.mdi-format-strikethrough:before { + content: "\e246"; } + +.mdi-format-textdirection-l-to-r:before { + content: "\e247"; } + +.mdi-format-textdirection-r-to-l:before { + content: "\e248"; } + +.mdi-format-underlined:before { + content: "\e249"; } + +.mdi-forum:before { + content: "\e0bf"; } + +.mdi-forward:before { + content: "\e154"; } + +.mdi-forward-10:before { + content: "\e056"; } + +.mdi-forward-30:before { + content: "\e057"; } + +.mdi-forward-5:before { + content: "\e058"; } + +.mdi-free-breakfast:before { + content: "\eb44"; } + +.mdi-fullscreen:before { + content: "\e5d0"; } + +.mdi-fullscreen-exit:before { + content: "\e5d1"; } + +.mdi-functions:before { + content: "\e24a"; } + +.mdi-g-translate:before { + content: "\e927"; } + +.mdi-gamepad:before { + content: "\e30f"; } + +.mdi-games:before { + content: "\e021"; } + +.mdi-gavel:before { + content: "\e90e"; } + +.mdi-gesture:before { + content: "\e155"; } + +.mdi-get-app:before { + content: "\e884"; } + +.mdi-gif:before { + content: "\e908"; } + +.mdi-golf-course:before { + content: "\eb45"; } + +.mdi-gps-fixed:before { + content: "\e1b3"; } + +.mdi-gps-not-fixed:before { + content: "\e1b4"; } + +.mdi-gps-off:before { + content: "\e1b5"; } + +.mdi-grade:before { + content: "\e885"; } + +.mdi-gradient:before { + content: "\e3e9"; } + +.mdi-grain:before { + content: "\e3ea"; } + +.mdi-graphic-eq:before { + content: "\e1b8"; } + +.mdi-grid-off:before { + content: "\e3eb"; } + +.mdi-grid-on:before { + content: "\e3ec"; } + +.mdi-group:before { + content: "\e7ef"; } + +.mdi-group-add:before { + content: "\e7f0"; } + +.mdi-group-work:before { + content: "\e886"; } + +.mdi-hd:before { + content: "\e052"; } + +.mdi-hdr-off:before { + content: "\e3ed"; } + +.mdi-hdr-on:before { + content: "\e3ee"; } + +.mdi-hdr-strong:before { + content: "\e3f1"; } + +.mdi-hdr-weak:before { + content: "\e3f2"; } + +.mdi-headset:before { + content: "\e310"; } + +.mdi-headset-mic:before { + content: "\e311"; } + +.mdi-healing:before { + content: "\e3f3"; } + +.mdi-hearing:before { + content: "\e023"; } + +.mdi-help:before { + content: "\e887"; } + +.mdi-help-outline:before { + content: "\e8fd"; } + +.mdi-high-quality:before { + content: "\e024"; } + +.mdi-highlight:before { + content: "\e25f"; } + +.mdi-highlight-off:before { + content: "\e888"; } + +.mdi-history:before { + content: "\e889"; } + +.mdi-home:before { + content: "\e88a"; } + +.mdi-hot-tub:before { + content: "\eb46"; } + +.mdi-hotel:before { + content: "\e53a"; } + +.mdi-hourglass-empty:before { + content: "\e88b"; } + +.mdi-hourglass-full:before { + content: "\e88c"; } + +.mdi-http:before { + content: "\e902"; } + +.mdi-https:before { + content: "\e88d"; } + +.mdi-image:before { + content: "\e3f4"; } + +.mdi-image-aspect-ratio:before { + content: "\e3f5"; } + +.mdi-import-contacts:before { + content: "\e0e0"; } + +.mdi-import-export:before { + content: "\e0c3"; } + +.mdi-important-devices:before { + content: "\e912"; } + +.mdi-inbox:before { + content: "\e156"; } + +.mdi-indeterminate-check-box:before { + content: "\e909"; } + +.mdi-info:before { + content: "\e88e"; } + +.mdi-info-outline:before { + content: "\e88f"; } + +.mdi-input:before { + content: "\e890"; } + +.mdi-insert-chart:before { + content: "\e24b"; } + +.mdi-insert-comment:before { + content: "\e24c"; } + +.mdi-insert-drive-file:before { + content: "\e24d"; } + +.mdi-insert-emoticon:before { + content: "\e24e"; } + +.mdi-insert-invitation:before { + content: "\e24f"; } + +.mdi-insert-link:before { + content: "\e250"; } + +.mdi-insert-photo:before { + content: "\e251"; } + +.mdi-invert-colors:before { + content: "\e891"; } + +.mdi-invert-colors-off:before { + content: "\e0c4"; } + +.mdi-iso:before { + content: "\e3f6"; } + +.mdi-keyboard:before { + content: "\e312"; } + +.mdi-keyboard-arrow-down:before { + content: "\e313"; } + +.mdi-keyboard-arrow-left:before { + content: "\e314"; } + +.mdi-keyboard-arrow-right:before { + content: "\e315"; } + +.mdi-keyboard-arrow-up:before { + content: "\e316"; } + +.mdi-keyboard-backspace:before { + content: "\e317"; } + +.mdi-keyboard-capslock:before { + content: "\e318"; } + +.mdi-keyboard-hide:before { + content: "\e31a"; } + +.mdi-keyboard-return:before { + content: "\e31b"; } + +.mdi-keyboard-tab:before { + content: "\e31c"; } + +.mdi-keyboard-voice:before { + content: "\e31d"; } + +.mdi-kitchen:before { + content: "\eb47"; } + +.mdi-label:before { + content: "\e892"; } + +.mdi-label-outline:before { + content: "\e893"; } + +.mdi-landscape:before { + content: "\e3f7"; } + +.mdi-language:before { + content: "\e894"; } + +.mdi-laptop:before { + content: "\e31e"; } + +.mdi-laptop-chromebook:before { + content: "\e31f"; } + +.mdi-laptop-mac:before { + content: "\e320"; } + +.mdi-laptop-windows:before { + content: "\e321"; } + +.mdi-last-page:before { + content: "\e5dd"; } + +.mdi-launch:before { + content: "\e895"; } + +.mdi-layers:before { + content: "\e53b"; } + +.mdi-layers-clear:before { + content: "\e53c"; } + +.mdi-leak-add:before { + content: "\e3f8"; } + +.mdi-leak-remove:before { + content: "\e3f9"; } + +.mdi-lens:before { + content: "\e3fa"; } + +.mdi-library-add:before { + content: "\e02e"; } + +.mdi-library-books:before { + content: "\e02f"; } + +.mdi-library-music:before { + content: "\e030"; } + +.mdi-lightbulb-outline:before { + content: "\e90f"; } + +.mdi-line-style:before { + content: "\e919"; } + +.mdi-line-weight:before { + content: "\e91a"; } + +.mdi-linear-scale:before { + content: "\e260"; } + +.mdi-link:before { + content: "\e157"; } + +.mdi-linked-camera:before { + content: "\e438"; } + +.mdi-list:before { + content: "\e896"; } + +.mdi-live-help:before { + content: "\e0c6"; } + +.mdi-live-tv:before { + content: "\e639"; } + +.mdi-local-activity:before { + content: "\e53f"; } + +.mdi-local-airport:before { + content: "\e53d"; } + +.mdi-local-atm:before { + content: "\e53e"; } + +.mdi-local-bar:before { + content: "\e540"; } + +.mdi-local-cafe:before { + content: "\e541"; } + +.mdi-local-car-wash:before { + content: "\e542"; } + +.mdi-local-convenience-store:before { + content: "\e543"; } + +.mdi-local-dining:before { + content: "\e556"; } + +.mdi-local-drink:before { + content: "\e544"; } + +.mdi-local-florist:before { + content: "\e545"; } + +.mdi-local-gas-station:before { + content: "\e546"; } + +.mdi-local-grocery-store:before { + content: "\e547"; } + +.mdi-local-hospital:before { + content: "\e548"; } + +.mdi-local-hotel:before { + content: "\e549"; } + +.mdi-local-laundry-service:before { + content: "\e54a"; } + +.mdi-local-library:before { + content: "\e54b"; } + +.mdi-local-mall:before { + content: "\e54c"; } + +.mdi-local-movies:before { + content: "\e54d"; } + +.mdi-local-offer:before { + content: "\e54e"; } + +.mdi-local-parking:before { + content: "\e54f"; } + +.mdi-local-pharmacy:before { + content: "\e550"; } + +.mdi-local-phone:before { + content: "\e551"; } + +.mdi-local-pizza:before { + content: "\e552"; } + +.mdi-local-play:before { + content: "\e553"; } + +.mdi-local-post-office:before { + content: "\e554"; } + +.mdi-local-printshop:before { + content: "\e555"; } + +.mdi-local-see:before { + content: "\e557"; } + +.mdi-local-shipping:before { + content: "\e558"; } + +.mdi-local-taxi:before { + content: "\e559"; } + +.mdi-location-city:before { + content: "\e7f1"; } + +.mdi-location-disabled:before { + content: "\e1b6"; } + +.mdi-location-off:before { + content: "\e0c7"; } + +.mdi-location-on:before { + content: "\e0c8"; } + +.mdi-location-searching:before { + content: "\e1b7"; } + +.mdi-lock:before { + content: "\e897"; } + +.mdi-lock-open:before { + content: "\e898"; } + +.mdi-lock-outline:before { + content: "\e899"; } + +.mdi-looks:before { + content: "\e3fc"; } + +.mdi-looks-3:before { + content: "\e3fb"; } + +.mdi-looks-4:before { + content: "\e3fd"; } + +.mdi-looks-5:before { + content: "\e3fe"; } + +.mdi-looks-6:before { + content: "\e3ff"; } + +.mdi-looks-one:before { + content: "\e400"; } + +.mdi-looks-two:before { + content: "\e401"; } + +.mdi-loop:before { + content: "\e028"; } + +.mdi-loupe:before { + content: "\e402"; } + +.mdi-low-priority:before { + content: "\e16d"; } + +.mdi-loyalty:before { + content: "\e89a"; } + +.mdi-mail:before { + content: "\e158"; } + +.mdi-mail-outline:before { + content: "\e0e1"; } + +.mdi-map:before { + content: "\e55b"; } + +.mdi-markunread:before { + content: "\e159"; } + +.mdi-markunread-mailbox:before { + content: "\e89b"; } + +.mdi-memory:before { + content: "\e322"; } + +.mdi-menu:before { + content: "\e5d2"; } + +.mdi-merge-type:before { + content: "\e252"; } + +.mdi-message:before { + content: "\e0c9"; } + +.mdi-mic:before { + content: "\e029"; } + +.mdi-mic-none:before { + content: "\e02a"; } + +.mdi-mic-off:before { + content: "\e02b"; } + +.mdi-mms:before { + content: "\e618"; } + +.mdi-mode-comment:before { + content: "\e253"; } + +.mdi-mode-edit:before { + content: "\e254"; } + +.mdi-monetization-on:before { + content: "\e263"; } + +.mdi-money-off:before { + content: "\e25c"; } + +.mdi-monochrome-photos:before { + content: "\e403"; } + +.mdi-mood:before { + content: "\e7f2"; } + +.mdi-mood-bad:before { + content: "\e7f3"; } + +.mdi-more:before { + content: "\e619"; } + +.mdi-more-horiz:before { + content: "\e5d3"; } + +.mdi-more-vert:before { + content: "\e5d4"; } + +.mdi-motorcycle:before { + content: "\e91b"; } + +.mdi-mouse:before { + content: "\e323"; } + +.mdi-move-to-inbox:before { + content: "\e168"; } + +.mdi-movie:before { + content: "\e02c"; } + +.mdi-movie-creation:before { + content: "\e404"; } + +.mdi-movie-filter:before { + content: "\e43a"; } + +.mdi-multiline-chart:before { + content: "\e6df"; } + +.mdi-music-note:before { + content: "\e405"; } + +.mdi-music-video:before { + content: "\e063"; } + +.mdi-my-location:before { + content: "\e55c"; } + +.mdi-nature:before { + content: "\e406"; } + +.mdi-nature-people:before { + content: "\e407"; } + +.mdi-navigate-before:before { + content: "\e408"; } + +.mdi-navigate-next:before { + content: "\e409"; } + +.mdi-navigation:before { + content: "\e55d"; } + +.mdi-near-me:before { + content: "\e569"; } + +.mdi-network-cell:before { + content: "\e1b9"; } + +.mdi-network-check:before { + content: "\e640"; } + +.mdi-network-locked:before { + content: "\e61a"; } + +.mdi-network-wifi:before { + content: "\e1ba"; } + +.mdi-new-releases:before { + content: "\e031"; } + +.mdi-next-week:before { + content: "\e16a"; } + +.mdi-nfc:before { + content: "\e1bb"; } + +.mdi-no-encryption:before { + content: "\e641"; } + +.mdi-no-sim:before { + content: "\e0cc"; } + +.mdi-not-interested:before { + content: "\e033"; } + +.mdi-note:before { + content: "\e06f"; } + +.mdi-note-add:before { + content: "\e89c"; } + +.mdi-notifications:before { + content: "\e7f4"; } + +.mdi-notifications-active:before { + content: "\e7f7"; } + +.mdi-notifications-none:before { + content: "\e7f5"; } + +.mdi-notifications-off:before { + content: "\e7f6"; } + +.mdi-notifications-paused:before { + content: "\e7f8"; } + +.mdi-offline-pin:before { + content: "\e90a"; } + +.mdi-ondemand-video:before { + content: "\e63a"; } + +.mdi-opacity:before { + content: "\e91c"; } + +.mdi-open-in-browser:before { + content: "\e89d"; } + +.mdi-open-in-new:before { + content: "\e89e"; } + +.mdi-open-with:before { + content: "\e89f"; } + +.mdi-pages:before { + content: "\e7f9"; } + +.mdi-pageview:before { + content: "\e8a0"; } + +.mdi-palette:before { + content: "\e40a"; } + +.mdi-pan-tool:before { + content: "\e925"; } + +.mdi-panorama:before { + content: "\e40b"; } + +.mdi-panorama-fish-eye:before { + content: "\e40c"; } + +.mdi-panorama-horizontal:before { + content: "\e40d"; } + +.mdi-panorama-vertical:before { + content: "\e40e"; } + +.mdi-panorama-wide-angle:before { + content: "\e40f"; } + +.mdi-party-mode:before { + content: "\e7fa"; } + +.mdi-pause:before { + content: "\e034"; } + +.mdi-pause-circle-filled:before { + content: "\e035"; } + +.mdi-pause-circle-outline:before { + content: "\e036"; } + +.mdi-payment:before { + content: "\e8a1"; } + +.mdi-people:before { + content: "\e7fb"; } + +.mdi-people-outline:before { + content: "\e7fc"; } + +.mdi-perm-camera-mic:before { + content: "\e8a2"; } + +.mdi-perm-contact-calendar:before { + content: "\e8a3"; } + +.mdi-perm-data-setting:before { + content: "\e8a4"; } + +.mdi-perm-device-information:before { + content: "\e8a5"; } + +.mdi-perm-identity:before { + content: "\e8a6"; } + +.mdi-perm-media:before { + content: "\e8a7"; } + +.mdi-perm-phone-msg:before { + content: "\e8a8"; } + +.mdi-perm-scan-wifi:before { + content: "\e8a9"; } + +.mdi-person:before { + content: "\e7fd"; } + +.mdi-person-add:before { + content: "\e7fe"; } + +.mdi-person-outline:before { + content: "\e7ff"; } + +.mdi-person-pin:before { + content: "\e55a"; } + +.mdi-person-pin-circle:before { + content: "\e56a"; } + +.mdi-personal-video:before { + content: "\e63b"; } + +.mdi-pets:before { + content: "\e91d"; } + +.mdi-phone:before { + content: "\e0cd"; } + +.mdi-phone-android:before { + content: "\e324"; } + +.mdi-phone-bluetooth-speaker:before { + content: "\e61b"; } + +.mdi-phone-forwarded:before { + content: "\e61c"; } + +.mdi-phone-in-talk:before { + content: "\e61d"; } + +.mdi-phone-iphone:before { + content: "\e325"; } + +.mdi-phone-locked:before { + content: "\e61e"; } + +.mdi-phone-missed:before { + content: "\e61f"; } + +.mdi-phone-paused:before { + content: "\e620"; } + +.mdi-phonelink:before { + content: "\e326"; } + +.mdi-phonelink-erase:before { + content: "\e0db"; } + +.mdi-phonelink-lock:before { + content: "\e0dc"; } + +.mdi-phonelink-off:before { + content: "\e327"; } + +.mdi-phonelink-ring:before { + content: "\e0dd"; } + +.mdi-phonelink-setup:before { + content: "\e0de"; } + +.mdi-photo:before { + content: "\e410"; } + +.mdi-photo-album:before { + content: "\e411"; } + +.mdi-photo-camera:before { + content: "\e412"; } + +.mdi-photo-filter:before { + content: "\e43b"; } + +.mdi-photo-library:before { + content: "\e413"; } + +.mdi-photo-size-select-actual:before { + content: "\e432"; } + +.mdi-photo-size-select-large:before { + content: "\e433"; } + +.mdi-photo-size-select-small:before { + content: "\e434"; } + +.mdi-picture-as-pdf:before { + content: "\e415"; } + +.mdi-picture-in-picture:before { + content: "\e8aa"; } + +.mdi-picture-in-picture-alt:before { + content: "\e911"; } + +.mdi-pie-chart:before { + content: "\e6c4"; } + +.mdi-pie-chart-outlined:before { + content: "\e6c5"; } + +.mdi-pin-drop:before { + content: "\e55e"; } + +.mdi-place:before { + content: "\e55f"; } + +.mdi-play-arrow:before { + content: "\e037"; } + +.mdi-play-circle-filled:before { + content: "\e038"; } + +.mdi-play-circle-outline:before { + content: "\e039"; } + +.mdi-play-for-work:before { + content: "\e906"; } + +.mdi-playlist-add:before { + content: "\e03b"; } + +.mdi-playlist-add-check:before { + content: "\e065"; } + +.mdi-playlist-play:before { + content: "\e05f"; } + +.mdi-plus-one:before { + content: "\e800"; } + +.mdi-poll:before { + content: "\e801"; } + +.mdi-polymer:before { + content: "\e8ab"; } + +.mdi-pool:before { + content: "\eb48"; } + +.mdi-portable-wifi-off:before { + content: "\e0ce"; } + +.mdi-portrait:before { + content: "\e416"; } + +.mdi-power:before { + content: "\e63c"; } + +.mdi-power-input:before { + content: "\e336"; } + +.mdi-power-settings-new:before { + content: "\e8ac"; } + +.mdi-pregnant-woman:before { + content: "\e91e"; } + +.mdi-present-to-all:before { + content: "\e0df"; } + +.mdi-print:before { + content: "\e8ad"; } + +.mdi-priority-high:before { + content: "\e645"; } + +.mdi-public:before { + content: "\e80b"; } + +.mdi-publish:before { + content: "\e255"; } + +.mdi-query-builder:before { + content: "\e8ae"; } + +.mdi-question-answer:before { + content: "\e8af"; } + +.mdi-queue:before { + content: "\e03c"; } + +.mdi-queue-music:before { + content: "\e03d"; } + +.mdi-queue-play-next:before { + content: "\e066"; } + +.mdi-radio:before { + content: "\e03e"; } + +.mdi-radio-button-checked:before { + content: "\e837"; } + +.mdi-radio-button-unchecked:before { + content: "\e836"; } + +.mdi-rate-review:before { + content: "\e560"; } + +.mdi-receipt:before { + content: "\e8b0"; } + +.mdi-recent-actors:before { + content: "\e03f"; } + +.mdi-record-voice-over:before { + content: "\e91f"; } + +.mdi-redeem:before { + content: "\e8b1"; } + +.mdi-redo:before { + content: "\e15a"; } + +.mdi-refresh:before { + content: "\e5d5"; } + +.mdi-remove:before { + content: "\e15b"; } + +.mdi-remove-circle:before { + content: "\e15c"; } + +.mdi-remove-circle-outline:before { + content: "\e15d"; } + +.mdi-remove-from-queue:before { + content: "\e067"; } + +.mdi-remove-red-eye:before { + content: "\e417"; } + +.mdi-remove-shopping-cart:before { + content: "\e928"; } + +.mdi-reorder:before { + content: "\e8fe"; } + +.mdi-repeat:before { + content: "\e040"; } + +.mdi-repeat-one:before { + content: "\e041"; } + +.mdi-replay:before { + content: "\e042"; } + +.mdi-replay-10:before { + content: "\e059"; } + +.mdi-replay-30:before { + content: "\e05a"; } + +.mdi-replay-5:before { + content: "\e05b"; } + +.mdi-reply:before { + content: "\e15e"; } + +.mdi-reply-all:before { + content: "\e15f"; } + +.mdi-report:before { + content: "\e160"; } + +.mdi-report-problem:before { + content: "\e8b2"; } + +.mdi-restaurant:before { + content: "\e56c"; } + +.mdi-restaurant-menu:before { + content: "\e561"; } + +.mdi-restore:before { + content: "\e8b3"; } + +.mdi-restore-page:before { + content: "\e929"; } + +.mdi-ring-volume:before { + content: "\e0d1"; } + +.mdi-room:before { + content: "\e8b4"; } + +.mdi-room-service:before { + content: "\eb49"; } + +.mdi-rotate-90-degrees-ccw:before { + content: "\e418"; } + +.mdi-rotate-left:before { + content: "\e419"; } + +.mdi-rotate-right:before { + content: "\e41a"; } + +.mdi-rounded-corner:before { + content: "\e920"; } + +.mdi-router:before { + content: "\e328"; } + +.mdi-rowing:before { + content: "\e921"; } + +.mdi-rss-feed:before { + content: "\e0e5"; } + +.mdi-rv-hookup:before { + content: "\e642"; } + +.mdi-satellite:before { + content: "\e562"; } + +.mdi-save:before { + content: "\e161"; } + +.mdi-scanner:before { + content: "\e329"; } + +.mdi-schedule:before { + content: "\e8b5"; } + +.mdi-school:before { + content: "\e80c"; } + +.mdi-screen-lock-landscape:before { + content: "\e1be"; } + +.mdi-screen-lock-portrait:before { + content: "\e1bf"; } + +.mdi-screen-lock-rotation:before { + content: "\e1c0"; } + +.mdi-screen-rotation:before { + content: "\e1c1"; } + +.mdi-screen-share:before { + content: "\e0e2"; } + +.mdi-sd-card:before { + content: "\e623"; } + +.mdi-sd-storage:before { + content: "\e1c2"; } + +.mdi-search:before { + content: "\e8b6"; } + +.mdi-security:before { + content: "\e32a"; } + +.mdi-select-all:before { + content: "\e162"; } + +.mdi-send:before { + content: "\e163"; } + +.mdi-sentiment-dissatisfied:before { + content: "\e811"; } + +.mdi-sentiment-neutral:before { + content: "\e812"; } + +.mdi-sentiment-satisfied:before { + content: "\e813"; } + +.mdi-sentiment-very-dissatisfied:before { + content: "\e814"; } + +.mdi-sentiment-very-satisfied:before { + content: "\e815"; } + +.mdi-settings:before { + content: "\e8b8"; } + +.mdi-settings-applications:before { + content: "\e8b9"; } + +.mdi-settings-backup-restore:before { + content: "\e8ba"; } + +.mdi-settings-bluetooth:before { + content: "\e8bb"; } + +.mdi-settings-brightness:before { + content: "\e8bd"; } + +.mdi-settings-cell:before { + content: "\e8bc"; } + +.mdi-settings-ethernet:before { + content: "\e8be"; } + +.mdi-settings-input-antenna:before { + content: "\e8bf"; } + +.mdi-settings-input-component:before { + content: "\e8c0"; } + +.mdi-settings-input-composite:before { + content: "\e8c1"; } + +.mdi-settings-input-hdmi:before { + content: "\e8c2"; } + +.mdi-settings-input-svideo:before { + content: "\e8c3"; } + +.mdi-settings-overscan:before { + content: "\e8c4"; } + +.mdi-settings-phone:before { + content: "\e8c5"; } + +.mdi-settings-power:before { + content: "\e8c6"; } + +.mdi-settings-remote:before { + content: "\e8c7"; } + +.mdi-settings-system-daydream:before { + content: "\e1c3"; } + +.mdi-settings-voice:before { + content: "\e8c8"; } + +.mdi-share:before { + content: "\e80d"; } + +.mdi-shop:before { + content: "\e8c9"; } + +.mdi-shop-two:before { + content: "\e8ca"; } + +.mdi-shopping-basket:before { + content: "\e8cb"; } + +.mdi-shopping-cart:before { + content: "\e8cc"; } + +.mdi-short-text:before { + content: "\e261"; } + +.mdi-show-chart:before { + content: "\e6e1"; } + +.mdi-shuffle:before { + content: "\e043"; } + +.mdi-signal-cellular-4-bar:before { + content: "\e1c8"; } + +.mdi-signal-cellular-connected-no-internet-4-bar:before { + content: "\e1cd"; } + +.mdi-signal-cellular-no-sim:before { + content: "\e1ce"; } + +.mdi-signal-cellular-null:before { + content: "\e1cf"; } + +.mdi-signal-cellular-off:before { + content: "\e1d0"; } + +.mdi-signal-wifi-4-bar:before { + content: "\e1d8"; } + +.mdi-signal-wifi-4-bar-lock:before { + content: "\e1d9"; } + +.mdi-signal-wifi-off:before { + content: "\e1da"; } + +.mdi-sim-card:before { + content: "\e32b"; } + +.mdi-sim-card-alert:before { + content: "\e624"; } + +.mdi-skip-next:before { + content: "\e044"; } + +.mdi-skip-previous:before { + content: "\e045"; } + +.mdi-slideshow:before { + content: "\e41b"; } + +.mdi-slow-motion-video:before { + content: "\e068"; } + +.mdi-smartphone:before { + content: "\e32c"; } + +.mdi-smoke-free:before { + content: "\eb4a"; } + +.mdi-smoking-rooms:before { + content: "\eb4b"; } + +.mdi-sms:before { + content: "\e625"; } + +.mdi-sms-failed:before { + content: "\e626"; } + +.mdi-snooze:before { + content: "\e046"; } + +.mdi-sort:before { + content: "\e164"; } + +.mdi-sort-by-alpha:before { + content: "\e053"; } + +.mdi-spa:before { + content: "\eb4c"; } + +.mdi-space-bar:before { + content: "\e256"; } + +.mdi-speaker:before { + content: "\e32d"; } + +.mdi-speaker-group:before { + content: "\e32e"; } + +.mdi-speaker-notes:before { + content: "\e8cd"; } + +.mdi-speaker-notes-off:before { + content: "\e92a"; } + +.mdi-speaker-phone:before { + content: "\e0d2"; } + +.mdi-spellcheck:before { + content: "\e8ce"; } + +.mdi-star:before { + content: "\e838"; } + +.mdi-star-border:before { + content: "\e83a"; } + +.mdi-star-half:before { + content: "\e839"; } + +.mdi-stars:before { + content: "\e8d0"; } + +.mdi-stay-current-landscape:before { + content: "\e0d3"; } + +.mdi-stay-current-portrait:before { + content: "\e0d4"; } + +.mdi-stay-primary-landscape:before { + content: "\e0d5"; } + +.mdi-stay-primary-portrait:before { + content: "\e0d6"; } + +.mdi-stop:before { + content: "\e047"; } + +.mdi-stop-screen-share:before { + content: "\e0e3"; } + +.mdi-storage:before { + content: "\e1db"; } + +.mdi-store:before { + content: "\e8d1"; } + +.mdi-store-mall-directory:before { + content: "\e563"; } + +.mdi-straighten:before { + content: "\e41c"; } + +.mdi-streetview:before { + content: "\e56e"; } + +.mdi-strikethrough-s:before { + content: "\e257"; } + +.mdi-style:before { + content: "\e41d"; } + +.mdi-subdirectory-arrow-left:before { + content: "\e5d9"; } + +.mdi-subdirectory-arrow-right:before { + content: "\e5da"; } + +.mdi-subject:before { + content: "\e8d2"; } + +.mdi-subscriptions:before { + content: "\e064"; } + +.mdi-subtitles:before { + content: "\e048"; } + +.mdi-subway:before { + content: "\e56f"; } + +.mdi-supervisor-account:before { + content: "\e8d3"; } + +.mdi-surround-sound:before { + content: "\e049"; } + +.mdi-swap-calls:before { + content: "\e0d7"; } + +.mdi-swap-horiz:before { + content: "\e8d4"; } + +.mdi-swap-vert:before { + content: "\e8d5"; } + +.mdi-swap-vertical-circle:before { + content: "\e8d6"; } + +.mdi-switch-camera:before { + content: "\e41e"; } + +.mdi-switch-video:before { + content: "\e41f"; } + +.mdi-sync:before { + content: "\e627"; } + +.mdi-sync-disabled:before { + content: "\e628"; } + +.mdi-sync-problem:before { + content: "\e629"; } + +.mdi-system-update:before { + content: "\e62a"; } + +.mdi-system-update-alt:before { + content: "\e8d7"; } + +.mdi-tab:before { + content: "\e8d8"; } + +.mdi-tab-unselected:before { + content: "\e8d9"; } + +.mdi-tablet:before { + content: "\e32f"; } + +.mdi-tablet-android:before { + content: "\e330"; } + +.mdi-tablet-mac:before { + content: "\e331"; } + +.mdi-tag-faces:before { + content: "\e420"; } + +.mdi-tap-and-play:before { + content: "\e62b"; } + +.mdi-terrain:before { + content: "\e564"; } + +.mdi-text-fields:before { + content: "\e262"; } + +.mdi-text-format:before { + content: "\e165"; } + +.mdi-textsms:before { + content: "\e0d8"; } + +.mdi-texture:before { + content: "\e421"; } + +.mdi-theaters:before { + content: "\e8da"; } + +.mdi-thumb-down:before { + content: "\e8db"; } + +.mdi-thumb-up:before { + content: "\e8dc"; } + +.mdi-thumbs-up-down:before { + content: "\e8dd"; } + +.mdi-time-to-leave:before { + content: "\e62c"; } + +.mdi-timelapse:before { + content: "\e422"; } + +.mdi-timeline:before { + content: "\e922"; } + +.mdi-timer:before { + content: "\e425"; } + +.mdi-timer-10:before { + content: "\e423"; } + +.mdi-timer-3:before { + content: "\e424"; } + +.mdi-timer-off:before { + content: "\e426"; } + +.mdi-title:before { + content: "\e264"; } + +.mdi-toc:before { + content: "\e8de"; } + +.mdi-today:before { + content: "\e8df"; } + +.mdi-toll:before { + content: "\e8e0"; } + +.mdi-tonality:before { + content: "\e427"; } + +.mdi-touch-app:before { + content: "\e913"; } + +.mdi-toys:before { + content: "\e332"; } + +.mdi-track-changes:before { + content: "\e8e1"; } + +.mdi-traffic:before { + content: "\e565"; } + +.mdi-train:before { + content: "\e570"; } + +.mdi-tram:before { + content: "\e571"; } + +.mdi-transfer-within-a-station:before { + content: "\e572"; } + +.mdi-transform:before { + content: "\e428"; } + +.mdi-translate:before { + content: "\e8e2"; } + +.mdi-trending-down:before { + content: "\e8e3"; } + +.mdi-trending-flat:before { + content: "\e8e4"; } + +.mdi-trending-up:before { + content: "\e8e5"; } + +.mdi-tune:before { + content: "\e429"; } + +.mdi-turned-in:before { + content: "\e8e6"; } + +.mdi-turned-in-not:before { + content: "\e8e7"; } + +.mdi-tv:before { + content: "\e333"; } + +.mdi-unarchive:before { + content: "\e169"; } + +.mdi-undo:before { + content: "\e166"; } + +.mdi-unfold-less:before { + content: "\e5d6"; } + +.mdi-unfold-more:before { + content: "\e5d7"; } + +.mdi-update:before { + content: "\e923"; } + +.mdi-usb:before { + content: "\e1e0"; } + +.mdi-verified-user:before { + content: "\e8e8"; } + +.mdi-vertical-align-bottom:before { + content: "\e258"; } + +.mdi-vertical-align-center:before { + content: "\e259"; } + +.mdi-vertical-align-top:before { + content: "\e25a"; } + +.mdi-vibration:before { + content: "\e62d"; } + +.mdi-video-call:before { + content: "\e070"; } + +.mdi-video-label:before { + content: "\e071"; } + +.mdi-video-library:before { + content: "\e04a"; } + +.mdi-videocam:before { + content: "\e04b"; } + +.mdi-videocam-off:before { + content: "\e04c"; } + +.mdi-videogame-asset:before { + content: "\e338"; } + +.mdi-view-agenda:before { + content: "\e8e9"; } + +.mdi-view-array:before { + content: "\e8ea"; } + +.mdi-view-carousel:before { + content: "\e8eb"; } + +.mdi-view-column:before { + content: "\e8ec"; } + +.mdi-view-comfy:before { + content: "\e42a"; } + +.mdi-view-compact:before { + content: "\e42b"; } + +.mdi-view-day:before { + content: "\e8ed"; } + +.mdi-view-headline:before { + content: "\e8ee"; } + +.mdi-view-list:before { + content: "\e8ef"; } + +.mdi-view-module:before { + content: "\e8f0"; } + +.mdi-view-quilt:before { + content: "\e8f1"; } + +.mdi-view-stream:before { + content: "\e8f2"; } + +.mdi-view-week:before { + content: "\e8f3"; } + +.mdi-vignette:before { + content: "\e435"; } + +.mdi-visibility:before { + content: "\e8f4"; } + +.mdi-visibility-off:before { + content: "\e8f5"; } + +.mdi-voice-chat:before { + content: "\e62e"; } + +.mdi-voicemail:before { + content: "\e0d9"; } + +.mdi-volume-down:before { + content: "\e04d"; } + +.mdi-volume-mute:before { + content: "\e04e"; } + +.mdi-volume-off:before { + content: "\e04f"; } + +.mdi-volume-up:before { + content: "\e050"; } + +.mdi-vpn-key:before { + content: "\e0da"; } + +.mdi-vpn-lock:before { + content: "\e62f"; } + +.mdi-wallpaper:before { + content: "\e1bc"; } + +.mdi-warning:before { + content: "\e002"; } + +.mdi-watch:before { + content: "\e334"; } + +.mdi-watch-later:before { + content: "\e924"; } + +.mdi-wb-auto:before { + content: "\e42c"; } + +.mdi-wb-cloudy:before { + content: "\e42d"; } + +.mdi-wb-incandescent:before { + content: "\e42e"; } + +.mdi-wb-iridescent:before { + content: "\e436"; } + +.mdi-wb-sunny:before { + content: "\e430"; } + +.mdi-wc:before { + content: "\e63d"; } + +.mdi-web:before { + content: "\e051"; } + +.mdi-web-asset:before { + content: "\e069"; } + +.mdi-weekend:before { + content: "\e16b"; } + +.mdi-whatshot:before { + content: "\e80e"; } + +.mdi-widgets:before { + content: "\e1bd"; } + +.mdi-wifi:before { + content: "\e63e"; } + +.mdi-wifi-lock:before { + content: "\e1e1"; } + +.mdi-wifi-tethering:before { + content: "\e1e2"; } + +.mdi-work:before { + content: "\e8f9"; } + +.mdi-wrap-text:before { + content: "\e25b"; } + +.mdi-youtube-searched-for:before { + content: "\e8fa"; } + +.mdi-zoom-in:before { + content: "\e8ff"; } + +.mdi-zoom-out:before { + content: "\e900"; } + +.mdi-zoom-out-map:before { + content: "\e56b"; } diff --git a/vendor/mervick/material-design-icons/css/material-icons.min.css b/vendor/mervick/material-design-icons/css/material-icons.min.css new file mode 100644 index 000000000..1aa7df4a9 --- /dev/null +++ b/vendor/mervick/material-design-icons/css/material-icons.min.css @@ -0,0 +1,2 @@ +.mdi-fw,.mdi-li{text-align:center}@font-face{font-family:"Material Design Icons";font-style:normal;font-weight:400;src:url(../fonts/MaterialIcons-Regular.eot?v=2.2.1);src:url(../fonts/MaterialIcons-Regular.eot?v=2.2.1#iefix) format("embedded-opentype"),url(../fonts/MaterialIcons-Regular.woff2?v=2.2.1) format("woff2"),url(../fonts/MaterialIcons-Regular.woff?v=2.2.1) format("woff"),url(../fonts/MaterialIcons-Regular.ttf?v=2.2.1) format("truetype"),url(../fonts/MaterialIcons-Regular.svg?v=2.2.1#materialiconsregular) format("svg")}.material-icons,.mdi{font:normal normal normal 14px/1 "Material Design Icons";font-size:inherit;display:inline-block;text-transform:none;letter-spacing:normal;line-height:1;position:relative;word-wrap:normal;top:1px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.material-icons{width:1em;height:1em;text-rendering:optimizeLegibility;font-feature-settings:'liga'}.mdi-lg,.mdi-size-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.mdi-2x,.mdi-size-2x{font-size:2em}.mdi-3x,.mdi-size-3x{font-size:3em}.mdi-4x,.mdi-size-4x{font-size:4em}.mdi-5x,.mdi-size-5x{font-size:5em}.mdi-fw{width:1.28571em}.mdi-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.mdi-ul>li{position:relative}.mdi-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em}.mdi-li.mdi-lg{left:-1.85714em}.mdi-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.mdi.pull-left{margin-right:.3em}.mdi.pull-right{margin-left:.3em}.mdi-spin{-webkit-animation:md-spin 2s infinite linear;animation:md-spin 2s infinite linear}.mdi-pulse{-webkit-animation:md-spin 1s infinite steps(8);animation:md-spin 1s infinite steps(8)}@-webkit-keyframes md-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes md-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.mdi-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.mdi-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.mdi-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.mdi-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.mdi-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .mdi-flip-horizontal,:root .mdi-flip-vertical,:root .mdi-rotate-180,:root .mdi-rotate-270,:root .mdi-rotate-90{filter:none}.mdi-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.mdi-stack-1x,.mdi-stack-2x{position:absolute;left:0;width:100%;text-align:center}.mdi-stack-1x{line-height:inherit}.mdi-stack-2x{font-size:2em}.mdi-inverse{color:#fff}.mdi-3d-rotation:before{content:"\e84d"}.mdi-ac-unit:before{content:"\eb3b"}.mdi-access-alarm:before{content:"\e190"}.mdi-access-alarms:before{content:"\e191"}.mdi-access-time:before{content:"\e192"}.mdi-accessibility:before{content:"\e84e"}.mdi-accessible:before{content:"\e914"}.mdi-account-balance:before{content:"\e84f"}.mdi-account-balance-wallet:before{content:"\e850"}.mdi-account-box:before{content:"\e851"}.mdi-account-circle:before{content:"\e853"}.mdi-adb:before{content:"\e60e"}.mdi-add:before{content:"\e145"}.mdi-add-a-photo:before{content:"\e439"}.mdi-add-alarm:before{content:"\e193"}.mdi-add-alert:before{content:"\e003"}.mdi-add-box:before{content:"\e146"}.mdi-add-circle:before{content:"\e147"}.mdi-add-circle-outline:before{content:"\e148"}.mdi-add-location:before{content:"\e567"}.mdi-add-shopping-cart:before{content:"\e854"}.mdi-add-to-photos:before{content:"\e39d"}.mdi-add-to-queue:before{content:"\e05c"}.mdi-adjust:before{content:"\e39e"}.mdi-airline-seat-flat:before{content:"\e630"}.mdi-airline-seat-flat-angled:before{content:"\e631"}.mdi-airline-seat-individual-suite:before{content:"\e632"}.mdi-airline-seat-legroom-extra:before{content:"\e633"}.mdi-airline-seat-legroom-normal:before{content:"\e634"}.mdi-airline-seat-legroom-reduced:before{content:"\e635"}.mdi-airline-seat-recline-extra:before{content:"\e636"}.mdi-airline-seat-recline-normal:before{content:"\e637"}.mdi-airplanemode-active:before{content:"\e195"}.mdi-airplanemode-inactive:before{content:"\e194"}.mdi-airplay:before{content:"\e055"}.mdi-airport-shuttle:before{content:"\eb3c"}.mdi-alarm:before{content:"\e855"}.mdi-alarm-add:before{content:"\e856"}.mdi-alarm-off:before{content:"\e857"}.mdi-alarm-on:before{content:"\e858"}.mdi-album:before{content:"\e019"}.mdi-all-inclusive:before{content:"\eb3d"}.mdi-all-out:before{content:"\e90b"}.mdi-android:before{content:"\e859"}.mdi-announcement:before{content:"\e85a"}.mdi-apps:before{content:"\e5c3"}.mdi-archive:before{content:"\e149"}.mdi-arrow-back:before{content:"\e5c4"}.mdi-arrow-downward:before{content:"\e5db"}.mdi-arrow-drop-down:before{content:"\e5c5"}.mdi-arrow-drop-down-circle:before{content:"\e5c6"}.mdi-arrow-drop-up:before{content:"\e5c7"}.mdi-arrow-forward:before{content:"\e5c8"}.mdi-arrow-upward:before{content:"\e5d8"}.mdi-art-track:before{content:"\e060"}.mdi-aspect-ratio:before{content:"\e85b"}.mdi-assessment:before{content:"\e85c"}.mdi-assignment:before{content:"\e85d"}.mdi-assignment-ind:before{content:"\e85e"}.mdi-assignment-late:before{content:"\e85f"}.mdi-assignment-return:before{content:"\e860"}.mdi-assignment-returned:before{content:"\e861"}.mdi-assignment-turned-in:before{content:"\e862"}.mdi-assistant:before{content:"\e39f"}.mdi-assistant-photo:before{content:"\e3a0"}.mdi-attach-file:before{content:"\e226"}.mdi-attach-money:before{content:"\e227"}.mdi-attachment:before{content:"\e2bc"}.mdi-audiotrack:before{content:"\e3a1"}.mdi-autorenew:before{content:"\e863"}.mdi-av-timer:before{content:"\e01b"}.mdi-backspace:before{content:"\e14a"}.mdi-backup:before{content:"\e864"}.mdi-battery-alert:before{content:"\e19c"}.mdi-battery-charging-full:before{content:"\e1a3"}.mdi-battery-full:before{content:"\e1a4"}.mdi-battery-std:before{content:"\e1a5"}.mdi-battery-unknown:before{content:"\e1a6"}.mdi-beach-access:before{content:"\eb3e"}.mdi-beenhere:before{content:"\e52d"}.mdi-block:before{content:"\e14b"}.mdi-bluetooth:before{content:"\e1a7"}.mdi-bluetooth-audio:before{content:"\e60f"}.mdi-bluetooth-connected:before{content:"\e1a8"}.mdi-bluetooth-disabled:before{content:"\e1a9"}.mdi-bluetooth-searching:before{content:"\e1aa"}.mdi-blur-circular:before{content:"\e3a2"}.mdi-blur-linear:before{content:"\e3a3"}.mdi-blur-off:before{content:"\e3a4"}.mdi-blur-on:before{content:"\e3a5"}.mdi-book:before{content:"\e865"}.mdi-bookmark:before{content:"\e866"}.mdi-bookmark-border:before{content:"\e867"}.mdi-border-all:before{content:"\e228"}.mdi-border-bottom:before{content:"\e229"}.mdi-border-clear:before{content:"\e22a"}.mdi-border-color:before{content:"\e22b"}.mdi-border-horizontal:before{content:"\e22c"}.mdi-border-inner:before{content:"\e22d"}.mdi-border-left:before{content:"\e22e"}.mdi-border-outer:before{content:"\e22f"}.mdi-border-right:before{content:"\e230"}.mdi-border-style:before{content:"\e231"}.mdi-border-top:before{content:"\e232"}.mdi-border-vertical:before{content:"\e233"}.mdi-branding-watermark:before{content:"\e06b"}.mdi-brightness-1:before{content:"\e3a6"}.mdi-brightness-2:before{content:"\e3a7"}.mdi-brightness-3:before{content:"\e3a8"}.mdi-brightness-4:before{content:"\e3a9"}.mdi-brightness-5:before{content:"\e3aa"}.mdi-brightness-6:before{content:"\e3ab"}.mdi-brightness-7:before{content:"\e3ac"}.mdi-brightness-auto:before{content:"\e1ab"}.mdi-brightness-high:before{content:"\e1ac"}.mdi-brightness-low:before{content:"\e1ad"}.mdi-brightness-medium:before{content:"\e1ae"}.mdi-broken-image:before{content:"\e3ad"}.mdi-brush:before{content:"\e3ae"}.mdi-bubble-chart:before{content:"\e6dd"}.mdi-bug-report:before{content:"\e868"}.mdi-build:before{content:"\e869"}.mdi-burst-mode:before{content:"\e43c"}.mdi-business:before{content:"\e0af"}.mdi-business-center:before{content:"\eb3f"}.mdi-cached:before{content:"\e86a"}.mdi-cake:before{content:"\e7e9"}.mdi-call:before{content:"\e0b0"}.mdi-call-end:before{content:"\e0b1"}.mdi-call-made:before{content:"\e0b2"}.mdi-call-merge:before{content:"\e0b3"}.mdi-call-missed:before{content:"\e0b4"}.mdi-call-missed-outgoing:before{content:"\e0e4"}.mdi-call-received:before{content:"\e0b5"}.mdi-call-split:before{content:"\e0b6"}.mdi-call-to-action:before{content:"\e06c"}.mdi-camera:before{content:"\e3af"}.mdi-camera-alt:before{content:"\e3b0"}.mdi-camera-enhance:before{content:"\e8fc"}.mdi-camera-front:before{content:"\e3b1"}.mdi-camera-rear:before{content:"\e3b2"}.mdi-camera-roll:before{content:"\e3b3"}.mdi-cancel:before{content:"\e5c9"}.mdi-card-giftcard:before{content:"\e8f6"}.mdi-card-membership:before{content:"\e8f7"}.mdi-card-travel:before{content:"\e8f8"}.mdi-casino:before{content:"\eb40"}.mdi-cast:before{content:"\e307"}.mdi-cast-connected:before{content:"\e308"}.mdi-center-focus-strong:before{content:"\e3b4"}.mdi-center-focus-weak:before{content:"\e3b5"}.mdi-change-history:before{content:"\e86b"}.mdi-chat:before{content:"\e0b7"}.mdi-chat-bubble:before{content:"\e0ca"}.mdi-chat-bubble-outline:before{content:"\e0cb"}.mdi-check:before{content:"\e5ca"}.mdi-check-box:before{content:"\e834"}.mdi-check-box-outline-blank:before{content:"\e835"}.mdi-check-circle:before{content:"\e86c"}.mdi-chevron-left:before{content:"\e5cb"}.mdi-chevron-right:before{content:"\e5cc"}.mdi-child-care:before{content:"\eb41"}.mdi-child-friendly:before{content:"\eb42"}.mdi-chrome-reader-mode:before{content:"\e86d"}.mdi-class:before{content:"\e86e"}.mdi-clear:before{content:"\e14c"}.mdi-clear-all:before{content:"\e0b8"}.mdi-close:before{content:"\e5cd"}.mdi-closed-caption:before{content:"\e01c"}.mdi-cloud:before{content:"\e2bd"}.mdi-cloud-circle:before{content:"\e2be"}.mdi-cloud-done:before{content:"\e2bf"}.mdi-cloud-download:before{content:"\e2c0"}.mdi-cloud-off:before{content:"\e2c1"}.mdi-cloud-queue:before{content:"\e2c2"}.mdi-cloud-upload:before{content:"\e2c3"}.mdi-code:before{content:"\e86f"}.mdi-collections:before{content:"\e3b6"}.mdi-collections-bookmark:before{content:"\e431"}.mdi-color-lens:before{content:"\e3b7"}.mdi-colorize:before{content:"\e3b8"}.mdi-comment:before{content:"\e0b9"}.mdi-compare:before{content:"\e3b9"}.mdi-compare-arrows:before{content:"\e915"}.mdi-computer:before{content:"\e30a"}.mdi-confirmation-number:before{content:"\e638"}.mdi-contact-mail:before{content:"\e0d0"}.mdi-contact-phone:before{content:"\e0cf"}.mdi-contacts:before{content:"\e0ba"}.mdi-content-copy:before{content:"\e14d"}.mdi-content-cut:before{content:"\e14e"}.mdi-content-paste:before{content:"\e14f"}.mdi-control-point:before{content:"\e3ba"}.mdi-control-point-duplicate:before{content:"\e3bb"}.mdi-copyright:before{content:"\e90c"}.mdi-create:before{content:"\e150"}.mdi-create-new-folder:before{content:"\e2cc"}.mdi-credit-card:before{content:"\e870"}.mdi-crop:before{content:"\e3be"}.mdi-crop-16-9:before{content:"\e3bc"}.mdi-crop-3-2:before{content:"\e3bd"}.mdi-crop-5-4:before{content:"\e3bf"}.mdi-crop-7-5:before{content:"\e3c0"}.mdi-crop-din:before{content:"\e3c1"}.mdi-crop-free:before{content:"\e3c2"}.mdi-crop-landscape:before{content:"\e3c3"}.mdi-crop-original:before{content:"\e3c4"}.mdi-crop-portrait:before{content:"\e3c5"}.mdi-crop-rotate:before{content:"\e437"}.mdi-crop-square:before{content:"\e3c6"}.mdi-dashboard:before{content:"\e871"}.mdi-data-usage:before{content:"\e1af"}.mdi-date-range:before{content:"\e916"}.mdi-dehaze:before{content:"\e3c7"}.mdi-delete:before{content:"\e872"}.mdi-delete-forever:before{content:"\e92b"}.mdi-delete-sweep:before{content:"\e16c"}.mdi-description:before{content:"\e873"}.mdi-desktop-mac:before{content:"\e30b"}.mdi-desktop-windows:before{content:"\e30c"}.mdi-details:before{content:"\e3c8"}.mdi-developer-board:before{content:"\e30d"}.mdi-developer-mode:before{content:"\e1b0"}.mdi-device-hub:before{content:"\e335"}.mdi-devices:before{content:"\e1b1"}.mdi-devices-other:before{content:"\e337"}.mdi-dialer-sip:before{content:"\e0bb"}.mdi-dialpad:before{content:"\e0bc"}.mdi-directions:before{content:"\e52e"}.mdi-directions-bike:before{content:"\e52f"}.mdi-directions-boat:before{content:"\e532"}.mdi-directions-bus:before{content:"\e530"}.mdi-directions-car:before{content:"\e531"}.mdi-directions-railway:before{content:"\e534"}.mdi-directions-run:before{content:"\e566"}.mdi-directions-subway:before{content:"\e533"}.mdi-directions-transit:before{content:"\e535"}.mdi-directions-walk:before{content:"\e536"}.mdi-disc-full:before{content:"\e610"}.mdi-dns:before{content:"\e875"}.mdi-do-not-disturb:before{content:"\e612"}.mdi-do-not-disturb-alt:before{content:"\e611"}.mdi-do-not-disturb-off:before{content:"\e643"}.mdi-do-not-disturb-on:before{content:"\e644"}.mdi-dock:before{content:"\e30e"}.mdi-domain:before{content:"\e7ee"}.mdi-done:before{content:"\e876"}.mdi-done-all:before{content:"\e877"}.mdi-donut-large:before{content:"\e917"}.mdi-donut-small:before{content:"\e918"}.mdi-drafts:before{content:"\e151"}.mdi-drag-handle:before{content:"\e25d"}.mdi-drive-eta:before{content:"\e613"}.mdi-dvr:before{content:"\e1b2"}.mdi-edit:before{content:"\e3c9"}.mdi-edit-location:before{content:"\e568"}.mdi-eject:before{content:"\e8fb"}.mdi-email:before{content:"\e0be"}.mdi-enhanced-encryption:before{content:"\e63f"}.mdi-equalizer:before{content:"\e01d"}.mdi-error:before{content:"\e000"}.mdi-error-outline:before{content:"\e001"}.mdi-euro-symbol:before{content:"\e926"}.mdi-ev-station:before{content:"\e56d"}.mdi-event:before{content:"\e878"}.mdi-event-available:before{content:"\e614"}.mdi-event-busy:before{content:"\e615"}.mdi-event-note:before{content:"\e616"}.mdi-event-seat:before{content:"\e903"}.mdi-exit-to-app:before{content:"\e879"}.mdi-expand-less:before{content:"\e5ce"}.mdi-expand-more:before{content:"\e5cf"}.mdi-explicit:before{content:"\e01e"}.mdi-explore:before{content:"\e87a"}.mdi-exposure:before{content:"\e3ca"}.mdi-exposure-neg-1:before{content:"\e3cb"}.mdi-exposure-neg-2:before{content:"\e3cc"}.mdi-exposure-plus-1:before{content:"\e3cd"}.mdi-exposure-plus-2:before{content:"\e3ce"}.mdi-exposure-zero:before{content:"\e3cf"}.mdi-extension:before{content:"\e87b"}.mdi-face:before{content:"\e87c"}.mdi-fast-forward:before{content:"\e01f"}.mdi-fast-rewind:before{content:"\e020"}.mdi-favorite:before{content:"\e87d"}.mdi-favorite-border:before{content:"\e87e"}.mdi-featured-play-list:before{content:"\e06d"}.mdi-featured-video:before{content:"\e06e"}.mdi-feedback:before{content:"\e87f"}.mdi-fiber-dvr:before{content:"\e05d"}.mdi-fiber-manual-record:before{content:"\e061"}.mdi-fiber-new:before{content:"\e05e"}.mdi-fiber-pin:before{content:"\e06a"}.mdi-fiber-smart-record:before{content:"\e062"}.mdi-file-download:before{content:"\e2c4"}.mdi-file-upload:before{content:"\e2c6"}.mdi-filter:before{content:"\e3d3"}.mdi-filter-1:before{content:"\e3d0"}.mdi-filter-2:before{content:"\e3d1"}.mdi-filter-3:before{content:"\e3d2"}.mdi-filter-4:before{content:"\e3d4"}.mdi-filter-5:before{content:"\e3d5"}.mdi-filter-6:before{content:"\e3d6"}.mdi-filter-7:before{content:"\e3d7"}.mdi-filter-8:before{content:"\e3d8"}.mdi-filter-9:before{content:"\e3d9"}.mdi-filter-9-plus:before{content:"\e3da"}.mdi-filter-b-and-w:before{content:"\e3db"}.mdi-filter-center-focus:before{content:"\e3dc"}.mdi-filter-drama:before{content:"\e3dd"}.mdi-filter-frames:before{content:"\e3de"}.mdi-filter-hdr:before{content:"\e3df"}.mdi-filter-list:before{content:"\e152"}.mdi-filter-none:before{content:"\e3e0"}.mdi-filter-tilt-shift:before{content:"\e3e2"}.mdi-filter-vintage:before{content:"\e3e3"}.mdi-find-in-page:before{content:"\e880"}.mdi-find-replace:before{content:"\e881"}.mdi-fingerprint:before{content:"\e90d"}.mdi-first-page:before{content:"\e5dc"}.mdi-fitness-center:before{content:"\eb43"}.mdi-flag:before{content:"\e153"}.mdi-flare:before{content:"\e3e4"}.mdi-flash-auto:before{content:"\e3e5"}.mdi-flash-off:before{content:"\e3e6"}.mdi-flash-on:before{content:"\e3e7"}.mdi-flight:before{content:"\e539"}.mdi-flight-land:before{content:"\e904"}.mdi-flight-takeoff:before{content:"\e905"}.mdi-flip:before{content:"\e3e8"}.mdi-flip-to-back:before{content:"\e882"}.mdi-flip-to-front:before{content:"\e883"}.mdi-folder:before{content:"\e2c7"}.mdi-folder-open:before{content:"\e2c8"}.mdi-folder-shared:before{content:"\e2c9"}.mdi-folder-special:before{content:"\e617"}.mdi-font-download:before{content:"\e167"}.mdi-format-align-center:before{content:"\e234"}.mdi-format-align-justify:before{content:"\e235"}.mdi-format-align-left:before{content:"\e236"}.mdi-format-align-right:before{content:"\e237"}.mdi-format-bold:before{content:"\e238"}.mdi-format-clear:before{content:"\e239"}.mdi-format-color-fill:before{content:"\e23a"}.mdi-format-color-reset:before{content:"\e23b"}.mdi-format-color-text:before{content:"\e23c"}.mdi-format-indent-decrease:before{content:"\e23d"}.mdi-format-indent-increase:before{content:"\e23e"}.mdi-format-italic:before{content:"\e23f"}.mdi-format-line-spacing:before{content:"\e240"}.mdi-format-list-bulleted:before{content:"\e241"}.mdi-format-list-numbered:before{content:"\e242"}.mdi-format-paint:before{content:"\e243"}.mdi-format-quote:before{content:"\e244"}.mdi-format-shapes:before{content:"\e25e"}.mdi-format-size:before{content:"\e245"}.mdi-format-strikethrough:before{content:"\e246"}.mdi-format-textdirection-l-to-r:before{content:"\e247"}.mdi-format-textdirection-r-to-l:before{content:"\e248"}.mdi-format-underlined:before{content:"\e249"}.mdi-forum:before{content:"\e0bf"}.mdi-forward:before{content:"\e154"}.mdi-forward-10:before{content:"\e056"}.mdi-forward-30:before{content:"\e057"}.mdi-forward-5:before{content:"\e058"}.mdi-free-breakfast:before{content:"\eb44"}.mdi-fullscreen:before{content:"\e5d0"}.mdi-fullscreen-exit:before{content:"\e5d1"}.mdi-functions:before{content:"\e24a"}.mdi-g-translate:before{content:"\e927"}.mdi-gamepad:before{content:"\e30f"}.mdi-games:before{content:"\e021"}.mdi-gavel:before{content:"\e90e"}.mdi-gesture:before{content:"\e155"}.mdi-get-app:before{content:"\e884"}.mdi-gif:before{content:"\e908"}.mdi-golf-course:before{content:"\eb45"}.mdi-gps-fixed:before{content:"\e1b3"}.mdi-gps-not-fixed:before{content:"\e1b4"}.mdi-gps-off:before{content:"\e1b5"}.mdi-grade:before{content:"\e885"}.mdi-gradient:before{content:"\e3e9"}.mdi-grain:before{content:"\e3ea"}.mdi-graphic-eq:before{content:"\e1b8"}.mdi-grid-off:before{content:"\e3eb"}.mdi-grid-on:before{content:"\e3ec"}.mdi-group:before{content:"\e7ef"}.mdi-group-add:before{content:"\e7f0"}.mdi-group-work:before{content:"\e886"}.mdi-hd:before{content:"\e052"}.mdi-hdr-off:before{content:"\e3ed"}.mdi-hdr-on:before{content:"\e3ee"}.mdi-hdr-strong:before{content:"\e3f1"}.mdi-hdr-weak:before{content:"\e3f2"}.mdi-headset:before{content:"\e310"}.mdi-headset-mic:before{content:"\e311"}.mdi-healing:before{content:"\e3f3"}.mdi-hearing:before{content:"\e023"}.mdi-help:before{content:"\e887"}.mdi-help-outline:before{content:"\e8fd"}.mdi-high-quality:before{content:"\e024"}.mdi-highlight:before{content:"\e25f"}.mdi-highlight-off:before{content:"\e888"}.mdi-history:before{content:"\e889"}.mdi-home:before{content:"\e88a"}.mdi-hot-tub:before{content:"\eb46"}.mdi-hotel:before{content:"\e53a"}.mdi-hourglass-empty:before{content:"\e88b"}.mdi-hourglass-full:before{content:"\e88c"}.mdi-http:before{content:"\e902"}.mdi-https:before{content:"\e88d"}.mdi-image:before{content:"\e3f4"}.mdi-image-aspect-ratio:before{content:"\e3f5"}.mdi-import-contacts:before{content:"\e0e0"}.mdi-import-export:before{content:"\e0c3"}.mdi-important-devices:before{content:"\e912"}.mdi-inbox:before{content:"\e156"}.mdi-indeterminate-check-box:before{content:"\e909"}.mdi-info:before{content:"\e88e"}.mdi-info-outline:before{content:"\e88f"}.mdi-input:before{content:"\e890"}.mdi-insert-chart:before{content:"\e24b"}.mdi-insert-comment:before{content:"\e24c"}.mdi-insert-drive-file:before{content:"\e24d"}.mdi-insert-emoticon:before{content:"\e24e"}.mdi-insert-invitation:before{content:"\e24f"}.mdi-insert-link:before{content:"\e250"}.mdi-insert-photo:before{content:"\e251"}.mdi-invert-colors:before{content:"\e891"}.mdi-invert-colors-off:before{content:"\e0c4"}.mdi-iso:before{content:"\e3f6"}.mdi-keyboard:before{content:"\e312"}.mdi-keyboard-arrow-down:before{content:"\e313"}.mdi-keyboard-arrow-left:before{content:"\e314"}.mdi-keyboard-arrow-right:before{content:"\e315"}.mdi-keyboard-arrow-up:before{content:"\e316"}.mdi-keyboard-backspace:before{content:"\e317"}.mdi-keyboard-capslock:before{content:"\e318"}.mdi-keyboard-hide:before{content:"\e31a"}.mdi-keyboard-return:before{content:"\e31b"}.mdi-keyboard-tab:before{content:"\e31c"}.mdi-keyboard-voice:before{content:"\e31d"}.mdi-kitchen:before{content:"\eb47"}.mdi-label:before{content:"\e892"}.mdi-label-outline:before{content:"\e893"}.mdi-landscape:before{content:"\e3f7"}.mdi-language:before{content:"\e894"}.mdi-laptop:before{content:"\e31e"}.mdi-laptop-chromebook:before{content:"\e31f"}.mdi-laptop-mac:before{content:"\e320"}.mdi-laptop-windows:before{content:"\e321"}.mdi-last-page:before{content:"\e5dd"}.mdi-launch:before{content:"\e895"}.mdi-layers:before{content:"\e53b"}.mdi-layers-clear:before{content:"\e53c"}.mdi-leak-add:before{content:"\e3f8"}.mdi-leak-remove:before{content:"\e3f9"}.mdi-lens:before{content:"\e3fa"}.mdi-library-add:before{content:"\e02e"}.mdi-library-books:before{content:"\e02f"}.mdi-library-music:before{content:"\e030"}.mdi-lightbulb-outline:before{content:"\e90f"}.mdi-line-style:before{content:"\e919"}.mdi-line-weight:before{content:"\e91a"}.mdi-linear-scale:before{content:"\e260"}.mdi-link:before{content:"\e157"}.mdi-linked-camera:before{content:"\e438"}.mdi-list:before{content:"\e896"}.mdi-live-help:before{content:"\e0c6"}.mdi-live-tv:before{content:"\e639"}.mdi-local-activity:before{content:"\e53f"}.mdi-local-airport:before{content:"\e53d"}.mdi-local-atm:before{content:"\e53e"}.mdi-local-bar:before{content:"\e540"}.mdi-local-cafe:before{content:"\e541"}.mdi-local-car-wash:before{content:"\e542"}.mdi-local-convenience-store:before{content:"\e543"}.mdi-local-dining:before{content:"\e556"}.mdi-local-drink:before{content:"\e544"}.mdi-local-florist:before{content:"\e545"}.mdi-local-gas-station:before{content:"\e546"}.mdi-local-grocery-store:before{content:"\e547"}.mdi-local-hospital:before{content:"\e548"}.mdi-local-hotel:before{content:"\e549"}.mdi-local-laundry-service:before{content:"\e54a"}.mdi-local-library:before{content:"\e54b"}.mdi-local-mall:before{content:"\e54c"}.mdi-local-movies:before{content:"\e54d"}.mdi-local-offer:before{content:"\e54e"}.mdi-local-parking:before{content:"\e54f"}.mdi-local-pharmacy:before{content:"\e550"}.mdi-local-phone:before{content:"\e551"}.mdi-local-pizza:before{content:"\e552"}.mdi-local-play:before{content:"\e553"}.mdi-local-post-office:before{content:"\e554"}.mdi-local-printshop:before{content:"\e555"}.mdi-local-see:before{content:"\e557"}.mdi-local-shipping:before{content:"\e558"}.mdi-local-taxi:before{content:"\e559"}.mdi-location-city:before{content:"\e7f1"}.mdi-location-disabled:before{content:"\e1b6"}.mdi-location-off:before{content:"\e0c7"}.mdi-location-on:before{content:"\e0c8"}.mdi-location-searching:before{content:"\e1b7"}.mdi-lock:before{content:"\e897"}.mdi-lock-open:before{content:"\e898"}.mdi-lock-outline:before{content:"\e899"}.mdi-looks:before{content:"\e3fc"}.mdi-looks-3:before{content:"\e3fb"}.mdi-looks-4:before{content:"\e3fd"}.mdi-looks-5:before{content:"\e3fe"}.mdi-looks-6:before{content:"\e3ff"}.mdi-looks-one:before{content:"\e400"}.mdi-looks-two:before{content:"\e401"}.mdi-loop:before{content:"\e028"}.mdi-loupe:before{content:"\e402"}.mdi-low-priority:before{content:"\e16d"}.mdi-loyalty:before{content:"\e89a"}.mdi-mail:before{content:"\e158"}.mdi-mail-outline:before{content:"\e0e1"}.mdi-map:before{content:"\e55b"}.mdi-markunread:before{content:"\e159"}.mdi-markunread-mailbox:before{content:"\e89b"}.mdi-memory:before{content:"\e322"}.mdi-menu:before{content:"\e5d2"}.mdi-merge-type:before{content:"\e252"}.mdi-message:before{content:"\e0c9"}.mdi-mic:before{content:"\e029"}.mdi-mic-none:before{content:"\e02a"}.mdi-mic-off:before{content:"\e02b"}.mdi-mms:before{content:"\e618"}.mdi-mode-comment:before{content:"\e253"}.mdi-mode-edit:before{content:"\e254"}.mdi-monetization-on:before{content:"\e263"}.mdi-money-off:before{content:"\e25c"}.mdi-monochrome-photos:before{content:"\e403"}.mdi-mood:before{content:"\e7f2"}.mdi-mood-bad:before{content:"\e7f3"}.mdi-more:before{content:"\e619"}.mdi-more-horiz:before{content:"\e5d3"}.mdi-more-vert:before{content:"\e5d4"}.mdi-motorcycle:before{content:"\e91b"}.mdi-mouse:before{content:"\e323"}.mdi-move-to-inbox:before{content:"\e168"}.mdi-movie:before{content:"\e02c"}.mdi-movie-creation:before{content:"\e404"}.mdi-movie-filter:before{content:"\e43a"}.mdi-multiline-chart:before{content:"\e6df"}.mdi-music-note:before{content:"\e405"}.mdi-music-video:before{content:"\e063"}.mdi-my-location:before{content:"\e55c"}.mdi-nature:before{content:"\e406"}.mdi-nature-people:before{content:"\e407"}.mdi-navigate-before:before{content:"\e408"}.mdi-navigate-next:before{content:"\e409"}.mdi-navigation:before{content:"\e55d"}.mdi-near-me:before{content:"\e569"}.mdi-network-cell:before{content:"\e1b9"}.mdi-network-check:before{content:"\e640"}.mdi-network-locked:before{content:"\e61a"}.mdi-network-wifi:before{content:"\e1ba"}.mdi-new-releases:before{content:"\e031"}.mdi-next-week:before{content:"\e16a"}.mdi-nfc:before{content:"\e1bb"}.mdi-no-encryption:before{content:"\e641"}.mdi-no-sim:before{content:"\e0cc"}.mdi-not-interested:before{content:"\e033"}.mdi-note:before{content:"\e06f"}.mdi-note-add:before{content:"\e89c"}.mdi-notifications:before{content:"\e7f4"}.mdi-notifications-active:before{content:"\e7f7"}.mdi-notifications-none:before{content:"\e7f5"}.mdi-notifications-off:before{content:"\e7f6"}.mdi-notifications-paused:before{content:"\e7f8"}.mdi-offline-pin:before{content:"\e90a"}.mdi-ondemand-video:before{content:"\e63a"}.mdi-opacity:before{content:"\e91c"}.mdi-open-in-browser:before{content:"\e89d"}.mdi-open-in-new:before{content:"\e89e"}.mdi-open-with:before{content:"\e89f"}.mdi-pages:before{content:"\e7f9"}.mdi-pageview:before{content:"\e8a0"}.mdi-palette:before{content:"\e40a"}.mdi-pan-tool:before{content:"\e925"}.mdi-panorama:before{content:"\e40b"}.mdi-panorama-fish-eye:before{content:"\e40c"}.mdi-panorama-horizontal:before{content:"\e40d"}.mdi-panorama-vertical:before{content:"\e40e"}.mdi-panorama-wide-angle:before{content:"\e40f"}.mdi-party-mode:before{content:"\e7fa"}.mdi-pause:before{content:"\e034"}.mdi-pause-circle-filled:before{content:"\e035"}.mdi-pause-circle-outline:before{content:"\e036"}.mdi-payment:before{content:"\e8a1"}.mdi-people:before{content:"\e7fb"}.mdi-people-outline:before{content:"\e7fc"}.mdi-perm-camera-mic:before{content:"\e8a2"}.mdi-perm-contact-calendar:before{content:"\e8a3"}.mdi-perm-data-setting:before{content:"\e8a4"}.mdi-perm-device-information:before{content:"\e8a5"}.mdi-perm-identity:before{content:"\e8a6"}.mdi-perm-media:before{content:"\e8a7"}.mdi-perm-phone-msg:before{content:"\e8a8"}.mdi-perm-scan-wifi:before{content:"\e8a9"}.mdi-person:before{content:"\e7fd"}.mdi-person-add:before{content:"\e7fe"}.mdi-person-outline:before{content:"\e7ff"}.mdi-person-pin:before{content:"\e55a"}.mdi-person-pin-circle:before{content:"\e56a"}.mdi-personal-video:before{content:"\e63b"}.mdi-pets:before{content:"\e91d"}.mdi-phone:before{content:"\e0cd"}.mdi-phone-android:before{content:"\e324"}.mdi-phone-bluetooth-speaker:before{content:"\e61b"}.mdi-phone-forwarded:before{content:"\e61c"}.mdi-phone-in-talk:before{content:"\e61d"}.mdi-phone-iphone:before{content:"\e325"}.mdi-phone-locked:before{content:"\e61e"}.mdi-phone-missed:before{content:"\e61f"}.mdi-phone-paused:before{content:"\e620"}.mdi-phonelink:before{content:"\e326"}.mdi-phonelink-erase:before{content:"\e0db"}.mdi-phonelink-lock:before{content:"\e0dc"}.mdi-phonelink-off:before{content:"\e327"}.mdi-phonelink-ring:before{content:"\e0dd"}.mdi-phonelink-setup:before{content:"\e0de"}.mdi-photo:before{content:"\e410"}.mdi-photo-album:before{content:"\e411"}.mdi-photo-camera:before{content:"\e412"}.mdi-photo-filter:before{content:"\e43b"}.mdi-photo-library:before{content:"\e413"}.mdi-photo-size-select-actual:before{content:"\e432"}.mdi-photo-size-select-large:before{content:"\e433"}.mdi-photo-size-select-small:before{content:"\e434"}.mdi-picture-as-pdf:before{content:"\e415"}.mdi-picture-in-picture:before{content:"\e8aa"}.mdi-picture-in-picture-alt:before{content:"\e911"}.mdi-pie-chart:before{content:"\e6c4"}.mdi-pie-chart-outlined:before{content:"\e6c5"}.mdi-pin-drop:before{content:"\e55e"}.mdi-place:before{content:"\e55f"}.mdi-play-arrow:before{content:"\e037"}.mdi-play-circle-filled:before{content:"\e038"}.mdi-play-circle-outline:before{content:"\e039"}.mdi-play-for-work:before{content:"\e906"}.mdi-playlist-add:before{content:"\e03b"}.mdi-playlist-add-check:before{content:"\e065"}.mdi-playlist-play:before{content:"\e05f"}.mdi-plus-one:before{content:"\e800"}.mdi-poll:before{content:"\e801"}.mdi-polymer:before{content:"\e8ab"}.mdi-pool:before{content:"\eb48"}.mdi-portable-wifi-off:before{content:"\e0ce"}.mdi-portrait:before{content:"\e416"}.mdi-power:before{content:"\e63c"}.mdi-power-input:before{content:"\e336"}.mdi-power-settings-new:before{content:"\e8ac"}.mdi-pregnant-woman:before{content:"\e91e"}.mdi-present-to-all:before{content:"\e0df"}.mdi-print:before{content:"\e8ad"}.mdi-priority-high:before{content:"\e645"}.mdi-public:before{content:"\e80b"}.mdi-publish:before{content:"\e255"}.mdi-query-builder:before{content:"\e8ae"}.mdi-question-answer:before{content:"\e8af"}.mdi-queue:before{content:"\e03c"}.mdi-queue-music:before{content:"\e03d"}.mdi-queue-play-next:before{content:"\e066"}.mdi-radio:before{content:"\e03e"}.mdi-radio-button-checked:before{content:"\e837"}.mdi-radio-button-unchecked:before{content:"\e836"}.mdi-rate-review:before{content:"\e560"}.mdi-receipt:before{content:"\e8b0"}.mdi-recent-actors:before{content:"\e03f"}.mdi-record-voice-over:before{content:"\e91f"}.mdi-redeem:before{content:"\e8b1"}.mdi-redo:before{content:"\e15a"}.mdi-refresh:before{content:"\e5d5"}.mdi-remove:before{content:"\e15b"}.mdi-remove-circle:before{content:"\e15c"}.mdi-remove-circle-outline:before{content:"\e15d"}.mdi-remove-from-queue:before{content:"\e067"}.mdi-remove-red-eye:before{content:"\e417"}.mdi-remove-shopping-cart:before{content:"\e928"}.mdi-reorder:before{content:"\e8fe"}.mdi-repeat:before{content:"\e040"}.mdi-repeat-one:before{content:"\e041"}.mdi-replay:before{content:"\e042"}.mdi-replay-10:before{content:"\e059"}.mdi-replay-30:before{content:"\e05a"}.mdi-replay-5:before{content:"\e05b"}.mdi-reply:before{content:"\e15e"}.mdi-reply-all:before{content:"\e15f"}.mdi-report:before{content:"\e160"}.mdi-report-problem:before{content:"\e8b2"}.mdi-restaurant:before{content:"\e56c"}.mdi-restaurant-menu:before{content:"\e561"}.mdi-restore:before{content:"\e8b3"}.mdi-restore-page:before{content:"\e929"}.mdi-ring-volume:before{content:"\e0d1"}.mdi-room:before{content:"\e8b4"}.mdi-room-service:before{content:"\eb49"}.mdi-rotate-90-degrees-ccw:before{content:"\e418"}.mdi-rotate-left:before{content:"\e419"}.mdi-rotate-right:before{content:"\e41a"}.mdi-rounded-corner:before{content:"\e920"}.mdi-router:before{content:"\e328"}.mdi-rowing:before{content:"\e921"}.mdi-rss-feed:before{content:"\e0e5"}.mdi-rv-hookup:before{content:"\e642"}.mdi-satellite:before{content:"\e562"}.mdi-save:before{content:"\e161"}.mdi-scanner:before{content:"\e329"}.mdi-schedule:before{content:"\e8b5"}.mdi-school:before{content:"\e80c"}.mdi-screen-lock-landscape:before{content:"\e1be"}.mdi-screen-lock-portrait:before{content:"\e1bf"}.mdi-screen-lock-rotation:before{content:"\e1c0"}.mdi-screen-rotation:before{content:"\e1c1"}.mdi-screen-share:before{content:"\e0e2"}.mdi-sd-card:before{content:"\e623"}.mdi-sd-storage:before{content:"\e1c2"}.mdi-search:before{content:"\e8b6"}.mdi-security:before{content:"\e32a"}.mdi-select-all:before{content:"\e162"}.mdi-send:before{content:"\e163"}.mdi-sentiment-dissatisfied:before{content:"\e811"}.mdi-sentiment-neutral:before{content:"\e812"}.mdi-sentiment-satisfied:before{content:"\e813"}.mdi-sentiment-very-dissatisfied:before{content:"\e814"}.mdi-sentiment-very-satisfied:before{content:"\e815"}.mdi-settings:before{content:"\e8b8"}.mdi-settings-applications:before{content:"\e8b9"}.mdi-settings-backup-restore:before{content:"\e8ba"}.mdi-settings-bluetooth:before{content:"\e8bb"}.mdi-settings-brightness:before{content:"\e8bd"}.mdi-settings-cell:before{content:"\e8bc"}.mdi-settings-ethernet:before{content:"\e8be"}.mdi-settings-input-antenna:before{content:"\e8bf"}.mdi-settings-input-component:before{content:"\e8c0"}.mdi-settings-input-composite:before{content:"\e8c1"}.mdi-settings-input-hdmi:before{content:"\e8c2"}.mdi-settings-input-svideo:before{content:"\e8c3"}.mdi-settings-overscan:before{content:"\e8c4"}.mdi-settings-phone:before{content:"\e8c5"}.mdi-settings-power:before{content:"\e8c6"}.mdi-settings-remote:before{content:"\e8c7"}.mdi-settings-system-daydream:before{content:"\e1c3"}.mdi-settings-voice:before{content:"\e8c8"}.mdi-share:before{content:"\e80d"}.mdi-shop:before{content:"\e8c9"}.mdi-shop-two:before{content:"\e8ca"}.mdi-shopping-basket:before{content:"\e8cb"}.mdi-shopping-cart:before{content:"\e8cc"}.mdi-short-text:before{content:"\e261"}.mdi-show-chart:before{content:"\e6e1"}.mdi-shuffle:before{content:"\e043"}.mdi-signal-cellular-4-bar:before{content:"\e1c8"}.mdi-signal-cellular-connected-no-internet-4-bar:before{content:"\e1cd"}.mdi-signal-cellular-no-sim:before{content:"\e1ce"}.mdi-signal-cellular-null:before{content:"\e1cf"}.mdi-signal-cellular-off:before{content:"\e1d0"}.mdi-signal-wifi-4-bar:before{content:"\e1d8"}.mdi-signal-wifi-4-bar-lock:before{content:"\e1d9"}.mdi-signal-wifi-off:before{content:"\e1da"}.mdi-sim-card:before{content:"\e32b"}.mdi-sim-card-alert:before{content:"\e624"}.mdi-skip-next:before{content:"\e044"}.mdi-skip-previous:before{content:"\e045"}.mdi-slideshow:before{content:"\e41b"}.mdi-slow-motion-video:before{content:"\e068"}.mdi-smartphone:before{content:"\e32c"}.mdi-smoke-free:before{content:"\eb4a"}.mdi-smoking-rooms:before{content:"\eb4b"}.mdi-sms:before{content:"\e625"}.mdi-sms-failed:before{content:"\e626"}.mdi-snooze:before{content:"\e046"}.mdi-sort:before{content:"\e164"}.mdi-sort-by-alpha:before{content:"\e053"}.mdi-spa:before{content:"\eb4c"}.mdi-space-bar:before{content:"\e256"}.mdi-speaker:before{content:"\e32d"}.mdi-speaker-group:before{content:"\e32e"}.mdi-speaker-notes:before{content:"\e8cd"}.mdi-speaker-notes-off:before{content:"\e92a"}.mdi-speaker-phone:before{content:"\e0d2"}.mdi-spellcheck:before{content:"\e8ce"}.mdi-star:before{content:"\e838"}.mdi-star-border:before{content:"\e83a"}.mdi-star-half:before{content:"\e839"}.mdi-stars:before{content:"\e8d0"}.mdi-stay-current-landscape:before{content:"\e0d3"}.mdi-stay-current-portrait:before{content:"\e0d4"}.mdi-stay-primary-landscape:before{content:"\e0d5"}.mdi-stay-primary-portrait:before{content:"\e0d6"}.mdi-stop:before{content:"\e047"}.mdi-stop-screen-share:before{content:"\e0e3"}.mdi-storage:before{content:"\e1db"}.mdi-store:before{content:"\e8d1"}.mdi-store-mall-directory:before{content:"\e563"}.mdi-straighten:before{content:"\e41c"}.mdi-streetview:before{content:"\e56e"}.mdi-strikethrough-s:before{content:"\e257"}.mdi-style:before{content:"\e41d"}.mdi-subdirectory-arrow-left:before{content:"\e5d9"}.mdi-subdirectory-arrow-right:before{content:"\e5da"}.mdi-subject:before{content:"\e8d2"}.mdi-subscriptions:before{content:"\e064"}.mdi-subtitles:before{content:"\e048"}.mdi-subway:before{content:"\e56f"}.mdi-supervisor-account:before{content:"\e8d3"}.mdi-surround-sound:before{content:"\e049"}.mdi-swap-calls:before{content:"\e0d7"}.mdi-swap-horiz:before{content:"\e8d4"}.mdi-swap-vert:before{content:"\e8d5"}.mdi-swap-vertical-circle:before{content:"\e8d6"}.mdi-switch-camera:before{content:"\e41e"}.mdi-switch-video:before{content:"\e41f"}.mdi-sync:before{content:"\e627"}.mdi-sync-disabled:before{content:"\e628"}.mdi-sync-problem:before{content:"\e629"}.mdi-system-update:before{content:"\e62a"}.mdi-system-update-alt:before{content:"\e8d7"}.mdi-tab:before{content:"\e8d8"}.mdi-tab-unselected:before{content:"\e8d9"}.mdi-tablet:before{content:"\e32f"}.mdi-tablet-android:before{content:"\e330"}.mdi-tablet-mac:before{content:"\e331"}.mdi-tag-faces:before{content:"\e420"}.mdi-tap-and-play:before{content:"\e62b"}.mdi-terrain:before{content:"\e564"}.mdi-text-fields:before{content:"\e262"}.mdi-text-format:before{content:"\e165"}.mdi-textsms:before{content:"\e0d8"}.mdi-texture:before{content:"\e421"}.mdi-theaters:before{content:"\e8da"}.mdi-thumb-down:before{content:"\e8db"}.mdi-thumb-up:before{content:"\e8dc"}.mdi-thumbs-up-down:before{content:"\e8dd"}.mdi-time-to-leave:before{content:"\e62c"}.mdi-timelapse:before{content:"\e422"}.mdi-timeline:before{content:"\e922"}.mdi-timer:before{content:"\e425"}.mdi-timer-10:before{content:"\e423"}.mdi-timer-3:before{content:"\e424"}.mdi-timer-off:before{content:"\e426"}.mdi-title:before{content:"\e264"}.mdi-toc:before{content:"\e8de"}.mdi-today:before{content:"\e8df"}.mdi-toll:before{content:"\e8e0"}.mdi-tonality:before{content:"\e427"}.mdi-touch-app:before{content:"\e913"}.mdi-toys:before{content:"\e332"}.mdi-track-changes:before{content:"\e8e1"}.mdi-traffic:before{content:"\e565"}.mdi-train:before{content:"\e570"}.mdi-tram:before{content:"\e571"}.mdi-transfer-within-a-station:before{content:"\e572"}.mdi-transform:before{content:"\e428"}.mdi-translate:before{content:"\e8e2"}.mdi-trending-down:before{content:"\e8e3"}.mdi-trending-flat:before{content:"\e8e4"}.mdi-trending-up:before{content:"\e8e5"}.mdi-tune:before{content:"\e429"}.mdi-turned-in:before{content:"\e8e6"}.mdi-turned-in-not:before{content:"\e8e7"}.mdi-tv:before{content:"\e333"}.mdi-unarchive:before{content:"\e169"}.mdi-undo:before{content:"\e166"}.mdi-unfold-less:before{content:"\e5d6"}.mdi-unfold-more:before{content:"\e5d7"}.mdi-update:before{content:"\e923"}.mdi-usb:before{content:"\e1e0"}.mdi-verified-user:before{content:"\e8e8"}.mdi-vertical-align-bottom:before{content:"\e258"}.mdi-vertical-align-center:before{content:"\e259"}.mdi-vertical-align-top:before{content:"\e25a"}.mdi-vibration:before{content:"\e62d"}.mdi-video-call:before{content:"\e070"}.mdi-video-label:before{content:"\e071"}.mdi-video-library:before{content:"\e04a"}.mdi-videocam:before{content:"\e04b"}.mdi-videocam-off:before{content:"\e04c"}.mdi-videogame-asset:before{content:"\e338"}.mdi-view-agenda:before{content:"\e8e9"}.mdi-view-array:before{content:"\e8ea"}.mdi-view-carousel:before{content:"\e8eb"}.mdi-view-column:before{content:"\e8ec"}.mdi-view-comfy:before{content:"\e42a"}.mdi-view-compact:before{content:"\e42b"}.mdi-view-day:before{content:"\e8ed"}.mdi-view-headline:before{content:"\e8ee"}.mdi-view-list:before{content:"\e8ef"}.mdi-view-module:before{content:"\e8f0"}.mdi-view-quilt:before{content:"\e8f1"}.mdi-view-stream:before{content:"\e8f2"}.mdi-view-week:before{content:"\e8f3"}.mdi-vignette:before{content:"\e435"}.mdi-visibility:before{content:"\e8f4"}.mdi-visibility-off:before{content:"\e8f5"}.mdi-voice-chat:before{content:"\e62e"}.mdi-voicemail:before{content:"\e0d9"}.mdi-volume-down:before{content:"\e04d"}.mdi-volume-mute:before{content:"\e04e"}.mdi-volume-off:before{content:"\e04f"}.mdi-volume-up:before{content:"\e050"}.mdi-vpn-key:before{content:"\e0da"}.mdi-vpn-lock:before{content:"\e62f"}.mdi-wallpaper:before{content:"\e1bc"}.mdi-warning:before{content:"\e002"}.mdi-watch:before{content:"\e334"}.mdi-watch-later:before{content:"\e924"}.mdi-wb-auto:before{content:"\e42c"}.mdi-wb-cloudy:before{content:"\e42d"}.mdi-wb-incandescent:before{content:"\e42e"}.mdi-wb-iridescent:before{content:"\e436"}.mdi-wb-sunny:before{content:"\e430"}.mdi-wc:before{content:"\e63d"}.mdi-web:before{content:"\e051"}.mdi-web-asset:before{content:"\e069"}.mdi-weekend:before{content:"\e16b"}.mdi-whatshot:before{content:"\e80e"}.mdi-widgets:before{content:"\e1bd"}.mdi-wifi:before{content:"\e63e"}.mdi-wifi-lock:before{content:"\e1e1"}.mdi-wifi-tethering:before{content:"\e1e2"}.mdi-work:before{content:"\e8f9"}.mdi-wrap-text:before{content:"\e25b"}.mdi-youtube-searched-for:before{content:"\e8fa"}.mdi-zoom-in:before{content:"\e8ff"}.mdi-zoom-out:before{content:"\e900"}.mdi-zoom-out-map:before{content:"\e56b"} +/*# sourceMappingURL=material-icons.min.css.map */
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/css/material-icons.min.css.map b/vendor/mervick/material-design-icons/css/material-icons.min.css.map new file mode 100644 index 000000000..a5d8aa1ed --- /dev/null +++ b/vendor/mervick/material-design-icons/css/material-icons.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["css/material-icons.css"],"names":[],"mappings":"AAkDA,QAWA,QAgGE,WAAY,OA3Jd,WACE,YAAa,wBACb,WAAY,OACZ,YAAa,IACb,IAAK,gDACL,IAAK,sDAAuD,4BAA6B,kDAAmD,gBAAiB,iDAAkD,eAAgB,gDAAiD,mBAAoB,qEAAsE,cACtW,gBAAN,KACE,KAAM,OAAO,OAAO,OAAO,KAAM,EAAE,wBACnC,UAAW,QACX,QAAS,aACT,eAAgB,KAChB,eAAgB,OAChB,YAAa,EACb,SAAU,SACV,UAAW,OACX,IAAK,IAEL,uBAA+F,YAE/F,wBAA2H,UAC3H,UAAW,eAEb,gBACE,MAAO,IACP,OAAQ,IAER,eAAuJ,mBAEvJ,sBAAoL,OAGtL,QAAS,aACP,UAAW,UACX,YAAa,MACb,eAAgB,KAElB,QAAS,aACP,UAAW,IAEb,QAAS,aACP,UAAW,IAEb,QAAS,aACP,UAAW,IAEb,QAAS,aACP,UAAW,IAEb,QACE,MAAO,UAGT,QACE,aAAc,EACd,YAAa,UACb,gBAAiB,KACjB,WACE,SAAU,SAEd,QACE,SAAU,SACV,KAAM,WACN,MAAO,UACP,IAAK,SAEL,eACE,KAAM,WAEV,YACE,QAAS,KAAK,MAAM,MACpB,OAAc,MAAN,MAAa,KACrB,cAAe,KAEjB,YACE,MAAO,MAET,WACE,MAAO,KAET,eACE,aAAc,KAChB,gBACE,YAAa,KAEf,UACE,kBAAmB,QAAQ,GAAG,SAAS,OACvC,UAAW,QAAQ,GAAG,SAAS,OAEjC,WACE,kBAAmB,QAAQ,GAAG,SAAS,SACvC,UAAW,QAAQ,GAAG,SAAS,SAEjC,2BACE,GACE,kBAAmB,UACnB,UAAW,UACb,KACE,kBAAmB,eACnB,UAAW,gBACf,mBACE,GACE,kBAAmB,UACnB,UAAW,UACb,KACE,kBAAmB,eACnB,UAAW,gBACf,eACE,OAAQ,yDACR,kBAAmB,cACnB,cAAe,cACf,UAAW,cAEb,gBACE,OAAQ,yDACR,kBAAmB,eACnB,cAAe,eACf,UAAW,eAEb,gBACE,OAAQ,yDACR,kBAAmB,eACnB,cAAe,eACf,UAAW,eAEb,qBACE,OAAQ,yDACR,kBAAmB,YACnB,cAAe,YACf,UAAW,YAEb,mBACE,OAAQ,yDACR,kBAAmB,YACnB,cAAe,YACf,UAAW,YAKb,2BACA,yBAHA,sBACA,sBAFA,qBAKE,OAAQ,KAEV,WACE,SAAU,SACV,QAAS,aACT,MAAO,IACP,OAAQ,IACR,YAAa,IACb,eAAgB,OAElB,cAAe,cACb,SAAU,SACV,KAAM,EACN,MAAO,KACP,WAAY,OAEd,cACE,YAAa,QAEf,cACE,UAAW,IAEb,aACE,MAAO,KAET,wBACE,QAAS,QAEX,oBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,4BACE,QAAS,QAEX,mCACE,QAAS,QAEX,wBACE,QAAS,QAEX,2BACE,QAAS,QAEX,gBACE,QAAS,QAEX,gBACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oBACE,QAAS,QAEX,uBACE,QAAS,QAEX,+BACE,QAAS,QAEX,yBACE,QAAS,QAEX,8BACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,mBACE,QAAS,QAEX,8BACE,QAAS,QAEX,qCACE,QAAS,QAEX,0CACE,QAAS,QAEX,uCACE,QAAS,QAEX,wCACE,QAAS,QAEX,yCACE,QAAS,QAEX,uCACE,QAAS,QAEX,wCACE,QAAS,QAEX,gCACE,QAAS,QAEX,kCACE,QAAS,QAEX,oBACE,QAAS,QAEX,4BACE,QAAS,QAEX,kBACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,0BACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,yBACE,QAAS,QAEX,iBACE,QAAS,QAEX,oBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,4BACE,QAAS,QAEX,mCACE,QAAS,QAEX,0BACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,sBACE,QAAS,QAEX,yBACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,4BACE,QAAS,QAEX,8BACE,QAAS,QAEX,gCACE,QAAS,QAEX,iCACE,QAAS,QAEX,sBACE,QAAS,QAEX,4BACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,mBACE,QAAS,QAEX,0BACE,QAAS,QAEX,kCACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,4BACE,QAAS,QAEX,yBACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,sBACE,QAAS,QAEX,4BACE,QAAS,QAEX,gCACE,QAAS,QAEX,+BACE,QAAS,QAEX,gCACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,4BACE,QAAS,QAEX,uBACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,8BACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,uBACE,QAAS,QAEX,4BACE,QAAS,QAEX,+BACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,4BACE,QAAS,QAEX,4BACE,QAAS,QAEX,2BACE,QAAS,QAEX,8BACE,QAAS,QAEX,yBACE,QAAS,QAEX,kBACE,QAAS,QAEX,yBACE,QAAS,QAEX,uBACE,QAAS,QAEX,kBACE,QAAS,QAEX,uBACE,QAAS,QAEX,qBACE,QAAS,QAEX,4BACE,QAAS,QAEX,mBACE,QAAS,QAEX,iBACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,iCACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,mBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,mBACE,QAAS,QAEX,0BACE,QAAS,QAEX,4BACE,QAAS,QAEX,wBACE,QAAS,QAEX,mBACE,QAAS,QAEX,iBACE,QAAS,QAEX,2BACE,QAAS,QAEX,gCACE,QAAS,QAEX,8BACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,wBACE,QAAS,QAEX,gCACE,QAAS,QAEX,kBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oCACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,+BACE,QAAS,QAEX,kBACE,QAAS,QAEX,kBACE,QAAS,QAEX,sBACE,QAAS,QAEX,kBACE,QAAS,QAEX,2BACE,QAAS,QAEX,kBACE,QAAS,QAEX,yBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,sBACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,iBACE,QAAS,QAEX,wBACE,QAAS,QAEX,iCACE,QAAS,QAEX,uBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,2BACE,QAAS,QAEX,qBACE,QAAS,QAEX,gCACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,qBACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,0BACE,QAAS,QAEX,oCACE,QAAS,QAEX,sBACE,QAAS,QAEX,mBACE,QAAS,QAEX,8BACE,QAAS,QAEX,wBACE,QAAS,QAEX,iBACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,2BACE,QAAS,QAEX,0BACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,mBACE,QAAS,QAEX,mBACE,QAAS,QAEX,2BACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,4BACE,QAAS,QAEX,oBACE,QAAS,QAEX,4BACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,oBACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,oBACE,QAAS,QAEX,uBACE,QAAS,QAEX,4BACE,QAAS,QAEX,4BACE,QAAS,QAEX,2BACE,QAAS,QAEX,2BACE,QAAS,QAEX,+BACE,QAAS,QAEX,2BACE,QAAS,QAEX,8BACE,QAAS,QAEX,+BACE,QAAS,QAEX,4BACE,QAAS,QAEX,sBACE,QAAS,QAEX,gBACE,QAAS,QAEX,2BACE,QAAS,QAEX,+BACE,QAAS,QAEX,+BACE,QAAS,QAEX,8BACE,QAAS,QAEX,iBACE,QAAS,QAEX,mBACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,mBACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,gBACE,QAAS,QAEX,iBACE,QAAS,QAEX,0BACE,QAAS,QAEX,kBACE,QAAS,QAEX,kBACE,QAAS,QAEX,gCACE,QAAS,QAEX,sBACE,QAAS,QAEX,kBACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,kBACE,QAAS,QAEX,4BACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,2BACE,QAAS,QAEX,2BACE,QAAS,QAEX,4BACE,QAAS,QAEX,4BACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,iBACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,qBACE,QAAS,QAEX,4BACE,QAAS,QAEX,+BACE,QAAS,QAEX,2BACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,gCACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,+BACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,mBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,0BACE,QAAS,QAEX,2BACE,QAAS,QAEX,gCACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,8BACE,QAAS,QAEX,2BACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,kBACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,mBACE,QAAS,QAEX,wBACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,mBACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,2BACE,QAAS,QAEX,0BACE,QAAS,QAEX,gCACE,QAAS,QAEX,iCACE,QAAS,QAEX,8BACE,QAAS,QAEX,+BACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,8BACE,QAAS,QAEX,+BACE,QAAS,QAEX,8BACE,QAAS,QAEX,mCACE,QAAS,QAEX,mCACE,QAAS,QAEX,0BACE,QAAS,QAEX,gCACE,QAAS,QAEX,iCACE,QAAS,QAEX,iCACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,iCACE,QAAS,QAEX,wCACE,QAAS,QAEX,wCACE,QAAS,QAEX,8BACE,QAAS,QAEX,kBACE,QAAS,QAEX,oBACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,4BACE,QAAS,QAEX,sBACE,QAAS,QAEX,wBACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,kBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,gBACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,0BACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,uBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,sBACE,QAAS,QAEX,uBACE,QAAS,QAEX,eACE,QAAS,QAEX,oBACE,QAAS,QAEX,mBACE,QAAS,QAEX,uBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,wBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,iBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,sBACE,QAAS,QAEX,0BACE,QAAS,QAEX,oBACE,QAAS,QAEX,iBACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,4BACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,kBACE,QAAS,QAEX,kBACE,QAAS,QAEX,+BACE,QAAS,QAEX,4BACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,kBACE,QAAS,QAEX,oCACE,QAAS,QAEX,iBACE,QAAS,QAEX,yBACE,QAAS,QAEX,kBACE,QAAS,QAEX,yBACE,QAAS,QAEX,2BACE,QAAS,QAEX,8BACE,QAAS,QAEX,4BACE,QAAS,QAEX,8BACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,gBACE,QAAS,QAEX,qBACE,QAAS,QAEX,gCACE,QAAS,QAEX,gCACE,QAAS,QAEX,iCACE,QAAS,QAEX,8BACE,QAAS,QAEX,+BACE,QAAS,QAEX,8BACE,QAAS,QAEX,0BACE,QAAS,QAEX,4BACE,QAAS,QAEX,yBACE,QAAS,QAEX,2BACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,mBACE,QAAS,QAEX,8BACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,sBACE,QAAS,QAEX,mBACE,QAAS,QAEX,mBACE,QAAS,QAEX,yBACE,QAAS,QAEX,qBACE,QAAS,QAEX,wBACE,QAAS,QAEX,iBACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,iBACE,QAAS,QAEX,0BACE,QAAS,QAEX,iBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oBACE,QAAS,QAEX,2BACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,oCACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,gCACE,QAAS,QAEX,2BACE,QAAS,QAEX,wBACE,QAAS,QAEX,kCACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,2BACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,8BACE,QAAS,QAEX,4BACE,QAAS,QAEX,sBACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,+BACE,QAAS,QAEX,iBACE,QAAS,QAEX,sBACE,QAAS,QAEX,yBACE,QAAS,QAEX,kBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,iBACE,QAAS,QAEX,kBACE,QAAS,QAEX,yBACE,QAAS,QAEX,oBACE,QAAS,QAEX,iBACE,QAAS,QAEX,yBACE,QAAS,QAEX,gBACE,QAAS,QAEX,uBACE,QAAS,QAEX,+BACE,QAAS,QAEX,mBACE,QAAS,QAEX,iBACE,QAAS,QAEX,uBACE,QAAS,QAEX,oBACE,QAAS,QAEX,gBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,gBACE,QAAS,QAEX,yBACE,QAAS,QAEX,sBACE,QAAS,QAEX,4BACE,QAAS,QAEX,sBACE,QAAS,QAEX,8BACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,iBACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,uBACE,QAAS,QAEX,kBACE,QAAS,QAEX,0BACE,QAAS,QAEX,kBACE,QAAS,QAEX,2BACE,QAAS,QAEX,yBACE,QAAS,QAEX,4BACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,mBACE,QAAS,QAEX,0BACE,QAAS,QAEX,4BACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,oBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,2BACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,sBACE,QAAS,QAEX,gBACE,QAAS,QAEX,0BACE,QAAS,QAEX,mBACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,0BACE,QAAS,QAEX,iCACE,QAAS,QAEX,+BACE,QAAS,QAEX,8BACE,QAAS,QAEX,iCACE,QAAS,QAEX,wBACE,QAAS,QAEX,2BACE,QAAS,QAEX,oBACE,QAAS,QAEX,4BACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,kBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,qBACE,QAAS,QAEX,8BACE,QAAS,QAEX,gCACE,QAAS,QAEX,8BACE,QAAS,QAEX,gCACE,QAAS,QAEX,uBACE,QAAS,QAEX,kBACE,QAAS,QAEX,gCACE,QAAS,QAEX,iCACE,QAAS,QAEX,oBACE,QAAS,QAEX,mBACE,QAAS,QAEX,2BACE,QAAS,QAEX,4BACE,QAAS,QAEX,kCACE,QAAS,QAEX,8BACE,QAAS,QAEX,oCACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,2BACE,QAAS,QAEX,mBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,8BACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,kBACE,QAAS,QAEX,0BACE,QAAS,QAEX,oCACE,QAAS,QAEX,4BACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,sBACE,QAAS,QAEX,4BACE,QAAS,QAEX,2BACE,QAAS,QAEX,0BACE,QAAS,QAEX,2BACE,QAAS,QAEX,4BACE,QAAS,QAEX,kBACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,qCACE,QAAS,QAEX,oCACE,QAAS,QAEX,oCACE,QAAS,QAEX,2BACE,QAAS,QAEX,+BACE,QAAS,QAEX,mCACE,QAAS,QAEX,sBACE,QAAS,QAEX,+BACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,uBACE,QAAS,QAEX,+BACE,QAAS,QAEX,gCACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,+BACE,QAAS,QAEX,0BACE,QAAS,QAEX,qBACE,QAAS,QAEX,iBACE,QAAS,QAEX,oBACE,QAAS,QAEX,iBACE,QAAS,QAEX,8BACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,wBACE,QAAS,QAEX,+BACE,QAAS,QAEX,2BACE,QAAS,QAEX,2BACE,QAAS,QAEX,kBACE,QAAS,QAEX,0BACE,QAAS,QAEX,mBACE,QAAS,QAEX,oBACE,QAAS,QAEX,0BACE,QAAS,QAEX,4BACE,QAAS,QAEX,kBACE,QAAS,QAEX,wBACE,QAAS,QAEX,4BACE,QAAS,QAEX,kBACE,QAAS,QAEX,iCACE,QAAS,QAEX,mCACE,QAAS,QAEX,wBACE,QAAS,QAEX,oBACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,mBACE,QAAS,QAEX,iBACE,QAAS,QAEX,oBACE,QAAS,QAEX,mBACE,QAAS,QAEX,0BACE,QAAS,QAEX,kCACE,QAAS,QAEX,8BACE,QAAS,QAEX,2BACE,QAAS,QAEX,iCACE,QAAS,QAEX,oBACE,QAAS,QAEX,mBACE,QAAS,QAEX,uBACE,QAAS,QAEX,mBACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,sBACE,QAAS,QAEX,mBACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,4BACE,QAAS,QAEX,oBACE,QAAS,QAEX,yBACE,QAAS,QAEX,wBACE,QAAS,QAEX,iBACE,QAAS,QAEX,yBACE,QAAS,QAEX,kCACE,QAAS,QAEX,wBACE,QAAS,QAEX,yBACE,QAAS,QAEX,2BACE,QAAS,QAEX,mBACE,QAAS,QAEX,mBACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,iBACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,mBACE,QAAS,QAEX,kCACE,QAAS,QAEX,iCACE,QAAS,QAEX,iCACE,QAAS,QAEX,4BACE,QAAS,QAEX,yBACE,QAAS,QAEX,oBACE,QAAS,QAEX,uBACE,QAAS,QAEX,mBACE,QAAS,QAEX,qBACE,QAAS,QAEX,uBACE,QAAS,QAEX,iBACE,QAAS,QAEX,mCACE,QAAS,QAEX,8BACE,QAAS,QAEX,gCACE,QAAS,QAEX,wCACE,QAAS,QAEX,qCACE,QAAS,QAEX,qBACE,QAAS,QAEX,kCACE,QAAS,QAEX,oCACE,QAAS,QAEX,+BACE,QAAS,QAEX,gCACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,mCACE,QAAS,QAEX,qCACE,QAAS,QAEX,qCACE,QAAS,QAEX,gCACE,QAAS,QAEX,kCACE,QAAS,QAEX,8BACE,QAAS,QAEX,2BACE,QAAS,QAEX,2BACE,QAAS,QAEX,4BACE,QAAS,QAEX,qCACE,QAAS,QAEX,2BACE,QAAS,QAEX,kBACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,4BACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,oBACE,QAAS,QAEX,kCACE,QAAS,QAEX,wDACE,QAAS,QAEX,mCACE,QAAS,QAEX,iCACE,QAAS,QAEX,gCACE,QAAS,QAEX,8BACE,QAAS,QAEX,mCACE,QAAS,QAEX,4BACE,QAAS,QAEX,qBACE,QAAS,QAEX,2BACE,QAAS,QAEX,sBACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,8BACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,0BACE,QAAS,QAEX,gBACE,QAAS,QAEX,uBACE,QAAS,QAEX,mBACE,QAAS,QAEX,iBACE,QAAS,QAEX,0BACE,QAAS,QAEX,gBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oBACE,QAAS,QAEX,0BACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,0BACE,QAAS,QAEX,uBACE,QAAS,QAEX,iBACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,kBACE,QAAS,QAEX,mCACE,QAAS,QAEX,kCACE,QAAS,QAEX,mCACE,QAAS,QAEX,kCACE,QAAS,QAEX,iBACE,QAAS,QAEX,8BACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,iCACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,4BACE,QAAS,QAEX,kBACE,QAAS,QAEX,oCACE,QAAS,QAEX,qCACE,QAAS,QAEX,oBACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,mBACE,QAAS,QAEX,+BACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,iCACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,iBACE,QAAS,QAEX,0BACE,QAAS,QAEX,yBACE,QAAS,QAEX,0BACE,QAAS,QAEX,8BACE,QAAS,QAEX,gBACE,QAAS,QAEX,2BACE,QAAS,QAEX,mBACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,yBACE,QAAS,QAEX,oBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,oBACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,uBACE,QAAS,QAEX,qBACE,QAAS,QAEX,2BACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,kBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,sBACE,QAAS,QAEX,kBACE,QAAS,QAEX,gBACE,QAAS,QAEX,kBACE,QAAS,QAEX,iBACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,iBACE,QAAS,QAEX,0BACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,iBACE,QAAS,QAEX,sCACE,QAAS,QAEX,sBACE,QAAS,QAEX,sBACE,QAAS,QAEX,0BACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,iBACE,QAAS,QAEX,sBACE,QAAS,QAEX,0BACE,QAAS,QAEX,eACE,QAAS,QAEX,sBACE,QAAS,QAEX,iBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,mBACE,QAAS,QAEX,gBACE,QAAS,QAEX,0BACE,QAAS,QAEX,kCACE,QAAS,QAEX,kCACE,QAAS,QAEX,+BACE,QAAS,QAEX,sBACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,0BACE,QAAS,QAEX,qBACE,QAAS,QAEX,yBACE,QAAS,QAEX,4BACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,0BACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,yBACE,QAAS,QAEX,qBACE,QAAS,QAEX,0BACE,QAAS,QAEX,sBACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,wBACE,QAAS,QAEX,sBACE,QAAS,QAEX,qBACE,QAAS,QAEX,uBACE,QAAS,QAEX,2BACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,wBACE,QAAS,QAEX,wBACE,QAAS,QAEX,uBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oBACE,QAAS,QAEX,kBACE,QAAS,QAEX,wBACE,QAAS,QAEX,oBACE,QAAS,QAEX,sBACE,QAAS,QAEX,4BACE,QAAS,QAEX,0BACE,QAAS,QAEX,qBACE,QAAS,QAEX,eACE,QAAS,QAEX,gBACE,QAAS,QAEX,sBACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,oBACE,QAAS,QAEX,iBACE,QAAS,QAEX,sBACE,QAAS,QAEX,2BACE,QAAS,QAEX,iBACE,QAAS,QAEX,sBACE,QAAS,QAEX,iCACE,QAAS,QAEX,oBACE,QAAS,QAEX,qBACE,QAAS,QAEX,yBACE,QAAS"}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/demo/index.html b/vendor/mervick/material-design-icons/demo/index.html new file mode 100644 index 000000000..e46163157 --- /dev/null +++ b/vendor/mervick/material-design-icons/demo/index.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="UTF-8"> + <title>Bootstrap Material Design Icons</title> + <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700" rel="stylesheet"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css"/> + <link rel="stylesheet" type="text/css" href="style/main.css?v18"/> + <link rel="stylesheet" type="text/css" href="../css/material-icons.min.css?v1.1.2"/> +</head> +<body> + <div class="wrap"> + + <header> + <div id="head-panel"> + <div class="container"> + <h1>Bootstrap Material Design Icons</h1> + <div class="buttons"> + <a class="github-button" href="https://github.com/mervick/material-design-icons" data-style="mega" data-count-href="/mervick/material-design-icons/stargazers" data-count-api="/repos/mervick/material-design-icons#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star mervick/material-design-icons on GitHub">Star</a> + <a class="github-button" href="https://github.com/mervick/material-design-icons/archive/master.zip" data-icon="octicon-cloud-download" data-style="mega" aria-label="Download mervick/material-design-icons on GitHub">Download</a> + </div> + </div> + </div> + <div id="search-panel"> + <div class="container"> + <div class="search-icon"> + <i class="mdi mdi-search"></i> + </div> + <input type="text" id="search" placeholder="Search" aria-label="Search"/> + <div class="search-icon clear-icon" style="display: none;"> + <i class="mdi mdi-close"></i> + </div> + </div> + </div> + </header> + + <div class="container"> + <div class="content"> + + <p>Material design icons are the <a href="http://www.google.com/design/spec/style/icons.html#icons-system-icons">official icon</a> + set from Google that are designed under the <a href="http://www.google.com/design/spec">material design guidelines</a>.</p> + <p>In the official package the icons uses a typographic feature called <a href="http://alistapart.com/article/the-era-of-symbol-fonts">ligatures</a>, + which allows rendering of an icon glyph simply by using its textual name.</p> + <p><a href="https://github.com/mervick/material-design-icons">Bootstrap Material Design Icons</a> implements the ability to use the icons in the <code>bootstrap-style</code>, like in + <code>glyphicon</code>, <code>font-awesome</code> or <code>ionicons</code>.</p> + + <div id="grid-container"></div> + + </div> + </div> + + <div id="snackbar"></div> + + </div> + + <footer> + <div id="footer"> + <div class="container"> + <p><a href="https://github.com/google/material-design-icons">Google Material Design Icons</a> fonts files are + licensed under the <a href="https://github.com/google/material-design-icons/blob/master/LICENSE">CC-BY-4.0</a>, + maintained by <a href="https://github.com/google">Google</a>.</p> + <p><a href="https://github.com/mervick/material-design-icons">Bootstrap Material Design Icons</a> css and sass files are + licensed under the <a href="http://opensource.org/licenses/mit-license.html">MIT License</a>, + maintained by <a href="https://github.com/mervick">mervick</a>.</p> + </div> + </div> + </footer> + + <script id="empty-grid" type="text/template"> + <div class="no-results">No matches found</div> + </script> + + <script id="grid-item" type="text/template"> + <div class="item"> + <% if (is_new) { %> + <div class="new-badge">New</div> + <% } %> + <i class="mdi mdi-<%= className %>"></i> + <div class="caption"><%= caption %></div> + </div> + </script> + + <script id="snackbar-template" type="text/template"> + <div class="container"> + <div class="snackbar-header"> + <i class="mdi mdi-<%= className %>"></i> + <span class="caption"><%= caption %></span> + <div class="right-side"> + <i class="mdi mdi-code"></i> + <span class="caption">ICON FONT</span> + </div> + </div> + <div class="snackbar-content flex"> + <div class="col"> + <h2>STEP 1: Setup Icon Font</h2> + <p>Follow the <a href="https://github.com/mervick/material-design-icons">instructions</a> to embed the icon + font in your site and learn how to style your icons using CSS.</p> + </div> + <div class="col"> + <h2>STEP 2: Use Icon in Your Site</h2> + <p class="code comment"><!-- Bootstrap style, for modern browsers, IE > 8. --></p> + <textarea class="code" readonly><i class="mdi mdi-<%= className %>"></i></textarea> + <p class="code comment"><!-- Ligature style, for modern browsers, IE > 9. --></p> + <textarea class="code" readonly><i class="material-icons"><%= content %></i></textarea> + <p class="code comment"><!-- For IE9 or below. --></p> + <textarea class="code" readonly><i class="material-icons">&#x<%= code %>;</i></textarea> + <p></p> + </div> + </div> + </div> + </script> + + <script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js"></script> + <script src="js/data.js?v1.1.2"></script> + <script src="js/main.js?v1.1.2"></script> + +</body> +</html>
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/demo/js/data.js b/vendor/mervick/material-design-icons/demo/js/data.js new file mode 100644 index 000000000..6457256c3 --- /dev/null +++ b/vendor/mervick/material-design-icons/demo/js/data.js @@ -0,0 +1 @@ +window.data = {"action":{"3d_rotation":["e84d",false],"accessibility":["e84e",false],"accessible":["e914",false],"account_balance":["e84f",false],"account_balance_wallet":["e850",false],"account_box":["e851",false],"account_circle":["e853",false],"add_shopping_cart":["e854",false],"alarm":["e855",false],"alarm_add":["e856",false],"alarm_off":["e857",false],"alarm_on":["e858",false],"all_out":["e90b",false],"android":["e859",false],"announcement":["e85a",false],"aspect_ratio":["e85b",false],"assessment":["e85c",false],"assignment":["e85d",false],"assignment_ind":["e85e",false],"assignment_late":["e85f",false],"assignment_return":["e860",false],"assignment_returned":["e861",false],"assignment_turned_in":["e862",false],"autorenew":["e863",false],"backup":["e864",false],"book":["e865",false],"bookmark":["e866",false],"bookmark_border":["e867",false],"bug_report":["e868",false],"build":["e869",false],"cached":["e86a",false],"camera_enhance":["e8fc",false],"card_giftcard":["e8f6",false],"card_membership":["e8f7",false],"card_travel":["e8f8",false],"change_history":["e86b",false],"check_circle":["e86c",false],"chrome_reader_mode":["e86d",false],"class":["e86e",false],"code":["e86f",false],"compare_arrows":["e915",false],"copyright":["e90c",false],"credit_card":["e870",false],"dashboard":["e871",false],"date_range":["e916",false],"delete":["e872",false],"delete_forever":["e92b",true],"description":["e873",false],"dns":["e875",false],"done":["e876",false],"done_all":["e877",false],"donut_large":["e917",false],"donut_small":["e918",false],"eject":["e8fb",false],"euro_symbol":["e926",true],"event":["e878",false],"event_seat":["e903",false],"exit_to_app":["e879",false],"explore":["e87a",false],"extension":["e87b",false],"face":["e87c",false],"favorite":["e87d",false],"favorite_border":["e87e",false],"feedback":["e87f",false],"find_in_page":["e880",false],"find_replace":["e881",false],"fingerprint":["e90d",false],"flight_land":["e904",false],"flight_takeoff":["e905",false],"flip_to_back":["e882",false],"flip_to_front":["e883",false],"g_translate":["e927",true],"gavel":["e90e",false],"get_app":["e884",false],"gif":["e908",false],"grade":["e885",false],"group_work":["e886",false],"help":["e887",false],"help_outline":["e8fd",false],"highlight_off":["e888",false],"history":["e889",false],"home":["e88a",false],"hourglass_empty":["e88b",false],"hourglass_full":["e88c",false],"http":["e902",false],"https":["e88d",false],"important_devices":["e912",false],"info":["e88e",false],"info_outline":["e88f",false],"input":["e890",false],"invert_colors":["e891",false],"label":["e892",false],"label_outline":["e893",false],"language":["e894",false],"launch":["e895",false],"lightbulb_outline":["e90f",false],"line_style":["e919",false],"line_weight":["e91a",false],"list":["e896",false],"lock":["e897",false],"lock_open":["e898",false],"lock_outline":["e899",false],"loyalty":["e89a",false],"markunread_mailbox":["e89b",false],"motorcycle":["e91b",false],"note_add":["e89c",false],"offline_pin":["e90a",false],"opacity":["e91c",false],"open_in_browser":["e89d",false],"open_in_new":["e89e",false],"open_with":["e89f",false],"pageview":["e8a0",false],"pan_tool":["e925",false],"payment":["e8a1",false],"perm_camera_mic":["e8a2",false],"perm_contact_calendar":["e8a3",false],"perm_data_setting":["e8a4",false],"perm_device_information":["e8a5",false],"perm_identity":["e8a6",false],"perm_media":["e8a7",false],"perm_phone_msg":["e8a8",false],"perm_scan_wifi":["e8a9",false],"pets":["e91d",false],"picture_in_picture":["e8aa",false],"picture_in_picture_alt":["e911",false],"play_for_work":["e906",false],"polymer":["e8ab",false],"power_settings_new":["e8ac",false],"pregnant_woman":["e91e",false],"print":["e8ad",false],"query_builder":["e8ae",false],"question_answer":["e8af",false],"receipt":["e8b0",false],"record_voice_over":["e91f",false],"redeem":["e8b1",false],"remove_shopping_cart":["e928",true],"reorder":["e8fe",false],"report_problem":["e8b2",false],"restore":["e8b3",false],"restore_page":["e929",true],"room":["e8b4",false],"rounded_corner":["e920",false],"rowing":["e921",false],"schedule":["e8b5",false],"search":["e8b6",false],"settings":["e8b8",false],"settings_applications":["e8b9",false],"settings_backup_restore":["e8ba",false],"settings_bluetooth":["e8bb",false],"settings_brightness":["e8bd",false],"settings_cell":["e8bc",false],"settings_ethernet":["e8be",false],"settings_input_antenna":["e8bf",false],"settings_input_component":["e8c0",false],"settings_input_composite":["e8c1",false],"settings_input_hdmi":["e8c2",false],"settings_input_svideo":["e8c3",false],"settings_overscan":["e8c4",false],"settings_phone":["e8c5",false],"settings_power":["e8c6",false],"settings_remote":["e8c7",false],"settings_voice":["e8c8",false],"shop":["e8c9",false],"shop_two":["e8ca",false],"shopping_basket":["e8cb",false],"shopping_cart":["e8cc",false],"speaker_notes":["e8cd",false],"speaker_notes_off":["e92a",true],"spellcheck":["e8ce",false],"stars":["e8d0",false],"store":["e8d1",false],"subject":["e8d2",false],"supervisor_account":["e8d3",false],"swap_horiz":["e8d4",false],"swap_vert":["e8d5",false],"swap_vertical_circle":["e8d6",false],"system_update_alt":["e8d7",false],"tab":["e8d8",false],"tab_unselected":["e8d9",false],"theaters":["e8da",false],"thumb_down":["e8db",false],"thumb_up":["e8dc",false],"thumbs_up_down":["e8dd",false],"timeline":["e922",false],"toc":["e8de",false],"today":["e8df",false],"toll":["e8e0",false],"touch_app":["e913",false],"track_changes":["e8e1",false],"translate":["e8e2",false],"trending_down":["e8e3",false],"trending_flat":["e8e4",false],"trending_up":["e8e5",false],"turned_in":["e8e6",false],"turned_in_not":["e8e7",false],"update":["e923",false],"verified_user":["e8e8",false],"view_agenda":["e8e9",false],"view_array":["e8ea",false],"view_carousel":["e8eb",false],"view_column":["e8ec",false],"view_day":["e8ed",false],"view_headline":["e8ee",false],"view_list":["e8ef",false],"view_module":["e8f0",false],"view_quilt":["e8f1",false],"view_stream":["e8f2",false],"view_week":["e8f3",false],"visibility":["e8f4",false],"visibility_off":["e8f5",false],"watch_later":["e924",false],"work":["e8f9",false],"youtube_searched_for":["e8fa",false],"zoom_in":["e8ff",false],"zoom_out":["e900",false]},"alert":{"add_alert":["e003",false],"error":["e000",false],"error_outline":["e001",false],"warning":["e002",false]},"av":{"add_to_queue":["e05c",false],"airplay":["e055",false],"album":["e019",false],"art_track":["e060",false],"av_timer":["e01b",false],"branding_watermark":["e06b",true],"call_to_action":["e06c",true],"closed_caption":["e01c",false],"equalizer":["e01d",false],"explicit":["e01e",false],"fast_forward":["e01f",false],"fast_rewind":["e020",false],"featured_play_list":["e06d",true],"featured_video":["e06e",true],"fiber_dvr":["e05d",false],"fiber_manual_record":["e061",false],"fiber_new":["e05e",false],"fiber_pin":["e06a",false],"fiber_smart_record":["e062",false],"forward_10":["e056",false],"forward_30":["e057",false],"forward_5":["e058",false],"games":["e021",false],"hd":["e052",false],"hearing":["e023",false],"high_quality":["e024",false],"library_add":["e02e",false],"library_books":["e02f",false],"library_music":["e030",false],"loop":["e028",false],"mic":["e029",false],"mic_none":["e02a",false],"mic_off":["e02b",false],"movie":["e02c",false],"music_video":["e063",false],"new_releases":["e031",false],"not_interested":["e033",false],"note":["e06f",true],"pause":["e034",false],"pause_circle_filled":["e035",false],"pause_circle_outline":["e036",false],"play_arrow":["e037",false],"play_circle_filled":["e038",false],"play_circle_outline":["e039",false],"playlist_add":["e03b",false],"playlist_add_check":["e065",false],"playlist_play":["e05f",false],"queue":["e03c",false],"queue_music":["e03d",false],"queue_play_next":["e066",false],"radio":["e03e",false],"recent_actors":["e03f",false],"remove_from_queue":["e067",false],"repeat":["e040",false],"repeat_one":["e041",false],"replay_10":["e059",false],"replay":["e042",false],"replay_30":["e05a",false],"replay_5":["e05b",false],"shuffle":["e043",false],"skip_next":["e044",false],"skip_previous":["e045",false],"slow_motion_video":["e068",false],"snooze":["e046",false],"sort_by_alpha":["e053",false],"stop":["e047",false],"subscriptions":["e064",false],"subtitles":["e048",false],"surround_sound":["e049",false],"video_call":["e070",true],"video_label":["e071",true],"video_library":["e04a",false],"videocam":["e04b",false],"videocam_off":["e04c",false],"volume_down":["e04d",false],"volume_mute":["e04e",false],"volume_off":["e04f",false],"volume_up":["e050",false],"web":["e051",false],"web_asset":["e069",false]},"communication":{"business":["e0af",false],"call":["e0b0",false],"call_end":["e0b1",false],"call_made":["e0b2",false],"call_merge":["e0b3",false],"call_missed":["e0b4",false],"call_missed_outgoing":["e0e4",false],"call_received":["e0b5",false],"call_split":["e0b6",false],"chat":["e0b7",false],"chat_bubble":["e0ca",false],"chat_bubble_outline":["e0cb",false],"clear_all":["e0b8",false],"comment":["e0b9",false],"contact_mail":["e0d0",false],"contact_phone":["e0cf",false],"contacts":["e0ba",false],"dialer_sip":["e0bb",false],"dialpad":["e0bc",false],"email":["e0be",false],"forum":["e0bf",false],"import_contacts":["e0e0",false],"import_export":["e0c3",false],"invert_colors_off":["e0c4",false],"live_help":["e0c6",false],"location_off":["e0c7",false],"location_on":["e0c8",false],"mail_outline":["e0e1",false],"message":["e0c9",false],"no_sim":["e0cc",false],"phone":["e0cd",false],"phonelink_erase":["e0db",false],"phonelink_lock":["e0dc",false],"phonelink_ring":["e0dd",false],"phonelink_setup":["e0de",false],"portable_wifi_off":["e0ce",false],"present_to_all":["e0df",false],"ring_volume":["e0d1",false],"rss_feed":["e0e5",true],"screen_share":["e0e2",false],"speaker_phone":["e0d2",false],"stay_current_landscape":["e0d3",false],"stay_current_portrait":["e0d4",false],"stay_primary_landscape":["e0d5",false],"stay_primary_portrait":["e0d6",false],"stop_screen_share":["e0e3",false],"swap_calls":["e0d7",false],"textsms":["e0d8",false],"voicemail":["e0d9",false],"vpn_key":["e0da",false]},"content":{"add":["e145",false],"add_box":["e146",false],"add_circle":["e147",false],"add_circle_outline":["e148",false],"archive":["e149",false],"backspace":["e14a",false],"block":["e14b",false],"clear":["e14c",false],"content_copy":["e14d",false],"content_cut":["e14e",false],"content_paste":["e14f",false],"create":["e150",false],"delete_sweep":["e16c",true],"drafts":["e151",false],"filter_list":["e152",false],"flag":["e153",false],"font_download":["e167",false],"forward":["e154",false],"gesture":["e155",false],"inbox":["e156",false],"link":["e157",false],"low_priority":["e16d",true],"mail":["e158",false],"markunread":["e159",false],"move_to_inbox":["e168",false],"next_week":["e16a",false],"redo":["e15a",false],"remove":["e15b",false],"remove_circle":["e15c",false],"remove_circle_outline":["e15d",false],"reply":["e15e",false],"reply_all":["e15f",false],"report":["e160",false],"save":["e161",false],"select_all":["e162",false],"send":["e163",false],"sort":["e164",false],"text_format":["e165",false],"unarchive":["e169",false],"undo":["e166",false],"weekend":["e16b",false]},"device":{"access_alarm":["e190",false],"access_alarms":["e191",false],"access_time":["e192",false],"add_alarm":["e193",false],"airplanemode_active":["e195",false],"airplanemode_inactive":["e194",false],"battery_alert":["e19c",false],"battery_charging_full":["e1a3",false],"battery_full":["e1a4",false],"battery_std":["e1a5",false],"battery_unknown":["e1a6",false],"bluetooth":["e1a7",false],"bluetooth_connected":["e1a8",false],"bluetooth_disabled":["e1a9",false],"bluetooth_searching":["e1aa",false],"brightness_auto":["e1ab",false],"brightness_high":["e1ac",false],"brightness_low":["e1ad",false],"brightness_medium":["e1ae",false],"data_usage":["e1af",false],"developer_mode":["e1b0",false],"devices":["e1b1",false],"dvr":["e1b2",false],"gps_fixed":["e1b3",false],"gps_not_fixed":["e1b4",false],"gps_off":["e1b5",false],"graphic_eq":["e1b8",false],"location_disabled":["e1b6",false],"location_searching":["e1b7",false],"network_cell":["e1b9",false],"network_wifi":["e1ba",false],"nfc":["e1bb",false],"screen_lock_landscape":["e1be",false],"screen_lock_portrait":["e1bf",false],"screen_lock_rotation":["e1c0",false],"screen_rotation":["e1c1",false],"sd_storage":["e1c2",false],"settings_system_daydream":["e1c3",false],"signal_cellular_4_bar":["e1c8",false],"signal_cellular_connected_no_internet_4_bar":["e1cd",false],"signal_cellular_no_sim":["e1ce",false],"signal_cellular_null":["e1cf",false],"signal_cellular_off":["e1d0",false],"signal_wifi_4_bar":["e1d8",false],"signal_wifi_4_bar_lock":["e1d9",false],"signal_wifi_off":["e1da",false],"storage":["e1db",false],"usb":["e1e0",false],"wallpaper":["e1bc",false],"widgets":["e1bd",false],"wifi_lock":["e1e1",false],"wifi_tethering":["e1e2",false]},"editor":{"attach_file":["e226",false],"attach_money":["e227",false],"border_all":["e228",false],"border_bottom":["e229",false],"border_clear":["e22a",false],"border_color":["e22b",false],"border_horizontal":["e22c",false],"border_inner":["e22d",false],"border_left":["e22e",false],"border_outer":["e22f",false],"border_right":["e230",false],"border_style":["e231",false],"border_top":["e232",false],"border_vertical":["e233",false],"bubble_chart":["e6dd",true],"drag_handle":["e25d",false],"format_align_center":["e234",false],"format_align_justify":["e235",false],"format_align_left":["e236",false],"format_align_right":["e237",false],"format_bold":["e238",false],"format_clear":["e239",false],"format_color_fill":["e23a",false],"format_color_reset":["e23b",false],"format_color_text":["e23c",false],"format_indent_decrease":["e23d",false],"format_indent_increase":["e23e",false],"format_italic":["e23f",false],"format_line_spacing":["e240",false],"format_list_bulleted":["e241",false],"format_list_numbered":["e242",false],"format_paint":["e243",false],"format_quote":["e244",false],"format_shapes":["e25e",false],"format_size":["e245",false],"format_strikethrough":["e246",false],"format_textdirection_l_to_r":["e247",false],"format_textdirection_r_to_l":["e248",false],"format_underlined":["e249",false],"functions":["e24a",false],"highlight":["e25f",false],"insert_chart":["e24b",false],"insert_comment":["e24c",false],"insert_drive_file":["e24d",false],"insert_emoticon":["e24e",false],"insert_invitation":["e24f",false],"insert_link":["e250",false],"insert_photo":["e251",false],"linear_scale":["e260",false],"merge_type":["e252",false],"mode_comment":["e253",false],"mode_edit":["e254",false],"monetization_on":["e263",true],"money_off":["e25c",false],"multiline_chart":["e6df",true],"pie_chart":["e6c4",true],"pie_chart_outlined":["e6c5",true],"publish":["e255",false],"short_text":["e261",false],"show_chart":["e6e1",true],"space_bar":["e256",false],"strikethrough_s":["e257",false],"text_fields":["e262",false],"title":["e264",true],"vertical_align_bottom":["e258",false],"vertical_align_center":["e259",false],"vertical_align_top":["e25a",false],"wrap_text":["e25b",false]},"file":{"attachment":["e2bc",false],"cloud":["e2bd",false],"cloud_circle":["e2be",false],"cloud_done":["e2bf",false],"cloud_download":["e2c0",false],"cloud_off":["e2c1",false],"cloud_queue":["e2c2",false],"cloud_upload":["e2c3",false],"create_new_folder":["e2cc",false],"file_download":["e2c4",false],"file_upload":["e2c6",false],"folder":["e2c7",false],"folder_open":["e2c8",false],"folder_shared":["e2c9",false]},"hardware":{"cast":["e307",false],"cast_connected":["e308",false],"computer":["e30a",false],"desktop_mac":["e30b",false],"desktop_windows":["e30c",false],"developer_board":["e30d",false],"device_hub":["e335",false],"devices_other":["e337",false],"dock":["e30e",false],"gamepad":["e30f",false],"headset":["e310",false],"headset_mic":["e311",false],"keyboard":["e312",false],"keyboard_arrow_down":["e313",false],"keyboard_arrow_left":["e314",false],"keyboard_arrow_right":["e315",false],"keyboard_arrow_up":["e316",false],"keyboard_backspace":["e317",false],"keyboard_capslock":["e318",false],"keyboard_hide":["e31a",false],"keyboard_return":["e31b",false],"keyboard_tab":["e31c",false],"keyboard_voice":["e31d",false],"laptop":["e31e",false],"laptop_chromebook":["e31f",false],"laptop_mac":["e320",false],"laptop_windows":["e321",false],"memory":["e322",false],"mouse":["e323",false],"phone_android":["e324",false],"phone_iphone":["e325",false],"phonelink":["e326",false],"phonelink_off":["e327",false],"power_input":["e336",false],"router":["e328",false],"scanner":["e329",false],"security":["e32a",false],"sim_card":["e32b",false],"smartphone":["e32c",false],"speaker":["e32d",false],"speaker_group":["e32e",false],"tablet":["e32f",false],"tablet_android":["e330",false],"tablet_mac":["e331",false],"toys":["e332",false],"tv":["e333",false],"videogame_asset":["e338",false],"watch":["e334",false]},"image":{"add_a_photo":["e439",false],"add_to_photos":["e39d",false],"adjust":["e39e",false],"assistant":["e39f",false],"assistant_photo":["e3a0",false],"audiotrack":["e3a1",false],"blur_circular":["e3a2",false],"blur_linear":["e3a3",false],"blur_off":["e3a4",false],"blur_on":["e3a5",false],"brightness_1":["e3a6",false],"brightness_2":["e3a7",false],"brightness_3":["e3a8",false],"brightness_4":["e3a9",false],"brightness_5":["e3aa",false],"brightness_6":["e3ab",false],"brightness_7":["e3ac",false],"broken_image":["e3ad",false],"brush":["e3ae",false],"burst_mode":["e43c",true],"camera":["e3af",false],"camera_alt":["e3b0",false],"camera_front":["e3b1",false],"camera_rear":["e3b2",false],"camera_roll":["e3b3",false],"center_focus_strong":["e3b4",false],"center_focus_weak":["e3b5",false],"collections":["e3b6",false],"collections_bookmark":["e431",false],"color_lens":["e3b7",false],"colorize":["e3b8",false],"compare":["e3b9",false],"control_point":["e3ba",false],"control_point_duplicate":["e3bb",false],"crop_16_9":["e3bc",false],"crop":["e3be",false],"crop_3_2":["e3bd",false],"crop_5_4":["e3bf",false],"crop_7_5":["e3c0",false],"crop_din":["e3c1",false],"crop_free":["e3c2",false],"crop_landscape":["e3c3",false],"crop_original":["e3c4",false],"crop_portrait":["e3c5",false],"crop_rotate":["e437",false],"crop_square":["e3c6",false],"dehaze":["e3c7",false],"details":["e3c8",false],"edit":["e3c9",false],"exposure":["e3ca",false],"exposure_neg_1":["e3cb",false],"exposure_neg_2":["e3cc",false],"exposure_plus_1":["e3cd",false],"exposure_plus_2":["e3ce",false],"exposure_zero":["e3cf",false],"filter_1":["e3d0",false],"filter":["e3d3",false],"filter_2":["e3d1",false],"filter_3":["e3d2",false],"filter_4":["e3d4",false],"filter_5":["e3d5",false],"filter_6":["e3d6",false],"filter_7":["e3d7",false],"filter_8":["e3d8",false],"filter_9":["e3d9",false],"filter_9_plus":["e3da",false],"filter_b_and_w":["e3db",false],"filter_center_focus":["e3dc",false],"filter_drama":["e3dd",false],"filter_frames":["e3de",false],"filter_hdr":["e3df",false],"filter_none":["e3e0",false],"filter_tilt_shift":["e3e2",false],"filter_vintage":["e3e3",false],"flare":["e3e4",false],"flash_auto":["e3e5",false],"flash_off":["e3e6",false],"flash_on":["e3e7",false],"flip":["e3e8",false],"gradient":["e3e9",false],"grain":["e3ea",false],"grid_off":["e3eb",false],"grid_on":["e3ec",false],"hdr_off":["e3ed",false],"hdr_on":["e3ee",false],"hdr_strong":["e3f1",false],"hdr_weak":["e3f2",false],"healing":["e3f3",false],"image":["e3f4",false],"image_aspect_ratio":["e3f5",false],"iso":["e3f6",false],"landscape":["e3f7",false],"leak_add":["e3f8",false],"leak_remove":["e3f9",false],"lens":["e3fa",false],"linked_camera":["e438",false],"looks":["e3fc",false],"looks_3":["e3fb",false],"looks_4":["e3fd",false],"looks_5":["e3fe",false],"looks_6":["e3ff",false],"looks_one":["e400",false],"looks_two":["e401",false],"loupe":["e402",false],"monochrome_photos":["e403",false],"movie_creation":["e404",false],"movie_filter":["e43a",false],"music_note":["e405",false],"nature":["e406",false],"nature_people":["e407",false],"navigate_before":["e408",false],"navigate_next":["e409",false],"palette":["e40a",false],"panorama":["e40b",false],"panorama_fish_eye":["e40c",false],"panorama_horizontal":["e40d",false],"panorama_vertical":["e40e",false],"panorama_wide_angle":["e40f",false],"photo":["e410",false],"photo_album":["e411",false],"photo_camera":["e412",false],"photo_filter":["e43b",false],"photo_library":["e413",false],"photo_size_select_actual":["e432",false],"photo_size_select_large":["e433",false],"photo_size_select_small":["e434",false],"picture_as_pdf":["e415",false],"portrait":["e416",false],"remove_red_eye":["e417",false],"rotate_90_degrees_ccw":["e418",false],"rotate_left":["e419",false],"rotate_right":["e41a",false],"slideshow":["e41b",false],"straighten":["e41c",false],"style":["e41d",false],"switch_camera":["e41e",false],"switch_video":["e41f",false],"tag_faces":["e420",false],"texture":["e421",false],"timelapse":["e422",false],"timer_10":["e423",false],"timer":["e425",false],"timer_3":["e424",false],"timer_off":["e426",false],"tonality":["e427",false],"transform":["e428",false],"tune":["e429",false],"view_comfy":["e42a",false],"view_compact":["e42b",false],"vignette":["e435",false],"wb_auto":["e42c",false],"wb_cloudy":["e42d",false],"wb_incandescent":["e42e",false],"wb_iridescent":["e436",false],"wb_sunny":["e430",false]},"maps":{"add_location":["e567",false],"beenhere":["e52d",false],"directions":["e52e",false],"directions_bike":["e52f",false],"directions_boat":["e532",false],"directions_bus":["e530",false],"directions_car":["e531",false],"directions_railway":["e534",false],"directions_run":["e566",false],"directions_subway":["e533",false],"directions_transit":["e535",false],"directions_walk":["e536",false],"edit_location":["e568",false],"ev_station":["e56d",true],"flight":["e539",false],"hotel":["e53a",false],"layers":["e53b",false],"layers_clear":["e53c",false],"local_activity":["e53f",false],"local_airport":["e53d",false],"local_atm":["e53e",false],"local_bar":["e540",false],"local_cafe":["e541",false],"local_car_wash":["e542",false],"local_convenience_store":["e543",false],"local_dining":["e556",false],"local_drink":["e544",false],"local_florist":["e545",false],"local_gas_station":["e546",false],"local_grocery_store":["e547",false],"local_hospital":["e548",false],"local_hotel":["e549",false],"local_laundry_service":["e54a",false],"local_library":["e54b",false],"local_mall":["e54c",false],"local_movies":["e54d",false],"local_offer":["e54e",false],"local_parking":["e54f",false],"local_pharmacy":["e550",false],"local_phone":["e551",false],"local_pizza":["e552",false],"local_play":["e553",false],"local_post_office":["e554",false],"local_printshop":["e555",false],"local_see":["e557",false],"local_shipping":["e558",false],"local_taxi":["e559",false],"map":["e55b",false],"my_location":["e55c",false],"navigation":["e55d",false],"near_me":["e569",false],"person_pin":["e55a",false],"person_pin_circle":["e56a",false],"pin_drop":["e55e",false],"place":["e55f",false],"rate_review":["e560",false],"restaurant":["e56c",true],"restaurant_menu":["e561",false],"satellite":["e562",false],"store_mall_directory":["e563",false],"streetview":["e56e",true],"subway":["e56f",true],"terrain":["e564",false],"traffic":["e565",false],"train":["e570",true],"tram":["e571",true],"transfer_within_a_station":["e572",true],"zoom_out_map":["e56b",false]},"navigation":{"apps":["e5c3",false],"arrow_back":["e5c4",false],"arrow_downward":["e5db",false],"arrow_drop_down":["e5c5",false],"arrow_drop_down_circle":["e5c6",false],"arrow_drop_up":["e5c7",false],"arrow_forward":["e5c8",false],"arrow_upward":["e5d8",false],"cancel":["e5c9",false],"check":["e5ca",false],"chevron_left":["e5cb",false],"chevron_right":["e5cc",false],"close":["e5cd",false],"expand_less":["e5ce",false],"expand_more":["e5cf",false],"first_page":["e5dc",true],"fullscreen":["e5d0",false],"fullscreen_exit":["e5d1",false],"last_page":["e5dd",true],"menu":["e5d2",false],"more_horiz":["e5d3",false],"more_vert":["e5d4",false],"refresh":["e5d5",false],"subdirectory_arrow_left":["e5d9",false],"subdirectory_arrow_right":["e5da",false],"unfold_less":["e5d6",false],"unfold_more":["e5d7",false]},"notification":{"adb":["e60e",false],"airline_seat_flat":["e630",false],"airline_seat_flat_angled":["e631",false],"airline_seat_individual_suite":["e632",false],"airline_seat_legroom_extra":["e633",false],"airline_seat_legroom_normal":["e634",false],"airline_seat_legroom_reduced":["e635",false],"airline_seat_recline_extra":["e636",false],"airline_seat_recline_normal":["e637",false],"bluetooth_audio":["e60f",false],"confirmation_number":["e638",false],"disc_full":["e610",false],"do_not_disturb":["e612",false],"do_not_disturb_alt":["e611",false],"do_not_disturb_off":["e643",true],"do_not_disturb_on":["e644",true],"drive_eta":["e613",false],"enhanced_encryption":["e63f",false],"event_available":["e614",false],"event_busy":["e615",false],"event_note":["e616",false],"folder_special":["e617",false],"live_tv":["e639",false],"mms":["e618",false],"more":["e619",false],"network_check":["e640",false],"network_locked":["e61a",false],"no_encryption":["e641",false],"ondemand_video":["e63a",false],"personal_video":["e63b",false],"phone_bluetooth_speaker":["e61b",false],"phone_forwarded":["e61c",false],"phone_in_talk":["e61d",false],"phone_locked":["e61e",false],"phone_missed":["e61f",false],"phone_paused":["e620",false],"power":["e63c",false],"priority_high":["e645",true],"rv_hookup":["e642",false],"sd_card":["e623",false],"sim_card_alert":["e624",false],"sms":["e625",false],"sms_failed":["e626",false],"sync":["e627",false],"sync_disabled":["e628",false],"sync_problem":["e629",false],"system_update":["e62a",false],"tap_and_play":["e62b",false],"time_to_leave":["e62c",false],"vibration":["e62d",false],"voice_chat":["e62e",false],"vpn_lock":["e62f",false],"wc":["e63d",false],"wifi":["e63e",false]},"places":{"ac_unit":["eb3b",false],"airport_shuttle":["eb3c",false],"all_inclusive":["eb3d",false],"beach_access":["eb3e",false],"business_center":["eb3f",false],"casino":["eb40",false],"child_care":["eb41",false],"child_friendly":["eb42",false],"fitness_center":["eb43",false],"free_breakfast":["eb44",false],"golf_course":["eb45",false],"hot_tub":["eb46",false],"kitchen":["eb47",false],"pool":["eb48",false],"room_service":["eb49",false],"rv_hookup":["e642",false],"smoke_free":["eb4a",false],"smoking_rooms":["eb4b",false],"spa":["eb4c",false]},"social":{"cake":["e7e9",false],"domain":["e7ee",false],"group":["e7ef",false],"group_add":["e7f0",false],"location_city":["e7f1",false],"mood":["e7f2",false],"mood_bad":["e7f3",false],"notifications":["e7f4",false],"notifications_active":["e7f7",false],"notifications_none":["e7f5",false],"notifications_off":["e7f6",false],"notifications_paused":["e7f8",false],"pages":["e7f9",false],"party_mode":["e7fa",false],"people":["e7fb",false],"people_outline":["e7fc",false],"person":["e7fd",false],"person_add":["e7fe",false],"person_outline":["e7ff",false],"plus_one":["e800",false],"poll":["e801",false],"public":["e80b",false],"school":["e80c",false],"sentiment_dissatisfied":["e811",true],"sentiment_neutral":["e812",true],"sentiment_satisfied":["e813",true],"sentiment_very_dissatisfied":["e814",true],"sentiment_very_satisfied":["e815",true],"share":["e80d",false],"whatshot":["e80e",false]},"toggle":{"check_box":["e834",false],"check_box_outline_blank":["e835",false],"indeterminate_check_box":["e909",false],"radio_button_checked":["e837",false],"radio_button_unchecked":["e836",false],"star":["e838",false],"star_border":["e83a",false],"star_half":["e839",false]}};
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/demo/js/main.js b/vendor/mervick/material-design-icons/demo/js/main.js new file mode 100644 index 000000000..ed13d5cbc --- /dev/null +++ b/vendor/mervick/material-design-icons/demo/js/main.js @@ -0,0 +1,194 @@ +(function($, Backbone) { + + var models = {}, + views = {}, + renderData = function (data) { + var icons = [], + categories = []; + $.each(data, function (category, items) { + $.each(items, function (content, d) { + categories.push(category); + icons.push({ + category: category, + caption: content.replace(/_/g, ' '), + className: content.replace(/_/g, '-'), + content: content, + code: d[0].toUpperCase(), + is_new: d[1] && true + }); + }); + }); + var view = new views.Icons({collection: new models.Icons(icons)}); + view.render(); + }; + + models.Icon = Backbone.Model.extend(); + + models.Icons = Backbone.Collection.extend({ + model: models.Icon + }); + + views.Icon = Backbone.View.extend({ + tagName: 'div', + className: 'item-container', + template: _.template($('#grid-item').html()), + events : { + "click" : "showSnackBar" + }, + initialize: function (options) { + this.listenTo(this.model, 'hideSnackBar', this.hideSnackBar); + _.bindAll(this, 'render', 'hideSnackBar'); + }, + render: function () { + $(this.el).html(this.template(this.model.attributes)); + return this; + }, + showSnackBar: function() { + $("body").click(); + this.model.trigger('hideSnackBar'); + $(this.el).addClass("selected"); + var view = new views.snackbarView({model: this.model}); + view.render(); + return false; + }, + hideSnackBar: function() { + $(this.el).removeClass("selected"); + } + }); + + views.snackbarView = Backbone.View.extend({ + container: $('#snackbar'), + template: _.template($('#snackbar-template').html()), + initialize: function (options) { + this.collection = options.collection; + $("body").on("click focus", $.proxy(this.hide, this)); + }, + render: function () { + var hidden = !this.container.children(".container:not(:hidden)").length; + this.container.empty(); + this.container.append(this.template(this.model.attributes)); + if (hidden) { + this.container.children(".container").hide().slideDown('fast'); + } else { + this.container.children(".container").stop(0, 0).slideDown('fast'); + } + }, + hide: function() { + this.model.trigger('hideSnackBar'); + this.container.children(".container").slideUp('fast'); + } + }); + + views.Icons = Backbone.View.extend({ + container: $('#grid-container'), + empty_content: $('#empty-grid').html(), + search_input: $('#search'), + search_clear: $('#search-panel .clear-icon'), + initialize: function (options) { + this.collection = options.collection; + this.search_input.bind('keyup', $.proxy(this.search, this)); + this.search_clear.bind('click', $.proxy(this.clear_search, this)); + _.bindAll(this, 'render'); + }, + clear_search : function() { + this.search_input.val(''); + this.search_input.focus(); + this.search(); + return this; + }, + search: function () { + var str = this.search_input.val(); + if (str.length > 0) { + this.search_clear.show(); + } else { + this.search_clear.hide(); + } + str = str.replace(/[\-_]+/g, ' ').replace(/\s+/, ' ').trim(); + if (str.length > 0) { + var models = this.collection.filter(function (item) { + return item.get("caption").indexOf(str) > -1 + }); + this.render(models); + } else { + this.render(); + } + $('body, html').animate({scrollTop: this.container.offset().top - 64}, 0); + return this; + }, + render: function (searchCollection) { + var container = this.container, + category = null, + grid = $("<div/>", {"class" : "grid"}), + self = this, + models = searchCollection || this.collection; + container.empty(); + models.forEach(function (item) { + var itemView = new views.Icon({model: item}); + if (category === null) { + category = item.get('category'); + } + if (category !== item.get('category')) { + $("<h2/>").html(category.charAt(0).toUpperCase() + category.slice(1)). + appendTo(self.container); + grid.appendTo(self.container); + + category = item.get('category'); + grid = $("<div/>", {"class" : "grid"}); + grid.append(itemView.render().el); + } else { + grid.append(itemView.render().el); + } + }); + if (category !== null) { + $("<h2/>").html(category.charAt(0).toUpperCase() + category.slice(1)). + appendTo(self.container); + grid.appendTo(self.container); + } else { + container.html(self.empty_content); + } + return this; + } + }); + + $(document).ready(function () { + var is_fixed_search = false, + $win = $(window), + search_panel = $("#search-panel"), + header_panel = $("#head-panel"); + + $win.on("scroll resize", function () { + if ($win.scrollTop() > header_panel.outerHeight()) { + if (!is_fixed_search) { + is_fixed_search = true; + search_panel.addClass("top-fixed"); + } + } else { + if (is_fixed_search) { + is_fixed_search = false; + search_panel.removeClass("top-fixed"); + } + } + }); + + renderData(window.data); + + $("body").on("focus", "textarea.code", function() { + var $this = $(this); + $this.select(); + window.setTimeout(function() { + $this.select(); + }, 1); + function mouseUpHandler() { + $this.off("mouseup", mouseUpHandler); + return false; + } + $this.mouseup(mouseUpHandler); + }); + + $("#snackbar").on("click focus", function(e) { + e.preventDefault(); + return false; + }); + + }); +}) (jQuery, Backbone); diff --git a/vendor/mervick/material-design-icons/demo/style/main.css b/vendor/mervick/material-design-icons/demo/style/main.css new file mode 100644 index 000000000..5a5563309 --- /dev/null +++ b/vendor/mervick/material-design-icons/demo/style/main.css @@ -0,0 +1,385 @@ +/* line 3, main.scss */ +html, body { + background-color: #f9f9f9; + border: 0; + padding: 0; + margin: 0; + height: 100%; + width: 100%; + color: #444; + font-family: RobotoDraft, Roboto, sans-serif; + font-size: 14px; + -webkit-font-smoothing: antialiased; } + +/* line 16, main.scss */ +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +/* line 20, main.scss */ +* { + font-family: RobotoDraft, Roboto, sans-serif; } + +/* line 24, main.scss */ +a { + color: #02a8f3; + text-decoration: none; } + /* line 27, main.scss */ + a:hover { + text-decoration: underline; } + /* line 30, main.scss */ + a, a:hover { + outline: 0; } + +/* line 35, main.scss */ +#head-panel { + background-color: #03a9f4; + padding: 30px 0 20px; } + /* line 38, main.scss */ + #head-panel h1 { + color: #fff; + font-size: 50px; + font-weight: normal; + margin: 0 0 10px 0; + display: inline-block; } + /* line 44, main.scss */ + #head-panel h1:after { + letter-spacing: 0.5em; + content: "\00a0"; } + /* line 49, main.scss */ + #head-panel .buttons { + display: inline-block; + color: transparent; } + +/* line 55, main.scss */ +.container { + width: 100%; + padding: 0 20px; + height: 100%; } + +/* line 61, main.scss */ +.wrap { + min-height: 100%; + height: auto; + margin: 0 auto -120px; + padding: 0 0 160px; } + +/* line 68, main.scss */ +.content { + margin: 120px 0 40px; } + /* line 70, main.scss */ + .content p { + line-height: 36px; + font-size: 20px; + margin-top: 2px; + margin-bottom: 10px; } + /* line 76, main.scss */ + .content code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0, 0, 0, 0.04); + border-radius: 3px; } + /* line 84, main.scss */ + .content code:before, .content code:after { + letter-spacing: -0.2em; + content: "\00a0"; } + +/* line 91, main.scss */ +#search-panel { + height: 64px; + width: 100%; + background-color: #ffffff; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); + position: absolute; + z-index: 7; } + /* line 98, main.scss */ + #search-panel.top-fixed { + position: fixed; + top: 0; + left: 0; + right: 0; + box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2); } + /* line 105, main.scss */ + #search-panel .container { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -ms-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + height: 100%; } + /* line 117, main.scss */ + #search-panel .search-icon { + display: inline-block; + vertical-align: middle; + background-repeat: no-repeat; + fill: currentcolor; + position: relative; + opacity: 0.5; } + /* line 124, main.scss */ + #search-panel .search-icon, #search-panel .search-icon .mdi { + height: 24px; + width: 24px; + font-size: 24px; } + /* line 129, main.scss */ + #search-panel .search-icon.clear-icon { + cursor: pointer; } + /* line 131, main.scss */ + #search-panel .search-icon.clear-icon:hover { + opacity: 1; } + /* line 136, main.scss */ + #search-panel #search { + color: #434343; + font-size: 20px; + margin-left: 16px; + padding: 8px 0; + width: auto; + border: none; + outline: none; + -ms-flex: 1 1 0.000000001px; + -webkit-flex: 1; + flex: 1; + -webkit-flex-basis: 0.000000001px; + flex-basis: 0.000000001px; } + +/* line 152, main.scss */ +#grid-container { + padding: 0 0 70px; + min-height: 900px; + margin-top: 67px; } + /* line 156, main.scss */ + #grid-container .grid { + margin: 20px -15px 0 -15px; } + /* line 158, main.scss */ + #grid-container .grid:after { + clear: both; + display: table; + content: " "; } + /* line 164, main.scss */ + #grid-container:after { + clear: both; + display: table; + content: " "; } + /* line 169, main.scss */ + #grid-container h2 { + color: #a2a2a2; + font-size: 16px; + font-weight: normal; + display: block; + border-top: 1px solid rgba(0, 0, 0, 0.08); + padding: 67px 0 0; + margin: 47px 0 10px; } + /* line 178, main.scss */ + #grid-container .no-results { + text-align: center; + color: #909090; + font-size: 24px; + padding: 150px 0; } + /* line 184, main.scss */ + #grid-container .item-container { + display: block; + width: 112px; + height: 120px; + margin: 0 10px 5px; + padding: 20px 0 0; + cursor: pointer; + background: transparent; + float: left; + transition: background 200ms ease-out; + border-radius: 2px; } + /* line 195, main.scss */ + #grid-container .item-container:hover { + background: #f2f2f2; } + /* line 198, main.scss */ + #grid-container .item-container.selected { + background: #e0e0e0; } + /* line 201, main.scss */ + #grid-container .item-container .item { + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + position: relative; } + /* line 212, main.scss */ + #grid-container .item-container .item .new-badge { + position: absolute; + right: 8px; + top: -12px; + padding: 2px 3px; + border-radius: 2px; + background: #fe6363; + color: #fff; + font-size: 10px; + font-weight: 500; } + /* line 223, main.scss */ + #grid-container .item-container .item .mdi { + font-size: 48px; + width: 48px; + height: 48px; + color: #757575; } + /* line 229, main.scss */ + #grid-container .item-container .item .caption { + color: #757575; + font-size: 11px; + margin-top: 16px; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + width: 100px; + z-index: 1; } + +/* line 244, main.scss */ +#snackbar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + z-index: 5; } + /* line 250, main.scss */ + #snackbar .snackbar-header { + color: #fff; + height: 64px; + background-color: #03a9f4; + padding: 19px 20px 20px; + line-height: 26px; + overflow: hidden; } + /* line 257, main.scss */ + #snackbar .snackbar-header .mdi { + width: 24px; + height: 24px; + font-size: 24px; + float: left; } + /* line 263, main.scss */ + #snackbar .snackbar-header .caption { + font-size: 16px; + margin-left: 15px; } + /* line 267, main.scss */ + #snackbar .snackbar-header .right-side { + display: none; + float: right; } + /* line 270, main.scss */ + #snackbar .snackbar-header .right-side .mdi { + font-size: 22px; + margin-top: 1px; } + /* line 274, main.scss */ + #snackbar .snackbar-header .right-side .caption { + font-weight: 500; + margin-left: 10px; + text-transform: uppercase; + font-size: 14px; } + /* line 282, main.scss */ + #snackbar p, #snackbar p a, #snackbar .code { + font-family: 'Roboto Mono', monospace; + font-size: 13px; + line-height: 24px; + background-color: #eee; } + /* line 288, main.scss */ + #snackbar .code { + color: #434343; + border: 0; + cursor: default; + display: block; + outline: none; + padding: 0; + height: 24px; + resize: none; + width: 100%; + white-space: nowrap; + overflow: hidden; } + /* line 300, main.scss */ + #snackbar .code.comment { + opacity: 0.5; } + /* line 304, main.scss */ + #snackbar .snackbar-content { + background-color: #eee; + padding: 8px 24px; + overflow: hidden; + -webkit-transition: -webkit-transform 200ms cubic-bezier(0.4, 0, 0.2, 1); + transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); } + /* line 311, main.scss */ + #snackbar .snackbar-content h2, #snackbar .snackbar-content p { + font-size: 13px; + line-height: 24px; + font-family: 'Roboto Mono', monospace; } + /* line 316, main.scss */ + #snackbar .snackbar-content h2 { + color: #02a8f3; + display: inline-block; + font-weight: 500; + margin: 0; } + /* line 322, main.scss */ + #snackbar .snackbar-content p { + margin: 0; + color: #434343; } + /* line 326, main.scss */ + #snackbar .snackbar-content .col { + margin: 16px 0; } + /* line 330, main.scss */ + #snackbar .snackbar-header, #snackbar .snackbar-content { + margin: 0 -20px 0; } + +/* line 335, main.scss */ +#footer { + background: #EEE; + padding: 20px 0; + min-height: 120px; } + +@media (min-width: 500px) { + /* line 343, main.scss */ + #snackbar .snackbar-content .col { + margin: 16px 40px 16px 0; } + /* line 346, main.scss */ + #snackbar .snackbar-header .right-side { + display: block; } } +@media (min-width: 800px) { + /* line 353, main.scss */ + .flex { + -ms-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; } + + /* line 361, main.scss */ + .col { + width: 50%; } + + /* line 364, main.scss */ + .container { + padding: 0 35px; + margin: 0 auto; } + + /* line 368, main.scss */ + .snackbar-header, .snackbar-content { + margin: 0 -10px 0; } + + /* line 371, main.scss */ + #grid-container .grid { + margin: 20px -30px 0 -15px; } } +@media (min-width: 950px) { + /* line 377, main.scss */ + .col { + width: 45%; } } +@media (min-width: 1100px) { + /* line 383, main.scss */ + .col { + width: 40%; } } +@media (min-width: 1240px) { + /* line 389, main.scss */ + .container { + width: 1226px; } } diff --git a/vendor/mervick/material-design-icons/demo/style/main.scss b/vendor/mervick/material-design-icons/demo/style/main.scss new file mode 100644 index 000000000..15e1484b3 --- /dev/null +++ b/vendor/mervick/material-design-icons/demo/style/main.scss @@ -0,0 +1,392 @@ +@import "compass/css3"; + +html, body { + background-color: #f9f9f9; + border: 0; + padding: 0; + margin: 0; + height: 100%; + width: 100%; + color: #444; + font-family: RobotoDraft, Roboto, sans-serif; + font-size: 14px; + -webkit-font-smoothing: antialiased; +} + +*, *:before, *:after { + @include box-sizing(border-box); +} + +* { + font-family: RobotoDraft, Roboto, sans-serif; +} + +a { + color: #02a8f3; + text-decoration: none; + &:hover { + text-decoration: underline; + } + &, &:hover { + outline: 0; + } +} + +#head-panel { + background-color: #03a9f4; + padding: 30px 0 20px; + h1 { + color: #fff; + font-size: 50px; + font-weight: normal; + margin: 0 0 10px 0; + display: inline-block; + &:after { + letter-spacing: 0.5em; + content: "\00a0"; + } + } + .buttons { + display: inline-block; + color: transparent; + } +} + +.container { + width: 100%; + padding: 0 20px; + height: 100%; +} + +.wrap { + min-height: 100%; + height: auto; + margin: 0 auto -120px; + padding: 0 0 160px; +} + +.content { + margin: 120px 0 40px; + p { + line-height: 36px; + font-size: 20px; + margin-top: 2px; + margin-bottom: 10px; + } + code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0,0,0,0.04); + border-radius: 3px; + &:before, &:after { + letter-spacing: -0.2em; + content: "\00a0"; + } + } +} + +#search-panel { + height: 64px; + width: 100%; + background-color: #ffffff; + box-shadow: 0 0 2px rgba(0,0,0,.2); + position: absolute; + z-index: 7; + &.top-fixed { + position: fixed; + top: 0; + left: 0; + right: 0; + box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);; + } + .container { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -ms-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + height: 100%; + } + .search-icon { + display: inline-block; + vertical-align: middle; + background-repeat: no-repeat; + fill: currentcolor; + position: relative; + opacity: 0.5; + &, .mdi { + height: 24px; + width: 24px; + font-size: 24px; + } + &.clear-icon { + cursor: pointer; + &:hover { + opacity: 1; + } + } + } + #search { + color: #434343; + font-size: 20px; + margin-left: 16px; + padding: 8px 0; + width: auto; + border: none; + outline: none; + -ms-flex: 1 1 0.000000001px; + -webkit-flex: 1; + flex: 1; + -webkit-flex-basis: 0.000000001px; + flex-basis: 0.000000001px; + } +} + +#grid-container { + padding: 0 0 70px; + min-height: 900px; + margin-top: 67px; + .grid { + margin: 20px -15px 0 -15px; + &:after { + clear: both; + display: table; + content: " "; + } + } + &:after { + clear: both; + display: table; + content: " "; + } + h2 { + color: #a2a2a2; + font-size: 16px; + font-weight: normal; + display: block; + border-top: 1px solid rgba(0, 0, 0, 0.08); + padding: 67px 0 0; + margin: 47px 0 10px; + } + .no-results { + text-align: center; + color: #909090; + font-size: 24px; + padding: 150px 0; + } + .item-container { + display: block; + width: 112px; + height: 120px; + margin: 0 10px 5px; + padding: 20px 0 0; + cursor: pointer; + background: transparent; + float: left; + transition: background 200ms ease-out; + border-radius: 2px; + &:hover { + background: #f2f2f2; + } + &.selected { + background: #e0e0e0; + } + .item { + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + position: relative; + .new-badge { + position: absolute; + right: 8px; + top: -12px; + padding: 2px 3px; + border-radius: 2px; + background: #fe6363; + color: #fff; + font-size: 10px; + font-weight: 500; + } + .mdi { + font-size: 48px; + width: 48px; + height: 48px; + color: #757575; + } + .caption { + color: #757575; + font-size: 11px; + margin-top: 16px; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + width: 100px; + z-index: 1; + } + } + } +} + +#snackbar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + z-index: 5; + .snackbar-header { + color: #fff; + height: 64px; + background-color: #03a9f4; + padding: 19px 20px 20px; + line-height: 26px; + overflow: hidden; + .mdi { + width: 24px; + height: 24px; + font-size: 24px; + float: left; + } + .caption { + font-size: 16px; + margin-left: 15px; + } + .right-side { + display: none; + float: right; + .mdi { + font-size: 22px; + margin-top: 1px; + } + .caption { + font-weight: 500; + margin-left: 10px; + text-transform: uppercase; + font-size: 14px; + } + } + } + p, p a, .code { + font-family: 'Roboto Mono', monospace; + font-size: 13px; + line-height: 24px; + background-color: #eee; + } + .code { + color: #434343; + border: 0; + cursor: default; + display: block; + outline: none; + padding: 0; + height: 24px; + resize: none; + width: 100%; + white-space: nowrap; + overflow: hidden; + &.comment { + opacity: 0.5; + } + } + .snackbar-content { + background-color: #eee; + padding: 8px 24px; + overflow: hidden; + -webkit-transition: -webkit-transform 200ms cubic-bezier(0.4, 0, 0.2, 1); + transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 -2px 5px rgba(0,0,0,.1); + h2, p { + font-size: 13px; + line-height: 24px; + font-family: 'Roboto Mono', monospace; + } + h2 { + color: #02a8f3; + display: inline-block; + font-weight: 500; + margin: 0; + } + p { + margin: 0; + color: #434343; + } + .col { + margin: 16px 0; + } + } + .snackbar-header, .snackbar-content { + margin: 0 -20px 0; + } +} + +#footer { + background: #EEE; + padding: 20px 0; + min-height: 120px; +} + +@media (min-width: 500px) { + #snackbar { + .snackbar-content .col { + margin: 16px 40px 16px 0; + } + .snackbar-header .right-side { + display: block; + } + } +} + +@media (min-width: 800px) { + .flex { + -ms-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + } + .col { + width: 50%; + } + .container { + padding: 0 35px; + margin: 0 auto; + } + .snackbar-header, .snackbar-content { + margin: 0 -10px 0; + } + #grid-container .grid { + margin: 20px -30px 0 -15px; + } +} + +@media (min-width: 950px) { + .col { + width: 45%; + } +} + +@media (min-width: 1100px) { + .col { + width: 40%; + } +} + +@media (min-width: 1240px) { + .container { + width: 1226px; + } +}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/fonts/LICENSE.txt b/vendor/mervick/material-design-icons/fonts/LICENSE.txt new file mode 100644 index 000000000..dc8853a70 --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/LICENSE.txt @@ -0,0 +1,393 @@ +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public licenses. +Notwithstanding, Creative Commons may elect to apply one of its public +licenses to material it publishes and in those instances will be +considered the "Licensor." Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the public +licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.eot b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.eot Binary files differnew file mode 100644 index 000000000..70508ebab --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.eot diff --git a/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.svg b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.svg new file mode 100644 index 000000000..a449327e2 --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.svg @@ -0,0 +1,2373 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > +<!-- +2016-2-8: Created with FontForge (http://fontforge.org) +--> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> +<metadata> +Created by FontForge 20151118 at Mon Feb 8 11:58:02 2016 + By shyndman +Copyright 2015 Google, Inc. All Rights Reserved. +</metadata> +<defs> +<font id="MaterialIcons-Regular" horiz-adv-x="512" > + <font-face + font-family="Material Icons" + font-weight="400" + font-stretch="normal" + units-per-em="512" + panose-1="2 0 5 3 0 0 0 0 0 0" + ascent="512" + descent="0" + bbox="0 0 512 512" + underline-thickness="50" + underline-position="-100" + unicode-range="U+0030-10FFFD" + /> + <missing-glyph /> + <glyph glyph-name="3d_rotation" unicode="3d_rotation" +d="M256 512c134 0 244 -103 255 -234h-32c-7 80 -57 147 -127 180l-29 -28l-81 81zM353 260c0 34.9356 -13.6691 57 -47 57h-20v-123h19c25.6434 0 40.2719 13.9518 46 34c2 7 2 15 2 24v8zM306 341c38.1819 0 60.9327 -19.3318 72 -47c4 -10 5 -22 5 -34v-8 +c0 -26.4057 -7.57104 -45.571 -21 -59c-13.4122 -13.4122 -30.5519 -22 -57 -22h-49v170h50zM207 258c15.3033 -6.12131 28 -18.2465 28 -39c0 -8 -2 -14 -5 -20s-6 -12 -11 -16c-9.37815 -7.50252 -23.5479 -12 -40 -12c-31.0959 0 -54 15.7441 -54 47h27 +c0 -15.4518 11.6022 -25 27 -25c17.8699 0 28 8.53939 28 27c0 18.8434 -12.3951 27 -31 27h-16v22h16c17.3039 0 29 8.03066 29 25c0 16.5246 -8.84017 25 -26 25c-14.4441 0 -25 -8.58131 -25 -23h-28c0 14.8936 7.55163 24.5516 15 32c9.92709 7.94167 20.8987 13 38 13 +c25.6475 0 40.3859 -9.7718 49 -27c3 -6 4 -12 4 -20c0 -18.1878 -12.3353 -29.6677 -25 -36zM160 54l29 28l81 -81l-14 -1c-134 0 -244 104 -255 235h32c8 -80 57 -148 127 -181z" /> + <glyph glyph-name="ac_unit" unicode="ac_unit" +d="M469 277v-42h-89l69 -69l-30 -31l-99 100h-43v-43l100 -99l-31 -30l-69 69v-89h-42v89l-69 -69l-31 30l100 99v43h-43l-99 -100l-30 31l69 69h-89v42h89l-69 69l30 31l99 -100h43v43l-100 99l31 30l69 -69v89h42v-89l69 69l31 -30l-100 -99v-43h43l99 100l30 -31l-69 -69 +h89z" /> + <glyph glyph-name="access_alarm" unicode="access_alarm" +d="M256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM267 341v-112l85 -50l-16 -26l-101 60v128h32zM168 440l-98 -82l-27 32l98 82zM469 390 +l-27 -33l-98 83l27 32z" /> + <glyph glyph-name="access_alarms" unicode="access_alarms" +d="M256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c107 0 192 -85 192 -192s-85 -192 -192 -192s-192 85 -192 192s85 192 192 192zM267 341v-113l85 -51l-17 -26l-100 62v128h32zM169 439l-99 -81l-27 32l98 81zM469 390 +l-27 -32l-99 84l28 32z" /> + <glyph glyph-name="access_time" unicode="access_time" +d="M267 363v-112l96 -57l-16 -27l-112 68v128h32zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="accessibility" unicode="accessibility" +d="M448 320h-128v-277h-43v128h-42v-128h-43v277h-128v43h384v-43zM256 469c23 0 43 -19 43 -42s-20 -43 -43 -43s-43 20 -43 43s20 42 43 42z" /> + <glyph glyph-name="accessible" unicode="accessible" +d="M274 128h44c-10 -49 -53 -85 -105 -85c-59 0 -106 47 -106 106c0 52 36 95 85 105v-44c-25 -9 -43 -33 -43 -61c0 -35 29 -64 64 -64c28 0 52 18 61 43zM213 318c0 29.9891 33.3578 56.5098 64 39h1v-1c5 -2 9 -5 13 -9l28 -31c21 -23 53 -39 86 -39v-42 +c-37 0 -78 18 -106 41v-73h64c23 0 42 -20 42 -43v-117h-42v106h-107c-23 0 -43 20 -43 43v126zM213 427c0 24 19 42 43 42s43 -18 43 -42s-19 -43 -43 -43s-43 19 -43 43z" /> + <glyph glyph-name="account_balance" unicode="account_balance" +d="M245 491l203 -107v-43h-405v43zM341 299h64v-150h-64v150zM43 43v64h405v-64h-405zM213 299h64v-150h-64v150zM85 299h64v-150h-64v150z" /> + <glyph glyph-name="account_balance_wallet" unicode="account_balance_wallet" +d="M341 224c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM256 171v170h213v-170h-213zM448 128v-21c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h298c23 0 43 -20 43 -43v-21h-192c-24 0 -43 -20 -43 -43v-170 +c0 -23 19 -43 43 -43h192z" /> + <glyph glyph-name="account_box" unicode="account_box" +d="M128 149v-21h256v21c0 43 -85 66 -128 66s-128 -23 -128 -66zM320 320c0 35 -29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64s64 29 64 64zM64 405c0 23 19 43 43 43h298c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298z" /> + <glyph glyph-name="account_circle" unicode="account_circle" +d="M256 102c53 0 100 28 128 69c-1 42 -86 66 -128 66c-43 0 -127 -24 -128 -66c28 -41 75 -69 128 -69zM256 405c-35 0 -64 -29 -64 -64s29 -64 64 -64s64 29 64 64s-29 64 -64 64zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z +" /> + <glyph glyph-name="adb" unicode="adb" +d="M320 320c12 0 21 9 21 21s-9 22 -21 22s-21 -10 -21 -22s9 -21 21 -21zM192 320c12 0 21 9 21 21s-9 22 -21 22s-21 -10 -21 -22s9 -21 21 -21zM344 419c37 -27 61 -71 61 -120v-22h-298v22c0 49 24 93 61 120l-45 45l18 17l49 -49c20 10 42 16 66 16s46 -6 66 -16l49 49 +l18 -17zM107 171v85h298v-85c0 -83 -66 -150 -149 -150s-149 67 -149 150z" /> + <glyph glyph-name="add" unicode="add" +d="M405 235h-128v-128h-42v128h-128v42h128v128h42v-128h128v-42z" /> + <glyph glyph-name="add_a_photo" unicode="add_a_photo" +d="M209 213c0 38 30 69 68 69s69 -31 69 -69s-31 -68 -69 -68s-68 30 -68 68zM277 107c59 0 107 47 107 106s-48 107 -107 107s-106 -48 -106 -107s47 -106 106 -106zM128 299v64h64v64h149l39 -43h68c23 0 43 -20 43 -43v-256c0 -23 -20 -42 -43 -42h-341 +c-23 0 -43 19 -43 42v214h64zM64 427v64h43v-64h64v-43h-64v-64h-43v64h-64v43h64z" /> + <glyph glyph-name="add_alarm" unicode="add_alarm" +d="M277 320v-64h64v-43h-64v-64h-42v64h-64v43h64v64h42zM256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM469 390l-27 -33l-98 83l27 32z +M168 440l-98 -82l-27 32l98 82z" /> + <glyph glyph-name="add_alert" unicode="add_alert" +d="M341 234v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64zM403 153l45 -45v-23h-384v23l45 45v124c0 69 48 128 113 143v15c0 19 15 34 34 34s34 -15 34 -34v-15c65 -15 113 -74 113 -143v-124zM214 64h84c0 -23 -19 -43 -42 -43s-42 20 -42 43z" /> + <glyph glyph-name="add_box" unicode="add_box" +d="M363 235v42h-86v86h-42v-86h-86v-42h86v-86h42v86h86zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h298z" /> + <glyph glyph-name="add_circle" unicode="add_circle" +d="M363 235v42h-86v86h-42v-86h-86v-42h86v-86h42v86h86zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="add_circle_outline" unicode="add_circle_outline" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM277 363v-86h86v-42h-86v-86h-42v86h-86v42h86v86h42z" /> + <glyph glyph-name="add_location" unicode="add_location" +d="M341 299v42h-64v64h-42v-64h-64v-42h64v-64h42v64h64zM256 469c82 0 149 -67 149 -149c0 -112 -149 -277 -149 -277s-149 165 -149 277c0 82 67 149 149 149z" /> + <glyph glyph-name="add_shopping_cart" unicode="add_shopping_cart" +d="M153 197c0 -3 2 -5 5 -5h247v-43h-256c-23 0 -42 20 -42 43c0 7 2 14 5 20l29 53l-77 162h-43v42h70c13.5017 -28.165 26.8327 -56.5006 40 -85c17.0313 -35.6353 33.8016 -71.5317 51 -107h150c27.393 49.9404 55.2665 99.4002 82 150l37 -21l-82 -149 +c-7 -13 -21 -22 -37 -22h-159l-19 -35zM363 128c23 0 42 -20 42 -43s-19 -42 -42 -42s-43 19 -43 42s20 43 43 43zM149 128c23 0 43 -20 43 -43s-20 -42 -43 -42s-42 19 -42 42s19 43 42 43zM235 320v64h-64v43h64v64h42v-64h64v-43h-64v-64h-42z" /> + <glyph glyph-name="add_to_photos" unicode="add_to_photos" +d="M405 277v43h-85v85h-43v-85h-85v-43h85v-85h43v85h85zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42z" /> + <glyph glyph-name="add_to_queue" unicode="add_to_queue" +d="M341 299v-43h-64v-64h-42v64h-64v43h64v64h42v-64h64zM448 149v256h-384v-256h384zM448 448c23 0 43 -19 43 -43l-1 -256c0 -23 -19 -42 -42 -42h-107v-43h-170v43h-107c-24 0 -43 19 -43 42v256c0 24 19 43 43 43h384z" /> + <glyph glyph-name="adjust" unicode="adjust" +d="M320 256c0 -35 -29 -64 -64 -64s-64 29 -64 64s29 64 64 64s64 -29 64 -64zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="airline_seat_flat" unicode="airline_seat_flat" +d="M152 254c-25 -25 -65 -26 -90 -1s-26 65 -1 90s65 26 90 1s26 -65 1 -90zM43 213h426v-42h-128v-43h-170v43h-128v42zM469 277v-42h-277v128h192c47 0 85 -39 85 -86z" /> + <glyph glyph-name="airline_seat_flat_angled" unicode="airline_seat_flat_angled" +d="M156 294c-32 -15 -71 -2 -86 30s-2 71 30 86s71 2 86 -30s2 -71 -30 -86zM32 253l15 40l405 -146l-14 -40l-97 34v-34h-170v96zM475 207l-15 -40l-264 95l45 121l182 -66c45 -16 68 -65 52 -110z" /> + <glyph glyph-name="airline_seat_individual_suite" unicode="airline_seat_individual_suite" +d="M405 363c47 0 86 -39 86 -86v-128h-470v214h43v-150h171v150h170zM149 235c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64z" /> + <glyph glyph-name="airline_seat_legroom_extra" unicode="airline_seat_legroom_extra" +d="M487 144c9 -16 1 -36 -15 -44l-79 -36l-73 149h-149c-35 0 -64 29 -64 64v171h128v-128h75c16 0 31 -9 38 -24l72 -149l24 11c16 7 35 1 43 -14zM85 256c0 -35 29 -64 64 -64h128v-43h-128c-59 0 -106 48 -106 107v192h42v-192z" /> + <glyph glyph-name="airline_seat_legroom_normal" unicode="airline_seat_legroom_normal" +d="M437 128c18 0 32 -14 32 -32s-14 -32 -32 -32h-96v149h-149c-35 0 -64 29 -64 64v171h128v-128h107c23 0 42 -20 42 -43v-149h32zM107 256c0 -35 29 -64 64 -64h128v-43h-128c-59 0 -107 48 -107 107v192h43v-192z" /> + <glyph glyph-name="airline_seat_legroom_reduced" unicode="airline_seat_legroom_reduced" +d="M107 256c0 -35 29 -64 64 -64h85v-43h-85c-59 0 -107 48 -107 107v192h43v-192zM426 102c4 -20 -11 -38 -31 -38h-96v64l21 85h-128c-35 0 -64 29 -64 64v171h128v-128h107c23 0 42 -20 42 -43l-42 -149h30c16 0 30 -11 33 -26z" /> + <glyph glyph-name="airline_seat_recline_extra" unicode="airline_seat_recline_extra" +d="M346 192l123 -96l-32 -32l-81 64h-146c-31 0 -57 22 -63 52l-29 126c-4 26 13 51 39 56h1c15.1794 2.16848 28.3139 -2.05108 37 -9l35 -27c27 -21 65 -34 100 -27v-46c-40 -7 -76 7 -110 26l22 -87h104zM341 107v-43h-150c-53 0 -98 38 -106 90l-42 209h42l42 -202 +c5 -31 32 -54 64 -54h150zM114 392c-19 14 -23 40 -10 59s40 24 59 11c19 -14 24 -41 11 -60c-14 -19 -41 -23 -60 -10z" /> + <glyph glyph-name="airline_seat_recline_normal" unicode="airline_seat_recline_normal" +d="M427 84l-31 -31l-75 75h-108c-35 0 -64 29 -64 64v123c0 26 22 48 48 48h1c14.8367 0 27.399 -8.39902 35 -16l30 -33c23 -25 65 -43 100 -43v-47c-41 0 -88 22 -118 47v-79h74zM128 171c0 -35 29 -64 64 -64h128v-43h-128c-59 0 -107 48 -107 107v192h43v-192zM162 397 +c-17 17 -17 43 0 60s43 17 60 0s17 -43 0 -60s-43 -17 -60 0z" /> + <glyph glyph-name="airplanemode_active" unicode="airplanemode_active" +d="M217 320zM448 171l-171 53v-117l43 -32v-32l-75 21l-74 -21v32l42 32v117l-170 -53v42l170 107v117c0 18 14 32 32 32s32 -14 32 -32v-117l171 -107v-42z" /> + <glyph glyph-name="airplanemode_inactive" unicode="airplanemode_inactive" +d="M64 400l27 27l336 -336l-27 -27l-123 122v-79l43 -32v-32l-75 21l-74 -21v32l42 32v117l-170 -53v42l127 80zM277 320l171 -107v-42l-68 21l-167 167v78c0 18 14 32 32 32s32 -14 32 -32v-117z" /> + <glyph glyph-name="airplay" unicode="airplay" +d="M448 448c23 0 43 -20 43 -43v-256c0 -23 -20 -42 -43 -42h-85v42h85v256h-384v-256h85v-42h-85c-23 0 -43 19 -43 42v256c0 23 20 43 43 43h384zM128 43l128 128l128 -128h-256z" /> + <glyph glyph-name="airport_shuttle" unicode="airport_shuttle" +d="M320 277h107l-86 86h-21v-86zM373 139c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM277 277v86h-85v-86h85zM128 139c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM64 277h85v86h-85v-86zM363 405l128 -128v-106h-54 +c0 -35 -29 -64 -64 -64s-64 29 -64 64h-117c0 -35 -29 -64 -64 -64s-64 29 -64 64h-43v192c0 24 20 42 43 42h299z" /> + <glyph glyph-name="alarm" unicode="alarm" +d="M256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM267 341v-112l85 -50l-16 -26l-101 60v128h32zM168 440l-98 -82l-27 32l98 82zM469 390 +l-27 -33l-98 83l27 32z" /> + <glyph glyph-name="alarm_add" unicode="alarm_add" +d="M277 320v-64h64v-43h-64v-64h-42v64h-64v43h64v64h42zM256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM469 390l-27 -33l-98 83l27 32z +M168 440l-98 -82l-27 32l98 82z" /> + <glyph glyph-name="alarm_off" unicode="alarm_off" +d="M171 442l-18 -15l-31 30l19 15zM351 120l-210 210c-21 -26 -34 -59 -34 -95c0 -83 66 -150 149 -150c36 0 69 14 95 35zM62 463c131.276 -131.057 262.677 -261.99 394 -393l-27 -27l-47 47c-34 -29 -78 -47 -126 -47c-106 0 -192 86 -192 192c0 48 18 91 47 125l-17 17 +l-24 -20l-30 31l24 19l-29 29zM469 390l-27 -33l-98 83l27 32zM256 384c-18 0 -35 -3 -51 -9l-33 32c25 12 54 20 84 20c106 0 192 -86 192 -192c0 -30 -7 -59 -19 -84l-33 32c6 16 9 34 9 52c0 83 -66 149 -149 149z" /> + <glyph glyph-name="alarm_on" unicode="alarm_on" +d="M225 202l105 106l23 -23l-128 -128l-68 68l22 22zM256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM168 440l-98 -82l-27 32l98 82zM469 390 +l-27 -33l-98 83l27 32z" /> + <glyph glyph-name="album" unicode="album" +d="M256 277c12 0 21 -9 21 -21s-9 -21 -21 -21s-21 9 -21 21s9 21 21 21zM256 160c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="all_inclusive" unicode="all_inclusive" +d="M397 371c64 0 115 -52 115 -115s-51 -115 -115 -115c-31 0 -60 12 -82 34l-27 24l32 28l25 -21c15 -15 33 -22 52 -22c40 0 72 32 72 72s-32 72 -72 72c-19 0 -37 -7 -51 -21c-30.1331 -26.5336 -60.4726 -52.8608 -90 -80l-60 -53c-21 -21 -50 -33 -81 -33 +c-64 0 -115 52 -115 115s51 115 115 115c31 0 60 -12 82 -34l27 -24l-33 -28l-24 21c-15 15 -33 22 -52 22c-40 0 -72 -32 -72 -72s32 -72 72 -72c19 0 37 7 51 21c30.1331 26.5336 60.4726 52.8608 90 80l60 53c21 21 50 33 81 33z" /> + <glyph glyph-name="all_out" unicode="all_out" +d="M343 170c45 45 45 120 0 165s-120 45 -165 0s-45 -120 0 -165s120 -45 165 0zM366 358c58 -58 58 -153 0 -211s-153 -58 -211 0s-58 153 0 211s153 58 211 0zM90 338v85h85zM175 82h-85v85zM431 167v-85h-85zM346 423h85v-85z" /> + <glyph glyph-name="android" unicode="android" +d="M320 405v22h-21v-22h21zM213 405v22h-21v-22h21zM331 466c32 -23 53 -61 53 -103h-256c0 42 20 80 52 103l-28 28c-4 4 -4 11 0 15s11 4 15 0l32 -32c17 9 37 14 57 14s39 -5 56 -14l32 32c4 4 11 4 15 0s4 -11 0 -15zM437 341c18 0 32 -14 32 -32v-149 +c0 -18 -14 -32 -32 -32s-32 14 -32 32v149c0 18 14 32 32 32zM75 341c18 0 32 -14 32 -32v-149c0 -18 -14 -32 -32 -32s-32 14 -32 32v149c0 18 14 32 32 32zM128 128v213h256v-213c0 -12 -9 -21 -21 -21h-22v-75c0 -18 -14 -32 -32 -32s-32 14 -32 32v75h-42v-75 +c0 -18 -14 -32 -32 -32s-32 14 -32 32v75h-22c-12 0 -21 9 -21 21z" /> + <glyph glyph-name="announcement" unicode="announcement" +d="M277 192v43h-42v-43h42zM277 277v128h-42v-128h42zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="apps" unicode="apps" +d="M341 85v86h86v-86h-86zM341 213v86h86v-86h-86zM213 341v86h86v-86h-86zM341 427h86v-86h-86v86zM213 213v86h86v-86h-86zM85 213v86h86v-86h-86zM85 85v86h86v-86h-86zM213 85v86h86v-86h-86zM85 341v86h86v-86h-86z" /> + <glyph glyph-name="archive" unicode="archive" +d="M109 405h294l-20 22h-256zM256 139l117 117h-74v43h-86v-43h-74zM438 400c6 -7 10 -17 10 -27v-266c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v266c0 10 4 20 10 27l29 36c6 7 15 12 25 12h256c10 0 19 -5 25 -12z" /> + <glyph glyph-name="arrow_back" unicode="arrow_back" +d="M427 277v-42h-260l119 -120l-30 -30l-171 171l171 171l30 -30l-119 -120h260z" /> + <glyph glyph-name="arrow_downward" unicode="arrow_downward" +d="M427 256l-171 -171l-171 171l31 30l119 -119v260h42v-260l120 119z" /> + <glyph glyph-name="arrow_drop_down" unicode="arrow_drop_down" +d="M149 299h214l-107 -107z" /> + <glyph glyph-name="arrow_drop_down_circle" unicode="arrow_drop_down_circle" +d="M256 213l85 86h-170zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="arrow_drop_up" unicode="arrow_drop_up" +d="M149 213l107 107l107 -107h-214z" /> + <glyph glyph-name="arrow_forward" unicode="arrow_forward" +d="M256 427l171 -171l-171 -171l-30 30l119 120h-260v42h260l-119 120z" /> + <glyph glyph-name="arrow_upward" unicode="arrow_upward" +d="M85 256l171 171l171 -171l-31 -30l-119 119v-260h-42v260l-120 -119z" /> + <glyph glyph-name="art_track" unicode="art_track" +d="M224 192l-48 64l-37 -48l-27 32l-37 -48h149zM256 320v-128c0 -23 -20 -43 -43 -43h-128c-23 0 -42 20 -42 43v128c0 23 19 43 42 43h128c23 0 43 -20 43 -43zM299 149v43h170v-43h-170zM469 363v-43h-170v43h170zM469 235h-170v42h170v-42z" /> + <glyph glyph-name="aspect_ratio" unicode="aspect_ratio" +d="M448 106v300h-384v-300h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384zM149 320v-64h-42v107h106v-43h-64zM405 256v-107h-106v43h64v64h42z" /> + <glyph glyph-name="assessment" unicode="assessment" +d="M363 149v86h-43v-86h43zM277 149v214h-42v-214h42zM192 149v150h-43v-150h43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="assignment" unicode="assignment" +d="M363 320v43h-214v-43h214zM363 235v42h-214v-42h214zM299 149v43h-150v-43h150zM256 448c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h89 +c9 25 32 43 60 43s51 -18 60 -43h89z" /> + <glyph glyph-name="assignment_ind" unicode="assignment_ind" +d="M384 107v30c0 43 -85 66 -128 66s-128 -23 -128 -66v-30h256zM256 363c-35 0 -64 -29 -64 -64s29 -64 64 -64s64 29 64 64s-29 64 -64 64zM256 448c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43 +h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h89c9 25 32 43 60 43s51 -18 60 -43h89z" /> + <glyph glyph-name="assignment_late" unicode="assignment_late" +d="M256 405c12 0 21 10 21 22s-9 21 -21 21s-21 -9 -21 -21s9 -22 21 -22zM277 213v128h-42v-128h42zM277 128v43h-42v-43h42zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h89c9 25 32 43 60 43s51 -18 60 -43 +h89z" /> + <glyph glyph-name="assignment_return" unicode="assignment_return" +d="M341 192v85h-85v64l-107 -106l107 -107v64h85zM256 448c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h89c9 25 32 43 60 43s51 -18 60 -43h89z +" /> + <glyph glyph-name="assignment_returned" unicode="assignment_returned" +d="M256 128l107 107h-64v85h-86v-85h-64zM256 448c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h89c9 25 32 43 60 43s51 -18 60 -43h89z" /> + <glyph glyph-name="assignment_turned_in" unicode="assignment_turned_in" +d="M213 149l171 171l-30 30l-141 -140l-55 55l-30 -30zM256 448c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h89c9 25 32 43 60 43s51 -18 60 -43 +h89z" /> + <glyph glyph-name="assistant" unicode="assistant" +d="M296 237l88 40l-88 40l-40 88l-40 -88l-88 -40l88 -40l40 -88zM405 469c23 0 43 -19 43 -42v-299c0 -23 -20 -43 -43 -43h-85l-64 -64l-64 64h-85c-23 0 -43 20 -43 43v299c0 23 20 42 43 42h298z" /> + <glyph glyph-name="assistant_photo" unicode="assistant_photo" +d="M307 384h120v-213h-150l-8 42h-120v-149h-42v363h192z" /> + <glyph glyph-name="attach_file" unicode="attach_file" +d="M352 384h32v-245c0 -65 -52 -118 -117 -118s-118 53 -118 118v266c0 47 39 86 86 86s85 -39 85 -86v-224c0 -29 -24 -53 -53 -53s-54 24 -54 53v203h32v-203c0 -12 10 -21 22 -21s21 9 21 21v224c0 29 -24 54 -53 54s-54 -25 -54 -54v-266c0 -47 39 -86 86 -86 +s85 39 85 86v245z" /> + <glyph glyph-name="attach_money" unicode="attach_money" +d="M252 279c48 -13 100 -32 100 -93c0 -44 -33 -68 -75 -76v-46h-64v46c-41 9 -75 35 -78 82h47c2 -25 19 -45 63 -45c47 0 58 23 58 38c0 20 -11 39 -64 52c-60 14 -100 39 -100 88c0 41 33 68 74 77v46h64v-47c45 -11 68 -44 69 -81h-47c-1 27 -16 45 -54 45 +c-36 0 -57 -17 -57 -40c0 -20 16 -33 64 -46z" /> + <glyph glyph-name="attachment" unicode="attachment" +d="M43 245c0 65 52 118 117 118h224c47 0 85 -39 85 -86s-38 -85 -85 -85h-181c-29 0 -54 24 -54 53s25 54 54 54h160v-43h-162c-12 0 -12 -21 0 -21h183c23 0 43 19 43 42s-20 43 -43 43h-224c-41 0 -75 -34 -75 -75s34 -74 75 -74h203v-43h-203c-65 0 -117 52 -117 117z +" /> + <glyph glyph-name="audiotrack" unicode="audiotrack" +d="M256 448h149v-64h-85v-235h-1c-5 -48 -46 -85 -95 -85c-53 0 -96 43 -96 96s43 96 96 96c11 0 22 -2 32 -6v198z" /> + <glyph glyph-name="autorenew" unicode="autorenew" +d="M400 347c17 -26 27 -58 27 -91c0 -94 -77 -171 -171 -171v-64l-85 86l85 85v-64c71 0 128 57 128 128c0 22 -6 42 -15 60zM256 384c-71 0 -128 -57 -128 -128c0 -22 5 -42 15 -60l-31 -31c-17 26 -27 58 -27 91c0 94 77 171 171 171v64l85 -86l-85 -85v64z" /> + <glyph glyph-name="av_timer" unicode="av_timer" +d="M128 256c0 12 9 21 21 21s22 -9 22 -21s-10 -21 -22 -21s-21 9 -21 21zM384 256c0 -12 -9 -21 -21 -21s-22 9 -22 21s10 21 22 21s21 -9 21 -21zM235 448h21c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192c0 63 30 118 77 153v1l145 -145l-30 -30 +l-116 115c-21 -26 -33 -58 -33 -94c0 -83 66 -149 149 -149s149 66 149 149c0 75 -56 138 -128 148v-41h-42v85zM235 149c0 12 9 22 21 22s21 -10 21 -22s-9 -21 -21 -21s-21 9 -21 21z" /> + <glyph glyph-name="backspace" unicode="backspace" +d="M405 179l-76 77l76 77l-30 30l-76 -77l-77 77l-30 -30l77 -77l-77 -77l30 -30l77 77l76 -77zM469 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-320c-15 0 -26 8 -34 19l-115 173l115 173c8 11 19 19 34 19h320z" /> + <glyph glyph-name="backup" unicode="backup" +d="M299 235h64l-107 106l-107 -106h64v-86h86v86zM413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="battery_alert" unicode="battery_alert" +d="M277 213v107h-42v-107h42zM277 128v43h-42v-43h42zM334 427c16 0 29 -13 29 -29v-327c0 -16 -13 -28 -29 -28h-156c-16 0 -29 12 -29 28v327c0 16 13 29 29 29h35v42h86v-42h35z" /> + <glyph glyph-name="battery_charging_full" unicode="battery_charging_full" +d="M235 85l85 160h-43v118l-85 -160h43v-118zM334 427c16 0 29 -13 29 -29v-327c0 -16 -13 -28 -29 -28h-156c-16 0 -29 12 -29 28v327c0 16 13 29 29 29h35v42h86v-42h35z" /> + <glyph glyph-name="battery_full" unicode="battery_full" +d="M334 427c16 0 29 -13 29 -29v-327c0 -16 -13 -28 -29 -28h-156c-16 0 -29 12 -29 28v327c0 16 13 29 29 29h35v42h86v-42h35z" /> + <glyph glyph-name="battery_std" unicode="battery_std" +d="M334 427c16 0 29 -13 29 -29v-327c0 -16 -13 -28 -29 -28h-156c-16 0 -29 12 -29 28v327c0 16 13 29 29 29h35v42h86v-42h35z" /> + <glyph glyph-name="battery_unknown" unicode="battery_unknown" +d="M305 241c9 9 15 22 15 36c0 35 -29 64 -64 64s-64 -29 -64 -64h32c0 18 14 32 32 32s32 -14 32 -32c0 -9 -3 -16 -9 -22l-20 -20c-10 -10 -20 -25 -20 -43h34c0 10 8 24 18 34c6 6 14 15 14 15zM276 129v41h-40v-41h40zM334 427c16 0 29 -13 29 -29v-327 +c0 -16 -13 -28 -29 -28h-156c-16 0 -29 12 -29 28v327c0 16 13 29 29 29h35v42h86v-42h35z" /> + <glyph glyph-name="beach_access" unicode="beach_access" +d="M372 324c-66.8504 66.8504 -159.585 88.9016 -243.437 61.1868c63.7841 7.27512 145.981 -25.7308 212.437 -92.1868l-122 -122c-66.456 66.456 -99.4619 148.653 -92.1868 212.437c-27.7148 -83.8524 -5.66368 -176.587 61.1868 -243.437l-61 -61 +c-83.9541 83.9541 -84 220.85 -0.137673 304.862c0.129398 1.10582 0.166618 1.14572 1.27547 1.27547c84.012 83.8623 220.908 83.8164 304.862 -0.137673zM280 201l31 31l137 -138l-31 -30z" /> + <glyph glyph-name="beenhere" unicode="beenhere" +d="M213 171l192 192l-30 30l-162 -162l-76 76l-30 -30zM405 491c23 0 43 -20 43 -43v-276c0 -15 -8 -27 -19 -35l-173 -116l-173 116c-11 8 -19 20 -19 35v276c0 23 20 43 43 43h298z" /> + <glyph glyph-name="block" unicode="block" +d="M256 85c94 0 171 77 171 171c0 39 -13 76 -36 105l-240 -240c29 -23 66 -36 105 -36zM85 256c0 -39 13 -76 36 -105l240 240c-29 23 -66 36 -105 36c-94 0 -171 -77 -171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="bluetooth" unicode="bluetooth" +d="M317 164l-40 41v-81zM277 388v-81l40 41zM378 348l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21z" /> + <glyph glyph-name="bluetooth_audio" unicode="bluetooth_audio" +d="M275 164l-40 41v-81zM235 388v-81l40 41zM335 348l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM417 369c20 -32 31 -71 31 -111c0 -42 -12 -80 -33 -113l-25 25c13 26 21 55 21 86s-8 60 -21 86zM304 256l49 49 +c6 -15 10 -32 10 -49s-4 -35 -10 -50z" /> + <glyph glyph-name="bluetooth_connected" unicode="bluetooth_connected" +d="M405 299l43 -43l-43 -43l-42 43zM317 164l-40 41v-81zM277 388v-81l40 41zM378 348l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM149 256l-42 -43l-43 43l43 43z" /> + <glyph glyph-name="bluetooth_disabled" unicode="bluetooth_disabled" +d="M277 124l40 40l-40 41v-81zM115 427l312 -312l-30 -30l-49 49l-92 -91h-21v162l-98 -98l-30 30l119 119l-141 141zM277 388v-69l-42 43v107h21l122 -121l-65 -65l-30 30l34 35z" /> + <glyph glyph-name="bluetooth_searching" unicode="bluetooth_searching" +d="M275 164l-40 41v-81zM235 388v-81l40 41zM335 348l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM417 369c20 -32 31 -71 31 -111c0 -42 -12 -80 -33 -113l-25 25c13 26 21 55 21 86s-8 60 -21 86zM304 256l49 49 +c6 -15 10 -32 10 -49s-4 -35 -10 -50z" /> + <glyph glyph-name="blur_circular" unicode="blur_circular" +d="M299 235c12 0 21 -10 21 -22s-9 -21 -21 -21s-22 9 -22 21s10 22 22 22zM299 160c6 0 10 -5 10 -11s-4 -10 -10 -10s-11 4 -11 10s5 11 11 11zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213 +s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM363 309c6 0 10 -4 10 -10s-4 -11 -10 -11s-11 5 -11 11s5 10 11 10zM363 224c6 0 10 -5 10 -11s-4 -10 -10 -10s-11 4 -11 10s5 11 11 11zM299 352c-6 0 -11 5 -11 11s5 10 11 10s10 -4 10 -10s-4 -11 -10 -11z +M299 320c12 0 21 -9 21 -21s-9 -22 -21 -22s-22 10 -22 22s10 21 22 21zM213 352c-6 0 -10 5 -10 11s4 10 10 10s11 -4 11 -10s-5 -11 -11 -11zM149 224c6 0 11 -5 11 -11s-5 -10 -11 -10s-10 4 -10 10s4 11 10 11zM213 160c6 0 11 -5 11 -11s-5 -10 -11 -10s-10 4 -10 10 +s4 11 10 11zM149 309c6 0 11 -4 11 -10s-5 -11 -11 -11s-10 5 -10 11s4 10 10 10zM213 235c12 0 22 -10 22 -22s-10 -21 -22 -21s-21 9 -21 21s9 22 21 22zM213 320c12 0 22 -9 22 -21s-10 -22 -22 -22s-21 10 -21 22s9 21 21 21z" /> + <glyph glyph-name="blur_linear" unicode="blur_linear" +d="M277 149c-12 0 -21 10 -21 22s9 21 21 21s22 -9 22 -21s-10 -22 -22 -22zM277 235c-12 0 -21 9 -21 21s9 21 21 21s22 -9 22 -21s-10 -21 -22 -21zM277 320c-12 0 -21 9 -21 21s9 22 21 22s22 -10 22 -22s-10 -21 -22 -21zM363 245c-6 0 -11 5 -11 11s5 11 11 11 +s10 -5 10 -11s-4 -11 -10 -11zM363 331c-6 0 -11 4 -11 10s5 11 11 11s10 -5 10 -11s-4 -10 -10 -10zM64 448h384v-43h-384v43zM363 160c-6 0 -11 5 -11 11s5 10 11 10s10 -4 10 -10s-4 -11 -10 -11zM192 149c-12 0 -21 10 -21 22s9 21 21 21s21 -9 21 -21s-9 -22 -21 -22z +M107 224c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM107 309c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM64 64v43h384v-43h-384zM192 320c-12 0 -21 9 -21 21s9 22 21 22s21 -10 21 -22s-9 -21 -21 -21zM192 235 +c-12 0 -21 9 -21 21s9 21 21 21s21 -9 21 -21s-9 -21 -21 -21zM107 139c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32z" /> + <glyph glyph-name="blur_off" unicode="blur_off" +d="M64 224c6 0 11 -5 11 -11s-5 -10 -11 -10s-11 4 -11 10s5 11 11 11zM128 149c12 0 21 -9 21 -21s-9 -21 -21 -21s-21 9 -21 21s9 21 21 21zM213 75c6 0 11 -5 11 -11s-5 -11 -11 -11s-10 5 -10 11s4 11 10 11zM64 309c6 0 11 -4 11 -10s-5 -11 -11 -11s-11 5 -11 11 +s5 10 11 10zM128 235c12 0 21 -10 21 -22s-9 -21 -21 -21s-21 9 -21 21s9 22 21 22zM448 224c6 0 11 -5 11 -11s-5 -10 -11 -10s-11 4 -11 10s5 11 11 11zM213 149c12 0 22 -9 22 -21s-10 -21 -22 -21s-21 9 -21 21s9 21 21 21zM53 400l27 27l347 -347l-28 -27l-80 81 +c1 -2 1 -4 1 -6c0 -12 -9 -21 -21 -21s-22 9 -22 21s10 21 22 21c2 0 4 0 6 -1l-60 60c-2 -15 -16 -27 -32 -27c-18 0 -32 14 -32 32c0 16 12 30 27 32l-60 60c1 -2 1 -4 1 -6c0 -12 -9 -22 -21 -22s-21 10 -21 22s9 21 21 21l6 -1zM299 75c6 0 10 -5 10 -11s-4 -11 -10 -11 +s-11 5 -11 11s5 11 11 11zM384 363c-12 0 -21 9 -21 21s9 21 21 21s21 -9 21 -21s-9 -21 -21 -21zM384 277c-12 0 -21 10 -21 22s9 21 21 21s21 -9 21 -21s-9 -22 -21 -22zM384 192c-12 0 -21 9 -21 21s9 22 21 22s21 -10 21 -22s-9 -21 -21 -21zM213 363 +c-12 0 -21 9 -21 21s9 21 21 21s22 -9 22 -21s-10 -21 -22 -21zM448 288c-6 0 -11 5 -11 11s5 10 11 10s11 -4 11 -10s-5 -11 -11 -11zM213 437c-6 0 -10 5 -10 11s4 11 10 11s11 -5 11 -11s-5 -11 -11 -11zM299 437c-6 0 -11 5 -11 11s5 11 11 11s10 -5 10 -11 +s-4 -11 -10 -11zM294 267c-14 2 -25 13 -27 27v5c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32h-5zM299 363c-12 0 -22 9 -22 21s10 21 22 21s21 -9 21 -21s-9 -21 -21 -21z" /> + <glyph glyph-name="blur_on" unicode="blur_on" +d="M299 331c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM299 245c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM213 149c12 0 22 -9 22 -21s-10 -21 -22 -21s-21 9 -21 21s9 21 21 21zM213 331c18 0 32 -14 32 -32s-14 -32 -32 -32 +s-32 14 -32 32s14 32 32 32zM299 75c6 0 10 -5 10 -11s-4 -11 -10 -11s-11 5 -11 11s5 11 11 11zM299 149c12 0 21 -9 21 -21s-9 -21 -21 -21s-22 9 -22 21s10 21 22 21zM448 224c6 0 11 -5 11 -11s-5 -10 -11 -10s-11 4 -11 10s5 11 11 11zM384 405c12 0 21 -9 21 -21 +s-9 -21 -21 -21s-21 9 -21 21s9 21 21 21zM384 320c12 0 21 -9 21 -21s-9 -22 -21 -22s-21 10 -21 22s9 21 21 21zM384 149c12 0 21 -9 21 -21s-9 -21 -21 -21s-21 9 -21 21s9 21 21 21zM384 235c12 0 21 -10 21 -22s-9 -21 -21 -21s-21 9 -21 21s9 22 21 22zM213 245 +c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM213 363c-12 0 -21 9 -21 21s9 21 21 21s22 -9 22 -21s-10 -21 -22 -21zM213 437c-6 0 -10 5 -10 11s4 11 10 11s11 -5 11 -11s-5 -11 -11 -11zM213 75c6 0 11 -5 11 -11s-5 -11 -11 -11s-10 5 -10 11 +s4 11 10 11zM64 224c6 0 11 -5 11 -11s-5 -10 -11 -10s-11 4 -11 10s5 11 11 11zM299 437c-6 0 -11 5 -11 11s5 11 11 11s10 -5 10 -11s-4 -11 -10 -11zM299 363c-12 0 -22 9 -22 21s10 21 22 21s21 -9 21 -21s-9 -21 -21 -21zM448 288c-6 0 -11 5 -11 11s5 10 11 10 +s11 -4 11 -10s-5 -11 -11 -11zM128 405c12 0 21 -9 21 -21s-9 -21 -21 -21s-21 9 -21 21s9 21 21 21zM64 309c6 0 11 -4 11 -10s-5 -11 -11 -11s-11 5 -11 11s5 10 11 10zM128 320c12 0 21 -9 21 -21s-9 -22 -21 -22s-21 10 -21 22s9 21 21 21zM128 149c12 0 21 -9 21 -21 +s-9 -21 -21 -21s-21 9 -21 21s9 21 21 21zM128 235c12 0 21 -10 21 -22s-9 -21 -21 -21s-21 9 -21 21s9 22 21 22z" /> + <glyph glyph-name="book" unicode="book" +d="M128 427v-171l53 32l54 -32v171h-107zM384 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v342c0 23 20 42 43 42h256z" /> + <glyph glyph-name="bookmark" unicode="bookmark" +d="M363 448c23 0 42 -20 42 -43v-341l-149 64l-149 -64v341c0 23 19 43 42 43h214z" /> + <glyph glyph-name="bookmark_border" unicode="bookmark_border" +d="M363 128v277h-214v-277l107 47zM363 448c23 0 42 -20 42 -43v-341l-149 64l-149 -64v341c0 23 19 43 42 43h214z" /> + <glyph glyph-name="border_all" unicode="border_all" +d="M405 277v128h-128v-128h128zM405 107v128h-128v-128h128zM235 277v128h-128v-128h128zM235 107v128h-128v-128h128zM64 448h384v-384h-384v384z" /> + <glyph glyph-name="border_bottom" unicode="border_bottom" +d="M107 192v-43h-43v43h43zM64 64v43h384v-43h-384zM107 277v-42h-43v42h43zM405 320v43h43v-43h-43zM405 448h43v-43h-43v43zM107 363v-43h-43v43h43zM405 149v43h43v-43h-43zM405 235v42h43v-42h-43zM363 448v-43h-43v43h43zM277 448v-43h-42v43h42zM363 277v-42h-43v42 +h43zM277 363v-43h-42v43h42zM107 448v-43h-43v43h43zM277 277v-42h-42v42h42zM192 448v-43h-43v43h43zM277 192v-43h-42v43h42zM192 277v-42h-43v42h43z" /> + <glyph glyph-name="border_clear" unicode="border_clear" +d="M320 405v43h43v-43h-43zM320 235v42h43v-42h-43zM320 64v43h43v-43h-43zM235 405v43h42v-43h-42zM405 448h43v-43h-43v43zM235 320v43h42v-43h-42zM405 320v43h43v-43h-43zM405 64v43h43v-43h-43zM405 235v42h43v-42h-43zM405 149v43h43v-43h-43zM235 235v42h42v-42h-42z +M64 405v43h43v-43h-43zM64 320v43h43v-43h-43zM64 235v42h43v-42h-43zM64 149v43h43v-43h-43zM64 64v43h43v-43h-43zM235 64v43h42v-43h-42zM235 149v43h42v-43h-42zM149 64v43h43v-43h-43zM149 235v42h43v-42h-43zM149 405v43h43v-43h-43z" /> + <glyph glyph-name="border_color" unicode="border_color" +d="M0 85h512v-85h-512v85zM442 426l-42 -42l-80 80l42 42c8 8 22 8 30 0l50 -50c8 -8 8 -22 0 -30zM379 363l-214 -214h-80v80l214 214z" /> + <glyph glyph-name="border_horizontal" unicode="border_horizontal" +d="M405 64v43h43v-43h-43zM320 64v43h43v-43h-43zM235 149v43h42v-43h-42zM405 320v43h43v-43h-43zM405 448h43v-43h-43v43zM64 235v42h384v-42h-384zM235 64v43h42v-43h-42zM405 149v43h43v-43h-43zM277 448v-43h-42v43h42zM277 363v-43h-42v43h42zM363 448v-43h-43v43h43z +M192 448v-43h-43v43h43zM107 448v-43h-43v43h43zM149 64v43h43v-43h-43zM64 149v43h43v-43h-43zM107 363v-43h-43v43h43zM64 64v43h43v-43h-43z" /> + <glyph glyph-name="border_inner" unicode="border_inner" +d="M405 149v43h43v-43h-43zM405 64v43h43v-43h-43zM277 448v-171h171v-42h-171v-171h-42v171h-171v42h171v171h42zM320 64v43h43v-43h-43zM405 448h43v-43h-43v43zM405 320v43h43v-43h-43zM363 448v-43h-43v43h43zM107 448v-43h-43v43h43zM192 448v-43h-43v43h43zM64 149v43 +h43v-43h-43zM107 363v-43h-43v43h43zM149 64v43h43v-43h-43zM64 64v43h43v-43h-43z" /> + <glyph glyph-name="border_left" unicode="border_left" +d="M320 405v43h43v-43h-43zM320 235v42h43v-42h-43zM405 64v43h43v-43h-43zM405 235v42h43v-42h-43zM405 448h43v-43h-43v43zM405 149v43h43v-43h-43zM320 64v43h43v-43h-43zM405 320v43h43v-43h-43zM64 64v384h43v-384h-43zM149 235v42h43v-42h-43zM149 405v43h43v-43h-43z +M149 64v43h43v-43h-43zM235 235v42h42v-42h-42zM235 320v43h42v-43h-42zM235 405v43h42v-43h-42zM235 149v43h42v-43h-42zM235 64v43h42v-43h-42z" /> + <glyph glyph-name="border_outer" unicode="border_outer" +d="M192 277v-42h-43v42h43zM277 192v-43h-42v43h42zM405 107v298h-298v-298h298zM64 448h384v-384h-384v384zM363 277v-42h-43v42h43zM277 277v-42h-42v42h42zM277 363v-43h-42v43h42z" /> + <glyph glyph-name="border_right" unicode="border_right" +d="M235 320v43h42v-43h-42zM235 405v43h42v-43h-42zM235 235v42h42v-42h-42zM320 405v43h43v-43h-43zM320 64v43h43v-43h-43zM405 448h43v-384h-43v384zM320 235v42h43v-42h-43zM235 149v43h42v-43h-42zM64 320v43h43v-43h-43zM64 149v43h43v-43h-43zM64 235v42h43v-42h-43z +M235 64v43h42v-43h-42zM64 64v43h43v-43h-43zM149 235v42h43v-42h-43zM149 405v43h43v-43h-43zM64 405v43h43v-43h-43zM149 64v43h43v-43h-43z" /> + <glyph glyph-name="border_style" unicode="border_style" +d="M405 320v43h43v-43h-43zM64 448h384v-43h-341v-341h-43v384zM405 235v42h43v-42h-43zM405 149v43h43v-43h-43zM235 64v43h42v-43h-42zM149 64v43h43v-43h-43zM405 64v43h43v-43h-43zM320 64v43h43v-43h-43z" /> + <glyph glyph-name="border_top" unicode="border_top" +d="M320 235v42h43v-42h-43zM405 64v43h43v-43h-43zM235 320v43h42v-43h-42zM320 64v43h43v-43h-43zM405 149v43h43v-43h-43zM64 448h384v-43h-384v43zM405 235v42h43v-42h-43zM405 320v43h43v-43h-43zM235 149v43h42v-43h-42zM64 320v43h43v-43h-43zM64 235v42h43v-42h-43z +M64 64v43h43v-43h-43zM64 149v43h43v-43h-43zM235 64v43h42v-43h-42zM235 235v42h42v-42h-42zM149 235v42h43v-42h-43zM149 64v43h43v-43h-43z" /> + <glyph glyph-name="border_vertical" unicode="border_vertical" +d="M320 235v42h43v-42h-43zM320 64v43h43v-43h-43zM320 405v43h43v-43h-43zM405 320v43h43v-43h-43zM405 448h43v-43h-43v43zM405 235v42h43v-42h-43zM405 64v43h43v-43h-43zM235 64v384h42v-384h-42zM405 149v43h43v-43h-43zM149 405v43h43v-43h-43zM64 149v43h43v-43h-43z +M64 64v43h43v-43h-43zM64 235v42h43v-42h-43zM149 235v42h43v-42h-43zM149 64v43h43v-43h-43zM64 405v43h43v-43h-43zM64 320v43h43v-43h-43z" /> + <glyph glyph-name="branding_watermark" unicode="branding_watermark" +d="M448 107v128h-192v-128h192zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="brightness_1" unicode="brightness_1" +d="M43 256c0 118 95 213 213 213s213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213z" /> + <glyph glyph-name="brightness_2" unicode="brightness_2" +d="M213 469c118 0 214 -95 214 -213s-96 -213 -214 -213c-39 0 -75 10 -106 28c64 37 106 106 106 185s-42 148 -106 185c31 18 67 28 106 28z" /> + <glyph glyph-name="brightness_3" unicode="brightness_3" +d="M192 469c118 0 213 -95 213 -213s-95 -213 -213 -213c-22 0 -44 3 -64 9c87 27 149 108 149 204s-62 177 -149 204c20 6 42 9 64 9z" /> + <glyph glyph-name="brightness_4" unicode="brightness_4" +d="M256 128c71 0 128 57 128 128s-57 128 -128 128c-19 0 -37 -5 -53 -12c44 -20 74 -64 74 -116s-30 -96 -74 -116c16 -7 34 -12 53 -12zM427 327l70 -71l-70 -71v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100v-100z" /> + <glyph glyph-name="brightness_5" unicode="brightness_5" +d="M256 128c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128s57 -128 128 -128zM427 185v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100v-100l70 -71z" /> + <glyph glyph-name="brightness_6" unicode="brightness_6" +d="M256 128c71 0 128 57 128 128s-57 128 -128 128v-256zM427 185v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100v-100l70 -71z" /> + <glyph glyph-name="brightness_7" unicode="brightness_7" +d="M256 341c47 0 85 -38 85 -85s-38 -85 -85 -85s-85 38 -85 85s38 85 85 85zM256 128c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128s57 -128 128 -128zM427 327l70 -71l-70 -71v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100 +v-100z" /> + <glyph glyph-name="brightness_auto" unicode="brightness_auto" +d="M305 171h41l-69 192h-42l-69 -192h41l15 42h68zM427 327l70 -71l-70 -71v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100v-100zM231 242l25 78l25 -78h-50z" /> + <glyph glyph-name="brightness_high" unicode="brightness_high" +d="M256 341c47 0 85 -38 85 -85s-38 -85 -85 -85s-85 38 -85 85s38 85 85 85zM256 128c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128s57 -128 128 -128zM427 327l70 -71l-70 -71v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100 +v-100z" /> + <glyph glyph-name="brightness_low" unicode="brightness_low" +d="M256 128c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128s57 -128 128 -128zM427 185v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100v-100l70 -71z" /> + <glyph glyph-name="brightness_medium" unicode="brightness_medium" +d="M256 128c71 0 128 57 128 128s-57 128 -128 128v-256zM427 185v-100h-100l-71 -70l-71 70h-100v100l-70 71l70 71v100h100l71 70l71 -70h100v-100l70 -71z" /> + <glyph glyph-name="broken_image" unicode="broken_image" +d="M384 268l64 -64v-97c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v140l64 -64l85 86l86 -86zM448 405v-140l-64 64l-85 -86l-86 86l-85 -86l-64 65v97c0 23 20 43 43 43h298c23 0 43 -20 43 -43z" /> + <glyph glyph-name="brush" unicode="brush" +d="M442 413c8 -8 8 -22 0 -30l-191 -191l-59 59l191 191c8 8 22 8 30 0zM149 213c35 0 64 -29 64 -64c0 -47 -38 -85 -85 -85c-32 0 -65 17 -85 43c18 0 42 14 42 42c0 35 29 64 64 64z" /> + <glyph glyph-name="bubble_chart" unicode="bubble_chart" +d="M222 324c0 57 45 103 102 103s103 -46 103 -103s-46 -102 -103 -102s-102 45 -102 102zM273 128c0 24 19 43 43 43s42 -19 42 -43s-18 -43 -42 -43s-43 19 -43 43zM85 205c0 38 31 68 69 68s68 -30 68 -68s-30 -68 -68 -68s-69 30 -69 68z" /> + <glyph glyph-name="bug_report" unicode="bug_report" +d="M299 256v43h-86v-43h86zM299 171v42h-86v-42h86zM427 341v-42h-45c1 -7 2 -15 2 -22v-21h43v-43h-43v-21c0 -7 -1 -14 -2 -21h45v-43h-60c-22 -38 -64 -64 -111 -64s-89 26 -111 64h-60v43h45c-1 7 -2 14 -2 21v21h-43v43h43v21c0 7 1 15 2 22h-45v42h60 +c10 17 23 31 39 42l-35 35l30 30l47 -46c10 2 20 3 30 3s20 -1 30 -3l47 46l30 -30l-35 -35c16 -11 29 -25 39 -42h60z" /> + <glyph glyph-name="build" unicode="build" +d="M484 107c9 -6 9 -21 -2 -30l-49 -49c-9 -9 -21 -9 -30 0l-194 194c-49 -19 -106 -9 -147 32c-43 43 -54 107 -28 158l94 -92l64 64l-92 92c51 23 115 15 158 -28c41 -41 51 -98 32 -147z" /> + <glyph glyph-name="burst_mode" unicode="burst_mode" +d="M235 149h213l-68 90l-54 -68l-38 46zM469 405c12 0 22 -9 22 -21v-256c0 -12 -10 -21 -22 -21h-256c-12 0 -21 9 -21 21v256c0 12 9 21 21 21h256zM107 405h42v-298h-42v298zM21 405h43v-298h-43v298z" /> + <glyph glyph-name="business" unicode="business" +d="M384 192v-43h-43v43h43zM384 277v-42h-43v42h43zM427 107v213h-171v-43h43v-42h-43v-43h43v-43h-43v-42h171zM213 363v42h-42v-42h42zM213 277v43h-42v-43h42zM213 192v43h-42v-43h42zM213 107v42h-42v-42h42zM128 363v42h-43v-42h43zM128 277v43h-43v-43h43zM128 192v43 +h-43v-43h43zM128 107v42h-43v-42h43zM256 363h213v-299h-426v384h213v-85z" /> + <glyph glyph-name="business_center" unicode="business_center" +d="M299 363v42h-86v-42h86zM427 363c23 0 42 -20 42 -43v-64c0 -23 -19 -43 -42 -43h-128v43h-86v-43h-128c-24 0 -42 19 -42 43v64c0 23 19 43 42 43h85v42l43 43h85l43 -43v-42h86zM213 171h86v21h149v-85c0 -24 -19 -43 -43 -43h-298c-24 0 -43 19 -43 43v85h149v-21z +" /> + <glyph glyph-name="cached" unicode="cached" +d="M128 256h64l-85 -85l-86 85h64c0 94 77 171 171 171c33 0 65 -10 91 -27l-31 -31c-18 10 -38 15 -60 15c-71 0 -128 -57 -128 -128zM405 341l86 -85h-64c0 -94 -77 -171 -171 -171c-33 0 -65 10 -91 27l31 31c18 -10 38 -15 60 -15c71 0 128 57 128 128h-64z" /> + <glyph glyph-name="cake" unicode="cake" +d="M384 320c35 0 64 -29 64 -64v-33c0 -23 -19 -42 -42 -42c-11 0 -21 4 -29 12l-46 46l-46 -46c-16 -16 -43 -16 -59 0l-45 46l-46 -46c-8 -8 -18 -12 -29 -12c-23 0 -42 19 -42 42v33c0 35 29 64 64 64h107v43h42v-43h107zM354 171c14 -14 32 -22 52 -22c16 0 30 5 42 13 +v-98c0 -12 -9 -21 -21 -21h-342c-12 0 -21 9 -21 21v98c12 -8 26 -13 42 -13c20 0 38 8 52 22l23 23l23 -23c28 -28 76 -28 104 0l23 23zM256 384c-23 0 -43 20 -43 43c0 8 3 16 7 22l36 63l36 -63c4 -6 7 -14 7 -22c0 -23 -19 -43 -43 -43z" /> + <glyph glyph-name="call" unicode="call" +d="M141 282c31 -60 81 -110 141 -141l47 47c6 6 15 8 22 5c24 -8 50 -12 76 -12c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22z" /> + <glyph glyph-name="call_end" unicode="call_end" +d="M256 320c-34 0 -67 -5 -98 -15v-66c0 -8 -5 -17 -12 -20c-21 -10 -40 -23 -57 -39c-4 -4 -9 -6 -15 -6s-11 2 -15 6l-53 53c-4 4 -6 9 -6 15s2 11 6 15c65 62 153 100 250 100s185 -38 250 -100c4 -4 6 -9 6 -15s-2 -11 -6 -15l-53 -53c-4 -4 -9 -6 -15 -6s-11 2 -15 6 +c-17 16 -36 29 -57 39c-7 3 -12 10 -12 19v66c-31 10 -64 16 -98 16z" /> + <glyph glyph-name="call_made" unicode="call_made" +d="M192 405h213v-213h-42v141l-248 -248l-30 30l248 248h-141v42z" /> + <glyph glyph-name="call_merge" unicode="call_merge" +d="M160 341l96 96l96 -96h-75v-136l-128 -128l-30 30l116 115v119h-75zM363 77l-73 72l30 30l73 -72z" /> + <glyph glyph-name="call_missed" unicode="call_missed" +d="M418 363l30 -30l-192 -192l-149 149v-98h-43v171h171v-43h-98l119 -119z" /> + <glyph glyph-name="call_missed_outgoing" unicode="call_missed_outgoing" +d="M64 333l30 30l162 -162l119 119h-98v43h171v-171h-43v98l-149 -149z" /> + <glyph glyph-name="call_received" unicode="call_received" +d="M427 397l-248 -248h141v-42h-213v213h42v-141l248 248z" /> + <glyph glyph-name="call_split" unicode="call_split" +d="M213 427l-49 -49l113 -113v-180h-42v162l-101 101l-49 -49v128h128zM299 427h128v-128l-49 49l-62 -62l-30 30l62 62z" /> + <glyph glyph-name="call_to_action" unicode="call_to_action" +d="M448 107v64h-384v-64h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="camera" unicode="camera" +d="M210 48c34.3543 59.3123 68.2469 119.086 103 178l78 -135c-37 -30 -84 -48 -135 -48c-16 0 -31 2 -46 5zM52 192h207l-79 -135c-61 23 -108 73 -128 135zM99 400c35.9996 -62.3337 71.7933 -124.873 108 -187h-160c-3 14 -4 28 -4 43c0 56 21 106 56 144zM465 299 +c3 -14 4 -28 4 -43c0 -56 -21 -106 -56 -144l-102 176l-6 11h160zM460 320h-207l79 135c61 -23 108 -73 128 -135zM201 288l-2 -2l-78 135c37 30 84 48 135 48c16 0 31 -2 46 -5z" /> + <glyph glyph-name="camera_alt" unicode="camera_alt" +d="M256 149c59 0 107 48 107 107s-48 107 -107 107s-107 -48 -107 -107s48 -107 107 -107zM192 469h128l39 -42h68c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h68zM188 256c0 38 30 68 68 68s68 -30 68 -68 +s-30 -68 -68 -68s-68 30 -68 68z" /> + <glyph glyph-name="camera_enhance" unicode="camera_enhance" +d="M256 149l-27 59l-58 27l58 26l27 59l27 -59l58 -26l-58 -27zM256 128c59 0 107 48 107 107s-48 106 -107 106s-107 -47 -107 -106s48 -107 107 -107zM192 448h128l39 -43h68c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256 +c0 23 19 42 42 42h68z" /> + <glyph glyph-name="camera_front" unicode="camera_front" +d="M149 469v-224c0 36 71 54 107 54s107 -18 107 -54v224h-214zM363 512c23 0 42 -20 42 -43v-298c0 -23 -19 -43 -42 -43h-150l64 -64l-64 -64v43h-106v42h106v43h-64c-23 0 -42 20 -42 43v298c0 23 19 43 42 43h214zM256 341c-23 0 -42 20 -42 43s19 43 42 43 +s43 -20 43 -43s-20 -43 -43 -43zM299 85h106v-42h-106v42z" /> + <glyph glyph-name="camera_rear" unicode="camera_rear" +d="M256 384c23 0 42 20 42 43s-19 42 -42 42s-43 -19 -43 -42s19 -43 43 -43zM363 512c23 0 42 -20 42 -43v-298c0 -23 -19 -43 -42 -43h-150l64 -64l-64 -64v43h-106v42h106v43h-64c-23 0 -42 20 -42 43v298c0 23 19 43 42 43h214zM299 85h106v-42h-106v42z" /> + <glyph glyph-name="camera_roll" unicode="camera_roll" +d="M427 320v43h-43v-43h43zM427 128v43h-43v-43h43zM341 320v43h-42v-43h42zM341 128v43h-42v-43h42zM256 320v43h-43v-43h43zM256 128v43h-43v-43h43zM299 405h170v-320h-170c0 -23 -20 -42 -43 -42h-171c-23 0 -42 19 -42 42v320c0 23 19 43 42 43h22v21c0 12 9 22 21 22 +h85c12 0 22 -10 22 -22v-21h21c23 0 43 -20 43 -43z" /> + <glyph glyph-name="cancel" unicode="cancel" +d="M363 179l-77 77l77 77l-30 30l-77 -77l-77 77l-30 -30l77 -77l-77 -77l30 -30l77 77l77 -77zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="card_giftcard" unicode="card_giftcard" +d="M427 213v128h-109l45 -60l-35 -25c-24.0378 32.6288 -48.3187 65.0147 -72 98c-23.6829 -32.9837 -47.9614 -65.3719 -72 -98l-35 25l45 60h-109v-128h342zM427 107v42h-342v-42h342zM192 427c-12 0 -21 -10 -21 -22s9 -21 21 -21s21 9 21 21s-9 22 -21 22zM320 427 +c-12 0 -21 -10 -21 -22s9 -21 21 -21s21 9 21 21s-9 22 -21 22zM427 384c24 0 42 -19 42 -43v-234c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v234c0 24 18 43 42 43h47c-2 7 -4 14 -4 21c0 35 29 64 64 64c22 0 41 -11 53 -28l11 -15l11 15c12 17 31 28 53 28 +c35 0 64 -29 64 -64c0 -7 -2 -14 -4 -21h47z" /> + <glyph glyph-name="card_membership" unicode="card_membership" +d="M427 299v128h-342v-128h342zM427 192v43h-342v-43h342zM427 469c24 0 42 -18 42 -42v-235c0 -24 -18 -43 -42 -43h-86v-106l-85 42l-85 -42v106h-86c-24 0 -42 19 -42 43v235c0 24 18 42 42 42h342z" /> + <glyph glyph-name="card_travel" unicode="card_travel" +d="M427 213v128h-64v-42h-43v42h-128v-42h-43v42h-64v-128h342zM427 107v42h-342v-42h342zM192 427v-43h128v43h-128zM427 384c24 0 42 -19 42 -43v-234c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v234c0 24 18 43 42 43h64v43c0 24 19 42 43 42h128 +c24 0 43 -18 43 -42v-43h64z" /> + <glyph glyph-name="casino" unicode="casino" +d="M352 320c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM352 128c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM256 224c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM160 320c18 0 32 14 32 32s-14 32 -32 32 +s-32 -14 -32 -32s14 -32 32 -32zM160 128c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="cast" unicode="cast" +d="M21 299c129 0 235 -105 235 -235h-43c0 106 -86 192 -192 192v43zM21 213c83 0 150 -66 150 -149h-43c0 59 -48 107 -107 107v42zM21 128c35 0 64 -29 64 -64h-64v64zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-149v43h149v298h-384v-64h-43v64 +c0 23 20 43 43 43h384z" /> + <glyph glyph-name="cast_connected" unicode="cast_connected" +d="M448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-149v43h149v298h-384v-64h-43v64c0 23 20 43 43 43h384zM21 299c129 0 235 -105 235 -235h-43c0 106 -86 192 -192 192v43zM405 363v-214h-120c-27 84 -94 152 -178 179v35h298zM21 213c83 0 150 -66 150 -149 +h-43c0 59 -48 107 -107 107v42zM21 128c35 0 64 -29 64 -64h-64v64z" /> + <glyph glyph-name="center_focus_strong" unicode="center_focus_strong" +d="M405 107v85h43v-85c0 -23 -20 -43 -43 -43h-85v43h85zM405 448c23 0 43 -20 43 -43v-85h-43v85h-85v43h85zM107 405v-85h-43v85c0 23 20 43 43 43h85v-43h-85zM107 192v-85h85v-43h-85c-23 0 -43 20 -43 43v85h43zM256 341c47 0 85 -38 85 -85s-38 -85 -85 -85 +s-85 38 -85 85s38 85 85 85z" /> + <glyph glyph-name="center_focus_weak" unicode="center_focus_weak" +d="M256 213c23 0 43 20 43 43s-20 43 -43 43s-43 -20 -43 -43s20 -43 43 -43zM256 341c47 0 85 -38 85 -85s-38 -85 -85 -85s-85 38 -85 85s38 85 85 85zM405 107v85h43v-85c0 -23 -20 -43 -43 -43h-85v43h85zM405 448c23 0 43 -20 43 -43v-85h-43v85h-85v43h85zM107 405 +v-85h-43v85c0 23 20 43 43 43h85v-43h-85zM107 192v-85h85v-43h-85c-23 0 -43 20 -43 43v85h43z" /> + <glyph glyph-name="change_history" unicode="change_history" +d="M256 427l213 -342h-426zM256 346l-136 -218h272z" /> + <glyph glyph-name="chat" unicode="chat" +d="M384 341v43h-256v-43h256zM299 213v43h-171v-43h171zM128 320v-43h256v43h-256zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="chat_bubble" unicode="chat_bubble" +d="M427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="chat_bubble_outline" unicode="chat_bubble_outline" +d="M427 171v256h-342v-299l43 43h299zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="check" unicode="check" +d="M192 167l226 226l30 -30l-256 -256l-119 119l30 30z" /> + <glyph glyph-name="check_box" unicode="check_box" +d="M213 149l192 192l-30 31l-162 -162l-76 76l-30 -30zM405 448c24 0 43 -20 43 -43v-298c0 -23 -19 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h298z" /> + <glyph glyph-name="check_box_outline_blank" unicode="check_box_outline_blank" +d="M405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM405 405h-298v-298h298v298z" /> + <glyph glyph-name="check_circle" unicode="check_circle" +d="M213 149l192 192l-30 31l-162 -162l-76 76l-30 -30zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="chevron_left" unicode="chevron_left" +d="M329 354l-98 -98l98 -98l-30 -30l-128 128l128 128z" /> + <glyph glyph-name="chevron_right" unicode="chevron_right" +d="M213 384l128 -128l-128 -128l-30 30l98 98l-98 98z" /> + <glyph glyph-name="child_care" unicode="child_care" +d="M160 213h192c-16 -38 -53 -64 -96 -64s-80 26 -96 64zM256 107c68.0018 0 125.232 44.8128 143 107c2 0 4 -1 6 -1c23 0 43 20 43 43s-20 43 -43 43c-2 0 -4 -1 -6 -1c-17.7643 62.1749 -74.9972 107 -143 107c-68.0018 0 -125.232 -44.8128 -143 -107c-2 0 -4 1 -6 1 +c-23 0 -43 -20 -43 -43s20 -43 43 -43c2 0 4 1 6 1c17.7643 -62.1749 74.9972 -107 143 -107zM489 242c-5 -32 -28 -59 -59 -68c-28.2678 -59.1055 -94.8338 -110 -174 -110c-78.8834 0 -145.522 50.0487 -173 110c-31 9 -55 36 -60 68c-1 4 -2 9 -2 14s1 10 2 14 +c5 32 29 59 60 68c11 24 26 45 46 62c34 30 78 48 127 48c80.292 0 145.109 -49.147 173 -110c31 -9 55 -36 60 -68c1 -4 2 -9 2 -14s-1 -10 -2 -14zM176 288c0 15 12 27 27 27s26 -12 26 -27s-11 -27 -26 -27s-27 12 -27 27zM283 288c0 15 11 27 26 27s27 -12 27 -27 +s-12 -27 -27 -27s-26 12 -26 27z" /> + <glyph glyph-name="child_friendly" unicode="child_friendly" +d="M363 85c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM171 85c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM412 173c15 -14 25 -34 25 -56c0 -41 -33 -74 -74 -74c-38 0 -69 28 -74 64h-45c-5 -36 -35 -64 -73 -64 +c-41 0 -75 33 -75 74c0 28 16 53 39 66c-5 7 -45 94 -45 94h-47v43h74l20 -43h311c0 -39 -14 -75 -36 -104zM277 469c94 0 171 -76 171 -170h-171v170z" /> + <glyph glyph-name="chrome_reader_mode" unicode="chrome_reader_mode" +d="M448 107v277h-192v-277h192zM448 427c23 0 43 -20 43 -43v-277c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v277c0 23 20 43 43 43h384zM277 203h150v-32h-150v32zM277 309h150v-32h-150v32zM277 256h150v-32h-150v32z" /> + <glyph glyph-name="class" unicode="class" +d="M128 427v-171l53 32l54 -32v171h-107zM384 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v342c0 23 20 42 43 42h256z" /> + <glyph glyph-name="clear" unicode="clear" +d="M405 375l-119 -119l119 -119l-30 -30l-119 119l-119 -119l-30 30l119 119l-119 119l30 30l119 -119l119 119z" /> + <glyph glyph-name="clear_all" unicode="clear_all" +d="M149 363h299v-43h-299v43zM64 149v43h299v-43h-299zM107 235v42h298v-42h-298z" /> + <glyph glyph-name="close" unicode="close" +d="M405 375l-119 -119l119 -119l-30 -30l-119 119l-119 -119l-30 30l119 119l-119 119l30 30l119 -119l119 119z" /> + <glyph glyph-name="closed_caption" unicode="closed_caption" +d="M384 277v22c0 12 -9 21 -21 21h-64c-12 0 -22 -9 -22 -21v-86c0 -12 10 -21 22 -21h64c12 0 21 9 21 21v22h-32v-11h-43v64h43v-11h32zM235 277v22c0 12 -10 21 -22 21h-64c-12 0 -21 -9 -21 -21v-86c0 -12 9 -21 21 -21h64c12 0 22 9 22 21v22h-32v-11h-43v64h43v-11h32 +zM405 427c23 0 43 -20 43 -43v-256c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v256c0 23 19 43 43 43h298z" /> + <glyph glyph-name="cloud" unicode="cloud" +d="M413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="cloud_circle" unicode="cloud_circle" +d="M352 171c29 0 53 24 53 53s-24 53 -53 53h-11c0 47 -38 86 -85 86c-40 0 -73 -28 -82 -65l-3 1c-35 0 -64 -29 -64 -64s29 -64 64 -64h181zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="cloud_done" unicode="cloud_done" +d="M213 149l141 141l-30 30l-111 -110l-44 44l-30 -30zM413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="cloud_download" unicode="cloud_download" +d="M363 235h-64v85h-86v-85h-64l107 -107zM413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="cloud_off" unicode="cloud_off" +d="M165 299h-37c-47 0 -85 -39 -85 -86s38 -85 85 -85h208zM64 400l27 27l357 -357l-27 -27l-43 42h-250c-71 0 -128 57 -128 128c0 69 55 125 123 128zM413 298c55 -4 99 -50 99 -106c0 -36 -18 -68 -45 -87l-31 31c20 11 33 32 33 56c0 35 -29 64 -64 64h-32v11 +c0 65 -52 117 -117 117c-20 0 -38 -4 -54 -13l-32 31c25 16 54 25 86 25c78 0 142 -55 157 -129z" /> + <glyph glyph-name="cloud_queue" unicode="cloud_queue" +d="M405 128c35 0 64 29 64 64s-29 64 -64 64h-32v11c0 65 -52 117 -117 117c-54 0 -99 -36 -113 -85h-15c-47 0 -85 -39 -85 -86s38 -85 85 -85h277zM413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127 +c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="cloud_upload" unicode="cloud_upload" +d="M299 235h64l-107 106l-107 -106h64v-86h86v86zM413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="code" unicode="code" +d="M311 158l99 98l-99 98l30 30l128 -128l-128 -128zM201 158l-30 -30l-128 128l128 128l30 -30l-99 -98z" /> + <glyph glyph-name="collections" unicode="collections" +d="M43 384h42v-299h299v-42h-299c-23 0 -42 19 -42 42v299zM235 256l-64 -85h256l-86 106l-63 -79zM469 171c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256c23 0 42 -19 42 -42v-256z" /> + <glyph glyph-name="collections_bookmark" unicode="collections_bookmark" +d="M427 256v171h-107v-171l53 32zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42z" /> + <glyph glyph-name="color_lens" unicode="color_lens" +d="M373 256c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM309 341c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM203 341c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 256c18 0 32 14 32 32s-14 32 -32 32 +s-32 -14 -32 -32s14 -32 32 -32zM256 448c106 0 192 -77 192 -171c0 -59 -48 -106 -107 -106h-37c-18 0 -32 -14 -32 -32c0 -8 3 -15 8 -21s8 -14 8 -22c0 -18 -14 -32 -32 -32c-106 0 -192 86 -192 192s86 192 192 192z" /> + <glyph glyph-name="colorize" unicode="colorize" +d="M148 107l172 172l-41 41l-172 -172zM442 392c8 -8 9 -21 0 -30l-67 -67l41 -41l-30 -30l-30 30l-191 -190h-101v101l190 191l-30 30l30 30l41 -41l67 67c8 8 22 8 30 0z" /> + <glyph glyph-name="comment" unicode="comment" +d="M384 341v43h-256v-43h256zM384 277v43h-256v-43h256zM384 213v43h-256v-43h256zM469 427v-384l-85 85h-299c-23 0 -42 20 -42 43v256c0 23 19 42 42 42h342c23 0 42 -19 42 -42z" /> + <glyph glyph-name="compare" unicode="compare" +d="M405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-106v192l106 -128v277h-106v43h106zM213 128v128l-106 -128h106zM213 448v43h43v-470h-43v43h-106c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h106z" /> + <glyph glyph-name="compare_arrows" unicode="compare_arrows" +d="M320 235l-85 85l85 85v-64h149v-42h-149v-64zM192 213v64l85 -85l-85 -85v64h-149v42h149z" /> + <glyph glyph-name="computer" unicode="computer" +d="M85 384v-213h342v213h-342zM427 128h85v-43h-512v43h85c-23 0 -42 20 -42 43v213c0 23 19 43 42 43h342c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43z" /> + <glyph glyph-name="confirmation_number" unicode="confirmation_number" +d="M277 331v42h-42v-42h42zM277 235v42h-42v-42h42zM277 139v42h-42v-42h42zM469 299c-23 0 -42 -20 -42 -43s19 -43 42 -43v-85c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v85c24 0 42 20 42 43s-19 43 -42 43v85c0 24 19 43 42 43h342c23 0 42 -19 42 -43v-85z" /> + <glyph glyph-name="contact_mail" unicode="contact_mail" +d="M469 256v128h-170v-128h170zM299 128v21c0 43 -85 66 -128 66s-128 -23 -128 -66v-21h256zM171 384c-35 0 -64 -29 -64 -64s29 -64 64 -64s64 29 64 64s-29 64 -64 64zM469 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-426c-23 0 -43 20 -43 43v298 +c0 23 20 43 43 43h426zM448 341l-64 -42l-64 42v22l64 -43l64 43v-22z" /> + <glyph glyph-name="contact_phone" unicode="contact_phone" +d="M381 213c-5 13 -8 28 -8 43s3 30 8 43h35l32 42l-42 43c-28 -21 -49 -50 -59 -85c-4 -14 -6 -28 -6 -43s2 -29 6 -43c10 -34 31 -64 59 -85l42 43l-32 42h-35zM299 128v21c0 43 -85 66 -128 66s-128 -23 -128 -66v-21h256zM171 384c-35 0 -64 -29 -64 -64s29 -64 64 -64 +s64 29 64 64s-29 64 -64 64zM469 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-426c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h426z" /> + <glyph glyph-name="contacts" unicode="contacts" +d="M363 149v32c0 36 -71 54 -107 54s-107 -18 -107 -54v-32h214zM256 368c-26 0 -48 -22 -48 -48s22 -48 48 -48s48 22 48 48s-22 48 -48 48zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342zM85 0v43h342v-43 +h-342zM427 512v-43h-342v43h342z" /> + <glyph glyph-name="content_copy" unicode="content_copy" +d="M405 64v299h-234v-299h234zM405 405c23 0 43 -19 43 -42v-299c0 -23 -20 -43 -43 -43h-234c-23 0 -43 20 -43 43v299c0 23 20 42 43 42h234zM341 491v-43h-256v-299h-42v299c0 23 19 43 42 43h256z" /> + <glyph glyph-name="content_cut" unicode="content_cut" +d="M405 448h64v-21l-149 -150l-43 43zM256 245c6 0 11 5 11 11s-5 11 -11 11s-11 -5 -11 -11s5 -11 11 -11zM128 85c23 0 43 19 43 43s-20 43 -43 43s-43 -19 -43 -43s20 -43 43 -43zM128 341c23 0 43 19 43 43s-20 43 -43 43s-43 -19 -43 -43s20 -43 43 -43zM206 349 +l263 -264v-21h-64l-149 149l-50 -50c5 -11 7 -22 7 -35c0 -47 -38 -85 -85 -85s-85 38 -85 85s38 85 85 85c13 0 24 -2 35 -7l50 50l-50 50c-11 -5 -22 -7 -35 -7c-47 0 -85 38 -85 85s38 85 85 85s85 -38 85 -85c0 -13 -2 -24 -7 -35z" /> + <glyph glyph-name="content_paste" unicode="content_paste" +d="M405 85v342h-42v-64h-214v64h-42v-342h298zM256 469c-12 0 -21 -9 -21 -21s9 -21 21 -21s21 9 21 21s-9 21 -21 21zM405 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-298c-23 0 -43 19 -43 42v342c0 23 20 42 43 42h89c9 25 32 43 60 43s51 -18 60 -43h89z" /> + <glyph glyph-name="control_point" unicode="control_point" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM277 363v-86h86v-42h-86v-86h-42v86h-86v42h86v86h42z" /> + <glyph glyph-name="control_point_duplicate" unicode="control_point_duplicate" +d="M320 107c82 0 149 67 149 149s-67 149 -149 149s-149 -67 -149 -149s67 -149 149 -149zM320 448c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM43 256c0 -60 34 -111 85 -135v-46c-74 26 -128 98 -128 181s54 155 128 181v-46 +c-51 -24 -85 -75 -85 -135zM341 341v-64h64v-42h-64v-64h-42v64h-64v42h64v64h42z" /> + <glyph glyph-name="copyright" unicode="copyright" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM253 317c-30.7612 0 -40 -27.2286 -40 -58v-6c0 -30.7691 9.25381 -58 40 -58 +c18.7788 0 35 11.4624 35 30h38c0 -19.5209 -10.5691 -34.2021 -22 -44c-12.8931 -11.0512 -27.9049 -18 -51 -18c-54.5845 0 -82 36.0734 -82 90v6c0 25.8562 7.26023 49.4403 20 64c13.1991 15.0847 34.3422 27 62 27c22.1368 0 40.6281 -7.62806 52 -19 +c11.0024 -11.0024 21 -27.9871 21 -49h-38c0 5 -1 9 -3 13s-4 9 -7 12c-5.41728 5.41728 -14.6761 10 -25 10z" /> + <glyph glyph-name="create" unicode="create" +d="M442 362l-39 -39l-80 80l39 39c8 8 22 8 30 0l50 -50c8 -8 8 -22 0 -30zM64 144l236 236l80 -80l-236 -236h-80v80z" /> + <glyph glyph-name="create_new_folder" unicode="create_new_folder" +d="M405 213v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64zM427 384c24 0 42 -19 42 -43v-213c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v256c0 24 18 43 42 43h128l43 -43h171z" /> + <glyph glyph-name="credit_card" unicode="credit_card" +d="M427 341v43h-342v-43h342zM427 128v128h-342v-128h342zM427 427c24 0 42 -19 42 -43v-256c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v256c0 24 18 43 42 43h342z" /> + <glyph glyph-name="crop" unicode="crop" +d="M149 149h342v-42h-86v-86h-42v86h-214c-23 0 -42 19 -42 42v214h-86v42h86v86h42v-342zM363 192v171h-171v42h171c23 0 42 -19 42 -42v-171h-42z" /> + <glyph glyph-name="crop_16_9" unicode="crop_16_9" +d="M405 171v170h-298v-170h298zM405 384c23 0 43 -20 43 -43v-170c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v170c0 23 20 43 43 43h298z" /> + <glyph glyph-name="crop_3_2" unicode="crop_3_2" +d="M405 128v256h-298v-256h298zM405 427c23 0 43 -20 43 -43v-256c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v256c0 23 20 43 43 43h298z" /> + <glyph glyph-name="crop_5_4" unicode="crop_5_4" +d="M405 149v214h-298v-214h298zM405 405c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-298c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h298z" /> + <glyph glyph-name="crop_7_5" unicode="crop_7_5" +d="M405 192v128h-298v-128h298zM405 363c23 0 43 -20 43 -43v-128c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v128c0 23 20 43 43 43h298z" /> + <glyph glyph-name="crop_din" unicode="crop_din" +d="M405 107v298h-298v-298h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="crop_free" unicode="crop_free" +d="M405 448c23 0 43 -20 43 -43v-85h-43v85h-85v43h85zM405 107v85h43v-85c0 -23 -20 -43 -43 -43h-85v43h85zM107 192v-85h85v-43h-85c-23 0 -43 20 -43 43v85h43zM64 405c0 23 20 43 43 43h85v-43h-85v-85h-43v85z" /> + <glyph glyph-name="crop_landscape" unicode="crop_landscape" +d="M405 149v214h-298v-214h298zM405 405c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-298c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h298z" /> + <glyph glyph-name="crop_original" unicode="crop_original" +d="M298 250l75 -101h-234l58 76l42 -51zM405 107v298h-298v-298h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="crop_portrait" unicode="crop_portrait" +d="M363 107v298h-214v-298h214zM363 448c23 0 42 -20 42 -43v-298c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v298c0 23 19 43 42 43h214z" /> + <glyph glyph-name="crop_rotate" unicode="crop_rotate" +d="M171 171h256v-43h-43v-43h-43v43h-170c-24 0 -43 20 -43 43v170h-43v43h43v43h43v-256zM341 213v128h-128v43h128c23 0 43 -19 43 -43v-128h-43zM257 512c134 0 244 -104 255 -235h-32c-8 80 -57 148 -127 181l-29 -28l-81 81c5 0 9 1 14 1zM159 54l29 28l81 -81 +c-5 0 -9 -1 -14 -1c-134 0 -244 104 -255 235h32c8 -80 57 -148 127 -181z" /> + <glyph glyph-name="crop_square" unicode="crop_square" +d="M384 128v256h-256v-256h256zM384 427c23 0 43 -20 43 -43v-256c0 -23 -20 -43 -43 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 43 43 43h256z" /> + <glyph glyph-name="dashboard" unicode="dashboard" +d="M277 448h171v-128h-171v128zM277 64v213h171v-213h-171zM64 64v128h171v-128h-171zM64 235v213h171v-213h-171z" /> + <glyph glyph-name="data_usage" unicode="data_usage" +d="M256 107c47 0 89 22 116 56l56 -33c-39 -53 -101 -87 -172 -87c-118 0 -213 95 -213 213c0 111 84 201 192 212v-64c-72 -10 -128 -73 -128 -148c0 -83 66 -149 149 -149zM277 468c108 -11 192 -101 192 -212c0 -31 -6 -61 -18 -87l-56 33c6 17 10 35 10 54 +c0 75 -56 138 -128 148v64z" /> + <glyph glyph-name="date_range" unicode="date_range" +d="M405 85v235h-298v-235h298zM405 427c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-298c-24 0 -43 19 -43 42v299c0 23 19 43 43 43h21v42h43v-42h170v42h43v-42h21zM363 277v-42h-43v42h43zM277 277v-42h-42v42h42zM192 277v-42h-43v42h43z" /> + <glyph glyph-name="dehaze" unicode="dehaze" +d="M43 395h426v-43h-426v43zM43 288h426v-43h-426v43zM43 181h426v-42h-426v42z" /> + <glyph glyph-name="delete" unicode="delete" +d="M405 427v-43h-298v43h74l22 21h106l22 -21h74zM128 107v256h256v-256c0 -23 -20 -43 -43 -43h-170c-23 0 -43 20 -43 43z" /> + <glyph glyph-name="delete_forever" unicode="delete_forever" +d="M331 427h74v-43h-298v43h74l22 21h106zM180 259l46 -46l-45 -45l30 -30l45 45l45 -45l30 30l-45 45l45 46l-30 30l-45 -46l-45 46zM128 107v256h256v-256c0 -23 -20 -43 -43 -43h-170c-23 0 -43 20 -43 43z" /> + <glyph glyph-name="delete_sweep" unicode="delete_sweep" +d="M299 405v-42h-256v42h64l21 22h85l22 -22h64zM64 128v213h213v-213c0 -23 -19 -43 -42 -43h-128c-23 0 -43 20 -43 43zM320 256h128v-43h-128v43zM320 341h149v-42h-149v42zM320 171h85v-43h-85v43z" /> + <glyph glyph-name="description" unicode="description" +d="M277 320h118l-118 117v-117zM341 213v43h-170v-43h170zM341 128v43h-170v-43h170zM299 469l128 -128v-256c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42l1 342c0 23 19 42 42 42h171z" /> + <glyph glyph-name="desktop_mac" unicode="desktop_mac" +d="M448 213v214h-384v-214h384zM448 469c23 0 43 -19 43 -42v-256c0 -23 -20 -43 -43 -43h-149l42 -64v-21h-170v21l42 64h-149c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h384z" /> + <glyph glyph-name="desktop_windows" unicode="desktop_windows" +d="M448 171v256h-384v-256h384zM448 469c23 0 43 -19 43 -42v-256c0 -23 -20 -43 -43 -43h-149v-43h42v-42h-170v42h42v43h-149c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h384z" /> + <glyph glyph-name="details" unicode="details" +d="M136 384l120 -213l120 213h-240zM64 427h384l-192 -342z" /> + <glyph glyph-name="developer_board" unicode="developer_board" +d="M256 277h85v-128h-85v128zM128 363h107v-107h-107v107zM256 363h85v-64h-85v64zM128 235h107v-86h-107v86zM384 107v298h-299v-298h299zM469 320h-42v-43h42v-42h-42v-43h42v-43h-42v-42c0 -23 -20 -43 -43 -43h-299c-23 0 -42 20 -42 43v298c0 23 19 43 42 43h299 +c23 0 43 -20 43 -43v-42h42v-43z" /> + <glyph glyph-name="developer_mode" unicode="developer_mode" +d="M363 107v42h42v-85c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v85h42v-42h214zM213 188l-30 -30l-98 98l98 98l30 -30l-67 -68zM329 158l-30 30l67 68l-67 68l30 30l98 -98zM149 405v-42h-42v85c0 23 19 43 42 43l214 -1c23 0 42 -19 42 -42v-85h-42v42h-214z" /> + <glyph glyph-name="device_hub" unicode="device_hub" +d="M363 171h85v-107h-107v65l-85 90l-85 -90v-65h-107v107h85l86 85v68c-25 9 -43 32 -43 60c0 35 29 64 64 64s64 -29 64 -64c0 -28 -18 -51 -43 -60v-68z" /> + <glyph glyph-name="devices" unicode="devices" +d="M469 149v150h-85v-150h85zM491 341c12 0 21 -9 21 -21v-213c0 -12 -9 -22 -21 -22h-128c-12 0 -22 10 -22 22v213c0 12 10 21 22 21h128zM85 384v-235h214v-64h-299v64h43v235c0 23 19 43 42 43h384v-43h-384z" /> + <glyph glyph-name="devices_other" unicode="devices_other" +d="M448 128v171h-85v-171h85zM469 341c11 0 22 -10 22 -21v-213c0 -11 -11 -22 -22 -22h-128c-11 0 -21 11 -21 22v213c0 11 10 21 21 21h128zM235 139c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM277 256v-38c13 -12 22 -28 22 -47s-9 -36 -22 -48 +v-38h-85v38c-13 12 -21 29 -21 48s8 35 21 47v38h85zM64 384v-256h85v-43h-85c-23 0 -43 20 -43 43v256c0 23 20 43 43 43h384v-43h-384z" /> + <glyph glyph-name="dialer_sip" unicode="dialer_sip" +d="M427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -61 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12zM427 405v22h-22v-22h22z +M384 448h64v-64h-43v-43h-21v107zM320 405v-64h-64v22h43v21h-43v64h64v-21h-43v-22h43zM363 448v-107h-22v107h22z" /> + <glyph glyph-name="dialpad" unicode="dialpad" +d="M256 491c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM256 363c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM384 363c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM384 235c23 0 43 -20 43 -43 +s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM256 235c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM384 405c-23 0 -43 20 -43 43s20 43 43 43s43 -20 43 -43s-20 -43 -43 -43zM128 235c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43z +M128 363c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM128 491c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM256 107c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43z" /> + <glyph glyph-name="directions" unicode="directions" +d="M299 203l74 74l-74 75v-53h-107c-12 0 -21 -10 -21 -22v-85h42v64h86v-53zM463 271c8 -9 8 -22 0 -30l-192 -192c-8 -8 -22 -8 -30 0l-192 192c-8 8 -8 22 0 30l192 192c8 8 22 8 30 0z" /> + <glyph glyph-name="directions_bike" unicode="directions_bike" +d="M405 75c41 0 75 33 75 74s-34 75 -75 75s-74 -34 -74 -75s33 -74 74 -74zM405 256c60 0 107 -47 107 -107s-47 -106 -107 -106s-106 46 -106 106s46 107 106 107zM230 288l47 -49v-132h-42v106l-69 60c-9 6 -12 17 -12 30c0 11 3 21 12 30l60 60c6 9 17 12 30 12 +s23 -3 34 -12l41 -41c19 -19 44 -32 76 -32v-43c-45 0 -80 17 -108 45l-17 17zM107 75c41 0 74 33 74 74s-33 75 -74 75s-75 -34 -75 -75s34 -74 75 -74zM107 256c60 0 106 -47 106 -107s-46 -106 -106 -106s-107 46 -107 106s47 107 107 107zM331 395c-23 0 -43 19 -43 42 +s20 43 43 43s42 -20 42 -43s-19 -42 -42 -42z" /> + <glyph glyph-name="directions_boat" unicode="directions_boat" +d="M128 384v-85l128 42l128 -42v85h-256zM84 107l-40 142c-4.78212 14.3464 3.99001 23.6633 14 27l27 9v99c0 23 20 43 43 43h64v64h128v-64h64c23 0 43 -20 43 -43v-99l27 -9c10.0202 -3.34008 18.7871 -12.6386 14 -27l-40 -142h-1c-34 0 -65 18 -86 42 +c-21 -24 -51 -42 -85 -42s-64 18 -85 42c-21 -24 -52 -42 -86 -42h-1zM427 64h42v-43h-42c-29 0 -59 7 -86 21c-54 -28 -116 -28 -170 0c-27 -14 -57 -21 -86 -21h-42v43h42c30 0 60 10 86 28c52 -36 118 -36 170 0c26 -18 56 -28 86 -28z" /> + <glyph glyph-name="directions_bus" unicode="directions_bus" +d="M384 277v107h-256v-107h256zM352 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM160 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM85 171v213c0 75 77 85 171 85s171 -10 171 -85v-213c0 -19 -9 -36 -22 -48v-38 +c0 -12 -9 -21 -21 -21h-21c-12 0 -22 9 -22 21v22h-170v-22c0 -12 -10 -21 -22 -21h-21c-12 0 -21 9 -21 21v38c-13 12 -22 29 -22 48z" /> + <glyph glyph-name="directions_car" unicode="directions_car" +d="M107 277h298l-32 96h-234zM373 171c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 171c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM404 384l44 -128v-171c0 -12 -9 -21 -21 -21h-22c-12 0 -21 9 -21 21v22h-256v-22 +c0 -12 -9 -21 -21 -21h-22c-12 0 -21 9 -21 21v171l44 128c4 13 17 21 31 21h234c14 0 27 -8 31 -21z" /> + <glyph glyph-name="directions_railway" unicode="directions_railway" +d="M384 299v106h-256v-106h256zM256 149c23 0 43 20 43 43s-20 43 -43 43s-43 -20 -43 -43s20 -43 43 -43zM85 181v224c0 75 77 86 171 86s171 -11 171 -86v-224c0 -41 -34 -74 -75 -74l32 -32v-11h-256v11l32 32c-41 0 -75 33 -75 74z" /> + <glyph glyph-name="directions_run" unicode="directions_run" +d="M211 99l-149 29l8 43l105 -21l34 173l-39 -15v-73h-42v100l111 47c6 0 11 2 17 2c15 0 27 -8 36 -21l21 -34c17 -30 51 -51 92 -51v-43c-47 0 -89 21 -117 53l-13 -64l45 -42v-160h-43v128l-45 42zM288 395c-23 0 -43 20 -43 43s20 42 43 42s42 -19 42 -42 +s-19 -43 -42 -43z" /> + <glyph glyph-name="directions_subway" unicode="directions_subway" +d="M384 277v107h-107v-107h107zM352 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM235 277v107h-107v-107h107zM160 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM256 469c94 0 171 -10 171 -85v-203c0 -41 -34 -74 -75 -74 +l32 -32v-11h-256v11l32 32c-41 0 -75 33 -75 74v203c0 75 77 85 171 85z" /> + <glyph glyph-name="directions_transit" unicode="directions_transit" +d="M384 277v107h-107v-107h107zM352 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM235 277v107h-107v-107h107zM160 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM256 469c94 0 171 -10 171 -85v-203c0 -41 -34 -74 -75 -74 +l32 -32v-11h-256v11l32 32c-41 0 -75 33 -75 74v203c0 75 77 85 171 85z" /> + <glyph glyph-name="directions_walk" unicode="directions_walk" +d="M209 322l-60 -301h45l39 171l44 -43v-128h43v160l-45 43l13 64c28 -32 70 -53 117 -53v42c-41 0 -74 22 -91 52l-22 34c-9 13 -21 21 -36 21c-6 0 -11 -2 -17 -2l-111 -47v-100h43v72l38 15zM288 395c-23 0 -43 19 -43 42s20 43 43 43s43 -20 43 -43s-20 -42 -43 -42z +" /> + <glyph glyph-name="disc_full" unicode="disc_full" +d="M213 213c23 0 43 20 43 43s-20 43 -43 43s-42 -20 -42 -43s19 -43 42 -43zM213 427c94 0 171 -77 171 -171s-77 -171 -171 -171s-170 77 -170 171s76 171 170 171zM427 363h42v-107h-42v107zM427 171v42h42v-42h-42z" /> + <glyph glyph-name="dns" unicode="dns" +d="M149 320c23 0 43 20 43 43s-20 42 -43 42s-42 -19 -42 -42s19 -43 42 -43zM427 448c12 0 21 -9 21 -21v-128c0 -12 -9 -22 -21 -22h-342c-12 0 -21 10 -21 22v128c0 12 9 21 21 21h342zM149 107c23 0 43 19 43 42s-20 43 -43 43s-42 -20 -42 -43s19 -42 42 -42zM427 235 +c12 0 21 -10 21 -22v-128c0 -12 -9 -21 -21 -21h-342c-12 0 -21 9 -21 21v128c0 12 9 22 21 22h342z" /> + <glyph glyph-name="do_not_disturb" unicode="do_not_disturb" +d="M391 151c23 29 36 66 36 105c0 94 -77 171 -171 171c-39 0 -76 -13 -105 -36zM256 85c39 0 76 13 105 36l-240 240c-23 -29 -36 -66 -36 -105c0 -94 77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="do_not_disturb_alt" unicode="do_not_disturb_alt" +d="M256 85c94 0 171 77 171 171c0 38 -14 75 -37 105l-239 -239c30 -23 67 -37 105 -37zM85 256c0 -38 14 -75 37 -105l239 239c-30 23 -67 37 -105 37c-94 0 -171 -77 -171 -171zM256 469c117 0 213 -96 213 -213s-96 -213 -213 -213s-213 96 -213 213s96 213 213 213z" /> + <glyph glyph-name="do_not_disturb_off" unicode="do_not_disturb_off" +d="M149 235h74l-43 42h-31v-42zM48 464l416 -416l-28 -27l-59 60c-34 -24 -76 -38 -121 -38c-118 0 -213 95 -213 213c0 45 14 87 38 121l-60 59zM363 277h-74l-154 154c34 24 76 38 121 38c118 0 213 -95 213 -213c0 -45 -14 -87 -38 -121l-99 100h31v42z" /> + <glyph glyph-name="do_not_disturb_on" unicode="do_not_disturb_on" +d="M363 235v42h-214v-42h214zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="dock" unicode="dock" +d="M341 192v213h-170v-213h170zM341 490c23 0 43 -19 43 -42v-299c0 -23 -20 -42 -43 -42h-170c-23 0 -43 19 -43 42v299c0 23 20 43 43 43zM171 21v43h170v-43h-170z" /> + <glyph glyph-name="domain" unicode="domain" +d="M384 192v-43h-43v43h43zM384 277v-42h-43v42h43zM427 107v213h-171v-43h43v-42h-43v-43h43v-43h-43v-42h171zM213 363v42h-42v-42h42zM213 277v43h-42v-43h42zM213 192v43h-42v-43h42zM213 107v42h-42v-42h42zM128 363v42h-43v-42h43zM128 277v43h-43v-43h43zM128 192v43 +h-43v-43h43zM128 107v42h-43v-42h43zM256 363h213v-299h-426v384h213v-85z" /> + <glyph glyph-name="done" unicode="done" +d="M192 166l226 227l30 -30l-256 -256l-119 119l29 30z" /> + <glyph glyph-name="done_all" unicode="done_all" +d="M9 226l30 30l119 -119l-30 -30zM474 393l31 -30l-256 -256l-120 119l31 30l89 -89zM384 363l-135 -136l-30 30l135 136z" /> + <glyph glyph-name="donut_large" unicode="donut_large" +d="M277 108c64 9 119 63 128 127h64c-10 -107 -85 -182 -192 -192v65zM405 277c-9 64 -64 118 -128 127v65c107 -10 182 -85 192 -192h-64zM235 404c-64 -10 -128 -73 -128 -148s64 -138 128 -148v-65c-107 11 -192 102 -192 213s85 202 192 213v-65z" /> + <glyph glyph-name="donut_small" unicode="donut_small" +d="M277 195c21 6 33 22 40 40h152c-10 -101 -85 -182 -192 -192v152zM317 277c-7 18 -19 34 -40 40v152c107 -10 182 -91 192 -192h-152zM235 317c-21 -9 -43 -33 -43 -61s22 -52 43 -61v-152c-107 11 -192 102 -192 213s85 202 192 213v-152z" /> + <glyph glyph-name="drafts" unicode="drafts" +d="M256 235l176 110l-176 103l-176 -103zM469 341v-213c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v213c0 15 8 30 20 37l193 113l193 -113c12 -7 20 -22 20 -37z" /> + <glyph glyph-name="drag_handle" unicode="drag_handle" +d="M85 192v43h342v-43h-342zM427 320v-43h-342v43h342z" /> + <glyph glyph-name="drive_eta" unicode="drive_eta" +d="M107 299h298l-32 96h-234zM373 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM404 405l44 -128v-170c0 -12 -9 -22 -21 -22h-22c-12 0 -21 10 -21 22v21h-256v-21 +c0 -12 -9 -22 -21 -22h-22c-12 0 -21 10 -21 22v170l44 128c4 13 17 22 31 22h234c14 0 27 -9 31 -22z" /> + <glyph glyph-name="dvr" unicode="dvr" +d="M149 256v-43h-42v43h42zM149 341v-42h-42v42h42zM405 256v-43h-234v43h234zM405 341v-42h-234v42h234zM448 149v256h-384v-256h384zM448 448c23 0 43 -20 43 -43l-1 -256c0 -23 -19 -42 -42 -42h-107v-43h-170v43h-107c-23 0 -43 19 -43 42v256c0 23 20 43 43 43h384z +" /> + <glyph glyph-name="edit" unicode="edit" +d="M442 362l-39 -39l-80 80l39 39c8 8 22 8 30 0l50 -50c8 -8 8 -22 0 -30zM64 144l236 236l80 -80l-236 -236h-80v80z" /> + <glyph glyph-name="edit_location" unicode="edit_location" +d="M318 351c3 3 3 8 0 11l-20 20c-3 3 -8 3 -11 0l-15 -15l31 -31zM223 256l71 71l-31 31l-71 -71v-31h31zM256 469c82 0 149 -67 149 -149c0 -112 -149 -277 -149 -277s-149 165 -149 277c0 82 67 149 149 149z" /> + <glyph glyph-name="eject" unicode="eject" +d="M256 405l142 -213h-284zM107 149h298v-42h-298v42z" /> + <glyph glyph-name="email" unicode="email" +d="M427 341v43l-171 -107l-171 107v-43l171 -106zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="enhanced_encryption" unicode="enhanced_encryption" +d="M341 171v42h-64v64h-42v-64h-64v-42h64v-64h42v64h64zM190 384v-43h132v43c0 36 -30 66 -66 66s-66 -30 -66 -66zM384 341c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h21v43c0 59 48 107 107 107s107 -48 107 -107 +v-43h21z" /> + <glyph glyph-name="equalizer" unicode="equalizer" +d="M341 320h86v-235h-86v235zM85 85v171h86v-171h-86zM213 85v342h86v-342h-86z" /> + <glyph glyph-name="error" unicode="error" +d="M277 235v128h-42v-128h42zM277 149v43h-42v-43h42zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="error_outline" unicode="error_outline" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM235 363h42v-128h-42v128zM235 192h42v-43h-42v43z" /> + <glyph glyph-name="euro_symbol" unicode="euro_symbol" +d="M320 117c35 0 66 13 90 34l38 -38c-34 -31 -79 -49 -128 -49c-84 0 -155 54 -181 128h-75v43h65c-1 7 -1 14 -1 21s0 14 1 21h-65v43h75c26 74 97 128 181 128c49 0 94 -18 128 -49l-38 -38c-24 21 -56 34 -90 34c-53 0 -100 -31 -123 -75h123v-43h-137 +c-1 -7 -2 -14 -2 -21s1 -14 2 -21h137v-43h-123c23 -44 69 -75 123 -75z" /> + <glyph glyph-name="ev_station" unicode="ev_station" +d="M171 128l85 149h-43v107l-85 -160h43v-96zM384 299c12 0 21 9 21 21s-9 21 -21 21s-21 -9 -21 -21s9 -21 21 -21zM422 358c10 -10 15 -23 15 -38v-203c0 -29 -24 -53 -53 -53s-53 24 -53 53v107h-32v-160h-214v341c0 23 20 43 43 43h128c23 0 43 -20 43 -43v-149h21 +c23 0 43 -20 43 -43v-96c0 -12 9 -21 21 -21s21 9 21 21v154c-7 -3 -13 -4 -21 -4c-29 0 -53 24 -53 53c0 23 14 42 34 50l-45 45l23 22z" /> + <glyph glyph-name="event" unicode="event" +d="M405 107v234h-298v-234h298zM341 491h43v-43h21c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43zM363 256v-107h-107v107h107z" /> + <glyph glyph-name="event_available" unicode="event_available" +d="M405 107v234h-298v-234h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43h43v-43h21zM353 276l-127 -127l-68 68l23 23l45 -45l104 104z" /> + <glyph glyph-name="event_busy" unicode="event_busy" +d="M405 107v234h-298v-234h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43h43v-43h21zM199 149l-23 23l52 52l-52 52l23 23l52 -52l52 52l22 -23l-52 -52l52 -52l-22 -23l-52 52z" /> + <glyph glyph-name="event_note" unicode="event_note" +d="M299 213v-42h-150v42h150zM405 107v234h-298v-234h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43h43v-43h21zM363 299v-43h-214v43h214z" /> + <glyph glyph-name="event_seat" unicode="event_seat" +d="M363 235h-214v170c0 23 20 43 43 43h128c23 0 43 -20 43 -43v-170zM43 299h64v-64h-64v64zM405 299h64v-64h-64v64zM85 64v128h342v-128h-64v64h-214v-64h-64z" /> + <glyph glyph-name="exit_to_app" unicode="exit_to_app" +d="M405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v85h43v-85h298v298h-298v-85h-43v85c0 23 19 43 43 43h298zM215 179l55 56h-206v42h206l-55 56l30 30l107 -107l-107 -107z" /> + <glyph glyph-name="expand_less" unicode="expand_less" +d="M256 341l128 -128l-30 -30l-98 98l-98 -98l-30 30z" /> + <glyph glyph-name="expand_more" unicode="expand_more" +d="M354 329l30 -30l-128 -128l-128 128l30 30l98 -98z" /> + <glyph glyph-name="explicit" unicode="explicit" +d="M320 320v43h-128v-214h128v43h-85v43h85v42h-85v43h85zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="explore" unicode="explore" +d="M303 209l81 175l-175 -81l-81 -175zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM256 279c13 0 23 -10 23 -23s-10 -23 -23 -23s-23 10 -23 23s10 23 23 23z" /> + <glyph glyph-name="exposure" unicode="exposure" +d="M427 85v342l-342 -342h342zM107 405v-42h128v42h-128zM427 469c23 0 42 -19 42 -42v-342c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v342c0 23 19 42 42 42h342zM320 149h-43v43h43v43h43v-43h42v-43h-42v-42h-43v42z" /> + <glyph glyph-name="exposure_neg_1" unicode="exposure_neg_1" +d="M405 128h-42v227l-64 -22v36l100 36h6v-277zM85 277h171v-42h-171v42z" /> + <glyph glyph-name="exposure_neg_2" unicode="exposure_neg_2" +d="M43 277h170v-42h-170v42zM351 405c51.6805 0 86 -23.4377 86 -75c0 -8 -1 -17 -4 -25s-6 -17 -11 -25c-10.9564 -17.5303 -25.11 -35.11 -40 -50l-61 -66h127v-36h-184v32l89 97c13.5256 13.5256 22.2329 25.3882 31 40c5.07755 8.46258 7 15.5272 7 28c0 6 0 13 -2 18 +c-5.9589 14.8973 -17.1504 26 -38 26c-30.4379 0 -46 -18.4676 -46 -49h-46c0 25.6678 10.3448 46.3448 24 60c15.6925 15.6925 36.8462 25 68 25z" /> + <glyph glyph-name="exposure_plus_1" unicode="exposure_plus_1" +d="M427 128h-43v227l-64 -22v36l100 36h7v-277zM213 363v-86h86v-42h-86v-86h-42v86h-86v42h86v86h42z" /> + <glyph glyph-name="exposure_plus_2" unicode="exposure_plus_2" +d="M171 363v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM342 164h127v-36h-184v32l89 97c13.5256 13.5256 22.2329 25.3882 31 40c4.82857 8.04762 8 16.6883 8 28c0 13.988 -4.98597 22.9813 -11 31c-6.38798 8.51731 -15.0381 13 -30 13 +c-15.4008 0 -27.3364 -6.33642 -35 -14c-6.99604 -6.99604 -11 -21.7099 -11 -35h-46c0 25.6678 10.3448 46.3448 24 60c8 8 17 15 29 19s25 6 40 6c14 0 25 -2 36 -5c10 -4 20 -8 27 -15c13.4025 -11.4878 23 -30.9925 23 -55c0 -20.2222 -7.3586 -36.1738 -16 -50 +c-5 -8 -10 -17 -17 -25s-15 -17 -23 -25z" /> + <glyph glyph-name="exposure_zero" unicode="exposure_zero" +d="M299 296c0 25.8021 -1.44348 42.6652 -11 57c-4 6 -9 9 -14 12s-11 4 -18 4s-13 -1 -18 -4s-10 -6 -14 -12c-9.53524 -14.3029 -11 -31.2267 -11 -57v-57c0 -34.3202 4.66098 -58.7966 25 -71c5 -3 11 -4 18 -4c16.7682 0 24.8052 6.20777 32 17 +c8.87006 13.3051 12 34.4084 12 58v57h-1zM168 289c0 68.5293 21.3782 116 88 116c46.5088 0 71.845 -23.9186 82 -62c4 -15 7 -32 7 -54v-44h-1c0 -39.7402 -7.68654 -69.0255 -24 -90c-8 -9 -17 -17 -28 -21s-23 -6 -36 -6s-25 2 -36 6s-20 12 -28 21 +c-17.4464 19.6272 -24 51.2554 -24 90v44z" /> + <glyph glyph-name="extension" unicode="extension" +d="M437 277c29 0 54 -24 54 -53s-25 -53 -54 -53h-32v-86c0 -23 -19 -42 -42 -42h-81v32c0 32 -26 57 -58 57s-58 -25 -58 -57v-32h-81c-23 0 -42 19 -42 42v81h32c32 0 57 26 57 58s-25 58 -57 58h-32v81c0 23 19 42 42 42h86v32c0 29 24 54 53 54s53 -25 53 -54v-32h86 +c23 0 42 -19 42 -42v-86h32z" /> + <glyph glyph-name="face" unicode="face" +d="M256 85c94 0 171 77 171 171c0 17 -3 33 -7 48c-15 -4 -31 -5 -48 -5c-72 0 -135 35 -174 90c-21 -51 -62 -93 -112 -115c-1 -6 -1 -12 -1 -18c0 -94 77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM320 261 +c15 0 27 -11 27 -26s-12 -27 -27 -27s-27 12 -27 27s12 26 27 26zM192 261c15 0 27 -11 27 -26s-12 -27 -27 -27s-27 12 -27 27s12 26 27 26z" /> + <glyph glyph-name="fast_forward" unicode="fast_forward" +d="M277 384l182 -128l-182 -128v256zM85 128v256l182 -128z" /> + <glyph glyph-name="fast_rewind" unicode="fast_rewind" +d="M245 256l182 128v-256zM235 128l-182 128l182 128v-256z" /> + <glyph glyph-name="favorite" unicode="favorite" +d="M256 57l-31 28c-110 100 -182 165 -182 246c0 66 51 117 117 117c37 0 73 -18 96 -45c23 27 59 45 96 45c66 0 117 -51 117 -117c0 -81 -72 -147 -182 -247z" /> + <glyph glyph-name="favorite_border" unicode="favorite_border" +d="M258 116c102 92 169 153 169 215c0 43 -32 74 -75 74c-33 0 -65 -21 -76 -50h-40c-11 29 -43 50 -76 50c-43 0 -75 -31 -75 -74c0 -62 67 -123 169 -215l2 -2zM352 448c66 0 117 -51 117 -117c0 -81 -72 -146 -182 -246l-31 -28l-31 27c-110 100 -182 166 -182 247 +c0 66 51 117 117 117c37 0 73 -18 96 -45c23 27 59 45 96 45z" /> + <glyph glyph-name="featured_play_list" unicode="featured_play_list" +d="M256 363v42h-192v-42h192zM256 277v43h-192v-43h192zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="featured_video" unicode="featured_video" +d="M256 256v149h-192v-149h192zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="feedback" unicode="feedback" +d="M277 299v85h-42v-85h42zM277 213v43h-42v-43h42zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="fiber_dvr" unicode="fiber_dvr" +d="M448 267v21c0 18 -14 32 -32 32h-75v-128h32v43h25l18 -43h32l-19 45c11 5 19 17 19 30zM269 192l38 128h-32l-22 -73l-21 73h-32l37 -128h32zM171 224v64c0 18 -14 32 -32 32h-75v-128h75c18 0 32 14 32 32zM448 448c24 0 43 -19 43 -43v-298c0 -23 -19 -43 -43 -43 +h-384c-24 0 -43 20 -43 43v298c0 24 19 43 43 43h384zM96 288h43v-64h-43v64zM373 288h43v-21h-43v21z" /> + <glyph glyph-name="fiber_manual_record" unicode="fiber_manual_record" +d="M85 256c0 94 77 171 171 171s171 -77 171 -171s-77 -171 -171 -171s-171 77 -171 171z" /> + <glyph glyph-name="fiber_new" unicode="fiber_new" +d="M437 213v107h-26v-96h-24v75h-27v-75h-24v96h-27v-107c0 -12 10 -21 22 -21h85c12 0 21 9 21 21zM288 293v27h-85v-128h85v27h-53v23h53v27h-53v24h53zM181 192v128h-26v-75l-54 75h-26v-128h26v75l55 -75h25zM427 427c24 0 42 -19 42 -43v-256c0 -24 -18 -43 -42 -43 +h-342c-24 0 -42 19 -42 43v256c0 24 18 43 42 43h342z" /> + <glyph glyph-name="fiber_pin" unicode="fiber_pin" +d="M427 192v128h-27v-75l-53 75h-27v-128h27v75l54 -75h26zM267 192v128h-32v-128h32zM192 267v21c0 18 -14 32 -32 32h-75v-128h32v43h43c18 0 32 14 32 32zM427 427c24 0 42 -19 42 -43v-256c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v256c0 24 18 43 42 43h342z +M117 288h43v-21h-43v21z" /> + <glyph glyph-name="fiber_smart_record" unicode="fiber_smart_record" +d="M363 421c74 -19 128 -85 128 -165s-54 -146 -128 -165v44c50 17 85 65 85 121s-35 104 -85 121v44zM21 256c0 94 77 171 171 171s171 -77 171 -171s-77 -171 -171 -171s-171 77 -171 171z" /> + <glyph glyph-name="file_download" unicode="file_download" +d="M107 128h298v-43h-298v43zM405 320l-149 -149l-149 149h85v128h128v-128h85z" /> + <glyph glyph-name="file_upload" unicode="file_upload" +d="M107 128h298v-43h-298v43zM192 171v128h-85l149 149l149 -149h-85v-128h-128z" /> + <glyph glyph-name="filter" unicode="filter" +d="M448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43zM340 292l76 -100h-235l59 75l42 -50z" /> + <glyph glyph-name="filter_1" unicode="filter_1" +d="M448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM299 192v171h-43v42h85v-213h-42zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_2" unicode="filter_2" +d="M363 235v-43h-128v85c0 24 19 43 42 43h43v43h-85v42h85c23 0 43 -18 43 -42v-43c0 -24 -20 -43 -43 -43h-43v-42h86zM448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM64 405 +v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_3" unicode="filter_3" +d="M363 235c0 -24 -20 -43 -43 -43h-85v43h85v42h-43v43h43v43h-85v42h85c23 0 43 -18 43 -42v-32c0 -18 -14 -32 -32 -32c18 0 32 -14 32 -32v-32zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43zM448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299 +c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299z" /> + <glyph glyph-name="filter_4" unicode="filter_4" +d="M448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM320 192v85h-85v128h42v-85h43v85h43v-213h-43zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_5" unicode="filter_5" +d="M363 235c0 -24 -20 -43 -43 -43h-85v43h85v42h-85v128h128v-42h-86v-43h43c23 0 43 -19 43 -43v-42zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43zM448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299 +c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299z" /> + <glyph glyph-name="filter_6" unicode="filter_6" +d="M277 277v-42h43v42h-43zM277 192c-23 0 -42 19 -42 43v128c0 24 19 42 42 42h86v-42h-86v-43h43c23 0 43 -19 43 -43v-42c0 -24 -20 -43 -43 -43h-43zM448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299 +c0 23 19 43 42 43h299zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_7" unicode="filter_7" +d="M277 192h-42l85 171h-85v42h128v-42zM448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_8" unicode="filter_8" +d="M277 277v-42h43v42h-43zM277 363v-43h43v43h-43zM277 192c-23 0 -42 19 -42 43v32c0 18 14 32 32 32c-18 0 -32 14 -32 32v32c0 24 19 42 42 42h43c23 0 43 -18 43 -42v-32c0 -18 -14 -32 -32 -32c18 0 32 -14 32 -32v-32c0 -24 -20 -43 -43 -43h-43zM448 149v299h-299 +v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_9" unicode="filter_9" +d="M320 320v43h-43v-43h43zM320 405c23 0 43 -18 43 -42v-128c0 -24 -20 -43 -43 -43h-85v43h85v42h-43c-23 0 -42 19 -42 43v43c0 24 19 42 42 42h43zM448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299 +c0 23 19 43 42 43h299zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_9_plus" unicode="filter_9_plus" +d="M448 320v128h-299v-299h299v128h-43v-42h-42v42h-43v43h43v43h42v-43h43zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM235 320h21v21h-21v-21zM299 256c0 -24 -20 -43 -43 -43h-64v43h64v21h-21 +c-23 0 -43 19 -43 43v21c0 24 20 43 43 43h21c23 0 43 -19 43 -43v-85zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_b_and_w" unicode="filter_b_and_w" +d="M405 107v298h-149v-128zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM256 277l-149 -170h149v170z" /> + <glyph glyph-name="filter_center_focus" unicode="filter_center_focus" +d="M256 320c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM405 107v85h43v-85c0 -23 -20 -43 -43 -43h-85v43h85zM405 448c23 0 43 -20 43 -43v-85h-43v85h-85v43h85zM107 405v-85h-43v85c0 23 20 43 43 43h85v-43h-85zM107 192v-85h85v-43h-85 +c-23 0 -43 20 -43 43v85h43z" /> + <glyph glyph-name="filter_drama" unicode="filter_drama" +d="M405 128c35 0 64 29 64 64s-29 64 -64 64h-32v11c0 65 -52 117 -117 117c-38 0 -72 -18 -94 -47c54 -15 94 -65 94 -124h-43c0 47 -38 86 -85 86s-85 -39 -85 -86s38 -85 85 -85h277zM413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277 +c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="filter_frames" unicode="filter_frames" +d="M384 341h-256v-213h256zM427 85v299h-96l-74 75l-75 -75h-97v-299h342zM427 427c23 0 42 -20 42 -43v-299c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h86l85 85l85 -85h86z" /> + <glyph glyph-name="filter_hdr" unicode="filter_hdr" +d="M299 384l192 -256h-470l128 171l96 -128l34 25l-60 81z" /> + <glyph glyph-name="filter_list" unicode="filter_list" +d="M128 235v42h256v-42h-256zM64 384h384v-43h-384v43zM213 128v43h86v-43h-86z" /> + <glyph glyph-name="filter_none" unicode="filter_none" +d="M448 149v299h-299v-299h299zM448 491c23 0 43 -20 43 -43v-299c0 -23 -20 -42 -43 -42h-299c-23 0 -42 19 -42 42v299c0 23 19 43 42 43h299zM64 405v-341h341v-43h-341c-23 0 -43 20 -43 43v341h43z" /> + <glyph glyph-name="filter_tilt_shift" unicode="filter_tilt_shift" +d="M121 91l30 30c24 -18 53 -30 84 -34v-43c-43 4 -82 21 -114 47zM277 87c31 4 60 16 83 34l31 -30c-32 -26 -71 -43 -114 -47v43zM391 151c18 24 30 52 34 83h43c-4 -43 -21 -81 -47 -113zM320 256c0 -35 -29 -64 -64 -64s-64 29 -64 64s29 64 64 64s64 -29 64 -64z +M87 235c4 -31 16 -60 34 -83l-30 -31c-26 32 -43 71 -47 114h43zM121 361c-18 -24 -30 -53 -34 -84h-43c4 43 21 82 47 114zM425 277c-4 31 -16 60 -34 84l30 30c26 -32 43 -71 47 -114h-43zM391 421l-30 -30c-24 18 -53 30 -84 34v43c43 -4 82 -21 114 -47zM235 425 +c-31 -4 -60 -16 -84 -34l-30 30c32 26 71 43 114 47v-43z" /> + <glyph glyph-name="filter_vintage" unicode="filter_vintage" +d="M256 171c47 0 85 38 85 85s-38 85 -85 85s-85 -38 -85 -85s38 -85 85 -85zM49 137c0 49.2164 31.3621 102.121 82 119c-6 2 -12 6 -18 9c-41 24 -64 66 -64 110c38 22 87 24 128 0c6 -3 12 -7 17 -11c-1 7 -2 13 -2 20c0 47 26 89 64 111c38 -22 64 -64 64 -111 +c0 -7 -1 -13 -2 -20c5 4 11 8 17 11c41 24 90 22 128 0c0 -44 -23 -86 -64 -110c-6 -3 -12 -7 -18 -9c6 -2 12 -6 18 -9c41 -24 64 -66 64 -110c-38 -22 -87 -24 -128 0c-6 3 -12 7 -17 11c1 -7 2 -13 2 -20c0 -47 -26 -89 -64 -111c-38 22 -64 64 -64 111c0 7 1 13 2 20 +c-5 -4 -11 -8 -17 -11c-41 -24 -90 -22 -128 0z" /> + <glyph glyph-name="find_in_page" unicode="find_in_page" +d="M192 235c0 35 29 64 64 64s64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64zM427 94l-82 82c11 17 18 37 18 59c0 59 -48 106 -107 106s-107 -47 -107 -106s48 -107 107 -107c22 0 42 7 59 18l94 -95c-7 -5 -15 -8 -25 -8h-256c-23 0 -43 19 -43 42l1 342c0 23 19 42 42 42 +h171l128 -128v-247z" /> + <glyph glyph-name="find_replace" unicode="find_replace" +d="M355 189l103 -104l-31 -31l-104 103c-25 -18 -55 -29 -88 -29c-41 0 -79 17 -106 44l-44 -44v128h128l-54 -54c19 -19 47 -31 76 -31c52 0 94 36 104 85h43c-3 -25 -13 -48 -27 -67zM235 384c-52 0 -95 -36 -105 -85h-43c10 72 73 128 148 128c41 0 78 -17 105 -44l44 44 +v-128h-128l54 54c-19 19 -46 31 -75 31z" /> + <glyph glyph-name="fingerprint" unicode="fingerprint" +d="M318 43h-3c-34 9 -56 22 -79 45c-30 30 -46 69 -46 111c0 35 29 63 65 63s66 -28 66 -63c0 -23 19 -41 44 -41s45 18 45 41c0 80 -70 146 -155 146c-61 0 -116 -34 -141 -86c-8 -17 -12 -38 -12 -60c0 -17 1 -43 14 -77c4.57857 -13.7357 -15.4693 -18.3268 -20 -7 +c-10 28 -16 55 -16 84c0 26 5 49 15 69c28 60 91 99 160 99c97 0 176 -76 176 -168c0 -35 -30 -62 -66 -62s-65 27 -65 62c0 23 -20 42 -45 42s-44 -19 -44 -42c0 -36 14 -70 40 -96c20 -20 40 -31 70 -39c6 -1 8 -7 7 -13c-1 -5 -6 -8 -10 -8zM265 199 +c0 -48.7573 40.2888 -91 96 -91c9.9641 0 32.7732 7.36098 35 -6c1 -6 -3 -12 -9 -13c-12 -2 -23 -2 -26 -2c-25 0 -48 6 -66 19c-32 22 -51 56 -51 93c0 6 5 11 11 11s10 -5 10 -11zM208 47c-3 0 -5 1 -7 3c-19 19 -29 31 -43 57c-15 26 -23 58 -23 92c0 63 54 115 121 115 +s121 -52 121 -115c0 -6 -5 -10 -11 -10s-11 4 -11 10c0 52 -44 94 -99 94s-99 -42 -99 -94c0 -31 6 -59 19 -82c14 -25 24 -35 40 -52c4 -4 4 -11 0 -15c-2 -2 -5 -3 -8 -3zM75 305c-8.81177 0 -13.8926 7.8456 -9 16c21 30 48 54 80 70c67 35 153 35 220 0 +c32 -16 59 -39 80 -69c3 -5 2 -12 -3 -15s-12 -2 -15 3c-19 27 -43 47 -72 62c-61 31 -139 32 -200 0c-29 -15 -54 -36 -73 -63c-2 -3 -5 -4 -8 -4zM380 417c-2 0 -4 0 -5 1c-41 21 -77 30 -119 30s-83 -10 -119 -30c-11.6907 -7.0144 -21.6392 12.0165 -10 19 +c40 22 83 32 129 32c45 0 85 -10 129 -32c9.10556 -5.46333 5.20303 -20 -5 -20z" /> + <glyph glyph-name="first_page" unicode="first_page" +d="M128 384h43v-256h-43v256zM393 158l-30 -30l-128 128l128 128l30 -30l-98 -98z" /> + <glyph glyph-name="fitness_center" unicode="fitness_center" +d="M439 195l30 -31l-45 -45l30 -31l-30 -30l-31 30l-45 -45l-31 30l-30 -30l-31 30l76 76l-183 183l-76 -76l-30 31l30 30l-30 31l45 45l-30 31l30 30l31 -30l45 45l31 -30l30 30l31 -30l-76 -76l183 -183l76 76l30 -31z" /> + <glyph glyph-name="flag" unicode="flag" +d="M307 384h120v-213h-150l-8 42h-120v-149h-42v363h192z" /> + <glyph glyph-name="flare" unicode="flare" +d="M235 21v128h42v-128h-42zM120 150l46 46l30 -30l-46 -46zM316 166l30 30l46 -46l-30 -30zM256 320c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM363 277h128v-42h-128v42zM392 362l-46 -46l-30 30l46 46zM277 491v-128h-42v128h42zM196 346l-30 -30 +l-46 46l30 30zM149 277v-42h-128v42h128z" /> + <glyph glyph-name="flash_auto" unicode="flash_auto" +d="M359 349h50l-25 78zM405 469l69 -192h-41l-15 43h-68l-15 -43h-41l69 192h42zM64 469h213l-85 -192h85l-149 -256v192h-64v256z" /> + <glyph glyph-name="flash_off" unicode="flash_off" +d="M363 299l-33 -57l-181 181v46h214l-86 -170h86zM70 448l335 -336l-27 -27l-88 89l-77 -131v192h-64v79l-106 107z" /> + <glyph glyph-name="flash_on" unicode="flash_on" +d="M149 469h214l-86 -170h86l-150 -256v192h-64v234z" /> + <glyph glyph-name="flight" unicode="flight" +d="M217 320zM448 171l-171 53v-117l43 -32v-32l-75 21l-74 -21v32l42 32v117l-170 -53v42l170 107v117c0 18 14 32 32 32s32 -14 32 -32v-117l171 -107v-42z" /> + <glyph glyph-name="flight_land" unicode="flight_land" +d="M299 204c-68.2362 18.7638 -137.045 36.9549 -206 55l-34 10v110l31 -8l20 -50l106 -28v176l41 -11l59 -192l113 -30c17 -5 27 -23 23 -40c-5 -17 -22 -26 -39 -22zM53 107h406v-43h-406v43z" /> + <glyph glyph-name="flight_takeoff" unicode="flight_takeoff" +d="M471 306c4 -17 -6 -34 -23 -39c-68.7788 -18.2212 -137.501 -36.499 -206 -55l-113 -30l-34 -10c-18.76 31.9067 -37.3464 63.9869 -56 96l31 8l42 -32l106 28l-88 153l41 11l147 -137l114 30c17 5 35 -6 39 -23zM53 107h406v-43h-406v43z" /> + <glyph glyph-name="flip" unicode="flip" +d="M405 64v43h43c0 -23 -20 -43 -43 -43zM405 235v42h43v-42h-43zM320 405v43h43v-43h-43zM405 149v43h43v-43h-43zM235 21v470h42v-470h-42zM405 448c23 0 43 -20 43 -43h-43v43zM64 405c0 23 20 43 43 43h85v-43h-85v-298h85v-43h-85c-23 0 -43 20 -43 43v298zM405 320v43 +h43v-43h-43zM320 64v43h43v-43h-43z" /> + <glyph glyph-name="flip_to_back" unicode="flip_to_back" +d="M320 149v43h43v-43h-43zM320 405v43h43v-43h-43zM107 363v-256h256v-43h-256c-24 0 -43 20 -43 43v256h43zM405 149v43h43c0 -23 -20 -43 -43 -43zM405 320v43h43v-43h-43zM405 235v42h43v-42h-43zM192 149c-24 0 -43 20 -43 43h43v-43zM277 448v-43h-42v43h42zM405 448 +c23 0 43 -20 43 -43h-43v43zM277 192v-43h-42v43h42zM192 448v-43h-43c0 23 19 43 43 43zM192 277v-42h-43v42h43zM192 363v-43h-43v43h43z" /> + <glyph glyph-name="flip_to_front" unicode="flip_to_front" +d="M149 64v43h43v-43h-43zM235 64v43h42v-43h-42zM405 192v213h-213v-213h213zM405 448c23 0 43 -20 43 -43v-213c0 -23 -20 -43 -43 -43h-213c-24 0 -43 20 -43 43v213c0 23 19 43 43 43h213zM320 64v43h43v-43h-43zM64 320v43h43v-43h-43zM107 64c-24 0 -43 20 -43 43h43 +v-43zM64 149v43h43v-43h-43zM64 235v42h43v-42h-43z" /> + <glyph glyph-name="folder" unicode="folder" +d="M213 427l43 -43h171c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h128z" /> + <glyph glyph-name="folder_open" unicode="folder_open" +d="M427 128v213h-342v-213h342zM427 384c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h128l43 -43h171z" /> + <glyph glyph-name="folder_shared" unicode="folder_shared" +d="M405 149v22c0 28 -57 42 -85 42s-85 -14 -85 -42v-22h170zM320 320c-23 0 -43 -20 -43 -43s20 -42 43 -42s43 19 43 42s-20 43 -43 43zM427 384c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h128l43 -43h171z" /> + <glyph glyph-name="folder_special" unicode="folder_special" +d="M383 149l-17 71l55 48l-72 6l-29 67l-29 -67l-72 -6l55 -48l-17 -71l63 37zM427 384c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h128l43 -43h171z" /> + <glyph glyph-name="font_download" unicode="font_download" +d="M340 117h45l-109 278h-40l-109 -278h45l24 64h120zM427 469c23 0 42 -19 42 -42v-342c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v342c0 23 19 42 42 42h342zM212 224l44 118l44 -118h-88z" /> + <glyph glyph-name="format_align_center" unicode="format_align_center" +d="M64 448h384v-43h-384v43zM149 363h214v-43h-214v43zM64 235v42h384v-42h-384zM64 64v43h384v-43h-384zM149 192h214v-43h-214v43z" /> + <glyph glyph-name="format_align_justify" unicode="format_align_justify" +d="M64 448h384v-43h-384v43zM64 320v43h384v-43h-384zM64 235v42h384v-42h-384zM64 149v43h384v-43h-384zM64 64v43h384v-43h-384z" /> + <glyph glyph-name="format_align_left" unicode="format_align_left" +d="M64 448h384v-43h-384v43zM64 64v43h384v-43h-384zM64 235v42h384v-42h-384zM320 363v-43h-256v43h256zM320 192v-43h-256v43h256z" /> + <glyph glyph-name="format_align_right" unicode="format_align_right" +d="M64 448h384v-43h-384v43zM192 320v43h256v-43h-256zM64 235v42h384v-42h-384zM192 149v43h256v-43h-256zM64 64v43h384v-43h-384z" /> + <glyph glyph-name="format_bold" unicode="format_bold" +d="M288 181c18 0 32 14 32 32s-14 32 -32 32h-75v-64h75zM213 373v-64h64c18 0 32 14 32 32s-14 32 -32 32h-64zM333 282c28 -13 46 -41 46 -73c0 -45 -34 -81 -79 -81h-151v299h134c48 0 85 -38 85 -86c0 -22 -14 -45 -35 -59z" /> + <glyph glyph-name="format_clear" unicode="format_clear" +d="M128 405h299v-64h-124l-34 -80l-45 44l15 36h-51l-60 60v4zM70 405l6 -5l308 -309l-27 -27l-121 121l-33 -78h-64l52 123l-148 148z" /> + <glyph glyph-name="format_color_fill" unicode="format_color_fill" +d="M0 85h512v-85h-512v85zM405 267c0 0 43 -47 43 -75c0 -23 -20 -43 -43 -43s-42 20 -42 43c0 28 42 75 42 75zM111 299h205l-103 102zM353 321c13 -13 13 -33 0 -45l-117 -117c-6 -6 -15 -10 -23 -10s-16 4 -22 10l-118 117c-13 12 -13 32 0 45l110 110l-51 51l31 30z" /> + <glyph glyph-name="format_color_reset" unicode="format_color_reset" +d="M112 400l312 -312l-27 -27l-57 56c-23 -20 -52 -32 -84 -32c-71 0 -128 57 -128 128c0 26 12 57 28 88l-71 71zM384 213c0 -10 -1 -19 -3 -28l-183 184c30 43 58 75 58 75s128 -146 128 -231z" /> + <glyph glyph-name="format_color_text" unicode="format_color_text" +d="M205 256h102l-51 135zM235 448h42l117 -299h-48l-23 64h-134l-24 -64h-48zM0 85h512v-85h-512v85z" /> + <glyph glyph-name="format_indent_decrease" unicode="format_indent_decrease" +d="M235 235v42h213v-42h-213zM235 320v43h213v-43h-213zM64 448h384v-43h-384v43zM64 64v43h384v-43h-384zM64 256l85 85v-170zM235 149v43h213v-43h-213z" /> + <glyph glyph-name="format_indent_increase" unicode="format_indent_increase" +d="M235 235v42h213v-42h-213zM235 320v43h213v-43h-213zM64 448h384v-43h-384v43zM235 149v43h213v-43h-213zM64 341l85 -85l-85 -85v170zM64 64v43h384v-43h-384z" /> + <glyph glyph-name="format_italic" unicode="format_italic" +d="M213 427h171v-64h-60l-72 -171h47v-64h-171v64h60l72 171h-47v64z" /> + <glyph glyph-name="format_line_spacing" unicode="format_line_spacing" +d="M213 235v42h256v-42h-256zM213 107v42h256v-42h-256zM213 405h256v-42h-256v42zM128 363v-214h53l-74 -74l-75 74h53v214h-53l75 74l74 -74h-53z" /> + <glyph glyph-name="format_list_bulleted" unicode="format_list_bulleted" +d="M149 405h299v-42h-299v42zM149 235v42h299v-42h-299zM149 107v42h299v-42h-299zM85 160c18 0 32 -15 32 -32s-15 -32 -32 -32s-32 15 -32 32s14 32 32 32zM85 416c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM85 288c18 0 32 -14 32 -32 +s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32z" /> + <glyph glyph-name="format_list_numbered" unicode="format_list_numbered" +d="M149 235v42h299v-42h-299zM149 107v42h299v-42h-299zM149 405h299v-42h-299v42zM43 277v22h64v-20l-39 -44h39v-22h-64v20l38 44h-38zM64 341v64h-21v22h42v-86h-21zM43 149v22h64v-86h-64v22h42v10h-21v22h21v10h-42z" /> + <glyph glyph-name="format_paint" unicode="format_paint" +d="M384 427h64v-171h-171v-192c0 -12 -9 -21 -21 -21h-43c-12 0 -21 9 -21 21v235h213v85h-21v-21c0 -12 -9 -22 -21 -22h-256c-12 0 -22 10 -22 22v85c0 12 10 21 22 21h256c12 0 21 -9 21 -21v-21z" /> + <glyph glyph-name="format_quote" unicode="format_quote" +d="M299 149l42 86h-64v128h128v-128l-42 -86h-64zM128 149l43 86h-64v128h128v-128l-43 -86h-64z" /> + <glyph glyph-name="format_shapes" unicode="format_shapes" +d="M228 240h56l-28 82zM293 213h-75l-15 -42h-35l73 192h30l72 -192h-34zM405 405h43v43h-43v-43zM448 64v43h-43v-43h43zM363 107v42h42v214h-42v42h-214v-42h-42v-214h42v-42h214zM107 64v43h-43v-43h43zM64 448v-43h43v43h-43zM491 363h-43v-214h43v-128h-128v43h-214 +v-43h-128v128h43v214h-43v128h128v-43h214v43h128v-128z" /> + <glyph glyph-name="format_size" unicode="format_size" +d="M64 256v64h192v-64h-64v-149h-64v149h-64zM192 427h277v-64h-106v-256h-64v256h-107v64z" /> + <glyph glyph-name="format_strikethrough" unicode="format_strikethrough" +d="M64 213v43h384v-43h-384zM107 427h298v-64h-106v-64h-86v64h-106v64zM213 107v64h86v-64h-86z" /> + <glyph glyph-name="format_textdirection_l_to_r" unicode="format_textdirection_l_to_r" +d="M448 128l-85 -85v64h-256v42h256v64zM192 299c-47 0 -85 38 -85 85s38 85 85 85h171v-42h-43v-235h-43v235h-42v-235h-43v107z" /> + <glyph glyph-name="format_textdirection_r_to_l" unicode="format_textdirection_r_to_l" +d="M171 149h256v-42h-256v-64l-86 85l86 85v-64zM213 299c-47 0 -85 38 -85 85s38 85 85 85h171v-42h-43v-235h-42v235h-43v-235h-43v107z" /> + <glyph glyph-name="format_underlined" unicode="format_underlined" +d="M107 107h298v-43h-298v43zM256 149c-71 0 -128 57 -128 128v171h53v-171c0 -41 34 -74 75 -74s75 33 75 74v171h53v-171c0 -71 -57 -128 -128 -128z" /> + <glyph glyph-name="forum" unicode="forum" +d="M363 256c0 -12 -10 -21 -22 -21h-213l-85 -86v299c0 12 9 21 21 21h277c12 0 22 -9 22 -21v-192zM448 384c12 0 21 -9 21 -21v-320l-85 85h-235c-12 0 -21 9 -21 21v43h277v192h43z" /> + <glyph glyph-name="forward" unicode="forward" +d="M256 341v86l171 -171l-171 -171v86h-171v170h171z" /> + <glyph glyph-name="forward_10" unicode="forward_10" +d="M282 188c0 -3.2653 6.32517 -7 10 -7c2 0 5 0 7 2l4 5s2 4 2 6v43c0 0 -2 4 -2 6c0 2.75261 -8.21183 7 -11 7c-2 0 -4 -1 -6 -3l-4 -4s-3 -4 -3 -6v-43s3 -4 3 -6zM322 209c0 -6 0 -13 -2 -17l-6 -13s-7 -6 -11 -6s-9 -2 -13 -2s-9 0 -13 2s-6 4 -10 6 +c-6.74403 3.37202 -9 19.7461 -9 30v15c0 6 0 13 2 17l7 13s6 6 10 6s9 2 13 2s9 0 13 -2s7 -4 11 -6s4 -7 6 -13s2 -11 2 -17v-15zM233 171h-20v70l-21 -6v15l38 12h3v-91zM85 235c0 94 77 170 171 170v86l107 -107l-107 -107v86c-70 0 -128 -58 -128 -128 +s58 -128 128 -128s128 58 128 128h43c0 -94 -77 -171 -171 -171s-171 77 -171 171z" /> + <glyph glyph-name="forward_30" unicode="forward_30" +d="M85 235c0 94 77 170 171 170v86l107 -107l-107 -107v86c-70 0 -128 -58 -128 -128s58 -128 128 -128s128 58 128 128h43c0 -94 -77 -171 -171 -171s-171 77 -171 171zM284 188c0 -3.2653 6.32517 -7 10 -7c2 0 5 0 7 2l4 5s2 4 2 6v43c0 0 -2 4 -2 6 +c0 2.75261 -8.21183 7 -11 7c-2 0 -4 -1 -6 -3l-4 -4s-2 -4 -2 -6v-43s2 -4 2 -6zM326 209c0 -6 0 -13 -2 -17l-6 -13s-7 -6 -11 -6s-9 -2 -13 -2c-10.126 0 -16.1493 4.57466 -23 8c-4 2 -4 7 -6 13s-3 11 -3 17v15c0 6 1 13 3 17l6 13s7 6 11 6s8 2 12 2s9 0 13 -2 +s7 -4 11 -6s4 -7 6 -13s2 -11 2 -17v-15zM213 224c8.11936 0 15 4.95913 15 13v4s-2 2 -2 4s-2 2 -4 2h-11s-2 -2 -4 -2s-2 -2 -2 -4v-4h-22c0 9.89385 8.81974 23 18 23c2 0 8 2 10 2c8.67272 0 17.6319 -2.81597 24 -6c5.06488 -2.53244 8 -12.109 8 -19v-7s-2 -4 -2 -6 +s-2 -4 -4 -4s-5 -3 -7 -5c4 -2 9 -4 11 -8s4 -9 4 -13s0 -9 -2 -11s-4 -6 -6 -8s-7 -4 -11 -4s-9 -2 -13 -2s-8 0 -10 2s-7 2 -11 4c-5.58093 2.79046 -9 13.5084 -9 21h18v-4s2 -2 2 -4s2 -2 4 -2h11s2 2 4 2s2 2 2 4v11s-2 2 -2 4s-2 2 -4 2h-13v15h8z" /> + <glyph glyph-name="forward_5" unicode="forward_5" +d="M250 222c-1.79204 -0.716817 -7 -2.40231 -7 -4c0 -2 -2 -3 -2 -3h-13l5 47h51v-15h-37l-2 -19s2 0 2 2s3 1 3 3s2 0 4 0h4c4 0 9 -1 11 -3s6 -4 8 -6c4.43641 -4.43641 9 -13.6284 9 -23c0 -4 0 -9 -2 -11s-3 -7 -7 -11c-5.62284 -5.62284 -13.295 -8 -23 -8 +c-4 0 -9 0 -11 2s-6 2 -10 4c-5.5956 2.7978 -9 11.277 -9 19h17c0 -7.40446 5.29508 -10 13 -10c2 0 4 0 6 2l5 4s2 4 2 6v13l-2 4l-5 5s-4 2 -6 2h-4zM85 235c0 94 77 170 171 170v86l107 -107l-107 -107v86c-70 0 -128 -58 -128 -128s58 -128 128 -128s128 58 128 128h43 +c0 -94 -77 -171 -171 -171s-171 77 -171 171z" /> + <glyph glyph-name="free_breakfast" unicode="free_breakfast" +d="M85 107h342v-43h-342v43zM427 341v64h-43v-64h43zM427 448c24 0 42 -19 42 -43v-64c0 -23 -18 -42 -42 -42h-43v-64c0 -47 -38 -86 -85 -86h-128c-47 0 -86 39 -86 86v213h342z" /> + <glyph glyph-name="fullscreen" unicode="fullscreen" +d="M299 405h106v-106h-42v64h-64v42zM363 149v64h42v-106h-106v42h64zM107 299v106h106v-42h-64v-64h-42zM149 213v-64h64v-42h-106v106h42z" /> + <glyph glyph-name="fullscreen_exit" unicode="fullscreen_exit" +d="M341 341h64v-42h-106v106h42v-64zM299 107v106h106v-42h-64v-64h-42zM171 341v64h42v-106h-106v42h64zM107 171v42h106v-106h-42v64h-64z" /> + <glyph glyph-name="functions" unicode="functions" +d="M384 427v-64h-149l106 -107l-106 -107h149v-64h-256v43l139 128l-139 128v43h256z" /> + <glyph glyph-name="g_translate" unicode="g_translate" +d="M448 85v278c0 12 -9 21 -21 21h-188l25 -86h41v22h23v-22h77v-22h-27c-7 -27 -22 -53 -41 -75l58 -57l-15 -16l-58 57l-19 -19l17 -59l-43 -43h150c12 0 21 9 21 21zM298 253c5 -10 13 -23 24 -36c26 31 33 59 33 59h-85l7 -23h21zM282 237l13 -47l12 11 +c-10 11 -18 23 -25 36zM237 286c0 4.92043 -0.140331 11.2807 -2 15h-84v-33h47c-3 -13 -16 -32 -45 -32c-28 0 -51 24 -51 52s23 52 51 52c16 0 26 -7 32 -13l2 -1l26 25l-2 1c-16 15 -36 23 -58 23c-48 0 -87 -39 -87 -87s39 -87 87 -87c49 0 84 35 84 85zM427 405 +c23 0 42 -19 42 -42v-278c0 -23 -19 -42 -42 -42h-171l-21 64h-150c-23 0 -42 19 -42 42v278c0 23 19 42 42 42h128l19 -64h195z" /> + <glyph glyph-name="gamepad" unicode="gamepad" +d="M352 320h117v-128h-117l-64 64zM192 160l64 64l64 -64v-117h-128v117zM160 320l64 -64l-64 -64h-117v128h117zM320 352l-64 -64l-64 64v117h128v-117z" /> + <glyph glyph-name="games" unicode="games" +d="M352 320h117v-128h-117l-64 64zM192 160l64 64l64 -64v-117h-128v117zM160 320l64 -64l-64 -64h-117v128h117zM320 352l-64 -64l-64 64v117h128v-117z" /> + <glyph glyph-name="gavel" unicode="gavel" +d="M82 310l120 -121l-60 -60l-121 120zM263 491l120 -121l-60 -60l-121 120zM112 340l60 60l302 -302l-60 -60zM21 64h256v-43h-256v43z" /> + <glyph glyph-name="gesture" unicode="gesture" +d="M296 116c15 0 40 18 46 75c-46 -12 -62 -46 -62 -59c0 -10 9 -16 16 -16zM98 365l-37 36c5 6 10 12 18 20c5 5 30 27 58 27c19 0 54 -15 54 -61c0 -29 -11 -46 -28 -70c-10 -14 -32 -52 -39 -75c-8 -23 -3 -41 7 -41c9 0 19 12 24 18c5 5 37 42 49 58c16 20 57 60 105 60 +c63 0 83 -54 86 -89h53v-53h-52c-9 -102 -66 -131 -101 -131c-38 0 -68 30 -68 66s34 101 115 115c-2 17 -3 38 -38 38c-27 0 -61 -41 -87 -73c-24 -29 -42 -52 -65 -59c-49.7758 -15.7187 -85 28.2434 -85 73c0 52 56 126 61 135c6 10 17 28 6 32c-7 3 -21 -11 -36 -26z +" /> + <glyph glyph-name="get_app" unicode="get_app" +d="M107 128h298v-43h-298v43zM405 320l-149 -149l-149 149h85v128h128v-128h85z" /> + <glyph glyph-name="gif" unicode="gif" +d="M405 288h-64v-21h43v-32h-43v-43h-32v128h96v-32zM192 320c13 0 21 -10 21 -21v-11h-74v-64h42v32h32v-43c0 -11 -8 -21 -21 -21h-64c-13 0 -21 10 -21 21v86c0 11 8 21 21 21h64zM245 320h32v-128h-32v128z" /> + <glyph glyph-name="goat" unicode="goat" +d="M511 318c1 -1 1 -4 0 -5l-25 -32c-1 -1 -3 -2 -4 -2l-15 3l-7 -22c-3 -5 -10 -5 -13 0l-14 30l-23 5l-47 -112l17 -136c0 -3 -2 -4 -4 -4h-20c-2 0 -3 1 -4 3l-20 81l-10 17l-25 -98c0 -2 -2 -3 -4 -3h-21c-2 0 -4 2 -4 4l23 135h-135l-35 -66l8 -68c1 -3 -1 -5 -4 -5 +h-20c-1 0 -3 0 -4 2l-28 102l-34 -39l6 -60c1 -3 -1 -5 -4 -5h-22c-2 0 -4 1 -4 2l-13 56l21 82v144s-23 9 -23 30h274c0 0 48 -1 95 33c0 0 -8 22 6 36c0 0 28 -20 36 -25c10 -6 17 5 14 14c-2 6 -9 28 -45 42c-4.57884 1.52628 -15.2106 2.3682 -13 9c0 2 2 3 4 3 +c44 -6 70 -42 77 -58c1 -2 20 -15 18 -38c0 -3 0 -5 2 -7z" /> + <glyph glyph-name="golf_course" unicode="golf_course" +d="M363 386l-128 -66v-193c61 -3 106 -21 106 -42c0 -23 -57 -42 -128 -42s-128 19 -128 42c0 16 26 30 64 37v-37h43v384zM384 96c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32z" /> + <glyph glyph-name="gps_fixed" unicode="gps_fixed" +d="M256 107c83 0 149 66 149 149s-66 149 -149 149s-149 -66 -149 -149s66 -149 149 -149zM447 277h44v-42h-44c-10 -89 -81 -160 -170 -170v-44h-42v44c-89 10 -160 81 -170 170h-44v42h44c10 89 81 160 170 170v44h42v-44c89 -10 160 -81 170 -170zM256 341 +c47 0 85 -38 85 -85s-38 -85 -85 -85s-85 38 -85 85s38 85 85 85z" /> + <glyph glyph-name="gps_not_fixed" unicode="gps_not_fixed" +d="M256 107c83 0 149 66 149 149s-66 149 -149 149s-149 -66 -149 -149s66 -149 149 -149zM447 277h44v-42h-44c-10 -89 -81 -160 -170 -170v-44h-42v44c-89 10 -160 81 -170 170h-44v42h44c10 89 81 160 170 170v44h42v-44c89 -10 160 -81 170 -170z" /> + <glyph glyph-name="gps_off" unicode="gps_off" +d="M347 138l-209 209c-19 -25 -31 -57 -31 -91c0 -83 66 -149 149 -149c34 0 66 12 91 31zM64 421l27 27l357 -357l-27 -27l-44 44c-28 -23 -62 -39 -100 -43v-44h-42v44c-89 10 -160 81 -170 170h-44v42h44c4 38 20 72 43 100zM447 277h44v-42h-44c-3 -24 -10 -48 -21 -68 +l-32 32c7 17 11 37 11 57c0 83 -66 149 -149 149c-20 0 -40 -4 -57 -11l-32 32c21 11 44 18 68 21v44h42v-44c89 -10 160 -81 170 -170z" /> + <glyph glyph-name="grade" unicode="grade" +d="M256 144l-132 -80l35 150l-116 101l153 13l60 141l60 -141l153 -13l-116 -101l35 -150z" /> + <glyph glyph-name="gradient" unicode="gradient" +d="M405 277v128h-298v-128h42v-42h43v-43h43v43h42v-43h43v43h43v42h42zM363 128v43h-43v-43h43zM277 128v43h-42v-43h42zM192 128v43h-43v-43h43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM149 320h43 +v-43h-43v43zM320 320h43v-43h-43v43zM235 320h42v-43h43v-42h-43v42h-42v-42h-43v42h43v43zM363 235v-43h42v43h-42zM149 235h-42v-43h42v43z" /> + <glyph glyph-name="grain" unicode="grain" +d="M213 427c23 0 43 -20 43 -43s-20 -43 -43 -43s-42 20 -42 43s19 43 42 43zM299 341c23 0 42 -19 42 -42s-19 -43 -42 -43s-43 20 -43 43s20 42 43 42zM384 256c23 0 43 -20 43 -43s-20 -42 -43 -42s-43 19 -43 42s20 43 43 43zM299 171c23 0 42 -20 42 -43 +s-19 -43 -42 -43s-43 20 -43 43s20 43 43 43zM384 341c-23 0 -43 20 -43 43s20 43 43 43s43 -20 43 -43s-20 -43 -43 -43zM128 171c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM128 341c23 0 43 -19 43 -42s-20 -43 -43 -43s-43 20 -43 43s20 42 43 42z +M213 256c23 0 43 -20 43 -43s-20 -42 -43 -42s-42 19 -42 42s19 43 42 43z" /> + <glyph glyph-name="graphic_eq" unicode="graphic_eq" +d="M405 299h43v-86h-43v86zM320 128v256h43v-256h-43zM64 213v86h43v-86h-43zM235 43v426h42v-426h-42zM149 128v256h43v-256h-43z" /> + <glyph glyph-name="grid_off" unicode="grid_off" +d="M341 85h31l-31 31v-31zM299 85v74l-12 12h-74v-86h86zM171 213v74l-12 12h-74v-86h86zM171 85v86h-86v-86h86zM85 372v-31h31zM213 244v-31h31zM27 485l458 -458l-27 -27l-43 43h-330c-23 0 -42 19 -42 42v330l-43 43zM341 427v-86h86v86h-86zM171 427h-31l-43 42h330 +c23 0 42 -19 42 -42v-330l-42 43v31h-31l-43 42h74v86h-86v-74l-42 43v31h-31l-43 42h74v86h-86v-74l-42 43v31z" /> + <glyph glyph-name="grid_on" unicode="grid_on" +d="M427 341v86h-86v-86h86zM427 213v86h-86v-86h86zM427 85v86h-86v-86h86zM299 341v86h-86v-86h86zM299 213v86h-86v-86h86zM299 85v86h-86v-86h86zM171 341v86h-86v-86h86zM171 213v86h-86v-86h86zM171 85v86h-86v-86h86zM427 469c23 0 42 -19 42 -42v-342 +c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v342c0 23 19 42 42 42h342z" /> + <glyph glyph-name="group" unicode="group" +d="M341 235c50 0 150 -25 150 -75v-53h-128v53c0 32 -17 56 -42 74c7 1 14 1 20 1zM171 235c50 0 149 -25 149 -75v-53h-299v53c0 50 100 75 150 75zM171 277c-35 0 -64 29 -64 64s29 64 64 64s63 -29 63 -64s-28 -64 -63 -64zM341 277c-35 0 -64 29 -64 64s29 64 64 64 +s64 -29 64 -64s-29 -64 -64 -64z" /> + <glyph glyph-name="group_add" unicode="group_add" +d="M277 235c43 0 128 -21 128 -64v-43h-256v43c0 43 85 64 128 64zM419 231c43 -7 93 -27 93 -60v-43h-64v43c0 25 -11 44 -29 60zM277 277c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64zM384 277c-7 0 -13 1 -19 3c12 17 19 38 19 61s-7 44 -19 61 +c6 2 12 3 19 3c35 0 64 -29 64 -64s-29 -64 -64 -64zM171 299v-43h-64v-64h-43v64h-64v43h64v64h43v-64h64z" /> + <glyph glyph-name="group_work" unicode="group_work" +d="M341 139c29 0 54 24 54 53s-25 53 -54 53s-53 -24 -53 -53s24 -53 53 -53zM203 341c0 -29 24 -53 53 -53s53 24 53 53s-24 54 -53 54s-53 -25 -53 -54zM171 139c29 0 53 24 53 53s-24 53 -53 53s-54 -24 -54 -53s25 -53 54 -53zM256 469c118 0 213 -95 213 -213 +s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="hd" unicode="hd" +d="M309 224v64h43v-64h-43zM277 320v-128h86c12 0 21 9 21 21v86c0 12 -9 21 -21 21h-86zM235 192v128h-32v-53h-43v53h-32v-128h32v43h43v-43h32zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h298z" /> + <glyph glyph-name="hdr_off" unicode="hdr_off" +d="M53 459c135.424 -135.909 271.816 -270.85 408 -406l-24 -23l-162 162h-72v73l-32 32v-105h-32v53h-43v-53h-32v128h32v-43h43v43h8l-117 117zM277 288h-8l-32 32h40c17 0 32 -15 32 -32v-41l-32 32v9zM373 288v-21h43v21h-43zM373 192h-8l-24 23v105h75 +c17 0 32 -15 32 -32v-21c0 -13 -8 -26 -19 -30l19 -45h-32l-19 43h-24v-43z" /> + <glyph glyph-name="hdr_on" unicode="hdr_on" +d="M277 224v64h-42v-64h42zM277 320c17 0 32 -15 32 -32v-64c0 -17 -15 -32 -32 -32h-74v128h74zM139 277v43h32v-128h-32v53h-43v-53h-32v128h32v-43h43zM416 267v21h-43v-21h43zM448 267c0 -13 -8 -24 -19 -30l19 -45h-32l-19 43h-24v-43h-32v128h75c17 0 32 -15 32 -32 +v-21z" /> + <glyph glyph-name="hdr_strong" unicode="hdr_strong" +d="M107 213c23 0 42 20 42 43s-19 43 -42 43s-43 -20 -43 -43s20 -43 43 -43zM107 341c47 0 85 -38 85 -85s-38 -85 -85 -85s-86 38 -86 85s39 85 86 85zM363 384c71 0 128 -57 128 -128s-57 -128 -128 -128s-128 57 -128 128s57 128 128 128z" /> + <glyph glyph-name="hdr_weak" unicode="hdr_weak" +d="M363 171c47 0 85 38 85 85s-38 85 -85 85s-86 -38 -86 -85s39 -85 86 -85zM363 384c71 0 128 -57 128 -128s-57 -128 -128 -128s-128 57 -128 128s57 128 128 128zM107 341c47 0 85 -38 85 -85s-38 -85 -85 -85s-86 38 -86 85s39 85 86 85z" /> + <glyph glyph-name="headset" unicode="headset" +d="M256 491c106 0 192 -86 192 -192v-150c0 -35 -29 -64 -64 -64h-64v171h85v43c0 83 -66 149 -149 149s-149 -66 -149 -149v-43h85v-171h-64c-35 0 -64 29 -64 64v150c0 106 86 192 192 192z" /> + <glyph glyph-name="headset_mic" unicode="headset_mic" +d="M256 491c106 0 192 -86 192 -192v-214c0 -35 -29 -64 -64 -64h-128v43h149v21h-85v171h85v43c0 83 -66 149 -149 149s-149 -66 -149 -149v-43h85v-171h-64c-35 0 -64 29 -64 64v150c0 106 86 192 192 192z" /> + <glyph glyph-name="healing" unicode="healing" +d="M355 78l78 78l-78 77l-77 -78zM299 277c-12 0 -22 -9 -22 -21s10 -21 22 -21s21 9 21 21s-9 21 -21 21zM256 192c12 0 21 9 21 21s-9 22 -21 22s-21 -10 -21 -22s9 -21 21 -21zM213 235c12 0 22 9 22 21s-10 21 -22 21s-21 -9 -21 -21s9 -21 21 -21zM156 278l77 78 +l-77 77l-78 -78zM256 320c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM378 256l85 -85c8 -8 8 -22 0 -30l-92 -93c-4 -4 -9 -6 -15 -6s-12 2 -16 6l-84 85l-85 -85c-8 -8 -22 -8 -30 0l-93 93c-8 8 -8 22 0 30l85 85l-85 84c-8 8 -8 23 0 31l93 92 +c4 4 10 6 15 6c6 0 11 -2 15 -6l85 -85l84 85c8 8 23 8 31 0l92 -92c8 -8 8 -23 0 -31z" /> + <glyph glyph-name="hearing" unicode="hearing" +d="M245 320c0 29 25 53 54 53s53 -24 53 -53s-24 -53 -53 -53s-54 24 -54 53zM163 456c-35 -35 -56 -83 -56 -136s21 -101 56 -136l-30 -30c-42 42 -69 101 -69 166s27 124 69 166zM363 85c23 0 42 20 42 43h43c0 -47 -38 -85 -85 -85c-12 0 -24 2 -35 7 +c-29 15 -46 37 -59 76c-7 21 -19 31 -36 44c-19 14 -42 32 -61 67c-15 27 -23 56 -23 83c0 84 66 149 150 149s149 -65 149 -149h-43c0 60 -46 107 -106 107s-107 -47 -107 -107c0 -20 6 -43 17 -63c15 -28 33 -41 50 -54c20 -15 40 -31 51 -64c11 -32 21 -42 36 -50 +c4 -2 11 -4 17 -4z" /> + <glyph glyph-name="help" unicode="help" +d="M321 272c12 12 20 29 20 48c0 47 -38 85 -85 85s-85 -38 -85 -85h42c0 23 20 43 43 43s43 -20 43 -43c0 -12 -5 -22 -13 -30l-26 -27c-15 -16 -25 -37 -25 -60v-11h42c0 32 10 44 25 60zM277 107v42h-42v-42h42zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213 +s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="help_outline" unicode="help_outline" +d="M256 384c47 0 85 -38 85 -85c0 -53 -64 -59 -64 -107h-42c0 69 64 64 64 107c0 23 -20 42 -43 42s-43 -19 -43 -42h-42c0 47 38 85 85 85zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213 +s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM235 128v43h42v-43h-42z" /> + <glyph glyph-name="high_quality" unicode="high_quality" +d="M309 224v64h43v-64h-43zM384 213v86c0 12 -9 21 -21 21h-64c-12 0 -22 -9 -22 -21v-86c0 -12 10 -21 22 -21h16v-32h32v32h16c12 0 21 9 21 21zM235 192v128h-32v-53h-43v53h-32v-128h32v43h43v-43h32zM405 427c23 0 43 -20 43 -43v-256c0 -23 -20 -43 -43 -43h-298 +c-24 0 -43 20 -43 43v256c0 23 19 43 43 43h298z" /> + <glyph glyph-name="highlight" unicode="highlight" +d="M362 372l45 45l30 -30l-45 -46zM75 387l30 30l45 -45l-30 -31zM235 469h42v-64h-42v64zM128 213v107h256v-107l-64 -64v-106h-128v106z" /> + <glyph glyph-name="highlight_off" unicode="highlight_off" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM311 341l30 -30l-55 -55l55 -55l-30 -30l-55 55l-55 -55l-30 30l55 55l-55 55l30 30l55 -55z +" /> + <glyph glyph-name="history" unicode="history" +d="M256 341h32v-90l75 -45l-16 -26l-91 55v106zM277 448c106 0 192 -86 192 -192s-86 -192 -192 -192c-53 0 -100 21 -135 56l30 31c27 -27 64 -44 105 -44c83 0 150 66 150 149s-67 149 -150 149s-149 -66 -149 -149h64l-86 -86l-2 3l-83 83h64c0 106 86 192 192 192z" /> + <glyph glyph-name="home" unicode="home" +d="M213 85h-106v171h-64l213 192l213 -192h-64v-171h-106v128h-86v-128z" /> + <glyph glyph-name="hot_tub" unicode="hot_tub" +d="M313 387c22 -21 31 -50 27 -79l-1 -9h-41l3 12c3.05626 17.3188 -3.40602 35.406 -16 48c-22 22 -32 51 -28 80l1 9h41l-2 -13c-3 -17 2 -34 14 -47zM398 387c22 -21 32 -50 28 -79l-2 -9h-40l2 12c3 17 -2 34 -14 47l-2 1c-22 22 -32 51 -28 80l2 9h40l-2 -13 +c-3 -17 2 -34 14 -47zM405 85v128h-42v-128h42zM320 85v128h-43v-128h43zM235 85v128h-43v-128h43zM149 85v128h-42v-128h42zM238 256h231v-171c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v171h64v16c0 26 22 48 48 48c15.3845 0 28.1542 -8.15417 36 -16l29 -33 +c5 -6 11 -10 18 -15zM107 384c0 24 18 43 42 43s43 -19 43 -43s-19 -43 -43 -43s-42 19 -42 43z" /> + <glyph glyph-name="hotel" unicode="hotel" +d="M405 363c47 0 86 -39 86 -86v-192h-43v64h-384v-64h-43v320h43v-192h171v150h170zM149 235c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64z" /> + <glyph glyph-name="hourglass_empty" unicode="hourglass_empty" +d="M256 267l85 85v75h-170v-75zM341 160l-85 85l-85 -85v-75h170v75zM128 469h256v-128l-85 -85l85 -85v-128h-256v128l85 85l-85 85v128z" /> + <glyph glyph-name="hourglass_full" unicode="hourglass_full" +d="M128 469h256v-128l-85 -85l85 -85v-128h-256v128l85 85l-85 85v128z" /> + <glyph glyph-name="http" unicode="http" +d="M459 267v21h-43v-21h43zM459 320c17 0 32 -15 32 -32v-21c0 -17 -15 -32 -32 -32h-43v-43h-32v128h75zM267 288v32h96v-32h-32v-96h-32v96h-32zM149 288v32h96v-32h-32v-96h-32v96h-32zM96 277v43h32v-128h-32v53h-43v-53h-32v128h32v-43h43z" /> + <glyph glyph-name="https" unicode="https" +d="M322 341v43c0 36 -30 66 -66 66s-66 -30 -66 -66v-43h132zM256 149c23 0 43 20 43 43s-20 43 -43 43s-43 -20 -43 -43s20 -43 43 -43zM384 341c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h21v43c0 59 48 107 107 107 +s107 -48 107 -107v-43h21z" /> + <glyph glyph-name="image" unicode="image" +d="M181 224l-74 -96h298l-96 128l-74 -96zM448 107c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298c23 0 43 -20 43 -43v-298z" /> + <glyph glyph-name="image_aspect_ratio" unicode="image_aspect_ratio" +d="M427 128v256h-342v-256h342zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342zM256 299v-43h-43v43h43zM171 299v-43h-43v43h43zM341 213v-42h-42v42h42zM341 299v-43h-42v43h42z" /> + <glyph glyph-name="import_contacts" unicode="import_contacts" +d="M448 117v246c-23 7 -49 10 -75 10c-36 0 -88 -14 -117 -32v-245c29 18 81 32 117 32c26 0 52 -4 75 -11zM373 416c44.2046 0 90.7488 -11.0375 118 -32v-311c0 -5 -6 -11 -11 -11c-2 0 -3 0 -5 1c-30 16 -67 22 -102 22c-36 0 -88 -14 -117 -32c-31 23 -75 32 -117 32 +c-31 0 -73 -9 -102 -23c-2 0 -3 -1 -5 -1c-5 0 -11 5 -11 10v313c31 23 76 32 118 32s86 -9 117 -32c31 23 75 32 117 32z" /> + <glyph glyph-name="import_export" unicode="import_export" +d="M341 149h64l-85 -85l-85 85h64v150h42v-150zM192 448l85 -85h-64v-150h-42v150h-64z" /> + <glyph glyph-name="important_devices" unicode="important_devices" +d="M255 320h65l-53 -38l20 -62l-52 39l-53 -39l20 62l-53 38h65l21 64zM427 469c23 0 42 -18 42 -42v-107h-42v107h-384v-256h277v-43h-43v-43h43v-42h-171v42h43v43h-149c-24 0 -43 20 -43 43v256c0 24 19 42 43 42h384zM491 85v150h-107v-150h107zM491 277 +c12 0 21 -9 21 -21v-192c0 -12 -9 -21 -21 -21h-107c-12 0 -21 9 -21 21v192c0 12 9 21 21 21h107z" /> + <glyph glyph-name="inbox" unicode="inbox" +d="M405 192v213h-299v-213h86c0 -35 29 -64 64 -64s64 29 64 64h85zM405 448c23 0 43 -19 43 -43v-298c0 -23 -20 -43 -43 -43h-299c-24 0 -42 20 -42 43v298c0 24 18 43 42 43h299z" /> + <glyph glyph-name="indeterminate_check_box" unicode="indeterminate_check_box" +d="M363 235v42h-214v-42h214zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="info" unicode="info" +d="M277 320v43h-42v-43h42zM277 149v128h-42v-128h42zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="info_outline" unicode="info_outline" +d="M235 320v43h42v-43h-42zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM235 149v128h42v-128h-42z" /> + <glyph glyph-name="input" unicode="input" +d="M235 171v64h-214v42h214v64l85 -85zM448 448c23 0 43 -19 43 -43v-299c0 -23 -20 -42 -43 -42h-384c-23 0 -43 19 -43 42v86h43v-86h384v300h-384v-86h-43v85c0 23 20 43 43 43h384z" /> + <glyph glyph-name="insert_chart" unicode="insert_chart" +d="M363 149v86h-43v-86h43zM277 149v214h-42v-214h42zM192 149v150h-43v-150h43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="insert_comment" unicode="insert_comment" +d="M384 341v43h-256v-43h256zM384 277v43h-256v-43h256zM384 213v43h-256v-43h256zM427 469c23 0 42 -19 42 -42v-384l-85 85h-299c-23 0 -42 20 -42 43v256c0 23 19 42 42 42h342z" /> + <glyph glyph-name="insert_drive_file" unicode="insert_drive_file" +d="M277 320h118l-118 117v-117zM128 469h171l128 -128v-256c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42l1 342c0 23 19 42 42 42z" /> + <glyph glyph-name="insert_emoticon" unicode="insert_emoticon" +d="M256 139c-50 0 -92 30 -109 74h218c-17 -44 -59 -74 -109 -74zM181 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM331 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM256 85c94 0 171 77 171 171s-77 171 -171 171 +s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="insert_invitation" unicode="insert_invitation" +d="M405 107v234h-298v-234h298zM341 491h43v-43h21c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43zM363 256v-107h-107v107h107z" /> + <glyph glyph-name="insert_link" unicode="insert_link" +d="M363 363c59 0 106 -48 106 -107s-47 -107 -106 -107h-86v41h86c36 0 66 30 66 66s-30 66 -66 66h-86v41h86zM171 235v42h170v-42h-170zM83 256c0 -36 30 -66 66 -66h86v-41h-86c-59 0 -106 48 -106 107s47 107 106 107h86v-41h-86c-36 0 -66 -30 -66 -66z" /> + <glyph glyph-name="insert_photo" unicode="insert_photo" +d="M181 224l-74 -96h298l-96 128l-74 -96zM448 107c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298c23 0 43 -20 43 -43v-298z" /> + <glyph glyph-name="invert_colors" unicode="invert_colors" +d="M256 94v309l-90 -90c-24 -24 -38 -57 -38 -91c0 -68.7916 59.1998 -128 128 -128zM377 343c67 -67 67 -174 0 -241c-33 -33 -77 -50 -121 -50s-88 17 -121 50c-67 67 -67 174 0 241l121 121z" /> + <glyph glyph-name="invert_colors_off" unicode="invert_colors_off" +d="M256 403l-49 -48l-30 30l79 79l121 -121c52 -52 63 -129 34 -192l-155 154v98zM256 94v103l-102 102c-17 -22 -26 -49 -26 -77c0 -68.7916 59.1998 -128 128 -128zM441 67l7 -8l-27 -27l-58 58c-31 -25 -69 -38 -107 -38c-44 0 -88 17 -121 50c-62 63 -66 161 -12 228 +l-59 59l27 27c116.495 -116.495 232.353 -233.66 350 -349z" /> + <glyph glyph-name="iso" unicode="iso" +d="M363 149h-107v32h107v-32zM405 107v298l-298 -298h298zM117 352v-32h43v-43h32v43h43v32h-43v43h-32v-43h-43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="keyboard" unicode="keyboard" +d="M405 299v42h-42v-42h42zM405 235v42h-42v-42h42zM341 299v42h-42v-42h42zM341 235v42h-42v-42h42zM341 149v43h-170v-43h170zM149 299v42h-42v-42h42zM149 235v42h-42v-42h42zM171 277v-42h42v42h-42zM171 341v-42h42v42h-42zM235 277v-42h42v42h-42zM235 341v-42h42v42 +h-42zM427 405c23 0 42 -19 42 -42v-214c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v214c0 23 19 42 42 42h342z" /> + <glyph glyph-name="keyboard_arrow_down" unicode="keyboard_arrow_down" +d="M158 345l98 -98l98 98l30 -30l-128 -128l-128 128z" /> + <glyph glyph-name="keyboard_arrow_left" unicode="keyboard_arrow_left" +d="M329 169l-30 -30l-128 128l128 128l30 -30l-98 -98z" /> + <glyph glyph-name="keyboard_arrow_right" unicode="keyboard_arrow_right" +d="M183 163l98 98l-98 98l30 30l128 -128l-128 -128z" /> + <glyph glyph-name="keyboard_arrow_up" unicode="keyboard_arrow_up" +d="M158 183l-30 30l128 128l128 -128l-30 -30l-98 98z" /> + <glyph glyph-name="keyboard_backspace" unicode="keyboard_backspace" +d="M448 277v-42h-302l76 -77l-30 -30l-128 128l128 128l30 -30l-76 -77h302z" /> + <glyph glyph-name="keyboard_capslock" unicode="keyboard_capslock" +d="M128 128v43h256v-43h-256zM256 333l-98 -98l-30 30l128 128l128 -128l-30 -30z" /> + <glyph glyph-name="keyboard_hide" unicode="keyboard_hide" +d="M256 21l-85 86h170zM405 341v43h-42v-43h42zM405 277v43h-42v-43h42zM341 341v43h-42v-43h42zM341 277v43h-42v-43h42zM341 192v43h-170v-43h170zM149 341v43h-42v-43h42zM149 277v43h-42v-43h42zM171 320v-43h42v43h-42zM171 384v-43h42v43h-42zM235 320v-43h42v43h-42z +M235 384v-43h42v43h-42zM427 448c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v213c0 23 19 43 42 43h342z" /> + <glyph glyph-name="keyboard_return" unicode="keyboard_return" +d="M405 363h43v-128h-324l77 -77l-30 -30l-128 128l128 128l30 -30l-77 -77h281v86z" /> + <glyph glyph-name="keyboard_tab" unicode="keyboard_tab" +d="M427 384h42v-256h-42v256zM247 354l30 30l128 -128l-128 -128l-30 30l77 77h-303v42h303z" /> + <glyph glyph-name="keyboard_voice" unicode="keyboard_voice" +d="M369 256h36c0 -73 -58 -133 -128 -143v-70h-42v70c-70 10 -128 70 -128 143h36c0 -64 54 -109 113 -109s113 45 113 109zM256 192c-35 0 -64 29 -64 64v128c0 35 29 64 64 64s64 -29 64 -64v-128c0 -35 -29 -64 -64 -64z" /> + <glyph glyph-name="kitchen" unicode="kitchen" +d="M171 256h42v-107h-42v107zM171 405h42v-64h-42v64zM384 320v107h-256v-107h256zM384 85v193h-256v-193h256zM384 469c23 0 43 -18 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v342c0 24 20 42 43 42h256z" /> + <glyph glyph-name="label" unicode="label" +d="M376 387l93 -131l-93 -131c-8 -11 -21 -18 -35 -18h-234c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h234c14 0 27 -7 35 -18z" /> + <glyph glyph-name="label_outline" unicode="label_outline" +d="M341 149l76 107l-76 107h-234v-214h234zM376 387l93 -131l-93 -131c-8 -11 -21 -18 -35 -18h-234c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h234c14 0 27 -7 35 -18z" /> + <glyph glyph-name="landscape" unicode="landscape" +d="M299 384l192 -256h-470l128 171l96 -128l34 25l-60 81z" /> + <glyph glyph-name="language" unicode="language" +d="M349 213h72c3 14 6 28 6 43s-3 29 -6 43h-72c2 -14 3 -28 3 -43s-1 -29 -3 -43zM311 95c39 13 73 41 93 76h-63c-7 -27 -17 -52 -30 -76zM306 213c2 14 3 28 3 43s-1 29 -3 43h-100c-2 -14 -3 -28 -3 -43s1 -29 3 -43h100zM256 86c18 26 32 54 41 85h-82 +c9 -31 23 -59 41 -85zM171 341c7 27 17 52 30 76c-39 -13 -73 -41 -93 -76h63zM108 171c20 -35 54 -63 93 -76c-13 24 -23 49 -30 76h-63zM91 213h72c-2 14 -3 28 -3 43s1 29 3 43h-72c-3 -14 -6 -28 -6 -43s3 -29 6 -43zM256 426c-18 -26 -32 -54 -41 -85h82 +c-9 31 -23 59 -41 85zM404 341c-20 35 -54 63 -93 76c13 -24 23 -49 30 -76h63zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="laptop" unicode="laptop" +d="M85 384v-213h342v213h-342zM427 128h85v-43h-512v43h85c-23 0 -42 20 -42 43v213c0 23 19 43 42 43h342c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43z" /> + <glyph glyph-name="laptop_chromebook" unicode="laptop_chromebook" +d="M427 192v213h-342v-213h342zM299 128v21h-86v-21h86zM469 128h43v-43h-512v43h43v320h426v-320z" /> + <glyph glyph-name="laptop_mac" unicode="laptop_mac" +d="M256 107c12 0 21 9 21 21s-9 21 -21 21s-21 -9 -21 -21s9 -21 21 -21zM85 405v-234h342v234h-342zM427 128h85c0 -23 -20 -43 -43 -43h-426c-23 0 -43 20 -43 43h85c-23 0 -42 20 -42 43v234c0 23 19 43 42 43h342c23 0 42 -20 42 -43v-234c0 -23 -19 -43 -42 -43z" /> + <glyph glyph-name="laptop_windows" unicode="laptop_windows" +d="M85 405v-213h342v213h-342zM427 128h85v-43h-512v43h85v21c-23 0 -42 20 -42 43v213c0 23 19 43 42 43h342c23 0 42 -20 42 -43v-213c0 -23 -19 -43 -42 -43v-21z" /> + <glyph glyph-name="last_page" unicode="last_page" +d="M341 384h43v-256h-43v256zM119 354l30 30l128 -128l-128 -128l-30 30l98 98z" /> + <glyph glyph-name="launch" unicode="launch" +d="M299 448h149v-149h-43v76l-209 -209l-30 30l209 209h-76v43zM405 107v149h43v-149c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h149v-43h-149v-298h298z" /> + <glyph glyph-name="layers" unicode="layers" +d="M256 171c-64.012 49.6547 -127.813 99.5201 -192 149l192 149l192 -149c-64.1875 -49.4791 -127.987 -99.3464 -192 -149zM256 116l157 123l35 -27l-192 -149l-192 149l35 27z" /> + <glyph glyph-name="layers_clear" unicode="layers_clear" +d="M70 491l399 -400l-27 -27l-80 81l-106 -82l-192 149l35 27l157 -123l75 59l-30 30l-45 -34c-64.012 49.6547 -127.813 99.5201 -192 149l69 54l-90 90zM448 320c-28.8803 -22.1197 -57.4315 -44.5685 -86 -67l-168 168l62 48zM423 192l-31 31l25 19l31 -30z" /> + <glyph glyph-name="leak_add" unicode="leak_add" +d="M299 64c0 83 66 149 149 149v-42c-59 0 -107 -48 -107 -107h-42zM384 64c0 35 29 64 64 64v-64h-64zM213 64c0 129 106 235 235 235v-43c-106 0 -192 -86 -192 -192h-43zM213 448c0 -83 -66 -149 -149 -149v42c59 0 107 48 107 107h42zM299 448 +c0 -129 -105 -235 -235 -235v43c106 0 192 86 192 192h43zM128 448c0 -35 -29 -64 -64 -64v64h64z" /> + <glyph glyph-name="leak_remove" unicode="leak_remove" +d="M328 265c35 21 76 34 120 34v-43c-32 0 -62 -8 -89 -22zM425 168l-34 34c17 7 37 11 57 11v-42c-8 0 -16 -1 -23 -3zM299 448c0 -44 -13 -85 -34 -120l-31 31c14 27 22 57 22 89h43zM64 421l27 27l357 -357l-27 -27l-61 61c-12 -17 -19 -38 -19 -61h-42c0 34 12 66 31 91 +l-31 30c-27 -33 -43 -75 -43 -121h-43c0 58 21 111 56 152l-53 53c-41 -35 -94 -56 -152 -56v43c46 0 89 16 122 43l-31 31c-25 -19 -57 -31 -91 -31v42c23 0 44 7 61 19zM213 448c0 -20 -4 -40 -11 -57l-34 34c2 7 3 15 3 23h42z" /> + <glyph glyph-name="lens" unicode="lens" +d="M256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="library_add" unicode="library_add" +d="M405 277v43h-85v85h-43v-85h-85v-43h85v-85h43v85h85zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42z" /> + <glyph glyph-name="library_books" unicode="library_books" +d="M405 363v42h-213v-42h213zM320 192v43h-128v-43h128zM405 277v43h-213v-43h213zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42z" /> + <glyph glyph-name="library_music" unicode="library_music" +d="M85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42zM384 363v42h-85v-117c-9 7 -20 11 -32 11c-29 0 -54 -25 -54 -54s25 -53 54 -53s53 24 53 53v118h64zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42 +h256z" /> + <glyph glyph-name="lightbulb_outline" unicode="lightbulb_outline" +d="M317 233c29 20 46 52 46 87c0 59 -48 107 -107 107s-107 -48 -107 -107c0 -35 17 -67 46 -87l18 -13v-49h86v49zM256 469c82 0 149 -67 149 -149c0 -51 -25 -95 -64 -122v-49c0 -12 -9 -21 -21 -21h-128c-12 0 -21 9 -21 21v49c-39 27 -64 71 -64 122 +c0 82 67 149 149 149zM192 64v21h128v-21c0 -12 -9 -21 -21 -21h-86c-12 0 -21 9 -21 21z" /> + <glyph glyph-name="line_style" unicode="line_style" +d="M64 427h384v-86h-384v86zM277 256v43h171v-43h-171zM64 256v43h171v-43h-171zM405 85v43h43v-43h-43zM320 85v43h43v-43h-43zM235 85v43h42v-43h-42zM149 85v43h43v-43h-43zM64 85v43h43v-43h-43zM341 171v42h107v-42h-107zM203 171v42h106v-42h-106zM64 171v42h107v-42 +h-107z" /> + <glyph glyph-name="line_weight" unicode="line_weight" +d="M64 427h384v-86h-384v86zM64 235v64h384v-64h-384zM64 85v22h384v-22h-384zM64 149v43h384v-43h-384z" /> + <glyph glyph-name="linear_scale" unicode="linear_scale" +d="M416 309c29 0 53 -24 53 -53s-24 -53 -53 -53c-22 0 -41 13 -49 32h-62c-8 -19 -27 -32 -49 -32s-41 13 -49 32h-62c-8 -19 -27 -32 -49 -32c-29 0 -53 24 -53 53s24 53 53 53c22 0 41 -13 49 -32h62c8 19 27 32 49 32s41 -13 49 -32h62c8 19 27 32 49 32z" /> + <glyph glyph-name="link" unicode="link" +d="M363 363c59 0 106 -48 106 -107s-47 -107 -106 -107h-86v41h86c36 0 66 30 66 66s-30 66 -66 66h-86v41h86zM171 235v42h170v-42h-170zM83 256c0 -36 30 -66 66 -66h86v-41h-86c-59 0 -106 48 -106 107s47 107 106 107h86v-41h-86c-36 0 -66 -30 -66 -66z" /> + <glyph glyph-name="linked_camera" unicode="linked_camera" +d="M341 384c24 0 43 -19 43 -43h28c0 39 -32 71 -71 71v-28zM256 107c59 0 107 47 107 106s-48 107 -107 107s-107 -48 -107 -107s48 -106 107 -106zM363 320h106v-235c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v256c0 23 19 43 42 43h68l39 43h128v-64 +c24 0 43 -19 43 -43zM341 441v28c71 0 128 -57 128 -128h-28c0 55 -45 100 -100 100zM188 213c0 38 30 69 68 69s68 -31 68 -69s-30 -68 -68 -68s-68 30 -68 68z" /> + <glyph glyph-name="list" unicode="list" +d="M149 363h299v-43h-299v43zM149 149v43h299v-43h-299zM149 235v42h299v-42h-299zM64 320v43h43v-43h-43zM64 149v43h43v-43h-43zM64 235v42h43v-42h-43z" /> + <glyph glyph-name="live_help" unicode="live_help" +d="M321 293c12 12 20 29 20 48c0 47 -38 86 -85 86s-85 -39 -85 -86h42c0 23 20 43 43 43s43 -20 43 -43c0 -12 -5 -22 -13 -30l-26 -27c-15 -16 -25 -37 -25 -60v-11h42c0 32 10 45 25 61zM277 128v43h-42v-43h42zM405 469c23 0 43 -19 43 -42v-299c0 -23 -20 -43 -43 -43 +h-85l-64 -64l-64 64h-85c-24 0 -43 20 -43 43v299c0 23 19 42 43 42h298z" /> + <glyph glyph-name="live_tv" unicode="live_tv" +d="M192 299l149 -86l-149 -85v171zM448 85v256h-384v-256h384zM448 384c23 0 43 -19 43 -43v-256c0 -23 -20 -42 -43 -42h-384c-23 0 -43 19 -43 42v256c0 24 20 43 43 43h162l-70 70l15 15l85 -85l85 85l15 -15l-70 -70h162z" /> + <glyph glyph-name="local_activity" unicode="local_activity" +d="M332 154l-23 87l70 58l-90 5l-33 84l-33 -84l-91 -5l71 -58l-23 -87l76 49zM427 256c0 -23 19 -43 42 -43v-85c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v85c24 0 42 20 42 43s-19 43 -42 43v85c0 23 19 43 42 43h342c23 0 42 -20 42 -43v-85 +c-23 0 -42 -20 -42 -43z" /> + <glyph glyph-name="local_airport" unicode="local_airport" +d="M448 171l-171 53v-117l43 -32v-32l-75 21l-74 -21v32l42 32v117l-170 -53v42l170 107v117c0 18 14 32 32 32s32 -14 32 -32v-117l171 -107v-42z" /> + <glyph glyph-name="local_atm" unicode="local_atm" +d="M427 128v256h-342v-256h342zM427 427c24 0 42 -19 42 -43v-256c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v256c0 24 18 43 42 43h342zM235 149v22h-43v42h85v22h-64c-12 0 -21 9 -21 21v64c0 12 9 21 21 21h22v22h42v-22h43v-42h-85v-22h64c12 0 21 -9 21 -21v-64 +c0 -12 -9 -21 -21 -21h-22v-22h-42z" /> + <glyph glyph-name="local_bar" unicode="local_bar" +d="M159 363h194l38 42h-270zM448 405l-171 -192v-106h107v-43h-256v43h107v106l-171 192v43h384v-43z" /> + <glyph glyph-name="local_cafe" unicode="local_cafe" +d="M43 64v43h384v-43h-384zM427 341v64h-43v-64h43zM427 448c24 0 42 -19 42 -43v-64c0 -24 -18 -42 -42 -42h-43v-64c0 -47 -38 -86 -85 -86h-128c-47 0 -86 39 -86 86v213h342z" /> + <glyph glyph-name="local_car_wash" unicode="local_car_wash" +d="M107 235h298l-32 96h-234zM373 128c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 128c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM404 341l44 -128v-170c0 -12 -9 -22 -21 -22h-22c-12 0 -21 10 -21 22v21h-256v-21 +c0 -12 -9 -22 -21 -22h-22c-12 0 -21 10 -21 22v170l44 128c4 13 17 22 31 22h234c14 0 27 -9 31 -22zM149 405c-18 0 -32 14 -32 32c0 21 32 58 32 58s32 -37 32 -58c0 -18 -14 -32 -32 -32zM256 405c-18 0 -32 14 -32 32c0 21 32 58 32 58s32 -37 32 -58 +c0 -18 -14 -32 -32 -32zM363 405c-18 0 -32 14 -32 32c0 21 32 58 32 58s32 -37 32 -58c0 -18 -14 -32 -32 -32z" /> + <glyph glyph-name="local_convenience_store" unicode="local_convenience_store" +d="M341 256v107h-21v-43h-21v43h-22v-64h43v-43h21zM235 299v64h-64v-22h42v-21h-42v-64h64v21h-43v22h43zM405 363h64v-278h-170v86h-86v-86h-170v278h64v64h298v-64z" /> + <glyph glyph-name="local_dining" unicode="local_dining" +d="M317 266l-31 -31l147 -147l-30 -30l-147 147l-147 -147l-30 30l208 208c-15 33 -4 79 30 113c41 41 99 48 130 17s24 -90 -17 -131c-34 -34 -80 -44 -113 -29zM173 227l-90 90c-33 33 -33 87 0 120l150 -149z" /> + <glyph glyph-name="local_drink" unicode="local_drink" +d="M391 341l9 86h-288l9 -86h270zM256 107c35 0 64 29 64 64c0 43 -64 115 -64 115s-64 -72 -64 -115c0 -35 29 -64 64 -64zM64 469h384l-43 -389c-3 -21 -20 -37 -42 -37h-214c-22 0 -39 16 -42 37z" /> + <glyph glyph-name="local_florist" unicode="local_florist" +d="M256 395c-29 0 -53 -25 -53 -54s24 -53 53 -53s53 24 53 53s-24 54 -53 54zM119 293c0 21 13 39 31 48c-18 9 -31 27 -31 48c0 29 25 54 54 54c11 0 21 -4 30 -10v4c0 29 24 54 53 54s53 -25 53 -54v-4c9 6 19 10 30 10c29 0 54 -25 54 -54c0 -21 -13 -39 -31 -48 +c18 -9 31 -27 31 -48c0 -29 -25 -53 -54 -53c-11 0 -21 3 -30 9v-4c0 -29 -24 -53 -53 -53s-53 24 -53 53v4c-9 -6 -19 -9 -30 -9c-29 0 -54 24 -54 53zM256 43c-106 0 -192 86 -192 192c106 0 192 -86 192 -192zM256 43c0 106 86 192 192 192c0 -106 -86 -192 -192 -192z +" /> + <glyph glyph-name="local_gas_station" unicode="local_gas_station" +d="M384 299c12 0 21 9 21 21s-9 21 -21 21s-21 -9 -21 -21s9 -21 21 -21zM256 299v106h-128v-106h128zM422 358c10 -10 15 -23 15 -38v-203c0 -29 -24 -53 -53 -53s-53 24 -53 53v107h-32v-160h-214v341c0 23 20 43 43 43h128c23 0 43 -20 43 -43v-149h21 +c23 0 43 -20 43 -43v-96c0 -12 9 -21 21 -21s21 9 21 21v154c-7 -3 -13 -4 -21 -4c-29 0 -53 24 -53 53c0 23 14 42 34 50l-45 45l23 22z" /> + <glyph glyph-name="local_grocery_store" unicode="local_grocery_store" +d="M363 128c23 0 42 -20 42 -43s-19 -42 -42 -42s-43 19 -43 42s20 43 43 43zM21 469h70l20 -42h316c12 0 21 -10 21 -22c0 -4 -1 -7 -3 -10l-76 -138c-7 -13 -21 -22 -37 -22h-159l-19 -35l-1 -3c0 -3 2 -5 5 -5h247v-43h-256c-23 0 -42 20 -42 43c0 7 2 14 5 20l29 53 +l-77 162h-43v42zM149 128c23 0 43 -20 43 -43s-20 -42 -43 -42s-42 19 -42 42s19 43 42 43z" /> + <glyph glyph-name="local_hospital" unicode="local_hospital" +d="M384 213v86h-85v85h-86v-85h-85v-86h85v-85h86v85h85zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="local_hotel" unicode="local_hotel" +d="M405 363c47 0 86 -39 86 -86v-192h-43v64h-384v-64h-43v320h43v-192h171v150h170zM149 235c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64z" /> + <glyph glyph-name="local_laundry_service" unicode="local_laundry_service" +d="M256 85c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128s57 -128 128 -128zM149 427c-12 0 -21 -10 -21 -22s9 -21 21 -21s22 9 22 21s-10 22 -22 22zM213 427c-12 0 -21 -10 -21 -22s9 -21 21 -21s22 9 22 21s-10 22 -22 22zM384 469c24 0 43 -18 43 -42v-342 +c0 -24 -19 -42 -43 -42h-256c-24 0 -43 18 -43 42v342c0 24 19 42 43 42h256zM196 153l120 121c33 -33 33 -88 0 -121s-87 -33 -120 0z" /> + <glyph glyph-name="local_library" unicode="local_library" +d="M256 341c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64zM256 266c50 47 118 75 192 75v-234c-74 0 -142 -29 -192 -76c-50 47 -118 76 -192 76v234c74 0 142 -28 192 -75z" /> + <glyph glyph-name="local_mall" unicode="local_mall" +d="M256 235c59 0 107 47 107 106h-43c0 -35 -29 -64 -64 -64s-64 29 -64 64h-43c0 -59 48 -106 107 -106zM256 448c-35 0 -64 -29 -64 -64h128c0 35 -29 64 -64 64zM405 384c23 0 43 -20 43 -43v-256c0 -23 -20 -42 -43 -42h-298c-23 0 -43 19 -43 42v256c0 23 20 43 43 43 +h42c0 59 48 107 107 107s107 -48 107 -107h42z" /> + <glyph glyph-name="local_movies" unicode="local_movies" +d="M384 320v43h-43v-43h43zM384 235v42h-43v-42h43zM384 149v43h-43v-43h43zM171 320v43h-43v-43h43zM171 235v42h-43v-42h43zM171 149v43h-43v-43h43zM384 448h43v-384h-43v43h-43v-43h-170v43h-43v-43h-43v384h43v-43h43v43h170v-43h43v43z" /> + <glyph glyph-name="local_offer" unicode="local_offer" +d="M117 363c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM457 265c8 -8 12 -18 12 -30s-4 -22 -12 -30l-150 -150c-8 -8 -18 -12 -30 -12s-22 4 -30 12l-192 192c-8 8 -12 18 -12 30v150c0 23 19 42 42 42h150c12 0 22 -4 30 -12z" /> + <glyph glyph-name="local_parking" unicode="local_parking" +d="M282 277c23 0 42 20 42 43s-19 43 -42 43h-69v-86h69zM277 448c71 0 128 -57 128 -128s-57 -128 -128 -128h-64v-128h-85v384h149z" /> + <glyph glyph-name="local_pharmacy" unicode="local_pharmacy" +d="M341 213v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64zM448 405v-42l-43 -128l43 -128v-43h-384v43l43 128l-43 128v42h271l31 86l50 -19l-24 -67h56z" /> + <glyph glyph-name="local_phone" unicode="local_phone" +d="M141 282c31 -60 81 -110 141 -141l47 47c6 6 15 8 22 5c24 -8 50 -12 76 -12c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22z" /> + <glyph glyph-name="local_pizza" unicode="local_pizza" +d="M256 192c23 0 43 20 43 43s-20 42 -43 42s-43 -19 -43 -42s20 -43 43 -43zM149 363c0 -23 20 -43 43 -43s43 20 43 43s-20 42 -43 42s-43 -19 -43 -42zM256 469c76 0 145 -33 192 -85l-192 -341l-192 341c47 52 116 85 192 85z" /> + <glyph glyph-name="local_play" unicode="local_play" +d="M332 154l-23 87l70 58l-90 5l-33 84l-33 -84l-91 -5l71 -58l-23 -87l76 49zM427 256c0 -23 19 -43 42 -43v-85c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v85c24 0 42 20 42 43s-19 43 -42 43v85c0 23 19 43 42 43h342c23 0 42 -20 42 -43v-85 +c-23 0 -42 -20 -42 -43z" /> + <glyph glyph-name="local_post_office" unicode="local_post_office" +d="M427 341v43l-171 -107l-171 107v-43l171 -106zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="local_printshop" unicode="local_printshop" +d="M384 448v-85h-256v85h256zM405 256c12 0 22 9 22 21s-10 22 -22 22s-21 -10 -21 -22s9 -21 21 -21zM341 107v106h-170v-106h170zM405 341c35 0 64 -29 64 -64v-128h-85v-85h-256v85h-85v128c0 35 29 64 64 64h298z" /> + <glyph glyph-name="local_see" unicode="local_see" +d="M256 149c59 0 107 48 107 107s-48 107 -107 107s-107 -48 -107 -107s48 -107 107 -107zM192 469h128l39 -42h68c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h68zM188 256c0 38 30 68 68 68s68 -30 68 -68 +s-30 -68 -68 -68s-68 30 -68 68z" /> + <glyph glyph-name="local_shipping" unicode="local_shipping" +d="M384 117c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM416 309h-53v-53h95zM128 117c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM427 341l64 -85v-107h-43c0 -35 -29 -64 -64 -64s-64 29 -64 64h-128c0 -35 -29 -64 -64 -64 +s-64 29 -64 64h-43v235c0 23 20 43 43 43h299v-86h64z" /> + <glyph glyph-name="local_taxi" unicode="local_taxi" +d="M107 277h298l-32 96h-234zM373 171c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 171c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM404 384l44 -128v-171c0 -12 -9 -21 -21 -21h-22c-12 0 -21 9 -21 21v22h-256v-22 +c0 -12 -9 -21 -21 -21h-22c-12 0 -21 9 -21 21v171l44 128c4 13 17 21 31 21h53v43h128v-43h53c14 0 27 -8 31 -21z" /> + <glyph glyph-name="location_city" unicode="location_city" +d="M405 192v43h-42v-43h42zM405 107v42h-42v-42h42zM277 363v42h-42v-42h42zM277 277v43h-42v-43h42zM277 192v43h-42v-43h42zM277 107v42h-42v-42h42zM149 277v43h-42v-43h42zM149 192v43h-42v-43h42zM149 107v42h-42v-42h42zM320 277h128v-213h-384v299h128v42l64 64 +l64 -64v-128z" /> + <glyph glyph-name="location_disabled" unicode="location_disabled" +d="M347 138l-209 209c-19 -25 -31 -57 -31 -91c0 -83 66 -149 149 -149c34 0 66 12 91 31zM64 421l27 27l357 -357l-27 -27l-44 44c-28 -23 -62 -39 -100 -43v-44h-42v44c-89 10 -160 81 -170 170h-44v42h44c4 38 20 72 43 100zM447 277h44v-42h-44c-3 -24 -10 -48 -21 -68 +l-32 32c7 17 11 37 11 57c0 83 -66 149 -149 149c-20 0 -40 -4 -57 -11l-32 32c21 11 44 18 68 21v44h42v-44c89 -10 160 -81 170 -170z" /> + <glyph glyph-name="location_off" unicode="location_off" +d="M250 267c59.1765 -58.4901 118.284 -117.049 177 -176l-27 -27l-72 71c-36 -53 -72 -92 -72 -92s-149 165 -149 277c0 11 2 22 4 33l-68 68l27 27l178 -178zM256 373c-16 0 -29 -7 -39 -18l-69 68c27 28 66 46 108 46c83 0 149 -66 149 -149c0 -36 -15 -77 -36 -117 +l-77 78c11 10 17 23 17 39c0 29 -24 53 -53 53z" /> + <glyph glyph-name="location_on" unicode="location_on" +d="M256 267c29 0 53 24 53 53s-24 53 -53 53s-53 -24 -53 -53s24 -53 53 -53zM256 469c83 0 149 -66 149 -149c0 -112 -149 -277 -149 -277s-149 165 -149 277c0 83 66 149 149 149z" /> + <glyph glyph-name="location_searching" unicode="location_searching" +d="M256 107c83 0 149 66 149 149s-66 149 -149 149s-149 -66 -149 -149s66 -149 149 -149zM447 277h44v-42h-44c-10 -89 -81 -160 -170 -170v-44h-42v44c-89 10 -160 81 -170 170h-44v42h44c10 89 81 160 170 170v44h42v-44c89 -10 160 -81 170 -170z" /> + <glyph glyph-name="lock" unicode="lock" +d="M322 341v43c0 36 -30 66 -66 66s-66 -30 -66 -66v-43h132zM256 149c23 0 43 20 43 43s-20 43 -43 43s-43 -20 -43 -43s20 -43 43 -43zM384 341c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h21v43c0 59 48 107 107 107 +s107 -48 107 -107v-43h21z" /> + <glyph glyph-name="lock_open" unicode="lock_open" +d="M384 85v214h-256v-214h256zM384 341c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h194v43c0 36 -30 66 -66 66s-66 -30 -66 -66h-41c0 59 48 107 107 107s107 -48 107 -107v-43h21zM256 149c-23 0 -43 20 -43 43 +s20 43 43 43s43 -20 43 -43s-20 -43 -43 -43z" /> + <glyph glyph-name="lock_outline" unicode="lock_outline" +d="M384 85v214h-256v-214h256zM190 384v-43h132v43c0 36 -30 66 -66 66s-66 -30 -66 -66zM384 341c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h21v43c0 59 48 107 107 107s107 -48 107 -107v-43h21zM256 149 +c-23 0 -43 20 -43 43s20 43 43 43s43 -20 43 -43s-20 -43 -43 -43z" /> + <glyph glyph-name="looks" unicode="looks" +d="M256 384c129 0 235 -106 235 -235h-43c0 106 -86 192 -192 192s-192 -86 -192 -192h-43c0 129 106 235 235 235zM256 299c82 0 149 -68 149 -150h-42c0 59 -48 107 -107 107s-107 -48 -107 -107h-42c0 82 67 150 149 150z" /> + <glyph glyph-name="looks_3" unicode="looks_3" +d="M320 288v32c0 24 -19 43 -42 43h-86v-43h86v-43h-43v-42h43v-43h-86v-43h86c23 0 42 19 42 43v32c0 18 -14 32 -32 32c18 0 32 14 32 32zM406 448c23 0 42 -20 42 -43v-298c0 -23 -19 -43 -42 -43h-299c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h299z" /> + <glyph glyph-name="looks_4" unicode="looks_4" +d="M320 149v214h-43v-86h-42v86h-43v-128h85v-86h43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="looks_5" unicode="looks_5" +d="M320 320v43h-128v-128h85v-43h-85v-43h85c23 0 43 19 43 43v43c0 24 -20 42 -43 42h-42v43h85zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="looks_6" unicode="looks_6" +d="M320 320v43h-85c-23 0 -43 -19 -43 -43v-128c0 -24 20 -43 43 -43h42c23 0 43 19 43 43v43c0 24 -20 42 -43 42h-42v43h85zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM235 192v43h42v-43h-42z" /> + <glyph glyph-name="looks_one" unicode="looks_one" +d="M299 149v214h-86v-43h43v-171h43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="looks_two" unicode="looks_two" +d="M320 277v43c0 24 -20 43 -43 43h-85v-43h85v-43h-42c-23 0 -43 -18 -43 -42v-86h128v43h-85v43h42c23 0 43 18 43 42zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="loop" unicode="loop" +d="M256 128v64l85 -85l-85 -86v64c-94 0 -171 77 -171 171c0 33 10 65 27 91l31 -31c-10 -18 -15 -38 -15 -60c0 -71 57 -128 128 -128zM256 427c94 0 171 -77 171 -171c0 -33 -10 -65 -27 -91l-31 31c10 18 15 38 15 60c0 71 -57 128 -128 128v-64l-85 85l85 86v-64z" /> + <glyph glyph-name="loupe" unicode="loupe" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213v-171c0 -23 -19 -42 -42 -42h-171c-118 0 -213 95 -213 213s95 213 213 213zM277 363v-86h86v-42h-86v-86h-42v86h-86v42h86v86h42z" /> + <glyph glyph-name="low_priority" unicode="low_priority" +d="M43 267c0 76 62 138 138 138h75v-42h-75c-53 0 -96 -43 -96 -96s43 -96 96 -96h11v42l64 -64l-64 -64v43h-11c-76 0 -138 63 -138 139zM299 171h170v-43h-170v43zM299 288h170v-43h-170v43zM299 405h170v-42h-170v42z" /> + <glyph glyph-name="loyalty" unicode="loyalty" +d="M368 186c10 10 16 23 16 38c0 29 -24 53 -53 53c-15 0 -28 -5 -38 -15l-16 -16l-15 16c-10 10 -23 15 -38 15c-29 0 -53 -24 -53 -53c0 -15 5 -28 15 -38l91 -91zM117 363c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM457 265c8 -8 12 -18 12 -30 +s-4 -22 -12 -30l-150 -150c-8 -8 -18 -12 -30 -12s-22 4 -30 12l-192 192c-8 8 -12 18 -12 30v150c0 23 19 42 42 42h150c12 0 22 -4 30 -12z" /> + <glyph glyph-name="mail" unicode="mail" +d="M427 341v43l-171 -107l-171 107v-43l171 -106zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="mail_outline" unicode="mail_outline" +d="M256 277l171 107h-342zM427 128v213l-171 -106l-171 106v-213h342zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="map" unicode="map" +d="M320 107v253l-128 45v-253zM437 448c6 0 11 -5 11 -11v-322c0 -5 -4 -9 -8 -10l-120 -41l-128 45l-114 -44l-3 -1c-6 0 -11 5 -11 11v322c0 5 4 9 8 10l120 41l128 -45l114 44z" /> + <glyph glyph-name="markunread" unicode="markunread" +d="M427 341v43l-171 -107l-171 107v-43l171 -106zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="markunread_mailbox" unicode="markunread_mailbox" +d="M427 384c23 0 42 -20 42 -43v-256c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v256c0 23 19 43 42 43h43v128h171v-85h-128v-171h42v128h214z" /> + <glyph glyph-name="memory" unicode="memory" +d="M363 149v214h-214v-214h214zM448 277h-43v-42h43v-43h-43v-43c0 -23 -19 -42 -42 -42h-43v-43h-43v43h-42v-43h-43v43h-43c-23 0 -42 19 -42 42v43h-43v43h43v42h-43v43h43v43c0 23 19 42 42 42h43v43h43v-43h42v43h43v-43h43c23 0 42 -19 42 -42v-43h43v-43zM277 235v42 +h-42v-42h42zM320 320v-128h-128v128h128z" /> + <glyph glyph-name="menu" unicode="menu" +d="M64 384h384v-43h-384v43zM64 235v42h384v-42h-384zM64 128v43h384v-43h-384z" /> + <glyph glyph-name="merge_type" unicode="merge_type" +d="M160 341l96 96l96 -96h-75v-136l-128 -128l-30 30l116 115v119h-75zM363 77l-73 72l30 30l73 -72z" /> + <glyph glyph-name="message" unicode="message" +d="M384 341v43h-256v-43h256zM384 277v43h-256v-43h256zM384 213v43h-256v-43h256zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="mic" unicode="mic" +d="M369 277h36c0 -73 -58 -133 -128 -143v-70h-42v70c-70 10 -128 70 -128 143h36c0 -64 54 -108 113 -108s113 44 113 108zM256 213c-35 0 -64 29 -64 64v128c0 35 29 64 64 64s64 -29 64 -64v-128c0 -35 -29 -64 -64 -64z" /> + <glyph glyph-name="mic_none" unicode="mic_none" +d="M369 277h36c0 -73 -58 -133 -128 -143v-70h-42v70c-70 10 -128 70 -128 143h36c0 -64 54 -108 113 -108s113 44 113 108zM230 407v-132c0 -14 12 -25 26 -25s25 11 25 25l1 132c0 14 -12 26 -26 26s-26 -12 -26 -26zM256 213c-35 0 -64 29 -64 64v128c0 35 29 64 64 64 +s64 -29 64 -64v-128c0 -35 -29 -64 -64 -64z" /> + <glyph glyph-name="mic_off" unicode="mic_off" +d="M91 448l357 -357l-27 -27l-89 89c-16 -10 -36 -16 -55 -19v-70h-42v70c-70 10 -128 70 -128 143h36c0 -64 54 -108 113 -108c17 0 34 4 49 11l-35 35c-4 -1 -9 -2 -14 -2c-35 0 -64 29 -64 64v16l-128 128zM320 274l-128 127v4c0 35 29 64 64 64s64 -29 64 -64v-131z +M405 277c0 -25 -7 -49 -19 -70l-26 27c6 13 9 27 9 43h36z" /> + <glyph glyph-name="mms" unicode="mms" +d="M107 213h298l-96 128l-74 -96l-54 64zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="mode_comment" unicode="mode_comment" +d="M469 427v-384l-85 85h-299c-23 0 -42 20 -42 43v256c0 23 19 42 42 42h342c23 0 42 -19 42 -42z" /> + <glyph glyph-name="mode_edit" unicode="mode_edit" +d="M442 362l-39 -39l-80 80l39 39c8 8 22 8 30 0l50 -50c8 -8 8 -22 0 -30zM64 144l236 236l80 -80l-236 -236h-80v80z" /> + <glyph glyph-name="monetization_on" unicode="monetization_on" +d="M286 126c37 7 67 28 67 67c0 54 -47 73 -90 84s-56 23 -56 41c0 20 19 35 51 35c34 0 46 -16 47 -40h42c-1 33 -21 62 -61 72v42h-57v-42c-37 -8 -66 -31 -66 -68c0 -44 36 -65 89 -78c48 -11 57 -28 57 -46c0 -13 -9 -34 -51 -34c-39 0 -55 18 -57 40h-42 +c2 -41 34 -64 70 -72v-42h57v41zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="money_off" unicode="money_off" +d="M114 425l311 -312l-27 -27l-47 48c-13 -12 -32 -20 -52 -24v-46h-64v46c-41 9 -76 35 -79 82h47c2 -25 20 -45 64 -45c29 0 44 10 51 20l-75 74c-50 15 -83 40 -83 84l-73 73zM267 365c-13 0 -24 -2 -33 -6l-31 31c10 5 21 9 32 12v46h64v-47c45 -11 67 -44 68 -81h-47 +c-1 27 -15 45 -53 45z" /> + <glyph glyph-name="monochrome_photos" unicode="monochrome_photos" +d="M427 107v256h-171v-22c60 0 107 -46 107 -106s-47 -107 -107 -107v38c-38 0 -68 31 -68 69s30 68 68 68v-137c38 0 68 31 68 69s-30 68 -68 68v38c-60 0 -107 -46 -107 -106s47 -107 107 -107v-21h171zM427 405c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-342 +c-23 0 -42 20 -42 43v256c0 23 19 42 42 42h69l38 43h128l38 -43h69z" /> + <glyph glyph-name="mood" unicode="mood" +d="M256 139c-50 0 -92 30 -109 74h218c-17 -44 -59 -74 -109 -74zM181 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM331 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM256 85c94 0 171 77 171 171s-77 171 -171 171 +s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="mood_bad" unicode="mood_bad" +d="M256 213c50 0 92 -30 109 -74h-218c17 44 59 74 109 74zM181 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM331 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM256 85c94 0 171 77 171 171s-77 171 -171 171 +s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="more" unicode="more" +d="M405 224c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM299 224c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM192 224c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM469 448c23 0 43 -20 43 -43v-298 +c0 -23 -20 -43 -43 -43h-318c-15 0 -28 8 -36 19l-115 173l115 173c8 11 19 19 34 19h320z" /> + <glyph glyph-name="more_horiz" unicode="more_horiz" +d="M256 299c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM384 299c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM128 299c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43z" /> + <glyph glyph-name="more_vert" unicode="more_vert" +d="M256 171c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM256 299c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM256 341c-23 0 -43 20 -43 43s20 43 43 43s43 -20 43 -43s-20 -43 -43 -43z" /> + <glyph glyph-name="motorcycle" unicode="motorcycle" +d="M405 149c35 0 64 29 64 64s-29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64zM167 192h-60v43h60c-9 25 -33 42 -60 42c-35 0 -64 -29 -64 -64s29 -64 64 -64c27 0 51 18 60 43zM415 319c55 -4 97 -49 97 -106c0 -60 -47 -106 -107 -106s-106 46 -106 106c0 13 2 26 6 38 +l-59 -59h-35c-10 -49 -52 -85 -104 -85c-60 0 -107 46 -107 106s47 107 107 107h247l-43 43h-76v42h94z" /> + <glyph glyph-name="mouse" unicode="mouse" +d="M235 489v-169h-150c0 87 66 159 150 169zM85 192v85h342v-85c0 -94 -77 -171 -171 -171s-171 77 -171 171zM277 489c84 -10 150 -82 150 -169h-150v169z" /> + <glyph glyph-name="move_to_inbox" unicode="move_to_inbox" +d="M341 299l-85 -86l-85 86h42v64h86v-64h42zM405 192v213h-299v-213h86c0 -35 29 -64 64 -64s64 29 64 64h85zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-299c-24 0 -42 20 -42 43v298c0 23 18 43 42 43h299z" /> + <glyph glyph-name="movie" unicode="movie" +d="M384 427h85v-299c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h22l42 -86h64l-42 86h42l43 -86h64l-43 86h43l43 -86h64z" /> + <glyph glyph-name="movie_creation" unicode="movie_creation" +d="M384 427h85v-299c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h22l42 -86h64l-42 86h42l43 -86h64l-43 86h43l43 -86h64z" /> + <glyph glyph-name="movie_filter" unicode="movie_filter" +d="M361 257l44 20l-44 20l-20 44l-20 -44l-44 -20l44 -20l20 -44zM240 187l59 26l-59 27l-27 59l-26 -59l-59 -27l59 -26l26 -59zM384 427h85v-299c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h22l42 -64h64l-42 64h42l43 -64h64l-43 64h43 +l43 -64h64z" /> + <glyph glyph-name="multiline_chart" unicode="multiline_chart" +d="M469 364l-65 -73c23 -37 39 -82 44 -131h-43c-4 35 -15 68 -31 97l-86 -97l-85 86l-128 -128l-32 32l160 160l85 -86l61 70c-36 42 -86 69 -144 69c-50 0 -96 -20 -132 -52l-30 30c44 39 100 64 162 64c69 0 129 -30 173 -79l61 68z" /> + <glyph glyph-name="music_note" unicode="music_note" +d="M256 448h128v-85h-85v-214c0 -47 -39 -85 -86 -85s-85 38 -85 85s38 86 85 86c16 0 30 -5 43 -12v225z" /> + <glyph glyph-name="music_video" unicode="music_video" +d="M171 192c0 35 29 64 64 64c7 0 14 -2 21 -4v132h107v-43h-64v-150c0 -35 -29 -63 -64 -63s-64 29 -64 64zM448 107v298h-384v-298h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="my_location" unicode="my_location" +d="M256 107c83 0 149 66 149 149s-66 149 -149 149s-149 -66 -149 -149s66 -149 149 -149zM447 277h44v-42h-44c-10 -89 -81 -160 -170 -170v-44h-42v44c-89 10 -160 81 -170 170h-44v42h44c10 89 81 160 170 170v44h42v-44c89 -10 160 -81 170 -170zM256 341 +c47 0 85 -38 85 -85s-38 -85 -85 -85s-85 38 -85 85s38 85 85 85z" /> + <glyph glyph-name="nature" unicode="nature" +d="M277 168v-83h128v-42h-298v42h128v84c-71 12 -125 73 -125 147c0 83 67 150 150 150s149 -67 149 -150c0 -77 -58 -139 -132 -148z" /> + <glyph glyph-name="nature_people" unicode="nature_people" +d="M96 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM473 316c0 -77 -58 -139 -132 -148v-83h64v-42h-341v106h-21v86c0 12 9 21 21 21h64c12 0 21 -9 21 -21v-86h-21v-64h171v84c-71 12 -125 73 -125 147c0 83 67 150 150 150s149 -67 149 -150z +" /> + <glyph glyph-name="navigate_before" unicode="navigate_before" +d="M329 354l-98 -98l98 -98l-30 -30l-128 128l128 128z" /> + <glyph glyph-name="navigate_next" unicode="navigate_next" +d="M213 384l128 -128l-128 -128l-30 30l98 98l-98 98z" /> + <glyph glyph-name="navigation" unicode="navigation" +d="M256 469l160 -390l-15 -15l-145 64l-145 -64l-15 15z" /> + <glyph glyph-name="near_me" unicode="near_me" +d="M448 448l-161 -384h-21l-56 146l-146 56v21z" /> + <glyph glyph-name="network_cell" unicode="network_cell" +d="M469 43h-426l426 426v-426z" /> + <glyph glyph-name="network_check" unicode="network_check" +d="M107 235c43 43 100 63 156 61l-28 -61c-31 -4 -62 -19 -86 -43zM363 192c-8 8 -17 15 -26 21l12 62c20 -10 39 -23 56 -40zM448 277c-26 26 -56 46 -88 59l11 60c44 -16 85 -41 120 -76zM21 320c80 80 190 110 293 92l-25 -57c-80 10 -164 -17 -225 -78zM339 405 +c6 0 11 -4 11 -10l-52 -275v-1c-4 -19 -22 -34 -42 -34c-24 0 -43 19 -43 43c0 7 2 15 5 21l111 248c1.57297 4.7189 4.56186 8 10 8z" /> + <glyph glyph-name="network_locked" unicode="network_locked" +d="M448 171v32c0 18 -14 32 -32 32s-32 -14 -32 -32v-32h64zM469 171c12 0 22 -10 22 -22v-85c0 -12 -10 -21 -22 -21h-106c-12 0 -22 9 -22 21v85c0 12 10 22 22 22v32c0 29 24 53 53 53s53 -24 53 -53v-32zM416 299c-53 0 -96 -43 -96 -96v-6c-13 -12 -21 -29 -21 -48v-64 +h-278l406 406v-193c-4 0 -7 1 -11 1z" /> + <glyph glyph-name="network_wifi" unicode="network_wifi" +d="M436.25 278.586c0.284113 -0.222489 0.53415 -0.418301 0.749753 -0.585993l-181 -224l-181 224c0.215604 0.167692 0.46564 0.363504 0.749753 0.585993l-67.7498 84.414c10 7 105 85 248 85s238 -78 248 -85z" /> + <glyph glyph-name="new_releases" unicode="new_releases" +d="M277 235v128h-42v-128h42zM277 149v43h-42v-43h42zM491 256l-52 -59l7 -79l-77 -17l-40 -68l-73 31l-73 -31l-40 67l-77 18l7 79l-52 59l52 60l-7 78l77 17l40 68l73 -31l73 31l40 -68l77 -17l-7 -79z" /> + <glyph glyph-name="next_week" unicode="next_week" +d="M235 117l85 86l-85 85l-22 -21l64 -64l-64 -64zM213 405v-42h86v42h-86zM299 448c23.3225 0 42 -19.4985 42 -43v-42h86c23 0 42 -20 42 -43v-235c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v235c0 23 19 43 42 43h86v42c0 23 19 43 42 43h86z" /> + <glyph glyph-name="nfc" unicode="nfc" +d="M384 384v-256h-256v256h85v-43h-42v-170h170v170h-64v-48c13 -7 22 -21 22 -37c0 -23 -20 -43 -43 -43s-43 20 -43 43c0 16 9 30 22 37v48c0 23 19 43 42 43h107zM427 85v342h-342v-342h342zM427 469c23 0 42 -19 42 -42v-342c0 -23 -19 -42 -42 -42h-342 +c-23 0 -42 19 -42 42v342c0 23 19 42 42 42h342z" /> + <glyph glyph-name="no_encryption" unicode="no_encryption" +d="M190 384v-26l-39 39c6 53 50 94 105 94c59 0 107 -48 107 -107v-43h21c23 0 43 -19 43 -42v-178l-221 220h116v43c0 36 -30 66 -66 66s-66 -30 -66 -66zM448 47l-26 -26l-24 24c-4 -1 -9 -2 -14 -2h-256c-23 0 -43 19 -43 42v214c0 16 10 30 23 37l-44 43l26 26z" /> + <glyph glyph-name="no_sim" unicode="no_sim" +d="M78 429l373 -372l-28 -28l-40 41c-6 -3 -13 -6 -20 -6h-214c-23 0 -42 20 -42 43v239l-56 56zM405 405v-249l-242 242l50 50h150c23 0 42 -20 42 -43z" /> + <glyph glyph-name="not_interested" unicode="not_interested" +d="M391 151c23 29 36 66 36 105c0 94 -77 171 -171 171c-39 0 -76 -13 -105 -36zM256 85c39 0 76 13 105 36l-240 240c-23 -29 -36 -66 -36 -105c0 -94 77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="note" unicode="note" +d="M320 395v-118h117zM469 299v-171c0 -23 -19 -42 -42 -42l-342 -1c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h256z" /> + <glyph glyph-name="note_add" unicode="note_add" +d="M277 320h118l-118 117v-117zM341 171v42h-64v64h-42v-64h-64v-42h64v-64h42v64h64zM299 469l128 -128v-256c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42l1 342c0 23 19 42 42 42h171z" /> + <glyph glyph-name="notifications" unicode="notifications" +d="M384 171l43 -43v-21h-342v21l43 43v106c0 66 35 120 96 135v15c0 18 14 32 32 32s32 -14 32 -32v-15c61 -15 96 -70 96 -135v-106zM256 43c-24 0 -43 19 -43 42h86c0 -23 -20 -42 -43 -42z" /> + <glyph glyph-name="notifications_active" unicode="notifications_active" +d="M256 43c-24 0 -43 19 -43 42h85c0 -24.8376 -18.6125 -42 -42 -42zM384 277v-106l43 -43v-21h-342v21l43 43v106c0 66 35 120 96 135v15c0 18 14 32 32 32s32 -14 32 -32v-15c61 -15 96 -70 96 -135zM426 288c-3 57 -32 106 -75 137l30 30c51 -39 85 -99 88 -167h-43z +M162 425c-44 -31 -73 -80 -76 -137h-43c3 68 37 128 88 167z" /> + <glyph glyph-name="notifications_none" unicode="notifications_none" +d="M341 149v128c0 53 -32 96 -85 96s-85 -43 -85 -96v-128h170zM384 171l43 -43v-21h-342v21l43 43v106c0 66 35 120 96 135v15c0 18 14 32 32 32s32 -14 32 -32v-15c61 -15 96 -70 96 -135v-106zM256 43c-23 0 -43 19 -43 42h86c0 -23 -20 -42 -43 -42z" /> + <glyph glyph-name="notifications_off" unicode="notifications_off" +d="M384 199l-191 201c5 2 10 5 15 7h1l6 3c3 1 6 1 9 2v15c0 18 14 32 32 32s32 -14 32 -32v-15c61 -15 96 -69 96 -135v-78zM256 43c-24 0 -43 18 -43 42h86c0 -24 -19 -42 -43 -42zM167 381c93.6174 -96.7159 187.67 -192.997 281 -290l-27 -27l-43 43h-293v21l43 43v107 +c0 27 6 52 17 73l-60 59l27 28z" /> + <glyph glyph-name="notifications_paused" unicode="notifications_paused" +d="M309 303v38h-106v-38h59l-59 -73v-38h106v38h-59zM384 171l43 -43v-21h-342v21l43 43v106c0 65 35 120 96 135v15c0 18 14 32 32 32s32 -14 32 -32v-15c61 -15 96 -70 96 -135v-106zM256 43c-24 0 -43 19 -43 42h86c0 -23 -20 -42 -43 -42z" /> + <glyph glyph-name="offline_pin" unicode="offline_pin" +d="M220 213l143 143l-30 30l-113 -113l-41 41l-30 -30zM363 128v43h-214v-43h214zM256 469c117 0 213 -96 213 -213s-96 -213 -213 -213s-213 96 -213 213s96 213 213 213z" /> + <glyph glyph-name="ondemand_video" unicode="ondemand_video" +d="M341 277l-149 -85v171zM448 149v256h-384v-256h384zM448 448c23 0 43 -19 43 -43l-1 -256c0 -23 -19 -42 -42 -42h-107v-43h-170v43h-107c-24 0 -43 19 -43 42v256c0 24 19 43 43 43h384z" /> + <glyph glyph-name="opacity" unicode="opacity" +d="M128 213h256c0 43 -14 69 -38 93l-90 94l-90 -93c-24 -24 -38 -51 -38 -94zM377 341c33 -33 50 -77 50 -120s-17 -88 -50 -121s-77 -50 -121 -50s-88 17 -121 50s-50 78 -50 121s17 87 50 120l121 121z" /> + <glyph glyph-name="open_in_browser" unicode="open_in_browser" +d="M256 299l85 -86h-64v-128h-42v128h-64zM405 427c24 0 43 -20 43 -43v-256c0 -23 -20 -43 -43 -43h-85v43h85v213h-298v-213h85v-43h-85c-24 0 -43 20 -43 43v256c0 23 19 43 43 43h298z" /> + <glyph glyph-name="open_in_new" unicode="open_in_new" +d="M299 448h149v-149h-43v76l-209 -209l-30 30l209 209h-76v43zM405 107v149h43v-149c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h149v-43h-149v-298h298z" /> + <glyph glyph-name="open_with" unicode="open_with" +d="M299 192v-64h64l-107 -107l-107 107h64v64h86zM491 256l-107 -107v64h-64v86h64v64zM192 299v-86h-64v-64l-107 107l107 107v-64h64zM213 320v64h-64l107 107l107 -107h-64v-64h-86z" /> + <glyph glyph-name="pages" unicode="pages" +d="M405 448c23 0 43 -20 43 -43v-128h-107l22 86l-86 -22v107h128zM363 149l-22 86h107v-128c0 -23 -20 -43 -43 -43h-128v107zM171 235l-22 -86l86 22v-107h-128c-23 0 -43 20 -43 43v128h107zM64 405c0 23 20 43 43 43h128v-107l-86 22l22 -86h-107v128z" /> + <glyph glyph-name="pageview" unicode="pageview" +d="M358 124l30 30l-62 62c9 15 15 32 15 51c0 53 -43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96c19 0 36 6 51 15zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342zM245 320c29 0 54 -24 54 -53 +s-25 -54 -54 -54s-53 25 -53 54s24 53 53 53z" /> + <glyph glyph-name="palette" unicode="palette" +d="M373 256c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM309 341c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM203 341c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 256c18 0 32 14 32 32s-14 32 -32 32 +s-32 -14 -32 -32s14 -32 32 -32zM256 448c106 0 192 -77 192 -171c0 -59 -48 -106 -107 -106h-37c-18 0 -32 -14 -32 -32c0 -8 3 -15 8 -21s8 -14 8 -22c0 -18 -14 -32 -32 -32c-106 0 -192 86 -192 192s86 192 192 192z" /> + <glyph glyph-name="pan_tool" unicode="pan_tool" +d="M491 395v-310c0 -47 -39 -85 -86 -85h-155c-23 0 -45 9 -61 25l-168 171s27 26 28 26c5 4 11 6 17 6c5 0 9 -1 13 -3c1 0 92 -52 92 -52v254c0 18 14 32 32 32s32 -14 32 -32v-150h21v203c0 18 14 32 32 32s32 -14 32 -32v-203h21v182c0 18 14 32 32 32s32 -14 32 -32 +v-182h22v118c0 18 14 32 32 32s32 -14 32 -32z" /> + <glyph glyph-name="panorama" unicode="panorama" +d="M181 245l-74 -96h298l-96 128l-74 -96zM491 128c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v256c0 23 20 43 43 43h384c23 0 43 -20 43 -43v-256z" /> + <glyph glyph-name="panorama_fish_eye" unicode="panorama_fish_eye" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="panorama_horizontal" unicode="panorama_horizontal" +d="M457 427c7 0 12 -5 12 -14v-314c0 -9 -5 -14 -12 -14c-2 0 -4 1 -6 2c-63 23 -129 35 -195 35s-132 -12 -195 -35c-2 -1 -4 -2 -6 -2c-7 0 -12 6 -12 14v314c0 9 5 14 12 14c2 0 4 -1 6 -2c63 -23 129 -35 195 -35s132 12 195 35c2 1 4 2 6 2zM427 372 +c-55 -17 -113 -24 -171 -24s-116 8 -171 24v-232c55 16 113 24 171 24s116 -8 171 -24v232z" /> + <glyph glyph-name="panorama_vertical" unicode="panorama_vertical" +d="M140 85h232c-16 55 -24 113 -24 171s8 116 24 171h-232c16 -55 24 -113 24 -171s-8 -116 -24 -171zM425 61c1 -2 2 -4 2 -6c0 -7 -6 -12 -14 -12h-314c-9 0 -14 5 -14 12c0 2 1 4 2 6c23 63 35 129 35 195s-12 132 -35 195c-1 2 -2 4 -2 6c0 7 5 12 14 12h314 +c9 0 14 -5 14 -12c0 -2 -1 -4 -2 -6c-23 -63 -35 -129 -35 -195s12 -132 35 -195z" /> + <glyph glyph-name="panorama_wide_angle" unicode="panorama_wide_angle" +d="M256 427c58 0 112 -6 170 -16l19 -3l6 -19c12 -44 18 -89 18 -133s-6 -89 -18 -133l-6 -19l-19 -3c-58 -10 -112 -16 -170 -16s-112 6 -170 16l-19 3l-6 19c-12 44 -18 89 -18 133s6 89 18 133l6 19l19 3c58 10 112 16 170 16zM256 384c-52 0 -101 -5 -156 -14 +c-10 -38 -15 -76 -15 -114s5 -76 15 -114c55 -9 104 -14 156 -14s101 5 156 14c10 38 15 76 15 114s-5 76 -15 114c-55 9 -104 14 -156 14z" /> + <glyph glyph-name="party_mode" unicode="party_mode" +d="M256 149c59 0 107 48 107 107c0 7 -1 14 -2 21h-45c2 -7 4 -14 4 -21c0 -35 -29 -64 -64 -64h-85c20 -26 50 -43 85 -43zM256 363c-59 0 -107 -48 -107 -107c0 -7 1 -14 2 -21h45c-2 7 -4 14 -4 21c0 35 29 64 64 64h85c-20 26 -50 43 -85 43zM427 427 +c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h68l39 42h128l39 -42h68z" /> + <glyph glyph-name="pause" unicode="pause" +d="M299 405h85v-298h-85v298zM128 107v298h85v-298h-85z" /> + <glyph glyph-name="pause_circle_filled" unicode="pause_circle_filled" +d="M320 171v170h-43v-170h43zM235 171v170h-43v-170h43zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="pause_circle_outline" unicode="pause_circle_outline" +d="M277 171v170h43v-170h-43zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM192 171v170h43v-170h-43z" /> + <glyph glyph-name="payment" unicode="payment" +d="M427 341v43h-342v-43h342zM427 128v128h-342v-128h342zM427 427c24 0 42 -19 42 -43v-256c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v256c0 24 18 43 42 43h342z" /> + <glyph glyph-name="people" unicode="people" +d="M341 235c50 0 150 -25 150 -75v-53h-128v53c0 32 -17 56 -42 74c7 1 14 1 20 1zM171 235c50 0 149 -25 149 -75v-53h-299v53c0 50 100 75 150 75zM171 277c-35 0 -64 29 -64 64s29 64 64 64s63 -29 63 -64s-28 -64 -63 -64zM341 277c-35 0 -64 29 -64 64s29 64 64 64 +s64 -29 64 -64s-29 -64 -64 -64z" /> + <glyph glyph-name="people_outline" unicode="people_outline" +d="M352 373c-23 0 -43 -19 -43 -42s20 -43 43 -43s43 20 43 43s-20 42 -43 42zM352 256c-41 0 -75 34 -75 75s34 74 75 74s75 -33 75 -74s-34 -75 -75 -75zM160 373c-23 0 -43 -19 -43 -42s20 -43 43 -43s43 20 43 43s-20 42 -43 42zM160 256c-41 0 -75 34 -75 75 +s34 74 75 74s75 -33 75 -74s-34 -75 -75 -75zM459 139v26c0 12 -55 38 -107 38c-23 0 -45 -6 -64 -12c7 -8 11 -16 11 -26v-26h160zM267 139v26c0 12 -55 38 -107 38s-107 -26 -107 -38v-26h214zM352 235c46 0 139 -24 139 -70v-58h-470v58c0 46 93 70 139 70 +c26 0 65 -8 96 -22c31 14 70 22 96 22z" /> + <glyph glyph-name="perm_camera_mic" unicode="perm_camera_mic" +d="M299 235v85c0 23 -20 43 -43 43s-43 -20 -43 -43v-85c0 -23 20 -43 43 -43s43 20 43 43zM427 405c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-150v45c60 10 107 63 107 126h-43c0 -47 -38 -86 -85 -86s-85 39 -85 86h-43c0 -63 47 -116 107 -126v-45h-150 +c-23 0 -42 20 -42 43v256c0 23 19 42 42 42h68l39 43h128l39 -43h68z" /> + <glyph glyph-name="perm_contact_calendar" unicode="perm_contact_calendar" +d="M384 128v21c0 43 -85 66 -128 66s-128 -23 -128 -66v-21h256zM256 384c-35 0 -64 -29 -64 -64s29 -64 64 -64s64 29 64 64s-29 64 -64 64zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43 +h43v-43h21z" /> + <glyph glyph-name="perm_data_setting" unicode="perm_data_setting" +d="M405 75c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM484 96l23 -17c2 -2 2 -5 1 -7l-21 -37c-1 -2 -5 -4 -7 -3l-26 11c-5 -4 -12 -7 -18 -10l-4 -29c0 -3 -3 -4 -6 -4h-42c-3 0 -6 1 -6 4l-4 29c-7 3 -12 6 -18 10l-26 -11c-3 -1 -6 1 -7 3l-21 37 +c-1 2 -1 5 1 7l23 17c0 3 -1 7 -1 11s1 7 1 10l-23 18c-2 2 -2 5 -1 7l21 37c1 2 5 3 7 2l26 -11c6 4 12 8 18 11l4 28c0 3 3 4 6 4h42c3 0 6 -1 6 -4l4 -28c7 -3 12 -7 18 -11l26 11c3 1 6 0 7 -2l21 -37c1 -2 1 -5 -1 -7l-23 -18c1 -3 1 -6 1 -10s-1 -8 -1 -11zM405 267 +c-88 0 -160 -72 -160 -160c0 -7 1 -15 2 -22h-247l427 427l-1 -247c-7 1 -14 2 -21 2z" /> + <glyph glyph-name="perm_device_information" unicode="perm_device_information" +d="M363 107v298h-214v-298h214zM363 490c23 0 42 -19 42 -42v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43zM277 277v-128h-42v128h42zM277 363v-43h-42v43h42z" /> + <glyph glyph-name="perm_identity" unicode="perm_identity" +d="M256 235c57 0 171 -29 171 -86v-64h-342v64c0 57 114 86 171 86zM256 427c47 0 85 -39 85 -86s-38 -85 -85 -85s-85 38 -85 85s38 86 85 86zM256 194c-63 0 -130 -31 -130 -45v-23h260v23c0 14 -67 45 -130 45zM256 386c-25 0 -45 -20 -45 -45s20 -44 45 -44s45 19 45 44 +s-20 45 -45 45z" /> + <glyph glyph-name="perm_media" unicode="perm_media" +d="M149 192h299l-75 96l-53 -64l-75 96zM469 427c23 0 43 -20 43 -43v-213c0 -23 -20 -43 -43 -43h-341c-23 0 -43 20 -43 43l1 256c0 23 19 42 42 42h128l43 -42h170zM43 384v-299h384v-42h-384c-23 0 -43 19 -43 42v299h43z" /> + <glyph glyph-name="perm_phone_msg" unicode="perm_phone_msg" +d="M256 448h192v-149h-128l-64 -64v213zM427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -60 81 -110 141 -141l47 47c6 6 15 7 22 5 +c24 -8 49 -12 76 -12z" /> + <glyph glyph-name="perm_scan_wifi" unicode="perm_scan_wifi" +d="M235 341h42v43h-42v-43zM277 171v128h-42v-128h42zM256 448c108 0 189 -40 256 -91l-256 -314l-256 315c67 51 148 90 256 90z" /> + <glyph glyph-name="person" unicode="person" +d="M256 213c57 0 171 -28 171 -85v-43h-342v43c0 57 114 85 171 85zM256 256c-47 0 -85 38 -85 85s38 86 85 86s85 -39 85 -86s-38 -85 -85 -85z" /> + <glyph glyph-name="person_add" unicode="person_add" +d="M320 213c57 0 171 -28 171 -85v-43h-342v43c0 57 114 85 171 85zM128 299h64v-43h-64v-64h-43v64h-64v43h64v64h43v-64zM320 256c-47 0 -85 38 -85 85s38 86 85 86s85 -39 85 -86s-38 -85 -85 -85z" /> + <glyph glyph-name="person_outline" unicode="person_outline" +d="M256 235c57 0 171 -29 171 -86v-64h-342v64c0 57 114 86 171 86zM256 427c47 0 85 -39 85 -86s-38 -85 -85 -85s-85 38 -85 85s38 86 85 86zM256 194c-63 0 -130 -31 -130 -45v-23h260v23c0 14 -67 45 -130 45zM256 386c-25 0 -45 -20 -45 -45s20 -44 45 -44s45 19 45 44 +s-20 45 -45 45z" /> + <glyph glyph-name="person_pin" unicode="person_pin" +d="M384 171v19c0 43 -85 66 -128 66s-128 -23 -128 -66v-19h256zM256 399c-32 0 -58 -26 -58 -58s26 -57 58 -57s58 25 58 57s-26 58 -58 58zM405 469c23 0 43 -19 43 -42v-299c0 -23 -20 -43 -43 -43h-85l-64 -64l-64 64h-85c-24 0 -43 20 -43 43v299c0 23 19 42 43 42h298 +z" /> + <glyph glyph-name="person_pin_circle" unicode="person_pin_circle" +d="M256 213c36 0 67 18 85 46c0 28 -57 44 -85 44s-85 -16 -85 -44c18 -28 49 -46 85 -46zM256 427c-23 0 -43 -20 -43 -43c0 -24 20 -43 43 -43s43 19 43 43c0 23 -20 43 -43 43zM256 469c82 0 149 -67 149 -149c0 -112 -149 -277 -149 -277s-149 165 -149 277 +c0 82 67 149 149 149z" /> + <glyph glyph-name="personal_video" unicode="personal_video" +d="M448 149v256h-384v-256h384zM448 448c23 0 43 -19 43 -43l-1 -256c0 -23 -19 -42 -42 -42h-107v-43h-170v43h-107c-24 0 -43 19 -43 42v256c0 24 19 43 43 43h384z" /> + <glyph glyph-name="pets" unicode="pets" +d="M370 195c28 -28 63 -58 56 -102c-6 -22 -22 -44 -50 -50c-16 -3 -65 9 -118 9h-4c-53 0 -102 -12 -118 -9c-28 6 -44 28 -50 50c-6 43 28 74 56 102c19 22 34 40 53 62c10 12 22 23 37 28c2 1 5 2 7 2c6 1 11 1 17 1s12 0 17 -1c2 0 5 -1 7 -2c15 -5 27 -16 37 -28 +c19 -22 34 -40 53 -62zM363 309c0 29 24 54 53 54s53 -25 53 -54s-24 -53 -53 -53s-53 24 -53 53zM267 395c0 29 24 53 53 53s53 -24 53 -53s-24 -54 -53 -54s-53 25 -53 54zM139 395c0 29 24 53 53 53s53 -24 53 -53s-24 -54 -53 -54s-53 25 -53 54zM43 309 +c0 29 24 54 53 54s53 -25 53 -54s-24 -53 -53 -53s-53 24 -53 53z" /> + <glyph glyph-name="phone" unicode="phone" +d="M141 282c31 -60 81 -110 141 -141l47 47c6 6 15 8 22 5c24 -8 50 -12 76 -12c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22z" /> + <glyph glyph-name="phone_android" unicode="phone_android" +d="M368 128v299h-224v-299h224zM299 64v21h-86v-21h86zM341 491c35 0 64 -29 64 -64v-342c0 -35 -29 -64 -64 -64h-170c-35 0 -64 29 -64 64v342c0 35 29 64 64 64h170z" /> + <glyph glyph-name="phone_bluetooth_speaker" unicode="phone_bluetooth_speaker" +d="M427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -61 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12zM384 358v-40l20 20zM384 450 +v-40l20 20zM314 309l-15 15l59 60l-59 60l15 15l49 -49v81h10l61 -61l-46 -46l46 -46l-61 -61h-10v81z" /> + <glyph glyph-name="phone_forwarded" unicode="phone_forwarded" +d="M427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -61 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12zM384 277v64h-85v86h85v64 +l107 -107z" /> + <glyph glyph-name="phone_in_talk" unicode="phone_in_talk" +d="M320 256c0 35 -29 64 -64 64v43c59 0 107 -48 107 -107h-43zM405 256c0 83 -66 149 -149 149v43c106 0 192 -86 192 -192h-43zM427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76 +c2 -7 1 -16 -5 -22l-47 -47c31 -61 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12z" /> + <glyph glyph-name="phone_iphone" unicode="phone_iphone" +d="M341 128v299h-192v-299h192zM245 43c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM331 491c29 0 53 -25 53 -54v-362c0 -29 -24 -54 -53 -54h-171c-29 0 -53 25 -53 54v362c0 29 24 54 53 54h171z" /> + <glyph glyph-name="phone_locked" unicode="phone_locked" +d="M410 427v10c0 20 -17 37 -37 37s-36 -17 -36 -37v-10h73zM427 427c12 0 21 -10 21 -22v-85c0 -12 -9 -21 -21 -21h-107c-12 0 -21 9 -21 21v85c0 12 9 22 21 22v10c0 29 24 54 53 54s54 -25 54 -54v-10zM427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21 +c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -61 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12z" /> + <glyph glyph-name="phone_missed" unicode="phone_missed" +d="M506 156c4 -4 6 -9 6 -15s-2 -11 -6 -15l-53 -53c-4 -4 -9 -6 -15 -6s-11 2 -15 6c-17 16 -36 30 -57 40c-7 3 -12 11 -12 19v66c-31 10 -64 15 -98 15s-67 -5 -98 -15v-66c0 -9 -5 -17 -12 -20c-21 -10 -40 -23 -57 -39c-4 -4 -9 -6 -15 -6s-11 2 -15 6l-53 53 +c-4 4 -6 9 -6 15s2 11 6 15c65 62 153 100 250 100s185 -38 250 -100zM139 395v-75h-32v128h128v-32h-75l96 -96l128 128l21 -21l-149 -150z" /> + <glyph glyph-name="phone_paused" unicode="phone_paused" +d="M405 448h43v-149h-43v149zM427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -61 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12z +M363 448v-149h-43v149h43z" /> + <glyph glyph-name="phonelink" unicode="phonelink" +d="M469 149v150h-85v-150h85zM491 341c12 0 21 -9 21 -21v-213c0 -12 -9 -22 -21 -22h-128c-12 0 -22 10 -22 22v213c0 12 10 21 22 21h128zM85 384v-235h214v-64h-299v64h43v235c0 23 19 43 42 43h384v-43h-384z" /> + <glyph glyph-name="phonelink_erase" unicode="phonelink_erase" +d="M405 491c23 0 43 -20 43 -43v-384c0 -23 -20 -43 -43 -43h-213c-23 0 -43 20 -43 43v64h43v-43h213v342h-213v-43h-43v64c0 23 20 43 43 43h213zM277 337l-85 -85l85 -86l-21 -21l-85 85l-86 -85l-21 21l85 86l-85 85l21 21l86 -85l85 85z" /> + <glyph glyph-name="phonelink_lock" unicode="phonelink_lock" +d="M203 277v32c0 17 -15 28 -32 28s-32 -11 -32 -28v-32h64zM230 277c13 0 26 -12 26 -27v-75c0 -13 -13 -26 -28 -26h-117c-13 0 -26 13 -26 28v75c0 13 13 25 26 25v32c0 30 30 54 60 54s59 -24 59 -54v-32zM405 491c23 0 43 -20 43 -43v-384c0 -23 -20 -43 -43 -43h-213 +c-23 0 -43 20 -43 43v64h43v-43h213v342h-213v-43h-43v64c0 23 20 43 43 43h213z" /> + <glyph glyph-name="phonelink_off" unicode="phonelink_off" +d="M491 341c12 0 21 -9 21 -21v-213c0 -12 -9 -22 -21 -22h-4l-64 64h46v150h-85v-111l-43 43v89c0 12 10 21 22 21h128zM85 378v-229h229zM41 477c138.107 -138.226 275.985 -276.682 414 -415l-27 -27l-50 50h-378v64h43v235c0 10 4 20 10 27l-39 39zM469 384h-281l-43 43 +h324v-43z" /> + <glyph glyph-name="phonelink_ring" unicode="phonelink_ring" +d="M299 85v342h-214v-342h214zM299 491c23 0 42 -20 42 -43v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43h214zM384 303c26 -28 26 -66 0 -92l-21 22c11 15 11 34 0 49zM429 348c53 -51 53 -133 0 -182l-22 22c38 41 38 100 0 138z" /> + <glyph glyph-name="phonelink_setup" unicode="phonelink_setup" +d="M405 491c23 0 43 -20 43 -43v-384c0 -23 -20 -43 -43 -43h-213c-23 0 -43 20 -43 43v64h43v-43h213v342h-213v-43h-43v64c0 23 20 43 43 43h213zM171 213c23 0 42 20 42 43s-19 43 -42 43s-43 -20 -43 -43s20 -43 43 -43zM252 245l23 -19c2 -2 4 -4 2 -6l-21 -37 +c-2 -2 -4 -2 -6 -2l-28 11c-6 -4 -13 -9 -19 -11l-5 -27c-2 -2 -4 -5 -6 -5h-43c-2 0 -6 3 -4 5l-4 27c-6 2 -13 7 -19 11l-30 -9c-2 -2 -5 1 -7 3l-21 36c0 2 0 4 2 8l24 17v22l-24 17c-2 2 -4 4 -2 6l21 37c2 2 5 2 7 2l27 -11c6 4 14 9 20 11l4 27c2 2 4 5 6 5h43 +c4 0 6 -3 6 -5l5 -27c6 -2 13 -7 19 -11l28 9c2 2 4 -1 6 -3l21 -36c0 -2 0 -4 -2 -6l-23 -17v-22z" /> + <glyph glyph-name="photo" unicode="photo" +d="M181 224l-74 -96h298l-96 128l-74 -96zM448 107c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298c23 0 43 -20 43 -43v-298z" /> + <glyph glyph-name="photo_album" unicode="photo_album" +d="M128 107h256l-82 109l-64 -82l-46 55zM128 427v-171l53 32l54 -32v171h-107zM384 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v342c0 23 20 42 43 42h256z" /> + <glyph glyph-name="photo_camera" unicode="photo_camera" +d="M256 149c59 0 107 48 107 107s-48 107 -107 107s-107 -48 -107 -107s48 -107 107 -107zM192 469h128l39 -42h68c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h68zM188 256c0 38 30 68 68 68s68 -30 68 -68 +s-30 -68 -68 -68s-68 30 -68 68z" /> + <glyph glyph-name="photo_filter" unicode="photo_filter" +d="M283 283l58 -27l-58 -27l-27 -58l-27 58l-58 27l58 27l27 58zM363 299l-20 44l-44 20l44 20l20 44l20 -44l44 -20l-44 -20zM406 299h42v-192c0 -23 -19 -43 -42 -43h-299c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h192v-43h-192v-298h299v192z" /> + <glyph glyph-name="photo_library" unicode="photo_library" +d="M43 384h42v-299h299v-42h-299c-23 0 -42 19 -42 42v299zM235 256l-64 -85h256l-86 106l-63 -79zM469 171c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256c23 0 42 -19 42 -42v-256z" /> + <glyph glyph-name="photo_size_select_actual" unicode="photo_size_select_actual" +d="M107 149h298l-96 128l-74 -96l-54 64zM448 448c21 0 43 -22 43 -43v-298c0 -21 -22 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 21 22 43 43 43h384z" /> + <glyph glyph-name="photo_size_select_large" unicode="photo_size_select_large" +d="M64 107h213l-68 91l-53 -69l-39 46zM21 277h299v-213h-256c-23 0 -43 20 -43 43v170zM107 448h42v-43h-42v43zM192 448h43v-43h-43v43zM64 448v-43h-43c0 21 22 43 43 43zM363 107h42v-43h-42v43zM363 448h42v-43h-42v43zM21 363h43v-43h-43v43zM448 448 +c21 0 43 -22 43 -43h-43v43zM448 363h43v-43h-43v43zM277 448h43v-43h-43v43zM491 107c0 -21 -22 -43 -43 -43v43h43zM448 277h43v-42h-43v42zM448 192h43v-43h-43v43z" /> + <glyph glyph-name="photo_size_select_small" unicode="photo_size_select_small" +d="M149 448v-43h-42v43h42zM235 448v-43h-43v43h43zM64 277v-42h-43v42h43zM64 448v-43h-43c0 21 22 43 43 43zM405 107v-43h-42v43h42zM405 448v-43h-42v43h42zM320 107v-43h-43v43h43zM64 363v-43h-43v43h43zM64 64c-23 0 -43 20 -43 43v85h214v-128h-171zM448 448 +c21 0 43 -22 43 -43h-43v43zM491 363v-43h-43v43h43zM320 448v-43h-43v43h43zM491 107c0 -21 -22 -43 -43 -43v43h43zM491 277v-42h-43v42h43zM491 192v-43h-43v43h43z" /> + <glyph glyph-name="picture_as_pdf" unicode="picture_as_pdf" +d="M299 267v64h21v-64h-21zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42zM192 309v22h21v-22h-21zM437 331v32h-64v-128h32v42h32v32h-32v22h32zM352 267v64c0 18 -14 32 -32 32h-53v-128h53c18 0 32 14 32 32zM245 309v22c0 18 -14 32 -32 32h-53v-128h32v42h21 +c18 0 32 14 32 32zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256z" /> + <glyph glyph-name="picture_in_picture" unicode="picture_in_picture" +d="M448 106v300h-384v-300h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384zM405 363v-128h-170v128h170z" /> + <glyph glyph-name="picture_in_picture_alt" unicode="picture_in_picture_alt" +d="M448 106v300h-384v-300h384zM491 107c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v299c0 23 20 42 43 42h384c23 0 43 -19 43 -42v-299zM405 277v-128h-170v128h170z" /> + <glyph glyph-name="pie_chart" unicode="pie_chart" +d="M278 234h191c-10 -101 -90 -181 -191 -191v191zM278 469c101 -10 181 -90 191 -191h-191v191zM235 469v-426c-108 11 -192 102 -192 213s84 202 192 213z" /> + <glyph glyph-name="pie_chart_outlined" unicode="pie_chart_outlined" +d="M277 87c77 10 138 71 148 148h-148v-148zM85 256c0 -87 66 -158 150 -169v338c-84 -10 -150 -82 -150 -169zM277 425v-148h148c-10 77 -71 138 -148 148zM256 469c117 0 213 -96 213 -213s-96 -213 -213 -213s-213 96 -213 213s96 213 213 213z" /> + <glyph glyph-name="pin_drop" unicode="pin_drop" +d="M107 85h298v-42h-298v42zM213 341c0 -23 20 -42 43 -42c24 0 43 19 43 42s-20 43 -43 43s-43 -20 -43 -43zM384 341c0 -96 -128 -234 -128 -234s-128 138 -128 234c0 71 57 128 128 128s128 -57 128 -128z" /> + <glyph glyph-name="place" unicode="place" +d="M256 267c29 0 53 24 53 53s-24 53 -53 53s-53 -24 -53 -53s24 -53 53 -53zM256 469c83 0 149 -66 149 -149c0 -112 -149 -277 -149 -277s-149 165 -149 277c0 83 66 149 149 149z" /> + <glyph glyph-name="play_arrow" unicode="play_arrow" +d="M171 405l234 -149l-234 -149v298z" /> + <glyph glyph-name="play_circle_filled" unicode="play_circle_filled" +d="M213 160l128 96l-128 96v-192zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="play_circle_outline" unicode="play_circle_outline" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM213 160v192l128 -96z" /> + <glyph glyph-name="play_for_work" unicode="play_for_work" +d="M128 213h43c0 -47 38 -85 85 -85s85 38 85 85h43c0 -71 -57 -128 -128 -128s-128 57 -128 128zM235 405h42v-119h75l-96 -96l-96 96h75v119z" /> + <glyph glyph-name="playlist_add" unicode="playlist_add" +d="M43 171v42h170v-42h-170zM384 213h85v-42h-85v-86h-43v86h-85v42h85v86h43v-86zM299 384v-43h-256v43h256zM299 299v-43h-256v43h256z" /> + <glyph glyph-name="playlist_add_check" unicode="playlist_add_check" +d="M459 267l32 -32l-149 -150l-97 96l32 32l65 -64zM43 171v42h170v-42h-170zM299 384v-43h-256v43h256zM299 299v-43h-256v43h256z" /> + <glyph glyph-name="playlist_play" unicode="playlist_play" +d="M363 235l106 -64l-106 -64v128zM43 192v43h277v-43h-277zM405 405v-42h-362v42h362zM405 320v-43h-362v43h362z" /> + <glyph glyph-name="plus_one" unicode="plus_one" +d="M309 382l96 23v-277h-42v226l-54 -11v39zM213 341v-85h86v-43h-86v-85h-42v85h-86v43h86v85h42z" /> + <glyph glyph-name="poll" unicode="poll" +d="M363 149v86h-43v-86h43zM277 149v214h-42v-214h42zM192 149v150h-43v-150h43zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="polymer" unicode="polymer" +d="M405 427l96 -171l-96 -171h-85l96 171l-56 99l-168 -270h-85l-96 171l96 171h85l-96 -171l56 -99l168 270h85z" /> + <glyph glyph-name="pool" unicode="pool" +d="M299 395c0 29 24 53 53 53s53 -24 53 -53s-24 -54 -53 -54s-53 25 -53 54zM185 256c-12 0 -17 3 -25 8c-4 3 -9 5 -16 8l69 69l-21 22c-24 24 -46 32 -85 32v53c53 0 84 -10 117 -43l137 -136c-3 -2 -6 -4 -9 -5c-8 -5 -13 -8 -25 -8s-16 3 -24 8c-10 6 -23 13 -47 13 +s-37 -7 -47 -13c-8 -5 -12 -8 -24 -8zM469 160c-24 0 -36 8 -46 14c-8 5 -13 7 -25 7s-16 -2 -24 -7c-10 -6 -23 -14 -47 -14s-36 8 -46 14c-8 5 -13 7 -25 7s-16 -2 -24 -7c-10 -6 -23 -14 -47 -14s-36 8 -46 14c-8 5 -13 7 -25 7s-16 -2 -24 -7c-10 -6 -23 -14 -47 -14v43 +c12 0 16 2 24 7c10 6 23 14 47 14s36 -8 46 -14c8 -5 13 -7 25 -7s16 2 24 7c10 6 23 14 47 14s36 -8 46 -14c8 -5 13 -7 25 -7s16 2 24 7c10 6 23 14 47 14s36 -8 46 -14c8 -5 13 -7 25 -7v-43zM469 64c-24 0 -36 8 -46 14c-8 5 -13 7 -25 7s-16 -2 -24 -7 +c-10 -6 -23 -14 -47 -14s-36 8 -46 14c-8 5 -13 7 -25 7s-16 -2 -24 -7c-10 -6 -23 -14 -47 -14s-37 8 -47 14c-8 5 -12 7 -24 7s-17 -2 -25 -7c-10 -6 -22 -14 -46 -14v43c12 0 16 2 24 7c10 6 23 14 47 14s36 -8 46 -14c8 -5 13 -7 25 -7s16 2 24 7c10 6 23 14 47 14 +s37 -8 47 -14c8 -5 12 -7 24 -7s17 2 25 7c10 6 22 14 46 14s37 -8 47 -14c8 -5 12 -7 24 -7v-43z" /> + <glyph glyph-name="portable_wifi_off" unicode="portable_wifi_off" +d="M70 459l21 -22l357 -357l-27 -27l-160 161h-1l-4 -1c-23 0 -43 20 -43 43l1 4l-34 34c-6 -12 -9 -24 -9 -38c0 -32 17 -59 42 -74l-21 -37c-38 22 -64 64 -64 111c0 26 7 49 20 69l-30 31c-20 -28 -33 -62 -33 -100c0 -63 34 -118 85 -148l-21 -37 +c-64 37 -106 106 -106 185c0 49 16 95 44 131l-44 45zM256 427c-29 0 -56 -7 -80 -20l-31 31c32 20 70 31 111 31c118 0 213 -95 213 -213c0 -41 -11 -79 -31 -111l-32 31c13 24 21 51 21 80c0 94 -77 171 -171 171zM375 208l-35 35c1 4 1 9 1 13c0 47 -38 85 -85 85 +c-4 0 -9 0 -13 -1l-35 35c15 6 31 9 48 9c71 0 128 -57 128 -128c0 -17 -3 -33 -9 -48z" /> + <glyph glyph-name="portrait" unicode="portrait" +d="M405 107v298h-298v-298h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM352 165v-16h-192v16c0 32 64 48 96 48s96 -16 96 -48zM256 251c-26 0 -48 22 -48 48s22 48 48 48s48 -22 48 -48 +s-22 -48 -48 -48z" /> + <glyph glyph-name="power" unicode="power" +d="M342 363c21 0 42 -22 42 -43v-117l-75 -75v-64h-106v64l-75 75v117c0 21 21 43 42 43h1v85h42v-85h86v85h42z" /> + <glyph glyph-name="power_input" unicode="power_input" +d="M341 192v43h107v-43h-107zM192 192v43h107v-43h-107zM43 192v43h106v-43h-106zM43 320h405v-43h-405v43z" /> + <glyph glyph-name="power_settings_new" unicode="power_settings_new" +d="M380 402c41 -35 68 -88 68 -146c0 -106 -86 -192 -192 -192s-192 86 -192 192c0 58 27 111 68 146l30 -30c-33 -27 -55 -69 -55 -116c0 -83 66 -149 149 -149s149 66 149 149c0 47 -21 88 -55 115zM277 448v-213h-42v213h42z" /> + <glyph glyph-name="pregnant_woman" unicode="pregnant_woman" +d="M341 235v-86h-64v-106h-64v106h-42v150c0 35 29 64 64 64s64 -29 64 -64c25 -10 42 -35 42 -64zM192 427c0 24 19 42 43 42s42 -18 42 -42s-18 -43 -42 -43s-43 19 -43 43z" /> + <glyph glyph-name="present_to_all" unicode="present_to_all" +d="M213 256h-42l85 85l85 -85h-42v-85h-86v85zM448 106v300h-384v-300h384zM448 448c24 0 43 -19 43 -43v-298c0 -24 -19 -43 -43 -43h-384c-24 0 -43 19 -43 43v298c0 24 19 43 43 43h384z" /> + <glyph glyph-name="print" unicode="print" +d="M384 448v-85h-256v85h256zM405 256c12 0 22 9 22 21s-10 22 -22 22s-21 -10 -21 -22s9 -21 21 -21zM341 107v106h-170v-106h170zM405 341c35 0 64 -29 64 -64v-128h-85v-85h-256v85h-85v128c0 35 29 64 64 64h298z" /> + <glyph glyph-name="priority_high" unicode="priority_high" +d="M213 448h86v-256h-86v256zM213 107c0 24 19 42 43 42s43 -18 43 -42s-19 -43 -43 -43s-43 19 -43 43z" /> + <glyph glyph-name="public" unicode="public" +d="M382 141c28 30 45 71 45 115c0 71 -44 133 -107 158v-9c0 -23 -20 -42 -43 -42h-42v-43c0 -12 -10 -21 -22 -21h-42v-43h128c12 0 21 -9 21 -21v-64h21c19 0 35 -13 41 -30zM235 87v41c-23 0 -43 20 -43 43v21l-102 102c-3 -12 -5 -25 -5 -38c0 -87 66 -159 150 -169z +M256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="publish" unicode="publish" +d="M107 213l149 150l149 -150h-85v-128h-128v128h-85zM107 427h298v-43h-298v43z" /> + <glyph glyph-name="query_builder" unicode="query_builder" +d="M267 363v-112l96 -57l-16 -27l-112 68v128h32zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="question_answer" unicode="question_answer" +d="M363 256c0 -12 -10 -21 -22 -21h-213l-85 -86v299c0 12 9 21 21 21h277c12 0 22 -9 22 -21v-192zM448 384c12 0 21 -9 21 -21v-320l-85 85h-235c-12 0 -21 9 -21 21v43h277v192h43z" /> + <glyph glyph-name="queue" unicode="queue" +d="M405 277v43h-85v85h-43v-85h-85v-43h85v-85h43v85h85zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42z" /> + <glyph glyph-name="queue_music" unicode="queue_music" +d="M363 384h106v-43h-64v-192c0 -35 -29 -64 -64 -64s-64 29 -64 64s29 64 64 64c7 0 15 -2 22 -4v175zM64 171v42h171v-42h-171zM320 299v-43h-256v43h256zM320 384v-43h-256v43h256z" /> + <glyph glyph-name="queue_play_next" unicode="queue_play_next" +d="M512 128l-96 -96l-32 32l64 64l-64 64l32 32zM277 299h64v-43h-64v-64h-42v64h-64v43h64v64h42v-64zM448 448c23 0 43 -19 43 -43v-170h-43v170h-384v-256h320v-42h-43v-43h-170v43h-107c-24 0 -43 19 -43 42v256c0 24 19 43 43 43h384z" /> + <glyph glyph-name="radio" unicode="radio" +d="M427 256v85h-342v-85h256v43h43v-43h43zM149 85c35 0 64 29 64 64s-29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64zM69 381l270 110l14 -36l-176 -71h250c24 0 42 -19 42 -43v-256c0 -23 -18 -42 -42 -42h-342c-24 0 -42 19 -42 42v256c0 18 10 34 26 40z" /> + <glyph glyph-name="radio_button_checked" unicode="radio_button_checked" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM256 363c59 0 107 -48 107 -107s-48 -107 -107 -107s-107 48 -107 107s48 107 107 107z" /> + <glyph glyph-name="radio_button_unchecked" unicode="radio_button_unchecked" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="rate_review" unicode="rate_review" +d="M384 213v43h-117l-43 -43h160zM128 213h53l147 147c4 4 4 11 0 15l-38 38c-4 4 -11 4 -15 0l-147 -147v-53zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="receipt" unicode="receipt" +d="M64 43v426l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32v-426l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32zM384 320v43h-256v-43h256zM384 235v42h-256v-42h256zM384 149v43h-256v-43h256z +" /> + <glyph glyph-name="recent_actors" unicode="recent_actors" +d="M267 149v16c0 32 -64 48 -96 48s-96 -16 -96 -48v-16h192zM171 347c-26 0 -48 -22 -48 -48s22 -48 48 -48s48 22 48 48s-22 48 -48 48zM299 405c12 0 21 -9 21 -21v-256c0 -12 -9 -21 -21 -21h-256c-12 0 -22 9 -22 21v256c0 12 10 21 22 21h256zM363 107v298h42v-298 +h-42zM448 405h43v-298h-43v298z" /> + <glyph glyph-name="record_voice_over" unicode="record_voice_over" +d="M428 469c83 -86 83 -215 0 -298l-35 34c59 68 59 166 0 230zM358 398c43 -47 43 -112 0 -155l-36 36c18 25 18 58 0 83zM192 192c57 0 171 -28 171 -85v-43h-342v43c0 57 114 85 171 85zM107 320c0 47 38 85 85 85s85 -38 85 -85s-38 -85 -85 -85s-85 38 -85 85z" /> + <glyph glyph-name="redeem" unicode="redeem" +d="M427 213v128h-109l45 -60l-35 -25c-24.0378 32.6288 -48.3187 65.0147 -72 98c-23.6829 -32.9837 -47.9614 -65.3719 -72 -98l-35 25l45 60h-109v-128h342zM427 107v42h-342v-42h342zM192 427c-12 0 -21 -10 -21 -22s9 -21 21 -21s21 9 21 21s-9 22 -21 22zM320 427 +c-12 0 -21 -10 -21 -22s9 -21 21 -21s21 9 21 21s-9 22 -21 22zM427 384c24 0 42 -19 42 -43v-234c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v234c0 24 18 43 42 43h47c-2 7 -4 14 -4 21c0 35 29 64 64 64c22 0 41 -11 53 -28l11 -15l11 15c12 17 31 28 53 28 +c35 0 64 -29 64 -64c0 -7 -2 -14 -4 -21h47z" /> + <glyph glyph-name="redo" unicode="redo" +d="M393 286l76 77v-192h-192l78 77c-30 25 -68 40 -110 40c-76 0 -140 -49 -162 -117l-50 16c29 89 113 154 212 154c57 0 109 -21 148 -55z" /> + <glyph glyph-name="refresh" unicode="refresh" +d="M377 377l50 50v-150h-150l69 69c-23 23 -55 38 -90 38c-71 0 -128 -57 -128 -128s57 -128 128 -128c56 0 104 35 121 85h44c-19 -74 -85 -128 -165 -128c-94 0 -170 77 -170 171s76 171 170 171c47 0 90 -19 121 -50z" /> + <glyph glyph-name="remove" unicode="remove" +d="M405 235h-298v42h298v-42z" /> + <glyph glyph-name="remove_circle" unicode="remove_circle" +d="M363 235v42h-214v-42h214zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="remove_circle_outline" unicode="remove_circle_outline" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM149 277h214v-42h-214v42z" /> + <glyph glyph-name="remove_from_queue" unicode="remove_from_queue" +d="M341 299v-43h-170v43h170zM448 149v256h-384v-256h384zM448 448c23 0 43 -19 43 -43l-1 -256c0 -23 -19 -42 -42 -42h-107v-43h-170v43h-107c-24 0 -43 19 -43 42v256c0 24 19 43 43 43h384z" /> + <glyph glyph-name="remove_red_eye" unicode="remove_red_eye" +d="M256 320c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM256 149c59 0 107 48 107 107s-48 107 -107 107s-107 -48 -107 -107s48 -107 107 -107zM256 416c107 0 198 -66 235 -160c-37 -94 -128 -160 -235 -160s-198 66 -235 160c37 94 128 160 235 160z +" /> + <glyph glyph-name="remove_shopping_cart" unicode="remove_shopping_cart" +d="M149 128c23 0 43 -20 43 -43s-20 -42 -43 -42s-42 19 -42 42s19 43 42 43zM332 235l-192 192h287c12 0 21 -10 21 -22c0 -4 -1 -7 -3 -10l-76 -138c-7 -13 -21 -22 -37 -22zM158 192h108l-43 43h-50l-19 -35l-1 -3c0 -3 2 -5 5 -5zM485 27l-27 -27l-61 61 +c-8 -11 -20 -18 -34 -18c-23 0 -43 19 -43 42c0 14 7 27 18 35l-30 29h-159c-23 0 -42 20 -42 43c0 7 2 14 5 20l29 53l-47 99l-94 94l27 27z" /> + <glyph glyph-name="reorder" unicode="reorder" +d="M64 405h384v-42h-384v42zM64 277v43h384v-43h-384zM64 107v42h384v-42h-384zM64 192v43h384v-43h-384z" /> + <glyph glyph-name="repeat" unicode="repeat" +d="M363 149v86h42v-128h-256v-64l-85 85l85 85v-64h214zM149 363v-86h-42v128h256v64l85 -85l-85 -85v64h-214z" /> + <glyph glyph-name="repeat_one" unicode="repeat_one" +d="M277 192h-32v85h-32v22l43 21h21v-128zM363 149v86h42v-128h-256v-64l-85 85l85 85v-64h214zM149 363v-86h-42v128h256v64l85 -85l-85 -85v64h-214z" /> + <glyph glyph-name="replay" unicode="replay" +d="M256 405c94 0 171 -76 171 -170s-77 -171 -171 -171s-171 77 -171 171h43c0 -71 57 -128 128 -128s128 57 128 128s-57 128 -128 128v-86l-107 107l107 107v-86z" /> + <glyph glyph-name="replay_10" unicode="replay_10" +d="M282 188c0 -3.2653 6.32517 -7 10 -7c2 0 5 0 7 2l4 5s2 4 2 6v43c0 0 -2 4 -2 6c0 2.75261 -8.21183 7 -11 7c-2 0 -4 -1 -6 -3l-4 -4s-3 -4 -3 -6v-43s3 -4 3 -6zM324 209c0 -6 0 -13 -2 -17l-6 -13s-7 -6 -11 -6s-9 -2 -13 -2s-9 0 -13 2s-6 4 -10 6 +c-6.74403 3.37202 -9 19.7461 -9 30v15c0 6 0 13 2 17l7 13s6 6 10 6s9 2 13 2s9 0 13 -2s7 -4 11 -6s4 -7 6 -13s2 -11 2 -17v-15zM233 171h-20v70l-21 -6v15l38 12h3v-91zM256 405c94 0 171 -76 171 -170s-77 -171 -171 -171s-171 77 -171 171h43c0 -70 58 -128 128 -128 +s128 58 128 128s-58 128 -128 128v-86l-107 107l107 107v-86z" /> + <glyph glyph-name="replay_30" unicode="replay_30" +d="M286 188c0 -3.76553 6.92157 -7 11 -7c2 0 4 0 6 2l4 5s2 4 2 6v43c0 2 -2 4 -2 6c0 2.33563 -7.56075 7 -10 7c-2 0 -5 -1 -7 -3l-4 -4s-2 -4 -2 -6v-43s2 -4 2 -6zM326 209c0 -6 0 -13 -2 -17l-6 -13s-7 -6 -11 -6s-9 -2 -13 -2c-10.126 0 -16.1493 4.57466 -23 8 +c-4 2 -4 7 -6 13s-3 11 -3 17v15c0 6 1 13 3 17l6 13s7 6 11 6s8 2 12 2s9 0 13 -2s7 -4 11 -6s4 -7 6 -13s2 -11 2 -17v-15zM213 224c8.11936 0 15 4.95913 15 13v4s-2 2 -2 4s-2 2 -4 2h-11s-2 -2 -4 -2s-2 -2 -2 -4v-4h-22c0 9.89385 8.81974 23 18 23c2 0 8 2 10 2 +c8.67272 0 17.6319 -2.81597 24 -6c5.06488 -2.53244 8 -12.109 8 -19v-7s-2 -4 -2 -6s-2 -4 -4 -4s-5 -3 -7 -5c4 -2 9 -4 11 -8s4 -9 4 -13s0 -9 -2 -11s-4 -6 -6 -8s-7 -4 -11 -4s-9 -2 -13 -2s-8 0 -10 2s-7 2 -11 4c-5.58093 2.79046 -9 13.5084 -9 21h18v-4s2 -2 2 -4 +s2 -2 4 -2h11s2 2 4 2s2 2 2 4v11s-2 2 -2 4s-2 2 -4 2h-13v15h8zM256 405c94 0 171 -76 171 -170s-77 -171 -171 -171s-171 77 -171 171h43c0 -70 58 -128 128 -128s128 58 128 128s-58 128 -128 128v-86l-107 107l107 107v-86z" /> + <glyph glyph-name="replay_5" unicode="replay_5" +d="M252 222c-1.79204 -0.716817 -7 -2.40231 -7 -4c0 -2 -2 -3 -2 -3h-15l5 47h51v-15h-37l-2 -19s2 0 2 2s3 1 3 3s2 0 4 0h4c4 0 9 -1 11 -3s6 -4 8 -6c4.43641 -4.43641 9 -13.6284 9 -23c0 -4 0 -9 -2 -11s-3 -7 -7 -11s-6 -4 -8 -6s-9 -2 -13 -2s-9 0 -11 2s-6 2 -10 4 +c-5.5956 2.7978 -9 11.277 -9 19h17c0 -7.40446 5.29508 -10 13 -10c2 0 4 0 6 2l5 4s2 4 2 6v13l-2 4l-5 5s-4 2 -6 2h-4zM256 405c94 0 171 -76 171 -170s-77 -171 -171 -171s-171 77 -171 171h43c0 -70 58 -128 128 -128s128 58 128 128s-58 128 -128 128v-86l-107 107 +l107 107v-86z" /> + <glyph glyph-name="reply" unicode="reply" +d="M213 320c149 -21 214 -128 235 -235c-53 75 -128 109 -235 109v-87l-149 149l149 149v-85z" /> + <glyph glyph-name="reply_all" unicode="reply_all" +d="M277 320c149 -21 214 -128 235 -235c-53 75 -128 109 -235 109v-87l-149 149l149 149v-85zM149 341l-85 -85l85 -85v-64l-149 149l149 149v-64z" /> + <glyph glyph-name="report" unicode="report" +d="M277 235v128h-42v-128h42zM256 143c15 0 28 13 28 28s-13 27 -28 27s-28 -12 -28 -27s13 -28 28 -28zM336 448l112 -112v-160l-112 -112h-160l-112 112v160l112 112h160z" /> + <glyph glyph-name="report_problem" unicode="report_problem" +d="M277 213v86h-42v-86h42zM277 128v43h-42v-43h42zM21 64l235 405l235 -405h-470z" /> + <glyph glyph-name="restaurant" unicode="restaurant" +d="M341 384c0 38 48 85 107 85v-426h-53v170h-54v171zM235 320v149h42v-149c0 -45 -35 -82 -80 -85v-192h-53v192c-45 3 -80 40 -80 85v149h43v-149h42v149h43v-149h43z" /> + <glyph glyph-name="restaurant_menu" unicode="restaurant_menu" +d="M317 266l-31 -31l147 -147l-30 -30l-147 147l-147 -147l-30 30l208 208c-15 33 -4 79 30 113c41 41 99 48 130 17s24 -90 -17 -131c-34 -34 -80 -44 -113 -29zM173 227l-90 90c-33 33 -33 87 0 120l150 -149z" /> + <glyph glyph-name="restore" unicode="restore" +d="M256 341h32v-90l75 -45l-16 -26l-91 55v106zM277 448c106 0 192 -86 192 -192s-86 -192 -192 -192c-53 0 -100 21 -135 56l30 31c27 -27 64 -44 105 -44c83 0 150 66 150 149s-67 149 -150 149s-149 -66 -149 -149h64l-86 -86l-2 3l-83 83h64c0 106 86 192 192 192z" /> + <glyph glyph-name="restore_page" unicode="restore_page" +d="M256 128c59 0 107 48 107 107s-48 106 -107 106c-38 0 -71 -20 -90 -49l-27 28v-85h85l-34 34c12 24 37 40 66 40c41 0 75 -33 75 -74s-34 -75 -75 -75c-25 0 -48 13 -61 32h-37c16 -38 54 -64 98 -64zM299 469l128 -128v-256c0 -23 -20 -42 -43 -42h-256 +c-23 0 -43 19 -43 42l1 342c0 23 19 42 42 42h171z" /> + <glyph glyph-name="ring_volume" unicode="ring_volume" +d="M137 303c0 0 -74 74 -76 75l30 31l76 -76zM277 469v-106h-42v106h42zM451 378c-2 -1 -76 -75 -76 -75l-30 30l76 76zM506 156c4 -4 6 -9 6 -15s-2 -11 -6 -15l-53 -53c-4 -4 -9 -6 -15 -6s-11 2 -15 6c-17 16 -36 30 -57 40c-7 3 -12 11 -12 19v66c-31 10 -64 15 -98 15 +s-67 -5 -98 -15v-66c0 -9 -5 -17 -12 -20c-21 -10 -40 -23 -57 -39c-4 -4 -9 -6 -15 -6s-11 2 -15 6l-53 53c-4 4 -6 9 -6 15s2 11 6 15c65 62 153 100 250 100s185 -38 250 -100z" /> + <glyph glyph-name="room" unicode="room" +d="M256 267c29 0 53 24 53 53s-24 53 -53 53s-53 -24 -53 -53s24 -53 53 -53zM256 469c83 0 149 -66 149 -149c0 -112 -149 -277 -149 -277s-149 165 -149 277c0 83 66 149 149 149z" /> + <glyph glyph-name="room_service" unicode="room_service" +d="M295 346c83 -17 147 -88 153 -175h-384c6 87 70 158 153 175c-2 5 -4 11 -4 17c0 23 20 42 43 42s43 -19 43 -42c0 -6 -2 -12 -4 -17zM43 149h426v-42h-426v42z" /> + <glyph glyph-name="rotate_90_degrees_ccw" unicode="rotate_90_degrees_ccw" +d="M413 370c75 -75 75 -196 0 -271c-37 -38 -87 -56 -136 -56c-32 0 -63 8 -92 24l32 31c19 -9 39 -13 60 -13c38 0 77 15 106 44c58 58 58 153 0 211c-29 29 -68 44 -106 44v-69l-90 90l90 91v-69c49 0 99 -19 136 -57zM79 237l78 -78l78 78l-78 78zM157 375l138 -138 +l-138 -138l-139 138z" /> + <glyph glyph-name="rotate_left" unicode="rotate_left" +d="M277 425c84 -10 150 -82 150 -169s-66 -159 -150 -169v43c61 10 107 63 107 126s-46 116 -107 126v-83l-97 95l97 97v-66zM151 121l31 31c16 -12 34 -19 53 -22v-43c-30 4 -59 15 -84 34zM130 235c3 -19 10 -37 21 -53l-30 -30c-19 25 -30 53 -34 83h43zM152 330 +c-11 -16 -19 -34 -22 -53h-43c4 30 16 58 35 83z" /> + <glyph glyph-name="rotate_right" unicode="rotate_right" +d="M360 182c12 16 19 34 22 53h43c-4 -30 -15 -58 -34 -83zM277 130c19 3 37 10 53 22l31 -31c-25 -19 -54 -30 -84 -34v43zM425 277h-43c-3 19 -10 37 -22 53l31 30c19 -25 30 -53 34 -83zM332 394l-97 -95v83c-61 -10 -107 -63 -107 -126s46 -116 107 -126v-43 +c-84 10 -150 82 -150 169s66 159 150 169v66z" /> + <glyph glyph-name="rounded_corner" unicode="rounded_corner" +d="M448 341v-106h-43v106c0 35 -29 64 -64 64h-106v43h106c59 0 107 -48 107 -107zM64 64v43h43v-43h-43zM149 64v43h43v-43h-43zM235 64v43h42v-43h-42zM149 405v43h43v-43h-43zM64 405v43h43v-43h-43zM64 320v43h43v-43h-43zM64 149v43h43v-43h-43zM64 235v42h43v-42h-43z +M405 149v43h43v-43h-43zM405 107h43v-43h-43v43z" /> + <glyph glyph-name="router" unicode="router" +d="M320 128v43h-43v-43h43zM245 128v43h-42v-43h42zM171 128v43h-43v-43h43zM405 235c23 0 43 -20 43 -43v-85c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v85c0 23 20 43 43 43h213v85h43v-85h42zM412 369l-17 -17c-15 15 -35 21 -54 21s-38 -6 -53 -21l-17 17 +c19 19 44 30 70 30s52 -11 71 -30zM431 386c-26 23 -58 36 -90 36s-63 -13 -89 -36l-17 17c30 30 68 45 106 45s77 -15 107 -45z" /> + <glyph glyph-name="rowing" unicode="rowing" +d="M448 64l-64 -64l-64 64v32l-151 151c-7 -1 -14 -1 -20 -1v46c35 -1 77 18 100 43l30 33c7.60688 7.60688 20.1539 16 35 16h1c26 0 48 -22 48 -48v-123c0 -18 -8 -34 -20 -46l-76 76v49c-13 -11 -31 -22 -49 -30l134 -134h32zM320 491c23 0 43 -20 43 -43 +s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM181 203l54 -54h-43l-75 -74l-32 32z" /> + <glyph glyph-name="rss_feed" unicode="rss_feed" +d="M85 297c117 0 212 -95 212 -212h-61c0 83 -68 151 -151 151v61zM85 417c183 0 332 -149 332 -332h-60c0 150 -122 272 -272 272v60zM85 132c0 26 21 46 47 46s46 -20 46 -46s-20 -47 -46 -47s-47 21 -47 47z" /> + <glyph glyph-name="rv_hookup" unicode="rv_hookup" +d="M363 469l64 -64l-64 -64v43h-171v43h171v42zM384 213v64h-85v-64h85zM235 85c12 0 21 10 21 22s-9 21 -21 21s-22 -9 -22 -21s10 -22 22 -22zM427 149h42v-42h-170c0 -35 -29 -64 -64 -64s-64 29 -64 64h-43c-23 0 -43 19 -43 42v64h150v64h-86v-42l-64 64l64 64v-43h235 +c23 0 43 -20 43 -43v-128z" /> + <glyph glyph-name="satellite" unicode="satellite" +d="M107 128h298l-96 128l-74 -96l-54 64zM107 256c83 0 149 67 149 150h-43c0 -59 -47 -107 -106 -107v-43zM107 406v-65c35 0 64 30 64 65h-64zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" /> + <glyph glyph-name="save" unicode="save" +d="M320 320v85h-213v-85h213zM256 107c35 0 64 29 64 64s-29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64zM363 448l85 -85v-256c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h256z" /> + <glyph glyph-name="scanner" unicode="scanner" +d="M405 149v43h-213v-43h213zM149 149v43h-42v-43h42zM422 284c15 -4 26 -22 26 -39v-117c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v85c0 23 20 43 43 43h268l-300 109l15 40z" /> + <glyph glyph-name="schedule" unicode="schedule" +d="M267 363v-112l96 -57l-16 -27l-112 68v128h32zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="school" unicode="school" +d="M256 448l235 -128v-171h-43v148l-192 -105l-235 128zM107 231l149 -82l149 82v-86l-149 -81l-149 81v86z" /> + <glyph glyph-name="screen_lock_landscape" unicode="screen_lock_landscape" +d="M230 299v-22h52v22c0 14 -12 25 -26 25s-26 -11 -26 -25zM213 171c-12 0 -21 9 -21 21v64c0 12 9 21 21 21v22c0 23 19 42 43 42c23 0 43 -18 43 -42v-22c12 0 21 -9 21 -21v-64c0 -12 -9 -21 -21 -21h-86zM405 149v214h-298v-214h298zM448 405c23 0 43 -19 43 -42v-214 +c0 -23 -20 -42 -43 -42h-384c-23 0 -43 19 -43 42v214c0 23 20 42 43 42h384z" /> + <glyph glyph-name="screen_lock_portrait" unicode="screen_lock_portrait" +d="M363 107v298h-214v-298h214zM363 491c23 0 42 -20 42 -43v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43h214zM230 299v-22h52v22c0 14 -12 25 -26 25s-26 -11 -26 -25zM213 171c-12 0 -21 9 -21 21v64c0 12 9 21 21 21v22 +c0 23 19 42 43 42c23 0 43 -18 43 -42v-22c12 0 21 -9 21 -21v-64c0 -12 -9 -21 -21 -21h-86z" /> + <glyph glyph-name="screen_lock_rotation" unicode="screen_lock_rotation" +d="M358 459v-11h73v11c0 20 -16 36 -36 36s-37 -16 -37 -36zM341 320c-12 0 -21 9 -21 21v86c0 12 9 21 21 21v11c0 29 25 53 54 53s53 -24 53 -53v-11c12 0 21 -9 21 -21v-86c0 -12 -9 -21 -21 -21h-107zM181 75l28 28l81 -81l-14 -1c-134 0 -244 104 -255 235h32 +c8 -80 58 -148 128 -181zM496 240c13 -12 13 -33 0 -46l-136 -135c-12 -13 -32 -13 -45 0l-256 256c-13 12 -13 32 0 45l135 136c12 13 33 13 46 0l52 -52l-30 -30l-45 44l-121 -120l242 -242l120 121l-47 47l30 30z" /> + <glyph glyph-name="screen_rotation" unicode="screen_rotation" +d="M160 54l29 28l81 -81l-14 -1c-134 0 -244 104 -255 235h32c8 -80 57 -148 127 -181zM316 60l136 136l-256 256l-136 -136zM218 475l257 -257c13 -12 13 -32 0 -45l-136 -136c-12 -13 -32 -13 -45 0l-257 257c-13 12 -13 32 0 45l136 136c12 13 32 13 45 0zM352 458 +l-29 -28l-81 81l14 1c134 0 244 -104 255 -235h-32c-8 80 -57 148 -127 181z" /> + <glyph glyph-name="screen_share" unicode="screen_share" +d="M277 203l86 80l-86 80v-46c-83 -12 -116 -68 -128 -125c30 40 69 58 128 58v-47zM427 128h85v-43h-512v43h85c-24 0 -42 20 -42 43v213c0 24 18 43 42 43h342c23 0 42 -19 42 -43v-213c0 -23 -19 -43 -42 -43z" /> + <glyph glyph-name="sd_card" unicode="sd_card" +d="M384 341v86h-43v-86h43zM320 341v86h-43v-86h43zM256 341v86h-43v-86h43zM384 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42l1 256l127 128h171z" /> + <glyph glyph-name="sd_storage" unicode="sd_storage" +d="M384 341v86h-43v-86h43zM320 341v86h-43v-86h43zM256 341v86h-43v-86h43zM384 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42l1 256l127 128h171z" /> + <glyph glyph-name="search" unicode="search" +d="M203 213c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM331 213l106 -106l-32 -32l-106 106v17l-6 6c-24 -21 -56 -33 -90 -33c-77 0 -139 61 -139 138s62 139 139 139s138 -62 138 -139c0 -34 -12 -66 -33 -90l6 -6h17z" /> + <glyph glyph-name="security" unicode="security" +d="M256 491l192 -86v-128c0 -118 -82 -229 -192 -256c-110 27 -192 138 -192 256v128zM256 256v-191c79 25 138 103 149 191h-149zM256 256v188l-149 -66v-122h149z" /> + <glyph glyph-name="select_all" unicode="select_all" +d="M192 320v-128h128v128h-128zM149 149v214h214v-214h-214zM320 405v43h43v-43h-43zM320 64v43h43v-43h-43zM405 149v43h43v-43h-43zM405 320v43h43v-43h-43zM405 64v43h43c0 -23 -20 -43 -43 -43zM405 235v42h43v-42h-43zM235 64v43h42v-43h-42zM192 448v-43h-43v43h43z +M64 149v43h43v-43h-43zM107 64c-23 0 -43 20 -43 43h43v-43zM405 448c23 0 43 -20 43 -43h-43v43zM277 448v-43h-42v43h42zM64 320v43h43v-43h-43zM149 64v43h43v-43h-43zM64 235v42h43v-42h-43zM64 405c0 23 20 43 43 43v-43h-43z" /> + <glyph glyph-name="send" unicode="send" +d="M43 64v149l320 43l-320 43v149l448 -192z" /> + <glyph glyph-name="sentiment_dissatisfied" unicode="sentiment_dissatisfied" +d="M256 213c50 0 92 -30 109 -74h-35c-15 25 -42 42 -74 42s-59 -17 -74 -42h-35c17 44 59 74 109 74zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213 +s95 213 213 213zM149 309c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32zM299 309c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32z" /> + <glyph glyph-name="sentiment_neutral" unicode="sentiment_neutral" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM149 309c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32zM299 309 +c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32zM192 213h128v-32h-128v32z" /> + <glyph glyph-name="sentiment_satisfied" unicode="sentiment_satisfied" +d="M256 171c32 0 59 17 74 42h35c-17 -44 -59 -74 -109 -74s-92 30 -109 74h35c15 -25 42 -42 74 -42zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213 +s95 213 213 213zM149 309c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32zM299 309c0 18 14 32 32 32s32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32z" /> + <glyph glyph-name="sentiment_very_dissatisfied" unicode="sentiment_very_dissatisfied" +d="M256 213c50 0 92 -30 109 -74h-218c17 44 59 74 109 74zM167 256l-23 23l23 22l-23 23l23 22l22 -22l23 22l23 -22l-23 -23l23 -22l-23 -23l-23 23zM345 346l23 -22l-23 -23l23 -22l-23 -23l-22 23l-23 -23l-23 23l23 22l-23 23l23 22l23 -22zM256 85 +c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="sentiment_very_satisfied" unicode="sentiment_very_satisfied" +d="M256 139c-50 0 -92 30 -109 74h218c-17 -44 -59 -74 -109 -74zM189 300l-22 -23l-23 23l45 45l46 -45l-23 -23zM277 300l46 45l45 -45l-23 -23l-22 23l-23 -23zM256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469 +c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="settings" unicode="settings" +d="M256 181c41 0 75 34 75 75s-34 75 -75 75s-75 -34 -75 -75s34 -75 75 -75zM415 235l45 -35c4 -3 5 -9 2 -14l-43 -74c-3 -5 -8 -6 -13 -4l-53 21c-11 -8 -23 -16 -36 -21l-8 -56c-1 -5 -5 -9 -10 -9h-86c-5 0 -9 4 -10 9l-8 56c-13 5 -25 12 -36 21l-53 -21 +c-5 -2 -10 -1 -13 4l-43 74c-3 5 -2 11 2 14l45 35c-1 7 -1 14 -1 21s0 14 1 21l-45 35c-4 3 -5 9 -2 14l43 74c3 5 8 6 13 4l53 -21c11 8 23 16 36 21l8 56c1 5 5 9 10 9h86c5 0 9 -4 10 -9l8 -56c13 -5 25 -12 36 -21l53 21c5 2 10 1 13 -4l43 -74c3 -5 2 -11 -2 -14 +l-45 -35c1 -7 1 -14 1 -21s0 -14 -1 -21z" /> + <glyph glyph-name="settings_applications" unicode="settings_applications" +d="M368 256c0 5 0 10 -1 15l32 24c3 2 3 7 1 10l-30 52c-2 3 -6 4 -9 3l-37 -15c-8 6 -16 11 -25 15l-6 39c-1 3 -3 6 -7 6h-60c-4 0 -6 -2 -7 -6l-6 -40c-9 -4 -17 -8 -25 -14l-37 15c-3 1 -7 -1 -9 -4l-30 -51c-2 -3 -2 -8 1 -10l32 -24c-1 -5 -1 -10 -1 -15s0 -10 1 -15 +l-32 -24c-3 -2 -3 -7 -1 -10l30 -52c2 -3 6 -4 9 -3l37 15c8 -6 16 -11 25 -15l6 -39c1 -3 3 -6 7 -6h60c4 0 6 2 7 6l6 40c9 4 17 8 25 14l37 -15c3 -1 7 1 9 4l30 51c2 3 2 8 -1 10l-32 24c1 5 1 10 1 15zM405 448c24 0 43 -20 43 -43v-298c0 -23 -19 -43 -43 -43h-298 +c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h298zM256 299c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43z" /> + <glyph glyph-name="settings_backup_restore" unicode="settings_backup_restore" +d="M256 448c106 0 192 -86 192 -192s-86 -192 -192 -192c-44 0 -85 15 -117 40l30 30c25 -17 55 -27 87 -27c83 0 149 66 149 149s-66 149 -149 149s-149 -66 -149 -149h64l-86 -85l-85 85h64c0 106 86 192 192 192zM299 256c0 -23 -20 -43 -43 -43s-43 20 -43 43 +s20 43 43 43s43 -20 43 -43z" /> + <glyph glyph-name="settings_bluetooth" unicode="settings_bluetooth" +d="M317 207l-40 40v-80zM277 430v-80l40 40zM378 390l-92 -91l92 -92l-122 -122h-21v162l-98 -98l-30 30l119 120l-119 119l30 30l98 -98v162h21zM320 0v43h43v-43h-43zM149 0v43h43v-43h-43zM235 0v43h42v-43h-42z" /> + <glyph glyph-name="settings_brightness" unicode="settings_brightness" +d="M256 320v-128c35 0 64 29 64 64s-29 64 -64 64zM171 171v53l-32 32l32 32v53h53l32 32l32 -32h53v-53l32 -32l-32 -32v-53h-53l-32 -32l-32 32h-53zM448 106v300h-384v-300h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298 +c0 23 20 43 43 43h384z" /> + <glyph glyph-name="settings_cell" unicode="settings_cell" +d="M341 171v256h-170v-256h170zM341 512c23 0 43 -20 43 -43v-341c0 -23 -20 -43 -43 -43h-170c-23 0 -43 20 -43 43v341c0 23 20 43 43 43h170zM320 0v43h43v-43h-43zM235 0v43h42v-43h-42zM149 0v43h43v-43h-43z" /> + <glyph glyph-name="settings_ethernet" unicode="settings_ethernet" +d="M379 395l116 -139l-116 -139l-33 27l93 112l-93 112zM235 235v42h42v-42h-42zM363 277v-42h-43v42h43zM149 235v42h43v-42h-43zM166 368l-93 -112l93 -112l-33 -27l-116 139l116 139z" /> + <glyph glyph-name="settings_input_antenna" unicode="settings_input_antenna" +d="M256 491c129 0 235 -106 235 -235h-43c0 106 -86 192 -192 192s-192 -86 -192 -192h-43c0 129 106 235 235 235zM277 207v-70l73 -73l-30 -30l-64 64l-64 -64l-30 30l73 73v70c-19 8 -32 27 -32 49c0 29 24 53 53 53s53 -24 53 -53c0 -22 -13 -41 -32 -49zM256 405 +c83 0 149 -66 149 -149h-42c0 59 -48 107 -107 107s-107 -48 -107 -107h-42c0 83 66 149 149 149z" /> + <glyph glyph-name="settings_input_component" unicode="settings_input_component" +d="M363 171v42h128v-42c0 -28 -18 -51 -43 -60v-90h-43v90c-25 9 -42 32 -42 60zM277 469v-85h43v-128h-128v128h43v85c0 12 9 22 21 22s21 -10 21 -22zM448 384h43v-128h-128v128h42v85c0 12 10 22 22 22s21 -10 21 -22v-85zM21 171v42h128v-42c0 -28 -17 -51 -42 -60v-90 +h-43v90c-25 9 -43 32 -43 60zM192 171v42h128v-42c0 -28 -18 -51 -43 -60v-90h-42v90c-25 9 -43 32 -43 60zM107 469v-85h42v-128h-128v128h43v85c0 12 9 22 21 22s22 -10 22 -22z" /> + <glyph glyph-name="settings_input_composite" unicode="settings_input_composite" +d="M363 171v42h128v-42c0 -28 -18 -51 -43 -60v-90h-43v90c-25 9 -42 32 -42 60zM277 469v-85h43v-128h-128v128h43v85c0 12 9 22 21 22s21 -10 21 -22zM448 384h43v-128h-128v128h42v85c0 12 10 22 22 22s21 -10 21 -22v-85zM21 171v42h128v-42c0 -28 -17 -51 -42 -60v-90 +h-43v90c-25 9 -43 32 -43 60zM192 171v42h128v-42c0 -28 -18 -51 -43 -60v-90h-42v90c-25 9 -43 32 -43 60zM107 469v-85h42v-128h-128v128h43v85c0 12 9 22 21 22s22 -10 22 -22z" /> + <glyph glyph-name="settings_input_hdmi" unicode="settings_input_hdmi" +d="M171 427v-64h42v42h22v-42h42v42h22v-42h42v64h-170zM384 363h21v-128l-64 -128v-64h-170v64l-64 128v128h21v64c0 23 20 42 43 42h170c23 0 43 -19 43 -42v-64z" /> + <glyph glyph-name="settings_input_svideo" unicode="settings_input_svideo" +d="M331 192c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM373 299c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM256 64c106 0 192 86 192 192s-86 192 -192 192s-192 -86 -192 -192s86 -192 192 -192zM256 491 +c129 0 235 -106 235 -235s-106 -235 -235 -235s-235 106 -235 235s106 235 235 235zM181 192c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM320 373c0 -18 -14 -32 -32 -32h-64c-18 0 -32 14 -32 32s14 32 32 32h64c18 0 32 -14 32 -32zM171 267 +c0 -18 -14 -32 -32 -32s-32 14 -32 32s14 32 32 32s32 -14 32 -32z" /> + <glyph glyph-name="settings_overscan" unicode="settings_overscan" +d="M448 106v300h-384v-300h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384zM299 171l-43 -54l-43 54h86zM128 299v-86l-53 43zM384 299l53 -43l-53 -43v86zM256 395l43 -54h-86z" /> + <glyph glyph-name="settings_phone" unicode="settings_phone" +d="M405 320h43v-43h-43v43zM427 181c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-200 0 -363 163 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 12 -76c2 -7 1 -16 -5 -22l-47 -47c31 -60 81 -110 141 -141l47 47c6 6 15 7 22 5c24 -8 49 -12 76 -12z +M363 320v-43h-43v43h43zM277 320v-43h-42v43h42z" /> + <glyph glyph-name="settings_power" unicode="settings_power" +d="M320 0v43h43v-43h-43zM353 417c44 -31 74 -82 74 -140c0 -94 -77 -170 -171 -170s-171 76 -171 170c0 58 30 109 74 140l30 -30c-37 -23 -61 -64 -61 -110c0 -71 57 -128 128 -128s128 57 128 128c0 46 -25 87 -62 109zM277 469v-213h-42v213h42zM235 0v43h42v-43h-42z +M149 0v43h43v-43h-43z" /> + <glyph glyph-name="settings_remote" unicode="settings_remote" +d="M256 512c65 0 124 -26 166 -69l-30 -30c-35 35 -83 56 -136 56s-101 -21 -136 -56l-30 30c42 42 101 69 166 69zM150 383c27 27 65 44 106 44s79 -17 106 -44l-30 -30c-19 19 -47 31 -76 31s-57 -12 -76 -31zM256 192c23 0 43 20 43 43s-20 42 -43 42s-43 -19 -43 -42 +s20 -43 43 -43zM320 320c12 0 21 -9 21 -21v-256c0 -12 -9 -22 -21 -22h-128c-12 0 -21 10 -21 22v256c0 12 9 21 21 21h128z" /> + <glyph glyph-name="settings_system_daydream" unicode="settings_system_daydream" +d="M448 106v300h-384v-300h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384zM192 171c-35 0 -64 29 -64 64c0 33 25 60 57 63h4c12 25 37 43 67 43c38 0 69 -28 74 -64h1c29 0 53 -24 53 -53 +s-24 -53 -53 -53h-139z" /> + <glyph glyph-name="settings_voice" unicode="settings_voice" +d="M405 299c0 -73 -58 -134 -128 -144v-70h-42v70c-70 10 -128 71 -128 144h36c0 -64 54 -109 113 -109s113 45 113 109h36zM320 0v43h43v-43h-43zM235 0v43h42v-43h-42zM256 235c-35 0 -64 29 -64 64v128c0 35 29 64 64 64s64 -29 64 -64v-128c0 -35 -29 -64 -64 -64z +M149 0v43h43v-43h-43z" /> + <glyph glyph-name="share" unicode="share" +d="M384 169c34 0 62 -28 62 -62s-28 -63 -62 -63s-62 29 -62 63c0 5 0 10 1 14l-151 88c-12 -11 -27 -17 -44 -17c-35 0 -64 29 -64 64s29 64 64 64c17 0 32 -6 44 -17l150 87c-1 5 -2 10 -2 15c0 35 29 64 64 64s64 -29 64 -64s-29 -64 -64 -64c-17 0 -32 7 -44 18 +l-150 -88c1 -5 2 -10 2 -15s-1 -10 -2 -15l152 -88c11 10 26 16 42 16z" /> + <glyph glyph-name="shop" unicode="shop" +d="M192 128l160 107l-160 85v-192zM213 427v-43h86v43h-86zM341 384h128v-277c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v277h128v43c0 24 18 42 42 42h86c24 0 42 -18 42 -42v-43z" /> + <glyph glyph-name="shop_two" unicode="shop_two" +d="M256 192l117 85l-117 64v-149zM256 448v-43h85v43h-85zM384 405h107v-234c0 -24 -19 -43 -43 -43h-299c-24 0 -42 19 -42 43v234h106v43c0 24 19 43 43 43h85c24 0 43 -19 43 -43v-43zM64 320v-235h341c0 -24 -18 -42 -42 -42h-299c-24 0 -43 18 -43 42v235h43z" /> + <glyph glyph-name="shopping_basket" unicode="shopping_basket" +d="M256 149c23 0 43 20 43 43s-20 43 -43 43s-43 -20 -43 -43s20 -43 43 -43zM192 320h128l-64 94zM367 320h102c12 0 22 -9 22 -21c-17.3126 -69.0207 -36.8524 -135.814 -55 -204c-5 -18 -21 -31 -41 -31h-278c-20 0 -36 13 -41 31l-54 198c-1 2 -1 4 -1 6 +c0 12 10 21 22 21h102l93 140c4 6 11 9 18 9s14 -3 18 -9z" /> + <glyph glyph-name="shopping_cart" unicode="shopping_cart" +d="M363 128c23 0 42 -20 42 -43s-19 -42 -42 -42s-43 19 -43 42s20 43 43 43zM21 469h70l20 -42h316c12 0 21 -10 21 -22c0 -4 -1 -7 -3 -10l-76 -138c-7 -13 -21 -22 -37 -22h-159l-19 -35l-1 -3c0 -3 2 -5 5 -5h247v-43h-256c-23 0 -42 20 -42 43c0 7 2 14 5 20l29 53 +l-77 162h-43v42zM149 128c23 0 43 -20 43 -43s-20 -42 -43 -42s-42 19 -42 42s19 43 42 43z" /> + <glyph glyph-name="short_text" unicode="short_text" +d="M85 235h214v-43h-214v43zM85 320h342v-43h-342v43z" /> + <glyph glyph-name="show_chart" unicode="show_chart" +d="M75 118l-32 32l160 160l85 -86l151 170l30 -30l-181 -204l-85 86z" /> + <glyph glyph-name="shuffle" unicode="shuffle" +d="M316 226l67 -67l44 44v-118h-118l44 44l-67 67zM309 427h118v-118l-44 44l-268 -268l-30 30l268 268zM226 316l-30 -30l-111 111l30 30z" /> + <glyph glyph-name="signal_cellular_4_bar" unicode="signal_cellular_4_bar" +d="M43 43l426 426v-426h-426z" /> + <glyph glyph-name="signal_cellular_connected_no_internet_4_bar" unicode="signal_cellular_connected_no_internet_4_bar" +d="M43 43l426 426v-128h-85v-298h-341zM427 43v42h42v-42h-42zM427 128v171h42v-171h-42z" /> + <glyph glyph-name="signal_cellular_no_sim" unicode="signal_cellular_no_sim" +d="M78 429l373 -372l-28 -28l-40 41c-6 -3 -13 -6 -20 -6h-214c-23 0 -42 20 -42 43v239l-56 56zM405 405v-249l-242 242l50 50h150c23 0 42 -20 42 -43z" /> + <glyph glyph-name="signal_cellular_null" unicode="signal_cellular_null" +d="M469 469v-426h-426zM427 366l-281 -281h281v281z" /> + <glyph glyph-name="signal_cellular_off" unicode="signal_cellular_off" +d="M102 416l367 -368l-27 -27l-42 43h-379l189 189l-135 136zM448 491v-367l-183 183z" /> + <glyph glyph-name="signal_wifi_4_bar" unicode="signal_wifi_4_bar" +d="M256 54l-248 309c10 7 105 85 248 85s238 -78 248 -85z" /> + <glyph glyph-name="signal_wifi_4_bar_lock" unicode="signal_wifi_4_bar_lock" +d="M331 203v-56l-75 -94l-247 310c9 6 104 85 247 85s238 -79 247 -85l-44 -56c-6 2 -13 2 -22 2c-60 0 -106 -46 -106 -106zM469 171v32c0 17 -15 32 -32 32s-32 -15 -32 -32v-32h64zM491 171c11 0 21 -11 21 -22v-85c0 -11 -10 -21 -21 -21h-107c-11 0 -21 10 -21 21v85 +c0 11 10 22 21 22v32c0 30 23 53 53 53s54 -23 54 -53v-32z" /> + <glyph glyph-name="signal_wifi_off" unicode="signal_wifi_off" +d="M70 481c122.302 -122.698 245.474 -244.526 367 -368l-27 -27l-71 71l-83 -103l-248 309c5 4 32 26 78 47l-43 44zM504 363l-116 -145l-221 220c27 6 57 10 89 10c143 0 238 -78 248 -85z" /> + <glyph glyph-name="sim_card" unicode="sim_card" +d="M363 192v85h-43v-85h43zM277 235v42h-42v-42h42zM277 107v85h-42v-85h42zM192 192v85h-43v-85h43zM363 107v42h-43v-42h43zM192 107v42h-43v-42h43zM426 427l1 -342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42v256l128 128h171c23 0 42 -19 42 -42z" /> + <glyph glyph-name="sim_card_alert" unicode="sim_card_alert" +d="M277 235v106h-42v-106h42zM277 149v43h-42v-43h42zM384 469c23 0 43 -19 43 -42v-342c0 -23 -20 -42 -43 -42h-256c-23 0 -43 19 -43 42l1 256l127 128h171z" /> + <glyph glyph-name="skip_next" unicode="skip_next" +d="M341 384h43v-256h-43v256zM128 128v256l181 -128z" /> + <glyph glyph-name="skip_previous" unicode="skip_previous" +d="M203 256l181 128v-256zM128 384h43v-256h-43v256z" /> + <glyph glyph-name="slideshow" unicode="slideshow" +d="M405 107v298h-298v-298h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM213 341l107 -85l-107 -85v170z" /> + <glyph glyph-name="slow_motion_video" unicode="slow_motion_video" +d="M469 256c0 -110 -84 -201 -191 -212v43c84 11 149 83 149 169s-65 158 -149 169v43c107 -11 191 -102 191 -212zM121 91l30 30c24 -18 53 -30 84 -34v-43c-43 4 -82 21 -114 47zM87 235c4 -31 16 -60 34 -83l-30 -31c-26 32 -43 71 -47 114h43zM121 361 +c-18 -24 -30 -53 -34 -84h-43c4 43 21 82 47 114zM235 425c-31 -4 -60 -16 -84 -34l-30 30c32 26 71 43 114 47v-43zM278 303l63 -47c-42.8195 -31.8471 -85.479 -63.8543 -128 -96z" /> + <glyph glyph-name="smartphone" unicode="smartphone" +d="M363 107v298h-214v-298h214zM363 490c23 0 42 -19 42 -42v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43z" /> + <glyph glyph-name="smoke_free" unicode="smoke_free" +d="M363 172l-63 63h63v-63zM309 326c-39 0 -71 33 -71 72s32 71 71 71v-32c-22 0 -39 -15 -39 -37s17 -43 39 -43h33c40 0 74 -29 74 -67v-34h-32v27c0 28 -20 43 -42 43h-33zM402 408c40 -19 67 -60 67 -108v-44h-32v44c0 48 -37 87 -85 87v32c22 0 39 18 39 40h32 +c0 -20 -8 -38 -21 -51zM384 235h32v-64h-32v64zM437 235h32v-64h-32v64zM43 384l26 27l363 -363l-27 -27l-149 150h-213v64h149z" /> + <glyph glyph-name="smoking_rooms" unicode="smoking_rooms" +d="M342 294c40 0 74 -28 74 -67v-35h-32v28c0 28 -20 43 -42 43h-33c-39 0 -71 33 -71 72s32 71 71 71v-32c-22 0 -39 -15 -39 -37s17 -43 39 -43h33zM402 347c40 -19 67 -60 67 -107v-48h-32v48c0 48 -37 86 -85 86v32c22 0 39 18 39 40s-17 39 -39 39v32 +c39 0 71 -32 71 -71c0 -20 -8 -38 -21 -51zM384 171h32v-64h-32v64zM437 171h32v-64h-32v64zM43 171h320v-64h-320v64z" /> + <glyph glyph-name="sms" unicode="sms" +d="M363 277v43h-43v-43h43zM277 277v43h-42v-43h42zM192 277v43h-43v-43h43zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="sms_failed" unicode="sms_failed" +d="M277 299v85h-42v-85h42zM277 213v43h-42v-43h42zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="snooze" unicode="snooze" +d="M192 277v43h128v-38l-77 -90h77v-43h-128v39l77 89h-77zM256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM256 427c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM469 390l-27 -33l-98 83l27 32z +M168 440l-98 -82l-27 32l98 82z" /> + <glyph glyph-name="sort" unicode="sort" +d="M64 235v42h256v-42h-256zM64 384h384v-43h-384v43zM64 128v43h128v-43h-128z" /> + <glyph glyph-name="sort_by_alpha" unicode="sort_by_alpha" +d="M336 168h130v-34h-182v27l126 183h-125v34h177v-27zM106 221h83l-42 111zM130 378h35l96 -244h-39l-20 52h-109l-20 -52h-39zM219 99h99l-50 -50zM319 413h-101l50 50z" /> + <glyph glyph-name="spa" unicode="spa" +d="M330 307c-27 -15 -52 -34 -74 -57c-22 23 -47 42 -74 57c5 59 29 116 75 162c45 -45 69 -102 73 -162zM43 299c95.1702 0 171.746 -54.2229 213 -117c41.2966 62.8426 117.856 117 213 117c0 -113 -71 -209 -171 -245c-14 -5 -27 -8 -42 -11c-15 2 -29 6 -42 11 +c-100 36 -171 132 -171 245z" /> + <glyph glyph-name="space_bar" unicode="space_bar" +d="M384 320h43v-128h-342v128h43v-85h256v85z" /> + <glyph glyph-name="speaker" unicode="speaker" +d="M256 256c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM256 85c59 0 107 48 107 107s-48 107 -107 107s-107 -48 -107 -107s48 -107 107 -107zM256 427c-24 0 -43 -20 -43 -43s19 -43 43 -43c23 0 43 20 43 43s-20 43 -43 43zM363 469 +c23 0 42 -19 42 -42v-342c0 -23 -19 -42 -42 -42h-214c-23 0 -42 19 -42 42v342c0 23 19 42 42 42h214z" /> + <glyph glyph-name="speaker_group" unicode="speaker_group" +d="M128 405v-341h213v-43h-213c-24 0 -43 20 -43 43v341h43zM245 245c0 29 25 54 54 54s53 -25 53 -54s-24 -53 -53 -53s-54 24 -54 53zM299 160c47 0 85 38 85 85s-38 86 -85 86s-86 -39 -86 -86s39 -85 86 -85zM299 448c-23 0 -43 -19 -43 -43s20 -42 43 -42s42 18 42 42 +s-19 43 -42 43zM388 491c21 0 39 -18 39 -39v-307c0 -21 -18 -38 -39 -38h-179c-21 0 -38 17 -38 38v307c0 21 17 39 38 39h179z" /> + <glyph glyph-name="speaker_notes" unicode="speaker_notes" +d="M384 341v43h-171v-43h171zM384 277v43h-171v-43h171zM320 213v43h-107v-43h107zM171 341v43h-43v-43h43zM171 277v43h-43v-43h43zM171 213v43h-43v-43h43zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="speaker_notes_off" unicode="speaker_notes_off" +d="M427 469c23 0 42 -19 42 -42v-256c0 -23 -18 -42 -41 -43l-149 149h105v43h-148l-21 21h169v43h-171v-41l-126 126h340zM128 277h43l-43 43v-43zM171 213v43h-43v-43h43zM27 475l442 -442l-27 -27l-122 122h-192l-85 -85v362l-43 43z" /> + <glyph glyph-name="speaker_phone" unicode="speaker_phone" +d="M320 85v171h-128v-171h128zM317 298c13 0 24 -11 24 -24v-207c0 -13 -11 -24 -24 -24h-122c-13 0 -24 11 -24 24v207c0 13 11 25 24 25zM256 491c64 0 123 -27 165 -69l-30 -30c-35 35 -82 56 -135 56s-100 -21 -135 -56l-30 30c42 42 101 69 165 69zM149 361 +c27 27 65 44 107 44s80 -17 107 -44l-31 -30c-19 19 -46 31 -76 31s-57 -12 -76 -31z" /> + <glyph glyph-name="spellcheck" unicode="spellcheck" +d="M461 265l30 -30l-203 -203l-108 109l30 30l78 -79zM137 277h88l-44 118zM266 171l-25 64h-120l-24 -64h-45l109 277h40l109 -277h-44z" /> + <glyph glyph-name="star" unicode="star" +d="M256 144l-132 -80l35 150l-116 101l153 13l60 141l60 -141l153 -13l-116 -101l35 -150z" /> + <glyph glyph-name="star_border" unicode="star_border" +d="M256 183l80 -48l-21 91l71 62l-94 8l-36 86l-36 -86l-94 -8l71 -62l-21 -91zM469 315l-116 -101l35 -150l-132 80l-132 -80l35 150l-116 101l153 13l60 141l60 -141z" /> + <glyph glyph-name="star_half" unicode="star_half" +d="M256 183l80 -48l-21 91l71 62l-94 8l-36 86v-199zM469 315l-116 -101l35 -150l-132 80l-132 -80l35 150l-116 101l153 13l60 141l60 -141z" /> + <glyph glyph-name="stars" unicode="stars" +d="M346 128l-24 103l80 69l-105 9l-41 96l-41 -97l-105 -8l80 -69l-24 -103l90 54zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="stay_current_landscape" unicode="stay_current_landscape" +d="M405 363h-298v-214h298v214zM22 363c0 23 19 42 42 42h384c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-384c-23 0 -43 19 -43 42z" /> + <glyph glyph-name="stay_current_portrait" unicode="stay_current_portrait" +d="M363 107v298h-214v-298h214zM363 490c23 0 42 -19 42 -42v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43z" /> + <glyph glyph-name="stay_primary_landscape" unicode="stay_primary_landscape" +d="M405 363h-298v-214h298v214zM22 363c0 23 19 42 42 42h384c23 0 43 -19 43 -42v-214c0 -23 -20 -42 -43 -42h-384c-23 0 -43 19 -43 42z" /> + <glyph glyph-name="stay_primary_portrait" unicode="stay_primary_portrait" +d="M363 107v298h-214v-298h214zM363 490c23 0 42 -19 42 -42v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43z" /> + <glyph glyph-name="stop" unicode="stop" +d="M128 384h256v-256h-256v256z" /> + <glyph glyph-name="stop_screen_share" unicode="stop_screen_share" +d="M149 192c20 28 45 44 78 52l-34 34c-25 -24 -37 -54 -44 -86zM51 475l421 -421l-27 -27l-58 58h-387v43h85c-24 0 -42 19 -42 42v214c0 13 5 23 14 31l-33 33zM469 170c0 -16 -9 -30 -22 -37l-118 118l34 32l-86 79v-45c-4 -1 -7 -1 -11 -2l-112 111h273 +c23 0 42 -18 42 -42v-214zM453 128h59v-43h-17z" /> + <glyph glyph-name="storage" unicode="storage" +d="M85 277v-42h43v42h-43zM43 213v86h426v-86h-426zM128 363v42h-43v-42h43zM43 427h426v-86h-426v86zM85 149v-42h43v42h-43zM43 85v86h426v-86h-426z" /> + <glyph glyph-name="store" unicode="store" +d="M256 128v85h-128v-85h128zM448 213h-21v-128h-43v128h-85v-128h-214v128h-21v43l21 107h342l21 -107v-43zM427 427v-43h-342v43h342z" /> + <glyph glyph-name="store_mall_directory" unicode="store_mall_directory" +d="M256 128v85h-128v-85h128zM448 213h-21v-128h-43v128h-85v-128h-214v128h-21v43l21 107h342l21 -107v-43zM427 427v-43h-342v43h342z" /> + <glyph glyph-name="straighten" unicode="straighten" +d="M448 171v170h-43v-85h-42v85h-43v-85h-43v85h-42v-85h-43v85h-43v-85h-42v85h-43v-170h384zM448 384c23 0 43 -20 43 -43v-170c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v170c0 23 20 43 43 43h384z" /> + <glyph glyph-name="streetview" unicode="streetview" +d="M245 384c0 -38 16 -73 41 -98l-209 -209c-8 8 -13 18 -13 30v298c0 23 20 43 43 43h154c-10 -19 -16 -41 -16 -64zM277 384c0 59 48 107 107 107s107 -48 107 -107s-48 -107 -107 -107s-107 48 -107 107zM268 206c32 24 73 39 116 39c22 0 44 -4 64 -11v-127 +c0 -23 -20 -43 -43 -43h-149v117c0 10 5 19 12 25z" /> + <glyph glyph-name="strikethrough_s" unicode="strikethrough_s" +d="M200 232c0 -38.1216 24.1545 -54 62 -54c26.1564 0 49 10.6702 49 36c0 23.9161 -12.6848 29.3424 -30 38c-3 1 -8 3 -12 4h-205v43h384v-43h-83c1 -2 3 -5 4 -7c4 -10 7 -22 7 -35c0 -46.2545 -30.1882 -69.4824 -67 -80c-14 -4 -29 -6 -46 -6c-10 0 -21 1 -31 3 +c-21.9156 4.38312 -40.6035 10.4527 -56 22c-22.8363 17.1272 -39 39.9131 -39 79h63zM311 352c0 30.7771 -19.602 45 -51 45c-22.5729 0 -39.6285 -7.25692 -47 -22c-2 -4 -3 -9 -3 -14c0 -10 6 -19 16 -26c8 -5 16 -10 30 -15h-98c-1 2 -3 3 -4 5c-6 10 -8 22 -8 36 +c0 28.7417 14.9303 49.3443 32 63c20.5411 14.3788 47.8126 24 83 24c35.0657 0 64.1326 -10.0193 83 -27c17.5603 -15.8042 31 -37.9468 31 -69h-64z" /> + <glyph glyph-name="style" unicode="style" +d="M125 91v135l74 -178h-31c-23 0 -43 20 -43 43zM168 325c12 0 21 10 21 22s-9 21 -21 21s-21 -9 -21 -21s9 -22 21 -22zM470 172c9 -22 -1 -47 -23 -56l-157 -65c-5 -2 -11 -3 -17 -3c-17 0 -32 10 -39 26l-106 256c-2 6 -3 11 -3 17c0 16 10 31 26 38l158 65 +c6 2 11 3 17 3c16 0 31 -10 38 -26zM54 93c-22 9 -32 33 -23 55l52 125v-192z" /> + <glyph glyph-name="subdirectory_arrow_left" unicode="subdirectory_arrow_left" +d="M235 320l30 -30l-77 -77h196v214h43v-256h-239l77 -77l-30 -30l-128 128z" /> + <glyph glyph-name="subdirectory_arrow_right" unicode="subdirectory_arrow_right" +d="M405 192l-128 -128l-30 30l77 77h-239v256h43v-214h196l-77 77l30 30z" /> + <glyph glyph-name="subject" unicode="subject" +d="M85 405h342v-42h-342v42zM85 192v43h342v-43h-342zM427 320v-43h-342v43h342zM299 149v-42h-214v42h214z" /> + <glyph glyph-name="subscriptions" unicode="subscriptions" +d="M341 171l-128 69v-139zM469 256v-171c0 -23 -19 -42 -42 -42h-342c-23 0 -42 19 -42 42v171c0 23 19 43 42 43h342c23 0 42 -20 42 -43zM384 469v-42h-256v42h256zM427 341h-342v43h342v-43z" /> + <glyph glyph-name="subtitles" unicode="subtitles" +d="M427 213v43h-214v-43h214zM427 128v43h-86v-43h86zM299 128v43h-214v-43h214zM85 256v-43h86v43h-86zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="subway" unicode="subway" +d="M384 173v147c0 56 -57 64 -128 64c-64 0 -128 -8 -128 -64v-147c0 -31 25 -56 56 -56l-24 -24v-8h36l32 32h60l32 -32h32v8l-24 24c31 0 56 25 56 56zM380 452c57 -22 89 -69 89 -129v-280h-426v280c0 60 32 107 89 129c38 15 84 17 124 17s86 -2 124 -17zM150 320h213 +v-107h-213v107zM160 171c0 12 9 21 21 21s22 -9 22 -21s-10 -22 -22 -22s-21 10 -21 22zM309 171c0 12 10 21 22 21s21 -9 21 -21s-9 -22 -21 -22s-22 10 -22 22z" /> + <glyph glyph-name="supervisor_account" unicode="supervisor_account" +d="M192 235c14 0 32 -2 51 -6c-44 -24 -51 -56 -51 -74v-48h-149v53c0 50 99 75 149 75zM352 213c39 0 117 -19 117 -58v-48h-234v48c0 39 78 58 117 58zM192 277c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64zM352 256c-29 0 -53 24 -53 53s24 54 53 54 +s53 -25 53 -54s-24 -53 -53 -53z" /> + <glyph glyph-name="surround_sound" unicode="surround_sound" +d="M256 299c23 0 43 -20 43 -43s-20 -43 -43 -43s-43 20 -43 43s20 43 43 43zM377 135c33 33 50 77 50 121s-17 88 -50 121l-31 -31c25 -25 38 -57 38 -90s-12 -66 -37 -91zM256 171c47 0 85 38 85 85s-38 85 -85 85s-85 -38 -85 -85s38 -85 85 -85zM166 166 +c-25 25 -38 57 -38 90s12 66 37 91l-30 30c-33 -33 -50 -77 -50 -121s17 -88 50 -121zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="swap_calls" unicode="swap_calls" +d="M384 427l85 -86h-64v-149c0 -47 -38 -85 -85 -85s-85 38 -85 85v149c0 23 -20 43 -43 43s-43 -20 -43 -43v-149h64l-85 -85l-85 85h64v149c0 47 38 86 85 86s85 -39 85 -86v-149c0 -23 20 -43 43 -43s43 20 43 43v149h-64z" /> + <glyph glyph-name="swap_horiz" unicode="swap_horiz" +d="M448 320l-85 -85v64h-150v42h150v64zM149 277v-64h150v-42h-150v-64l-85 85z" /> + <glyph glyph-name="swap_vert" unicode="swap_vert" +d="M192 448l85 -85h-64v-150h-42v150h-64zM341 149h64l-85 -85l-85 85h64v150h42v-150z" /> + <glyph glyph-name="swap_vertical_circle" unicode="swap_vertical_circle" +d="M373 192h-53v85h-43v-85h-53l75 -75zM139 320h53v-85h43v85h53l-75 75zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="switch_camera" unicode="switch_camera" +d="M320 181l75 75l-75 75v-54h-128v54l-75 -75l75 -75v54h128v-54zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h68l39 42h128l39 -42h68z" /> + <glyph glyph-name="switch_video" unicode="switch_video" +d="M277 181l75 75l-75 75v-54h-128v54l-74 -75l74 -75v54h128v-54zM384 309l85 86v-278l-85 86v-75c0 -12 -9 -21 -21 -21h-299c-12 0 -21 9 -21 21v256c0 12 9 21 21 21h299c12 0 21 -9 21 -21v-75z" /> + <glyph glyph-name="sync" unicode="sync" +d="M256 128v64l85 -85l-85 -86v64c-94 0 -171 77 -171 171c0 33 10 65 27 91l31 -31c-10 -18 -15 -38 -15 -60c0 -71 57 -128 128 -128zM256 427c94 0 171 -77 171 -171c0 -33 -10 -65 -27 -91l-31 31c10 18 15 38 15 60c0 71 -57 128 -128 128v-64l-85 85l85 86v-64z" /> + <glyph glyph-name="sync_disabled" unicode="sync_disabled" +d="M427 427l-51 -51c31 -31 51 -73 51 -120c0 -33 -10 -64 -26 -90l-32 31c9 18 15 38 15 59c0 35 -15 67 -38 90l-47 -47v128h128zM61 397l27 27l335 -336l-27 -27l-50 50c-15 -9 -31 -16 -48 -20v44c6 2 12 5 17 8l-172 172c-9 -18 -15 -38 -15 -59c0 -35 15 -67 38 -90 +l47 47v-128h-128l51 51c-31 31 -51 73 -51 120c0 33 10 64 26 90zM213 377c-6 -2 -11 -5 -16 -8l-31 32c15 9 30 16 47 20v-44z" /> + <glyph glyph-name="sync_problem" unicode="sync_problem" +d="M235 235v128h42v-128h-42zM448 427l-50 -51c31 -31 50 -73 50 -120c0 -80 -54 -146 -128 -165v44c50 17 85 65 85 121c0 35 -14 67 -37 90l-48 -47v128h128zM235 149v43h42v-43h-42zM64 256c0 80 54 146 128 165v-44c-50 -17 -85 -65 -85 -121c0 -35 14 -67 37 -90l48 47 +v-128h-128l50 51c-31 31 -50 73 -50 120z" /> + <glyph glyph-name="system_update" unicode="system_update" +d="M341 235l-85 -86l-85 86h64v106h42v-106h64zM363 107v298h-214v-298h214zM363 490c23 0 42 -19 42 -42v-384c0 -23 -19 -43 -42 -43h-214c-23 0 -42 20 -42 43v384c0 23 19 43 42 43z" /> + <glyph glyph-name="system_update_alt" unicode="system_update_alt" +d="M448 437c23 0 43 -19 43 -42v-299c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v299c0 23 20 42 43 42h128v-42h-128v-299h384v299h-128v42h128zM256 160l-85 85h64v192h42v-192h64z" /> + <glyph glyph-name="tab" unicode="tab" +d="M448 107v213h-171v85h-213v-298h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="tab_unselected" unicode="tab_unselected" +d="M363 64v43h42v-43h-42zM277 64v43h43v-43h-43zM448 235v42h43v-42h-43zM448 64v43h43c0 -23 -20 -43 -43 -43zM107 405v43h42v-43h-42zM107 64v43h42v-43h-42zM192 405v43h43v-43h-43zM448 149v43h43v-43h-43zM448 448c23 0 43 -20 43 -43v-85h-214v128h171zM64 64 +c-23 0 -43 20 -43 43h43v-43zM21 149v43h43v-43h-43zM192 64v43h43v-43h-43zM21 405c0 23 20 43 43 43v-43h-43zM21 235v42h43v-42h-43zM21 320v43h43v-43h-43z" /> + <glyph glyph-name="tablet" unicode="tablet" +d="M405 128v256h-298v-256h298zM448 427c23 0 43 -20 43 -43l-1 -256c0 -23 -19 -43 -42 -43h-384c-23 0 -43 20 -43 43v256c0 23 20 43 43 43h384z" /> + <glyph glyph-name="tablet_android" unicode="tablet_android" +d="M411 107v341h-310v-341h310zM299 43v21h-86v-21h86zM384 512c35 0 64 -29 64 -64v-384c0 -35 -29 -64 -64 -64h-256c-35 0 -64 29 -64 64v384c0 35 29 64 64 64h256z" /> + <glyph glyph-name="tablet_mac" unicode="tablet_mac" +d="M405 107v341h-320v-341h320zM245 21c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM395 512c29 0 53 -24 53 -53v-406c0 -29 -24 -53 -53 -53h-299c-29 0 -53 24 -53 53v406c0 29 24 53 53 53h299z" /> + <glyph glyph-name="tag_faces" unicode="tag_faces" +d="M256 139c-50 0 -92 30 -109 74h218c-17 -44 -59 -74 -109 -74zM181 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM331 277c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM256 85c94 0 171 77 171 171s-77 171 -171 171 +s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="tap_and_play" unicode="tap_and_play" +d="M363 490c23 0 42 -19 42 -42v-363c0 -23 -19 -42 -42 -42h-45c-2 30 -9 58 -20 85h65v277h-214v-128c-14 6 -27 11 -42 14v157c0 23 19 43 42 43zM43 256c130 0 234 -105 234 -235h-42c0 106 -86 192 -192 192v43zM43 85c35 0 64 -29 64 -64h-64v64zM43 171 +c83 0 149 -67 149 -150h-43c0 59 -47 107 -106 107v43z" /> + <glyph glyph-name="terrain" unicode="terrain" +d="M299 384l192 -256h-470l128 171l96 -128l34 25l-60 81z" /> + <glyph glyph-name="text_fields" unicode="text_fields" +d="M459 320v-64h-64v-149h-64v149h-64v64h192zM53 427h278v-64h-107v-256h-64v256h-107v64z" /> + <glyph glyph-name="text_format" unicode="text_format" +d="M256 384l-40 -107h80zM203 239l-20 -47h-44l101 235h32l101 -235h-44l-20 47h-106zM107 149h298v-42h-298v42z" /> + <glyph glyph-name="textsms" unicode="textsms" +d="M363 277v43h-43v-43h43zM277 277v43h-42v-43h42zM192 277v43h-43v-43h43zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="texture" unicode="texture" +d="M198 64l250 250v-61l-189 -189h-61zM448 107c0 -22.9739 -20.0355 -43 -43 -43h-42l85 85v-42zM107 448h42l-85 -85v42c0 23 20 43 43 43zM253 448h61l-250 -250v61zM416 446c15 -4 27 -15 31 -30l-351 -350c-14.6749 4.19283 -25.8059 15.3206 -30 30z" /> + <glyph glyph-name="theaters" unicode="theaters" +d="M384 320v43h-43v-43h43zM384 235v42h-43v-42h43zM384 149v43h-43v-43h43zM171 320v43h-43v-43h43zM171 235v42h-43v-42h43zM171 149v43h-43v-43h43zM384 448h43v-384h-43v43h-43v-43h-170v43h-43v-43h-43v384h43v-43h43v43h170v-43h43v43z" /> + <glyph glyph-name="thumb_down" unicode="thumb_down" +d="M405 448h86v-256h-86v256zM320 448c23 0 43 -20 43 -43v-213c0 -12 -5 -22 -13 -30l-140 -141l-23 23c-6 6 -9 13 -9 22v7l21 98h-135c-23 0 -43 19 -43 42l1 2h-1v41c0 6 1 11 3 16l65 150c6 15 21 26 39 26h192z" /> + <glyph glyph-name="thumb_up" unicode="thumb_up" +d="M491 299l-1 -2h1v-41c0 -6 -1 -11 -3 -16l-65 -150c-6 -15 -21 -26 -39 -26h-192c-23 0 -43 20 -43 43v213c0 12 5 22 13 30l140 141l23 -23c6 -6 9 -13 9 -22v-7l-21 -98h135c23 0 43 -19 43 -42zM21 64v256h86v-256h-86z" /> + <glyph glyph-name="thumbs_up_down" unicode="thumbs_up_down" +d="M480 299c18 0 32 -14 32 -32v-139c0 -9 -3 -17 -9 -23l-106 -105l-17 17c-4 4 -7 10 -7 17c4.95149 24.3818 10.0081 48.6586 15 73h-111c-12 0 -21 9 -21 21v27c0 4 1 7 2 11l49 113c5 11 16 20 29 20h144zM256 384v-27c0 -4 -1 -7 -2 -11l-49 -113 +c-5 -11 -16 -20 -29 -20h-144c-18 0 -32 14 -32 32v139c0 9 3 17 9 23l106 105l17 -17c4 -4 7 -10 7 -17c-4.95149 -24.3818 -10.0081 -48.6586 -15 -73h111c12 0 21 -9 21 -21z" /> + <glyph glyph-name="time_to_leave" unicode="time_to_leave" +d="M107 299h298l-32 96h-234zM373 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM404 405l44 -128v-170c0 -12 -9 -22 -21 -22h-22c-12 0 -21 10 -21 22v21h-256v-21 +c0 -12 -9 -22 -21 -22h-22c-12 0 -21 10 -21 22v170l44 128c4 13 17 22 31 22h234c14 0 27 -9 31 -22z" /> + <glyph glyph-name="timelapse" unicode="timelapse" +d="M256 85c94 0 171 77 171 171s-77 171 -171 171s-171 -77 -171 -171s77 -171 171 -171zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213zM346 346c50 -50 51 -130 1 -180s-131 -50 -181 0l90 90v128c33 0 65 -13 90 -38z" /> + <glyph glyph-name="timeline" unicode="timeline" +d="M491 341c0 -23 -20 -42 -43 -42c-4 0 -8 0 -11 1l-76 -76c1 -3 2 -7 2 -11c0 -23 -20 -42 -43 -42s-43 19 -43 42c0 4 1 8 2 11l-55 55c-3 -1 -7 -2 -11 -2s-8 1 -11 2l-97 -97c1 -3 2 -7 2 -11c0 -23 -20 -43 -43 -43s-43 20 -43 43s20 42 43 42c4 0 8 0 11 -1l97 97 +c-1 3 -1 7 -1 11c0 23 19 43 42 43s43 -20 43 -43c0 -4 0 -8 -1 -11l54 -54c3 1 7 1 11 1s8 0 11 -1l76 75c-1 3 -2 7 -2 11c0 23 20 43 43 43s43 -20 43 -43z" /> + <glyph glyph-name="timer" unicode="timer" +d="M256 85c83 0 149 67 149 150s-66 149 -149 149s-149 -66 -149 -149s66 -150 149 -150zM406 354c26 -33 42 -74 42 -119c0 -106 -86 -192 -192 -192s-192 86 -192 192s86 192 192 192c45 0 87 -17 120 -43l30 31c11 -9 21 -19 30 -30zM235 213v128h42v-128h-42zM320 491 +v-43h-128v43h128z" /> + <glyph glyph-name="timer_10" unicode="timer_10" +d="M275 230v54c0 23.1679 -2.28229 40.1372 -10 53c-5.32529 10.6506 -15.2041 15 -30 15c-6 0 -13 -1 -18 -3c-19.376 -11.6256 -23 -33.9937 -23 -66v-53c0 -13 0 -24 2 -33s6 -15 9 -21c5.59145 -11.1829 14.1701 -16 30 -16c15.4236 0 24.6161 5.23229 30 16 +c3 6 6 12 8 21s2 20 2 33zM152 277c0 64.1175 20.6864 109 83 109c25.9331 0 47.8484 -8.37646 60 -24c15.2136 -19.5604 22 -48.5586 22 -85v-41c0 -63.9076 -19.6435 -110 -82 -110c-62.0914 0 -83 46.0788 -83 110v41zM436 289c-16.3185 0 -30 -6.67853 -30 -23 +c0 -14.5467 7.81248 -15.525 19 -20c5 -2 12 -4 19 -5c11 -2 19 -5 28 -8s16 -8 22 -12s10 -10 13 -16s5 -12 5 -21c0 -30.9206 -20.0931 -44.031 -44 -52c-9 -3 -19 -4 -30 -4c-35.9519 0 -63.4589 14.4041 -74 39c-3 7 -5 14 -5 22h41c0 -21.2888 17.0766 -30 38 -30 +c18.6968 0 33 5.89308 33 23c0 13.5739 -8.51234 16.8049 -19 21c-12.7341 5.09362 -34.9088 9.09079 -48 14c-8 3 -14 7 -20 11c-11.0546 7.36974 -19 18.5758 -19 36c0 27.5628 20.3776 44.7925 42 52c9 3 18 4 29 4c40.9316 0 75 -19.1355 75 -59h-42 +c0 12.2774 -7.84356 22.4609 -18 25c-4 1 -10 3 -15 3zM0 347l101 37h6v-256h-43v205l-64 -22v36z" /> + <glyph glyph-name="timer_3" unicode="timer_3" +d="M374 289c-15.9409 0 -31 -7.57315 -31 -23c0 -13.6828 9.30955 -15.7238 20 -20c5 -2 11 -4 18 -5c11 -2 20 -5 29 -8s16 -8 22 -12s10 -10 13 -16s5 -12 5 -21c0 -30.9206 -20.0931 -44.031 -44 -52c-9 -3 -20 -4 -31 -4c-35.3954 0 -62.613 14.7638 -73 39 +c-3 7 -5 14 -5 22h40c0 -20.4241 18.5387 -30 39 -30c18.6968 0 33 5.89308 33 23c0 13.5739 -8.51234 16.8049 -19 21c-5 2 -13 4 -21 6c-18.808 3.76159 -34.9505 10.3003 -48 19c-10.5283 7.01889 -18 19.4522 -18 36c0 27.5628 20.3776 44.7925 42 52c9 3 18 4 29 4 +c40.9316 0 75 -19.1355 75 -59h-42c0 13.019 -8.2055 22.3014 -19 25c-4 1 -9 3 -14 3zM215 259c24.7243 -9.2716 42 -25.484 42 -58c0 -25.5996 -8.85495 -43.6412 -24 -55c-14.0356 -12.0305 -34.4533 -20 -60 -20c-46.8771 0 -84 25.2474 -84 72h43 +c0 -11.5043 4.1483 -22.8612 11 -28c7.35188 -5.51391 17.5339 -10 30 -10c27.0755 0 42 14.0756 42 41c0 28.626 -17.0664 41 -46 41h-26v33h25c20.5078 0 35.1083 8.27068 41 23c2 5 2 10 2 16c0 24.8875 -12.4571 38 -38 38c-18.723 0 -29.7305 -7.46097 -36 -20 +c-2 -4 -3 -9 -3 -15h-42c0 34.3341 22.95 53.98 48 64c10 3 21 5 33 5c48.7123 0 80 -23.4793 80 -72c0 -28.4847 -18.378 -45.189 -38 -55z" /> + <glyph glyph-name="timer_off" unicode="timer_off" +d="M256 85c27 0 53 8 75 21l-204 204c-13 -22 -20 -48 -20 -75c0 -83 66 -150 149 -150zM64 427l379 -379l-27 -27l-54 54c-31 -20 -67 -32 -106 -32c-106 0 -192 86 -192 192c0 39 12 76 32 106l-59 59zM235 311v30h42v-73zM320 491v-43h-128v43h128zM406 415l30 -30 +l-30 -31c26 -33 42 -74 42 -119c0 -39 -12 -76 -32 -106l-31 31c13 22 20 48 20 75c0 83 -66 149 -149 149c-27 0 -52 -7 -74 -20l-32 31c30 20 67 32 106 32c45 0 87 -16 120 -42z" /> + <glyph glyph-name="title" unicode="title" +d="M107 427h298v-64h-117v-256h-64v256h-117v64z" /> + <glyph glyph-name="toc" unicode="toc" +d="M405 235v42h43v-42h-43zM405 363h43v-43h-43v43zM405 149v43h43v-43h-43zM64 149v43h299v-43h-299zM64 235v42h299v-42h-299zM64 320v43h299v-43h-299z" /> + <glyph glyph-name="today" unicode="today" +d="M149 299h107v-107h-107v107zM405 107v234h-298v-234h298zM405 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v298c0 23 19 43 43 43h21v43h43v-43h170v43h43v-43h21z" /> + <glyph glyph-name="toll" unicode="toll" +d="M64 256c0 -56 35 -104 85 -121v-44c-74 19 -128 85 -128 165s54 146 128 165v-44c-50 -17 -85 -65 -85 -121zM320 128c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128s57 -128 128 -128zM320 427c94 0 171 -77 171 -171s-77 -171 -171 -171s-171 77 -171 171 +s77 171 171 171z" /> + <glyph glyph-name="tonality" unicode="tonality" +d="M421 213c2 7 3 15 4 22h-148v-22h144zM389 149c5 7 11 15 15 22h-127v-22h112zM277 87c22 3 43 10 62 20h-62v-20zM277 299v-22h148c-1 7 -2 15 -4 22h-144zM277 363v-22h127c-4 7 -10 15 -15 22h-112zM277 425v-20h62c-19 10 -40 17 -62 20zM235 87v338 +c-84 -10 -150 -82 -150 -169s66 -159 150 -169zM256 469c118 0 213 -95 213 -213s-95 -213 -213 -213s-213 95 -213 213s95 213 213 213z" /> + <glyph glyph-name="touch_app" unicode="touch_app" +d="M402 173c11 -5 19 -16 19 -29v-4l-16 -113c-2 -16 -15 -27 -31 -27h-145c-9 0 -16 3 -22 9l-106 106l17 17c4 4 10 7 17 7c2 0 3 -1 5 -1l73 -15v229c0 18 14 32 32 32s32 -14 32 -32v-128h17c4 0 7 -1 11 -2zM192 272c-26 17 -43 47 -43 80c0 53 43 96 96 96 +s96 -43 96 -96c0 -33 -16 -63 -42 -80v80c0 29 -25 53 -54 53s-53 -24 -53 -53v-80z" /> + <glyph glyph-name="toys" unicode="toys" +d="M256 256c0 -64 -53 -117 -117 -117s-118 53 -118 117h235zM256 256c-64 0 -117 53 -117 117s53 118 117 118v-235zM256 256c64 0 117 -53 117 -117s-53 -118 -117 -118v235zM256 256c0 64 53 117 117 117s118 -53 118 -117h-235z" /> + <glyph glyph-name="track_changes" unicode="track_changes" +d="M407 407c39 -39 62 -92 62 -151c0 -118 -95 -213 -213 -213s-213 95 -213 213s95 213 213 213h21v-176c13 -7 22 -21 22 -37c0 -23 -20 -43 -43 -43s-43 20 -43 43c0 16 9 30 22 37v45c-37 -10 -64 -42 -64 -82c0 -47 38 -85 85 -85s85 38 85 85c0 23 -10 44 -25 60 +l30 30c23 -23 38 -55 38 -90c0 -71 -57 -128 -128 -128s-128 57 -128 128c0 63 46 116 107 126v43c-84 -10 -150 -82 -150 -169c0 -94 77 -171 171 -171s171 77 171 171c0 47 -19 90 -50 121z" /> + <glyph glyph-name="traffic" unicode="traffic" +d="M256 320c24 0 43 20 43 43c0 24 -20 42 -43 42c-24 0 -43 -18 -43 -42c0 -23 19 -43 43 -43zM256 213c24 0 43 20 43 43s-20 43 -43 43c-24 0 -43 -20 -43 -43s19 -43 43 -43zM256 107c24 0 43 19 43 42s-20 43 -43 43c-24 0 -43 -20 -43 -43s19 -42 43 -42zM427 299 +c0 -40 -27 -73 -64 -83v-24h64c0 -40 -27 -72 -64 -82v-25c0 -12 -10 -21 -22 -21h-170c-12 0 -22 9 -22 21v25c-37 10 -64 42 -64 82h64v24c-37 10 -64 43 -64 83h64v24c-37 10 -64 42 -64 82h64v22c0 12 10 21 22 21h170c12 0 22 -9 22 -21v-22h64c0 -40 -27 -72 -64 -82 +v-24h64z" /> + <glyph glyph-name="train" unicode="train" +d="M352 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM277 299h107v85h-107v-85zM235 299v85h-107v-85h107zM160 149c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM256 469c94 0 171 -10 171 -85v-203c0 -41 -34 -74 -75 -74 +l32 -32v-11h-43l-42 43h-81l-42 -43h-48v11l32 32c-41 0 -75 33 -75 74v203c0 75 86 85 171 85z" /> + <glyph glyph-name="tram" unicode="tram" +d="M363 213v107h-214v-107h214zM256 117c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM405 151c0 -36 -19 -66 -55 -66h2l32 -32v-10h-43l-42 42h-81l-42 -42h-48v10l34 34c-30 7 -55 33 -55 64v180c0 59 60 72 127 74l17 32h-102v32h214v-32h-70 +l-16 -32c73 -2 128 -14 128 -74v-180z" /> + <glyph glyph-name="transfer_within_a_station" unicode="transfer_within_a_station" +d="M123 322l-59 -301h45l37 171l46 -43v-128h43v161l-44 44l13 64c28 -34 69 -55 116 -55v42c-39 0 -74 22 -93 53l-20 34c-7 13 -21 20 -36 20c-5 0 -11 -1 -16 -3l-112 -46v-100h42v71l38 16zM203 395c-23 0 -43 19 -43 42s20 43 43 43s42 -20 42 -43s-19 -42 -42 -42z +M416 91v37l53 -53l-53 -54v38h-117v32h117zM352 181h117v-32h-117v-37l-53 53l53 54v-38z" /> + <glyph glyph-name="transform" unicode="transform" +d="M213 341v43h128c23 0 43 -20 43 -43v-128h-43v128h-128zM469 128h-85v-43h43l-64 -64l-64 64h42v43h-170c-23 0 -43 20 -43 43v170h-85v43h85v43h-43l64 64l64 -64h-42v-256h298v-43z" /> + <glyph glyph-name="translate" unicode="translate" +d="M339 149h69l-35 93zM395 299l96 -256h-43l-24 64h-101l-24 -64h-43l96 256h43zM275 191l-17 -44l-66 66l-107 -106l-30 30l109 107c-27 30 -48 62 -64 97h43c13 -25 29 -49 49 -71c31 34 54 73 68 114h-239v43h150v42h42v-42h150v-43h-63c-16 -50 -42 -98 -79 -139l-1 -1 +z" /> + <glyph glyph-name="trending_down" unicode="trending_down" +d="M341 128l49 49l-104 104l-85 -85l-158 158l30 30l128 -128l85 85l134 -134l49 49v-128h-128z" /> + <glyph glyph-name="trending_flat" unicode="trending_flat" +d="M469 256l-85 -85v64h-320v42h320v64z" /> + <glyph glyph-name="trending_up" unicode="trending_up" +d="M341 384h128v-128l-49 49l-134 -134l-85 85l-128 -128l-30 30l158 158l85 -85l104 104z" /> + <glyph glyph-name="tune" unicode="tune" +d="M320 320v128h43v-43h85v-42h-85v-43h-43zM448 235h-213v42h213v-42zM149 320h43v-128h-43v43h-85v42h85v43zM277 64h-42v128h42v-43h171v-42h-171v-43zM64 405h213v-42h-213v42zM64 149h128v-42h-128v42z" /> + <glyph glyph-name="turned_in" unicode="turned_in" +d="M363 448c23 0 42 -20 42 -43v-341l-149 64l-149 -64v341c0 23 19 43 42 43h214z" /> + <glyph glyph-name="turned_in_not" unicode="turned_in_not" +d="M363 128v277h-214v-277l107 47zM363 448c23 0 42 -20 42 -43v-341l-149 64l-149 -64v341c0 23 19 43 42 43h214z" /> + <glyph glyph-name="tv" unicode="tv" +d="M448 149v256h-384v-256h384zM448 448c23 0 43 -20 43 -43l-1 -256c0 -23 -19 -42 -42 -42h-107v-43h-170v43h-107c-23 0 -43 19 -43 42v256c0 23 20 43 43 43h384z" /> + <glyph glyph-name="unarchive" unicode="unarchive" +d="M109 405h294l-20 22h-256zM256 309l-117 -117h74v-43h86v43h74zM438 401c6 -7 10 -18 10 -28v-266c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v266c0 10 4 21 10 28l29 35c6 7 15 12 25 12h256c10 0 19 -5 25 -12z" /> + <glyph glyph-name="undo" unicode="undo" +d="M267 341c99 0 182 -65 212 -154l-50 -16c-22 68 -86 117 -162 117c-42 0 -80 -15 -110 -40l78 -77h-192v192l76 -77c39 34 91 55 148 55z" /> + <glyph glyph-name="unfold_less" unicode="unfold_less" +d="M354 397l-98 -98l-98 98l30 30l68 -68l68 68zM158 115l98 98l98 -98l-30 -30l-68 68l-68 -68z" /> + <glyph glyph-name="unfold_more" unicode="unfold_more" +d="M256 124l68 68l30 -30l-98 -98l-98 98l30 30zM256 388l-68 -68l-30 30l98 98l98 -98l-30 -30z" /> + <glyph glyph-name="update" unicode="update" +d="M267 341v-90l74 -45l-15 -26l-91 55v106h32zM448 296h-145l59 60c-58 58 -153 60 -211 2s-58 -150 0 -208s153 -58 211 0c29 29 43 62 43 104h43c0 -42 -18 -97 -56 -134c-75 -74 -197 -74 -272 0s-75 194 0 268s195 74 270 0l58 60v-152z" /> + <glyph glyph-name="usb" unicode="usb" +d="M320 363h85v-86h-21v-42c0 -24 -19 -43 -43 -43h-64v-65c15 -8 26 -24 26 -42c0 -26 -21 -47 -47 -47s-47 21 -47 47c0 18 11 34 26 42v65h-64c-24 0 -43 19 -43 43v44c-15 8 -26 23 -26 41c0 26 21 47 47 47s47 -21 47 -47c0 -18 -10 -33 -25 -41v-44h64v170h-43l64 86 +l64 -86h-43v-170h64v42h-21v86z" /> + <glyph glyph-name="verified_user" unicode="verified_user" +d="M213 149l171 171l-30 30l-141 -140l-55 55l-30 -30zM256 491l192 -86v-128c0 -118 -82 -229 -192 -256c-110 27 -192 138 -192 256v128z" /> + <glyph glyph-name="vertical_align_bottom" unicode="vertical_align_bottom" +d="M85 107h342v-43h-342v43zM341 235l-85 -86l-85 86h64v213h42v-213h64z" /> + <glyph glyph-name="vertical_align_center" unicode="vertical_align_center" +d="M85 277h342v-42h-342v42zM341 405l-85 -85l-85 85h64v86h42v-86h64zM171 107l85 85l85 -85h-64v-86h-42v86h-64z" /> + <glyph glyph-name="vertical_align_top" unicode="vertical_align_top" +d="M85 448h342v-43h-342v43zM171 277l85 86l85 -86h-64v-213h-42v213h-64z" /> + <glyph glyph-name="vibration" unicode="vibration" +d="M341 107v298h-170v-298h170zM352 448c18 0 32 -14 32 -32v-320c0 -18 -14 -32 -32 -32h-192c-18 0 -32 14 -32 32v320c0 18 14 32 32 32h192zM405 149v214h43v-214h-43zM469 320h43v-128h-43v128zM64 149v214h43v-214h-43zM0 192v128h43v-128h-43z" /> + <glyph glyph-name="video_call" unicode="video_call" +d="M299 235v42h-64v64h-43v-64h-64v-42h64v-64h43v64h64zM363 288l85 85v-234l-85 85v-75c0 -12 -10 -21 -22 -21h-256c-12 0 -21 9 -21 21v214c0 12 9 21 21 21h256c12 0 22 -9 22 -21v-75z" /> + <glyph glyph-name="video_label" unicode="video_label" +d="M448 171v234h-384v-234h384zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="video_library" unicode="video_library" +d="M256 203l128 96l-128 96v-192zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-256c-23 0 -43 20 -43 43v256c0 23 20 42 43 42h256zM85 384v-299h299v-42h-299c-23 0 -42 19 -42 42v299h42z" /> + <glyph glyph-name="videocam" unicode="videocam" +d="M363 288l85 85v-234l-85 85v-75c0 -12 -10 -21 -22 -21h-256c-12 0 -21 9 -21 21v214c0 12 9 21 21 21h256c12 0 22 -9 22 -21v-75z" /> + <glyph glyph-name="videocam_off" unicode="videocam_off" +d="M70 469l378 -378l-27 -27l-68 68c-3 -2 -8 -4 -12 -4h-256c-12 0 -21 9 -21 21v214c0 12 9 21 21 21h16l-58 58zM448 373v-228l-239 239h132c12 0 22 -9 22 -21v-75z" /> + <glyph glyph-name="videogame_asset" unicode="videogame_asset" +d="M416 256c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM331 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM235 235v42h-64v64h-43v-64h-64v-42h64v-64h43v64h64zM448 384c23 0 43 -20 43 -43v-170c0 -23 -20 -43 -43 -43h-384 +c-23 0 -43 20 -43 43v170c0 23 20 43 43 43h384z" /> + <glyph glyph-name="view_agenda" unicode="view_agenda" +d="M427 448c12 0 21 -9 21 -21v-128c0 -12 -9 -22 -21 -22h-363c-12 0 -21 10 -21 22v128c0 12 9 21 21 21h363zM427 235c12 0 21 -10 21 -22v-128c0 -12 -9 -21 -21 -21h-363c-12 0 -21 9 -21 21v128c0 12 9 22 21 22h363z" /> + <glyph glyph-name="view_array" unicode="view_array" +d="M171 128v277h192v-277h-192zM384 405h64v-277h-64v277zM85 128v277h64v-277h-64z" /> + <glyph glyph-name="view_carousel" unicode="view_carousel" +d="M384 384h85v-235h-85v235zM43 149v235h85v-235h-85zM149 107v320h214v-320h-214z" /> + <glyph glyph-name="view_column" unicode="view_column" +d="M341 405h107v-277h-107v277zM85 128v277h107v-277h-107zM213 128v277h107v-277h-107z" /> + <glyph glyph-name="view_comfy" unicode="view_comfy" +d="M384 405h85v-85h-85v85zM384 107v85h85v-85h-85zM277 107v85h86v-85h-86zM171 107v85h85v-85h-85zM64 107v85h85v-85h-85zM384 213v86h85v-86h-85zM277 405h86v-85h-86v85zM171 320v85h85v-85h-85zM277 213v86h86v-86h-86zM171 213v86h85v-86h-85zM64 213v86h85v-86h-85z +M64 320v85h85v-85h-85z" /> + <glyph glyph-name="view_compact" unicode="view_compact" +d="M64 405h405v-128h-405v128zM213 107v149h256v-149h-256zM64 107v149h128v-149h-128z" /> + <glyph glyph-name="view_day" unicode="view_day" +d="M43 448h405v-64h-405v64zM427 341c12 0 21 -9 21 -21v-128c0 -12 -9 -21 -21 -21h-363c-12 0 -21 9 -21 21v128c0 12 9 21 21 21h363zM43 64v64h405v-64h-405z" /> + <glyph glyph-name="view_headline" unicode="view_headline" +d="M85 405h342v-42h-342v42zM85 277v43h342v-43h-342zM85 107v42h342v-42h-342zM85 192v43h342v-43h-342z" /> + <glyph glyph-name="view_list" unicode="view_list" +d="M192 405h256v-85h-256v85zM192 107v85h256v-85h-256zM192 213v86h256v-86h-256zM85 320v85h86v-85h-86zM85 107v85h86v-85h-86zM85 213v86h86v-86h-86z" /> + <glyph glyph-name="view_module" unicode="view_module" +d="M341 405h107v-128h-107v128zM213 277v128h107v-128h-107zM341 128v128h107v-128h-107zM213 128v128h107v-128h-107zM85 128v128h107v-128h-107zM85 277v128h107v-128h-107z" /> + <glyph glyph-name="view_quilt" unicode="view_quilt" +d="M213 405h235v-128h-235v128zM341 128v128h107v-128h-107zM85 128v277h107v-277h-107zM213 128v128h107v-128h-107z" /> + <glyph glyph-name="view_stream" unicode="view_stream" +d="M85 405h363v-128h-363v128zM85 128v128h363v-128h-363z" /> + <glyph glyph-name="view_week" unicode="view_week" +d="M277 405c12 0 22 -9 22 -21v-256c0 -12 -10 -21 -22 -21h-64c-12 0 -21 9 -21 21v256c0 12 9 21 21 21h64zM427 405c12 0 21 -9 21 -21v-256c0 -12 -9 -21 -21 -21h-64c-12 0 -22 9 -22 21v256c0 12 10 21 22 21h64zM128 405c12 0 21 -9 21 -21v-256 +c0 -12 -9 -21 -21 -21h-64c-12 0 -21 9 -21 21v256c0 12 9 21 21 21h64z" /> + <glyph glyph-name="vignette" unicode="vignette" +d="M256 128c94 0 171 57 171 128s-77 128 -171 128s-171 -57 -171 -128s77 -128 171 -128zM448 448c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-384c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h384z" /> + <glyph glyph-name="visibility" unicode="visibility" +d="M256 320c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM256 149c59 0 107 48 107 107s-48 107 -107 107s-107 -48 -107 -107s48 -107 107 -107zM256 416c107 0 198 -66 235 -160c-37 -94 -128 -160 -235 -160s-198 66 -235 160c37 94 128 160 235 160z +" /> + <glyph glyph-name="visibility_off" unicode="visibility_off" +d="M253 320h3c35 0 64 -29 64 -64v-4zM161 303c-7 -14 -12 -30 -12 -47c0 -59 48 -107 107 -107c17 0 33 5 47 12l-33 33c-4 -1 -9 -2 -14 -2c-35 0 -64 29 -64 64c0 5 1 10 2 14zM43 421l27 27l378 -378l-27 -27c-23.9841 23.6825 -48.1328 47.2006 -72 71 +c-29 -12 -60 -18 -93 -18c-107 0 -198 66 -235 160c17 42 45 78 80 106c-19.5086 19.4914 -38.6537 39.3463 -58 59zM256 363c-14 0 -27 -3 -39 -8l-46 46c26 10 55 15 85 15c107 0 197 -66 234 -160c-16 -40 -41 -74 -73 -101l-62 62c5 12 8 25 8 39c0 59 -48 107 -107 107 +z" /> + <glyph glyph-name="voice_chat" unicode="voice_chat" +d="M384 213v171l-85 -68v68h-171v-171h171v69zM427 469c23 0 42 -19 42 -42v-256c0 -23 -19 -43 -42 -43h-299l-85 -85v384c0 23 19 42 42 42h342z" /> + <glyph glyph-name="voicemail" unicode="voicemail" +d="M395 192c41 0 74 34 74 75s-33 74 -74 74s-75 -33 -75 -74s34 -75 75 -75zM117 192c41 0 75 34 75 75s-34 74 -75 74s-74 -33 -74 -74s33 -75 74 -75zM395 384c65 0 117 -52 117 -117s-52 -118 -117 -118h-278c-65 0 -117 53 -117 118s52 117 117 117s118 -52 118 -117 +c0 -28 -10 -55 -27 -75h96c-17 20 -27 47 -27 75c0 65 53 117 118 117z" /> + <glyph glyph-name="volume_down" unicode="volume_down" +d="M107 320h85l107 107v-342l-107 107h-85v128zM395 256c0 -38 -22 -70 -54 -86v172c32 -16 54 -48 54 -86z" /> + <glyph glyph-name="volume_mute" unicode="volume_mute" +d="M149 320h86l106 107v-342l-106 107h-86v128z" /> + <glyph glyph-name="volume_off" unicode="volume_off" +d="M256 427v-90l-45 45zM91 448l357 -357l-27 -27l-44 44c-23 -18 -49 -32 -78 -39v44c18 5 34 14 48 25l-91 91v-144l-107 107h-85v128h101l-101 101zM405 256c0 68 -44 125 -106 143v44c86 -19 149 -96 149 -187c0 -32 -8 -63 -22 -89l-32 33c7 17 11 36 11 56zM352 256 +c0 -5 0 -9 -1 -13l-52 52v47c32 -16 53 -48 53 -86z" /> + <glyph glyph-name="volume_up" unicode="volume_up" +d="M299 443c86 -19 149 -96 149 -187s-63 -168 -149 -187v44c62 18 106 75 106 143s-44 125 -106 143v44zM352 256c0 -38 -21 -70 -53 -86v172c32 -16 53 -48 53 -86zM64 320h85l107 107v-342l-107 107h-85v128z" /> + <glyph glyph-name="vpn_key" unicode="vpn_key" +d="M149 213c23 0 43 20 43 43s-20 43 -43 43s-42 -20 -42 -43s19 -43 42 -43zM270 299h221v-86h-43v-85h-85v85h-93c-17 -50 -65 -85 -121 -85c-71 0 -128 57 -128 128s57 128 128 128c56 0 104 -35 121 -85z" /> + <glyph glyph-name="vpn_lock" unicode="vpn_lock" +d="M213 65v42c-23 0 -42 19 -42 42v22l-103 102c-3 -12 -4 -25 -4 -38c0 -87 65 -160 149 -170zM404 256h43c1 -7 1 -14 1 -21c0 -118 -95 -214 -213 -214s-214 96 -214 214s96 213 214 213c22 0 44 -4 64 -10v-54c0 -23 -20 -43 -43 -43h-43v-42c0 -12 -9 -22 -21 -22h-43 +v-42h128c12 0 22 -10 22 -22v-64h21c19 0 35 -12 41 -29c28 30 44 71 44 115c0 7 0 14 -1 21zM452 427v10c0 20 -16 37 -36 37s-36 -17 -36 -37v-10h72zM469 427c12 0 22 -10 22 -22v-85c0 -12 -10 -21 -22 -21h-106c-12 0 -22 9 -22 21v85c0 12 10 22 22 22v10 +c0 29 24 54 53 54s53 -25 53 -54v-10z" /> + <glyph glyph-name="wallpaper" unicode="wallpaper" +d="M85 235v-150h150v-42h-150c-23 0 -42 19 -42 42v150h42zM427 85v150h42v-150c0 -23 -19 -42 -42 -42h-150v42h150zM427 469c23 0 42 -19 42 -42v-150h-42v150h-150v42h150zM363 331c0 -18 -14 -32 -32 -32s-32 14 -32 32s14 32 32 32s32 -14 32 -32zM213 235l64 -79 +l43 57l64 -85h-256zM85 427v-150h-42v150c0 23 19 42 42 42h150v-42h-150z" /> + <glyph glyph-name="warning" unicode="warning" +d="M277 213v86h-42v-86h42zM277 128v43h-42v-43h42zM21 64l235 405l235 -405h-470z" /> + <glyph glyph-name="watch" unicode="watch" +d="M128 256c0 -71 57 -128 128 -128s128 57 128 128s-57 128 -128 128s-128 -57 -128 -128zM427 256c0 -54 -26 -103 -65 -134l-21 -122h-170l-21 122c-40 31 -65 80 -65 134s25 103 65 134l21 122h170l21 -122c39 -31 65 -80 65 -134z" /> + <glyph glyph-name="watch_later" unicode="watch_later" +d="M346 166l17 28l-96 58v111h-32v-128zM256 469c117 0 213 -96 213 -213s-96 -213 -213 -213s-213 96 -213 213s96 213 213 213z" /> + <glyph glyph-name="wb_auto" unicode="wb_auto" +d="M220 171h40l-68 192h-43l-68 -192h41l15 42h68zM469 363h39l-44 -192h-37l-32 130l-32 -130h-38l-2 9c-28 -56 -85 -95 -152 -95c-94 0 -171 77 -171 171s77 171 171 171c54 0 102 -25 133 -64h16l26 -135l32 135h34l32 -135zM146 242l25 78l24 -78h-49z" /> + <glyph glyph-name="wb_cloudy" unicode="wb_cloudy" +d="M413 298c55 -4 99 -50 99 -106c0 -59 -48 -107 -107 -107h-277c-71 0 -128 57 -128 128c0 66 50 120 114 127c27 51 80 87 142 87c78 0 142 -55 157 -129z" /> + <glyph glyph-name="wb_incandescent" unicode="wb_incandescent" +d="M368 125l30 29l38 -38l-30 -30zM427 288h64v-43h-64v43zM320 377c38 -22 64 -63 64 -110c0 -71 -57 -128 -128 -128s-128 57 -128 128c0 47 26 88 64 110v103h128v-103zM85 288v-43h-64v43h64zM235 33v63h42v-63h-42zM76 116l38 39l30 -30l-38 -39z" /> + <glyph glyph-name="wb_iridescent" unicode="wb_iridescent" +d="M106 86l-30 31l38 38l30 -30zM76 417l30 30l38 -38l-30 -30zM436 116l-30 -30l-38 39l30 30zM277 33h-42v63h42v-63zM406 447l30 -30l-38 -38l-30 30zM235 500h42v-63h-42v63zM107 203v128h298v-128h-298z" /> + <glyph glyph-name="wb_sunny" unicode="wb_sunny" +d="M76 116l38 39l30 -30l-38 -39zM235 33v63h42v-63h-42zM256 395c71 0 128 -57 128 -128s-57 -128 -128 -128s-128 57 -128 128s57 128 128 128zM427 288h64v-43h-64v43zM368 125l30 29l38 -38l-30 -30zM436 417l-38 -38l-30 30l38 38zM277 500v-63h-42v63h42zM85 288v-43 +h-64v43h64zM144 409l-30 -30l-38 38l30 30z" /> + <glyph glyph-name="wc" unicode="wc" +d="M352 384c-24 0 -43 19 -43 43s19 42 43 42s43 -18 43 -42s-19 -43 -43 -43zM160 384c-24 0 -43 19 -43 43s19 42 43 42s43 -18 43 -42s-19 -43 -43 -43zM384 43h-64v128h-64l54 162c6 17 23 30 41 30h2c18 0 35 -13 41 -30l54 -162h-64v-128zM117 43v160h-32v117 +c0 23 20 43 43 43h64c23 0 43 -20 43 -43v-117h-32v-160h-86z" /> + <glyph glyph-name="web" unicode="web" +d="M427 128v192h-86v-192h86zM320 235v85h-235v-85h235zM320 128v85h-235v-85h235zM427 427c23 0 42 -20 42 -43v-256c0 -23 -19 -43 -42 -43h-342c-23 0 -42 20 -42 43v256c0 23 19 43 42 43h342z" /> + <glyph glyph-name="web_asset" unicode="web_asset" +d="M405 128v213h-298v-213h298zM405 427c24 0 43 -20 43 -43v-256c0 -23 -20 -43 -43 -43h-298c-24 0 -43 20 -43 43v256c0 23 19 43 43 43h298z" /> + <glyph glyph-name="weekend" unicode="weekend" +d="M384 405c23 0 43 -19 43 -42v-46c-25 -9 -43 -32 -43 -60v-44h-256v44c0 28 -18 51 -43 60v46c0 23 20 42 43 42h256zM448 299c23 0 43 -20 43 -43v-107c0 -23 -20 -42 -43 -42h-384c-23 0 -43 19 -43 42v107c0 23 20 43 43 43s43 -20 43 -43v-64h298v64 +c0 23 20 43 43 43z" /> + <glyph glyph-name="whatshot" unicode="whatshot" +d="M250 107c57 0 102 45 102 102c0 30 -4 58 -12 86c-22 -29 -61 -47 -99 -55s-60 -31 -60 -66c0 -37 31 -67 69 -67zM288 498c83 -67 139 -170 139 -285c0 -94 -77 -170 -171 -170s-171 76 -171 170c0 72 26 139 69 190v-8c0 -44 33 -79 77 -79s73 35 73 79 +c0 46 -16 103 -16 103z" /> + <glyph glyph-name="widgets" unicode="widgets" +d="M355 476l121 -121l-121 -120h93v-171h-171v171h78l-120 120v-78h-171v171h171v-93zM64 64v171h171v-171h-171z" /> + <glyph glyph-name="wifi" unicode="wifi" +d="M107 235c83 82 216 82 298 0l-42 -43c-59 59 -155 59 -214 0zM192 149c35 35 93 35 128 0l-64 -64zM21 320c130 129 341 129 470 0l-43 -43c-106 106 -278 106 -384 0z" /> + <glyph glyph-name="wifi_lock" unicode="wifi_lock" +d="M469 171v32c0 18 -14 32 -32 32s-32 -14 -32 -32v-32h64zM491 171c12 0 21 -10 21 -22v-85c0 -12 -9 -21 -21 -21h-107c-12 0 -21 9 -21 21v85c0 12 9 22 21 22v32c0 29 24 53 53 53s54 -24 54 -53v-32zM437 309c-59 0 -106 -47 -106 -106v-61l-75 -99l-256 341 +c71 54 160 85 256 85s185 -31 256 -85l-57 -76c-6 1 -12 1 -18 1z" /> + <glyph glyph-name="wifi_tethering" unicode="wifi_tethering" +d="M256 448c118 0 213 -95 213 -213c0 -79 -42 -148 -106 -185l-22 37c51 30 86 85 86 148c0 94 -77 170 -171 170s-171 -76 -171 -170c0 -63 34 -118 85 -148l-21 -37c-64 37 -106 106 -106 185c0 118 95 213 213 213zM384 235c0 -47 -26 -89 -64 -111l-21 37 +c25 15 42 42 42 74c0 47 -38 85 -85 85s-85 -38 -85 -85c0 -32 17 -59 42 -74l-21 -37c-38 22 -64 64 -64 111c0 71 57 128 128 128s128 -57 128 -128zM256 277c23 0 43 -19 43 -42s-20 -43 -43 -43s-43 20 -43 43s20 42 43 42z" /> + <glyph glyph-name="work" unicode="work" +d="M299 384v43h-86v-43h86zM427 384c24 0 42 -19 42 -43v-234c0 -24 -18 -43 -42 -43h-342c-24 0 -42 19 -42 43v234c0 24 18 43 42 43h86v43c0 24 18 42 42 42h86c24 0 42 -18 42 -42v-43h86z" /> + <glyph glyph-name="wrap_text" unicode="wrap_text" +d="M363 277c47 0 85 -38 85 -85s-38 -85 -85 -85h-43v-43l-64 64l64 64v-43h48c23 0 43 20 43 43s-20 43 -43 43h-283v42h278zM427 405v-42h-342v42h342zM85 107v42h128v-42h-128z" /> + <glyph glyph-name="youtube_searched_for" unicode="youtube_searched_for" +d="M363 213l106 -106l-31 -32l-107 107v16l-6 6c-24 -21 -56 -33 -90 -33c-26 0 -50 7 -71 19l32 31c12 -5 25 -8 39 -8c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96h74l-88 -85l-82 85h53c0 75 62 139 139 139s139 -62 139 -139c0 -35 -13 -66 -34 -90l6 -6h17z" /> + <glyph glyph-name="zoom_in" unicode="zoom_in" +d="M256 299h-43v-43h-21v43h-43v21h43v43h21v-43h43v-21zM203 213c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM331 213l106 -106l-32 -32l-106 106v17l-6 6c-24 -21 -56 -33 -90 -33c-77 0 -139 61 -139 138s62 139 139 139s138 -62 138 -139 +c0 -34 -12 -66 -33 -90l6 -6h17z" /> + <glyph glyph-name="zoom_out" unicode="zoom_out" +d="M149 320h107v-21h-107v21zM203 213c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM331 213l106 -106l-32 -32l-106 106v17l-6 6c-24 -21 -56 -33 -90 -33c-77 0 -139 61 -139 138s62 139 139 139s138 -62 138 -139c0 -34 -12 -66 -33 -90l6 -6h17z" /> + <glyph glyph-name="zoom_out_map" unicode="zoom_out_map" +d="M448 192v-128h-128l49 49l-62 61l31 31l61 -62zM192 64h-128v128l49 -49l61 62l31 -31l-62 -61zM64 320v128h128l-49 -49l62 -61l-31 -31l-61 62zM320 448h128v-128l-49 49l-61 -62l-31 31l62 61z" /> + <glyph glyph-name="3" unicode="3" +d="M0 0z" /> + <glyph glyph-name="d" unicode="d" +d="M0 0z" /> + <glyph glyph-name="_" unicode="_" +d="M0 0z" /> + <glyph glyph-name="r" unicode="r" +d="M0 0z" /> + <glyph glyph-name="o" unicode="o" +d="M0 0z" /> + <glyph glyph-name="t" unicode="t" +d="M0 0z" /> + <glyph glyph-name="a" unicode="a" +d="M0 0z" /> + <glyph glyph-name="i" unicode="i" +d="M0 0z" /> + <glyph glyph-name="n" unicode="n" +d="M0 0z" /> + <glyph glyph-name="c" unicode="c" +d="M0 0z" /> + <glyph glyph-name="u" unicode="u" +d="M0 0z" /> + <glyph glyph-name="e" unicode="e" +d="M0 0z" /> + <glyph glyph-name="s" unicode="s" +d="M0 0z" /> + <glyph glyph-name="l" unicode="l" +d="M0 0z" /> + <glyph glyph-name="m" unicode="m" +d="M0 0z" /> + <glyph glyph-name="b" unicode="b" +d="M0 0z" /> + <glyph glyph-name="y" unicode="y" +d="M0 0z" /> + <glyph glyph-name="w" unicode="w" +d="M0 0z" /> + <glyph glyph-name="x" unicode="x" +d="M0 0z" /> + <glyph glyph-name="p" unicode="p" +d="M0 0z" /> + <glyph glyph-name="h" unicode="h" +d="M0 0z" /> + <glyph glyph-name="g" unicode="g" +d="M0 0z" /> + <glyph glyph-name="q" unicode="q" +d="M0 0z" /> + <glyph glyph-name="j" unicode="j" +d="M0 0z" /> + <glyph glyph-name="f" unicode="f" +d="M0 0z" /> + <glyph glyph-name="v" unicode="v" +d="M0 0z" /> + <glyph glyph-name="k" unicode="k" +d="M0 0z" /> + <glyph glyph-name="z" unicode="z" +d="M0 0z" /> + <glyph glyph-name="1" unicode="1" +d="M0 0z" /> + <glyph glyph-name="2" unicode="2" +d="M0 0z" /> + <glyph glyph-name="4" unicode="4" +d="M0 0z" /> + <glyph glyph-name="5" unicode="5" +d="M0 0z" /> + <glyph glyph-name="6" unicode="6" +d="M0 0z" /> + <glyph glyph-name="7" unicode="7" +d="M0 0z" /> + <glyph glyph-name="9" unicode="9" +d="M0 0z" /> + <glyph glyph-name="8" unicode="8" +d="M0 0z" /> + <glyph glyph-name="0" unicode="0" +d="M0 0z" /> + </font> +</defs></svg> diff --git a/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.ttf b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.ttf Binary files differnew file mode 100644 index 000000000..7015564ad --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.ttf diff --git a/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.woff b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.woff Binary files differnew file mode 100644 index 000000000..a0bfd17e7 --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.woff diff --git a/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.woff2 b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.woff2 Binary files differnew file mode 100644 index 000000000..c91d24334 --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/MaterialIcons-Regular.woff2 diff --git a/vendor/mervick/material-design-icons/fonts/codepoints b/vendor/mervick/material-design-icons/fonts/codepoints new file mode 100644 index 000000000..3c8b07507 --- /dev/null +++ b/vendor/mervick/material-design-icons/fonts/codepoints @@ -0,0 +1,932 @@ +3d_rotation e84d +ac_unit eb3b +access_alarm e190 +access_alarms e191 +access_time e192 +accessibility e84e +accessible e914 +account_balance e84f +account_balance_wallet e850 +account_box e851 +account_circle e853 +adb e60e +add e145 +add_a_photo e439 +add_alarm e193 +add_alert e003 +add_box e146 +add_circle e147 +add_circle_outline e148 +add_location e567 +add_shopping_cart e854 +add_to_photos e39d +add_to_queue e05c +adjust e39e +airline_seat_flat e630 +airline_seat_flat_angled e631 +airline_seat_individual_suite e632 +airline_seat_legroom_extra e633 +airline_seat_legroom_normal e634 +airline_seat_legroom_reduced e635 +airline_seat_recline_extra e636 +airline_seat_recline_normal e637 +airplanemode_active e195 +airplanemode_inactive e194 +airplay e055 +airport_shuttle eb3c +alarm e855 +alarm_add e856 +alarm_off e857 +alarm_on e858 +album e019 +all_inclusive eb3d +all_out e90b +android e859 +announcement e85a +apps e5c3 +archive e149 +arrow_back e5c4 +arrow_downward e5db +arrow_drop_down e5c5 +arrow_drop_down_circle e5c6 +arrow_drop_up e5c7 +arrow_forward e5c8 +arrow_upward e5d8 +art_track e060 +aspect_ratio e85b +assessment e85c +assignment e85d +assignment_ind e85e +assignment_late e85f +assignment_return e860 +assignment_returned e861 +assignment_turned_in e862 +assistant e39f +assistant_photo e3a0 +attach_file e226 +attach_money e227 +attachment e2bc +audiotrack e3a1 +autorenew e863 +av_timer e01b +backspace e14a +backup e864 +battery_alert e19c +battery_charging_full e1a3 +battery_full e1a4 +battery_std e1a5 +battery_unknown e1a6 +beach_access eb3e +beenhere e52d +block e14b +bluetooth e1a7 +bluetooth_audio e60f +bluetooth_connected e1a8 +bluetooth_disabled e1a9 +bluetooth_searching e1aa +blur_circular e3a2 +blur_linear e3a3 +blur_off e3a4 +blur_on e3a5 +book e865 +bookmark e866 +bookmark_border e867 +border_all e228 +border_bottom e229 +border_clear e22a +border_color e22b +border_horizontal e22c +border_inner e22d +border_left e22e +border_outer e22f +border_right e230 +border_style e231 +border_top e232 +border_vertical e233 +branding_watermark e06b +brightness_1 e3a6 +brightness_2 e3a7 +brightness_3 e3a8 +brightness_4 e3a9 +brightness_5 e3aa +brightness_6 e3ab +brightness_7 e3ac +brightness_auto e1ab +brightness_high e1ac +brightness_low e1ad +brightness_medium e1ae +broken_image e3ad +brush e3ae +bubble_chart e6dd +bug_report e868 +build e869 +burst_mode e43c +business e0af +business_center eb3f +cached e86a +cake e7e9 +call e0b0 +call_end e0b1 +call_made e0b2 +call_merge e0b3 +call_missed e0b4 +call_missed_outgoing e0e4 +call_received e0b5 +call_split e0b6 +call_to_action e06c +camera e3af +camera_alt e3b0 +camera_enhance e8fc +camera_front e3b1 +camera_rear e3b2 +camera_roll e3b3 +cancel e5c9 +card_giftcard e8f6 +card_membership e8f7 +card_travel e8f8 +casino eb40 +cast e307 +cast_connected e308 +center_focus_strong e3b4 +center_focus_weak e3b5 +change_history e86b +chat e0b7 +chat_bubble e0ca +chat_bubble_outline e0cb +check e5ca +check_box e834 +check_box_outline_blank e835 +check_circle e86c +chevron_left e5cb +chevron_right e5cc +child_care eb41 +child_friendly eb42 +chrome_reader_mode e86d +class e86e +clear e14c +clear_all e0b8 +close e5cd +closed_caption e01c +cloud e2bd +cloud_circle e2be +cloud_done e2bf +cloud_download e2c0 +cloud_off e2c1 +cloud_queue e2c2 +cloud_upload e2c3 +code e86f +collections e3b6 +collections_bookmark e431 +color_lens e3b7 +colorize e3b8 +comment e0b9 +compare e3b9 +compare_arrows e915 +computer e30a +confirmation_number e638 +contact_mail e0d0 +contact_phone e0cf +contacts e0ba +content_copy e14d +content_cut e14e +content_paste e14f +control_point e3ba +control_point_duplicate e3bb +copyright e90c +create e150 +create_new_folder e2cc +credit_card e870 +crop e3be +crop_16_9 e3bc +crop_3_2 e3bd +crop_5_4 e3bf +crop_7_5 e3c0 +crop_din e3c1 +crop_free e3c2 +crop_landscape e3c3 +crop_original e3c4 +crop_portrait e3c5 +crop_rotate e437 +crop_square e3c6 +dashboard e871 +data_usage e1af +date_range e916 +dehaze e3c7 +delete e872 +delete_forever e92b +delete_sweep e16c +description e873 +desktop_mac e30b +desktop_windows e30c +details e3c8 +developer_board e30d +developer_mode e1b0 +device_hub e335 +devices e1b1 +devices_other e337 +dialer_sip e0bb +dialpad e0bc +directions e52e +directions_bike e52f +directions_boat e532 +directions_bus e530 +directions_car e531 +directions_railway e534 +directions_run e566 +directions_subway e533 +directions_transit e535 +directions_walk e536 +disc_full e610 +dns e875 +do_not_disturb e612 +do_not_disturb_alt e611 +do_not_disturb_off e643 +do_not_disturb_on e644 +dock e30e +domain e7ee +done e876 +done_all e877 +donut_large e917 +donut_small e918 +drafts e151 +drag_handle e25d +drive_eta e613 +dvr e1b2 +edit e3c9 +edit_location e568 +eject e8fb +email e0be +enhanced_encryption e63f +equalizer e01d +error e000 +error_outline e001 +euro_symbol e926 +ev_station e56d +event e878 +event_available e614 +event_busy e615 +event_note e616 +event_seat e903 +exit_to_app e879 +expand_less e5ce +expand_more e5cf +explicit e01e +explore e87a +exposure e3ca +exposure_neg_1 e3cb +exposure_neg_2 e3cc +exposure_plus_1 e3cd +exposure_plus_2 e3ce +exposure_zero e3cf +extension e87b +face e87c +fast_forward e01f +fast_rewind e020 +favorite e87d +favorite_border e87e +featured_play_list e06d +featured_video e06e +feedback e87f +fiber_dvr e05d +fiber_manual_record e061 +fiber_new e05e +fiber_pin e06a +fiber_smart_record e062 +file_download e2c4 +file_upload e2c6 +filter e3d3 +filter_1 e3d0 +filter_2 e3d1 +filter_3 e3d2 +filter_4 e3d4 +filter_5 e3d5 +filter_6 e3d6 +filter_7 e3d7 +filter_8 e3d8 +filter_9 e3d9 +filter_9_plus e3da +filter_b_and_w e3db +filter_center_focus e3dc +filter_drama e3dd +filter_frames e3de +filter_hdr e3df +filter_list e152 +filter_none e3e0 +filter_tilt_shift e3e2 +filter_vintage e3e3 +find_in_page e880 +find_replace e881 +fingerprint e90d +first_page e5dc +fitness_center eb43 +flag e153 +flare e3e4 +flash_auto e3e5 +flash_off e3e6 +flash_on e3e7 +flight e539 +flight_land e904 +flight_takeoff e905 +flip e3e8 +flip_to_back e882 +flip_to_front e883 +folder e2c7 +folder_open e2c8 +folder_shared e2c9 +folder_special e617 +font_download e167 +format_align_center e234 +format_align_justify e235 +format_align_left e236 +format_align_right e237 +format_bold e238 +format_clear e239 +format_color_fill e23a +format_color_reset e23b +format_color_text e23c +format_indent_decrease e23d +format_indent_increase e23e +format_italic e23f +format_line_spacing e240 +format_list_bulleted e241 +format_list_numbered e242 +format_paint e243 +format_quote e244 +format_shapes e25e +format_size e245 +format_strikethrough e246 +format_textdirection_l_to_r e247 +format_textdirection_r_to_l e248 +format_underlined e249 +forum e0bf +forward e154 +forward_10 e056 +forward_30 e057 +forward_5 e058 +free_breakfast eb44 +fullscreen e5d0 +fullscreen_exit e5d1 +functions e24a +g_translate e927 +gamepad e30f +games e021 +gavel e90e +gesture e155 +get_app e884 +gif e908 +golf_course eb45 +gps_fixed e1b3 +gps_not_fixed e1b4 +gps_off e1b5 +grade e885 +gradient e3e9 +grain e3ea +graphic_eq e1b8 +grid_off e3eb +grid_on e3ec +group e7ef +group_add e7f0 +group_work e886 +hd e052 +hdr_off e3ed +hdr_on e3ee +hdr_strong e3f1 +hdr_weak e3f2 +headset e310 +headset_mic e311 +healing e3f3 +hearing e023 +help e887 +help_outline e8fd +high_quality e024 +highlight e25f +highlight_off e888 +history e889 +home e88a +hot_tub eb46 +hotel e53a +hourglass_empty e88b +hourglass_full e88c +http e902 +https e88d +image e3f4 +image_aspect_ratio e3f5 +import_contacts e0e0 +import_export e0c3 +important_devices e912 +inbox e156 +indeterminate_check_box e909 +info e88e +info_outline e88f +input e890 +insert_chart e24b +insert_comment e24c +insert_drive_file e24d +insert_emoticon e24e +insert_invitation e24f +insert_link e250 +insert_photo e251 +invert_colors e891 +invert_colors_off e0c4 +iso e3f6 +keyboard e312 +keyboard_arrow_down e313 +keyboard_arrow_left e314 +keyboard_arrow_right e315 +keyboard_arrow_up e316 +keyboard_backspace e317 +keyboard_capslock e318 +keyboard_hide e31a +keyboard_return e31b +keyboard_tab e31c +keyboard_voice e31d +kitchen eb47 +label e892 +label_outline e893 +landscape e3f7 +language e894 +laptop e31e +laptop_chromebook e31f +laptop_mac e320 +laptop_windows e321 +last_page e5dd +launch e895 +layers e53b +layers_clear e53c +leak_add e3f8 +leak_remove e3f9 +lens e3fa +library_add e02e +library_books e02f +library_music e030 +lightbulb_outline e90f +line_style e919 +line_weight e91a +linear_scale e260 +link e157 +linked_camera e438 +list e896 +live_help e0c6 +live_tv e639 +local_activity e53f +local_airport e53d +local_atm e53e +local_bar e540 +local_cafe e541 +local_car_wash e542 +local_convenience_store e543 +local_dining e556 +local_drink e544 +local_florist e545 +local_gas_station e546 +local_grocery_store e547 +local_hospital e548 +local_hotel e549 +local_laundry_service e54a +local_library e54b +local_mall e54c +local_movies e54d +local_offer e54e +local_parking e54f +local_pharmacy e550 +local_phone e551 +local_pizza e552 +local_play e553 +local_post_office e554 +local_printshop e555 +local_see e557 +local_shipping e558 +local_taxi e559 +location_city e7f1 +location_disabled e1b6 +location_off e0c7 +location_on e0c8 +location_searching e1b7 +lock e897 +lock_open e898 +lock_outline e899 +looks e3fc +looks_3 e3fb +looks_4 e3fd +looks_5 e3fe +looks_6 e3ff +looks_one e400 +looks_two e401 +loop e028 +loupe e402 +low_priority e16d +loyalty e89a +mail e158 +mail_outline e0e1 +map e55b +markunread e159 +markunread_mailbox e89b +memory e322 +menu e5d2 +merge_type e252 +message e0c9 +mic e029 +mic_none e02a +mic_off e02b +mms e618 +mode_comment e253 +mode_edit e254 +monetization_on e263 +money_off e25c +monochrome_photos e403 +mood e7f2 +mood_bad e7f3 +more e619 +more_horiz e5d3 +more_vert e5d4 +motorcycle e91b +mouse e323 +move_to_inbox e168 +movie e02c +movie_creation e404 +movie_filter e43a +multiline_chart e6df +music_note e405 +music_video e063 +my_location e55c +nature e406 +nature_people e407 +navigate_before e408 +navigate_next e409 +navigation e55d +near_me e569 +network_cell e1b9 +network_check e640 +network_locked e61a +network_wifi e1ba +new_releases e031 +next_week e16a +nfc e1bb +no_encryption e641 +no_sim e0cc +not_interested e033 +note e06f +note_add e89c +notifications e7f4 +notifications_active e7f7 +notifications_none e7f5 +notifications_off e7f6 +notifications_paused e7f8 +offline_pin e90a +ondemand_video e63a +opacity e91c +open_in_browser e89d +open_in_new e89e +open_with e89f +pages e7f9 +pageview e8a0 +palette e40a +pan_tool e925 +panorama e40b +panorama_fish_eye e40c +panorama_horizontal e40d +panorama_vertical e40e +panorama_wide_angle e40f +party_mode e7fa +pause e034 +pause_circle_filled e035 +pause_circle_outline e036 +payment e8a1 +people e7fb +people_outline e7fc +perm_camera_mic e8a2 +perm_contact_calendar e8a3 +perm_data_setting e8a4 +perm_device_information e8a5 +perm_identity e8a6 +perm_media e8a7 +perm_phone_msg e8a8 +perm_scan_wifi e8a9 +person e7fd +person_add e7fe +person_outline e7ff +person_pin e55a +person_pin_circle e56a +personal_video e63b +pets e91d +phone e0cd +phone_android e324 +phone_bluetooth_speaker e61b +phone_forwarded e61c +phone_in_talk e61d +phone_iphone e325 +phone_locked e61e +phone_missed e61f +phone_paused e620 +phonelink e326 +phonelink_erase e0db +phonelink_lock e0dc +phonelink_off e327 +phonelink_ring e0dd +phonelink_setup e0de +photo e410 +photo_album e411 +photo_camera e412 +photo_filter e43b +photo_library e413 +photo_size_select_actual e432 +photo_size_select_large e433 +photo_size_select_small e434 +picture_as_pdf e415 +picture_in_picture e8aa +picture_in_picture_alt e911 +pie_chart e6c4 +pie_chart_outlined e6c5 +pin_drop e55e +place e55f +play_arrow e037 +play_circle_filled e038 +play_circle_outline e039 +play_for_work e906 +playlist_add e03b +playlist_add_check e065 +playlist_play e05f +plus_one e800 +poll e801 +polymer e8ab +pool eb48 +portable_wifi_off e0ce +portrait e416 +power e63c +power_input e336 +power_settings_new e8ac +pregnant_woman e91e +present_to_all e0df +print e8ad +priority_high e645 +public e80b +publish e255 +query_builder e8ae +question_answer e8af +queue e03c +queue_music e03d +queue_play_next e066 +radio e03e +radio_button_checked e837 +radio_button_unchecked e836 +rate_review e560 +receipt e8b0 +recent_actors e03f +record_voice_over e91f +redeem e8b1 +redo e15a +refresh e5d5 +remove e15b +remove_circle e15c +remove_circle_outline e15d +remove_from_queue e067 +remove_red_eye e417 +remove_shopping_cart e928 +reorder e8fe +repeat e040 +repeat_one e041 +replay e042 +replay_10 e059 +replay_30 e05a +replay_5 e05b +reply e15e +reply_all e15f +report e160 +report_problem e8b2 +restaurant e56c +restaurant_menu e561 +restore e8b3 +restore_page e929 +ring_volume e0d1 +room e8b4 +room_service eb49 +rotate_90_degrees_ccw e418 +rotate_left e419 +rotate_right e41a +rounded_corner e920 +router e328 +rowing e921 +rss_feed e0e5 +rv_hookup e642 +satellite e562 +save e161 +scanner e329 +schedule e8b5 +school e80c +screen_lock_landscape e1be +screen_lock_portrait e1bf +screen_lock_rotation e1c0 +screen_rotation e1c1 +screen_share e0e2 +sd_card e623 +sd_storage e1c2 +search e8b6 +security e32a +select_all e162 +send e163 +sentiment_dissatisfied e811 +sentiment_neutral e812 +sentiment_satisfied e813 +sentiment_very_dissatisfied e814 +sentiment_very_satisfied e815 +settings e8b8 +settings_applications e8b9 +settings_backup_restore e8ba +settings_bluetooth e8bb +settings_brightness e8bd +settings_cell e8bc +settings_ethernet e8be +settings_input_antenna e8bf +settings_input_component e8c0 +settings_input_composite e8c1 +settings_input_hdmi e8c2 +settings_input_svideo e8c3 +settings_overscan e8c4 +settings_phone e8c5 +settings_power e8c6 +settings_remote e8c7 +settings_system_daydream e1c3 +settings_voice e8c8 +share e80d +shop e8c9 +shop_two e8ca +shopping_basket e8cb +shopping_cart e8cc +short_text e261 +show_chart e6e1 +shuffle e043 +signal_cellular_4_bar e1c8 +signal_cellular_connected_no_internet_4_bar e1cd +signal_cellular_no_sim e1ce +signal_cellular_null e1cf +signal_cellular_off e1d0 +signal_wifi_4_bar e1d8 +signal_wifi_4_bar_lock e1d9 +signal_wifi_off e1da +sim_card e32b +sim_card_alert e624 +skip_next e044 +skip_previous e045 +slideshow e41b +slow_motion_video e068 +smartphone e32c +smoke_free eb4a +smoking_rooms eb4b +sms e625 +sms_failed e626 +snooze e046 +sort e164 +sort_by_alpha e053 +spa eb4c +space_bar e256 +speaker e32d +speaker_group e32e +speaker_notes e8cd +speaker_notes_off e92a +speaker_phone e0d2 +spellcheck e8ce +star e838 +star_border e83a +star_half e839 +stars e8d0 +stay_current_landscape e0d3 +stay_current_portrait e0d4 +stay_primary_landscape e0d5 +stay_primary_portrait e0d6 +stop e047 +stop_screen_share e0e3 +storage e1db +store e8d1 +store_mall_directory e563 +straighten e41c +streetview e56e +strikethrough_s e257 +style e41d +subdirectory_arrow_left e5d9 +subdirectory_arrow_right e5da +subject e8d2 +subscriptions e064 +subtitles e048 +subway e56f +supervisor_account e8d3 +surround_sound e049 +swap_calls e0d7 +swap_horiz e8d4 +swap_vert e8d5 +swap_vertical_circle e8d6 +switch_camera e41e +switch_video e41f +sync e627 +sync_disabled e628 +sync_problem e629 +system_update e62a +system_update_alt e8d7 +tab e8d8 +tab_unselected e8d9 +tablet e32f +tablet_android e330 +tablet_mac e331 +tag_faces e420 +tap_and_play e62b +terrain e564 +text_fields e262 +text_format e165 +textsms e0d8 +texture e421 +theaters e8da +thumb_down e8db +thumb_up e8dc +thumbs_up_down e8dd +time_to_leave e62c +timelapse e422 +timeline e922 +timer e425 +timer_10 e423 +timer_3 e424 +timer_off e426 +title e264 +toc e8de +today e8df +toll e8e0 +tonality e427 +touch_app e913 +toys e332 +track_changes e8e1 +traffic e565 +train e570 +tram e571 +transfer_within_a_station e572 +transform e428 +translate e8e2 +trending_down e8e3 +trending_flat e8e4 +trending_up e8e5 +tune e429 +turned_in e8e6 +turned_in_not e8e7 +tv e333 +unarchive e169 +undo e166 +unfold_less e5d6 +unfold_more e5d7 +update e923 +usb e1e0 +verified_user e8e8 +vertical_align_bottom e258 +vertical_align_center e259 +vertical_align_top e25a +vibration e62d +video_call e070 +video_label e071 +video_library e04a +videocam e04b +videocam_off e04c +videogame_asset e338 +view_agenda e8e9 +view_array e8ea +view_carousel e8eb +view_column e8ec +view_comfy e42a +view_compact e42b +view_day e8ed +view_headline e8ee +view_list e8ef +view_module e8f0 +view_quilt e8f1 +view_stream e8f2 +view_week e8f3 +vignette e435 +visibility e8f4 +visibility_off e8f5 +voice_chat e62e +voicemail e0d9 +volume_down e04d +volume_mute e04e +volume_off e04f +volume_up e050 +vpn_key e0da +vpn_lock e62f +wallpaper e1bc +warning e002 +watch e334 +watch_later e924 +wb_auto e42c +wb_cloudy e42d +wb_incandescent e42e +wb_iridescent e436 +wb_sunny e430 +wc e63d +web e051 +web_asset e069 +weekend e16b +whatshot e80e +widgets e1bd +wifi e63e +wifi_lock e1e1 +wifi_tethering e1e2 +work e8f9 +wrap_text e25b +youtube_searched_for e8fa +zoom_in e8ff +zoom_out e900 +zoom_out_map e56b diff --git a/vendor/mervick/material-design-icons/index.js b/vendor/mervick/material-design-icons/index.js new file mode 100644 index 000000000..4a1d90117 --- /dev/null +++ b/vendor/mervick/material-design-icons/index.js @@ -0,0 +1,3 @@ +module.exports = { + STATIC_PATH: __dirname, +}; diff --git a/vendor/mervick/material-design-icons/package.json b/vendor/mervick/material-design-icons/package.json new file mode 100644 index 000000000..c35ad8c21 --- /dev/null +++ b/vendor/mervick/material-design-icons/package.json @@ -0,0 +1,44 @@ +{ + "name": "bootstrap-material-icons", + "version": "2.2.0", + "description": "Google Material Design Icons For Using With Bootstrap", + "repository": { + "type": "git", + "url": "https://github.com/mervick/material-design-icons" + }, + "main": "index.js", + "authors": [ + { + "name": "Andrey Izman", + "email": "[email protected]" + } + ], + "keywords": [ + "icons", + "material", + "material-design", + "google", + "icons-web-font", + "web-font", + "bootstrap" + ], + "style": "css/material-icons.min.css", + "license": "(MIT AND CC-BY-4.0)", + "bugs": { + "url": "http://github.com/mervick/material-design-icons/issues" + }, + "homepage": "http://github.com/mervick/material-design-icons", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-contrib-cssmin": "^0.14.0", + "grunt-contrib-sass": "^0.9.2", + "grunt-contrib-watch": "^0.6.1", + "gulp": "^3.9.0", + "gulp-changed": "^1.3.0", + "gulp-util": "^3.0.7", + "lodash": "^4.5.0", + "material-design-icons": "^2.2.0", + "through2": "^2.0.1", + "vinyl": "^1.1.1" + } +} diff --git a/vendor/mervick/material-design-icons/scripts/codepoints2scss.sh b/vendor/mervick/material-design-icons/scripts/codepoints2scss.sh new file mode 100644 index 000000000..e89e68eed --- /dev/null +++ b/vendor/mervick/material-design-icons/scripts/codepoints2scss.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +pushd `dirname dirname $0` > /dev/null +path=`pwd` +popd > /dev/null + +codepoints_file="${path}/bower_components/material-design-icons/iconfont/codepoints" +icons_scss_file="${path}/scss/_icons.scss" + +# default css prefix +prefix_var_name="md-css-prefix" + +# clear the scss +> "${icons_scss_file}" + +i=0 +while IFS='' read -r line || [[ -n "$line" ]]; do + IFS=' ' read -r -a icon <<< "$line" + if [ "${#icon[@]}" == 2 ] && [ -n "${icon}" ] && [ -n "${icon[1]}" ]; then + echo ".#{\$${prefix_var_name}}-$(echo ${icon} | sed -e 's/_/\-/g'):before { content: "'"'"\\${icon[1]}"'"'"; }" \ + >> "${icons_scss_file}" + else + echo "ERROR: The file ${codepoints_file} has the invalid format on line $((i+1))" 1>&2 + exit 1 + fi + ((i++)) +done < "${codepoints_file}" + +echo "Successfully imported ${i} icons" +exit 0
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/scripts/updatedemo.php b/vendor/mervick/material-design-icons/scripts/updatedemo.php new file mode 100644 index 000000000..bc7411467 --- /dev/null +++ b/vendor/mervick/material-design-icons/scripts/updatedemo.php @@ -0,0 +1,61 @@ +<?php + +$path = __DIR__ . '/../bower_components/material-design-icons'; +$out = __DIR__ . '/../demo/js/data.js'; +$codepoints = __DIR__ . '/../bower_components/material-design-icons/iconfont/codepoints'; +$oldcodepoints = __DIR__ . '/../fonts/codepoints'; + +$start_js = 'window.data = '; +$end_js = ';'; + +//$categories = file_get_contents($out); +//$categories = substr(substr($categories, strlen($start_js)), 0, - strlen($end_js)); +//$categories = json_decode($categories, true); +//$categories = $categories ?: []; + +$categories = $icons = $old_icons = []; +$count = $count_cats = 0; + +foreach (file($codepoints, FILE_IGNORE_NEW_LINES) as $code) { + $code = explode(' ', $code, 2); + $icons[$code[0]] = $code[1]; +} +foreach (file($oldcodepoints, FILE_IGNORE_NEW_LINES) as $code) { + $code = explode(' ', $code, 2); + $old_icons[$code[0]] = $code[1]; +} + +foreach (array_diff(scandir($path), ['.', '..']) as $category) { + if (is_dir("$path/$category/svg/production")) { + $count_cats ++; + $categories[$category] = []; + foreach (array_diff(scandir("$path/$category/svg/production"), ['.', '..']) as $file) { + if (preg_match('/^ic_(.+?)_\d+px\.svg$/', $file, $match)) { + $icon = $match[1]; + if (isset($icons[$icon])) { + if (!in_array($icons[$icon], $categories[$category])) { + $categories[$category][$icon] = $icons[$icon]; + $count ++; + } + } + } + } + } +} + +$new = 0; + +foreach ($categories as &$category) { + foreach ($category as $icon => &$code) { + $c = $code; + $code = [$c, !isset($old_icons[$icon])]; + if (!isset($old_icons[$icon])) { + $new ++; + } + } +} + + +file_put_contents($out, $start_js . json_encode($categories) . $end_js); + +echo "Found $count icons, ($new new) in $count_cats categories\n";
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/scss/_animated.scss b/vendor/mervick/material-design-icons/scss/_animated.scss new file mode 100644 index 000000000..60476c2d8 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_animated.scss @@ -0,0 +1,36 @@ +@import "variables"; + +// Spinning Icons +// -------------------------- + +.#{$md-css-prefix}-spin { + -webkit-animation: md-spin 2s infinite linear; + animation: md-spin 2s infinite linear; +} + +.#{$md-css-prefix}-pulse { + -webkit-animation: md-spin 1s infinite steps(8); + animation: md-spin 1s infinite steps(8); +} + +@-webkit-keyframes md-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +@keyframes md-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} diff --git a/vendor/mervick/material-design-icons/scss/_bordered-pulled.scss b/vendor/mervick/material-design-icons/scss/_bordered-pulled.scss new file mode 100644 index 000000000..ad307fd39 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_bordered-pulled.scss @@ -0,0 +1,18 @@ +@import "variables"; + +// Bordered & Pulled +// ------------------------- + +.#{$md-css-prefix}-border { + padding: .2em .25em .15em; + border: solid .08em $md-border-color; + border-radius: .1em; +} + +.pull-right { float: right; } +.pull-left { float: left; } + +.#{$md-css-prefix} { + &.pull-left { margin-right: .3em; } + &.pull-right { margin-left: .3em; } +} diff --git a/vendor/mervick/material-design-icons/scss/_core.scss b/vendor/mervick/material-design-icons/scss/_core.scss new file mode 100644 index 000000000..caeebdc34 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_core.scss @@ -0,0 +1,30 @@ +@import "variables"; + +// Base Class Definition +// ------------------------- + +.#{$md-css-prefix}, .material-icons { + font: normal normal normal #{$md-font-size-base}/1 $md-font-family; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + display: inline-block; + text-transform: none; + letter-spacing: normal; + line-height: 1; + position: relative; + word-wrap: normal; + top: 1px; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); // ensures no half-pixel rendering in firefox +} + +.material-icons { + width: 1em; + height: 1em; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for IE. */ + font-feature-settings: 'liga'; +}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/scss/_fixed-width.scss b/vendor/mervick/material-design-icons/scss/_fixed-width.scss new file mode 100644 index 000000000..078727c95 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_fixed-width.scss @@ -0,0 +1,9 @@ +@import "variables"; + +// Fixed Width Icons +// ------------------------- + +.#{$md-css-prefix}-fw { + width: (18em / 14); + text-align: center; +} diff --git a/vendor/mervick/material-design-icons/scss/_icons.scss b/vendor/mervick/material-design-icons/scss/_icons.scss new file mode 100644 index 000000000..c8713b92e --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_icons.scss @@ -0,0 +1,934 @@ +@import "variables"; + +.#{$md-css-prefix}-3d-rotation:before { content: "\e84d"; } +.#{$md-css-prefix}-ac-unit:before { content: "\eb3b"; } +.#{$md-css-prefix}-access-alarm:before { content: "\e190"; } +.#{$md-css-prefix}-access-alarms:before { content: "\e191"; } +.#{$md-css-prefix}-access-time:before { content: "\e192"; } +.#{$md-css-prefix}-accessibility:before { content: "\e84e"; } +.#{$md-css-prefix}-accessible:before { content: "\e914"; } +.#{$md-css-prefix}-account-balance:before { content: "\e84f"; } +.#{$md-css-prefix}-account-balance-wallet:before { content: "\e850"; } +.#{$md-css-prefix}-account-box:before { content: "\e851"; } +.#{$md-css-prefix}-account-circle:before { content: "\e853"; } +.#{$md-css-prefix}-adb:before { content: "\e60e"; } +.#{$md-css-prefix}-add:before { content: "\e145"; } +.#{$md-css-prefix}-add-a-photo:before { content: "\e439"; } +.#{$md-css-prefix}-add-alarm:before { content: "\e193"; } +.#{$md-css-prefix}-add-alert:before { content: "\e003"; } +.#{$md-css-prefix}-add-box:before { content: "\e146"; } +.#{$md-css-prefix}-add-circle:before { content: "\e147"; } +.#{$md-css-prefix}-add-circle-outline:before { content: "\e148"; } +.#{$md-css-prefix}-add-location:before { content: "\e567"; } +.#{$md-css-prefix}-add-shopping-cart:before { content: "\e854"; } +.#{$md-css-prefix}-add-to-photos:before { content: "\e39d"; } +.#{$md-css-prefix}-add-to-queue:before { content: "\e05c"; } +.#{$md-css-prefix}-adjust:before { content: "\e39e"; } +.#{$md-css-prefix}-airline-seat-flat:before { content: "\e630"; } +.#{$md-css-prefix}-airline-seat-flat-angled:before { content: "\e631"; } +.#{$md-css-prefix}-airline-seat-individual-suite:before { content: "\e632"; } +.#{$md-css-prefix}-airline-seat-legroom-extra:before { content: "\e633"; } +.#{$md-css-prefix}-airline-seat-legroom-normal:before { content: "\e634"; } +.#{$md-css-prefix}-airline-seat-legroom-reduced:before { content: "\e635"; } +.#{$md-css-prefix}-airline-seat-recline-extra:before { content: "\e636"; } +.#{$md-css-prefix}-airline-seat-recline-normal:before { content: "\e637"; } +.#{$md-css-prefix}-airplanemode-active:before { content: "\e195"; } +.#{$md-css-prefix}-airplanemode-inactive:before { content: "\e194"; } +.#{$md-css-prefix}-airplay:before { content: "\e055"; } +.#{$md-css-prefix}-airport-shuttle:before { content: "\eb3c"; } +.#{$md-css-prefix}-alarm:before { content: "\e855"; } +.#{$md-css-prefix}-alarm-add:before { content: "\e856"; } +.#{$md-css-prefix}-alarm-off:before { content: "\e857"; } +.#{$md-css-prefix}-alarm-on:before { content: "\e858"; } +.#{$md-css-prefix}-album:before { content: "\e019"; } +.#{$md-css-prefix}-all-inclusive:before { content: "\eb3d"; } +.#{$md-css-prefix}-all-out:before { content: "\e90b"; } +.#{$md-css-prefix}-android:before { content: "\e859"; } +.#{$md-css-prefix}-announcement:before { content: "\e85a"; } +.#{$md-css-prefix}-apps:before { content: "\e5c3"; } +.#{$md-css-prefix}-archive:before { content: "\e149"; } +.#{$md-css-prefix}-arrow-back:before { content: "\e5c4"; } +.#{$md-css-prefix}-arrow-downward:before { content: "\e5db"; } +.#{$md-css-prefix}-arrow-drop-down:before { content: "\e5c5"; } +.#{$md-css-prefix}-arrow-drop-down-circle:before { content: "\e5c6"; } +.#{$md-css-prefix}-arrow-drop-up:before { content: "\e5c7"; } +.#{$md-css-prefix}-arrow-forward:before { content: "\e5c8"; } +.#{$md-css-prefix}-arrow-upward:before { content: "\e5d8"; } +.#{$md-css-prefix}-art-track:before { content: "\e060"; } +.#{$md-css-prefix}-aspect-ratio:before { content: "\e85b"; } +.#{$md-css-prefix}-assessment:before { content: "\e85c"; } +.#{$md-css-prefix}-assignment:before { content: "\e85d"; } +.#{$md-css-prefix}-assignment-ind:before { content: "\e85e"; } +.#{$md-css-prefix}-assignment-late:before { content: "\e85f"; } +.#{$md-css-prefix}-assignment-return:before { content: "\e860"; } +.#{$md-css-prefix}-assignment-returned:before { content: "\e861"; } +.#{$md-css-prefix}-assignment-turned-in:before { content: "\e862"; } +.#{$md-css-prefix}-assistant:before { content: "\e39f"; } +.#{$md-css-prefix}-assistant-photo:before { content: "\e3a0"; } +.#{$md-css-prefix}-attach-file:before { content: "\e226"; } +.#{$md-css-prefix}-attach-money:before { content: "\e227"; } +.#{$md-css-prefix}-attachment:before { content: "\e2bc"; } +.#{$md-css-prefix}-audiotrack:before { content: "\e3a1"; } +.#{$md-css-prefix}-autorenew:before { content: "\e863"; } +.#{$md-css-prefix}-av-timer:before { content: "\e01b"; } +.#{$md-css-prefix}-backspace:before { content: "\e14a"; } +.#{$md-css-prefix}-backup:before { content: "\e864"; } +.#{$md-css-prefix}-battery-alert:before { content: "\e19c"; } +.#{$md-css-prefix}-battery-charging-full:before { content: "\e1a3"; } +.#{$md-css-prefix}-battery-full:before { content: "\e1a4"; } +.#{$md-css-prefix}-battery-std:before { content: "\e1a5"; } +.#{$md-css-prefix}-battery-unknown:before { content: "\e1a6"; } +.#{$md-css-prefix}-beach-access:before { content: "\eb3e"; } +.#{$md-css-prefix}-beenhere:before { content: "\e52d"; } +.#{$md-css-prefix}-block:before { content: "\e14b"; } +.#{$md-css-prefix}-bluetooth:before { content: "\e1a7"; } +.#{$md-css-prefix}-bluetooth-audio:before { content: "\e60f"; } +.#{$md-css-prefix}-bluetooth-connected:before { content: "\e1a8"; } +.#{$md-css-prefix}-bluetooth-disabled:before { content: "\e1a9"; } +.#{$md-css-prefix}-bluetooth-searching:before { content: "\e1aa"; } +.#{$md-css-prefix}-blur-circular:before { content: "\e3a2"; } +.#{$md-css-prefix}-blur-linear:before { content: "\e3a3"; } +.#{$md-css-prefix}-blur-off:before { content: "\e3a4"; } +.#{$md-css-prefix}-blur-on:before { content: "\e3a5"; } +.#{$md-css-prefix}-book:before { content: "\e865"; } +.#{$md-css-prefix}-bookmark:before { content: "\e866"; } +.#{$md-css-prefix}-bookmark-border:before { content: "\e867"; } +.#{$md-css-prefix}-border-all:before { content: "\e228"; } +.#{$md-css-prefix}-border-bottom:before { content: "\e229"; } +.#{$md-css-prefix}-border-clear:before { content: "\e22a"; } +.#{$md-css-prefix}-border-color:before { content: "\e22b"; } +.#{$md-css-prefix}-border-horizontal:before { content: "\e22c"; } +.#{$md-css-prefix}-border-inner:before { content: "\e22d"; } +.#{$md-css-prefix}-border-left:before { content: "\e22e"; } +.#{$md-css-prefix}-border-outer:before { content: "\e22f"; } +.#{$md-css-prefix}-border-right:before { content: "\e230"; } +.#{$md-css-prefix}-border-style:before { content: "\e231"; } +.#{$md-css-prefix}-border-top:before { content: "\e232"; } +.#{$md-css-prefix}-border-vertical:before { content: "\e233"; } +.#{$md-css-prefix}-branding-watermark:before { content: "\e06b"; } +.#{$md-css-prefix}-brightness-1:before { content: "\e3a6"; } +.#{$md-css-prefix}-brightness-2:before { content: "\e3a7"; } +.#{$md-css-prefix}-brightness-3:before { content: "\e3a8"; } +.#{$md-css-prefix}-brightness-4:before { content: "\e3a9"; } +.#{$md-css-prefix}-brightness-5:before { content: "\e3aa"; } +.#{$md-css-prefix}-brightness-6:before { content: "\e3ab"; } +.#{$md-css-prefix}-brightness-7:before { content: "\e3ac"; } +.#{$md-css-prefix}-brightness-auto:before { content: "\e1ab"; } +.#{$md-css-prefix}-brightness-high:before { content: "\e1ac"; } +.#{$md-css-prefix}-brightness-low:before { content: "\e1ad"; } +.#{$md-css-prefix}-brightness-medium:before { content: "\e1ae"; } +.#{$md-css-prefix}-broken-image:before { content: "\e3ad"; } +.#{$md-css-prefix}-brush:before { content: "\e3ae"; } +.#{$md-css-prefix}-bubble-chart:before { content: "\e6dd"; } +.#{$md-css-prefix}-bug-report:before { content: "\e868"; } +.#{$md-css-prefix}-build:before { content: "\e869"; } +.#{$md-css-prefix}-burst-mode:before { content: "\e43c"; } +.#{$md-css-prefix}-business:before { content: "\e0af"; } +.#{$md-css-prefix}-business-center:before { content: "\eb3f"; } +.#{$md-css-prefix}-cached:before { content: "\e86a"; } +.#{$md-css-prefix}-cake:before { content: "\e7e9"; } +.#{$md-css-prefix}-call:before { content: "\e0b0"; } +.#{$md-css-prefix}-call-end:before { content: "\e0b1"; } +.#{$md-css-prefix}-call-made:before { content: "\e0b2"; } +.#{$md-css-prefix}-call-merge:before { content: "\e0b3"; } +.#{$md-css-prefix}-call-missed:before { content: "\e0b4"; } +.#{$md-css-prefix}-call-missed-outgoing:before { content: "\e0e4"; } +.#{$md-css-prefix}-call-received:before { content: "\e0b5"; } +.#{$md-css-prefix}-call-split:before { content: "\e0b6"; } +.#{$md-css-prefix}-call-to-action:before { content: "\e06c"; } +.#{$md-css-prefix}-camera:before { content: "\e3af"; } +.#{$md-css-prefix}-camera-alt:before { content: "\e3b0"; } +.#{$md-css-prefix}-camera-enhance:before { content: "\e8fc"; } +.#{$md-css-prefix}-camera-front:before { content: "\e3b1"; } +.#{$md-css-prefix}-camera-rear:before { content: "\e3b2"; } +.#{$md-css-prefix}-camera-roll:before { content: "\e3b3"; } +.#{$md-css-prefix}-cancel:before { content: "\e5c9"; } +.#{$md-css-prefix}-card-giftcard:before { content: "\e8f6"; } +.#{$md-css-prefix}-card-membership:before { content: "\e8f7"; } +.#{$md-css-prefix}-card-travel:before { content: "\e8f8"; } +.#{$md-css-prefix}-casino:before { content: "\eb40"; } +.#{$md-css-prefix}-cast:before { content: "\e307"; } +.#{$md-css-prefix}-cast-connected:before { content: "\e308"; } +.#{$md-css-prefix}-center-focus-strong:before { content: "\e3b4"; } +.#{$md-css-prefix}-center-focus-weak:before { content: "\e3b5"; } +.#{$md-css-prefix}-change-history:before { content: "\e86b"; } +.#{$md-css-prefix}-chat:before { content: "\e0b7"; } +.#{$md-css-prefix}-chat-bubble:before { content: "\e0ca"; } +.#{$md-css-prefix}-chat-bubble-outline:before { content: "\e0cb"; } +.#{$md-css-prefix}-check:before { content: "\e5ca"; } +.#{$md-css-prefix}-check-box:before { content: "\e834"; } +.#{$md-css-prefix}-check-box-outline-blank:before { content: "\e835"; } +.#{$md-css-prefix}-check-circle:before { content: "\e86c"; } +.#{$md-css-prefix}-chevron-left:before { content: "\e5cb"; } +.#{$md-css-prefix}-chevron-right:before { content: "\e5cc"; } +.#{$md-css-prefix}-child-care:before { content: "\eb41"; } +.#{$md-css-prefix}-child-friendly:before { content: "\eb42"; } +.#{$md-css-prefix}-chrome-reader-mode:before { content: "\e86d"; } +.#{$md-css-prefix}-class:before { content: "\e86e"; } +.#{$md-css-prefix}-clear:before { content: "\e14c"; } +.#{$md-css-prefix}-clear-all:before { content: "\e0b8"; } +.#{$md-css-prefix}-close:before { content: "\e5cd"; } +.#{$md-css-prefix}-closed-caption:before { content: "\e01c"; } +.#{$md-css-prefix}-cloud:before { content: "\e2bd"; } +.#{$md-css-prefix}-cloud-circle:before { content: "\e2be"; } +.#{$md-css-prefix}-cloud-done:before { content: "\e2bf"; } +.#{$md-css-prefix}-cloud-download:before { content: "\e2c0"; } +.#{$md-css-prefix}-cloud-off:before { content: "\e2c1"; } +.#{$md-css-prefix}-cloud-queue:before { content: "\e2c2"; } +.#{$md-css-prefix}-cloud-upload:before { content: "\e2c3"; } +.#{$md-css-prefix}-code:before { content: "\e86f"; } +.#{$md-css-prefix}-collections:before { content: "\e3b6"; } +.#{$md-css-prefix}-collections-bookmark:before { content: "\e431"; } +.#{$md-css-prefix}-color-lens:before { content: "\e3b7"; } +.#{$md-css-prefix}-colorize:before { content: "\e3b8"; } +.#{$md-css-prefix}-comment:before { content: "\e0b9"; } +.#{$md-css-prefix}-compare:before { content: "\e3b9"; } +.#{$md-css-prefix}-compare-arrows:before { content: "\e915"; } +.#{$md-css-prefix}-computer:before { content: "\e30a"; } +.#{$md-css-prefix}-confirmation-number:before { content: "\e638"; } +.#{$md-css-prefix}-contact-mail:before { content: "\e0d0"; } +.#{$md-css-prefix}-contact-phone:before { content: "\e0cf"; } +.#{$md-css-prefix}-contacts:before { content: "\e0ba"; } +.#{$md-css-prefix}-content-copy:before { content: "\e14d"; } +.#{$md-css-prefix}-content-cut:before { content: "\e14e"; } +.#{$md-css-prefix}-content-paste:before { content: "\e14f"; } +.#{$md-css-prefix}-control-point:before { content: "\e3ba"; } +.#{$md-css-prefix}-control-point-duplicate:before { content: "\e3bb"; } +.#{$md-css-prefix}-copyright:before { content: "\e90c"; } +.#{$md-css-prefix}-create:before { content: "\e150"; } +.#{$md-css-prefix}-create-new-folder:before { content: "\e2cc"; } +.#{$md-css-prefix}-credit-card:before { content: "\e870"; } +.#{$md-css-prefix}-crop:before { content: "\e3be"; } +.#{$md-css-prefix}-crop-16-9:before { content: "\e3bc"; } +.#{$md-css-prefix}-crop-3-2:before { content: "\e3bd"; } +.#{$md-css-prefix}-crop-5-4:before { content: "\e3bf"; } +.#{$md-css-prefix}-crop-7-5:before { content: "\e3c0"; } +.#{$md-css-prefix}-crop-din:before { content: "\e3c1"; } +.#{$md-css-prefix}-crop-free:before { content: "\e3c2"; } +.#{$md-css-prefix}-crop-landscape:before { content: "\e3c3"; } +.#{$md-css-prefix}-crop-original:before { content: "\e3c4"; } +.#{$md-css-prefix}-crop-portrait:before { content: "\e3c5"; } +.#{$md-css-prefix}-crop-rotate:before { content: "\e437"; } +.#{$md-css-prefix}-crop-square:before { content: "\e3c6"; } +.#{$md-css-prefix}-dashboard:before { content: "\e871"; } +.#{$md-css-prefix}-data-usage:before { content: "\e1af"; } +.#{$md-css-prefix}-date-range:before { content: "\e916"; } +.#{$md-css-prefix}-dehaze:before { content: "\e3c7"; } +.#{$md-css-prefix}-delete:before { content: "\e872"; } +.#{$md-css-prefix}-delete-forever:before { content: "\e92b"; } +.#{$md-css-prefix}-delete-sweep:before { content: "\e16c"; } +.#{$md-css-prefix}-description:before { content: "\e873"; } +.#{$md-css-prefix}-desktop-mac:before { content: "\e30b"; } +.#{$md-css-prefix}-desktop-windows:before { content: "\e30c"; } +.#{$md-css-prefix}-details:before { content: "\e3c8"; } +.#{$md-css-prefix}-developer-board:before { content: "\e30d"; } +.#{$md-css-prefix}-developer-mode:before { content: "\e1b0"; } +.#{$md-css-prefix}-device-hub:before { content: "\e335"; } +.#{$md-css-prefix}-devices:before { content: "\e1b1"; } +.#{$md-css-prefix}-devices-other:before { content: "\e337"; } +.#{$md-css-prefix}-dialer-sip:before { content: "\e0bb"; } +.#{$md-css-prefix}-dialpad:before { content: "\e0bc"; } +.#{$md-css-prefix}-directions:before { content: "\e52e"; } +.#{$md-css-prefix}-directions-bike:before { content: "\e52f"; } +.#{$md-css-prefix}-directions-boat:before { content: "\e532"; } +.#{$md-css-prefix}-directions-bus:before { content: "\e530"; } +.#{$md-css-prefix}-directions-car:before { content: "\e531"; } +.#{$md-css-prefix}-directions-railway:before { content: "\e534"; } +.#{$md-css-prefix}-directions-run:before { content: "\e566"; } +.#{$md-css-prefix}-directions-subway:before { content: "\e533"; } +.#{$md-css-prefix}-directions-transit:before { content: "\e535"; } +.#{$md-css-prefix}-directions-walk:before { content: "\e536"; } +.#{$md-css-prefix}-disc-full:before { content: "\e610"; } +.#{$md-css-prefix}-dns:before { content: "\e875"; } +.#{$md-css-prefix}-do-not-disturb:before { content: "\e612"; } +.#{$md-css-prefix}-do-not-disturb-alt:before { content: "\e611"; } +.#{$md-css-prefix}-do-not-disturb-off:before { content: "\e643"; } +.#{$md-css-prefix}-do-not-disturb-on:before { content: "\e644"; } +.#{$md-css-prefix}-dock:before { content: "\e30e"; } +.#{$md-css-prefix}-domain:before { content: "\e7ee"; } +.#{$md-css-prefix}-done:before { content: "\e876"; } +.#{$md-css-prefix}-done-all:before { content: "\e877"; } +.#{$md-css-prefix}-donut-large:before { content: "\e917"; } +.#{$md-css-prefix}-donut-small:before { content: "\e918"; } +.#{$md-css-prefix}-drafts:before { content: "\e151"; } +.#{$md-css-prefix}-drag-handle:before { content: "\e25d"; } +.#{$md-css-prefix}-drive-eta:before { content: "\e613"; } +.#{$md-css-prefix}-dvr:before { content: "\e1b2"; } +.#{$md-css-prefix}-edit:before { content: "\e3c9"; } +.#{$md-css-prefix}-edit-location:before { content: "\e568"; } +.#{$md-css-prefix}-eject:before { content: "\e8fb"; } +.#{$md-css-prefix}-email:before { content: "\e0be"; } +.#{$md-css-prefix}-enhanced-encryption:before { content: "\e63f"; } +.#{$md-css-prefix}-equalizer:before { content: "\e01d"; } +.#{$md-css-prefix}-error:before { content: "\e000"; } +.#{$md-css-prefix}-error-outline:before { content: "\e001"; } +.#{$md-css-prefix}-euro-symbol:before { content: "\e926"; } +.#{$md-css-prefix}-ev-station:before { content: "\e56d"; } +.#{$md-css-prefix}-event:before { content: "\e878"; } +.#{$md-css-prefix}-event-available:before { content: "\e614"; } +.#{$md-css-prefix}-event-busy:before { content: "\e615"; } +.#{$md-css-prefix}-event-note:before { content: "\e616"; } +.#{$md-css-prefix}-event-seat:before { content: "\e903"; } +.#{$md-css-prefix}-exit-to-app:before { content: "\e879"; } +.#{$md-css-prefix}-expand-less:before { content: "\e5ce"; } +.#{$md-css-prefix}-expand-more:before { content: "\e5cf"; } +.#{$md-css-prefix}-explicit:before { content: "\e01e"; } +.#{$md-css-prefix}-explore:before { content: "\e87a"; } +.#{$md-css-prefix}-exposure:before { content: "\e3ca"; } +.#{$md-css-prefix}-exposure-neg-1:before { content: "\e3cb"; } +.#{$md-css-prefix}-exposure-neg-2:before { content: "\e3cc"; } +.#{$md-css-prefix}-exposure-plus-1:before { content: "\e3cd"; } +.#{$md-css-prefix}-exposure-plus-2:before { content: "\e3ce"; } +.#{$md-css-prefix}-exposure-zero:before { content: "\e3cf"; } +.#{$md-css-prefix}-extension:before { content: "\e87b"; } +.#{$md-css-prefix}-face:before { content: "\e87c"; } +.#{$md-css-prefix}-fast-forward:before { content: "\e01f"; } +.#{$md-css-prefix}-fast-rewind:before { content: "\e020"; } +.#{$md-css-prefix}-favorite:before { content: "\e87d"; } +.#{$md-css-prefix}-favorite-border:before { content: "\e87e"; } +.#{$md-css-prefix}-featured-play-list:before { content: "\e06d"; } +.#{$md-css-prefix}-featured-video:before { content: "\e06e"; } +.#{$md-css-prefix}-feedback:before { content: "\e87f"; } +.#{$md-css-prefix}-fiber-dvr:before { content: "\e05d"; } +.#{$md-css-prefix}-fiber-manual-record:before { content: "\e061"; } +.#{$md-css-prefix}-fiber-new:before { content: "\e05e"; } +.#{$md-css-prefix}-fiber-pin:before { content: "\e06a"; } +.#{$md-css-prefix}-fiber-smart-record:before { content: "\e062"; } +.#{$md-css-prefix}-file-download:before { content: "\e2c4"; } +.#{$md-css-prefix}-file-upload:before { content: "\e2c6"; } +.#{$md-css-prefix}-filter:before { content: "\e3d3"; } +.#{$md-css-prefix}-filter-1:before { content: "\e3d0"; } +.#{$md-css-prefix}-filter-2:before { content: "\e3d1"; } +.#{$md-css-prefix}-filter-3:before { content: "\e3d2"; } +.#{$md-css-prefix}-filter-4:before { content: "\e3d4"; } +.#{$md-css-prefix}-filter-5:before { content: "\e3d5"; } +.#{$md-css-prefix}-filter-6:before { content: "\e3d6"; } +.#{$md-css-prefix}-filter-7:before { content: "\e3d7"; } +.#{$md-css-prefix}-filter-8:before { content: "\e3d8"; } +.#{$md-css-prefix}-filter-9:before { content: "\e3d9"; } +.#{$md-css-prefix}-filter-9-plus:before { content: "\e3da"; } +.#{$md-css-prefix}-filter-b-and-w:before { content: "\e3db"; } +.#{$md-css-prefix}-filter-center-focus:before { content: "\e3dc"; } +.#{$md-css-prefix}-filter-drama:before { content: "\e3dd"; } +.#{$md-css-prefix}-filter-frames:before { content: "\e3de"; } +.#{$md-css-prefix}-filter-hdr:before { content: "\e3df"; } +.#{$md-css-prefix}-filter-list:before { content: "\e152"; } +.#{$md-css-prefix}-filter-none:before { content: "\e3e0"; } +.#{$md-css-prefix}-filter-tilt-shift:before { content: "\e3e2"; } +.#{$md-css-prefix}-filter-vintage:before { content: "\e3e3"; } +.#{$md-css-prefix}-find-in-page:before { content: "\e880"; } +.#{$md-css-prefix}-find-replace:before { content: "\e881"; } +.#{$md-css-prefix}-fingerprint:before { content: "\e90d"; } +.#{$md-css-prefix}-first-page:before { content: "\e5dc"; } +.#{$md-css-prefix}-fitness-center:before { content: "\eb43"; } +.#{$md-css-prefix}-flag:before { content: "\e153"; } +.#{$md-css-prefix}-flare:before { content: "\e3e4"; } +.#{$md-css-prefix}-flash-auto:before { content: "\e3e5"; } +.#{$md-css-prefix}-flash-off:before { content: "\e3e6"; } +.#{$md-css-prefix}-flash-on:before { content: "\e3e7"; } +.#{$md-css-prefix}-flight:before { content: "\e539"; } +.#{$md-css-prefix}-flight-land:before { content: "\e904"; } +.#{$md-css-prefix}-flight-takeoff:before { content: "\e905"; } +.#{$md-css-prefix}-flip:before { content: "\e3e8"; } +.#{$md-css-prefix}-flip-to-back:before { content: "\e882"; } +.#{$md-css-prefix}-flip-to-front:before { content: "\e883"; } +.#{$md-css-prefix}-folder:before { content: "\e2c7"; } +.#{$md-css-prefix}-folder-open:before { content: "\e2c8"; } +.#{$md-css-prefix}-folder-shared:before { content: "\e2c9"; } +.#{$md-css-prefix}-folder-special:before { content: "\e617"; } +.#{$md-css-prefix}-font-download:before { content: "\e167"; } +.#{$md-css-prefix}-format-align-center:before { content: "\e234"; } +.#{$md-css-prefix}-format-align-justify:before { content: "\e235"; } +.#{$md-css-prefix}-format-align-left:before { content: "\e236"; } +.#{$md-css-prefix}-format-align-right:before { content: "\e237"; } +.#{$md-css-prefix}-format-bold:before { content: "\e238"; } +.#{$md-css-prefix}-format-clear:before { content: "\e239"; } +.#{$md-css-prefix}-format-color-fill:before { content: "\e23a"; } +.#{$md-css-prefix}-format-color-reset:before { content: "\e23b"; } +.#{$md-css-prefix}-format-color-text:before { content: "\e23c"; } +.#{$md-css-prefix}-format-indent-decrease:before { content: "\e23d"; } +.#{$md-css-prefix}-format-indent-increase:before { content: "\e23e"; } +.#{$md-css-prefix}-format-italic:before { content: "\e23f"; } +.#{$md-css-prefix}-format-line-spacing:before { content: "\e240"; } +.#{$md-css-prefix}-format-list-bulleted:before { content: "\e241"; } +.#{$md-css-prefix}-format-list-numbered:before { content: "\e242"; } +.#{$md-css-prefix}-format-paint:before { content: "\e243"; } +.#{$md-css-prefix}-format-quote:before { content: "\e244"; } +.#{$md-css-prefix}-format-shapes:before { content: "\e25e"; } +.#{$md-css-prefix}-format-size:before { content: "\e245"; } +.#{$md-css-prefix}-format-strikethrough:before { content: "\e246"; } +.#{$md-css-prefix}-format-textdirection-l-to-r:before { content: "\e247"; } +.#{$md-css-prefix}-format-textdirection-r-to-l:before { content: "\e248"; } +.#{$md-css-prefix}-format-underlined:before { content: "\e249"; } +.#{$md-css-prefix}-forum:before { content: "\e0bf"; } +.#{$md-css-prefix}-forward:before { content: "\e154"; } +.#{$md-css-prefix}-forward-10:before { content: "\e056"; } +.#{$md-css-prefix}-forward-30:before { content: "\e057"; } +.#{$md-css-prefix}-forward-5:before { content: "\e058"; } +.#{$md-css-prefix}-free-breakfast:before { content: "\eb44"; } +.#{$md-css-prefix}-fullscreen:before { content: "\e5d0"; } +.#{$md-css-prefix}-fullscreen-exit:before { content: "\e5d1"; } +.#{$md-css-prefix}-functions:before { content: "\e24a"; } +.#{$md-css-prefix}-g-translate:before { content: "\e927"; } +.#{$md-css-prefix}-gamepad:before { content: "\e30f"; } +.#{$md-css-prefix}-games:before { content: "\e021"; } +.#{$md-css-prefix}-gavel:before { content: "\e90e"; } +.#{$md-css-prefix}-gesture:before { content: "\e155"; } +.#{$md-css-prefix}-get-app:before { content: "\e884"; } +.#{$md-css-prefix}-gif:before { content: "\e908"; } +.#{$md-css-prefix}-golf-course:before { content: "\eb45"; } +.#{$md-css-prefix}-gps-fixed:before { content: "\e1b3"; } +.#{$md-css-prefix}-gps-not-fixed:before { content: "\e1b4"; } +.#{$md-css-prefix}-gps-off:before { content: "\e1b5"; } +.#{$md-css-prefix}-grade:before { content: "\e885"; } +.#{$md-css-prefix}-gradient:before { content: "\e3e9"; } +.#{$md-css-prefix}-grain:before { content: "\e3ea"; } +.#{$md-css-prefix}-graphic-eq:before { content: "\e1b8"; } +.#{$md-css-prefix}-grid-off:before { content: "\e3eb"; } +.#{$md-css-prefix}-grid-on:before { content: "\e3ec"; } +.#{$md-css-prefix}-group:before { content: "\e7ef"; } +.#{$md-css-prefix}-group-add:before { content: "\e7f0"; } +.#{$md-css-prefix}-group-work:before { content: "\e886"; } +.#{$md-css-prefix}-hd:before { content: "\e052"; } +.#{$md-css-prefix}-hdr-off:before { content: "\e3ed"; } +.#{$md-css-prefix}-hdr-on:before { content: "\e3ee"; } +.#{$md-css-prefix}-hdr-strong:before { content: "\e3f1"; } +.#{$md-css-prefix}-hdr-weak:before { content: "\e3f2"; } +.#{$md-css-prefix}-headset:before { content: "\e310"; } +.#{$md-css-prefix}-headset-mic:before { content: "\e311"; } +.#{$md-css-prefix}-healing:before { content: "\e3f3"; } +.#{$md-css-prefix}-hearing:before { content: "\e023"; } +.#{$md-css-prefix}-help:before { content: "\e887"; } +.#{$md-css-prefix}-help-outline:before { content: "\e8fd"; } +.#{$md-css-prefix}-high-quality:before { content: "\e024"; } +.#{$md-css-prefix}-highlight:before { content: "\e25f"; } +.#{$md-css-prefix}-highlight-off:before { content: "\e888"; } +.#{$md-css-prefix}-history:before { content: "\e889"; } +.#{$md-css-prefix}-home:before { content: "\e88a"; } +.#{$md-css-prefix}-hot-tub:before { content: "\eb46"; } +.#{$md-css-prefix}-hotel:before { content: "\e53a"; } +.#{$md-css-prefix}-hourglass-empty:before { content: "\e88b"; } +.#{$md-css-prefix}-hourglass-full:before { content: "\e88c"; } +.#{$md-css-prefix}-http:before { content: "\e902"; } +.#{$md-css-prefix}-https:before { content: "\e88d"; } +.#{$md-css-prefix}-image:before { content: "\e3f4"; } +.#{$md-css-prefix}-image-aspect-ratio:before { content: "\e3f5"; } +.#{$md-css-prefix}-import-contacts:before { content: "\e0e0"; } +.#{$md-css-prefix}-import-export:before { content: "\e0c3"; } +.#{$md-css-prefix}-important-devices:before { content: "\e912"; } +.#{$md-css-prefix}-inbox:before { content: "\e156"; } +.#{$md-css-prefix}-indeterminate-check-box:before { content: "\e909"; } +.#{$md-css-prefix}-info:before { content: "\e88e"; } +.#{$md-css-prefix}-info-outline:before { content: "\e88f"; } +.#{$md-css-prefix}-input:before { content: "\e890"; } +.#{$md-css-prefix}-insert-chart:before { content: "\e24b"; } +.#{$md-css-prefix}-insert-comment:before { content: "\e24c"; } +.#{$md-css-prefix}-insert-drive-file:before { content: "\e24d"; } +.#{$md-css-prefix}-insert-emoticon:before { content: "\e24e"; } +.#{$md-css-prefix}-insert-invitation:before { content: "\e24f"; } +.#{$md-css-prefix}-insert-link:before { content: "\e250"; } +.#{$md-css-prefix}-insert-photo:before { content: "\e251"; } +.#{$md-css-prefix}-invert-colors:before { content: "\e891"; } +.#{$md-css-prefix}-invert-colors-off:before { content: "\e0c4"; } +.#{$md-css-prefix}-iso:before { content: "\e3f6"; } +.#{$md-css-prefix}-keyboard:before { content: "\e312"; } +.#{$md-css-prefix}-keyboard-arrow-down:before { content: "\e313"; } +.#{$md-css-prefix}-keyboard-arrow-left:before { content: "\e314"; } +.#{$md-css-prefix}-keyboard-arrow-right:before { content: "\e315"; } +.#{$md-css-prefix}-keyboard-arrow-up:before { content: "\e316"; } +.#{$md-css-prefix}-keyboard-backspace:before { content: "\e317"; } +.#{$md-css-prefix}-keyboard-capslock:before { content: "\e318"; } +.#{$md-css-prefix}-keyboard-hide:before { content: "\e31a"; } +.#{$md-css-prefix}-keyboard-return:before { content: "\e31b"; } +.#{$md-css-prefix}-keyboard-tab:before { content: "\e31c"; } +.#{$md-css-prefix}-keyboard-voice:before { content: "\e31d"; } +.#{$md-css-prefix}-kitchen:before { content: "\eb47"; } +.#{$md-css-prefix}-label:before { content: "\e892"; } +.#{$md-css-prefix}-label-outline:before { content: "\e893"; } +.#{$md-css-prefix}-landscape:before { content: "\e3f7"; } +.#{$md-css-prefix}-language:before { content: "\e894"; } +.#{$md-css-prefix}-laptop:before { content: "\e31e"; } +.#{$md-css-prefix}-laptop-chromebook:before { content: "\e31f"; } +.#{$md-css-prefix}-laptop-mac:before { content: "\e320"; } +.#{$md-css-prefix}-laptop-windows:before { content: "\e321"; } +.#{$md-css-prefix}-last-page:before { content: "\e5dd"; } +.#{$md-css-prefix}-launch:before { content: "\e895"; } +.#{$md-css-prefix}-layers:before { content: "\e53b"; } +.#{$md-css-prefix}-layers-clear:before { content: "\e53c"; } +.#{$md-css-prefix}-leak-add:before { content: "\e3f8"; } +.#{$md-css-prefix}-leak-remove:before { content: "\e3f9"; } +.#{$md-css-prefix}-lens:before { content: "\e3fa"; } +.#{$md-css-prefix}-library-add:before { content: "\e02e"; } +.#{$md-css-prefix}-library-books:before { content: "\e02f"; } +.#{$md-css-prefix}-library-music:before { content: "\e030"; } +.#{$md-css-prefix}-lightbulb-outline:before { content: "\e90f"; } +.#{$md-css-prefix}-line-style:before { content: "\e919"; } +.#{$md-css-prefix}-line-weight:before { content: "\e91a"; } +.#{$md-css-prefix}-linear-scale:before { content: "\e260"; } +.#{$md-css-prefix}-link:before { content: "\e157"; } +.#{$md-css-prefix}-linked-camera:before { content: "\e438"; } +.#{$md-css-prefix}-list:before { content: "\e896"; } +.#{$md-css-prefix}-live-help:before { content: "\e0c6"; } +.#{$md-css-prefix}-live-tv:before { content: "\e639"; } +.#{$md-css-prefix}-local-activity:before { content: "\e53f"; } +.#{$md-css-prefix}-local-airport:before { content: "\e53d"; } +.#{$md-css-prefix}-local-atm:before { content: "\e53e"; } +.#{$md-css-prefix}-local-bar:before { content: "\e540"; } +.#{$md-css-prefix}-local-cafe:before { content: "\e541"; } +.#{$md-css-prefix}-local-car-wash:before { content: "\e542"; } +.#{$md-css-prefix}-local-convenience-store:before { content: "\e543"; } +.#{$md-css-prefix}-local-dining:before { content: "\e556"; } +.#{$md-css-prefix}-local-drink:before { content: "\e544"; } +.#{$md-css-prefix}-local-florist:before { content: "\e545"; } +.#{$md-css-prefix}-local-gas-station:before { content: "\e546"; } +.#{$md-css-prefix}-local-grocery-store:before { content: "\e547"; } +.#{$md-css-prefix}-local-hospital:before { content: "\e548"; } +.#{$md-css-prefix}-local-hotel:before { content: "\e549"; } +.#{$md-css-prefix}-local-laundry-service:before { content: "\e54a"; } +.#{$md-css-prefix}-local-library:before { content: "\e54b"; } +.#{$md-css-prefix}-local-mall:before { content: "\e54c"; } +.#{$md-css-prefix}-local-movies:before { content: "\e54d"; } +.#{$md-css-prefix}-local-offer:before { content: "\e54e"; } +.#{$md-css-prefix}-local-parking:before { content: "\e54f"; } +.#{$md-css-prefix}-local-pharmacy:before { content: "\e550"; } +.#{$md-css-prefix}-local-phone:before { content: "\e551"; } +.#{$md-css-prefix}-local-pizza:before { content: "\e552"; } +.#{$md-css-prefix}-local-play:before { content: "\e553"; } +.#{$md-css-prefix}-local-post-office:before { content: "\e554"; } +.#{$md-css-prefix}-local-printshop:before { content: "\e555"; } +.#{$md-css-prefix}-local-see:before { content: "\e557"; } +.#{$md-css-prefix}-local-shipping:before { content: "\e558"; } +.#{$md-css-prefix}-local-taxi:before { content: "\e559"; } +.#{$md-css-prefix}-location-city:before { content: "\e7f1"; } +.#{$md-css-prefix}-location-disabled:before { content: "\e1b6"; } +.#{$md-css-prefix}-location-off:before { content: "\e0c7"; } +.#{$md-css-prefix}-location-on:before { content: "\e0c8"; } +.#{$md-css-prefix}-location-searching:before { content: "\e1b7"; } +.#{$md-css-prefix}-lock:before { content: "\e897"; } +.#{$md-css-prefix}-lock-open:before { content: "\e898"; } +.#{$md-css-prefix}-lock-outline:before { content: "\e899"; } +.#{$md-css-prefix}-looks:before { content: "\e3fc"; } +.#{$md-css-prefix}-looks-3:before { content: "\e3fb"; } +.#{$md-css-prefix}-looks-4:before { content: "\e3fd"; } +.#{$md-css-prefix}-looks-5:before { content: "\e3fe"; } +.#{$md-css-prefix}-looks-6:before { content: "\e3ff"; } +.#{$md-css-prefix}-looks-one:before { content: "\e400"; } +.#{$md-css-prefix}-looks-two:before { content: "\e401"; } +.#{$md-css-prefix}-loop:before { content: "\e028"; } +.#{$md-css-prefix}-loupe:before { content: "\e402"; } +.#{$md-css-prefix}-low-priority:before { content: "\e16d"; } +.#{$md-css-prefix}-loyalty:before { content: "\e89a"; } +.#{$md-css-prefix}-mail:before { content: "\e158"; } +.#{$md-css-prefix}-mail-outline:before { content: "\e0e1"; } +.#{$md-css-prefix}-map:before { content: "\e55b"; } +.#{$md-css-prefix}-markunread:before { content: "\e159"; } +.#{$md-css-prefix}-markunread-mailbox:before { content: "\e89b"; } +.#{$md-css-prefix}-memory:before { content: "\e322"; } +.#{$md-css-prefix}-menu:before { content: "\e5d2"; } +.#{$md-css-prefix}-merge-type:before { content: "\e252"; } +.#{$md-css-prefix}-message:before { content: "\e0c9"; } +.#{$md-css-prefix}-mic:before { content: "\e029"; } +.#{$md-css-prefix}-mic-none:before { content: "\e02a"; } +.#{$md-css-prefix}-mic-off:before { content: "\e02b"; } +.#{$md-css-prefix}-mms:before { content: "\e618"; } +.#{$md-css-prefix}-mode-comment:before { content: "\e253"; } +.#{$md-css-prefix}-mode-edit:before { content: "\e254"; } +.#{$md-css-prefix}-monetization-on:before { content: "\e263"; } +.#{$md-css-prefix}-money-off:before { content: "\e25c"; } +.#{$md-css-prefix}-monochrome-photos:before { content: "\e403"; } +.#{$md-css-prefix}-mood:before { content: "\e7f2"; } +.#{$md-css-prefix}-mood-bad:before { content: "\e7f3"; } +.#{$md-css-prefix}-more:before { content: "\e619"; } +.#{$md-css-prefix}-more-horiz:before { content: "\e5d3"; } +.#{$md-css-prefix}-more-vert:before { content: "\e5d4"; } +.#{$md-css-prefix}-motorcycle:before { content: "\e91b"; } +.#{$md-css-prefix}-mouse:before { content: "\e323"; } +.#{$md-css-prefix}-move-to-inbox:before { content: "\e168"; } +.#{$md-css-prefix}-movie:before { content: "\e02c"; } +.#{$md-css-prefix}-movie-creation:before { content: "\e404"; } +.#{$md-css-prefix}-movie-filter:before { content: "\e43a"; } +.#{$md-css-prefix}-multiline-chart:before { content: "\e6df"; } +.#{$md-css-prefix}-music-note:before { content: "\e405"; } +.#{$md-css-prefix}-music-video:before { content: "\e063"; } +.#{$md-css-prefix}-my-location:before { content: "\e55c"; } +.#{$md-css-prefix}-nature:before { content: "\e406"; } +.#{$md-css-prefix}-nature-people:before { content: "\e407"; } +.#{$md-css-prefix}-navigate-before:before { content: "\e408"; } +.#{$md-css-prefix}-navigate-next:before { content: "\e409"; } +.#{$md-css-prefix}-navigation:before { content: "\e55d"; } +.#{$md-css-prefix}-near-me:before { content: "\e569"; } +.#{$md-css-prefix}-network-cell:before { content: "\e1b9"; } +.#{$md-css-prefix}-network-check:before { content: "\e640"; } +.#{$md-css-prefix}-network-locked:before { content: "\e61a"; } +.#{$md-css-prefix}-network-wifi:before { content: "\e1ba"; } +.#{$md-css-prefix}-new-releases:before { content: "\e031"; } +.#{$md-css-prefix}-next-week:before { content: "\e16a"; } +.#{$md-css-prefix}-nfc:before { content: "\e1bb"; } +.#{$md-css-prefix}-no-encryption:before { content: "\e641"; } +.#{$md-css-prefix}-no-sim:before { content: "\e0cc"; } +.#{$md-css-prefix}-not-interested:before { content: "\e033"; } +.#{$md-css-prefix}-note:before { content: "\e06f"; } +.#{$md-css-prefix}-note-add:before { content: "\e89c"; } +.#{$md-css-prefix}-notifications:before { content: "\e7f4"; } +.#{$md-css-prefix}-notifications-active:before { content: "\e7f7"; } +.#{$md-css-prefix}-notifications-none:before { content: "\e7f5"; } +.#{$md-css-prefix}-notifications-off:before { content: "\e7f6"; } +.#{$md-css-prefix}-notifications-paused:before { content: "\e7f8"; } +.#{$md-css-prefix}-offline-pin:before { content: "\e90a"; } +.#{$md-css-prefix}-ondemand-video:before { content: "\e63a"; } +.#{$md-css-prefix}-opacity:before { content: "\e91c"; } +.#{$md-css-prefix}-open-in-browser:before { content: "\e89d"; } +.#{$md-css-prefix}-open-in-new:before { content: "\e89e"; } +.#{$md-css-prefix}-open-with:before { content: "\e89f"; } +.#{$md-css-prefix}-pages:before { content: "\e7f9"; } +.#{$md-css-prefix}-pageview:before { content: "\e8a0"; } +.#{$md-css-prefix}-palette:before { content: "\e40a"; } +.#{$md-css-prefix}-pan-tool:before { content: "\e925"; } +.#{$md-css-prefix}-panorama:before { content: "\e40b"; } +.#{$md-css-prefix}-panorama-fish-eye:before { content: "\e40c"; } +.#{$md-css-prefix}-panorama-horizontal:before { content: "\e40d"; } +.#{$md-css-prefix}-panorama-vertical:before { content: "\e40e"; } +.#{$md-css-prefix}-panorama-wide-angle:before { content: "\e40f"; } +.#{$md-css-prefix}-party-mode:before { content: "\e7fa"; } +.#{$md-css-prefix}-pause:before { content: "\e034"; } +.#{$md-css-prefix}-pause-circle-filled:before { content: "\e035"; } +.#{$md-css-prefix}-pause-circle-outline:before { content: "\e036"; } +.#{$md-css-prefix}-payment:before { content: "\e8a1"; } +.#{$md-css-prefix}-people:before { content: "\e7fb"; } +.#{$md-css-prefix}-people-outline:before { content: "\e7fc"; } +.#{$md-css-prefix}-perm-camera-mic:before { content: "\e8a2"; } +.#{$md-css-prefix}-perm-contact-calendar:before { content: "\e8a3"; } +.#{$md-css-prefix}-perm-data-setting:before { content: "\e8a4"; } +.#{$md-css-prefix}-perm-device-information:before { content: "\e8a5"; } +.#{$md-css-prefix}-perm-identity:before { content: "\e8a6"; } +.#{$md-css-prefix}-perm-media:before { content: "\e8a7"; } +.#{$md-css-prefix}-perm-phone-msg:before { content: "\e8a8"; } +.#{$md-css-prefix}-perm-scan-wifi:before { content: "\e8a9"; } +.#{$md-css-prefix}-person:before { content: "\e7fd"; } +.#{$md-css-prefix}-person-add:before { content: "\e7fe"; } +.#{$md-css-prefix}-person-outline:before { content: "\e7ff"; } +.#{$md-css-prefix}-person-pin:before { content: "\e55a"; } +.#{$md-css-prefix}-person-pin-circle:before { content: "\e56a"; } +.#{$md-css-prefix}-personal-video:before { content: "\e63b"; } +.#{$md-css-prefix}-pets:before { content: "\e91d"; } +.#{$md-css-prefix}-phone:before { content: "\e0cd"; } +.#{$md-css-prefix}-phone-android:before { content: "\e324"; } +.#{$md-css-prefix}-phone-bluetooth-speaker:before { content: "\e61b"; } +.#{$md-css-prefix}-phone-forwarded:before { content: "\e61c"; } +.#{$md-css-prefix}-phone-in-talk:before { content: "\e61d"; } +.#{$md-css-prefix}-phone-iphone:before { content: "\e325"; } +.#{$md-css-prefix}-phone-locked:before { content: "\e61e"; } +.#{$md-css-prefix}-phone-missed:before { content: "\e61f"; } +.#{$md-css-prefix}-phone-paused:before { content: "\e620"; } +.#{$md-css-prefix}-phonelink:before { content: "\e326"; } +.#{$md-css-prefix}-phonelink-erase:before { content: "\e0db"; } +.#{$md-css-prefix}-phonelink-lock:before { content: "\e0dc"; } +.#{$md-css-prefix}-phonelink-off:before { content: "\e327"; } +.#{$md-css-prefix}-phonelink-ring:before { content: "\e0dd"; } +.#{$md-css-prefix}-phonelink-setup:before { content: "\e0de"; } +.#{$md-css-prefix}-photo:before { content: "\e410"; } +.#{$md-css-prefix}-photo-album:before { content: "\e411"; } +.#{$md-css-prefix}-photo-camera:before { content: "\e412"; } +.#{$md-css-prefix}-photo-filter:before { content: "\e43b"; } +.#{$md-css-prefix}-photo-library:before { content: "\e413"; } +.#{$md-css-prefix}-photo-size-select-actual:before { content: "\e432"; } +.#{$md-css-prefix}-photo-size-select-large:before { content: "\e433"; } +.#{$md-css-prefix}-photo-size-select-small:before { content: "\e434"; } +.#{$md-css-prefix}-picture-as-pdf:before { content: "\e415"; } +.#{$md-css-prefix}-picture-in-picture:before { content: "\e8aa"; } +.#{$md-css-prefix}-picture-in-picture-alt:before { content: "\e911"; } +.#{$md-css-prefix}-pie-chart:before { content: "\e6c4"; } +.#{$md-css-prefix}-pie-chart-outlined:before { content: "\e6c5"; } +.#{$md-css-prefix}-pin-drop:before { content: "\e55e"; } +.#{$md-css-prefix}-place:before { content: "\e55f"; } +.#{$md-css-prefix}-play-arrow:before { content: "\e037"; } +.#{$md-css-prefix}-play-circle-filled:before { content: "\e038"; } +.#{$md-css-prefix}-play-circle-outline:before { content: "\e039"; } +.#{$md-css-prefix}-play-for-work:before { content: "\e906"; } +.#{$md-css-prefix}-playlist-add:before { content: "\e03b"; } +.#{$md-css-prefix}-playlist-add-check:before { content: "\e065"; } +.#{$md-css-prefix}-playlist-play:before { content: "\e05f"; } +.#{$md-css-prefix}-plus-one:before { content: "\e800"; } +.#{$md-css-prefix}-poll:before { content: "\e801"; } +.#{$md-css-prefix}-polymer:before { content: "\e8ab"; } +.#{$md-css-prefix}-pool:before { content: "\eb48"; } +.#{$md-css-prefix}-portable-wifi-off:before { content: "\e0ce"; } +.#{$md-css-prefix}-portrait:before { content: "\e416"; } +.#{$md-css-prefix}-power:before { content: "\e63c"; } +.#{$md-css-prefix}-power-input:before { content: "\e336"; } +.#{$md-css-prefix}-power-settings-new:before { content: "\e8ac"; } +.#{$md-css-prefix}-pregnant-woman:before { content: "\e91e"; } +.#{$md-css-prefix}-present-to-all:before { content: "\e0df"; } +.#{$md-css-prefix}-print:before { content: "\e8ad"; } +.#{$md-css-prefix}-priority-high:before { content: "\e645"; } +.#{$md-css-prefix}-public:before { content: "\e80b"; } +.#{$md-css-prefix}-publish:before { content: "\e255"; } +.#{$md-css-prefix}-query-builder:before { content: "\e8ae"; } +.#{$md-css-prefix}-question-answer:before { content: "\e8af"; } +.#{$md-css-prefix}-queue:before { content: "\e03c"; } +.#{$md-css-prefix}-queue-music:before { content: "\e03d"; } +.#{$md-css-prefix}-queue-play-next:before { content: "\e066"; } +.#{$md-css-prefix}-radio:before { content: "\e03e"; } +.#{$md-css-prefix}-radio-button-checked:before { content: "\e837"; } +.#{$md-css-prefix}-radio-button-unchecked:before { content: "\e836"; } +.#{$md-css-prefix}-rate-review:before { content: "\e560"; } +.#{$md-css-prefix}-receipt:before { content: "\e8b0"; } +.#{$md-css-prefix}-recent-actors:before { content: "\e03f"; } +.#{$md-css-prefix}-record-voice-over:before { content: "\e91f"; } +.#{$md-css-prefix}-redeem:before { content: "\e8b1"; } +.#{$md-css-prefix}-redo:before { content: "\e15a"; } +.#{$md-css-prefix}-refresh:before { content: "\e5d5"; } +.#{$md-css-prefix}-remove:before { content: "\e15b"; } +.#{$md-css-prefix}-remove-circle:before { content: "\e15c"; } +.#{$md-css-prefix}-remove-circle-outline:before { content: "\e15d"; } +.#{$md-css-prefix}-remove-from-queue:before { content: "\e067"; } +.#{$md-css-prefix}-remove-red-eye:before { content: "\e417"; } +.#{$md-css-prefix}-remove-shopping-cart:before { content: "\e928"; } +.#{$md-css-prefix}-reorder:before { content: "\e8fe"; } +.#{$md-css-prefix}-repeat:before { content: "\e040"; } +.#{$md-css-prefix}-repeat-one:before { content: "\e041"; } +.#{$md-css-prefix}-replay:before { content: "\e042"; } +.#{$md-css-prefix}-replay-10:before { content: "\e059"; } +.#{$md-css-prefix}-replay-30:before { content: "\e05a"; } +.#{$md-css-prefix}-replay-5:before { content: "\e05b"; } +.#{$md-css-prefix}-reply:before { content: "\e15e"; } +.#{$md-css-prefix}-reply-all:before { content: "\e15f"; } +.#{$md-css-prefix}-report:before { content: "\e160"; } +.#{$md-css-prefix}-report-problem:before { content: "\e8b2"; } +.#{$md-css-prefix}-restaurant:before { content: "\e56c"; } +.#{$md-css-prefix}-restaurant-menu:before { content: "\e561"; } +.#{$md-css-prefix}-restore:before { content: "\e8b3"; } +.#{$md-css-prefix}-restore-page:before { content: "\e929"; } +.#{$md-css-prefix}-ring-volume:before { content: "\e0d1"; } +.#{$md-css-prefix}-room:before { content: "\e8b4"; } +.#{$md-css-prefix}-room-service:before { content: "\eb49"; } +.#{$md-css-prefix}-rotate-90-degrees-ccw:before { content: "\e418"; } +.#{$md-css-prefix}-rotate-left:before { content: "\e419"; } +.#{$md-css-prefix}-rotate-right:before { content: "\e41a"; } +.#{$md-css-prefix}-rounded-corner:before { content: "\e920"; } +.#{$md-css-prefix}-router:before { content: "\e328"; } +.#{$md-css-prefix}-rowing:before { content: "\e921"; } +.#{$md-css-prefix}-rss-feed:before { content: "\e0e5"; } +.#{$md-css-prefix}-rv-hookup:before { content: "\e642"; } +.#{$md-css-prefix}-satellite:before { content: "\e562"; } +.#{$md-css-prefix}-save:before { content: "\e161"; } +.#{$md-css-prefix}-scanner:before { content: "\e329"; } +.#{$md-css-prefix}-schedule:before { content: "\e8b5"; } +.#{$md-css-prefix}-school:before { content: "\e80c"; } +.#{$md-css-prefix}-screen-lock-landscape:before { content: "\e1be"; } +.#{$md-css-prefix}-screen-lock-portrait:before { content: "\e1bf"; } +.#{$md-css-prefix}-screen-lock-rotation:before { content: "\e1c0"; } +.#{$md-css-prefix}-screen-rotation:before { content: "\e1c1"; } +.#{$md-css-prefix}-screen-share:before { content: "\e0e2"; } +.#{$md-css-prefix}-sd-card:before { content: "\e623"; } +.#{$md-css-prefix}-sd-storage:before { content: "\e1c2"; } +.#{$md-css-prefix}-search:before { content: "\e8b6"; } +.#{$md-css-prefix}-security:before { content: "\e32a"; } +.#{$md-css-prefix}-select-all:before { content: "\e162"; } +.#{$md-css-prefix}-send:before { content: "\e163"; } +.#{$md-css-prefix}-sentiment-dissatisfied:before { content: "\e811"; } +.#{$md-css-prefix}-sentiment-neutral:before { content: "\e812"; } +.#{$md-css-prefix}-sentiment-satisfied:before { content: "\e813"; } +.#{$md-css-prefix}-sentiment-very-dissatisfied:before { content: "\e814"; } +.#{$md-css-prefix}-sentiment-very-satisfied:before { content: "\e815"; } +.#{$md-css-prefix}-settings:before { content: "\e8b8"; } +.#{$md-css-prefix}-settings-applications:before { content: "\e8b9"; } +.#{$md-css-prefix}-settings-backup-restore:before { content: "\e8ba"; } +.#{$md-css-prefix}-settings-bluetooth:before { content: "\e8bb"; } +.#{$md-css-prefix}-settings-brightness:before { content: "\e8bd"; } +.#{$md-css-prefix}-settings-cell:before { content: "\e8bc"; } +.#{$md-css-prefix}-settings-ethernet:before { content: "\e8be"; } +.#{$md-css-prefix}-settings-input-antenna:before { content: "\e8bf"; } +.#{$md-css-prefix}-settings-input-component:before { content: "\e8c0"; } +.#{$md-css-prefix}-settings-input-composite:before { content: "\e8c1"; } +.#{$md-css-prefix}-settings-input-hdmi:before { content: "\e8c2"; } +.#{$md-css-prefix}-settings-input-svideo:before { content: "\e8c3"; } +.#{$md-css-prefix}-settings-overscan:before { content: "\e8c4"; } +.#{$md-css-prefix}-settings-phone:before { content: "\e8c5"; } +.#{$md-css-prefix}-settings-power:before { content: "\e8c6"; } +.#{$md-css-prefix}-settings-remote:before { content: "\e8c7"; } +.#{$md-css-prefix}-settings-system-daydream:before { content: "\e1c3"; } +.#{$md-css-prefix}-settings-voice:before { content: "\e8c8"; } +.#{$md-css-prefix}-share:before { content: "\e80d"; } +.#{$md-css-prefix}-shop:before { content: "\e8c9"; } +.#{$md-css-prefix}-shop-two:before { content: "\e8ca"; } +.#{$md-css-prefix}-shopping-basket:before { content: "\e8cb"; } +.#{$md-css-prefix}-shopping-cart:before { content: "\e8cc"; } +.#{$md-css-prefix}-short-text:before { content: "\e261"; } +.#{$md-css-prefix}-show-chart:before { content: "\e6e1"; } +.#{$md-css-prefix}-shuffle:before { content: "\e043"; } +.#{$md-css-prefix}-signal-cellular-4-bar:before { content: "\e1c8"; } +.#{$md-css-prefix}-signal-cellular-connected-no-internet-4-bar:before { content: "\e1cd"; } +.#{$md-css-prefix}-signal-cellular-no-sim:before { content: "\e1ce"; } +.#{$md-css-prefix}-signal-cellular-null:before { content: "\e1cf"; } +.#{$md-css-prefix}-signal-cellular-off:before { content: "\e1d0"; } +.#{$md-css-prefix}-signal-wifi-4-bar:before { content: "\e1d8"; } +.#{$md-css-prefix}-signal-wifi-4-bar-lock:before { content: "\e1d9"; } +.#{$md-css-prefix}-signal-wifi-off:before { content: "\e1da"; } +.#{$md-css-prefix}-sim-card:before { content: "\e32b"; } +.#{$md-css-prefix}-sim-card-alert:before { content: "\e624"; } +.#{$md-css-prefix}-skip-next:before { content: "\e044"; } +.#{$md-css-prefix}-skip-previous:before { content: "\e045"; } +.#{$md-css-prefix}-slideshow:before { content: "\e41b"; } +.#{$md-css-prefix}-slow-motion-video:before { content: "\e068"; } +.#{$md-css-prefix}-smartphone:before { content: "\e32c"; } +.#{$md-css-prefix}-smoke-free:before { content: "\eb4a"; } +.#{$md-css-prefix}-smoking-rooms:before { content: "\eb4b"; } +.#{$md-css-prefix}-sms:before { content: "\e625"; } +.#{$md-css-prefix}-sms-failed:before { content: "\e626"; } +.#{$md-css-prefix}-snooze:before { content: "\e046"; } +.#{$md-css-prefix}-sort:before { content: "\e164"; } +.#{$md-css-prefix}-sort-by-alpha:before { content: "\e053"; } +.#{$md-css-prefix}-spa:before { content: "\eb4c"; } +.#{$md-css-prefix}-space-bar:before { content: "\e256"; } +.#{$md-css-prefix}-speaker:before { content: "\e32d"; } +.#{$md-css-prefix}-speaker-group:before { content: "\e32e"; } +.#{$md-css-prefix}-speaker-notes:before { content: "\e8cd"; } +.#{$md-css-prefix}-speaker-notes-off:before { content: "\e92a"; } +.#{$md-css-prefix}-speaker-phone:before { content: "\e0d2"; } +.#{$md-css-prefix}-spellcheck:before { content: "\e8ce"; } +.#{$md-css-prefix}-star:before { content: "\e838"; } +.#{$md-css-prefix}-star-border:before { content: "\e83a"; } +.#{$md-css-prefix}-star-half:before { content: "\e839"; } +.#{$md-css-prefix}-stars:before { content: "\e8d0"; } +.#{$md-css-prefix}-stay-current-landscape:before { content: "\e0d3"; } +.#{$md-css-prefix}-stay-current-portrait:before { content: "\e0d4"; } +.#{$md-css-prefix}-stay-primary-landscape:before { content: "\e0d5"; } +.#{$md-css-prefix}-stay-primary-portrait:before { content: "\e0d6"; } +.#{$md-css-prefix}-stop:before { content: "\e047"; } +.#{$md-css-prefix}-stop-screen-share:before { content: "\e0e3"; } +.#{$md-css-prefix}-storage:before { content: "\e1db"; } +.#{$md-css-prefix}-store:before { content: "\e8d1"; } +.#{$md-css-prefix}-store-mall-directory:before { content: "\e563"; } +.#{$md-css-prefix}-straighten:before { content: "\e41c"; } +.#{$md-css-prefix}-streetview:before { content: "\e56e"; } +.#{$md-css-prefix}-strikethrough-s:before { content: "\e257"; } +.#{$md-css-prefix}-style:before { content: "\e41d"; } +.#{$md-css-prefix}-subdirectory-arrow-left:before { content: "\e5d9"; } +.#{$md-css-prefix}-subdirectory-arrow-right:before { content: "\e5da"; } +.#{$md-css-prefix}-subject:before { content: "\e8d2"; } +.#{$md-css-prefix}-subscriptions:before { content: "\e064"; } +.#{$md-css-prefix}-subtitles:before { content: "\e048"; } +.#{$md-css-prefix}-subway:before { content: "\e56f"; } +.#{$md-css-prefix}-supervisor-account:before { content: "\e8d3"; } +.#{$md-css-prefix}-surround-sound:before { content: "\e049"; } +.#{$md-css-prefix}-swap-calls:before { content: "\e0d7"; } +.#{$md-css-prefix}-swap-horiz:before { content: "\e8d4"; } +.#{$md-css-prefix}-swap-vert:before { content: "\e8d5"; } +.#{$md-css-prefix}-swap-vertical-circle:before { content: "\e8d6"; } +.#{$md-css-prefix}-switch-camera:before { content: "\e41e"; } +.#{$md-css-prefix}-switch-video:before { content: "\e41f"; } +.#{$md-css-prefix}-sync:before { content: "\e627"; } +.#{$md-css-prefix}-sync-disabled:before { content: "\e628"; } +.#{$md-css-prefix}-sync-problem:before { content: "\e629"; } +.#{$md-css-prefix}-system-update:before { content: "\e62a"; } +.#{$md-css-prefix}-system-update-alt:before { content: "\e8d7"; } +.#{$md-css-prefix}-tab:before { content: "\e8d8"; } +.#{$md-css-prefix}-tab-unselected:before { content: "\e8d9"; } +.#{$md-css-prefix}-tablet:before { content: "\e32f"; } +.#{$md-css-prefix}-tablet-android:before { content: "\e330"; } +.#{$md-css-prefix}-tablet-mac:before { content: "\e331"; } +.#{$md-css-prefix}-tag-faces:before { content: "\e420"; } +.#{$md-css-prefix}-tap-and-play:before { content: "\e62b"; } +.#{$md-css-prefix}-terrain:before { content: "\e564"; } +.#{$md-css-prefix}-text-fields:before { content: "\e262"; } +.#{$md-css-prefix}-text-format:before { content: "\e165"; } +.#{$md-css-prefix}-textsms:before { content: "\e0d8"; } +.#{$md-css-prefix}-texture:before { content: "\e421"; } +.#{$md-css-prefix}-theaters:before { content: "\e8da"; } +.#{$md-css-prefix}-thumb-down:before { content: "\e8db"; } +.#{$md-css-prefix}-thumb-up:before { content: "\e8dc"; } +.#{$md-css-prefix}-thumbs-up-down:before { content: "\e8dd"; } +.#{$md-css-prefix}-time-to-leave:before { content: "\e62c"; } +.#{$md-css-prefix}-timelapse:before { content: "\e422"; } +.#{$md-css-prefix}-timeline:before { content: "\e922"; } +.#{$md-css-prefix}-timer:before { content: "\e425"; } +.#{$md-css-prefix}-timer-10:before { content: "\e423"; } +.#{$md-css-prefix}-timer-3:before { content: "\e424"; } +.#{$md-css-prefix}-timer-off:before { content: "\e426"; } +.#{$md-css-prefix}-title:before { content: "\e264"; } +.#{$md-css-prefix}-toc:before { content: "\e8de"; } +.#{$md-css-prefix}-today:before { content: "\e8df"; } +.#{$md-css-prefix}-toll:before { content: "\e8e0"; } +.#{$md-css-prefix}-tonality:before { content: "\e427"; } +.#{$md-css-prefix}-touch-app:before { content: "\e913"; } +.#{$md-css-prefix}-toys:before { content: "\e332"; } +.#{$md-css-prefix}-track-changes:before { content: "\e8e1"; } +.#{$md-css-prefix}-traffic:before { content: "\e565"; } +.#{$md-css-prefix}-train:before { content: "\e570"; } +.#{$md-css-prefix}-tram:before { content: "\e571"; } +.#{$md-css-prefix}-transfer-within-a-station:before { content: "\e572"; } +.#{$md-css-prefix}-transform:before { content: "\e428"; } +.#{$md-css-prefix}-translate:before { content: "\e8e2"; } +.#{$md-css-prefix}-trending-down:before { content: "\e8e3"; } +.#{$md-css-prefix}-trending-flat:before { content: "\e8e4"; } +.#{$md-css-prefix}-trending-up:before { content: "\e8e5"; } +.#{$md-css-prefix}-tune:before { content: "\e429"; } +.#{$md-css-prefix}-turned-in:before { content: "\e8e6"; } +.#{$md-css-prefix}-turned-in-not:before { content: "\e8e7"; } +.#{$md-css-prefix}-tv:before { content: "\e333"; } +.#{$md-css-prefix}-unarchive:before { content: "\e169"; } +.#{$md-css-prefix}-undo:before { content: "\e166"; } +.#{$md-css-prefix}-unfold-less:before { content: "\e5d6"; } +.#{$md-css-prefix}-unfold-more:before { content: "\e5d7"; } +.#{$md-css-prefix}-update:before { content: "\e923"; } +.#{$md-css-prefix}-usb:before { content: "\e1e0"; } +.#{$md-css-prefix}-verified-user:before { content: "\e8e8"; } +.#{$md-css-prefix}-vertical-align-bottom:before { content: "\e258"; } +.#{$md-css-prefix}-vertical-align-center:before { content: "\e259"; } +.#{$md-css-prefix}-vertical-align-top:before { content: "\e25a"; } +.#{$md-css-prefix}-vibration:before { content: "\e62d"; } +.#{$md-css-prefix}-video-call:before { content: "\e070"; } +.#{$md-css-prefix}-video-label:before { content: "\e071"; } +.#{$md-css-prefix}-video-library:before { content: "\e04a"; } +.#{$md-css-prefix}-videocam:before { content: "\e04b"; } +.#{$md-css-prefix}-videocam-off:before { content: "\e04c"; } +.#{$md-css-prefix}-videogame-asset:before { content: "\e338"; } +.#{$md-css-prefix}-view-agenda:before { content: "\e8e9"; } +.#{$md-css-prefix}-view-array:before { content: "\e8ea"; } +.#{$md-css-prefix}-view-carousel:before { content: "\e8eb"; } +.#{$md-css-prefix}-view-column:before { content: "\e8ec"; } +.#{$md-css-prefix}-view-comfy:before { content: "\e42a"; } +.#{$md-css-prefix}-view-compact:before { content: "\e42b"; } +.#{$md-css-prefix}-view-day:before { content: "\e8ed"; } +.#{$md-css-prefix}-view-headline:before { content: "\e8ee"; } +.#{$md-css-prefix}-view-list:before { content: "\e8ef"; } +.#{$md-css-prefix}-view-module:before { content: "\e8f0"; } +.#{$md-css-prefix}-view-quilt:before { content: "\e8f1"; } +.#{$md-css-prefix}-view-stream:before { content: "\e8f2"; } +.#{$md-css-prefix}-view-week:before { content: "\e8f3"; } +.#{$md-css-prefix}-vignette:before { content: "\e435"; } +.#{$md-css-prefix}-visibility:before { content: "\e8f4"; } +.#{$md-css-prefix}-visibility-off:before { content: "\e8f5"; } +.#{$md-css-prefix}-voice-chat:before { content: "\e62e"; } +.#{$md-css-prefix}-voicemail:before { content: "\e0d9"; } +.#{$md-css-prefix}-volume-down:before { content: "\e04d"; } +.#{$md-css-prefix}-volume-mute:before { content: "\e04e"; } +.#{$md-css-prefix}-volume-off:before { content: "\e04f"; } +.#{$md-css-prefix}-volume-up:before { content: "\e050"; } +.#{$md-css-prefix}-vpn-key:before { content: "\e0da"; } +.#{$md-css-prefix}-vpn-lock:before { content: "\e62f"; } +.#{$md-css-prefix}-wallpaper:before { content: "\e1bc"; } +.#{$md-css-prefix}-warning:before { content: "\e002"; } +.#{$md-css-prefix}-watch:before { content: "\e334"; } +.#{$md-css-prefix}-watch-later:before { content: "\e924"; } +.#{$md-css-prefix}-wb-auto:before { content: "\e42c"; } +.#{$md-css-prefix}-wb-cloudy:before { content: "\e42d"; } +.#{$md-css-prefix}-wb-incandescent:before { content: "\e42e"; } +.#{$md-css-prefix}-wb-iridescent:before { content: "\e436"; } +.#{$md-css-prefix}-wb-sunny:before { content: "\e430"; } +.#{$md-css-prefix}-wc:before { content: "\e63d"; } +.#{$md-css-prefix}-web:before { content: "\e051"; } +.#{$md-css-prefix}-web-asset:before { content: "\e069"; } +.#{$md-css-prefix}-weekend:before { content: "\e16b"; } +.#{$md-css-prefix}-whatshot:before { content: "\e80e"; } +.#{$md-css-prefix}-widgets:before { content: "\e1bd"; } +.#{$md-css-prefix}-wifi:before { content: "\e63e"; } +.#{$md-css-prefix}-wifi-lock:before { content: "\e1e1"; } +.#{$md-css-prefix}-wifi-tethering:before { content: "\e1e2"; } +.#{$md-css-prefix}-work:before { content: "\e8f9"; } +.#{$md-css-prefix}-wrap-text:before { content: "\e25b"; } +.#{$md-css-prefix}-youtube-searched-for:before { content: "\e8fa"; } +.#{$md-css-prefix}-zoom-in:before { content: "\e8ff"; } +.#{$md-css-prefix}-zoom-out:before { content: "\e900"; } +.#{$md-css-prefix}-zoom-out-map:before { content: "\e56b"; } diff --git a/vendor/mervick/material-design-icons/scss/_larger.scss b/vendor/mervick/material-design-icons/scss/_larger.scss new file mode 100644 index 000000000..7ab8a8742 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_larger.scss @@ -0,0 +1,15 @@ +@import "variables"; + +// Icon Sizes +// ------------------------- + +/* makes the font 33% larger relative to the icon container */ +.#{$md-css-prefix}-lg, .#{$md-css-prefix}-size-lg { + font-size: (4em / 3); + line-height: (3em / 4); + vertical-align: -15%; +} +.#{$md-css-prefix}-2x, .#{$md-css-prefix}-size-2x { font-size: 2em; } +.#{$md-css-prefix}-3x, .#{$md-css-prefix}-size-3x { font-size: 3em; } +.#{$md-css-prefix}-4x, .#{$md-css-prefix}-size-4x { font-size: 4em; } +.#{$md-css-prefix}-5x, .#{$md-css-prefix}-size-5x { font-size: 5em; } diff --git a/vendor/mervick/material-design-icons/scss/_list.scss b/vendor/mervick/material-design-icons/scss/_list.scss new file mode 100644 index 000000000..9418cb1f1 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_list.scss @@ -0,0 +1,21 @@ +@import "variables"; + +// List Icons +// ------------------------- + +.#{$md-css-prefix}-ul { + padding-left: 0; + margin-left: $md-li-width; + list-style-type: none; + > li { position: relative; } +} +.#{$md-css-prefix}-li { + position: absolute; + left: -$md-li-width; + width: $md-li-width; + top: (2em / 14); + text-align: center; + &.#{$md-css-prefix}-lg { + left: -$md-li-width + (4em / 14); + } +} diff --git a/vendor/mervick/material-design-icons/scss/_mixins.scss b/vendor/mervick/material-design-icons/scss/_mixins.scss new file mode 100644 index 000000000..77ef55403 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_mixins.scss @@ -0,0 +1,16 @@ +// Mixins +// -------------------------- + +@mixin md-icon-rotate($degrees, $rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + -webkit-transform: rotate($degrees); + -ms-transform: rotate($degrees); + transform: rotate($degrees); +} + +@mixin md-icon-flip($horiz, $vert, $rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + -webkit-transform: scale($horiz, $vert); + -ms-transform: scale($horiz, $vert); + transform: scale($horiz, $vert); +} diff --git a/vendor/mervick/material-design-icons/scss/_path.scss b/vendor/mervick/material-design-icons/scss/_path.scss new file mode 100644 index 000000000..7753970d6 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_path.scss @@ -0,0 +1,18 @@ +@import "variables"; + +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: $md-font-family; + font-style: normal; + font-weight: 400; + src: url('#{$md-font-path}/MaterialIcons-Regular.eot?v=#{$md-version}'); + src: url('#{$md-font-path}/MaterialIcons-Regular.eot?v=#{$md-version}#iefix') format('embedded-opentype'), + //local('Material Icons'), + //local('MaterialIcons-Regular'), + url('#{$md-font-path}/MaterialIcons-Regular.woff2?v=#{$md-version}') format('woff2'), + url('#{$md-font-path}/MaterialIcons-Regular.woff?v=#{$md-version}') format('woff'), + url('#{$md-font-path}/MaterialIcons-Regular.ttf?v=#{$md-version}') format('truetype'), + url('#{$md-font-path}/MaterialIcons-Regular.svg?v=#{$md-version}#materialiconsregular') format('svg'); +}
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/scss/_rotated-flipped.scss b/vendor/mervick/material-design-icons/scss/_rotated-flipped.scss new file mode 100644 index 000000000..0bac9e1a8 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_rotated-flipped.scss @@ -0,0 +1,22 @@ +@import "variables"; + +// Rotated & Flipped Icons +// ------------------------- + +.#{$md-css-prefix}-rotate-90 { @include md-icon-rotate(90deg, 1); } +.#{$md-css-prefix}-rotate-180 { @include md-icon-rotate(180deg, 2); } +.#{$md-css-prefix}-rotate-270 { @include md-icon-rotate(270deg, 3); } + +.#{$md-css-prefix}-flip-horizontal { @include md-icon-flip(-1, 1, 0); } +.#{$md-css-prefix}-flip-vertical { @include md-icon-flip(1, -1, 2); } + +// Hook for IE8-9 +// ------------------------- + +:root .#{$md-css-prefix}-rotate-90, +:root .#{$md-css-prefix}-rotate-180, +:root .#{$md-css-prefix}-rotate-270, +:root .#{$md-css-prefix}-flip-horizontal, +:root .#{$md-css-prefix}-flip-vertical { + filter: none; +} diff --git a/vendor/mervick/material-design-icons/scss/_stacked.scss b/vendor/mervick/material-design-icons/scss/_stacked.scss new file mode 100644 index 000000000..ae2879c20 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_stacked.scss @@ -0,0 +1,22 @@ +@import "variables"; + +// Stacked Icons +// ------------------------- + +.#{$md-css-prefix}-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.#{$md-css-prefix}-stack-1x, .#{$md-css-prefix}-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.#{$md-css-prefix}-stack-1x { line-height: inherit; } +.#{$md-css-prefix}-stack-2x { font-size: 2em; } +.#{$md-css-prefix}-inverse { color: $md-inverse; } diff --git a/vendor/mervick/material-design-icons/scss/_variables.scss b/vendor/mervick/material-design-icons/scss/_variables.scss new file mode 100644 index 000000000..546dbe217 --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/_variables.scss @@ -0,0 +1,11 @@ +// Variables +// -------------------------- + +$md-font-family: "Material Design Icons" !default; +$md-font-path: "../fonts" !default; +$md-font-size-base: 14px !default; +$md-css-prefix: mdi !default; +$md-border-color: #eee !default; +$md-inverse: #fff !default; +$md-li-width: (30em / 14) !default; +$md-version: "2.2.1" !default;
\ No newline at end of file diff --git a/vendor/mervick/material-design-icons/scss/material-icons.scss b/vendor/mervick/material-design-icons/scss/material-icons.scss new file mode 100644 index 000000000..8a45f956e --- /dev/null +++ b/vendor/mervick/material-design-icons/scss/material-icons.scss @@ -0,0 +1,12 @@ +@import "variables"; +@import "mixins"; +@import "path"; +@import "core"; +@import "larger"; +@import "fixed-width"; +@import "list"; +@import "bordered-pulled"; +@import "animated"; +@import "rotated-flipped"; +@import "stacked"; +@import "icons"; diff --git a/vendor/paragonie/constant_time_encoding/.gitignore b/vendor/paragonie/constant_time_encoding/.gitignore new file mode 100644 index 000000000..e0caea8fc --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/.gitignore @@ -0,0 +1,2 @@ +.idea/ +vendor/
\ No newline at end of file diff --git a/vendor/paragonie/constant_time_encoding/.travis.yml b/vendor/paragonie/constant_time_encoding/.travis.yml new file mode 100644 index 000000000..117c114a1 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/.travis.yml @@ -0,0 +1,24 @@ +language: php +sudo: false + +matrix: + fast_finish: true + include: + - php: "7.1" + - php: "7.2" + - php: "7.3" + - php: "7.4" + - php: "8.0" + - php: "nightly" + allow_failures: + - php: "nightly" + - php: "7.4" + - php: "8.0" + +install: + - composer self-update + - composer update + +script: + - vendor/bin/phpunit + - vendor/bin/psalm diff --git a/vendor/paragonie/constant_time_encoding/LICENSE.txt b/vendor/paragonie/constant_time_encoding/LICENSE.txt new file mode 100644 index 000000000..f424f5ecc --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/LICENSE.txt @@ -0,0 +1,48 @@ +The MIT License (MIT) + +Copyright (c) 2016 - 2020 Paragon Initiative Enterprises + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------ +This library was based on the work of Steve "Sc00bz" Thomas. +------------------------------------------------------------------------------ + +The MIT License (MIT) + +Copyright (c) 2014 Steve Thomas + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/vendor/paragonie/constant_time_encoding/README.md b/vendor/paragonie/constant_time_encoding/README.md new file mode 100644 index 000000000..d7db2a2d0 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/README.md @@ -0,0 +1,84 @@ +# Constant-Time Encoding + +[![Build Status](https://travis-ci.org/paragonie/constant_time_encoding.svg?branch=master)](https://travis-ci.org/paragonie/constant_time_encoding) +[![Latest Stable Version](https://poser.pugx.org/paragonie/constant_time_encoding/v/stable)](https://packagist.org/packages/paragonie/constant_time_encoding) +[![Latest Unstable Version](https://poser.pugx.org/paragonie/constant_time_encoding/v/unstable)](https://packagist.org/packages/paragonie/constant_time_encoding) +[![License](https://poser.pugx.org/paragonie/constant_time_encoding/license)](https://packagist.org/packages/paragonie/constant_time_encoding) +[![Downloads](https://img.shields.io/packagist/dt/paragonie/constant_time_encoding.svg)](https://packagist.org/packages/paragonie/constant_time_encoding) + +Based on the [constant-time base64 implementation made by Steve "Sc00bz" Thomas](https://github.com/Sc00bz/ConstTimeEncoding), +this library aims to offer character encoding functions that do not leak +information about what you are encoding/decoding via processor cache +misses. Further reading on [cache-timing attacks](http://blog.ircmaxell.com/2014/11/its-all-about-time.html). + +Our fork offers the following enchancements: + +* `mbstring.func_overload` resistance +* Unit tests +* Composer- and Packagist-ready +* Base16 encoding +* Base32 encoding +* Uses `pack()` and `unpack()` instead of `chr()` and `ord()` + +## PHP Version Requirements + +Version 2 of this library should work on **PHP 7** or newer. For PHP 5 +support, see [the v1.x branch](https://github.com/paragonie/constant_time_encoding/tree/v1.x). + +If you are adding this as a dependency to a project intended to work on both PHP 5 and PHP 7, please set the required version to `^1|^2` instead of just `^1` or `^2`. + +## How to Install + +```sh +composer require paragonie/constant_time_encoding +``` + +## How to Use + +```php +use \ParagonIE\ConstantTime\Encoding; + +// possibly (if applicable): +// require 'vendor/autoload.php'; + +$data = random_bytes(32); +echo Encoding::base64Encode($data), "\n"; +echo Encoding::base32EncodeUpper($data), "\n"; +echo Encoding::base32Encode($data), "\n"; +echo Encoding::hexEncode($data), "\n"; +echo Encoding::hexEncodeUpper($data), "\n"; +``` + +Example output: + +``` +1VilPkeVqirlPifk5scbzcTTbMT2clp+Zkyv9VFFasE= +2VMKKPSHSWVCVZJ6E7SONRY3ZXCNG3GE6ZZFU7TGJSX7KUKFNLAQ==== +2vmkkpshswvcvzj6e7sonry3zxcng3ge6zzfu7tgjsx7kukfnlaq==== +d558a53e4795aa2ae53e27e4e6c71bcdc4d36cc4f6725a7e664caff551456ac1 +D558A53E4795AA2AE53E27E4E6C71BDCC4D36CC4F6725A7E664CAFF551456AC1 +``` + +If you only need a particular variant, you can just reference the +required class like so: + +```php +use \ParagonIE\ConstantTime\Base64; +use \ParagonIE\ConstantTime\Base32; + +$data = random_bytes(32); +echo Base64::encode($data), "\n"; +echo Base32::encode($data), "\n"; +``` + +Example output: + +``` +1VilPkeVqirlPifk5scbzcTTbMT2clp+Zkyv9VFFasE= +2vmkkpshswvcvzj6e7sonry3zxcng3ge6zzfu7tgjsx7kukfnlaq==== +``` + +## Support Contracts + +If your company uses this library in their products or services, you may be +interested in [purchasing a support contract from Paragon Initiative Enterprises](https://paragonie.com/enterprise). diff --git a/vendor/paragonie/constant_time_encoding/composer.json b/vendor/paragonie/constant_time_encoding/composer.json new file mode 100644 index 000000000..583fe366f --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/composer.json @@ -0,0 +1,51 @@ +{ + "name": "paragonie/constant_time_encoding", + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base64", + "encoding", + "rfc4648", + "base32", + "base16", + "hex", + "bin2hex", + "hex2bin", + "base64_encode", + "base64_decode", + "base32_encode", + "base32_decode" + ], + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "[email protected]", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "[email protected]", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "support": { + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "email": "[email protected]", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/phpunit.xml.dist b/vendor/paragonie/constant_time_encoding/phpunit.xml.dist new file mode 100644 index 000000000..4d090343e --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/phpunit.xml.dist @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnError="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> + <coverage processUncoveredFiles="true"> + <include> + <directory suffix=".php">./src</directory> + </include> + </coverage> + <testsuites> + <testsuite name="Constant Time Encoding Test Suite"> + <directory suffix="Test.php">./tests</directory> + </testsuite> + </testsuites> +</phpunit> diff --git a/vendor/paragonie/constant_time_encoding/psalm.xml b/vendor/paragonie/constant_time_encoding/psalm.xml new file mode 100644 index 000000000..0a17264b0 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/psalm.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<psalm + useDocblockTypes="true" + totallyTyped="true" +> + <projectFiles> + <directory name="src" /> + </projectFiles> +</psalm> diff --git a/vendor/paragonie/constant_time_encoding/src/Base32.php b/vendor/paragonie/constant_time_encoding/src/Base32.php new file mode 100644 index 000000000..7784bafbf --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Base32.php @@ -0,0 +1,471 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Base32 + * [A-Z][2-7] + * + * @package ParagonIE\ConstantTime + */ +abstract class Base32 implements EncoderInterface +{ + /** + * Decode a Base32-encoded string into raw binary + * + * @param string $encodedString + * @param bool $strictPadding + * @return string + */ + public static function decode(string $encodedString, bool $strictPadding = false): string + { + return static::doDecode($encodedString, false, $strictPadding); + } + + /** + * Decode an uppercase Base32-encoded string into raw binary + * + * @param string $src + * @param bool $strictPadding + * @return string + */ + public static function decodeUpper(string $src, bool $strictPadding = false): string + { + return static::doDecode($src, true, $strictPadding); + } + + /** + * Encode into Base32 (RFC 4648) + * + * @param string $src + * @return string + * @throws \TypeError + */ + public static function encode(string $src): string + { + return static::doEncode($src, false, true); + } + /** + * Encode into Base32 (RFC 4648) + * + * @param string $src + * @return string + * @throws \TypeError + */ + public static function encodeUnpadded(string $src): string + { + return static::doEncode($src, false, false); + } + + /** + * Encode into uppercase Base32 (RFC 4648) + * + * @param string $src + * @return string + * @throws \TypeError + */ + public static function encodeUpper(string $src): string + { + return static::doEncode($src, true, true); + } + + /** + * Encode into uppercase Base32 (RFC 4648) + * + * @param string $src + * @return string + * @throws \TypeError + */ + public static function encodeUpperUnpadded(string $src): string + { + return static::doEncode($src, true, false); + } + + /** + * Uses bitwise operators instead of table-lookups to turn 5-bit integers + * into 8-bit integers. + * + * @param int $src + * @return int + */ + protected static function decode5Bits(int $src): int + { + $ret = -1; + + // if ($src > 96 && $src < 123) $ret += $src - 97 + 1; // -64 + $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 96); + + // if ($src > 0x31 && $src < 0x38) $ret += $src - 24 + 1; // -23 + $ret += (((0x31 - $src) & ($src - 0x38)) >> 8) & ($src - 23); + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 5-bit integers + * into 8-bit integers. + * + * Uppercase variant. + * + * @param int $src + * @return int + */ + protected static function decode5BitsUpper(int $src): int + { + $ret = -1; + + // if ($src > 64 && $src < 91) $ret += $src - 65 + 1; // -64 + $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 64); + + // if ($src > 0x31 && $src < 0x38) $ret += $src - 24 + 1; // -23 + $ret += (((0x31 - $src) & ($src - 0x38)) >> 8) & ($src - 23); + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 5-bit integers. + * + * @param int $src + * @return string + */ + protected static function encode5Bits(int $src): string + { + $diff = 0x61; + + // if ($src > 25) $ret -= 72; + $diff -= ((25 - $src) >> 8) & 73; + + return \pack('C', $src + $diff); + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 5-bit integers. + * + * Uppercase variant. + * + * @param int $src + * @return string + */ + protected static function encode5BitsUpper(int $src): string + { + $diff = 0x41; + + // if ($src > 25) $ret -= 40; + $diff -= ((25 - $src) >> 8) & 41; + + return \pack('C', $src + $diff); + } + + + /** + * Base32 decoding + * + * @param string $src + * @param bool $upper + * @param bool $strictPadding + * @return string + * @throws \TypeError + * @psalm-suppress RedundantCondition + */ + protected static function doDecode(string $src, bool $upper = false, bool $strictPadding = false): string + { + // We do this to reduce code duplication: + $method = $upper + ? 'decode5BitsUpper' + : 'decode5Bits'; + + // Remove padding + $srcLen = Binary::safeStrlen($src); + if ($srcLen === 0) { + return ''; + } + if ($strictPadding) { + if (($srcLen & 7) === 0) { + for ($j = 0; $j < 7; ++$j) { + if ($src[$srcLen - 1] === '=') { + $srcLen--; + } else { + break; + } + } + } + if (($srcLen & 7) === 1) { + throw new \RangeException( + 'Incorrect padding' + ); + } + } else { + $src = \rtrim($src, '='); + $srcLen = Binary::safeStrlen($src); + } + + $err = 0; + $dest = ''; + // Main loop (no padding): + for ($i = 0; $i + 8 <= $srcLen; $i += 8) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 8)); + /** @var int $c0 */ + $c0 = static::$method($chunk[1]); + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + /** @var int $c2 */ + $c2 = static::$method($chunk[3]); + /** @var int $c3 */ + $c3 = static::$method($chunk[4]); + /** @var int $c4 */ + $c4 = static::$method($chunk[5]); + /** @var int $c5 */ + $c5 = static::$method($chunk[6]); + /** @var int $c6 */ + $c6 = static::$method($chunk[7]); + /** @var int $c7 */ + $c7 = static::$method($chunk[8]); + + $dest .= \pack( + 'CCCCC', + (($c0 << 3) | ($c1 >> 2) ) & 0xff, + (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, + (($c3 << 4) | ($c4 >> 1) ) & 0xff, + (($c4 << 7) | ($c5 << 2) | ($c6 >> 3)) & 0xff, + (($c6 << 5) | ($c7 ) ) & 0xff + ); + $err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5 | $c6 | $c7) >> 8; + } + // The last chunk, which may have padding: + if ($i < $srcLen) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); + /** @var int $c0 */ + $c0 = static::$method($chunk[1]); + + if ($i + 6 < $srcLen) { + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + /** @var int $c2 */ + $c2 = static::$method($chunk[3]); + /** @var int $c3 */ + $c3 = static::$method($chunk[4]); + /** @var int $c4 */ + $c4 = static::$method($chunk[5]); + /** @var int $c5 */ + $c5 = static::$method($chunk[6]); + /** @var int $c6 */ + $c6 = static::$method($chunk[7]); + + $dest .= \pack( + 'CCCC', + (($c0 << 3) | ($c1 >> 2) ) & 0xff, + (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, + (($c3 << 4) | ($c4 >> 1) ) & 0xff, + (($c4 << 7) | ($c5 << 2) | ($c6 >> 3)) & 0xff + ); + $err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5 | $c6) >> 8; + } elseif ($i + 5 < $srcLen) { + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + /** @var int $c2 */ + $c2 = static::$method($chunk[3]); + /** @var int $c3 */ + $c3 = static::$method($chunk[4]); + /** @var int $c4 */ + $c4 = static::$method($chunk[5]); + /** @var int $c5 */ + $c5 = static::$method($chunk[6]); + + $dest .= \pack( + 'CCCC', + (($c0 << 3) | ($c1 >> 2) ) & 0xff, + (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, + (($c3 << 4) | ($c4 >> 1) ) & 0xff, + (($c4 << 7) | ($c5 << 2) ) & 0xff + ); + $err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5) >> 8; + } elseif ($i + 4 < $srcLen) { + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + /** @var int $c2 */ + $c2 = static::$method($chunk[3]); + /** @var int $c3 */ + $c3 = static::$method($chunk[4]); + /** @var int $c4 */ + $c4 = static::$method($chunk[5]); + + $dest .= \pack( + 'CCC', + (($c0 << 3) | ($c1 >> 2) ) & 0xff, + (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, + (($c3 << 4) | ($c4 >> 1) ) & 0xff + ); + $err |= ($c0 | $c1 | $c2 | $c3 | $c4) >> 8; + } elseif ($i + 3 < $srcLen) { + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + /** @var int $c2 */ + $c2 = static::$method($chunk[3]); + /** @var int $c3 */ + $c3 = static::$method($chunk[4]); + + $dest .= \pack( + 'CC', + (($c0 << 3) | ($c1 >> 2) ) & 0xff, + (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff + ); + $err |= ($c0 | $c1 | $c2 | $c3) >> 8; + } elseif ($i + 2 < $srcLen) { + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + /** @var int $c2 */ + $c2 = static::$method($chunk[3]); + + $dest .= \pack( + 'CC', + (($c0 << 3) | ($c1 >> 2) ) & 0xff, + (($c1 << 6) | ($c2 << 1) ) & 0xff + ); + $err |= ($c0 | $c1 | $c2) >> 8; + } elseif ($i + 1 < $srcLen) { + /** @var int $c1 */ + $c1 = static::$method($chunk[2]); + + $dest .= \pack( + 'C', + (($c0 << 3) | ($c1 >> 2) ) & 0xff + ); + $err |= ($c0 | $c1) >> 8; + } else { + $dest .= \pack( + 'C', + (($c0 << 3) ) & 0xff + ); + $err |= ($c0) >> 8; + } + } + /** @var bool $check */ + $check = ($err === 0); + if (!$check) { + throw new \RangeException( + 'Base32::doDecode() only expects characters in the correct base32 alphabet' + ); + } + return $dest; + } + + /** + * Base32 Encoding + * + * @param string $src + * @param bool $upper + * @param bool $pad + * @return string + * @throws \TypeError + */ + protected static function doEncode(string $src, bool $upper = false, $pad = true): string + { + // We do this to reduce code duplication: + $method = $upper + ? 'encode5BitsUpper' + : 'encode5Bits'; + + $dest = ''; + $srcLen = Binary::safeStrlen($src); + + // Main loop (no padding): + for ($i = 0; $i + 5 <= $srcLen; $i += 5) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 5)); + $b0 = $chunk[1]; + $b1 = $chunk[2]; + $b2 = $chunk[3]; + $b3 = $chunk[4]; + $b4 = $chunk[5]; + $dest .= + static::$method( ($b0 >> 3) & 31) . + static::$method((($b0 << 2) | ($b1 >> 6)) & 31) . + static::$method((($b1 >> 1) ) & 31) . + static::$method((($b1 << 4) | ($b2 >> 4)) & 31) . + static::$method((($b2 << 1) | ($b3 >> 7)) & 31) . + static::$method((($b3 >> 2) ) & 31) . + static::$method((($b3 << 3) | ($b4 >> 5)) & 31) . + static::$method( $b4 & 31); + } + // The last chunk, which may have padding: + if ($i < $srcLen) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); + $b0 = $chunk[1]; + if ($i + 3 < $srcLen) { + $b1 = $chunk[2]; + $b2 = $chunk[3]; + $b3 = $chunk[4]; + $dest .= + static::$method( ($b0 >> 3) & 31) . + static::$method((($b0 << 2) | ($b1 >> 6)) & 31) . + static::$method((($b1 >> 1) ) & 31) . + static::$method((($b1 << 4) | ($b2 >> 4)) & 31) . + static::$method((($b2 << 1) | ($b3 >> 7)) & 31) . + static::$method((($b3 >> 2) ) & 31) . + static::$method((($b3 << 3) ) & 31); + if ($pad) { + $dest .= '='; + } + } elseif ($i + 2 < $srcLen) { + $b1 = $chunk[2]; + $b2 = $chunk[3]; + $dest .= + static::$method( ($b0 >> 3) & 31) . + static::$method((($b0 << 2) | ($b1 >> 6)) & 31) . + static::$method((($b1 >> 1) ) & 31) . + static::$method((($b1 << 4) | ($b2 >> 4)) & 31) . + static::$method((($b2 << 1) ) & 31); + if ($pad) { + $dest .= '==='; + } + } elseif ($i + 1 < $srcLen) { + $b1 = $chunk[2]; + $dest .= + static::$method( ($b0 >> 3) & 31) . + static::$method((($b0 << 2) | ($b1 >> 6)) & 31) . + static::$method((($b1 >> 1) ) & 31) . + static::$method((($b1 << 4) ) & 31); + if ($pad) { + $dest .= '===='; + } + } else { + $dest .= + static::$method( ($b0 >> 3) & 31) . + static::$method( ($b0 << 2) & 31); + if ($pad) { + $dest .= '======'; + } + } + } + return $dest; + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/Base32Hex.php b/vendor/paragonie/constant_time_encoding/src/Base32Hex.php new file mode 100644 index 000000000..68fdad52c --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Base32Hex.php @@ -0,0 +1,111 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Base32Hex + * [0-9][A-V] + * + * @package ParagonIE\ConstantTime + */ +abstract class Base32Hex extends Base32 +{ + /** + * Uses bitwise operators instead of table-lookups to turn 5-bit integers + * into 8-bit integers. + * + * @param int $src + * @return int + */ + protected static function decode5Bits(int $src): int + { + $ret = -1; + + // if ($src > 0x30 && $src < 0x3a) ret += $src - 0x2e + 1; // -47 + $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src - 47); + + // if ($src > 0x60 && $src < 0x77) ret += $src - 0x61 + 10 + 1; // -86 + $ret += (((0x60 - $src) & ($src - 0x77)) >> 8) & ($src - 86); + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 5-bit integers + * into 8-bit integers. + * + * @param int $src + * @return int + */ + protected static function decode5BitsUpper(int $src): int + { + $ret = -1; + + // if ($src > 0x30 && $src < 0x3a) ret += $src - 0x2e + 1; // -47 + $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src - 47); + + // if ($src > 0x40 && $src < 0x57) ret += $src - 0x41 + 10 + 1; // -54 + $ret += (((0x40 - $src) & ($src - 0x57)) >> 8) & ($src - 54); + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 5-bit integers. + * + * @param int $src + * @return string + */ + protected static function encode5Bits(int $src): string + { + $src += 0x30; + + // if ($src > 0x39) $src += 0x61 - 0x3a; // 39 + $src += ((0x39 - $src) >> 8) & 39; + + return \pack('C', $src); + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 5-bit integers. + * + * Uppercase variant. + * + * @param int $src + * @return string + */ + protected static function encode5BitsUpper(int $src): string + { + $src += 0x30; + + // if ($src > 0x39) $src += 0x41 - 0x3a; // 7 + $src += ((0x39 - $src) >> 8) & 7; + + return \pack('C', $src); + } +}
\ No newline at end of file diff --git a/vendor/paragonie/constant_time_encoding/src/Base64.php b/vendor/paragonie/constant_time_encoding/src/Base64.php new file mode 100644 index 000000000..4739e4895 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Base64.php @@ -0,0 +1,271 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Base64 + * [A-Z][a-z][0-9]+/ + * + * @package ParagonIE\ConstantTime + */ +abstract class Base64 implements EncoderInterface +{ + /** + * Encode into Base64 + * + * Base64 character set "[A-Z][a-z][0-9]+/" + * + * @param string $src + * @return string + * @throws \TypeError + */ + public static function encode(string $src): string + { + return static::doEncode($src, true); + } + + /** + * Encode into Base64, no = padding + * + * Base64 character set "[A-Z][a-z][0-9]+/" + * + * @param string $src + * @return string + * @throws \TypeError + */ + public static function encodeUnpadded(string $src): string + { + return static::doEncode($src, false); + } + + /** + * @param string $src + * @param bool $pad Include = padding? + * @return string + * @throws \TypeError + */ + protected static function doEncode(string $src, bool $pad = true): string + { + $dest = ''; + $srcLen = Binary::safeStrlen($src); + // Main loop (no padding): + for ($i = 0; $i + 3 <= $srcLen; $i += 3) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 3)); + $b0 = $chunk[1]; + $b1 = $chunk[2]; + $b2 = $chunk[3]; + + $dest .= + static::encode6Bits( $b0 >> 2 ) . + static::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . + static::encode6Bits((($b1 << 2) | ($b2 >> 6)) & 63) . + static::encode6Bits( $b2 & 63); + } + // The last chunk, which may have padding: + if ($i < $srcLen) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); + $b0 = $chunk[1]; + if ($i + 1 < $srcLen) { + $b1 = $chunk[2]; + $dest .= + static::encode6Bits($b0 >> 2) . + static::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . + static::encode6Bits(($b1 << 2) & 63); + if ($pad) { + $dest .= '='; + } + } else { + $dest .= + static::encode6Bits( $b0 >> 2) . + static::encode6Bits(($b0 << 4) & 63); + if ($pad) { + $dest .= '=='; + } + } + } + return $dest; + } + + /** + * decode from base64 into binary + * + * Base64 character set "./[A-Z][a-z][0-9]" + * + * @param string $encodedString + * @param bool $strictPadding + * @return string + * @throws \RangeException + * @throws \TypeError + * @psalm-suppress RedundantCondition + */ + public static function decode(string $encodedString, bool $strictPadding = false): string + { + // Remove padding + $srcLen = Binary::safeStrlen($encodedString); + if ($srcLen === 0) { + return ''; + } + + if ($strictPadding) { + if (($srcLen & 3) === 0) { + if ($encodedString[$srcLen - 1] === '=') { + $srcLen--; + if ($encodedString[$srcLen - 1] === '=') { + $srcLen--; + } + } + } + if (($srcLen & 3) === 1) { + throw new \RangeException( + 'Incorrect padding' + ); + } + if ($encodedString[$srcLen - 1] === '=') { + throw new \RangeException( + 'Incorrect padding' + ); + } + } else { + $encodedString = \rtrim($encodedString, '='); + $srcLen = Binary::safeStrlen($encodedString); + } + + $err = 0; + $dest = ''; + // Main loop (no padding): + for ($i = 0; $i + 4 <= $srcLen; $i += 4) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($encodedString, $i, 4)); + $c0 = static::decode6Bits($chunk[1]); + $c1 = static::decode6Bits($chunk[2]); + $c2 = static::decode6Bits($chunk[3]); + $c3 = static::decode6Bits($chunk[4]); + + $dest .= \pack( + 'CCC', + ((($c0 << 2) | ($c1 >> 4)) & 0xff), + ((($c1 << 4) | ($c2 >> 2)) & 0xff), + ((($c2 << 6) | $c3 ) & 0xff) + ); + $err |= ($c0 | $c1 | $c2 | $c3) >> 8; + } + // The last chunk, which may have padding: + if ($i < $srcLen) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', Binary::safeSubstr($encodedString, $i, $srcLen - $i)); + $c0 = static::decode6Bits($chunk[1]); + + if ($i + 2 < $srcLen) { + $c1 = static::decode6Bits($chunk[2]); + $c2 = static::decode6Bits($chunk[3]); + $dest .= \pack( + 'CC', + ((($c0 << 2) | ($c1 >> 4)) & 0xff), + ((($c1 << 4) | ($c2 >> 2)) & 0xff) + ); + $err |= ($c0 | $c1 | $c2) >> 8; + } elseif ($i + 1 < $srcLen) { + $c1 = static::decode6Bits($chunk[2]); + $dest .= \pack( + 'C', + ((($c0 << 2) | ($c1 >> 4)) & 0xff) + ); + $err |= ($c0 | $c1) >> 8; + } elseif ($i < $srcLen && $strictPadding) { + $err |= 1; + } + } + /** @var bool $check */ + $check = ($err === 0); + if (!$check) { + throw new \RangeException( + 'Base64::decode() only expects characters in the correct base64 alphabet' + ); + } + return $dest; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 6-bit integers + * into 8-bit integers. + * + * Base64 character set: + * [A-Z] [a-z] [0-9] + / + * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f + * + * @param int $src + * @return int + */ + protected static function decode6Bits(int $src): int + { + $ret = -1; + + // if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64 + $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 64); + + // if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70 + $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 70); + + // if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5 + $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src + 5); + + // if ($src == 0x2b) $ret += 62 + 1; + $ret += (((0x2a - $src) & ($src - 0x2c)) >> 8) & 63; + + // if ($src == 0x2f) ret += 63 + 1; + $ret += (((0x2e - $src) & ($src - 0x30)) >> 8) & 64; + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 6-bit integers. + * + * @param int $src + * @return string + */ + protected static function encode6Bits(int $src): string + { + $diff = 0x41; + + // if ($src > 25) $diff += 0x61 - 0x41 - 26; // 6 + $diff += ((25 - $src) >> 8) & 6; + + // if ($src > 51) $diff += 0x30 - 0x61 - 26; // -75 + $diff -= ((51 - $src) >> 8) & 75; + + // if ($src > 61) $diff += 0x2b - 0x30 - 10; // -15 + $diff -= ((61 - $src) >> 8) & 15; + + // if ($src > 62) $diff += 0x2f - 0x2b - 1; // 3 + $diff += ((62 - $src) >> 8) & 3; + + return \pack('C', $src + $diff); + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php b/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php new file mode 100644 index 000000000..8ad2e2bf1 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php @@ -0,0 +1,88 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Base64DotSlash + * ./[A-Z][a-z][0-9] + * + * @package ParagonIE\ConstantTime + */ +abstract class Base64DotSlash extends Base64 +{ + /** + * Uses bitwise operators instead of table-lookups to turn 6-bit integers + * into 8-bit integers. + * + * Base64 character set: + * ./ [A-Z] [a-z] [0-9] + * 0x2e-0x2f, 0x41-0x5a, 0x61-0x7a, 0x30-0x39 + * + * @param int $src + * @return int + */ + protected static function decode6Bits(int $src): int + { + $ret = -1; + + // if ($src > 0x2d && $src < 0x30) ret += $src - 0x2e + 1; // -45 + $ret += (((0x2d - $src) & ($src - 0x30)) >> 8) & ($src - 45); + + // if ($src > 0x40 && $src < 0x5b) ret += $src - 0x41 + 2 + 1; // -62 + $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 62); + + // if ($src > 0x60 && $src < 0x7b) ret += $src - 0x61 + 28 + 1; // -68 + $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 68); + + // if ($src > 0x2f && $src < 0x3a) ret += $src - 0x30 + 54 + 1; // 7 + $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src + 7); + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 6-bit integers. + * + * @param int $src + * @return string + */ + protected static function encode6Bits(int $src): string + { + $src += 0x2e; + + // if ($src > 0x2f) $src += 0x41 - 0x30; // 17 + $src += ((0x2f - $src) >> 8) & 17; + + // if ($src > 0x5a) $src += 0x61 - 0x5b; // 6 + $src += ((0x5a - $src) >> 8) & 6; + + // if ($src > 0x7a) $src += 0x30 - 0x7b; // -75 + $src -= ((0x7a - $src) >> 8) & 75; + + return \pack('C', $src); + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php b/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php new file mode 100644 index 000000000..dd1459e85 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php @@ -0,0 +1,82 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Base64DotSlashOrdered + * ./[0-9][A-Z][a-z] + * + * @package ParagonIE\ConstantTime + */ +abstract class Base64DotSlashOrdered extends Base64 +{ + /** + * Uses bitwise operators instead of table-lookups to turn 6-bit integers + * into 8-bit integers. + * + * Base64 character set: + * [.-9] [A-Z] [a-z] + * 0x2e-0x39, 0x41-0x5a, 0x61-0x7a + * + * @param int $src + * @return int + */ + protected static function decode6Bits(int $src): int + { + $ret = -1; + + // if ($src > 0x2d && $src < 0x3a) ret += $src - 0x2e + 1; // -45 + $ret += (((0x2d - $src) & ($src - 0x3a)) >> 8) & ($src - 45); + + // if ($src > 0x40 && $src < 0x5b) ret += $src - 0x41 + 12 + 1; // -52 + $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 52); + + // if ($src > 0x60 && $src < 0x7b) ret += $src - 0x61 + 38 + 1; // -58 + $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 58); + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 6-bit integers. + * + * @param int $src + * @return string + */ + protected static function encode6Bits(int $src): string + { + $src += 0x2e; + + // if ($src > 0x39) $src += 0x41 - 0x3a; // 7 + $src += ((0x39 - $src) >> 8) & 7; + + // if ($src > 0x5a) $src += 0x61 - 0x5b; // 6 + $src += ((0x5a - $src) >> 8) & 6; + + return \pack('C', $src); + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php b/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php new file mode 100644 index 000000000..1a4107527 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php @@ -0,0 +1,95 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Base64UrlSafe + * [A-Z][a-z][0-9]\-_ + * + * @package ParagonIE\ConstantTime + */ +abstract class Base64UrlSafe extends Base64 +{ + + /** + * Uses bitwise operators instead of table-lookups to turn 6-bit integers + * into 8-bit integers. + * + * Base64 character set: + * [A-Z] [a-z] [0-9] - _ + * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2d, 0x5f + * + * @param int $src + * @return int + */ + protected static function decode6Bits(int $src): int + { + $ret = -1; + + // if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64 + $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 64); + + // if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70 + $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 70); + + // if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5 + $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src + 5); + + // if ($src == 0x2c) $ret += 62 + 1; + $ret += (((0x2c - $src) & ($src - 0x2e)) >> 8) & 63; + + // if ($src == 0x5f) ret += 63 + 1; + $ret += (((0x5e - $src) & ($src - 0x60)) >> 8) & 64; + + return $ret; + } + + /** + * Uses bitwise operators instead of table-lookups to turn 8-bit integers + * into 6-bit integers. + * + * @param int $src + * @return string + */ + protected static function encode6Bits(int $src): string + { + $diff = 0x41; + + // if ($src > 25) $diff += 0x61 - 0x41 - 26; // 6 + $diff += ((25 - $src) >> 8) & 6; + + // if ($src > 51) $diff += 0x30 - 0x61 - 26; // -75 + $diff -= ((51 - $src) >> 8) & 75; + + // if ($src > 61) $diff += 0x2d - 0x30 - 10; // -13 + $diff -= ((61 - $src) >> 8) & 13; + + // if ($src > 62) $diff += 0x5f - 0x2b - 1; // 3 + $diff += ((62 - $src) >> 8) & 49; + + return \pack('C', $src + $diff); + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/Binary.php b/vendor/paragonie/constant_time_encoding/src/Binary.php new file mode 100644 index 000000000..38dbc4e66 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Binary.php @@ -0,0 +1,85 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Binary + * + * Binary string operators that don't choke on + * mbstring.func_overload + * + * @package ParagonIE\ConstantTime + */ +abstract class Binary +{ + /** + * Safe string length + * + * @ref mbstring.func_overload + * + * @param string $str + * @return int + */ + public static function safeStrlen(string $str): int + { + if (\function_exists('mb_strlen')) { + return (int) \mb_strlen($str, '8bit'); + } else { + return \strlen($str); + } + } + + /** + * Safe substring + * + * @ref mbstring.func_overload + * + * @staticvar boolean $exists + * @param string $str + * @param int $start + * @param int $length + * @return string + * @throws \TypeError + */ + public static function safeSubstr( + string $str, + int $start = 0, + $length = null + ): string { + if ($length === 0) { + return ''; + } + if (\function_exists('mb_substr')) { + return \mb_substr($str, $start, $length, '8bit'); + } + // Unlike mb_substr(), substr() doesn't accept NULL for length + if ($length !== null) { + return \substr($str, $start, $length); + } else { + return \substr($str, $start); + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php b/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php new file mode 100644 index 000000000..7aeee55a8 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php @@ -0,0 +1,52 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Interface EncoderInterface + * @package ParagonIE\ConstantTime + */ +interface EncoderInterface +{ + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks + * + * @param string $binString (raw binary) + * @return string + */ + public static function encode(string $binString): string; + + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks + * + * @param string $encodedString + * @param bool $strictPadding Error on invalid padding + * @return string (raw binary) + */ + public static function decode(string $encodedString, bool $strictPadding = false): string; +} diff --git a/vendor/paragonie/constant_time_encoding/src/Encoding.php b/vendor/paragonie/constant_time_encoding/src/Encoding.php new file mode 100644 index 000000000..896a66841 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Encoding.php @@ -0,0 +1,260 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Encoding + * @package ParagonIE\ConstantTime + */ +abstract class Encoding +{ + /** + * RFC 4648 Base32 encoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32Encode(string $str): string + { + return Base32::encode($str); + } + + /** + * RFC 4648 Base32 encoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32EncodeUpper(string $str): string + { + return Base32::encodeUpper($str); + } + + /** + * RFC 4648 Base32 decoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32Decode(string $str): string + { + return Base32::decode($str); + } + + /** + * RFC 4648 Base32 decoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32DecodeUpper(string $str): string + { + return Base32::decodeUpper($str); + } + + /** + * RFC 4648 Base32 encoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32HexEncode(string $str): string + { + return Base32Hex::encode($str); + } + + /** + * RFC 4648 Base32Hex encoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32HexEncodeUpper(string $str): string + { + return Base32Hex::encodeUpper($str); + } + + /** + * RFC 4648 Base32Hex decoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32HexDecode(string $str): string + { + return Base32Hex::decode($str); + } + + /** + * RFC 4648 Base32Hex decoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32HexDecodeUpper(string $str): string + { + return Base32Hex::decodeUpper($str); + } + + /** + * RFC 4648 Base64 encoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64Encode(string $str): string + { + return Base64::encode($str); + } + + /** + * RFC 4648 Base64 decoding + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64Decode(string $str): string + { + return Base64::decode($str); + } + + /** + * Encode into Base64 + * + * Base64 character set "./[A-Z][a-z][0-9]" + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64EncodeDotSlash(string $str): string + { + return Base64DotSlash::encode($str); + } + + /** + * Decode from base64 to raw binary + * + * Base64 character set "./[A-Z][a-z][0-9]" + * + * @param string $str + * @return string + * @throws \RangeException + * @throws \TypeError + */ + public static function base64DecodeDotSlash(string $str): string + { + return Base64DotSlash::decode($str); + } + + /** + * Encode into Base64 + * + * Base64 character set "[.-9][A-Z][a-z]" or "./[0-9][A-Z][a-z]" + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64EncodeDotSlashOrdered(string $str): string + { + return Base64DotSlashOrdered::encode($str); + } + + /** + * Decode from base64 to raw binary + * + * Base64 character set "[.-9][A-Z][a-z]" or "./[0-9][A-Z][a-z]" + * + * @param string $str + * @return string + * @throws \RangeException + * @throws \TypeError + */ + public static function base64DecodeDotSlashOrdered(string $str): string + { + return Base64DotSlashOrdered::decode($str); + } + + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks + * + * @param string $bin_string (raw binary) + * @return string + * @throws \TypeError + */ + public static function hexEncode(string $bin_string): string + { + return Hex::encode($bin_string); + } + + /** + * Convert a hexadecimal string into a binary string without cache-timing + * leaks + * + * @param string $hex_string + * @return string (raw binary) + * @throws \RangeException + */ + public static function hexDecode(string $hex_string): string + { + return Hex::decode($hex_string); + } + + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks + * + * @param string $bin_string (raw binary) + * @return string + * @throws \TypeError + */ + public static function hexEncodeUpper(string $bin_string): string + { + return Hex::encodeUpper($bin_string); + } + + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks + * + * @param string $bin_string (raw binary) + * @return string + */ + public static function hexDecodeUpper(string $bin_string): string + { + return Hex::decode($bin_string); + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/Hex.php b/vendor/paragonie/constant_time_encoding/src/Hex.php new file mode 100644 index 000000000..b1b05a098 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/Hex.php @@ -0,0 +1,159 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class Hex + * @package ParagonIE\ConstantTime + */ +abstract class Hex implements EncoderInterface +{ + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks + * + * @param string $binString (raw binary) + * @return string + * @throws \TypeError + */ + public static function encode(string $binString): string + { + /** @var string $hex */ + $hex = ''; + $len = Binary::safeStrlen($binString); + for ($i = 0; $i < $len; ++$i) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C', Binary::safeSubstr($binString, $i, 1)); + /** @var int $c */ + $c = $chunk[1] & 0xf; + /** @var int $b */ + $b = $chunk[1] >> 4; + + $hex .= pack( + 'CC', + (87 + $b + ((($b - 10) >> 8) & ~38)), + (87 + $c + ((($c - 10) >> 8) & ~38)) + ); + } + return $hex; + } + + /** + * Convert a binary string into a hexadecimal string without cache-timing + * leaks, returning uppercase letters (as per RFC 4648) + * + * @param string $binString (raw binary) + * @return string + * @throws \TypeError + */ + public static function encodeUpper(string $binString): string + { + /** @var string $hex */ + $hex = ''; + /** @var int $len */ + $len = Binary::safeStrlen($binString); + + for ($i = 0; $i < $len; ++$i) { + /** @var array<int, int> $chunk */ + $chunk = \unpack('C', Binary::safeSubstr($binString, $i, 2)); + /** @var int $c */ + $c = $chunk[1] & 0xf; + /** @var int $b */ + $b = $chunk[1] >> 4; + + $hex .= pack( + 'CC', + (55 + $b + ((($b - 10) >> 8) & ~6)), + (55 + $c + ((($c - 10) >> 8) & ~6)) + ); + } + return $hex; + } + + /** + * Convert a hexadecimal string into a binary string without cache-timing + * leaks + * + * @param string $encodedString + * @param bool $strictPadding + * @return string (raw binary) + * @throws \RangeException + */ + public static function decode(string $encodedString, bool $strictPadding = false): string + { + /** @var int $hex_pos */ + $hex_pos = 0; + /** @var string $bin */ + $bin = ''; + /** @var int $c_acc */ + $c_acc = 0; + /** @var int $hex_len */ + $hex_len = Binary::safeStrlen($encodedString); + /** @var int $state */ + $state = 0; + if (($hex_len & 1) !== 0) { + if ($strictPadding) { + throw new \RangeException( + 'Expected an even number of hexadecimal characters' + ); + } else { + $encodedString = '0' . $encodedString; + ++$hex_len; + } + } + + /** @var array<int, int> $chunk */ + $chunk = \unpack('C*', $encodedString); + while ($hex_pos < $hex_len) { + ++$hex_pos; + /** @var int $c */ + $c = $chunk[$hex_pos]; + /** @var int $c_num */ + $c_num = $c ^ 48; + /** @var int $c_num0 */ + $c_num0 = ($c_num - 10) >> 8; + /** @var int $c_alpha */ + $c_alpha = ($c & ~32) - 55; + /** @var int $c_alpha0 */ + $c_alpha0 = (($c_alpha - 10) ^ ($c_alpha - 16)) >> 8; + + if (($c_num0 | $c_alpha0) === 0) { + throw new \RangeException( + 'Expected hexadecimal character' + ); + } + /** @var int $c_val */ + $c_val = ($c_num0 & $c_num) | ($c_alpha & $c_alpha0); + if ($state === 0) { + $c_acc = $c_val * 16; + } else { + $bin .= \pack('C', $c_acc | $c_val); + } + $state ^= 1; + } + return $bin; + } +} diff --git a/vendor/paragonie/constant_time_encoding/src/RFC4648.php b/vendor/paragonie/constant_time_encoding/src/RFC4648.php new file mode 100644 index 000000000..492cad00e --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/src/RFC4648.php @@ -0,0 +1,175 @@ +<?php +declare(strict_types=1); +namespace ParagonIE\ConstantTime; + +/** + * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises. + * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Class RFC4648 + * + * This class conforms strictly to the RFC + * + * @package ParagonIE\ConstantTime + */ +abstract class RFC4648 +{ + /** + * RFC 4648 Base64 encoding + * + * "foo" -> "Zm9v" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64Encode(string $str): string + { + return Base64::encode($str); + } + + /** + * RFC 4648 Base64 decoding + * + * "Zm9v" -> "foo" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64Decode(string $str): string + { + return Base64::decode($str, true); + } + + /** + * RFC 4648 Base64 (URL Safe) encoding + * + * "foo" -> "Zm9v" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64UrlSafeEncode(string $str): string + { + return Base64UrlSafe::encode($str); + } + + /** + * RFC 4648 Base64 (URL Safe) decoding + * + * "Zm9v" -> "foo" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base64UrlSafeDecode(string $str): string + { + return Base64UrlSafe::decode($str, true); + } + + /** + * RFC 4648 Base32 encoding + * + * "foo" -> "MZXW6===" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32Encode(string $str): string + { + return Base32::encodeUpper($str); + } + + /** + * RFC 4648 Base32 encoding + * + * "MZXW6===" -> "foo" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32Decode(string $str): string + { + return Base32::decodeUpper($str, true); + } + + /** + * RFC 4648 Base32-Hex encoding + * + * "foo" -> "CPNMU===" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32HexEncode(string $str): string + { + return Base32::encodeUpper($str); + } + + /** + * RFC 4648 Base32-Hex decoding + * + * "CPNMU===" -> "foo" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base32HexDecode(string $str): string + { + return Base32::decodeUpper($str, true); + } + + /** + * RFC 4648 Base16 decoding + * + * "foo" -> "666F6F" + * + * @param string $str + * @return string + * @throws \TypeError + */ + public static function base16Encode(string $str): string + { + return Hex::encodeUpper($str); + } + + /** + * RFC 4648 Base16 decoding + * + * "666F6F" -> "foo" + * + * @param string $str + * @return string + */ + public static function base16Decode(string $str): string + { + return Hex::decode($str, true); + } +}
\ No newline at end of file diff --git a/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php b/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php new file mode 100644 index 000000000..ed19f336f --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php @@ -0,0 +1,49 @@ +<?php +use \ParagonIE\ConstantTime\Base32Hex; + +class Base32HexTest extends PHPUnit\Framework\TestCase +{ + /** + * @covers Base32Hex::encode() + * @covers Base32Hex::decode() + * @covers Base32Hex::encodeUpper() + * @covers Base32Hex::decodeUpper() + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Base32Hex::encode($random); + $this->assertSame( + $random, + Base32Hex::decode($enc) + ); + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base32Hex::encodeUnpadded($random) + ); + $this->assertSame( + $random, + Base32Hex::decode($unpadded) + ); + + $enc = Base32Hex::encodeUpper($random); + $this->assertSame( + $random, + Base32Hex::decodeUpper($enc) + ); $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base32Hex::encodeUpperUnpadded($random) + ); + $this->assertSame( + $random, + Base32Hex::decodeUpper($unpadded) + ); + } + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/Base32Test.php b/vendor/paragonie/constant_time_encoding/tests/Base32Test.php new file mode 100644 index 000000000..65e8e7c56 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base32Test.php @@ -0,0 +1,50 @@ +<?php +use \ParagonIE\ConstantTime\Base32; + +class Base32Test extends PHPUnit\Framework\TestCase +{ + /** + * @covers Base32::encode() + * @covers Base32::decode() + * @covers Base32::encodeUpper() + * @covers Base32::decodeUpper() + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Base32::encode($random); + $this->assertSame( + $random, + Base32::decode($enc) + ); + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base32::encodeUnpadded($random) + ); + $this->assertSame( + $random, + Base32::decode($unpadded) + ); + + $enc = Base32::encodeUpper($random); + $this->assertSame( + $random, + Base32::decodeUpper($enc) + ); + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base32::encodeUpperUnpadded($random) + ); + $this->assertSame( + $random, + Base32::decodeUpper($unpadded) + ); + } + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php b/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php new file mode 100644 index 000000000..f7dc828b1 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php @@ -0,0 +1,34 @@ +<?php +use \ParagonIE\ConstantTime\Base64DotSlashOrdered; + +class Base64DotSlashOrderedTest extends PHPUnit\Framework\TestCase +{ + /** + * @covers Base64DotSlashOrdered::encode() + * @covers Base64DotSlashOrdered::decode() + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Base64DotSlashOrdered::encode($random); + $this->assertSame( + $random, + Base64DotSlashOrdered::decode($enc) + ); + + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $random, + Base64DotSlashOrdered::decode($unpadded) + ); + $this->assertSame( + $random, + Base64DotSlashOrdered::decode($unpadded) + ); + } + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php b/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php new file mode 100644 index 000000000..257a3d549 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php @@ -0,0 +1,34 @@ +<?php +use \ParagonIE\ConstantTime\Base64DotSlash; + +class Base64DotSlashTest extends PHPUnit\Framework\TestCase +{ + /** + * @covers Base64DotSlash::encode() + * @covers Base64DotSlash::decode() + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Base64DotSlash::encode($random); + $this->assertSame( + $random, + Base64DotSlash::decode($enc) + ); + + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $random, + Base64DotSlash::decode($unpadded) + ); + $this->assertSame( + $random, + Base64DotSlash::decode($unpadded) + ); + } + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64Test.php b/vendor/paragonie/constant_time_encoding/tests/Base64Test.php new file mode 100644 index 000000000..16ab47da0 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base64Test.php @@ -0,0 +1,79 @@ +<?php +use \ParagonIE\ConstantTime\Base64; + +class Base64Test extends PHPUnit\Framework\TestCase +{ + /** + * @covers Base64::encode() + * @covers Base64::decode() + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Base64::encode($random); + $this->assertSame( + $random, + Base64::decode($enc) + ); + $this->assertSame( + \base64_encode($random), + $enc + ); + + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $random, + Base64::decode($unpadded) + ); + $this->assertSame( + $random, + Base64::decode($unpadded) + ); + } + } + $str = 'MIIFzzCCBLegAwIBAgIDAfdlMA0GCSqGSIb3DQEBBQUAMHMxCzAJBgNVBAYTAlBM' . + 'MSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMSQwIgYDVQQ' . + 'DDBtDT1BFIFNaQUZJUiAtIEt3YWxpZmlrb3dhbnkxFDASBgNVBAUTC05yIHdwaXN1Oi' . + 'A2MB4XDTExMTEwOTA2MDAwMFoXDTEzMTEwOTA2MDAwMFowgdkxCzAJBgNVBAYTAlBMM' . + 'RwwGgYDVQQKDBNVcnrEhWQgTWlhc3RhIEdkeW5pMRswGQYDVQQFExJQRVNFTDogNjEw' . + 'NjA2MDMxMTgxGTAXBgNVBAMMEEplcnp5IFByemV3b3Jza2kxTzBNBgNVBBAwRgwiQWw' . + 'uIE1hcnN6YcWCa2EgUGnFgnN1ZHNraWVnbyA1Mi81NAwNODEtMzgyIEdkeW5pYQwGUG' . + '9sc2thDAlwb21vcnNraWUxDjAMBgNVBCoMBUplcnp5MRMwEQYDVQQEDApQcnpld29yc' . + '2tpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMm5vjGqHPthJCMqKpqssSISRo' . + 's0PYDTcEQzyyurfX67EJWKtZj6HNwuDMEGJ02iBNZfjUl7r8dIi28bSKhNlsfycXZKY' . + 'RcIjp0+r5RqtR2auo9GQ6veKb61DEAGIqaR+uLLcJVTHCu0w9oXLGbRlGth5eNoj03C' . + 'xXVAH2IfhbNwIDAQABo4IChzCCAoMwDAYDVR0TAQH/BAIwADCCAUgGA1UdIAEB/wSCA' . + 'TwwggE4MIIBNAYJKoRoAYb3IwEBMIIBJTCB3QYIKwYBBQUHAgIwgdAMgc1EZWtsYXJh' . + 'Y2phIHRhIGplc3Qgb8Wbd2lhZGN6ZW5pZW0gd3lkYXdjeSwgxbxlIHRlbiBjZXJ0eWZ' . + 'pa2F0IHpvc3RhxYIgd3lkYW55IGpha28gY2VydHlmaWthdCBrd2FsaWZpa293YW55IH' . + 'pnb2RuaWUgeiB3eW1hZ2FuaWFtaSB1c3Rhd3kgbyBwb2RwaXNpZSBlbGVrdHJvbmlje' . + 'm55bSBvcmF6IHRvd2FyenlzesSFY3ltaSBqZWogcm96cG9yesSFZHplbmlhbWkuMEMG' . + 'CCsGAQUFBwIBFjdodHRwOi8vd3d3Lmtpci5jb20ucGwvY2VydHlmaWthY2phX2tsdWN' . + '6eS9wb2xpdHlrYS5odG1sMAkGA1UdCQQCMAAwIQYDVR0RBBowGIEWai5wcnpld29yc2' . + 'tpQGdkeW5pYS5wbDAOBgNVHQ8BAf8EBAMCBkAwgZ4GA1UdIwSBljCBk4AU3TGldJXip' . + 'N4oGS3ZYmnBDMFs8gKhd6R1MHMxCzAJBgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dh' . + 'IEl6YmEgUm96bGljemVuaW93YSBTLkEuMSQwIgYDVQQDDBtDT1BFIFNaQUZJUiAtIEt' . + '3YWxpZmlrb3dhbnkxFDASBgNVBAUTC05yIHdwaXN1OiA2ggJb9jBIBgNVHR8EQTA/MD' . + '2gO6A5hjdodHRwOi8vd3d3Lmtpci5jb20ucGwvY2VydHlmaWthY2phX2tsdWN6eS9DU' . + 'kxfT1pLMzIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQBYPIqnAreyeql7/opJjcar/qWZ' . + 'y9ruhB2q0lZFsJOhwgMnbQXzp/4vv93YJqcHGAXdHP6EO8FQX47mjo2ZKQmi+cIHJHL' . + 'ONdX/3Im+M17V0iNAh7Z1lOSfTRT+iiwe/F8phcEaD5q2RmvYusR7zXZq/cLL0If0hX' . + 'oPZ/EHQxjN8pxzxiUx6bJAgturnIMEfRNesxwghdr1dkUjOhGLf3kHVzgM6j3VAM7oF' . + 'mMUb5y5s96Bzl10DodWitjOEH0vvnIcsppSxH1C1dCAi0o9f/1y2XuLNhBNHMAyTqpY' . + 'PX8Yvav1c+Z50OMaSXHAnTa20zv8UtiHbaAhwlifCelUMj93S'; + + try { + Base64::decode($str, true); + $this->fail('Strict padding not enforced'); + } catch (\Exception $ex) { + + $this->assertSame( + Base64::decode($str), + \base64_decode($str) + ); + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php b/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php new file mode 100644 index 000000000..136ed611c --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php @@ -0,0 +1,58 @@ +<?php + +use ParagonIE\ConstantTime\Base64UrlSafe; +use ParagonIE\ConstantTime\Binary; + +/** + * Class Base64UrlSafeTest + */ +class Base64UrlSafeTest extends PHPUnit\Framework\TestCase +{ + /** + * @covers Base64UrlSafe::encode() + * @covers Base64UrlSafe::decode() + * + * @throws Exception + * @throws TypeError + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Base64UrlSafe::encode($random); + $this->assertSame( + $random, + Base64UrlSafe::decode($enc) + ); + $this->assertSame( + \strtr(\base64_encode($random), '+/', '-_'), + $enc + ); + + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base64UrlSafe::encodeUnpadded($random) + ); + $this->assertSame( + $random, + Base64UrlSafe::decode($unpadded) + ); + } + } + + $random = \random_bytes(1 << 20); + $enc = Base64UrlSafe::encode($random); + $this->assertTrue(Binary::safeStrlen($enc) > 65536); + $this->assertSame( + $random, + Base64UrlSafe::decode($enc) + ); + $this->assertSame( + \strtr(\base64_encode($random), '+/', '-_'), + $enc + ); + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php b/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php new file mode 100644 index 000000000..6f774d8c0 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php @@ -0,0 +1,307 @@ +<?php +use \ParagonIE\ConstantTime\Base32; +use \ParagonIE\ConstantTime\Base32Hex; +use \ParagonIE\ConstantTime\Base64; +use \ParagonIE\ConstantTime\Base64DotSlash; +use \ParagonIE\ConstantTime\Base64DotSlashOrdered; +use \ParagonIE\ConstantTime\Base64UrlSafe; +use \ParagonIE\ConstantTime\Encoding; +use \ParagonIE\ConstantTime\Hex; + +class EncodingTest extends PHPUnit\Framework\TestCase +{ + public function testBase32Encode() + { + $this->assertSame( + Encoding::base32Encode("\x00"), + 'aa======' + ); + $this->assertSame( + Encoding::base32Encode("\x00\x00"), + 'aaaa====' + ); + $this->assertSame( + Encoding::base32Encode("\x00\x00\x00"), + 'aaaaa===' + ); + $this->assertSame( + Encoding::base32Encode("\x00\x00\x00\x00"), + 'aaaaaaa=' + ); + $this->assertSame( + Encoding::base32Encode("\x00\x00\x00\x00\x00"), + 'aaaaaaaa' + ); + $this->assertSame( + Encoding::base32Encode("\x00\x00\x0F\xFF\xFF"), + 'aaaa7777' + ); + $this->assertSame( + Encoding::base32Encode("\xFF\xFF\xF0\x00\x00"), + '7777aaaa' + ); + + $this->assertSame( + Encoding::base32Encode("\xce\x73\x9c\xe7\x39"), + 'zzzzzzzz' + ); + $this->assertSame( + Encoding::base32Encode("\xd6\xb5\xad\x6b\x5a"), + '22222222' + ); + $this->assertSame( + Base32::encodeUpper("\x00"), + 'AA======' + ); + $this->assertSame( + Base32::encodeUpper("\x00\x00"), + 'AAAA====' + ); + $this->assertSame( + Base32::encodeUpper("\x00\x00\x00"), + 'AAAAA===' + ); + $this->assertSame( + Base32::encodeUpper("\x00\x00\x00\x00"), + 'AAAAAAA=' + ); + $this->assertSame( + Base32::encodeUpper("\x00\x00\x00\x00\x00"), + 'AAAAAAAA' + ); + $this->assertSame( + Base32::encodeUpper("\x00\x00\x0F\xFF\xFF"), + 'AAAA7777' + ); + $this->assertSame( + Base32::encodeUpper("\xFF\xFF\xF0\x00\x00"), + '7777AAAA' + ); + + $this->assertSame( + Base32::encodeUpper("\xce\x73\x9c\xe7\x39"), + 'ZZZZZZZZ' + ); + $this->assertSame( + Base32::encodeUpper("\xd6\xb5\xad\x6b\x5a"), + '22222222' + ); + } + + public function testBase32Hex() + { + $this->assertSame( + Base32Hex::encode("\x00"), + '00======' + ); + $this->assertSame( + Base32Hex::encode("\x00\x00"), + '0000====' + ); + $this->assertSame( + Base32Hex::encode("\x00\x00\x00"), + '00000===' + ); + $this->assertSame( + Base32Hex::encode("\x00\x00\x00\x00"), + '0000000=' + ); + $this->assertSame( + Base32Hex::encode("\x00\x00\x00\x00\x00"), + '00000000' + ); + $this->assertSame( + Base32Hex::encode("\x00\x00\x0F\xFF\xFF"), + '0000vvvv' + ); + $this->assertSame( + Base32Hex::encode("\xFF\xFF\xF0\x00\x00"), + 'vvvv0000' + ); + + + } + + /** + * Based on test vectors from RFC 4648 + */ + public function testBase32Decode() + { + $this->assertSame( + "\x00\x00\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaaaaa======') + ); + $this->assertSame( + "\x00\x00\x00\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaaaaaaa====') + ); + $this->assertSame( + "\x00\x00\x00\x00\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaaaaaaaa===') + ); + $this->assertSame( + "\x00\x00\x00\x00\x00\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaaaaaaaaaa=') + ); + $this->assertSame( + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaaaaaaaaaaa') + ); + $this->assertSame( + "\x00", + Encoding::base32Decode('aa======') + ); + $this->assertSame( + "\x00\x00", + Encoding::base32Decode('aaaa====') + ); + $this->assertSame( + "\x00\x00\x00", + Encoding::base32Decode('aaaaa===') + ); + $this->assertSame( + "\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaa=') + ); + $this->assertSame( + "\x00\x00\x00\x00\x00", + Encoding::base32Decode('aaaaaaaa') + ); + $this->assertSame( + "\x00\x00\x0F\xFF\xFF", + Encoding::base32Decode('aaaa7777') + ); + $this->assertSame( + "\xFF\xFF\xF0\x00\x00", + Encoding::base32Decode('7777aaaa') + ); + $this->assertSame( + "\xce\x73\x9c\xe7\x39", + Encoding::base32Decode('zzzzzzzz') + ); + $this->assertSame( + "\xd6\xb5\xad\x6b\x5a", + Encoding::base32Decode('22222222') + ); + $this->assertSame( + 'foobar', + Encoding::base32Decode('mzxw6ytboi======') + ); + + $rand = random_bytes(9); + $enc = Encoding::base32Encode($rand); + + $this->assertSame( + Encoding::base32Encode($rand), + Encoding::base32Encode(Encoding::base32Decode($enc)) + ); + $this->assertSame( + $rand, + Encoding::base32Decode($enc) + ); + } + + /** + * @covers Encoding::hexDecode() + * @covers Encoding::hexEncode() + * @covers Encoding::base32Decode() + * @covers Encoding::base32Encode() + * @covers Encoding::base64Decode() + * @covers Encoding::base64Encode() + * @covers Encoding::base64DotSlashDecode() + * @covers Encoding::base64DotSlashEncode() + * @covers Encoding::base64DotSlashOrderedDecode() + * @covers Encoding::base64DotSlashOrderedEncode() + */ + public function testBasicEncoding() + { + // Re-run the test at least 3 times for each length + for ($j = 0; $j < 3; ++$j) { + for ($i = 1; $i < 84; ++$i) { + $rand = random_bytes($i); + $enc = Encoding::hexEncode($rand); + $this->assertSame( + \bin2hex($rand), + $enc, + "Hex Encoding - Length: " . $i + ); + $this->assertSame( + $rand, + Encoding::hexDecode($enc), + "Hex Encoding - Length: " . $i + ); + + // Uppercase variant: + $enc = Hex::encodeUpper($rand); + $this->assertSame( + \strtoupper(\bin2hex($rand)), + $enc, + "Hex Encoding - Length: " . $i + ); + $this->assertSame( + $rand, + Hex::decode($enc), + "HexUpper Encoding - Length: " . $i + ); + + $enc = Encoding::base32Encode($rand); + $this->assertSame( + $rand, + Encoding::base32Decode($enc), + "Base32 Encoding - Length: " . $i + ); + + $enc = Encoding::base32EncodeUpper($rand); + $this->assertSame( + $rand, + Encoding::base32DecodeUpper($enc), + "Base32Upper Encoding - Length: " . $i + ); + + $enc = Encoding::base32HexEncode($rand); + $this->assertSame( + bin2hex($rand), + bin2hex(Encoding::base32HexDecode($enc)), + "Base32Hex Encoding - Length: " . $i + ); + + $enc = Encoding::base32HexEncodeUpper($rand); + $this->assertSame( + bin2hex($rand), + bin2hex(Encoding::base32HexDecodeUpper($enc)), + "Base32HexUpper Encoding - Length: " . $i + ); + + $enc = Encoding::base64Encode($rand); + $this->assertSame( + $rand, + Encoding::base64Decode($enc), + "Base64 Encoding - Length: " . $i + ); + + $enc = Encoding::base64EncodeDotSlash($rand); + $this->assertSame( + $rand, + Encoding::base64DecodeDotSlash($enc), + "Base64 DotSlash Encoding - Length: " . $i + ); + $enc = Encoding::base64EncodeDotSlashOrdered($rand); + $this->assertSame( + $rand, + Encoding::base64DecodeDotSlashOrdered($enc), + "Base64 Ordered DotSlash Encoding - Length: " . $i + ); + + $enc = Base64UrlSafe::encode($rand); + $this->assertSame( + \strtr(\base64_encode($rand), '+/', '-_'), + $enc + ); + $this->assertSame( + $rand, + Base64UrlSafe::decode($enc) + ); + } + } + } +}
\ No newline at end of file diff --git a/vendor/paragonie/constant_time_encoding/tests/HexTest.php b/vendor/paragonie/constant_time_encoding/tests/HexTest.php new file mode 100644 index 000000000..5c31f6d15 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/HexTest.php @@ -0,0 +1,39 @@ +<?php +use \ParagonIE\ConstantTime\Hex; + +class HexTest extends PHPUnit\Framework\TestCase +{ + /** + * @covers Hex::encode() + * @covers Hex::decode() + * @covers Hex::encodeUpper() + */ + public function testRandom() + { + for ($i = 1; $i < 32; ++$i) { + for ($j = 0; $j < 50; ++$j) { + $random = \random_bytes($i); + + $enc = Hex::encode($random); + $this->assertSame( + $random, + Hex::decode($enc) + ); + $this->assertSame( + \bin2hex($random), + $enc + ); + + $enc = Hex::encodeUpper($random); + $this->assertSame( + $random, + Hex::decode($enc) + ); + $this->assertSame( + \strtoupper(\bin2hex($random)), + $enc + ); + } + } + } +} diff --git a/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php b/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php new file mode 100644 index 000000000..a6653de88 --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php @@ -0,0 +1,84 @@ +<?php +use \ParagonIE\ConstantTime\Base32; +use \ParagonIE\ConstantTime\Base32Hex; +use \ParagonIE\ConstantTime\Base64; +use \ParagonIE\ConstantTime\Base64DotSlash; +use \ParagonIE\ConstantTime\Base64DotSlashOrdered; +use \ParagonIE\ConstantTime\Encoding; +use \ParagonIE\ConstantTime\Hex; + +/** + * Class RFC4648Test + * + * @ref https://tools.ietf.org/html/rfc4648#section-10 + */ +class RFC4648Test extends PHPUnit\Framework\TestCase +{ + public function testVectorBase64() + { + $this->assertSame(Base64::encode(''), ''); + $this->assertSame(Base64::encode('f'), 'Zg=='); + $this->assertSame(Base64::encode('fo'), 'Zm8='); + $this->assertSame(Base64::encode('foo'), 'Zm9v'); + $this->assertSame(Base64::encode('foob'), 'Zm9vYg=='); + $this->assertSame(Base64::encode('fooba'), 'Zm9vYmE='); + $this->assertSame(Base64::encode('foobar'), 'Zm9vYmFy'); + } + + public function testVectorBase32() + { + $this->assertSame(Base32::encode(''), ''); + $this->assertSame(Base32::encode('f'), 'my======'); + $this->assertSame(Base32::encode('fo'), 'mzxq===='); + $this->assertSame(Base32::encode('foo'), 'mzxw6==='); + $this->assertSame(Base32::encode('foob'), 'mzxw6yq='); + $this->assertSame(Base32::encode('fooba'), 'mzxw6ytb'); + $this->assertSame(Base32::encode('foobar'), 'mzxw6ytboi======'); + + $this->assertSame(Base32::encodeUpper(''), ''); + $this->assertSame(Base32::encodeUpper('f'), 'MY======'); + $this->assertSame(Base32::encodeUpper('fo'), 'MZXQ===='); + $this->assertSame(Base32::encodeUpper('foo'), 'MZXW6==='); + $this->assertSame(Base32::encodeUpper('foob'), 'MZXW6YQ='); + $this->assertSame(Base32::encodeUpper('fooba'), 'MZXW6YTB'); + $this->assertSame(Base32::encodeUpper('foobar'), 'MZXW6YTBOI======'); + } + + public function testVectorBase32Hex() + { + $this->assertSame(Base32Hex::encode(''), ''); + $this->assertSame(Base32Hex::encode('f'), 'co======'); + $this->assertSame(Base32Hex::encode('fo'), 'cpng===='); + $this->assertSame(Base32Hex::encode('foo'), 'cpnmu==='); + $this->assertSame(Base32Hex::encode('foob'), 'cpnmuog='); + $this->assertSame(Base32Hex::encode('fooba'), 'cpnmuoj1'); + $this->assertSame(Base32Hex::encode('foobar'), 'cpnmuoj1e8======'); + + $this->assertSame(Base32Hex::encodeUpper(''), ''); + $this->assertSame(Base32Hex::encodeUpper('f'), 'CO======'); + $this->assertSame(Base32Hex::encodeUpper('fo'), 'CPNG===='); + $this->assertSame(Base32Hex::encodeUpper('foo'), 'CPNMU==='); + $this->assertSame(Base32Hex::encodeUpper('foob'), 'CPNMUOG='); + $this->assertSame(Base32Hex::encodeUpper('fooba'), 'CPNMUOJ1'); + $this->assertSame(Base32Hex::encodeUpper('foobar'), 'CPNMUOJ1E8======'); + } + + public function testVectorBase16() + { + $this->assertSame(Hex::encode(''), ''); + $this->assertSame(Hex::encode('f'), '66'); + $this->assertSame(Hex::encode('fo'), '666f'); + $this->assertSame(Hex::encode('foo'), '666f6f'); + $this->assertSame(Hex::encode('foob'), '666f6f62'); + $this->assertSame(Hex::encode('fooba'), '666f6f6261'); + $this->assertSame(Hex::encode('foobar'), '666f6f626172'); + + $this->assertSame(Hex::encodeUpper(''), ''); + $this->assertSame(Hex::encodeUpper('f'), '66'); + $this->assertSame(Hex::encodeUpper('fo'), '666F'); + $this->assertSame(Hex::encodeUpper('foo'), '666F6F'); + $this->assertSame(Hex::encodeUpper('foob'), '666F6F62'); + $this->assertSame(Hex::encodeUpper('fooba'), '666F6F6261'); + $this->assertSame(Hex::encodeUpper('foobar'), '666F6F626172'); + } +} diff --git a/vendor/spomky-labs/otphp/.github/CONTRIBUTING.md b/vendor/spomky-labs/otphp/.github/CONTRIBUTING.md new file mode 100644 index 000000000..871735ad1 --- /dev/null +++ b/vendor/spomky-labs/otphp/.github/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing + +First of all, **thank you** for contributing. + +Bugs or feature requests can be posted online on the GitHub issues section of the project. + +Few rules to ease code reviews and merges: + +- You MUST follow the [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/) and [PSR-4](http://www.php-fig.org/psr/psr-4/) coding standards. +- You MUST run the test suite. +- You MUST write (or update) unit tests when bugs are fixed or features are added. +- You SHOULD write documentation. + +We use [Git-Flow](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) to automate our git branching workflow. + +To contribute use [Pull Requests](https://help.github.com/articles/using-pull-requests), please, write commit messages that make sense, and rebase your branch before submitting your PR. + +May be asked to squash your commits too. This is used to "clean" your Pull Request before merging it, avoiding commits such as fix tests, fix 2, fix 3, etc. + +Run test suite +------------ + +* install composer: `curl -s http://getcomposer.org/installer | php` +* install dependencies: `php composer.phar install` +* run tests: `vendor/bin/phpunit` diff --git a/vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md b/vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..2ceb8da6a --- /dev/null +++ b/vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,16 @@ +| Q | A +| -------------------- | ----- +| Bug report? | yes/no +| Feature request? | yes/no +| BC Break report? | yes/no +| RFC? / Specification | yes/no +| Library version | x.y(.z) + +<!-- +Fill in this template according to your issue. +Otherwise, replace this comment by the description of your issue. + +Please consider the following requirements +* You MUST never send security issues here. If you think that your issue is a security one then contact Spomky in private at https://gitter.im/Spomky/ +* You should not post many lines of source code or console logs. Small inputs (approx 5 lines) are acceptable otherwize you should use a third party service (e.g. Pastebin, Chop...). +--> diff --git a/vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md b/vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..acd0be9fc --- /dev/null +++ b/vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +| Q | A +| ------------- | --- +| Branch? | master +| Bug fix? | yes/no +| New feature? | yes/no +| BC breaks? | yes/no +| Deprecations? | yes/no +| Tests pass? | yes/no +| Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> +| License | MIT +| Tests added | <!--highly recommended for new features--> +| Doc PR | <!--highly recommended for new features--> + +<!-- +Fill in this template according to the PR you're about to submit. +Replace this comment by a description of what your PR is solving. + +Please consider the following requirement: +* Modification of existing tests should be avoided unless deemed necessary. +* You MUST never open a PR related to a security issue. Contact Spomky in private at https://gitter.im/Spomky/ +--> diff --git a/vendor/spomky-labs/otphp/.github/stale.yml b/vendor/spomky-labs/otphp/.github/stale.yml new file mode 100644 index 000000000..dc90e5a1c --- /dev/null +++ b/vendor/spomky-labs/otphp/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/vendor/spomky-labs/otphp/.php_cs.dist b/vendor/spomky-labs/otphp/.php_cs.dist new file mode 100644 index 000000000..7410dff65 --- /dev/null +++ b/vendor/spomky-labs/otphp/.php_cs.dist @@ -0,0 +1,61 @@ +<?php + +$header = 'The MIT License (MIT) + +Copyright (c) 2014-2019 Spomky-Labs + +This software may be modified and distributed under the terms +of the MIT license. See the LICENSE file for details.'; + +$finder = PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') +; + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR1' => true, + '@PSR2' => true, + '@Symfony' => true, + '@DoctrineAnnotation' => true, + '@PHP70Migration' => true, + '@PHP71Migration' => true, + 'strict_param' => true, + 'strict_comparison' => true, + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'ordered_imports' => true, + 'protected_to_private' => true, + 'declare_strict_types' => true, + 'native_function_invocation' => [ + 'include' => ['@compiler_optimized'], + 'scope' => 'namespaced', + ], + 'mb_str_functions' => true, + 'method_chaining_indentation' => true, + 'linebreak_after_opening_tag' => true, + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, + 'compact_nullable_typehint' => true, + 'no_superfluous_phpdoc_tags' => true, + 'no_superfluous_elseif' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_order' => true, + 'pow_to_exponentiation' => true, + 'simplified_null_return' => true, + 'header_comment' => [ + 'header' => $header, + ], + 'align_multiline_comment' => [ + 'comment_type' => 'all_multiline', + ], + 'php_unit_test_annotation' => [ + 'case' => 'snake', + 'style' => 'annotation', + ], + 'php_unit_test_case_static_method_calls' => true, + ]) + ->setRiskyAllowed(true) + ->setUsingCache(true) + ->setFinder($finder) + ; diff --git a/vendor/spomky-labs/otphp/CODE_OF_CONDUCT.md b/vendor/spomky-labs/otphp/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..4ec12c72b --- /dev/null +++ b/vendor/spomky-labs/otphp/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/spomky-labs/otphp/LICENSE b/vendor/spomky-labs/otphp/LICENSE new file mode 100644 index 000000000..e6a673e34 --- /dev/null +++ b/vendor/spomky-labs/otphp/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016 Florent Morselli + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/spomky-labs/otphp/composer.json b/vendor/spomky-labs/otphp/composer.json new file mode 100644 index 000000000..8979e8f06 --- /dev/null +++ b/vendor/spomky-labs/otphp/composer.json @@ -0,0 +1,50 @@ +{ + "name": "spomky-labs/otphp", + "type": "library", + "description": "A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm) and compatible with Google Authenticator", + "license": "MIT", + "keywords": ["otp", "hotp", "totp", "RFC 4226", "RFC 6238", "Google Authenticator", "FreeOTP"], + "homepage": "https://github.com/Spomky-Labs/otphp", + "authors": [ + { + "name": "Florent Morselli", + "homepage": "https://github.com/Spomky" + }, + { + "name": "All contributors", + "homepage": "https://github.com/Spomky-Labs/otphp/contributors" + } + ], + "require": { + "php": "^7.2|^8.0", + "ext-mbstring": "*", + "paragonie/constant_time_encoding": "^2.0", + "beberlei/assert": "^3.0", + "thecodingmachine/safe": "^0.1.14|^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.0", + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-beberlei-assert": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "thecodingmachine/phpstan-safe-rule": "^1.0" + }, + "suggest": { + }, + "autoload": { + "psr-4": { "OTPHP\\": "src/" } + }, + "autoload-dev": { + "psr-4": { "OTPHP\\Test\\": "tests/" } + }, + "extra": { + "branch-alias": { + "v10.0": "10.0.x-dev", + "v9.0": "9.0.x-dev", + "v8.3": "8.3.x-dev" + } + } +} diff --git a/vendor/spomky-labs/otphp/phpstan.neon b/vendor/spomky-labs/otphp/phpstan.neon new file mode 100644 index 000000000..c9be89623 --- /dev/null +++ b/vendor/spomky-labs/otphp/phpstan.neon @@ -0,0 +1,13 @@ +parameters: + level: 7 + paths: + - src + - tests + ignoreErrors: + - '#Variable property access on \$this\(OTPHP\\OTP\)\.#' +includes: + - vendor/phpstan/phpstan-strict-rules/rules.neon + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-deprecation-rules/rules.neon + - vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon + - vendor/phpstan/phpstan-beberlei-assert/extension.neon diff --git a/vendor/spomky-labs/otphp/src/Factory.php b/vendor/spomky-labs/otphp/src/Factory.php new file mode 100644 index 000000000..70df63945 --- /dev/null +++ b/vendor/spomky-labs/otphp/src/Factory.php @@ -0,0 +1,115 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +use Assert\Assertion; +use InvalidArgumentException; +use function Safe\parse_url; +use function Safe\sprintf; +use Throwable; + +/** + * This class is used to load OTP object from a provisioning Uri. + */ +final class Factory implements FactoryInterface +{ + public static function loadFromProvisioningUri(string $uri): OTPInterface + { + try { + $parsed_url = parse_url($uri); + } catch (Throwable $throwable) { + throw new InvalidArgumentException('Not a valid OTP provisioning URI', $throwable->getCode(), $throwable); + } + Assertion::isArray($parsed_url, 'Not a valid OTP provisioning URI'); + self::checkData($parsed_url); + + $otp = self::createOTP($parsed_url); + + self::populateOTP($otp, $parsed_url); + + return $otp; + } + + /** + * @param array<string, mixed> $data + */ + private static function populateParameters(OTPInterface &$otp, array $data): void + { + foreach ($data['query'] as $key => $value) { + $otp->setParameter($key, $value); + } + } + + /** + * @param array<string, mixed> $data + */ + private static function populateOTP(OTPInterface &$otp, array $data): void + { + self::populateParameters($otp, $data); + $result = explode(':', rawurldecode(mb_substr($data['path'], 1))); + + if (2 > \count($result)) { + $otp->setIssuerIncludedAsParameter(false); + + return; + } + + if (null !== $otp->getIssuer()) { + Assertion::eq($result[0], $otp->getIssuer(), 'Invalid OTP: invalid issuer in parameter'); + $otp->setIssuerIncludedAsParameter(true); + } + $otp->setIssuer($result[0]); + } + + /** + * @param array<string, mixed> $data + */ + private static function checkData(array &$data): void + { + foreach (['scheme', 'host', 'path', 'query'] as $key) { + Assertion::keyExists($data, $key, 'Not a valid OTP provisioning URI'); + } + Assertion::eq('otpauth', $data['scheme'], 'Not a valid OTP provisioning URI'); + parse_str($data['query'], $data['query']); + Assertion::keyExists($data['query'], 'secret', 'Not a valid OTP provisioning URI'); + } + + /** + * @param array<string, mixed> $parsed_url + */ + private static function createOTP(array $parsed_url): OTPInterface + { + switch ($parsed_url['host']) { + case 'totp': + $totp = TOTP::create($parsed_url['query']['secret']); + $totp->setLabel(self::getLabel($parsed_url['path'])); + + return $totp; + case 'hotp': + $hotp = HOTP::create($parsed_url['query']['secret']); + $hotp->setLabel(self::getLabel($parsed_url['path'])); + + return $hotp; + default: + throw new InvalidArgumentException(sprintf('Unsupported "%s" OTP type', $parsed_url['host'])); + } + } + + private static function getLabel(string $data): string + { + $result = explode(':', rawurldecode(mb_substr($data, 1))); + + return 2 === \count($result) ? $result[1] : $result[0]; + } +} diff --git a/vendor/spomky-labs/otphp/src/FactoryInterface.php b/vendor/spomky-labs/otphp/src/FactoryInterface.php new file mode 100644 index 000000000..00acc2d04 --- /dev/null +++ b/vendor/spomky-labs/otphp/src/FactoryInterface.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +interface FactoryInterface +{ + /** + * This method is the unique public method of the class. + * It can load a provisioning Uri and convert it into an OTP object. + */ + public static function loadFromProvisioningUri(string $uri): OTPInterface; +} diff --git a/vendor/spomky-labs/otphp/src/HOTP.php b/vendor/spomky-labs/otphp/src/HOTP.php new file mode 100644 index 000000000..a2f4a2395 --- /dev/null +++ b/vendor/spomky-labs/otphp/src/HOTP.php @@ -0,0 +1,103 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +use Assert\Assertion; + +final class HOTP extends OTP implements HOTPInterface +{ + protected function __construct(?string $secret, int $counter, string $digest, int $digits) + { + parent::__construct($secret, $digest, $digits); + $this->setCounter($counter); + } + + public static function create(?string $secret = null, int $counter = 0, string $digest = 'sha1', int $digits = 6): HOTPInterface + { + return new self($secret, $counter, $digest, $digits); + } + + protected function setCounter(int $counter): void + { + $this->setParameter('counter', $counter); + } + + public function getCounter(): int + { + return $this->getParameter('counter'); + } + + private function updateCounter(int $counter): void + { + $this->setCounter($counter); + } + + public function getProvisioningUri(): string + { + return $this->generateURI('hotp', ['counter' => $this->getCounter()]); + } + + /** + * If the counter is not provided, the OTP is verified at the actual counter. + */ + public function verify(string $otp, ?int $counter = null, ?int $window = null): bool + { + Assertion::greaterOrEqualThan($counter, 0, 'The counter must be at least 0.'); + + if (null === $counter) { + $counter = $this->getCounter(); + } elseif ($counter < $this->getCounter()) { + return false; + } + + return $this->verifyOtpWithWindow($otp, $counter, $window); + } + + private function getWindow(?int $window): int + { + return abs($window ?? 0); + } + + private function verifyOtpWithWindow(string $otp, int $counter, ?int $window): bool + { + $window = $this->getWindow($window); + + for ($i = $counter; $i <= $counter + $window; ++$i) { + if ($this->compareOTP($this->at($i), $otp)) { + $this->updateCounter($i + 1); + + return true; + } + } + + return false; + } + + /** + * @return array<string, mixed> + */ + protected function getParameterMap(): array + { + $v = array_merge( + parent::getParameterMap(), + ['counter' => function ($value): int { + Assertion::greaterOrEqualThan((int) $value, 0, 'Counter must be at least 0.'); + + return (int) $value; + }] + ); + + return $v; + } +} diff --git a/vendor/spomky-labs/otphp/src/HOTPInterface.php b/vendor/spomky-labs/otphp/src/HOTPInterface.php new file mode 100644 index 000000000..336ce1055 --- /dev/null +++ b/vendor/spomky-labs/otphp/src/HOTPInterface.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +interface HOTPInterface extends OTPInterface +{ + /** + * The initial counter (a positive integer). + */ + public function getCounter(): int; + + /** + * Create a new TOTP object. + * + * If the secret is null, a random 64 bytes secret will be generated. + */ + public static function create(?string $secret = null, int $counter = 0, string $digest = 'sha1', int $digits = 6): self; +} diff --git a/vendor/spomky-labs/otphp/src/OTP.php b/vendor/spomky-labs/otphp/src/OTP.php new file mode 100644 index 000000000..932bcf97e --- /dev/null +++ b/vendor/spomky-labs/otphp/src/OTP.php @@ -0,0 +1,114 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +use Assert\Assertion; +use ParagonIE\ConstantTime\Base32; +use RuntimeException; +use function Safe\ksort; +use function Safe\sprintf; + +abstract class OTP implements OTPInterface +{ + use ParameterTrait; + + protected function __construct(?string $secret, string $digest, int $digits) + { + $this->setSecret($secret); + $this->setDigest($digest); + $this->setDigits($digits); + } + + public function getQrCodeUri(string $uri, string $placeholder): string + { + $provisioning_uri = urlencode($this->getProvisioningUri()); + + return str_replace($placeholder, $provisioning_uri, $uri); + } + + /** + * The OTP at the specified input. + */ + protected function generateOTP(int $input): string + { + $hash = hash_hmac($this->getDigest(), $this->intToByteString($input), $this->getDecodedSecret(), true); + + $hmac = array_values(unpack('C*', $hash)); + + $offset = ($hmac[\count($hmac) - 1] & 0xF); + $code = ($hmac[$offset + 0] & 0x7F) << 24 | ($hmac[$offset + 1] & 0xFF) << 16 | ($hmac[$offset + 2] & 0xFF) << 8 | ($hmac[$offset + 3] & 0xFF); + $otp = $code % (10 ** $this->getDigits()); + + return str_pad((string) $otp, $this->getDigits(), '0', STR_PAD_LEFT); + } + + public function at(int $timestamp): string + { + return $this->generateOTP($timestamp); + } + + /** + * @param array<string, mixed> $options + */ + protected function filterOptions(array &$options): void + { + foreach (['algorithm' => 'sha1', 'period' => 30, 'digits' => 6] as $key => $default) { + if (isset($options[$key]) && $default === $options[$key]) { + unset($options[$key]); + } + } + + ksort($options); + } + + /** + * @param array<string, mixed> $options + */ + protected function generateURI(string $type, array $options): string + { + $label = $this->getLabel(); + Assertion::string($label, 'The label is not set.'); + Assertion::false($this->hasColon($label), 'Label must not contain a colon.'); + $options = array_merge($options, $this->getParameters()); + $this->filterOptions($options); + $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($options)); + + return sprintf('otpauth://%s/%s?%s', $type, rawurlencode((null !== $this->getIssuer() ? $this->getIssuer().':' : '').$label), $params); + } + + private function getDecodedSecret(): string + { + try { + return Base32::decodeUpper($this->getSecret()); + } catch (\Exception $e) { + throw new RuntimeException('Unable to decode the secret. Is it correctly base32 encoded?'); + } + } + + private function intToByteString(int $int): string + { + $result = []; + while (0 !== $int) { + $result[] = \chr($int & 0xFF); + $int >>= 8; + } + + return str_pad(implode(array_reverse($result)), 8, "\000", STR_PAD_LEFT); + } + + protected function compareOTP(string $safe, string $user): bool + { + return hash_equals($safe, $user); + } +} diff --git a/vendor/spomky-labs/otphp/src/OTPInterface.php b/vendor/spomky-labs/otphp/src/OTPInterface.php new file mode 100644 index 000000000..66e163d5d --- /dev/null +++ b/vendor/spomky-labs/otphp/src/OTPInterface.php @@ -0,0 +1,97 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +interface OTPInterface +{ + /** + * @return string Return the OTP at the specified timestamp + */ + public function at(int $timestamp): string; + + /** + * Verify that the OTP is valid with the specified input. + * If no input is provided, the input is set to a default value or false is returned. + */ + public function verify(string $otp, ?int $input = null, ?int $window = null): bool; + + /** + * @return string The secret of the OTP + */ + public function getSecret(): string; + + /** + * @param string $label The label of the OTP + */ + public function setLabel(string $label): void; + + /** + * @return string|null The label of the OTP + */ + public function getLabel(): ?string; + + /** + * @return string|null The issuer + */ + public function getIssuer(): ?string; + + public function setIssuer(string $issuer): void; + + /** + * @return bool If true, the issuer will be added as a parameter in the provisioning URI + */ + public function isIssuerIncludedAsParameter(): bool; + + public function setIssuerIncludedAsParameter(bool $issuer_included_as_parameter): void; + + /** + * @return int Number of digits in the OTP + */ + public function getDigits(): int; + + /** + * @return string Digest algorithm used to calculate the OTP. Possible values are 'md5', 'sha1', 'sha256' and 'sha512' + */ + public function getDigest(): string; + + /** + * @return mixed|null + */ + public function getParameter(string $parameter); + + public function hasParameter(string $parameter): bool; + + /** + * @return array<string, mixed> + */ + public function getParameters(): array; + + /** + * @param mixed|null $value + */ + public function setParameter(string $parameter, $value): void; + + /** + * Get the provisioning URI. + */ + public function getProvisioningUri(): string; + + /** + * Get the provisioning URI. + * + * @param string $uri The Uri of the QRCode generator with all parameters. This Uri MUST contain a placeholder that will be replaced by the method. + * @param string $placeholder the placeholder to be replaced in the QR Code generator URI + */ + public function getQrCodeUri(string $uri, string $placeholder): string; +} diff --git a/vendor/spomky-labs/otphp/src/ParameterTrait.php b/vendor/spomky-labs/otphp/src/ParameterTrait.php new file mode 100644 index 000000000..69fa774db --- /dev/null +++ b/vendor/spomky-labs/otphp/src/ParameterTrait.php @@ -0,0 +1,196 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +use Assert\Assertion; +use InvalidArgumentException; +use ParagonIE\ConstantTime\Base32; +use function Safe\sprintf; + +trait ParameterTrait +{ + /** + * @var array<string, mixed> + */ + private $parameters = []; + + /** + * @var string|null + */ + private $issuer; + + /** + * @var string|null + */ + private $label; + + /** + * @var bool + */ + private $issuer_included_as_parameter = true; + + /** + * @return array<string, mixed> + */ + public function getParameters(): array + { + $parameters = $this->parameters; + + if (null !== $this->getIssuer() && true === $this->isIssuerIncludedAsParameter()) { + $parameters['issuer'] = $this->getIssuer(); + } + + return $parameters; + } + + public function getSecret(): string + { + return $this->getParameter('secret'); + } + + private function setSecret(?string $secret): void + { + $this->setParameter('secret', $secret); + } + + public function getLabel(): ?string + { + return $this->label; + } + + public function setLabel(string $label): void + { + $this->setParameter('label', $label); + } + + public function getIssuer(): ?string + { + return $this->issuer; + } + + public function setIssuer(string $issuer): void + { + $this->setParameter('issuer', $issuer); + } + + public function isIssuerIncludedAsParameter(): bool + { + return $this->issuer_included_as_parameter; + } + + public function setIssuerIncludedAsParameter(bool $issuer_included_as_parameter): void + { + $this->issuer_included_as_parameter = $issuer_included_as_parameter; + } + + public function getDigits(): int + { + return $this->getParameter('digits'); + } + + private function setDigits(int $digits): void + { + $this->setParameter('digits', $digits); + } + + public function getDigest(): string + { + return $this->getParameter('algorithm'); + } + + private function setDigest(string $digest): void + { + $this->setParameter('algorithm', $digest); + } + + public function hasParameter(string $parameter): bool + { + return \array_key_exists($parameter, $this->parameters); + } + + public function getParameter(string $parameter) + { + if ($this->hasParameter($parameter)) { + return $this->getParameters()[$parameter]; + } + + throw new InvalidArgumentException(sprintf('Parameter "%s" does not exist', $parameter)); + } + + public function setParameter(string $parameter, $value): void + { + $map = $this->getParameterMap(); + + if (true === \array_key_exists($parameter, $map)) { + $callback = $map[$parameter]; + $value = $callback($value); + } + + if (property_exists($this, $parameter)) { + $this->$parameter = $value; + } else { + $this->parameters[$parameter] = $value; + } + } + + /** + * @return array<string, mixed> + */ + protected function getParameterMap(): array + { + return [ + 'label' => function ($value) { + Assertion::false($this->hasColon($value), 'Label must not contain a colon.'); + + return $value; + }, + 'secret' => function ($value): string { + if (null === $value) { + $value = Base32::encodeUpper(random_bytes(64)); + } + $value = trim(mb_strtoupper($value), '='); + + return $value; + }, + 'algorithm' => function ($value): string { + $value = mb_strtolower($value); + Assertion::inArray($value, hash_algos(), sprintf('The "%s" digest is not supported.', $value)); + + return $value; + }, + 'digits' => function ($value): int { + Assertion::greaterThan($value, 0, 'Digits must be at least 1.'); + + return (int) $value; + }, + 'issuer' => function ($value) { + Assertion::false($this->hasColon($value), 'Issuer must not contain a colon.'); + + return $value; + }, + ]; + } + + private function hasColon(string $value): bool + { + $colons = [':', '%3A', '%3a']; + foreach ($colons as $colon) { + if (false !== mb_strpos($value, $colon)) { + return true; + } + } + + return false; + } +} diff --git a/vendor/spomky-labs/otphp/src/TOTP.php b/vendor/spomky-labs/otphp/src/TOTP.php new file mode 100644 index 000000000..588b37f17 --- /dev/null +++ b/vendor/spomky-labs/otphp/src/TOTP.php @@ -0,0 +1,159 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +use Assert\Assertion; +use function Safe\ksort; + +final class TOTP extends OTP implements TOTPInterface +{ + protected function __construct(?string $secret, int $period, string $digest, int $digits, int $epoch = 0) + { + parent::__construct($secret, $digest, $digits); + $this->setPeriod($period); + $this->setEpoch($epoch); + } + + public static function create(?string $secret = null, int $period = 30, string $digest = 'sha1', int $digits = 6, int $epoch = 0): TOTPInterface + { + return new self($secret, $period, $digest, $digits, $epoch); + } + + protected function setPeriod(int $period): void + { + $this->setParameter('period', $period); + } + + public function getPeriod(): int + { + return $this->getParameter('period'); + } + + private function setEpoch(int $epoch): void + { + $this->setParameter('epoch', $epoch); + } + + public function getEpoch(): int + { + return $this->getParameter('epoch'); + } + + public function at(int $timestamp): string + { + return $this->generateOTP($this->timecode($timestamp)); + } + + public function now(): string + { + return $this->at(time()); + } + + /** + * If no timestamp is provided, the OTP is verified at the actual timestamp. + */ + public function verify(string $otp, ?int $timestamp = null, ?int $window = null): bool + { + $timestamp = $this->getTimestamp($timestamp); + + if (null === $window) { + return $this->compareOTP($this->at($timestamp), $otp); + } + + return $this->verifyOtpWithWindow($otp, $timestamp, $window); + } + + private function verifyOtpWithWindow(string $otp, int $timestamp, int $window): bool + { + $window = abs($window); + + for ($i = 0; $i <= $window; ++$i) { + $next = $i * $this->getPeriod() + $timestamp; + $previous = -$i * $this->getPeriod() + $timestamp; + $valid = $this->compareOTP($this->at($next), $otp) || + $this->compareOTP($this->at($previous), $otp); + + if ($valid) { + return true; + } + } + + return false; + } + + private function getTimestamp(?int $timestamp): int + { + $timestamp = $timestamp ?? time(); + Assertion::greaterOrEqualThan($timestamp, 0, 'Timestamp must be at least 0.'); + + return $timestamp; + } + + public function getProvisioningUri(): string + { + $params = []; + if (30 !== $this->getPeriod()) { + $params['period'] = $this->getPeriod(); + } + + if (0 !== $this->getEpoch()) { + $params['epoch'] = $this->getEpoch(); + } + + return $this->generateURI('totp', $params); + } + + private function timecode(int $timestamp): int + { + return (int) floor(($timestamp - $this->getEpoch()) / $this->getPeriod()); + } + + /** + * @return array<string, mixed> + */ + protected function getParameterMap(): array + { + $v = array_merge( + parent::getParameterMap(), + [ + 'period' => function ($value): int { + Assertion::greaterThan((int) $value, 0, 'Period must be at least 1.'); + + return (int) $value; + }, + 'epoch' => function ($value): int { + Assertion::greaterOrEqualThan((int) $value, 0, 'Epoch must be greater than or equal to 0.'); + + return (int) $value; + }, + ] + ); + + return $v; + } + + /** + * @param array<string, mixed> $options + */ + protected function filterOptions(array &$options): void + { + parent::filterOptions($options); + + if (isset($options['epoch']) && 0 === $options['epoch']) { + unset($options['epoch']); + } + + ksort($options); + } +} diff --git a/vendor/spomky-labs/otphp/src/TOTPInterface.php b/vendor/spomky-labs/otphp/src/TOTPInterface.php new file mode 100644 index 000000000..a19fe7c0b --- /dev/null +++ b/vendor/spomky-labs/otphp/src/TOTPInterface.php @@ -0,0 +1,36 @@ +<?php + +declare(strict_types=1); + +/* + * The MIT License (MIT) + * + * Copyright (c) 2014-2019 Spomky-Labs + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +namespace OTPHP; + +interface TOTPInterface extends OTPInterface +{ + /** + * Create a new TOTP object. + * + * If the secret is null, a random 64 bytes secret will be generated. + */ + public static function create(?string $secret = null, int $period = 30, string $digest = 'sha1', int $digits = 6): self; + + /** + * Return the TOTP at the current time. + */ + public function now(): string; + + /** + * Get the period of time for OTP generation (a non-null positive integer, in second). + */ + public function getPeriod(): int; + + public function getEpoch(): int; +} diff --git a/vendor/thecodingmachine/safe/LICENSE b/vendor/thecodingmachine/safe/LICENSE new file mode 100644 index 000000000..4188a9bbd --- /dev/null +++ b/vendor/thecodingmachine/safe/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 TheCodingMachine + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.
\ No newline at end of file diff --git a/vendor/thecodingmachine/safe/README.md b/vendor/thecodingmachine/safe/README.md new file mode 100644 index 000000000..3c2ee624f --- /dev/null +++ b/vendor/thecodingmachine/safe/README.md @@ -0,0 +1,178 @@ +[![Latest Stable Version](https://poser.pugx.org/thecodingmachine/safe/v/stable.svg)](https://packagist.org/packages/thecodingmachine/safe) +[![Total Downloads](https://poser.pugx.org/thecodingmachine/safe/downloads.svg)](https://packagist.org/packages/thecodingmachine/safe) +[![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/safe/v/unstable.svg)](https://packagist.org/packages/thecodingmachine/safe) +[![License](https://poser.pugx.org/thecodingmachine/safe/license.svg)](https://packagist.org/packages/thecodingmachine/safe) +[![Build Status](https://travis-ci.org/thecodingmachine/safe.svg?branch=master)](https://travis-ci.org/thecodingmachine/safe) +[![Continuous Integration](https://github.com/thecodingmachine/safe/workflows/Continuous%20Integration/badge.svg)](https://github.com/thecodingmachine/safe/actions) +[![codecov](https://codecov.io/gh/thecodingmachine/safe/branch/master/graph/badge.svg)](https://codecov.io/gh/thecodingmachine/safe) + +Safe PHP +======== + +**Work in progress** + +A set of core PHP functions rewritten to throw exceptions instead of returning `false` when an error is encountered. + +## The problem + +Most PHP core functions were written before exception handling was added to the language. Therefore, most PHP functions +do not throw exceptions. Instead, they return `false` in case of error. + +But most of us are too lazy to check explicitly for every single return of every core PHP function. + +```php +// This code is incorrect. Twice. +// "file_get_contents" can return false if the file does not exists +// "json_decode" can return false if the file content is not valid JSON +$content = file_get_contents('foobar.json'); +$foobar = json_decode($content); +``` + +The correct version of this code would be: + +```php +$content = file_get_contents('foobar.json'); +if ($content === false) { + throw new FileLoadingException('Could not load file foobar.json'); +} +$foobar = json_decode($content); +if (json_last_error() !== JSON_ERROR_NONE) { + throw new FileLoadingException('foobar.json does not contain valid JSON: '.json_last_error_msg()); +} +``` + +Obviously, while this snippet is correct, it is less easy to read. + +## The solution + +Enter *thecodingmachine/safe* aka Safe-PHP. + +Safe-PHP redeclares all core PHP functions. The new PHP functions act exactly as the old ones, except they +throw exceptions properly when an error is encountered. The "safe" functions have the same name as the core PHP +functions, except they are in the `Safe` namespace. + +```php +use function Safe\file_get_contents; +use function Safe\json_decode; + +// This code is both safe and simple! +$content = file_get_contents('foobar.json'); +$foobar = json_decode($content); +``` + +All PHP functions that can return `false` on error are part of Safe. +In addition, Safe also provide 2 'Safe' classes: `Safe\DateTime` and `Safe\DateTimeImmutable` whose methods will throw exceptions instead of returning false. + +## PHPStan integration + +> Yeah... but I must explicitly think about importing the "safe" variant of the function, for each and every file of my application. +> I'm sure I will forget some "use function" statements! + +Fear not! thecodingmachine/safe comes with a PHPStan rule. + +Never heard of [PHPStan](https://github.com/phpstan/phpstan) before? +Check it out, it's an amazing code analyzer for PHP. + +Simply install the Safe rule in your PHPStan setup (explained in the "Installation" section) and PHPStan will let you know each time you are using an "unsafe" function. + +The code below will trigger this warning: + +```php +$content = file_get_contents('foobar.json'); +``` + +> Function file_get_contents is unsafe to use. It can return FALSE instead of throwing an exception. Please add 'use function Safe\\file_get_contents;' at the beginning of the file to use the variant provided by the 'thecodingmachine/safe' library. + +## Installation + +Use composer to install Safe-PHP: + +```bash +$ composer require thecodingmachine/safe +``` + +*Highly recommended*: install PHPStan and PHPStan extension: + +```bash +$ composer require --dev thecodingmachine/phpstan-safe-rule +``` + +Now, edit your `phpstan.neon` file and add these rules: + +```yml +includes: + - vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon +``` + +## Automated refactoring + +You have a large legacy codebase and want to use "Safe-PHP" functions throughout your project? PHPStan will help you +find these functions but changing the namespace of the functions one function at a time might be a tedious task. + +Fortunately, Safe comes bundled with a "Rector" configuration file. [Rector](https://github.com/rectorphp/rector) is a command-line +tool that performs instant refactoring of your application. + +Run + +```bash +$ composer require --dev rector/rector:^0.7 +``` + +to install `rector/rector`. + +Run + +```bash +vendor/bin/rector process src/ --config vendor/thecodingmachine/safe/rector-migrate-0.7.php +``` + +to run `rector/rector`. + +*Note:* do not forget to replace "src/" with the path to your source directory. + +**Important:** the refactoring only performs a "dumb" replacement of functions. It will not modify the way +"false" return values are handled. So if your code was already performing error handling, you will have to deal +with it manually. + +Especially, you should look for error handling that was already performed, like: + +```php +if (!mkdir($dirPath)) { + // Do something on error +} +``` + +This code will be refactored by Rector to: + +```php +if (!\Safe\mkdir($dirPath)) { + // Do something on error +} +``` + +You should then (manually) refactor it to: + +```php +try { + \Safe\mkdir($dirPath)); +} catch (\Safe\FilesystemException $e) { + // Do something on error +} +``` + +## Performance impact + +Safe is loading 1000+ functions from ~85 files on each request. Yet, the performance impact of this loading is quite low. + +In case you worry, using Safe will "cost" you ~700µs on each request. The [performance section](performance/README.md) +contains more information regarding the way we tested the performance impact of Safe. + +## Learn more + +Read [the release article on TheCodingMachine's blog](https://thecodingmachine.io/introducing-safe-php) if you want to +learn more about what triggered the development of Safe-PHP. + +## Contributing + +The files that contain all the functions are auto-generated from the PHP doc. +Read the [CONTRIBUTING.md](CONTRIBUTING.md) file to learn how to regenerate these files and to contribute to this library. diff --git a/vendor/thecodingmachine/safe/composer.json b/vendor/thecodingmachine/safe/composer.json new file mode 100644 index 000000000..2cd03fcc8 --- /dev/null +++ b/vendor/thecodingmachine/safe/composer.json @@ -0,0 +1,123 @@ +{ + "name": "thecodingmachine/safe", + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "license": "MIT", + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "deprecated/", + "generated/" + ] + }, + "files": [ + "deprecated/apc.php", + "deprecated/libevent.php", + "deprecated/mssql.php", + "deprecated/stats.php", + "lib/special_cases.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ] + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12", + "thecodingmachine/phpstan-strict-rules": "^0.12", + "squizlabs/php_codesniffer": "^3.2" + }, + "scripts": { + "phpstan": "phpstan analyse lib -c phpstan.neon --level=max --no-progress -vvv", + "cs-fix": "phpcbf", + "cs-check": "phpcs" + }, + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + } +}
\ No newline at end of file diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php new file mode 100644 index 000000000..f344490d8 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ApcException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php new file mode 100644 index 000000000..e1df31b77 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class LibeventException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php new file mode 100644 index 000000000..814bd4e0b --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MssqlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php new file mode 100644 index 000000000..f8a7f45c2 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class StatsException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/deprecated/apc.php b/vendor/thecodingmachine/safe/deprecated/apc.php new file mode 100644 index 000000000..7930432c6 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/apc.php @@ -0,0 +1,238 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ApcException; + +/** + * Retrieves cached information and meta-data from APC's data store. + * + * @param string $cache_type If cache_type is "user", + * information about the user cache will be returned. + * + * If cache_type is "filehits", + * information about which files have been served from the bytecode cache + * for the current request will be returned. This feature must be enabled at + * compile time using --enable-filehits. + * + * If an invalid or no cache_type is specified, information about + * the system cache (cached files) will be returned. + * @param bool $limited If limited is TRUE, the + * return value will exclude the individual list of cache entries. This + * is useful when trying to optimize calls for statistics gathering. + * @return array Array of cached data (and meta-data) + * @throws ApcException + * + */ +function apc_cache_info(string $cache_type = '', bool $limited = false): array +{ + error_clear_last(); + $result = \apc_cache_info($cache_type, $limited); + if ($result === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} + + +/** + * apc_cas updates an already existing integer value if the + * old parameter matches the currently stored value + * with the value of the new parameter. + * + * @param string $key The key of the value being updated. + * @param int $old The old value (the value currently stored). + * @param int $new The new value to update to. + * @throws ApcException + * + */ +function apc_cas(string $key, int $old, int $new): void +{ + error_clear_last(); + $result = \apc_cas($key, $old, $new); + if ($result === false) { + throw ApcException::createFromPhpError(); + } +} + + +/** + * Stores a file in the bytecode cache, bypassing all filters. + * + * @param string $filename Full or relative path to a PHP file that will be compiled and stored in + * the bytecode cache. + * @param bool $atomic + * @return mixed Returns TRUE on success. + * @throws ApcException + * + */ +function apc_compile_file(string $filename, bool $atomic = true) +{ + error_clear_last(); + $result = \apc_compile_file($filename, $atomic); + if ($result === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} + + +/** + * Decreases a stored integer value. + * + * @param string $key The key of the value being decreased. + * @param int $step The step, or value to decrease. + * @param bool|null $success Optionally pass the success or fail boolean value to + * this referenced variable. + * @return int Returns the current value of key's value on success + * @throws ApcException + * + */ +function apc_dec(string $key, int $step = 1, ?bool &$success = null): int +{ + error_clear_last(); + $result = \apc_dec($key, $step, $success); + if ($result === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} + + +/** + * define is notoriously slow. Since the main benefit of + * APC is to increase the performance of scripts/applications, this mechanism + * is provided to streamline the process of mass constant definition. However, + * this function does not perform as well as anticipated. + * + * For a better-performing solution, try the + * hidef extension from PECL. + * + * @param string $key The key serves as the name of the constant set + * being stored. This key is used to retrieve the + * stored constants in apc_load_constants. + * @param array $constants An associative array of constant_name => value + * pairs. The constant_name must follow the normal + * constant naming rules. + * value must evaluate to a scalar value. + * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive; + * i.e. CONSTANT and Constant + * represent different values. If this parameter evaluates to FALSE the + * constants will be declared as case-insensitive symbols. + * @throws ApcException + * + */ +function apc_define_constants(string $key, array $constants, bool $case_sensitive = true): void +{ + error_clear_last(); + $result = \apc_define_constants($key, $constants, $case_sensitive); + if ($result === false) { + throw ApcException::createFromPhpError(); + } +} + + +/** + * Deletes the given files from the opcode cache. + * + * @param mixed $keys The files to be deleted. Accepts a string, + * array of strings, or an APCIterator + * object. + * @return mixed Returns TRUE on success. + * Or if keys is an array, then + * an empty array is returned on success, or an array of failed files + * is returned. + * @throws ApcException + * + */ +function apc_delete_file($keys) +{ + error_clear_last(); + $result = \apc_delete_file($keys); + if ($result === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} + + +/** + * Removes a stored variable from the cache. + * + * @param string|string[]|\APCIterator $key The key used to store the value (with + * apc_store). + * @throws ApcException + * + */ +function apc_delete($key): void +{ + error_clear_last(); + $result = \apc_delete($key); + if ($result === false) { + throw ApcException::createFromPhpError(); + } +} + + +/** + * Increases a stored number. + * + * @param string $key The key of the value being increased. + * @param int $step The step, or value to increase. + * @param bool|null $success Optionally pass the success or fail boolean value to + * this referenced variable. + * @return int Returns the current value of key's value on success + * @throws ApcException + * + */ +function apc_inc(string $key, int $step = 1, ?bool &$success = null): int +{ + error_clear_last(); + $result = \apc_inc($key, $step, $success); + if ($result === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} + + +/** + * Loads a set of constants from the cache. + * + * @param string $key The name of the constant set (that was stored with + * apc_define_constants) to be retrieved. + * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive; + * i.e. CONSTANT and Constant + * represent different values. If this parameter evaluates to FALSE the + * constants will be declared as case-insensitive symbols. + * @throws ApcException + * + */ +function apc_load_constants(string $key, bool $case_sensitive = true): void +{ + error_clear_last(); + $result = \apc_load_constants($key, $case_sensitive); + if ($result === false) { + throw ApcException::createFromPhpError(); + } +} + + +/** + * Retrieves APC's Shared Memory Allocation information. + * + * @param bool $limited When set to FALSE (default) apc_sma_info will + * return a detailed information about each segment. + * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @throws ApcException + * + */ +function apc_sma_info(bool $limited = false): array +{ + error_clear_last(); + $result = \apc_sma_info($limited); + if ($result === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/deprecated/functionsList.php b/vendor/thecodingmachine/safe/deprecated/functionsList.php new file mode 100644 index 000000000..e430cd3b9 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/functionsList.php @@ -0,0 +1,56 @@ +<?php + +return [ + 'apc_cache_info', + 'apc_cas', + 'apc_compile_file', + 'apc_dec', + 'apc_define_constants', + 'apc_delete', + 'apc_delete_file', + 'apc_inc', + 'apc_load_constants', + 'apc_sma_info', + 'event_add', + 'event_base_loopbreak', + 'event_base_loopexit', + 'event_base_new', + 'event_base_priority_init', + 'event_base_reinit', + 'event_base_set', + 'event_buffer_base_set', + 'event_buffer_disable', + 'event_buffer_enable', + 'event_buffer_new', + 'event_buffer_priority_set', + 'event_buffer_set_callback', + 'event_buffer_write', + 'event_del', + 'event_new', + 'event_priority_set', + 'event_set', + 'event_timer_set', + 'imagepsencodefont', + 'imagepsextendfont', + 'imagepsfreefont', + 'imagepsslantfont', + 'mssql_bind', + 'mssql_close', + 'mssql_connect', + 'mssql_data_seek', + 'mssql_field_length', + 'mssql_field_name', + 'mssql_field_seek', + 'mssql_field_type', + 'mssql_free_result', + 'mssql_free_statement', + 'mssql_init', + 'mssql_pconnect', + 'mssql_query', + 'mssql_select_db', + 'stats_covariance', + 'stats_standard_deviation', + 'stats_stat_correlation', + 'stats_stat_innerproduct', + 'stats_variance', +]; diff --git a/vendor/thecodingmachine/safe/deprecated/libevent.php b/vendor/thecodingmachine/safe/deprecated/libevent.php new file mode 100644 index 000000000..574f0a67b --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/libevent.php @@ -0,0 +1,496 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\LibeventException; + +/** + * event_add schedules the execution of the event + * when the event specified in event_set occurs or in at least the time + * specified by the timeout argument. If + * timeout was not specified, not timeout is set. The + * event must be already initalized by event_set + * and event_base_set functions. If the + * event already has a timeout set, it is replaced by + * the new one. + * + * @param resource $event Valid event resource. + * @param int $timeout Optional timeout (in microseconds). + * @throws LibeventException + * + */ +function event_add($event, int $timeout = -1): void +{ + error_clear_last(); + $result = \event_add($event, $timeout); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Abort the active event loop immediately. The behaviour is similar to + * break statement. + * + * @param resource $event_base Valid event base resource. + * @throws LibeventException + * + */ +function event_base_loopbreak($event_base): void +{ + error_clear_last(); + $result = \event_base_loopbreak($event_base); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * The next event loop iteration after the given timer expires will complete + * normally, then exit without blocking for events again. + * + * @param resource $event_base Valid event base resource. + * @param int $timeout Optional timeout parameter (in microseconds). + * @throws LibeventException + * + */ +function event_base_loopexit($event_base, int $timeout = -1): void +{ + error_clear_last(); + $result = \event_base_loopexit($event_base, $timeout); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Returns new event base, which can be used later in event_base_set, + * event_base_loop and other functions. + * + * @return resource event_base_new returns valid event base resource on + * success. + * @throws LibeventException + * + */ +function event_base_new() +{ + error_clear_last(); + $result = \event_base_new(); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the number of different event priority levels. + * + * By default all events are scheduled with the same priority + * (npriorities/2). + * Using event_base_priority_init you can change the number + * of event priority levels and then set a desired priority for each event. + * + * @param resource $event_base Valid event base resource. + * @param int $npriorities The number of event priority levels. + * @throws LibeventException + * + */ +function event_base_priority_init($event_base, int $npriorities): void +{ + error_clear_last(); + $result = \event_base_priority_init($event_base, $npriorities); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Some event mechanisms do not survive across fork. The + * event_base needs to be reinitialized with this + * function. + * + * @param resource $event_base Valid event base resource that needs to be re-initialized. + * @throws LibeventException + * + */ +function event_base_reinit($event_base): void +{ + error_clear_last(); + $result = \event_base_reinit($event_base); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Associates the event_base with the + * event. + * + * @param resource $event Valid event resource. + * @param resource $event_base Valid event base resource. + * @throws LibeventException + * + */ +function event_base_set($event, $event_base): void +{ + error_clear_last(); + $result = \event_base_set($event, $event_base); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Assign the specified bevent to the + * event_base. + * + * @param resource $bevent Valid buffered event resource. + * @param resource $event_base Valid event base resource. + * @throws LibeventException + * + */ +function event_buffer_base_set($bevent, $event_base): void +{ + error_clear_last(); + $result = \event_buffer_base_set($bevent, $event_base); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Disables the specified buffered event. + * + * @param resource $bevent Valid buffered event resource. + * @param int $events Any combination of EV_READ and + * EV_WRITE. + * @throws LibeventException + * + */ +function event_buffer_disable($bevent, int $events): void +{ + error_clear_last(); + $result = \event_buffer_disable($bevent, $events); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Enables the specified buffered event. + * + * @param resource $bevent Valid buffered event resource. + * @param int $events Any combination of EV_READ and + * EV_WRITE. + * @throws LibeventException + * + */ +function event_buffer_enable($bevent, int $events): void +{ + error_clear_last(); + $result = \event_buffer_enable($bevent, $events); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Libevent provides an abstraction layer on top of the regular event API. + * Using buffered event you don't need to deal with the I/O manually, instead + * it provides input and output buffers that get filled and drained + * automatically. + * + * @param resource $stream Valid PHP stream resource. Must be castable to file descriptor. + * @param mixed $readcb Callback to invoke where there is data to read, or NULL if + * no callback is desired. + * @param mixed $writecb Callback to invoke where the descriptor is ready for writing, + * or NULL if no callback is desired. + * @param mixed $errorcb Callback to invoke where there is an error on the descriptor, cannot be + * NULL. + * @param mixed $arg An argument that will be passed to each of the callbacks (optional). + * @return resource event_buffer_new returns new buffered event resource + * on success. + * @throws LibeventException + * + */ +function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = null) +{ + error_clear_last(); + if ($arg !== null) { + $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg); + } else { + $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb); + } + if ($result === false) { + throw LibeventException::createFromPhpError(); + } + return $result; +} + + +/** + * Assign a priority to the bevent. + * + * @param resource $bevent Valid buffered event resource. + * @param int $priority Priority level. Cannot be less than zero and cannot exceed maximum + * priority level of the event base (see event_base_priority_init). + * @throws LibeventException + * + */ +function event_buffer_priority_set($bevent, int $priority): void +{ + error_clear_last(); + $result = \event_buffer_priority_set($bevent, $priority); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Sets or changes existing callbacks for the buffered event. + * + * @param resource $event Valid buffered event resource. + * @param mixed $readcb Callback to invoke where there is data to read, or NULL if + * no callback is desired. + * @param mixed $writecb Callback to invoke where the descriptor is ready for writing, + * or NULL if no callback is desired. + * @param mixed $errorcb Callback to invoke where there is an error on the descriptor, cannot be + * NULL. + * @param mixed $arg An argument that will be passed to each of the callbacks (optional). + * @throws LibeventException + * + */ +function event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg = null): void +{ + error_clear_last(); + if ($arg !== null) { + $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg); + } else { + $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb); + } + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Writes data to the specified buffered event. The data is appended to the + * output buffer and written to the descriptor when it becomes available for + * writing. + * + * @param resource $bevent Valid buffered event resource. + * @param string $data The data to be written. + * @param int $data_size Optional size parameter. event_buffer_write writes + * all the data by default. + * @throws LibeventException + * + */ +function event_buffer_write($bevent, string $data, int $data_size = -1): void +{ + error_clear_last(); + $result = \event_buffer_write($bevent, $data, $data_size); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Cancels the event. + * + * @param resource $event Valid event resource. + * @throws LibeventException + * + */ +function event_del($event): void +{ + error_clear_last(); + $result = \event_del($event); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Creates and returns a new event resource. + * + * @return resource event_new returns a new event resource on success. + * @throws LibeventException + * + */ +function event_new() +{ + error_clear_last(); + $result = \event_new(); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } + return $result; +} + + +/** + * Assign a priority to the event. + * + * @param resource $event Valid event resource. + * @param int $priority Priority level. Cannot be less than zero and cannot exceed maximum + * priority level of the event base (see + * event_base_priority_init). + * @throws LibeventException + * + */ +function event_priority_set($event, int $priority): void +{ + error_clear_last(); + $result = \event_priority_set($event, $priority); + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Prepares the event to be used in event_add. The event + * is prepared to call the function specified by the callback + * on the events specified in parameter events, which + * is a set of the following flags: EV_TIMEOUT, + * EV_SIGNAL, EV_READ, + * EV_WRITE and EV_PERSIST. + * + * If EV_SIGNAL bit is set in parameter events, + * the fd is interpreted as signal number. + * + * After initializing the event, use event_base_set to + * associate the event with its event base. + * + * In case of matching event, these three arguments are passed to the + * callback function: + * + * + * fd + * + * + * Signal number or resource indicating the stream. + * + * + * + * + * events + * + * + * A flag indicating the event. Consists of the following flags: + * EV_TIMEOUT, EV_SIGNAL, + * EV_READ, EV_WRITE + * and EV_PERSIST. + * + * + * + * + * arg + * + * + * Optional parameter, previously passed to event_set + * as arg. + * + * + * + * + * + * @param resource $event Valid event resource. + * @param mixed $fd Valid PHP stream resource. The stream must be castable to file + * descriptor, so you most likely won't be able to use any of filtered + * streams. + * @param int $events A set of flags indicating the desired event, can be + * EV_READ and/or EV_WRITE. + * The additional flag EV_PERSIST makes the event + * to persist until event_del is called, otherwise + * the callback is invoked only once. + * @param mixed $callback Callback function to be called when the matching event occurs. + * @param mixed $arg Optional callback parameter. + * @throws LibeventException + * + */ +function event_set($event, $fd, int $events, $callback, $arg = null): void +{ + error_clear_last(); + if ($arg !== null) { + $result = \event_set($event, $fd, $events, $callback, $arg); + } else { + $result = \event_set($event, $fd, $events, $callback); + } + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} + + +/** + * Prepares the timer event to be used in event_add. The + * event is prepared to call the function specified by the + * callback when the event timeout elapses. + * + * After initializing the event, use event_base_set to + * associate the event with its event base. + * + * In case of matching event, these three arguments are passed to the + * callback function: + * + * + * fd + * + * + * Signal number or resource indicating the stream. + * + * + * + * + * events + * + * + * A flag indicating the event. This will always be + * EV_TIMEOUT for timer events. + * + * + * + * + * arg + * + * + * Optional parameter, previously passed to + * event_timer_set as arg. + * + * + * + * + * + * @param resource $event Valid event resource. + * @param callable $callback Callback function to be called when the matching event occurs. + * @param mixed $arg Optional callback parameter. + * @throws LibeventException + * + */ +function event_timer_set($event, callable $callback, $arg = null): void +{ + error_clear_last(); + if ($arg !== null) { + $result = \event_timer_set($event, $callback, $arg); + } else { + $result = \event_timer_set($event, $callback); + } + if ($result === false) { + throw LibeventException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/deprecated/mssql.php b/vendor/thecodingmachine/safe/deprecated/mssql.php new file mode 100644 index 000000000..234ef56b1 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/mssql.php @@ -0,0 +1,426 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MssqlException; + +/** + * Binds a parameter to a stored procedure or a remote stored procedure. + * + * @param resource $stmt Statement resource, obtained with mssql_init. + * @param string $param_name The parameter name, as a string. + * + * You have to include the @ character, like in the + * T-SQL syntax. See the explanation included in + * mssql_execute. + * @param mixed $var The PHP variable you'll bind the MSSQL parameter to. It is passed by + * reference, to retrieve OUTPUT and RETVAL values after + * the procedure execution. + * @param int $type One of: SQLTEXT, + * SQLVARCHAR, SQLCHAR, + * SQLINT1, SQLINT2, + * SQLINT4, SQLBIT, + * SQLFLT4, SQLFLT8, + * SQLFLTN. + * @param bool $is_output Whether the value is an OUTPUT parameter or not. If it's an OUTPUT + * parameter and you don't mention it, it will be treated as a normal + * input parameter and no error will be thrown. + * @param bool $is_null Whether the parameter is NULL or not. Passing the NULL value as + * var will not do the job. + * @param int $maxlen Used with char/varchar values. You have to indicate the length of the + * data so if the parameter is a varchar(50), the type must be + * SQLVARCHAR and this value 50. + * @throws MssqlException + * + */ +function mssql_bind($stmt, string $param_name, &$var, int $type, bool $is_output = false, bool $is_null = false, int $maxlen = -1): void +{ + error_clear_last(); + $result = \mssql_bind($stmt, $param_name, $var, $type, $is_output, $is_null, $maxlen); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} + + +/** + * Closes the link to a MS SQL Server database that's associated with the + * specified link identifier. If the link identifier isn't specified, the + * last opened link is assumed. + * + * Note that this isn't usually necessary, as non-persistent open + * links are automatically closed at the end of the script's + * execution. + * + * @param resource $link_identifier A MS SQL link identifier, returned by + * mssql_connect. + * + * This function will not close persistent links generated by + * mssql_pconnect. + * @throws MssqlException + * + */ +function mssql_close($link_identifier = null): void +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \mssql_close($link_identifier); + } else { + $result = \mssql_close(); + } + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} + + +/** + * mssql_connect establishes a connection to a + * MS SQL server. + * + * The link to the server will be closed as soon as the execution of + * the script ends, unless it's closed earlier by explicitly calling + * mssql_close. + * + * @param string $servername The MS SQL server. It can also include a port number, e.g. + * hostname:port (Linux), or + * hostname,port (Windows). + * @param string $username The username. + * @param string $password The password. + * @param bool $new_link If a second call is made to mssql_connect with the + * same arguments, no new link will be established, but instead, the link + * identifier of the already opened link will be returned. This parameter + * modifies this behavior and makes mssql_connect + * always open a new link, even if mssql_connect was + * called before with the same parameters. + * @return resource Returns a MS SQL link identifier on success. + * @throws MssqlException + * + */ +function mssql_connect(string $servername = null, string $username = null, string $password = null, bool $new_link = false) +{ + error_clear_last(); + if ($new_link !== false) { + $result = \mssql_connect($servername, $username, $password, $new_link); + } elseif ($password !== null) { + $result = \mssql_connect($servername, $username, $password); + } elseif ($username !== null) { + $result = \mssql_connect($servername, $username); + } elseif ($servername !== null) { + $result = \mssql_connect($servername); + } else { + $result = \mssql_connect(); + } + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mssql_data_seek moves the internal row + * pointer of the MS SQL result associated with the specified result + * identifier to point to the specified row number, first row being + * number 0. The next call to mssql_fetch_row + * would return that row. + * + * @param resource $result_identifier The result resource that is being evaluated. + * @param int $row_number The desired row number of the new result pointer. + * @throws MssqlException + * + */ +function mssql_data_seek($result_identifier, int $row_number): void +{ + error_clear_last(); + $result = \mssql_data_seek($result_identifier, $row_number); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} + + +/** + * Returns the length of field no. offset in + * result. + * + * @param resource $result The result resource that is being evaluated. This result comes from a + * call to mssql_query. + * @param int $offset The field offset, starts at 0. If omitted, the current field is used. + * @return int The length of the specified field index on success. + * @throws MssqlException + * + */ +function mssql_field_length($result, int $offset = -1): int +{ + error_clear_last(); + $result = \mssql_field_length($result, $offset); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the name of field no. offset in + * result. + * + * @param resource $result The result resource that is being evaluated. This result comes from a + * call to mssql_query. + * @param int $offset The field offset, starts at 0. If omitted, the current field is used. + * @return string The name of the specified field index on success. + * @throws MssqlException + * + */ +function mssql_field_name($result, int $offset = -1): string +{ + error_clear_last(); + $result = \mssql_field_name($result, $offset); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Seeks to the specified field offset. If the next call to + * mssql_fetch_field won't include a field + * offset, this field would be returned. + * + * @param resource $result The result resource that is being evaluated. This result comes from a + * call to mssql_query. + * @param int $field_offset The field offset, starts at 0. + * @throws MssqlException + * + */ +function mssql_field_seek($result, int $field_offset): void +{ + error_clear_last(); + $result = \mssql_field_seek($result, $field_offset); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} + + +/** + * Returns the type of field no. offset in + * result. + * + * @param resource $result The result resource that is being evaluated. This result comes from a + * call to mssql_query. + * @param int $offset The field offset, starts at 0. If omitted, the current field is used. + * @return string The type of the specified field index on success. + * @throws MssqlException + * + */ +function mssql_field_type($result, int $offset = -1): string +{ + error_clear_last(); + $result = \mssql_field_type($result, $offset); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mssql_free_result only needs to be called + * if you are worried about using too much memory while your script + * is running. All result memory will automatically be freed when + * the script ends. You may call mssql_free_result + * with the result identifier as an argument and the associated + * result memory will be freed. + * + * @param resource $result The result resource that is being freed. This result comes from a + * call to mssql_query. + * @throws MssqlException + * + */ +function mssql_free_result($result): void +{ + error_clear_last(); + $result = \mssql_free_result($result); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} + + +/** + * mssql_free_statement only needs to be called + * if you are worried about using too much memory while your script + * is running. All statement memory will automatically be freed when + * the script ends. You may call mssql_free_statement + * with the statement identifier as an argument and the associated + * statement memory will be freed. + * + * @param resource $stmt Statement resource, obtained with mssql_init. + * @throws MssqlException + * + */ +function mssql_free_statement($stmt): void +{ + error_clear_last(); + $result = \mssql_free_statement($stmt); + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} + + +/** + * Initializes a stored procedure or a remote stored procedure. + * + * @param string $sp_name Stored procedure name, like ownew.sp_name or + * otherdb.owner.sp_name. + * @param resource $link_identifier A MS SQL link identifier, returned by + * mssql_connect. + * @return resource Returns a resource identifier "statement", used in subsequent calls to + * mssql_bind and mssql_executes. + * @throws MssqlException + * + */ +function mssql_init(string $sp_name, $link_identifier = null) +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \mssql_init($sp_name, $link_identifier); + } else { + $result = \mssql_init($sp_name); + } + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mssql_pconnect acts very much like + * mssql_connect with two major differences. + * + * First, when connecting, the function would first try to find a + * (persistent) link that's already open with the same host, + * username and password. If one is found, an identifier for it + * will be returned instead of opening a new connection. + * + * Second, the connection to the SQL server will not be closed when + * the execution of the script ends. Instead, the link will remain + * open for future use (mssql_close will not + * close links established by mssql_pconnect). + * + * This type of links is therefore called 'persistent'. + * + * @param string $servername The MS SQL server. It can also include a port number. e.g. + * hostname:port. + * @param string $username The username. + * @param string $password The password. + * @param bool $new_link If a second call is made to mssql_pconnect with + * the same arguments, no new link will be established, but instead, the + * link identifier of the already opened link will be returned. This + * parameter modifies this behavior and makes + * mssql_pconnect always open a new link, even if + * mssql_pconnect was called before with the same + * parameters. + * @return resource Returns a positive MS SQL persistent link identifier on success. + * @throws MssqlException + * + */ +function mssql_pconnect(string $servername = null, string $username = null, string $password = null, bool $new_link = false) +{ + error_clear_last(); + if ($new_link !== false) { + $result = \mssql_pconnect($servername, $username, $password, $new_link); + } elseif ($password !== null) { + $result = \mssql_pconnect($servername, $username, $password); + } elseif ($username !== null) { + $result = \mssql_pconnect($servername, $username); + } elseif ($servername !== null) { + $result = \mssql_pconnect($servername); + } else { + $result = \mssql_pconnect(); + } + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mssql_query sends a query to the currently active + * database on the server that's associated with the specified link + * identifier. + * + * @param string $query An SQL query. + * @param resource $link_identifier A MS SQL link identifier, returned by + * mssql_connect or + * mssql_pconnect. + * + * If the link identifier isn't specified, the last opened link is + * assumed. If no link is open, the function tries to establish a link + * as if mssql_connect was called, and use it. + * @param int $batch_size The number of records to batch in the buffer. + * @return mixed Returns a MS SQL result resource on success, TRUE if no rows were + * returned. + * @throws MssqlException + * + */ +function mssql_query(string $query, $link_identifier = null, int $batch_size = 0) +{ + error_clear_last(); + if ($batch_size !== 0) { + $result = \mssql_query($query, $link_identifier, $batch_size); + } elseif ($link_identifier !== null) { + $result = \mssql_query($query, $link_identifier); + } else { + $result = \mssql_query($query); + } + if ($result === false) { + throw MssqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mssql_select_db sets the current active + * database on the server that's associated with the specified link + * identifier. + * + * Every subsequent call to mssql_query will be + * made on the active database. + * + * @param string $database_name The database name. + * + * To escape the name of a database that contains spaces, hyphens ("-"), + * or any other exceptional characters, the database name must be + * enclosed in brackets, as is shown in the example, below. This + * technique must also be applied when selecting a database name that is + * also a reserved word (such as primary). + * @param resource $link_identifier A MS SQL link identifier, returned by + * mssql_connect or + * mssql_pconnect. + * + * If no link identifier is specified, the last opened link is assumed. + * If no link is open, the function will try to establish a link as if + * mssql_connect was called, and use it. + * @throws MssqlException + * + */ +function mssql_select_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \mssql_select_db($database_name, $link_identifier); + } else { + $result = \mssql_select_db($database_name); + } + if ($result === false) { + throw MssqlException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/deprecated/stats.php b/vendor/thecodingmachine/safe/deprecated/stats.php new file mode 100644 index 000000000..aca984859 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/stats.php @@ -0,0 +1,108 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\StatsException; + +/** + * Returns the covariance of a and b. + * + * @param array $a The first array + * @param array $b The second array + * @return float Returns the covariance of a and b. + * @throws StatsException + * + */ +function stats_covariance(array $a, array $b): float +{ + error_clear_last(); + $result = \stats_covariance($a, $b); + if ($result === false) { + throw StatsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the standard deviation of the values in a. + * + * @param array $a The array of data to find the standard deviation for. Note that all + * values of the array will be cast to float. + * @param bool $sample Indicates if a represents a sample of the + * population; defaults to FALSE. + * @return float Returns the standard deviation on success; FALSE on failure. + * @throws StatsException + * + */ +function stats_standard_deviation(array $a, bool $sample = false): float +{ + error_clear_last(); + $result = \stats_standard_deviation($a, $sample); + if ($result === false) { + throw StatsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the Pearson correlation coefficient between arr1 and arr2. + * + * @param array $arr1 The first array + * @param array $arr2 The second array + * @return float Returns the Pearson correlation coefficient between arr1 and arr2. + * @throws StatsException + * + */ +function stats_stat_correlation(array $arr1, array $arr2): float +{ + error_clear_last(); + $result = \stats_stat_correlation($arr1, $arr2); + if ($result === false) { + throw StatsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the inner product of arr1 and arr2. + * + * @param array $arr1 The first array + * @param array $arr2 The second array + * @return float Returns the inner product of arr1 and arr2. + * @throws StatsException + * + */ +function stats_stat_innerproduct(array $arr1, array $arr2): float +{ + error_clear_last(); + $result = \stats_stat_innerproduct($arr1, $arr2); + if ($result === false) { + throw StatsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the variance of the values in a. + * + * @param array $a The array of data to find the standard deviation for. Note that all + * values of the array will be cast to float. + * @param bool $sample Indicates if a represents a sample of the + * population; defaults to FALSE. + * @return float Returns the variance on success; FALSE on failure. + * @throws StatsException + * + */ +function stats_variance(array $a, bool $sample = false): float +{ + error_clear_last(); + $result = \stats_variance($a, $sample); + if ($result === false) { + throw StatsException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep b/vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ApacheException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ApacheException.php new file mode 100644 index 000000000..5d69236fa --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ApacheException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ApacheException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ApcuException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ApcuException.php new file mode 100644 index 000000000..a9fc893e5 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ApcuException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ApcuException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ArrayException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ArrayException.php new file mode 100644 index 000000000..154800c32 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ArrayException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ArrayException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/Bzip2Exception.php b/vendor/thecodingmachine/safe/generated/Exceptions/Bzip2Exception.php new file mode 100644 index 000000000..dd4ab83f3 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/Bzip2Exception.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class Bzip2Exception extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/CalendarException.php b/vendor/thecodingmachine/safe/generated/Exceptions/CalendarException.php new file mode 100644 index 000000000..66ba58842 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/CalendarException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class CalendarException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ClassobjException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ClassobjException.php new file mode 100644 index 000000000..1c377b516 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ClassobjException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ClassobjException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ComException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ComException.php new file mode 100644 index 000000000..154213436 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ComException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ComException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/CubridException.php b/vendor/thecodingmachine/safe/generated/Exceptions/CubridException.php new file mode 100644 index 000000000..853c8d258 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/CubridException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class CubridException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/DatetimeException.php b/vendor/thecodingmachine/safe/generated/Exceptions/DatetimeException.php new file mode 100644 index 000000000..63d5f9388 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/DatetimeException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class DatetimeException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/DirException.php b/vendor/thecodingmachine/safe/generated/Exceptions/DirException.php new file mode 100644 index 000000000..100308e60 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/DirException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class DirException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/EioException.php b/vendor/thecodingmachine/safe/generated/Exceptions/EioException.php new file mode 100644 index 000000000..f4e121ab7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/EioException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class EioException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ErrorfuncException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ErrorfuncException.php new file mode 100644 index 000000000..bf412400d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ErrorfuncException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ErrorfuncException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ExecException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ExecException.php new file mode 100644 index 000000000..f7c503c8c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ExecException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ExecException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/FileinfoException.php b/vendor/thecodingmachine/safe/generated/Exceptions/FileinfoException.php new file mode 100644 index 000000000..b9e3abbee --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/FileinfoException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class FileinfoException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/FilesystemException.php b/vendor/thecodingmachine/safe/generated/Exceptions/FilesystemException.php new file mode 100644 index 000000000..3c1c70e30 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/FilesystemException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class FilesystemException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/FilterException.php b/vendor/thecodingmachine/safe/generated/Exceptions/FilterException.php new file mode 100644 index 000000000..a2c1b5c88 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/FilterException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class FilterException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/FpmException.php b/vendor/thecodingmachine/safe/generated/Exceptions/FpmException.php new file mode 100644 index 000000000..0017b4c2c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/FpmException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class FpmException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/FtpException.php b/vendor/thecodingmachine/safe/generated/Exceptions/FtpException.php new file mode 100644 index 000000000..0e2b7dded --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/FtpException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class FtpException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/FunchandException.php b/vendor/thecodingmachine/safe/generated/Exceptions/FunchandException.php new file mode 100644 index 000000000..1ee4a2113 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/FunchandException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class FunchandException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/GmpException.php b/vendor/thecodingmachine/safe/generated/Exceptions/GmpException.php new file mode 100644 index 000000000..a13c11a6e --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/GmpException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class GmpException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/GnupgException.php b/vendor/thecodingmachine/safe/generated/Exceptions/GnupgException.php new file mode 100644 index 000000000..cf3a1e74a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/GnupgException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class GnupgException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/HashException.php b/vendor/thecodingmachine/safe/generated/Exceptions/HashException.php new file mode 100644 index 000000000..1dc09763d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/HashException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class HashException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/IbaseException.php b/vendor/thecodingmachine/safe/generated/Exceptions/IbaseException.php new file mode 100644 index 000000000..0346ec3c2 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/IbaseException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class IbaseException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/IbmDb2Exception.php b/vendor/thecodingmachine/safe/generated/Exceptions/IbmDb2Exception.php new file mode 100644 index 000000000..4843f8521 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/IbmDb2Exception.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class IbmDb2Exception extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/IconvException.php b/vendor/thecodingmachine/safe/generated/Exceptions/IconvException.php new file mode 100644 index 000000000..0dd163709 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/IconvException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class IconvException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ImageException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ImageException.php new file mode 100644 index 000000000..c49880346 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ImageException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ImageException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ImapException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ImapException.php new file mode 100644 index 000000000..6b6bbc7fe --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ImapException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ImapException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/InfoException.php b/vendor/thecodingmachine/safe/generated/Exceptions/InfoException.php new file mode 100644 index 000000000..5221e1fd8 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/InfoException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class InfoException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php b/vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php new file mode 100644 index 000000000..ca40822e9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class IngresiiException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/InotifyException.php b/vendor/thecodingmachine/safe/generated/Exceptions/InotifyException.php new file mode 100644 index 000000000..64048dca9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/InotifyException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class InotifyException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/LdapException.php b/vendor/thecodingmachine/safe/generated/Exceptions/LdapException.php new file mode 100644 index 000000000..5c142cb08 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/LdapException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class LdapException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/LibxmlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/LibxmlException.php new file mode 100644 index 000000000..b2772da0a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/LibxmlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class LibxmlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/LzfException.php b/vendor/thecodingmachine/safe/generated/Exceptions/LzfException.php new file mode 100644 index 000000000..82352faa7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/LzfException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class LzfException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MailparseException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MailparseException.php new file mode 100644 index 000000000..1f3d73708 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MailparseException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MailparseException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MbstringException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MbstringException.php new file mode 100644 index 000000000..2f7913a3e --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MbstringException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MbstringException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MiscException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MiscException.php new file mode 100644 index 000000000..2fd1475dc --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MiscException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MiscException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php new file mode 100644 index 000000000..c67314ea8 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MsqlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlException.php new file mode 100644 index 000000000..bd6904383 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MysqlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php new file mode 100644 index 000000000..4cadf6ca1 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MysqliException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php new file mode 100644 index 000000000..5e9b55944 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MysqlndMsException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php new file mode 100644 index 000000000..4db9f4911 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class MysqlndQcException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/NetworkException.php b/vendor/thecodingmachine/safe/generated/Exceptions/NetworkException.php new file mode 100644 index 000000000..e740ca19c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/NetworkException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class NetworkException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/Oci8Exception.php b/vendor/thecodingmachine/safe/generated/Exceptions/Oci8Exception.php new file mode 100644 index 000000000..b1d93b21a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/Oci8Exception.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class Oci8Exception extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/OpcacheException.php b/vendor/thecodingmachine/safe/generated/Exceptions/OpcacheException.php new file mode 100644 index 000000000..03309e77d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/OpcacheException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class OpcacheException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/OutcontrolException.php b/vendor/thecodingmachine/safe/generated/Exceptions/OutcontrolException.php new file mode 100644 index 000000000..ffc91f7bc --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/OutcontrolException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class OutcontrolException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php new file mode 100644 index 000000000..f0edba123 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PasswordException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PcntlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PcntlException.php new file mode 100644 index 000000000..00d51f131 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PcntlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PcntlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php new file mode 100644 index 000000000..bcf36b3ce --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PdfException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PgsqlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PgsqlException.php new file mode 100644 index 000000000..5d264c2f0 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PgsqlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PgsqlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PosixException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PosixException.php new file mode 100644 index 000000000..3eec244c6 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PosixException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PosixException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PsException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PsException.php new file mode 100644 index 000000000..7571ebf57 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PsException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PsException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PspellException.php b/vendor/thecodingmachine/safe/generated/Exceptions/PspellException.php new file mode 100644 index 000000000..7645cc910 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/PspellException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class PspellException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ReadlineException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ReadlineException.php new file mode 100644 index 000000000..b6bb37082 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ReadlineException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ReadlineException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/RpminfoException.php b/vendor/thecodingmachine/safe/generated/Exceptions/RpminfoException.php new file mode 100644 index 000000000..7596451d3 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/RpminfoException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class RpminfoException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/RrdException.php b/vendor/thecodingmachine/safe/generated/Exceptions/RrdException.php new file mode 100644 index 000000000..45793e804 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/RrdException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class RrdException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SemException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SemException.php new file mode 100644 index 000000000..dd97ea5fa --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SemException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SemException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SessionException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SessionException.php new file mode 100644 index 000000000..9c1be7975 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SessionException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SessionException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ShmopException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ShmopException.php new file mode 100644 index 000000000..0673848a7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ShmopException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ShmopException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php new file mode 100644 index 000000000..67804e133 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SimplexmlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SocketsException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SocketsException.php new file mode 100644 index 000000000..172f5d78f --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SocketsException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SocketsException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SodiumException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SodiumException.php new file mode 100644 index 000000000..f33ec049e --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SodiumException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SodiumException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SolrException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SolrException.php new file mode 100644 index 000000000..2431870f7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SolrException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SolrException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SplException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SplException.php new file mode 100644 index 000000000..cae8dbc25 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SplException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SplException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SqlsrvException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SqlsrvException.php new file mode 100644 index 000000000..6015cd263 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SqlsrvException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SqlsrvException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SsdeepException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SsdeepException.php new file mode 100644 index 000000000..209017945 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SsdeepException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SsdeepException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/Ssh2Exception.php b/vendor/thecodingmachine/safe/generated/Exceptions/Ssh2Exception.php new file mode 100644 index 000000000..72ca90fd7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/Ssh2Exception.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class Ssh2Exception extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/StreamException.php b/vendor/thecodingmachine/safe/generated/Exceptions/StreamException.php new file mode 100644 index 000000000..24624749f --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/StreamException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class StreamException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/StringsException.php b/vendor/thecodingmachine/safe/generated/Exceptions/StringsException.php new file mode 100644 index 000000000..9e7b356da --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/StringsException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class StringsException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SwooleException.php b/vendor/thecodingmachine/safe/generated/Exceptions/SwooleException.php new file mode 100644 index 000000000..088c0de87 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/SwooleException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class SwooleException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/UodbcException.php b/vendor/thecodingmachine/safe/generated/Exceptions/UodbcException.php new file mode 100644 index 000000000..92f94a52f --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/UodbcException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class UodbcException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/UopzException.php b/vendor/thecodingmachine/safe/generated/Exceptions/UopzException.php new file mode 100644 index 000000000..16e1ab5d7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/UopzException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class UopzException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/UrlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/UrlException.php new file mode 100644 index 000000000..770125017 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/UrlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class UrlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/VarException.php b/vendor/thecodingmachine/safe/generated/Exceptions/VarException.php new file mode 100644 index 000000000..b2427c9fc --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/VarException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class VarException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/XdiffException.php b/vendor/thecodingmachine/safe/generated/Exceptions/XdiffException.php new file mode 100644 index 000000000..c6adcd574 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/XdiffException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class XdiffException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/XmlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/XmlException.php new file mode 100644 index 000000000..ebca08f36 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/XmlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class XmlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/XmlrpcException.php b/vendor/thecodingmachine/safe/generated/Exceptions/XmlrpcException.php new file mode 100644 index 000000000..70e12d67a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/XmlrpcException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class XmlrpcException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/YamlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/YamlException.php new file mode 100644 index 000000000..f1c2e60a3 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/YamlException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class YamlException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/YazException.php b/vendor/thecodingmachine/safe/generated/Exceptions/YazException.php new file mode 100644 index 000000000..22a174f5c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/YazException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class YazException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ZipException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ZipException.php new file mode 100644 index 000000000..fb6ba54f5 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ZipException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ZipException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ZlibException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ZlibException.php new file mode 100644 index 000000000..35f81b019 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ZlibException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ZlibException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} diff --git a/vendor/thecodingmachine/safe/generated/apache.php b/vendor/thecodingmachine/safe/generated/apache.php new file mode 100644 index 000000000..e71c32d7b --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/apache.php @@ -0,0 +1,177 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ApacheException; + +/** + * Fetch the Apache version. + * + * @return string Returns the Apache version on success. + * @throws ApacheException + * + */ +function apache_get_version(): string +{ + error_clear_last(); + $result = \apache_get_version(); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieve an Apache environment variable specified by + * variable. + * + * This function requires Apache 2 otherwise it's undefined. + * + * @param string $variable The Apache environment variable + * @param bool $walk_to_top Whether to get the top-level variable available to all Apache layers. + * @return string The value of the Apache environment variable on success + * @throws ApacheException + * + */ +function apache_getenv(string $variable, bool $walk_to_top = false): string +{ + error_clear_last(); + $result = \apache_getenv($variable, $walk_to_top); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } + return $result; +} + + +/** + * Fetches all HTTP request headers from the current request. Works in the + * Apache, FastCGI, CLI, FPM and NSAPI server module + * in Netscape/iPlanet/SunONE webservers. + * + * @return array An associative array of all the HTTP headers in the current request. + * @throws ApacheException + * + */ +function apache_request_headers(): array +{ + error_clear_last(); + $result = \apache_request_headers(); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } + return $result; +} + + +/** + * apache_reset_timeout resets the Apache write timer, + * which defaults to 300 seconds. With set_time_limit(0); + * ignore_user_abort(true) and periodic + * apache_reset_timeout calls, Apache can theoretically + * run forever. + * + * This function requires Apache 1. + * + * @throws ApacheException + * + */ +function apache_reset_timeout(): void +{ + error_clear_last(); + $result = \apache_reset_timeout(); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } +} + + +/** + * Fetch all HTTP response headers. Works in the + * Apache, FastCGI, CLI, FPM and NSAPI server module + * in Netscape/iPlanet/SunONE webservers. + * + * @return array An array of all Apache response headers on success. + * @throws ApacheException + * + */ +function apache_response_headers(): array +{ + error_clear_last(); + $result = \apache_response_headers(); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } + return $result; +} + + +/** + * apache_setenv sets the value of the Apache + * environment variable specified by + * variable. + * + * @param string $variable The environment variable that's being set. + * @param string $value The new variable value. + * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. + * @throws ApacheException + * + */ +function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void +{ + error_clear_last(); + $result = \apache_setenv($variable, $value, $walk_to_top); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } +} + + +/** + * Fetches all HTTP headers from the current request. + * + * This function is an alias for apache_request_headers. + * Please read the apache_request_headers + * documentation for more information on how this function works. + * + * @return array An associative array of all the HTTP headers in the current request. + * @throws ApacheException + * + */ +function getallheaders(): array +{ + error_clear_last(); + $result = \getallheaders(); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } + return $result; +} + + +/** + * virtual is an Apache-specific function which + * is similar to <!--#include virtual...--> in + * mod_include. + * It performs an Apache sub-request. It is useful for including + * CGI scripts or .shtml files, or anything else that you would + * parse through Apache. Note that for a CGI script, the script + * must generate valid CGI headers. At the minimum that means it + * must generate a Content-Type header. + * + * To run the sub-request, all buffers are terminated and flushed to the + * browser, pending headers are sent too. + * + * @param string $filename The file that the virtual command will be performed on. + * @throws ApacheException + * + */ +function virtual(string $filename): void +{ + error_clear_last(); + $result = \virtual($filename); + if ($result === false) { + throw ApacheException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/apcu.php b/vendor/thecodingmachine/safe/generated/apcu.php new file mode 100644 index 000000000..733b24360 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/apcu.php @@ -0,0 +1,112 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ApcuException; + +/** + * Retrieves cached information and meta-data from APC's data store. + * + * @param bool $limited If limited is TRUE, the + * return value will exclude the individual list of cache entries. This + * is useful when trying to optimize calls for statistics gathering. + * @return array Array of cached data (and meta-data) + * @throws ApcuException + * + */ +function apcu_cache_info(bool $limited = false): array +{ + error_clear_last(); + $result = \apcu_cache_info($limited); + if ($result === false) { + throw ApcuException::createFromPhpError(); + } + return $result; +} + + +/** + * apcu_cas updates an already existing integer value if the + * old parameter matches the currently stored value + * with the value of the new parameter. + * + * @param string $key The key of the value being updated. + * @param int $old The old value (the value currently stored). + * @param int $new The new value to update to. + * @throws ApcuException + * + */ +function apcu_cas(string $key, int $old, int $new): void +{ + error_clear_last(); + $result = \apcu_cas($key, $old, $new); + if ($result === false) { + throw ApcuException::createFromPhpError(); + } +} + + +/** + * Decreases a stored integer value. + * + * @param string $key The key of the value being decreased. + * @param int $step The step, or value to decrease. + * @param bool|null $success Optionally pass the success or fail boolean value to + * this referenced variable. + * @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one). + * @return int Returns the current value of key's value on success + * @throws ApcuException + * + */ +function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int +{ + error_clear_last(); + $result = \apcu_dec($key, $step, $success, $ttl); + if ($result === false) { + throw ApcuException::createFromPhpError(); + } + return $result; +} + + +/** + * Increases a stored number. + * + * @param string $key The key of the value being increased. + * @param int $step The step, or value to increase. + * @param bool|null $success Optionally pass the success or fail boolean value to + * this referenced variable. + * @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one). + * @return int Returns the current value of key's value on success + * @throws ApcuException + * + */ +function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int +{ + error_clear_last(); + $result = \apcu_inc($key, $step, $success, $ttl); + if ($result === false) { + throw ApcuException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves APCu Shared Memory Allocation information. + * + * @param bool $limited When set to FALSE (default) apcu_sma_info will + * return a detailed information about each segment. + * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @throws ApcuException + * + */ +function apcu_sma_info(bool $limited = false): array +{ + error_clear_last(); + $result = \apcu_sma_info($limited); + if ($result === false) { + throw ApcuException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/array.php b/vendor/thecodingmachine/safe/generated/array.php new file mode 100644 index 000000000..80c90ff81 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/array.php @@ -0,0 +1,464 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ArrayException; + +/** + * Creates an array by using the values from the + * keys array as keys and the values from the + * values array as the corresponding values. + * + * @param array $keys Array of keys to be used. Illegal values for key will be + * converted to string. + * @param array $values Array of values to be used + * @return array Returns the combined array, FALSE if the number of elements + * for each array isn't equal. + * @throws ArrayException + * + */ +function array_combine(array $keys, array $values): array +{ + error_clear_last(); + $result = \array_combine($keys, $values); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } + return $result; +} + + +/** + * array_flip returns an array in flip + * order, i.e. keys from array become values and values + * from array become keys. + * + * Note that the values of array need to be valid + * keys, i.e. they need to be either integer or + * string. A warning will be emitted if a value has the wrong + * type, and the key/value pair in question will not be included + * in the result. + * + * If a value has several occurrences, the latest key will be + * used as its value, and all others will be lost. + * + * @param array $array An array of key/value pairs to be flipped. + * @return array Returns the flipped array on success. + * @throws ArrayException + * + */ +function array_flip(array $array): array +{ + error_clear_last(); + $result = \array_flip($array); + if ($result === null) { + throw ArrayException::createFromPhpError(); + } + return $result; +} + + +/** + * array_replace_recursive replaces the values of + * array1 with the same values from all the following + * arrays. If a key from the first array exists in the second array, its value + * will be replaced by the value from the second array. If the key exists in the + * second array, and not the first, it will be created in the first array. + * If a key only exists in the first array, it will be left as is. + * If several arrays are passed for replacement, they will be processed + * in order, the later array overwriting the previous values. + * + * array_replace_recursive is recursive : it will recurse into + * arrays and apply the same process to the inner value. + * + * When the value in the first array is scalar, it will be replaced + * by the value in the second array, may it be scalar or array. + * When the value in the first array and the second array + * are both arrays, array_replace_recursive will replace + * their respective value recursively. + * + * @param array $array1 The array in which elements are replaced. + * @param array $params Optional. Arrays from which elements will be extracted. + * @return array Returns an array. + * @throws ArrayException + * + */ +function array_replace_recursive(array $array1, array ...$params): array +{ + error_clear_last(); + if ($params !== []) { + $result = \array_replace_recursive($array1, ...$params); + } else { + $result = \array_replace_recursive($array1); + } + if ($result === null) { + throw ArrayException::createFromPhpError(); + } + return $result; +} + + +/** + * array_replace replaces the values of + * array1 with values having the same keys in each of the following + * arrays. If a key from the first array exists in the second array, its value + * will be replaced by the value from the second array. If the key exists in the + * second array, and not the first, it will be created in the first array. + * If a key only exists in the first array, it will be left as is. + * If several arrays are passed for replacement, they will be processed + * in order, the later arrays overwriting the previous values. + * + * array_replace is not recursive : it will replace + * values in the first array by whatever type is in the second array. + * + * @param array $array1 The array in which elements are replaced. + * @param array $params Arrays from which elements will be extracted. + * Values from later arrays overwrite the previous values. + * @return array Returns an array. + * @throws ArrayException + * + */ +function array_replace(array $array1, array ...$params): array +{ + error_clear_last(); + if ($params !== []) { + $result = \array_replace($array1, ...$params); + } else { + $result = \array_replace($array1); + } + if ($result === null) { + throw ArrayException::createFromPhpError(); + } + return $result; +} + + +/** + * Applies the user-defined callback function to each + * element of the array. This function will recurse + * into deeper arrays. + * + * @param array $array The input array. + * @param callable $callback Typically, callback takes on two parameters. + * The array parameter's value being the first, and + * the key/index second. + * + * If callback needs to be working with the + * actual values of the array, specify the first parameter of + * callback as a + * reference. Then, + * any changes made to those elements will be made in the + * original array itself. + * @param mixed $userdata If the optional userdata parameter is supplied, + * it will be passed as the third parameter to the + * callback. + * @throws ArrayException + * + */ +function array_walk_recursive(array &$array, callable $callback, $userdata = null): void +{ + error_clear_last(); + $result = \array_walk_recursive($array, $callback, $userdata); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function sorts an array such that array indices maintain their + * correlation with the array elements they are associated with. + * + * This is used mainly when sorting associative arrays where the actual + * element order is significant. + * + * @param array $array The input array. + * @param int $sort_flags You may modify the behavior of the sort using the optional parameter + * sort_flags, for details see + * sort. + * @throws ArrayException + * + */ +function arsort(array &$array, int $sort_flags = SORT_REGULAR): void +{ + error_clear_last(); + $result = \arsort($array, $sort_flags); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function sorts an array such that array indices maintain + * their correlation with the array elements they are associated + * with. This is used mainly when sorting associative arrays where + * the actual element order is significant. + * + * @param array $array The input array. + * @param int $sort_flags You may modify the behavior of the sort using the optional + * parameter sort_flags, for details + * see sort. + * @throws ArrayException + * + */ +function asort(array &$array, int $sort_flags = SORT_REGULAR): void +{ + error_clear_last(); + $result = \asort($array, $sort_flags); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * Sorts an array by key in reverse order, maintaining key to data + * correlations. This is useful mainly for associative arrays. + * + * @param array $array The input array. + * @param int $sort_flags You may modify the behavior of the sort using the optional parameter + * sort_flags, for details see + * sort. + * @throws ArrayException + * + */ +function krsort(array &$array, int $sort_flags = SORT_REGULAR): void +{ + error_clear_last(); + $result = \krsort($array, $sort_flags); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * Sorts an array by key, maintaining key to data correlations. This is + * useful mainly for associative arrays. + * + * @param array $array The input array. + * @param int $sort_flags You may modify the behavior of the sort using the optional + * parameter sort_flags, for details + * see sort. + * @throws ArrayException + * + */ +function ksort(array &$array, int $sort_flags = SORT_REGULAR): void +{ + error_clear_last(); + $result = \ksort($array, $sort_flags); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * natcasesort is a case insensitive version of + * natsort. + * + * This function implements a sort algorithm that orders + * alphanumeric strings in the way a human being would while maintaining + * key/value associations. This is described as a "natural ordering". + * + * @param array $array The input array. + * @throws ArrayException + * + */ +function natcasesort(array &$array): void +{ + error_clear_last(); + $result = \natcasesort($array); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function implements a sort algorithm that orders alphanumeric strings + * in the way a human being would while maintaining key/value associations. + * This is described as a "natural ordering". An example of the difference + * between this algorithm and the regular computer string sorting algorithms + * (used in sort) can be seen in the example below. + * + * @param array $array The input array. + * @throws ArrayException + * + */ +function natsort(array &$array): void +{ + error_clear_last(); + $result = \natsort($array); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function sorts an array in reverse order (highest to lowest). + * + * @param array $array The input array. + * @param int $sort_flags You may modify the behavior of the sort using the optional + * parameter sort_flags, for details see + * sort. + * @throws ArrayException + * + */ +function rsort(array &$array, int $sort_flags = SORT_REGULAR): void +{ + error_clear_last(); + $result = \rsort($array, $sort_flags); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function shuffles (randomizes the order of the elements in) an array. + * It uses a pseudo random number generator that is not suitable for + * cryptographic purposes. + * + * @param array $array The array. + * @throws ArrayException + * + */ +function shuffle(array &$array): void +{ + error_clear_last(); + $result = \shuffle($array); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function sorts an array. Elements will be arranged from + * lowest to highest when this function has completed. + * + * @param array $array The input array. + * @param int $sort_flags The optional second parameter sort_flags + * may be used to modify the sorting behavior using these values: + * + * Sorting type flags: + * + * + * SORT_REGULAR - compare items normally; + * the details are described in the comparison operators section + * + * + * SORT_NUMERIC - compare items numerically + * + * + * SORT_STRING - compare items as strings + * + * + * + * SORT_LOCALE_STRING - compare items as + * strings, based on the current locale. It uses the locale, + * which can be changed using setlocale + * + * + * + * + * SORT_NATURAL - compare items as strings + * using "natural ordering" like natsort + * + * + * + * + * SORT_FLAG_CASE - can be combined + * (bitwise OR) with + * SORT_STRING or + * SORT_NATURAL to sort strings case-insensitively + * + * + * + * @throws ArrayException + * + */ +function sort(array &$array, int $sort_flags = SORT_REGULAR): void +{ + error_clear_last(); + $result = \sort($array, $sort_flags); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function sorts an array such that array indices maintain their + * correlation with the array elements they are associated with, using a + * user-defined comparison function. + * + * This is used mainly when sorting associative arrays where the actual + * element order is significant. + * + * @param array $array The input array. + * @param callable $value_compare_func See usort and uksort for + * examples of user-defined comparison functions. + * @throws ArrayException + * + */ +function uasort(array &$array, callable $value_compare_func): void +{ + error_clear_last(); + $result = \uasort($array, $value_compare_func); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * uksort will sort the keys of an array using a + * user-supplied comparison function. If the array you wish to sort + * needs to be sorted by some non-trivial criteria, you should use + * this function. + * + * @param array $array The input array. + * @param callable $key_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. + * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647. + * @throws ArrayException + * + */ +function uksort(array &$array, callable $key_compare_func): void +{ + error_clear_last(); + $result = \uksort($array, $key_compare_func); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} + + +/** + * This function will sort an array by its values using a user-supplied + * comparison function. If the array you wish to sort needs to be sorted by + * some non-trivial criteria, you should use this function. + * + * @param array $array The input array. + * @param callable $value_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. + * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647. + * + * Returning non-integer values from the comparison + * function, such as float, will result in an internal cast to + * integer of the callback's return value. So values such as + * 0.99 and 0.1 will both be cast to an integer value of 0, which will + * compare such values as equal. + * @throws ArrayException + * + */ +function usort(array &$array, callable $value_compare_func): void +{ + error_clear_last(); + $result = \usort($array, $value_compare_func); + if ($result === false) { + throw ArrayException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/bzip2.php b/vendor/thecodingmachine/safe/generated/bzip2.php new file mode 100644 index 000000000..77302aa00 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/bzip2.php @@ -0,0 +1,96 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\Bzip2Exception; + +/** + * Closes the given bzip2 file pointer. + * + * @param resource $bz The file pointer. It must be valid and must point to a file + * successfully opened by bzopen. + * @throws Bzip2Exception + * + */ +function bzclose($bz): void +{ + error_clear_last(); + $result = \bzclose($bz); + if ($result === false) { + throw Bzip2Exception::createFromPhpError(); + } +} + + +/** + * Forces a write of all buffered bzip2 data for the file pointer + * bz. + * + * @param resource $bz The file pointer. It must be valid and must point to a file + * successfully opened by bzopen. + * @throws Bzip2Exception + * + */ +function bzflush($bz): void +{ + error_clear_last(); + $result = \bzflush($bz); + if ($result === false) { + throw Bzip2Exception::createFromPhpError(); + } +} + + +/** + * bzread reads from the given bzip2 file pointer. + * + * Reading stops when length (uncompressed) bytes have + * been read or EOF is reached, whichever comes first. + * + * @param resource $bz The file pointer. It must be valid and must point to a file + * successfully opened by bzopen. + * @param int $length If not specified, bzread will read 1024 + * (uncompressed) bytes at a time. A maximum of 8192 + * uncompressed bytes will be read at a time. + * @return string Returns the uncompressed data. + * @throws Bzip2Exception + * + */ +function bzread($bz, int $length = 1024): string +{ + error_clear_last(); + $result = \bzread($bz, $length); + if ($result === false) { + throw Bzip2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * bzwrite writes a string into the given bzip2 file + * stream. + * + * @param resource $bz The file pointer. It must be valid and must point to a file + * successfully opened by bzopen. + * @param string $data The written data. + * @param int $length If supplied, writing will stop after length + * (uncompressed) bytes have been written or the end of + * data is reached, whichever comes first. + * @return int Returns the number of bytes written. + * @throws Bzip2Exception + * + */ +function bzwrite($bz, string $data, int $length = null): int +{ + error_clear_last(); + if ($length !== null) { + $result = \bzwrite($bz, $data, $length); + } else { + $result = \bzwrite($bz, $data); + } + if ($result === false) { + throw Bzip2Exception::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/calendar.php b/vendor/thecodingmachine/safe/generated/calendar.php new file mode 100644 index 000000000..aae699923 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/calendar.php @@ -0,0 +1,27 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\CalendarException; + +/** + * This function will return a Unix timestamp corresponding to the + * Julian Day given in jday or FALSE if + * jday is outside of the allowed range. The time returned is + * UTC. + * + * @param int $jday A julian day number between 2440588 and 106751993607888 + * on 64bit systems, or between 2440588 and 2465443 on 32bit systems. + * @return int The unix timestamp for the start (midnight, not noon) of the given Julian day. + * @throws CalendarException + * + */ +function jdtounix(int $jday): int +{ + error_clear_last(); + $result = \jdtounix($jday); + if ($result === false) { + throw CalendarException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/classobj.php b/vendor/thecodingmachine/safe/generated/classobj.php new file mode 100644 index 000000000..98147ac26 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/classobj.php @@ -0,0 +1,25 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ClassobjException; + +/** + * Creates an alias named alias + * based on the user defined class original. + * The aliased class is exactly the same as the original class. + * + * @param string $original The original class. + * @param string $alias The alias name for the class. + * @param bool $autoload Whether to autoload if the original class is not found. + * @throws ClassobjException + * + */ +function class_alias(string $original, string $alias, bool $autoload = true): void +{ + error_clear_last(); + $result = \class_alias($original, $alias, $autoload); + if ($result === false) { + throw ClassobjException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/com.php b/vendor/thecodingmachine/safe/generated/com.php new file mode 100644 index 000000000..53643f9d7 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/com.php @@ -0,0 +1,127 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ComException; + +/** + * Instructs COM to sink events generated by + * comobject into the PHP object + * sinkobject. + * + * Be careful how you use this feature; if you are doing something similar + * to the example below, then it doesn't really make sense to run it in a + * web server context. + * + * @param object $comobject + * @param object $sinkobject sinkobject should be an instance of a class with + * methods named after those of the desired dispinterface; you may use + * com_print_typeinfo to help generate a template class + * for this purpose. + * @param mixed $sinkinterface PHP will attempt to use the default dispinterface type specified by + * the typelibrary associated with comobject, but + * you may override this choice by setting + * sinkinterface to the name of the dispinterface + * that you want to use. + * @throws ComException + * + */ +function com_event_sink(object $comobject, object $sinkobject, $sinkinterface = null): void +{ + error_clear_last(); + if ($sinkinterface !== null) { + $result = \com_event_sink($comobject, $sinkobject, $sinkinterface); + } else { + $result = \com_event_sink($comobject, $sinkobject); + } + if ($result === false) { + throw ComException::createFromPhpError(); + } +} + + +/** + * Loads a type-library and registers its constants in the engine, as though + * they were defined using define. + * + * Note that it is much more efficient to use the configuration setting to pre-load and + * register the constants, although not so flexible. + * + * If you have turned on , then + * PHP will attempt to automatically register the constants associated with a + * COM object when you instantiate it. This depends on the interfaces + * provided by the COM object itself, and may not always be possible. + * + * @param string $typelib_name typelib_name can be one of the following: + * + * + * + * The filename of a .tlb file or the executable module + * that contains the type library. + * + * + * + * + * The type library GUID, followed by its version number, for example + * {00000200-0000-0010-8000-00AA006D2EA4},2,0. + * + * + * + * + * The type library name, e.g. Microsoft OLE DB ActiveX Data + * Objects 1.0 Library. + * + * + * + * PHP will attempt to resolve the type library in this order, as the + * process gets more and more expensive as you progress down the list; + * searching for the type library by name is handled by physically + * enumerating the registry until we find a match. + * + * The filename of a .tlb file or the executable module + * that contains the type library. + * + * The type library GUID, followed by its version number, for example + * {00000200-0000-0010-8000-00AA006D2EA4},2,0. + * + * The type library name, e.g. Microsoft OLE DB ActiveX Data + * Objects 1.0 Library. + * @param bool $case_sensitive The case_sensitive behaves inversely to + * the parameter $case_insensitive in the define + * function. + * @throws ComException + * + */ +function com_load_typelib(string $typelib_name, bool $case_sensitive = true): void +{ + error_clear_last(); + $result = \com_load_typelib($typelib_name, $case_sensitive); + if ($result === false) { + throw ComException::createFromPhpError(); + } +} + + +/** + * The purpose of this function is to help generate a skeleton class for use + * as an event sink. You may also use it to generate a dump of any COM + * object, provided that it supports enough of the introspection interfaces, + * and that you know the name of the interface you want to display. + * + * @param object $comobject comobject should be either an instance of a COM + * object, or be the name of a typelibrary (which will be resolved according + * to the rules set out in com_load_typelib). + * @param string $dispinterface The name of an IDispatch descendant interface that you want to display. + * @param bool $wantsink If set to TRUE, the corresponding sink interface will be displayed + * instead. + * @throws ComException + * + */ +function com_print_typeinfo(object $comobject, string $dispinterface = null, bool $wantsink = false): void +{ + error_clear_last(); + $result = \com_print_typeinfo($comobject, $dispinterface, $wantsink); + if ($result === false) { + throw ComException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/cubrid.php b/vendor/thecodingmachine/safe/generated/cubrid.php new file mode 100644 index 000000000..f19f2d56e --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/cubrid.php @@ -0,0 +1,395 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\CubridException; + +/** + * This function frees the memory occupied by the result data. It returns + * TRUE on success. Note that it can only frees the + * client fetch buffer now, and if you want free all memory, use function + * cubrid_close_request. + * + * @param resource $req_identifier This is the request identifier. + * @throws CubridException + * + */ +function cubrid_free_result($req_identifier): void +{ + error_clear_last(); + $result = \cubrid_free_result($req_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } +} + + +/** + * This function returns the current CUBRID connection charset and is similar + * to the CUBRID MySQL compatible function + * cubrid_client_encoding. + * + * @param resource $conn_identifier The CUBRID connection. + * @return string A string that represents the CUBRID connection charset; on success. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_get_charset($conn_identifier): string +{ + error_clear_last(); + $result = \cubrid_get_charset($conn_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns a string that represents the client library version. + * + * @return string A string that represents the client library version; on success. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_get_client_info(): string +{ + error_clear_last(); + $result = \cubrid_get_client_info(); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns the CUBRID database parameters or it returns FALSE on + * failure. It returns an associative array with the values for the following + * parameters: + * + * + * PARAM_ISOLATION_LEVEL + * PARAM_LOCK_TIMEOUT + * PARAM_MAX_STRING_LENGTH + * PARAM_AUTO_COMMIT + * + * + * + * Database parameters + * + * + * + * Parameter + * Description + * + * + * + * + * PARAM_ISOLATION_LEVEL + * The transaction isolation level. + * + * + * LOCK_TIMEOUT + * CUBRID provides the lock timeout feature, which sets the waiting + * time (in seconds) for the lock until the transaction lock setting is + * allowed. The default value of the lock_timeout_in_secs parameter is + * -1, which means the application client will wait indefinitely until + * the transaction lock is allowed. + * + * + * + * PARAM_AUTO_COMMIT + * In CUBRID PHP, auto-commit mode is disabled by default for + * transaction management. It can be set by using + * cubrid_set_autocommit. + * + * + * + * + * + * + * The following table shows the isolation levels from 1 to 6. It consists of + * table schema (row) and isolation level: + * + * Levels of Isolation Supported by CUBRID + * + * + * + * Name + * Description + * + * + * + * + * SERIALIZABLE (6) + * In this isolation level, problems concerning concurrency (e.g. + * dirty read, non-repeatable read, phantom read, etc.) do not + * occur. + * + * + * REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5) + * Another transaction T2 cannot update the schema of table A while + * transaction T1 is viewing table A. + * Transaction T1 may experience phantom read for the record R that was + * inserted by another transaction T2 when it is repeatedly retrieving a + * specific record. + * + * + * REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4) + * Another transaction T2 cannot update the schema of table A while + * transaction T1 is viewing table A. + * Transaction T1 may experience R read (non-repeatable read) that was + * updated and committed by another transaction T2 when it is repeatedly + * retrieving the record R. + * + * + * REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3) + * Default isolation level. Another transaction T2 cannot update + * the schema of table A while transaction T1 is viewing table A. + * Transaction T1 may experience R' read (dirty read) for the record that + * was updated but not committed by another transaction T2. + * + * + * READ COMMITTED CLASS with READ COMMITTED INSTANCES (2) + * Transaction T1 may experience A' read (non-repeatable read) for + * the table that was updated and committed by another transaction T2 + * while it is viewing table A repeatedly. Transaction T1 may experience + * R' read (non-repeatable read) for the record that was updated and + * committed by another transaction T2 while it is retrieving the record + * R repeatedly. + * + * + * READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1) + * Transaction T1 may experience A' read (non-repeatable read) for + * the table that was updated and committed by another transaction T2 + * while it is repeatedly viewing table A. Transaction T1 may experience + * R' read (dirty read) for the record that was updated but not committed + * by another transaction T2. + * + * + * + * + * + * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, + * the last link opened by cubrid_connect is assumed. + * @return array An associative array with CUBRID database parameters; on success. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_get_db_parameter($conn_identifier): array +{ + error_clear_last(); + $result = \cubrid_get_db_parameter($conn_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns a string that represents the CUBRID server version. + * + * @param resource $conn_identifier The CUBRID connection. + * @return string A string that represents the CUBRID server version; on success. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_get_server_info($conn_identifier): string +{ + error_clear_last(); + $result = \cubrid_get_server_info($conn_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_insert_id function retrieves the ID + * generated for the AUTO_INCREMENT column which is updated by the previous + * INSERT query. It returns 0 if the previous query does not generate new + * rows. + * + * @param resource $conn_identifier The connection identifier previously obtained by a call to + * cubrid_connect. + * @return string A string representing the ID generated for an AUTO_INCREMENT column by the + * previous query, on success. + * + * 0, if the previous query does not generate new rows. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_insert_id($conn_identifier = null): string +{ + error_clear_last(); + if ($conn_identifier !== null) { + $result = \cubrid_insert_id($conn_identifier); + } else { + $result = \cubrid_insert_id(); + } + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_lob2_new function is used to create a lob object (both BLOB and CLOB). + * This function should be used before you bind a lob object. + * + * @param resource $conn_identifier Connection identifier. If the connection identifier is not specified, + * the last connection opened by cubrid_connect or + * cubrid_connect_with_url is assumed. + * @param string $type It may be "BLOB" or "CLOB", it won't be case-sensitive. The default value is "BLOB". + * @return resource Lob identifier when it is successful. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") +{ + error_clear_last(); + if ($type !== "BLOB") { + $result = \cubrid_lob2_new($conn_identifier, $type); + } elseif ($conn_identifier !== null) { + $result = \cubrid_lob2_new($conn_identifier); + } else { + $result = \cubrid_lob2_new(); + } + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_lob2_size function is used to get the size of a lob object. + * + * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @return int It will return the size of the LOB object when it processes successfully. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_lob2_size($lob_identifier): int +{ + error_clear_last(); + $result = \cubrid_lob2_size($lob_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_lob2_size64 function is used to get the + * size of a lob object. If the size of a lob object is larger than an + * integer data can be stored, you can use this function and it will return + * the size as a string. + * + * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @return string It will return the size of the LOB object as a string when it processes successfully. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_lob2_size64($lob_identifier): string +{ + error_clear_last(); + $result = \cubrid_lob2_size64($lob_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_lob2_tell function is used to tell the cursor position of the LOB object. + * + * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @return int It will return the cursor position on the LOB object when it processes successfully. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_lob2_tell($lob_identifier): int +{ + error_clear_last(); + $result = \cubrid_lob2_tell($lob_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_lob2_tell64 function is used to tell the + * cursor position of the LOB object. If the size of a lob object is larger + * than an integer data can be stored, you can use this function and it will + * return the position information as a string. + * + * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @return string It will return the cursor position on the LOB object as a string when it processes successfully. + * + * FALSE on failure. + * @throws CubridException + * + */ +function cubrid_lob2_tell64($lob_identifier): string +{ + error_clear_last(); + $result = \cubrid_lob2_tell64($lob_identifier); + if ($result === false) { + throw CubridException::createFromPhpError(); + } + return $result; +} + + +/** + * The cubrid_set_db_parameter function is used to set + * the CUBRID database parameters. It can set the following CUBRID database + * parameters: + * + * + * PARAM_ISOLATION_LEVEL + * PARAM_LOCK_TIMEOUT + * + * + * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, + * the last link opened by cubrid_connect is assumed. + * @param int $param_type Database parameter type. + * @param int $param_value Isolation level value (1-6) or lock timeout (in seconds) value. + * @throws CubridException + * + */ +function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_value): void +{ + error_clear_last(); + $result = \cubrid_set_db_parameter($conn_identifier, $param_type, $param_value); + if ($result === false) { + throw CubridException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/curl.php b/vendor/thecodingmachine/safe/generated/curl.php new file mode 100644 index 000000000..53f925536 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/curl.php @@ -0,0 +1,3156 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\CurlException; + +/** + * This function URL encodes the given string according to RFC 3986. + * + * @param resource $ch A cURL handle returned by + * curl_init. + * @param string $str The string to be encoded. + * @return string Returns escaped string. + * @throws CurlException + * + */ +function curl_escape($ch, string $str): string +{ + error_clear_last(); + $result = \curl_escape($ch, $str); + if ($result === false) { + throw CurlException::createFromCurlResource($ch); + } + return $result; +} + + +/** + * Execute the given cURL session. + * + * This function should be called after initializing a cURL session and all + * the options for the session are set. + * + * @param resource $ch A cURL handle returned by + * curl_init. + * @return bool|string Returns TRUE on success. However, if the CURLOPT_RETURNTRANSFER + * option is set, it will return + * the result on success, FALSE on failure. + * @throws CurlException + * + */ +function curl_exec($ch) +{ + error_clear_last(); + $result = \curl_exec($ch); + if ($result === false) { + throw CurlException::createFromCurlResource($ch); + } + return $result; +} + + +/** + * Gets information about the last transfer. + * + * @param resource $ch A cURL handle returned by + * curl_init. + * @param int $opt This may be one of the following constants: + * + * + * + * CURLINFO_EFFECTIVE_URL - Last effective URL + * + * + * + * + * CURLINFO_HTTP_CODE - The last response code. + * As of PHP 5.5.0 and cURL 7.10.8, this is a legacy alias of + * CURLINFO_RESPONSE_CODE + * + * + * + * + * CURLINFO_FILETIME - Remote time of the retrieved document, with the CURLOPT_FILETIME enabled; if -1 is returned the time of the document is unknown + * + * + * + * + * CURLINFO_TOTAL_TIME - Total transaction time in seconds for last transfer + * + * + * + * + * CURLINFO_NAMELOOKUP_TIME - Time in seconds until name resolving was complete + * + * + * + * + * CURLINFO_CONNECT_TIME - Time in seconds it took to establish the connection + * + * + * + * + * CURLINFO_PRETRANSFER_TIME - Time in seconds from start until just before file transfer begins + * + * + * + * + * CURLINFO_STARTTRANSFER_TIME - Time in seconds until the first byte is about to be transferred + * + * + * + * + * CURLINFO_REDIRECT_COUNT - Number of redirects, with the CURLOPT_FOLLOWLOCATION option enabled + * + * + * + * + * CURLINFO_REDIRECT_TIME - Time in seconds of all redirection steps before final transaction was started, with the CURLOPT_FOLLOWLOCATION option enabled + * + * + * + * + * CURLINFO_REDIRECT_URL - With the CURLOPT_FOLLOWLOCATION option disabled: redirect URL found in the last transaction, that should be requested manually next. With the CURLOPT_FOLLOWLOCATION option enabled: this is empty. The redirect URL in this case is available in CURLINFO_EFFECTIVE_URL + * + * + * + * + * CURLINFO_PRIMARY_IP - IP address of the most recent connection + * + * + * + * + * CURLINFO_PRIMARY_PORT - Destination port of the most recent connection + * + * + * + * + * CURLINFO_LOCAL_IP - Local (source) IP address of the most recent connection + * + * + * + * + * CURLINFO_LOCAL_PORT - Local (source) port of the most recent connection + * + * + * + * + * CURLINFO_SIZE_UPLOAD - Total number of bytes uploaded + * + * + * + * + * CURLINFO_SIZE_DOWNLOAD - Total number of bytes downloaded + * + * + * + * + * CURLINFO_SPEED_DOWNLOAD - Average download speed + * + * + * + * + * CURLINFO_SPEED_UPLOAD - Average upload speed + * + * + * + * + * CURLINFO_HEADER_SIZE - Total size of all headers received + * + * + * + * + * CURLINFO_HEADER_OUT - The request string sent. For this to + * work, add the CURLINFO_HEADER_OUT option to the handle by calling + * curl_setopt + * + * + * + * + * CURLINFO_REQUEST_SIZE - Total size of issued requests, currently only for HTTP requests + * + * + * + * + * CURLINFO_SSL_VERIFYRESULT - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER + * + * + * + * + * CURLINFO_CONTENT_LENGTH_DOWNLOAD - Content length of download, read from Content-Length: field + * + * + * + * + * CURLINFO_CONTENT_LENGTH_UPLOAD - Specified size of upload + * + * + * + * + * CURLINFO_CONTENT_TYPE - Content-Type: of the requested document. NULL indicates server did not send valid Content-Type: header + * + * + * + * + * CURLINFO_PRIVATE - Private data associated with this cURL handle, previously set with the CURLOPT_PRIVATE option of curl_setopt + * + * + * + * + * CURLINFO_RESPONSE_CODE - The last response code + * + * + * + * + * CURLINFO_HTTP_CONNECTCODE - The CONNECT response code + * + * + * + * + * CURLINFO_HTTPAUTH_AVAIL - Bitmask indicating the authentication method(s) available according to the previous response + * + * + * + * + * CURLINFO_PROXYAUTH_AVAIL - Bitmask indicating the proxy authentication method(s) available according to the previous response + * + * + * + * + * CURLINFO_OS_ERRNO - Errno from a connect failure. The number is OS and system specific. + * + * + * + * + * CURLINFO_NUM_CONNECTS - Number of connections curl had to create to achieve the previous transfer + * + * + * + * + * CURLINFO_SSL_ENGINES - OpenSSL crypto-engines supported + * + * + * + * + * CURLINFO_COOKIELIST - All known cookies + * + * + * + * + * CURLINFO_FTP_ENTRY_PATH - Entry path in FTP server + * + * + * + * + * CURLINFO_APPCONNECT_TIME - Time in seconds it took from the start until the SSL/SSH connect/handshake to the remote host was completed + * + * + * + * + * CURLINFO_CERTINFO - TLS certificate chain + * + * + * + * + * CURLINFO_CONDITION_UNMET - Info on unmet time conditional + * + * + * + * + * CURLINFO_RTSP_CLIENT_CSEQ - Next RTSP client CSeq + * + * + * + * + * CURLINFO_RTSP_CSEQ_RECV - Recently received CSeq + * + * + * + * + * CURLINFO_RTSP_SERVER_CSEQ - Next RTSP server CSeq + * + * + * + * + * CURLINFO_RTSP_SESSION_ID - RTSP session ID + * + * + * + * + * CURLINFO_CONTENT_LENGTH_DOWNLOAD_T - The content-length of the download. This is the value read from the Content-Type: field. -1 if the size isn't known + * + * + * + * + * CURLINFO_CONTENT_LENGTH_UPLOAD_T - The specified size of the upload. -1 if the size isn't known + * + * + * + * + * CURLINFO_HTTP_VERSION - The version used in the last HTTP connection. The return value will be one of the defined CURL_HTTP_VERSION_* constants or 0 if the version can't be determined + * + * + * + * + * CURLINFO_PROTOCOL - The protocol used in the last HTTP connection. The returned value will be exactly one of the CURLPROTO_* values + * + * + * + * + * CURLINFO_PROXY_SSL_VERIFYRESULT - The result of the certificate verification that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER option). Only used for HTTPS proxies + * + * + * + * + * CURLINFO_SCHEME - The URL scheme used for the most recent connection + * + * + * + * + * CURLINFO_SIZE_DOWNLOAD_T - Total number of bytes that were downloaded. The number is only for the latest transfer and will be reset again for each new transfer + * + * + * + * + * CURLINFO_SIZE_UPLOAD_T - Total number of bytes that were uploaded + * + * + * + * + * CURLINFO_SPEED_DOWNLOAD_T - The average download speed in bytes/second that curl measured for the complete download + * + * + * + * + * CURLINFO_SPEED_UPLOAD_T - The average upload speed in bytes/second that curl measured for the complete upload + * + * + * + * + * CURLINFO_APPCONNECT_TIME_T - Time, in microseconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed + * + * + * + * + * CURLINFO_CONNECT_TIME_T - Total time taken, in microseconds, from the start until the connection to the remote host (or proxy) was completed + * + * + * + * + * CURLINFO_FILETIME_T - Remote time of the retrieved document (as Unix timestamp), an alternative to CURLINFO_FILETIME to allow systems with 32 bit long variables to extract dates outside of the 32bit timestamp range + * + * + * + * + * CURLINFO_NAMELOOKUP_TIME_T - Time in microseconds from the start until the name resolving was completed + * + * + * + * + * CURLINFO_PRETRANSFER_TIME_T - Time taken from the start until the file transfer is just about to begin, in microseconds + * + * + * + * + * CURLINFO_REDIRECT_TIME_T - Total time, in microseconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started + * + * + * + * + * CURLINFO_STARTTRANSFER_TIME_T - Time, in microseconds, it took from the start until the first byte is received + * + * + * + * + * CURLINFO_TOTAL_TIME_T - Total time in microseconds for the previous transfer, including name resolving, TCP connect etc. + * + * + * + * @return mixed If opt is given, returns its value. + * Otherwise, returns an associative array with the following elements + * (which correspond to opt): + * + * + * + * "url" + * + * + * + * + * "content_type" + * + * + * + * + * "http_code" + * + * + * + * + * "header_size" + * + * + * + * + * "request_size" + * + * + * + * + * "filetime" + * + * + * + * + * "ssl_verify_result" + * + * + * + * + * "redirect_count" + * + * + * + * + * "total_time" + * + * + * + * + * "namelookup_time" + * + * + * + * + * "connect_time" + * + * + * + * + * "pretransfer_time" + * + * + * + * + * "size_upload" + * + * + * + * + * "size_download" + * + * + * + * + * "speed_download" + * + * + * + * + * "speed_upload" + * + * + * + * + * "download_content_length" + * + * + * + * + * "upload_content_length" + * + * + * + * + * "starttransfer_time" + * + * + * + * + * "redirect_time" + * + * + * + * + * "certinfo" + * + * + * + * + * "primary_ip" + * + * + * + * + * "primary_port" + * + * + * + * + * "local_ip" + * + * + * + * + * "local_port" + * + * + * + * + * "redirect_url" + * + * + * + * + * "request_header" (This is only set if the CURLINFO_HEADER_OUT + * is set by a previous call to curl_setopt) + * + * + * + * Note that private data is not included in the associative array and must be retrieved individually with the CURLINFO_PRIVATE option. + * @throws CurlException + * + */ +function curl_getinfo($ch, int $opt = null) +{ + error_clear_last(); + if ($opt !== null) { + $result = \curl_getinfo($ch, $opt); + } else { + $result = \curl_getinfo($ch); + } + if ($result === false) { + throw CurlException::createFromCurlResource($ch); + } + return $result; +} + + +/** + * Initializes a new session and return a cURL handle for use with the + * curl_setopt, curl_exec, + * and curl_close functions. + * + * @param string $url If provided, the CURLOPT_URL option will be set + * to its value. You can manually set this using the + * curl_setopt function. + * + * The file protocol is disabled by cURL if + * open_basedir is set. + * @return resource Returns a cURL handle on success, FALSE on errors. + * @throws CurlException + * + */ +function curl_init(string $url = null) +{ + error_clear_last(); + $result = \curl_init($url); + if ($result === false) { + throw CurlException::createFromPhpError(); + } + return $result; +} + + +/** + * Return an integer containing the last multi curl error number. + * + * @param resource $mh A cURL multi handle returned by + * curl_multi_init. + * @return int Return an integer containing the last multi curl error number. + * @throws CurlException + * + */ +function curl_multi_errno($mh): int +{ + error_clear_last(); + $result = \curl_multi_errno($mh); + if ($result === false) { + throw CurlException::createFromPhpError(); + } + return $result; +} + + +/** + * Ask the multi handle if there are any messages or information from the individual transfers. + * Messages may include information such as an error code from the transfer or just the fact + * that a transfer is completed. + * + * Repeated calls to this function will return a new result each time, until a FALSE is returned + * as a signal that there is no more to get at this point. The integer pointed to with + * msgs_in_queue will contain the number of remaining messages after this + * function was called. + * + * @param resource $mh A cURL multi handle returned by + * curl_multi_init. + * @param int|null $msgs_in_queue Number of messages that are still in the queue + * @return array On success, returns an associative array for the message, FALSE on failure. + * + * + * Contents of the returned array + * + * + * + * Key: + * Value: + * + * + * + * + * msg + * The CURLMSG_DONE constant. Other return values + * are currently not available. + * + * + * result + * One of the CURLE_* constants. If everything is + * OK, the CURLE_OK will be the result. + * + * + * handle + * Resource of type curl indicates the handle which it concerns. + * + * + * + * + * @throws CurlException + * + */ +function curl_multi_info_read($mh, ?int &$msgs_in_queue = null): array +{ + error_clear_last(); + $result = \curl_multi_info_read($mh, $msgs_in_queue); + if ($result === false) { + throw CurlException::createFromPhpError(); + } + return $result; +} + + +/** + * Allows the processing of multiple cURL handles asynchronously. + * + * @return resource Returns a cURL multi handle resource on success, FALSE on failure. + * @throws CurlException + * + */ +function curl_multi_init() +{ + error_clear_last(); + $result = \curl_multi_init(); + if ($result === false) { + throw CurlException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets an option on the given cURL session handle. + * + * @param resource $ch A cURL handle returned by + * curl_init. + * @param int $option The CURLOPT_XXX option to set. + * @param mixed $value The value to be set on option. + * + * value should be a bool for the + * following values of the option parameter: + * + * + * + * + * Option + * Set value to + * Notes + * + * + * + * + * CURLOPT_AUTOREFERER + * + * TRUE to automatically set the Referer: field in + * requests where it follows a Location: redirect. + * + * + * + * + * + * CURLOPT_BINARYTRANSFER + * + * TRUE to return the raw output when + * CURLOPT_RETURNTRANSFER is used. + * + * + * From PHP 5.1.3, this option has no effect: the raw output will + * always be returned when + * CURLOPT_RETURNTRANSFER is used. + * + * + * + * CURLOPT_COOKIESESSION + * + * TRUE to mark this as a new cookie "session". It will force libcurl + * to ignore all cookies it is about to load that are "session cookies" + * from the previous session. By default, libcurl always stores and + * loads all cookies, independent if they are session cookies or not. + * Session cookies are cookies without expiry date and they are meant + * to be alive and existing for this "session" only. + * + * + * + * + * + * CURLOPT_CERTINFO + * + * TRUE to output SSL certification information to STDERR + * on secure transfers. + * + * + * Added in cURL 7.19.1. + * Available since PHP 5.3.2. + * Requires CURLOPT_VERBOSE to be on to have an effect. + * + * + * + * CURLOPT_CONNECT_ONLY + * + * TRUE tells the library to perform all the required proxy authentication + * and connection setup, but no data transfer. This option is implemented for + * HTTP, SMTP and POP3. + * + * + * Added in 7.15.2. + * Available since PHP 5.5.0. + * + * + * + * CURLOPT_CRLF + * + * TRUE to convert Unix newlines to CRLF newlines + * on transfers. + * + * + * + * + * + * CURLOPT_DISALLOW_USERNAME_IN_URL + * + * TRUE to not allow URLs that include a username. Usernames are allowed by default (0). + * + * + * Added in cURL 7.61.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_DNS_SHUFFLE_ADDRESSES + * + * TRUE to shuffle the order of all returned addresses so that they will be used + * in a random order, when a name is resolved and more than one IP address is returned. + * This may cause IPv4 to be used before IPv6 or vice versa. + * + * + * Added in cURL 7.60.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_HAPROXYPROTOCOL + * + * TRUE to send an HAProxy PROXY protocol v1 header at the start of the connection. + * The default action is not to send this header. + * + * + * Added in cURL 7.60.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_SSH_COMPRESSION + * + * TRUE to enable built-in SSH compression. This is a request, not an order; + * the server may or may not do it. + * + * + * Added in cURL 7.56.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_DNS_USE_GLOBAL_CACHE + * + * TRUE to use a global DNS cache. This option is not thread-safe. + * It is conditionally enabled by default if PHP is built for non-threaded use + * (CLI, FCGI, Apache2-Prefork, etc.). + * + * + * + * + * + * CURLOPT_FAILONERROR + * + * TRUE to fail verbosely if the HTTP code returned + * is greater than or equal to 400. The default behavior is to return + * the page normally, ignoring the code. + * + * + * + * + * + * CURLOPT_SSL_FALSESTART + * + * TRUE to enable TLS false start. + * + * + * Added in cURL 7.42.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_FILETIME + * + * TRUE to attempt to retrieve the modification + * date of the remote document. This value can be retrieved using + * the CURLINFO_FILETIME option with + * curl_getinfo. + * + * + * + * + * + * CURLOPT_FOLLOWLOCATION + * + * TRUE to follow any + * "Location: " header that the server sends as + * part of the HTTP header (note this is recursive, PHP will follow as + * many "Location: " headers that it is sent, + * unless CURLOPT_MAXREDIRS is set). + * + * + * + * + * + * CURLOPT_FORBID_REUSE + * + * TRUE to force the connection to explicitly + * close when it has finished processing, and not be pooled for reuse. + * + * + * + * + * + * CURLOPT_FRESH_CONNECT + * + * TRUE to force the use of a new connection + * instead of a cached one. + * + * + * + * + * + * CURLOPT_FTP_USE_EPRT + * + * TRUE to use EPRT (and LPRT) when doing active + * FTP downloads. Use FALSE to disable EPRT and LPRT and use PORT + * only. + * + * + * + * + * + * CURLOPT_FTP_USE_EPSV + * + * TRUE to first try an EPSV command for FTP + * transfers before reverting back to PASV. Set to FALSE + * to disable EPSV. + * + * + * + * + * + * CURLOPT_FTP_CREATE_MISSING_DIRS + * + * TRUE to create missing directories when an FTP operation + * encounters a path that currently doesn't exist. + * + * + * + * + * + * CURLOPT_FTPAPPEND + * + * TRUE to append to the remote file instead of + * overwriting it. + * + * + * + * + * + * CURLOPT_TCP_NODELAY + * + * TRUE to disable TCP's Nagle algorithm, which tries to minimize + * the number of small packets on the network. + * + * + * Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or + * greater. + * + * + * + * CURLOPT_FTPASCII + * + * An alias of + * CURLOPT_TRANSFERTEXT. Use that instead. + * + * + * + * + * + * CURLOPT_FTPLISTONLY + * + * TRUE to only list the names of an FTP + * directory. + * + * + * + * + * + * CURLOPT_HEADER + * + * TRUE to include the header in the output. + * + * + * + * + * + * CURLINFO_HEADER_OUT + * + * TRUE to track the handle's request string. + * + * + * Available since PHP 5.1.3. The CURLINFO_ + * prefix is intentional. + * + * + * + * CURLOPT_HTTP09_ALLOWED + * + * Whether to allow HTTP/0.9 responses. Defaults to FALSE as of libcurl 7.66.0; + * formerly it defaulted to TRUE. + * + * + * Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl >= 7.64.0 + * + * + * + * CURLOPT_HTTPGET + * + * TRUE to reset the HTTP request method to GET. + * Since GET is the default, this is only necessary if the request + * method has been changed. + * + * + * + * + * + * CURLOPT_HTTPPROXYTUNNEL + * + * TRUE to tunnel through a given HTTP proxy. + * + * + * + * + * + * CURLOPT_HTTP_CONTENT_DECODING + * + * FALSE to get the raw HTTP response body. + * + * + * Available as of PHP 5.5.0 if built against libcurl >= 7.16.2. + * + * + * + * CURLOPT_KEEP_SENDING_ON_ERROR + * + * TRUE to keep sending the request body if the HTTP code returned is + * equal to or larger than 300. The default action would be to stop sending + * and close the stream or connection. Suitable for manual NTLM authentication. + * Most applications do not need this option. + * + * + * Available as of PHP 7.3.0 if built against libcurl >= 7.51.0. + * + * + * + * CURLOPT_MUTE + * + * TRUE to be completely silent with regards to + * the cURL functions. + * + * + * Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead) + * + * + * + * CURLOPT_NETRC + * + * TRUE to scan the ~/.netrc + * file to find a username and password for the remote site that + * a connection is being established with. + * + * + * + * + * + * CURLOPT_NOBODY + * + * TRUE to exclude the body from the output. + * Request method is then set to HEAD. Changing this to FALSE does + * not change it to GET. + * + * + * + * + * + * CURLOPT_NOPROGRESS + * + * TRUE to disable the progress meter for cURL transfers. + * + * + * PHP automatically sets this option to TRUE, this should only be + * changed for debugging purposes. + * + * + * + * + * + * + * + * CURLOPT_NOSIGNAL + * + * TRUE to ignore any cURL function that causes a + * signal to be sent to the PHP process. This is turned on by default + * in multi-threaded SAPIs so timeout options can still be used. + * + * + * Added in cURL 7.10. + * + * + * + * CURLOPT_PATH_AS_IS + * + * TRUE to not handle dot dot sequences. + * + * + * Added in cURL 7.42.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_PIPEWAIT + * + * TRUE to wait for pipelining/multiplexing. + * + * + * Added in cURL 7.43.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_POST + * + * TRUE to do a regular HTTP POST. This POST is the + * normal application/x-www-form-urlencoded kind, + * most commonly used by HTML forms. + * + * + * + * + * + * CURLOPT_PUT + * + * TRUE to HTTP PUT a file. The file to PUT must + * be set with CURLOPT_INFILE and + * CURLOPT_INFILESIZE. + * + * + * + * + * + * CURLOPT_RETURNTRANSFER + * + * TRUE to return the transfer as a string of the + * return value of curl_exec instead of outputting + * it directly. + * + * + * + * + * + * CURLOPT_SAFE_UPLOAD + * + * TRUE to disable support for the @ prefix for + * uploading files in CURLOPT_POSTFIELDS, which + * means that values starting with @ can be safely + * passed as fields. CURLFile may be used for + * uploads instead. + * + * + * Added in PHP 5.5.0 with FALSE as the default value. PHP 5.6.0 + * changes the default value to TRUE. PHP 7 removes this option; + * the CURLFile interface must be used to upload files. + * + * + * + * CURLOPT_SASL_IR + * + * TRUE to enable sending the initial response in the first packet. + * + * + * Added in cURL 7.31.10. Available since PHP 7.0.7. + * + * + * + * CURLOPT_SSL_ENABLE_ALPN + * + * FALSE to disable ALPN in the SSL handshake (if the SSL backend + * libcurl is built to use supports it), which can be used to + * negotiate http2. + * + * + * Added in cURL 7.36.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_SSL_ENABLE_NPN + * + * FALSE to disable NPN in the SSL handshake (if the SSL backend + * libcurl is built to use supports it), which can be used to + * negotiate http2. + * + * + * Added in cURL 7.36.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_SSL_VERIFYPEER + * + * FALSE to stop cURL from verifying the peer's + * certificate. Alternate certificates to verify against can be + * specified with the CURLOPT_CAINFO option + * or a certificate directory can be specified with the + * CURLOPT_CAPATH option. + * + * + * TRUE by default as of cURL 7.10. Default bundle installed as of + * cURL 7.10. + * + * + * + * CURLOPT_SSL_VERIFYSTATUS + * + * TRUE to verify the certificate's status. + * + * + * Added in cURL 7.41.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_PROXY_SSL_VERIFYPEER + * + * FALSE to stop cURL from verifying the peer's certificate. + * Alternate certificates to verify against can be + * specified with the CURLOPT_CAINFO option + * or a certificate directory can be specified with the + * CURLOPT_CAPATH option. + * When set to false, the peer certificate verification succeeds regardless. + * + * + * TRUE by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_SUPPRESS_CONNECT_HEADERS + * + * TRUE to suppress proxy CONNECT response headers from the user callback functions + * CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION, + * when CURLOPT_HTTPPROXYTUNNEL is used and a CONNECT request is made. + * + * + * Added in cURL 7.54.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_TCP_FASTOPEN + * + * TRUE to enable TCP Fast Open. + * + * + * Added in cURL 7.49.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_TFTP_NO_OPTIONS + * + * TRUE to not send TFTP options requests. + * + * + * Added in cURL 7.48.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_TRANSFERTEXT + * + * TRUE to use ASCII mode for FTP transfers. + * For LDAP, it retrieves data in plain text instead of HTML. On + * Windows systems, it will not set STDOUT to binary + * mode. + * + * + * + * + * + * CURLOPT_UNRESTRICTED_AUTH + * + * TRUE to keep sending the username and password + * when following locations (using + * CURLOPT_FOLLOWLOCATION), even when the + * hostname has changed. + * + * + * + * + * + * CURLOPT_UPLOAD + * + * TRUE to prepare for an upload. + * + * + * + * + * + * CURLOPT_VERBOSE + * + * TRUE to output verbose information. Writes + * output to STDERR, or the file specified using + * CURLOPT_STDERR. + * + * + * + * + * + * + * + * + * TRUE to disable the progress meter for cURL transfers. + * + * + * PHP automatically sets this option to TRUE, this should only be + * changed for debugging purposes. + * + * + * + * PHP automatically sets this option to TRUE, this should only be + * changed for debugging purposes. + * + * value should be an integer for the + * following values of the option parameter: + * + * + * + * + * Option + * Set value to + * Notes + * + * + * + * + * CURLOPT_BUFFERSIZE + * + * The size of the buffer to use for each read. There is no guarantee + * this request will be fulfilled, however. + * + * + * Added in cURL 7.10. + * + * + * + * CURLOPT_CLOSEPOLICY + * + * One of the CURLCLOSEPOLICY_* values. + * + * + * This option is deprecated, as it was never implemented in cURL and + * never had any effect. + * + * + * + * + * Removed in PHP 5.6.0. + * + * + * + * CURLOPT_CONNECTTIMEOUT + * + * The number of seconds to wait while trying to connect. Use 0 to + * wait indefinitely. + * + * + * + * + * + * CURLOPT_CONNECTTIMEOUT_MS + * + * The number of milliseconds to wait while trying to connect. Use 0 to + * wait indefinitely. + * + * If libcurl is built to use the standard system name resolver, that + * portion of the connect will still use full-second resolution for + * timeouts with a minimum timeout allowed of one second. + * + * + * Added in cURL 7.16.2. Available since PHP 5.2.3. + * + * + * + * CURLOPT_DNS_CACHE_TIMEOUT + * + * The number of seconds to keep DNS entries in memory. This + * option is set to 120 (2 minutes) by default. + * + * + * + * + * + * CURLOPT_EXPECT_100_TIMEOUT_MS + * + * The timeout for Expect: 100-continue responses in milliseconds. + * Defaults to 1000 milliseconds. + * + * + * Added in cURL 7.36.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS + * + * Head start for ipv6 for the happy eyeballs algorithm. Happy eyeballs attempts + * to connect to both IPv4 and IPv6 addresses for dual-stack hosts, + * preferring IPv6 first for timeout milliseconds. + * Defaults to CURL_HET_DEFAULT, which is currently 200 milliseconds. + * + * + * Added in cURL 7.59.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_FTPSSLAUTH + * + * The FTP authentication method (when is activated): + * CURLFTPAUTH_SSL (try SSL first), + * CURLFTPAUTH_TLS (try TLS first), or + * CURLFTPAUTH_DEFAULT (let cURL decide). + * + * + * Added in cURL 7.12.2. + * + * + * + * CURLOPT_HEADEROPT + * + * How to deal with headers. One of the following constants: + * + * CURLHEADER_UNIFIED: the headers specified in + * CURLOPT_HTTPHEADER will be used in requests + * both to servers and proxies. With this option enabled, + * CURLOPT_PROXYHEADER will not have any effect. + * + * + * CURLHEADER_SEPARATE: makes + * CURLOPT_HTTPHEADER headers only get sent to + * a server and not to a proxy. Proxy headers must be set with + * CURLOPT_PROXYHEADER to get used. Note that if + * a non-CONNECT request is sent to a proxy, libcurl will send both + * server headers and proxy headers. When doing CONNECT, libcurl will + * send CURLOPT_PROXYHEADER headers only to the + * proxy and then CURLOPT_HTTPHEADER headers + * only to the server. + * + * + * Defaults to CURLHEADER_SEPARATE as of cURL + * 7.42.1, and CURLHEADER_UNIFIED before. + * + * + * + * Added in cURL 7.37.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_HTTP_VERSION + * + * CURL_HTTP_VERSION_NONE (default, lets CURL + * decide which version to use), + * CURL_HTTP_VERSION_1_0 (forces HTTP/1.0), + * CURL_HTTP_VERSION_1_1 (forces HTTP/1.1), + * CURL_HTTP_VERSION_2_0 (attempts HTTP 2), + * CURL_HTTP_VERSION_2 (alias of CURL_HTTP_VERSION_2_0), + * CURL_HTTP_VERSION_2TLS (attempts HTTP 2 over TLS (HTTPS) only) or + * CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade). + * + * + * + * + * + * CURLOPT_HTTPAUTH + * + * + * The HTTP authentication method(s) to use. The options are: + * CURLAUTH_BASIC, + * CURLAUTH_DIGEST, + * CURLAUTH_GSSNEGOTIATE, + * CURLAUTH_NTLM, + * CURLAUTH_ANY, and + * CURLAUTH_ANYSAFE. + * + * + * The bitwise | (or) operator can be used to combine + * more than one method. If this is done, cURL will poll the server to see + * what methods it supports and pick the best one. + * + * + * CURLAUTH_ANY is an alias for + * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. + * + * + * CURLAUTH_ANYSAFE is an alias for + * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. + * + * + * + * + * + * + * CURLOPT_INFILESIZE + * + * The expected size, in bytes, of the file when uploading a file to + * a remote site. Note that using this option will not stop libcurl + * from sending more data, as exactly what is sent depends on + * CURLOPT_READFUNCTION. + * + * + * + * + * + * CURLOPT_LOW_SPEED_LIMIT + * + * The transfer speed, in bytes per second, that the transfer should be + * below during the count of CURLOPT_LOW_SPEED_TIME + * seconds before PHP considers the transfer too slow and aborts. + * + * + * + * + * + * CURLOPT_LOW_SPEED_TIME + * + * The number of seconds the transfer speed should be below + * CURLOPT_LOW_SPEED_LIMIT before PHP considers + * the transfer too slow and aborts. + * + * + * + * + * + * CURLOPT_MAXCONNECTS + * + * The maximum amount of persistent connections that are allowed. + * When the limit is reached, + * CURLOPT_CLOSEPOLICY is used to determine + * which connection to close. + * + * + * + * + * + * CURLOPT_MAXREDIRS + * + * The maximum amount of HTTP redirections to follow. Use this option + * alongside CURLOPT_FOLLOWLOCATION. + * + * + * + * + * + * CURLOPT_PORT + * + * An alternative port number to connect to. + * + * + * + * + * + * CURLOPT_POSTREDIR + * + * A bitmask of 1 (301 Moved Permanently), 2 (302 Found) + * and 4 (303 See Other) if the HTTP POST method should be maintained + * when CURLOPT_FOLLOWLOCATION is set and a + * specific type of redirect occurs. + * + * + * Added in cURL 7.19.1. Available since PHP 5.3.2. + * + * + * + * CURLOPT_PROTOCOLS + * + * + * Bitmask of CURLPROTO_* values. If used, this bitmask + * limits what protocols libcurl may use in the transfer. This allows you to have + * a libcurl built to support a wide range of protocols but still limit specific + * transfers to only be allowed to use a subset of them. By default libcurl will + * accept all protocols it supports. + * See also CURLOPT_REDIR_PROTOCOLS. + * + * + * Valid protocol options are: + * CURLPROTO_HTTP, + * CURLPROTO_HTTPS, + * CURLPROTO_FTP, + * CURLPROTO_FTPS, + * CURLPROTO_SCP, + * CURLPROTO_SFTP, + * CURLPROTO_TELNET, + * CURLPROTO_LDAP, + * CURLPROTO_LDAPS, + * CURLPROTO_DICT, + * CURLPROTO_FILE, + * CURLPROTO_TFTP, + * CURLPROTO_ALL + * + * + * + * Added in cURL 7.19.4. + * + * + * + * CURLOPT_PROXYAUTH + * + * The HTTP authentication method(s) to use for the proxy connection. + * Use the same bitmasks as described in + * CURLOPT_HTTPAUTH. For proxy authentication, + * only CURLAUTH_BASIC and + * CURLAUTH_NTLM are currently supported. + * + * + * Added in cURL 7.10.7. + * + * + * + * CURLOPT_PROXYPORT + * + * The port number of the proxy to connect to. This port number can + * also be set in CURLOPT_PROXY. + * + * + * + * + * + * CURLOPT_PROXYTYPE + * + * Either CURLPROXY_HTTP (default), + * CURLPROXY_SOCKS4, + * CURLPROXY_SOCKS5, + * CURLPROXY_SOCKS4A or + * CURLPROXY_SOCKS5_HOSTNAME. + * + * + * Added in cURL 7.10. + * + * + * + * CURLOPT_REDIR_PROTOCOLS + * + * Bitmask of CURLPROTO_* values. If used, this bitmask + * limits what protocols libcurl may use in a transfer that it follows to in + * a redirect when CURLOPT_FOLLOWLOCATION is enabled. + * This allows you to limit specific transfers to only be allowed to use a subset + * of protocols in redirections. By default libcurl will allow all protocols + * except for FILE and SCP. This is a difference compared to pre-7.19.4 versions + * which unconditionally would follow to all protocols supported. + * See also CURLOPT_PROTOCOLS for protocol constant values. + * + * + * Added in cURL 7.19.4. + * + * + * + * CURLOPT_RESUME_FROM + * + * The offset, in bytes, to resume a transfer from. + * + * + * + * + * + * CURLOPT_SOCKS5_AUTH + * + * + * The SOCKS5 authentication method(s) to use. The options are: + * CURLAUTH_BASIC, + * CURLAUTH_GSSAPI, + * CURLAUTH_NONE. + * + * + * The bitwise | (or) operator can be used to combine + * more than one method. If this is done, cURL will poll the server to see + * what methods it supports and pick the best one. + * + * + * CURLAUTH_BASIC allows username/password authentication. + * + * + * CURLAUTH_GSSAPI allows GSS-API authentication. + * + * + * CURLAUTH_NONE allows no authentication. + * + * + * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. + * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. + * + * + * + * Available as of 7.3.0 and curl >= 7.55.0. + * + * + * + * CURLOPT_SSL_OPTIONS + * + * Set SSL behavior options, which is a bitmask of any of the following constants: + * + * CURLSSLOPT_ALLOW_BEAST: do not attempt to use + * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. + * + * + * CURLSSLOPT_NO_REVOKE: disable certificate + * revocation checks for those SSL backends where such behavior is + * present. + * + * + * + * Added in cURL 7.25.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_SSL_VERIFYHOST + * + * 1 to check the existence of a common name in the + * SSL peer certificate. 2 to check the existence of + * a common name and also verify that it matches the hostname + * provided. 0 to not check the names. In production environments the value of this option + * should be kept at 2 (default value). + * + * + * Support for value 1 removed in cURL 7.28.1. + * + * + * + * CURLOPT_SSLVERSION + * + * One of CURL_SSLVERSION_DEFAULT (0), + * CURL_SSLVERSION_TLSv1 (1), + * CURL_SSLVERSION_SSLv2 (2), + * CURL_SSLVERSION_SSLv3 (3), + * CURL_SSLVERSION_TLSv1_0 (4), + * CURL_SSLVERSION_TLSv1_1 (5) or + * CURL_SSLVERSION_TLSv1_2 (6). + * The maximum TLS version can be set by using one of the CURL_SSLVERSION_MAX_* + * constants. It is also possible to OR one of the CURL_SSLVERSION_* + * constants with one of the CURL_SSLVERSION_MAX_* constants. + * CURL_SSLVERSION_MAX_DEFAULT (the maximum version supported by the library), + * CURL_SSLVERSION_MAX_TLSv1_0, + * CURL_SSLVERSION_MAX_TLSv1_1, + * CURL_SSLVERSION_MAX_TLSv1_2, or + * CURL_SSLVERSION_MAX_TLSv1_3. + * + * + * Your best bet is to not set this and let it use the default. + * Setting it to 2 or 3 is very dangerous given the known + * vulnerabilities in SSLv2 and SSLv3. + * + * + * + * + * + * + * + * CURLOPT_PROXY_SSL_OPTIONS + * + * Set proxy SSL behavior options, which is a bitmask of any of the following constants: + * + * CURLSSLOPT_ALLOW_BEAST: do not attempt to use + * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. + * + * + * CURLSSLOPT_NO_REVOKE: disable certificate + * revocation checks for those SSL backends where such behavior is + * present. (curl >= 7.44.0) + * + * + * CURLSSLOPT_NO_PARTIALCHAIN: do not accept "partial" + * certificate chains, which it otherwise does by default. (curl >= 7.68.0) + * + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_SSL_VERIFYHOST + * + * Set to 2 to verify in the HTTPS proxy's certificate name fields against the proxy name. + * When set to 0 the connection succeeds regardless of the names used in the certificate. + * Use that ability with caution! + * 1 treated as a debug option in curl 7.28.0 and earlier. + * From curl 7.28.1 to 7.65.3 CURLE_BAD_FUNCTION_ARGUMENT is returned. + * From curl 7.66.0 onwards 1 and 2 is treated as the same value. + * In production environments the value of this option should be kept at 2 (default value). + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_SSLVERSION + * + * One of CURL_SSLVERSION_DEFAULT, + * CURL_SSLVERSION_TLSv1, + * CURL_SSLVERSION_TLSv1_0, + * CURL_SSLVERSION_TLSv1_1, + * CURL_SSLVERSION_TLSv1_2, + * CURL_SSLVERSION_TLSv1_3, + * CURL_SSLVERSION_MAX_DEFAULT, + * CURL_SSLVERSION_MAX_TLSv1_0, + * CURL_SSLVERSION_MAX_TLSv1_1, + * CURL_SSLVERSION_MAX_TLSv1_2, + * CURL_SSLVERSION_MAX_TLSv1_3 or + * CURL_SSLVERSION_SSLv3. + * + * + * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT + * which will attempt to figure out the remote SSL protocol version. + * + * + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_STREAM_WEIGHT + * + * Set the numerical stream weight (a number between 1 and 256). + * + * + * Added in cURL 7.46.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_TCP_KEEPALIVE + * + * If set to 1, TCP keepalive probes will be sent. The delay and + * frequency of these probes can be controlled by the CURLOPT_TCP_KEEPIDLE + * and CURLOPT_TCP_KEEPINTVL options, provided the operating system + * supports them. If set to 0 (default) keepalive probes are disabled. + * + * + * Added in cURL 7.25.0. Available since PHP 5.5.0. + * + * + * + * CURLOPT_TCP_KEEPIDLE + * + * Sets the delay, in seconds, that the operating system will wait while the connection is + * idle before sending keepalive probes, if CURLOPT_TCP_KEEPALIVE is + * enabled. Not all operating systems support this option. + * The default is 60. + * + * + * Added in cURL 7.25.0. Available since PHP 5.5.0. + * + * + * + * CURLOPT_TCP_KEEPINTVL + * + * Sets the interval, in seconds, that the operating system will wait between sending + * keepalive probes, if CURLOPT_TCP_KEEPALIVE is enabled. + * Not all operating systems support this option. + * The default is 60. + * + * + * Added in cURL 7.25.0. Available since PHP 5.5.0. + * + * + * + * CURLOPT_TIMECONDITION + * + * How CURLOPT_TIMEVALUE is treated. + * Use CURL_TIMECOND_IFMODSINCE to return the + * page only if it has been modified since the time specified in + * CURLOPT_TIMEVALUE. If it hasn't been modified, + * a "304 Not Modified" header will be returned + * assuming CURLOPT_HEADER is TRUE. + * Use CURL_TIMECOND_IFUNMODSINCE for the reverse + * effect. CURL_TIMECOND_IFMODSINCE is the + * default. + * + * + * + * + * + * CURLOPT_TIMEOUT + * + * The maximum number of seconds to allow cURL functions to execute. + * + * + * + * + * + * CURLOPT_TIMEOUT_MS + * + * The maximum number of milliseconds to allow cURL functions to + * execute. + * + * If libcurl is built to use the standard system name resolver, that + * portion of the connect will still use full-second resolution for + * timeouts with a minimum timeout allowed of one second. + * + * + * Added in cURL 7.16.2. Available since PHP 5.2.3. + * + * + * + * CURLOPT_TIMEVALUE + * + * The time in seconds since January 1st, 1970. The time will be used + * by CURLOPT_TIMECONDITION. By default, + * CURL_TIMECOND_IFMODSINCE is used. + * + * + * + * + * + * CURLOPT_TIMEVALUE_LARGE + * + * The time in seconds since January 1st, 1970. The time will be used + * by CURLOPT_TIMECONDITION. Defaults to zero. + * The difference between this option and CURLOPT_TIMEVALUE + * is the type of the argument. On systems where 'long' is only 32 bit wide, + * this option has to be used to set dates beyond the year 2038. + * + * + * Added in cURL 7.59.0. Available since PHP 7.3.0. + * + * + * + * CURLOPT_MAX_RECV_SPEED_LARGE + * + * If a download exceeds this speed (counted in bytes per second) on + * cumulative average during the transfer, the transfer will pause to + * keep the average rate less than or equal to the parameter value. + * Defaults to unlimited speed. + * + * + * Added in cURL 7.15.5. Available since PHP 5.4.0. + * + * + * + * CURLOPT_MAX_SEND_SPEED_LARGE + * + * If an upload exceeds this speed (counted in bytes per second) on + * cumulative average during the transfer, the transfer will pause to + * keep the average rate less than or equal to the parameter value. + * Defaults to unlimited speed. + * + * + * Added in cURL 7.15.5. Available since PHP 5.4.0. + * + * + * + * CURLOPT_SSH_AUTH_TYPES + * + * A bitmask consisting of one or more of + * CURLSSH_AUTH_PUBLICKEY, + * CURLSSH_AUTH_PASSWORD, + * CURLSSH_AUTH_HOST, + * CURLSSH_AUTH_KEYBOARD. Set to + * CURLSSH_AUTH_ANY to let libcurl pick one. + * + * + * Added in cURL 7.16.1. + * + * + * + * CURLOPT_IPRESOLVE + * + * Allows an application to select what kind of IP addresses to use when + * resolving host names. This is only interesting when using host names that + * resolve addresses using more than one version of IP, possible values are + * CURL_IPRESOLVE_WHATEVER, + * CURL_IPRESOLVE_V4, + * CURL_IPRESOLVE_V6, by default + * CURL_IPRESOLVE_WHATEVER. + * + * + * Added in cURL 7.10.8. + * + * + * + * CURLOPT_FTP_FILEMETHOD + * + * Tell curl which method to use to reach a file on a FTP(S) server. Possible values are + * CURLFTPMETHOD_MULTICWD, + * CURLFTPMETHOD_NOCWD and + * CURLFTPMETHOD_SINGLECWD. + * + * + * Added in cURL 7.15.1. Available since PHP 5.3.0. + * + * + * + * + * + * + * This option is deprecated, as it was never implemented in cURL and + * never had any effect. + * + * The HTTP authentication method(s) to use. The options are: + * CURLAUTH_BASIC, + * CURLAUTH_DIGEST, + * CURLAUTH_GSSNEGOTIATE, + * CURLAUTH_NTLM, + * CURLAUTH_ANY, and + * CURLAUTH_ANYSAFE. + * + * The bitwise | (or) operator can be used to combine + * more than one method. If this is done, cURL will poll the server to see + * what methods it supports and pick the best one. + * + * CURLAUTH_ANY is an alias for + * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. + * + * CURLAUTH_ANYSAFE is an alias for + * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. + * + * Bitmask of CURLPROTO_* values. If used, this bitmask + * limits what protocols libcurl may use in the transfer. This allows you to have + * a libcurl built to support a wide range of protocols but still limit specific + * transfers to only be allowed to use a subset of them. By default libcurl will + * accept all protocols it supports. + * See also CURLOPT_REDIR_PROTOCOLS. + * + * Valid protocol options are: + * CURLPROTO_HTTP, + * CURLPROTO_HTTPS, + * CURLPROTO_FTP, + * CURLPROTO_FTPS, + * CURLPROTO_SCP, + * CURLPROTO_SFTP, + * CURLPROTO_TELNET, + * CURLPROTO_LDAP, + * CURLPROTO_LDAPS, + * CURLPROTO_DICT, + * CURLPROTO_FILE, + * CURLPROTO_TFTP, + * CURLPROTO_ALL + * + * The SOCKS5 authentication method(s) to use. The options are: + * CURLAUTH_BASIC, + * CURLAUTH_GSSAPI, + * CURLAUTH_NONE. + * + * The bitwise | (or) operator can be used to combine + * more than one method. If this is done, cURL will poll the server to see + * what methods it supports and pick the best one. + * + * CURLAUTH_BASIC allows username/password authentication. + * + * CURLAUTH_GSSAPI allows GSS-API authentication. + * + * CURLAUTH_NONE allows no authentication. + * + * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. + * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. + * + * Your best bet is to not set this and let it use the default. + * Setting it to 2 or 3 is very dangerous given the known + * vulnerabilities in SSLv2 and SSLv3. + * + * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT + * which will attempt to figure out the remote SSL protocol version. + * + * value should be a string for the + * following values of the option parameter: + * + * + * + * + * Option + * Set value to + * Notes + * + * + * + * + * CURLOPT_ABSTRACT_UNIX_SOCKET + * + * Enables the use of an abstract Unix domain socket instead of + * establishing a TCP connection to a host and sets the path to + * the given string. This option shares the same semantics + * as CURLOPT_UNIX_SOCKET_PATH. These two options + * share the same storage and therefore only one of them can be set + * per handle. + * + * + * Available since PHP 7.3.0 and cURL 7.53.0 + * + * + * + * CURLOPT_CAINFO + * + * The name of a file holding one or more certificates to verify the + * peer with. This only makes sense when used in combination with + * CURLOPT_SSL_VERIFYPEER. + * + * + * Might require an absolute path. + * + * + * + * CURLOPT_CAPATH + * + * A directory that holds multiple CA certificates. Use this option + * alongside CURLOPT_SSL_VERIFYPEER. + * + * + * + * + * + * CURLOPT_COOKIE + * + * The contents of the "Cookie: " header to be + * used in the HTTP request. + * Note that multiple cookies are separated with a semicolon followed + * by a space (e.g., "fruit=apple; colour=red") + * + * + * + * + * + * CURLOPT_COOKIEFILE + * + * The name of the file containing the cookie data. The cookie file can + * be in Netscape format, or just plain HTTP-style headers dumped into + * a file. + * If the name is an empty string, no cookies are loaded, but cookie + * handling is still enabled. + * + * + * + * + * + * CURLOPT_COOKIEJAR + * + * The name of a file to save all internal cookies to when the handle is closed, + * e.g. after a call to curl_close. + * + * + * + * + * + * CURLOPT_COOKIELIST + * + * A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular + * HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store. + * "ALL" erases all cookies held in memory. + * "SESS" erases all session cookies held in memory. + * "FLUSH" writes all known cookies to the file specified by CURLOPT_COOKIEJAR. + * "RELOAD" loads all cookies from the files specified by CURLOPT_COOKIEFILE. + * + * + * Available since PHP 5.5.0 and cURL 7.14.1. + * + * + * + * CURLOPT_CUSTOMREQUEST + * + * A custom request method to use instead of + * "GET" or "HEAD" when doing + * a HTTP request. This is useful for doing + * "DELETE" or other, more obscure HTTP requests. + * Valid values are things like "GET", + * "POST", "CONNECT" and so on; + * i.e. Do not enter a whole HTTP request line here. For instance, + * entering "GET /index.html HTTP/1.0\r\n\r\n" + * would be incorrect. + * + * + * Don't do this without making sure the server supports the custom + * request method first. + * + * + * + * + * + * + * + * CURLOPT_DEFAULT_PROTOCOL + * + * The default protocol to use if the URL is missing a scheme name. + * + * + * Added in cURL 7.45.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_DNS_INTERFACE + * + * Set the name of the network interface that the DNS resolver should bind to. + * This must be an interface name (not an address). + * + * + * Added in cURL 7.33.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_DNS_LOCAL_IP4 + * + * Set the local IPv4 address that the resolver should bind to. The argument + * should contain a single numerical IPv4 address as a string. + * + * + * Added in cURL 7.33.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_DNS_LOCAL_IP6 + * + * Set the local IPv6 address that the resolver should bind to. The argument + * should contain a single numerical IPv6 address as a string. + * + * + * Added in cURL 7.33.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_EGDSOCKET + * + * Like CURLOPT_RANDOM_FILE, except a filename + * to an Entropy Gathering Daemon socket. + * + * + * + * + * + * CURLOPT_ENCODING + * + * The contents of the "Accept-Encoding: " header. + * This enables decoding of the response. Supported encodings are + * "identity", "deflate", and + * "gzip". If an empty string, "", + * is set, a header containing all supported encoding types is sent. + * + * + * Added in cURL 7.10. + * + * + * + * CURLOPT_FTPPORT + * + * The value which will be used to get the IP address to use + * for the FTP "PORT" instruction. The "PORT" instruction tells + * the remote server to connect to our specified IP address. The + * string may be a plain IP address, a hostname, a network + * interface name (under Unix), or just a plain '-' to use the + * systems default IP address. + * + * + * + * + * + * CURLOPT_INTERFACE + * + * The name of the outgoing network interface to use. This can be an + * interface name, an IP address or a host name. + * + * + * + * + * + * CURLOPT_KEYPASSWD + * + * The password required to use the CURLOPT_SSLKEY + * or CURLOPT_SSH_PRIVATE_KEYFILE private key. + * + * + * Added in cURL 7.16.1. + * + * + * + * CURLOPT_KRB4LEVEL + * + * The KRB4 (Kerberos 4) security level. Any of the following values + * (in order from least to most powerful) are valid: + * "clear", + * "safe", + * "confidential", + * "private".. + * If the string does not match one of these, + * "private" is used. Setting this option to NULL + * will disable KRB4 security. Currently KRB4 security only works + * with FTP transactions. + * + * + * + * + * + * CURLOPT_LOGIN_OPTIONS + * + * Can be used to set protocol specific login options, such as the + * preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", + * and should be used in conjunction with the + * CURLOPT_USERNAME option. + * + * + * Added in cURL 7.34.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_PINNEDPUBLICKEY + * + * Set the pinned public key. + * The string can be the file name of your pinned public key. The file + * format expected is "PEM" or "DER". The string can also be any + * number of base64 encoded sha256 hashes preceded by "sha256//" and + * separated by ";". + * + * + * Added in cURL 7.39.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_POSTFIELDS + * + * + * The full data to post in a HTTP "POST" operation. + * To post a file, prepend a filename with @ and + * use the full path. The filetype can be explicitly specified by + * following the filename with the type in the format + * ';type=mimetype'. This parameter can either be + * passed as a urlencoded string like 'para1=val1&para2=val2&...' + * or as an array with the field name as key and field data as value. + * If value is an array, the + * Content-Type header will be set to + * multipart/form-data. + * + * + * As of PHP 5.2.0, value must be an array if + * files are passed to this option with the @ prefix. + * + * + * As of PHP 5.5.0, the @ prefix is deprecated and + * files can be sent using CURLFile. The + * @ prefix can be disabled for safe passing of + * values beginning with @ by setting the + * CURLOPT_SAFE_UPLOAD option to TRUE. + * + * + * + * + * + * + * CURLOPT_PRIVATE + * + * Any data that should be associated with this cURL handle. This data + * can subsequently be retrieved with the + * CURLINFO_PRIVATE option of + * curl_getinfo. cURL does nothing with this data. + * When using a cURL multi handle, this private data is typically a + * unique key to identify a standard cURL handle. + * + * + * Added in cURL 7.10.3. + * + * + * + * CURLOPT_PRE_PROXY + * + * Set a string holding the host name or dotted numerical + * IP address to be used as the preproxy that curl connects to before + * it connects to the HTTP(S) proxy specified in the + * CURLOPT_PROXY option for the upcoming request. + * The preproxy can only be a SOCKS proxy and it should be prefixed with + * [scheme]:// to specify which kind of socks is used. + * A numerical IPv6 address must be written within [brackets]. + * Setting the preproxy to an empty string explicitly disables the use of a preproxy. + * To specify port number in this string, append :[port] + * to the end of the host name. The proxy's port number may optionally be + * specified with the separate option CURLOPT_PROXYPORT. + * Defaults to using port 1080 for proxies if a port is not specified. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY + * + * The HTTP proxy to tunnel requests through. + * + * + * + * + * + * CURLOPT_PROXY_SERVICE_NAME + * + * The proxy authentication service name. + * + * + * Added in cURL 7.34.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_PROXY_CAINFO + * + * The path to proxy Certificate Authority (CA) bundle. Set the path as a + * string naming a file holding one or more certificates to + * verify the HTTPS proxy with. + * This option is for connecting to an HTTPS proxy, not an HTTPS server. + * Defaults set to the system path where libcurl's cacert bundle is assumed + * to be stored. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_CAPATH + * + * The directory holding multiple CA certificates to verify the HTTPS proxy with. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_CRLFILE + * + * Set the file name with the concatenation of CRL (Certificate Revocation List) + * in PEM format to use in the certificate validation that occurs during + * the SSL exchange. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_KEYPASSWD + * + * Set the string be used as the password required to use the + * CURLOPT_PROXY_SSLKEY private key. You never needed a + * passphrase to load a certificate but you need one to load your private key. + * This option is for connecting to an HTTPS proxy, not an HTTPS server. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_PINNEDPUBLICKEY + * + * Set the pinned public key for HTTPS proxy. The string can be the file name + * of your pinned public key. The file format expected is "PEM" or "DER". + * The string can also be any number of base64 encoded sha256 hashes preceded by + * "sha256//" and separated by ";" + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_SSLCERT + * + * The file name of your client certificate used to connect to the HTTPS proxy. + * The default format is "P12" on Secure Transport and "PEM" on other engines, + * and can be changed with CURLOPT_PROXY_SSLCERTTYPE. + * With NSS or Secure Transport, this can also be the nickname of the certificate + * you wish to authenticate with as it is named in the security database. + * If you want to use a file from the current directory, please precede it with + * "./" prefix, in order to avoid confusion with a nickname. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_SSLCERTTYPE + * + * The format of your client certificate used when connecting to an HTTPS proxy. + * Supported formats are "PEM" and "DER", except with Secure Transport. + * OpenSSL (versions 0.9.3 and later) and Secure Transport + * (on iOS 5 or later, or OS X 10.7 or later) also support "P12" for + * PKCS#12-encoded files. Defaults to "PEM". + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_SSL_CIPHER_LIST + * + * The list of ciphers to use for the connection to the HTTPS proxy. + * The list must be syntactically correct, it consists of one or more cipher + * strings separated by colons. Commas or spaces are also acceptable separators + * but colons are normally used, !, - and + can be used as operators. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_TLS13_CIPHERS + * + * The list of cipher suites to use for the TLS 1.3 connection to a proxy. + * The list must be syntactically correct, it consists of one or more + * cipher suite strings separated by colons. This option is currently used + * only when curl is built to use OpenSSL 1.1.1 or later. + * If you are using a different SSL backend you can try setting + * TLS 1.3 cipher suites by using the CURLOPT_PROXY_SSL_CIPHER_LIST option. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. + * + * + * + * CURLOPT_PROXY_SSLKEY + * + * The file name of your private key used for connecting to the HTTPS proxy. + * The default format is "PEM" and can be changed with + * CURLOPT_PROXY_SSLKEYTYPE. + * (iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled. + * + * + * + * CURLOPT_PROXY_SSLKEYTYPE + * + * The format of your private key. Supported formats are "PEM", "DER" and "ENG". + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_TLSAUTH_PASSWORD + * + * The password to use for the TLS authentication method specified with the + * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the + * CURLOPT_PROXY_TLSAUTH_USERNAME option to also be set. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_TLSAUTH_TYPE + * + * The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP". + * + * + * Secure Remote Password (SRP) authentication for TLS provides mutual authentication + * if both sides have a shared secret. To use TLS-SRP, you must also set the + * CURLOPT_PROXY_TLSAUTH_USERNAME and + * CURLOPT_PROXY_TLSAUTH_PASSWORD options. + * + * + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXY_TLSAUTH_USERNAME + * + * Tusername to use for the HTTPS proxy TLS authentication method specified with the + * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the + * CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. + * + * + * + * CURLOPT_PROXYUSERPWD + * + * A username and password formatted as + * "[username]:[password]" to use for the + * connection to the proxy. + * + * + * + * + * + * CURLOPT_RANDOM_FILE + * + * A filename to be used to seed the random number generator for SSL. + * + * + * + * + * + * CURLOPT_RANGE + * + * Range(s) of data to retrieve in the format + * "X-Y" where X or Y are optional. HTTP transfers + * also support several intervals, separated with commas in the format + * "X-Y,N-M". + * + * + * + * + * + * CURLOPT_REFERER + * + * The contents of the "Referer: " header to be used + * in a HTTP request. + * + * + * + * + * + * CURLOPT_SERVICE_NAME + * + * The authentication service name. + * + * + * Added in cURL 7.43.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 + * + * A string containing 32 hexadecimal digits. The string should be the + * MD5 checksum of the remote host's public key, and libcurl will reject + * the connection to the host unless the md5sums match. + * This option is only for SCP and SFTP transfers. + * + * + * Added in cURL 7.17.1. + * + * + * + * CURLOPT_SSH_PUBLIC_KEYFILE + * + * The file name for your public key. If not used, libcurl defaults to + * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set, + * and just "id_dsa.pub" in the current directory if HOME is not set. + * + * + * Added in cURL 7.16.1. + * + * + * + * CURLOPT_SSH_PRIVATE_KEYFILE + * + * The file name for your private key. If not used, libcurl defaults to + * $HOME/.ssh/id_dsa if the HOME environment variable is set, + * and just "id_dsa" in the current directory if HOME is not set. + * If the file is password-protected, set the password with + * CURLOPT_KEYPASSWD. + * + * + * Added in cURL 7.16.1. + * + * + * + * CURLOPT_SSL_CIPHER_LIST + * + * A list of ciphers to use for SSL. For example, + * RC4-SHA and TLSv1 are valid + * cipher lists. + * + * + * + * + * + * CURLOPT_SSLCERT + * + * The name of a file containing a PEM formatted certificate. + * + * + * + * + * + * CURLOPT_SSLCERTPASSWD + * + * The password required to use the + * CURLOPT_SSLCERT certificate. + * + * + * + * + * + * CURLOPT_SSLCERTTYPE + * + * The format of the certificate. Supported formats are + * "PEM" (default), "DER", + * and "ENG". + * As of OpenSSL 0.9.3, "P12" (for PKCS#12-encoded files) + * is also supported. + * + * + * Added in cURL 7.9.3. + * + * + * + * CURLOPT_SSLENGINE + * + * The identifier for the crypto engine of the private SSL key + * specified in CURLOPT_SSLKEY. + * + * + * + * + * + * CURLOPT_SSLENGINE_DEFAULT + * + * The identifier for the crypto engine used for asymmetric crypto + * operations. + * + * + * + * + * + * CURLOPT_SSLKEY + * + * The name of a file containing a private SSL key. + * + * + * + * + * + * CURLOPT_SSLKEYPASSWD + * + * The secret password needed to use the private SSL key specified in + * CURLOPT_SSLKEY. + * + * + * Since this option contains a sensitive password, remember to keep + * the PHP script it is contained within safe. + * + * + * + * + * + * + * + * CURLOPT_SSLKEYTYPE + * + * The key type of the private SSL key specified in + * CURLOPT_SSLKEY. Supported key types are + * "PEM" (default), "DER", + * and "ENG". + * + * + * + * + * + * CURLOPT_TLS13_CIPHERS + * + * The list of cipher suites to use for the TLS 1.3 connection. The list must be + * syntactically correct, it consists of one or more cipher suite strings separated by colons. + * This option is currently used only when curl is built to use OpenSSL 1.1.1 or later. + * If you are using a different SSL backend you can try setting + * TLS 1.3 cipher suites by using the CURLOPT_SSL_CIPHER_LIST option. + * + * + * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. + * + * + * + * CURLOPT_UNIX_SOCKET_PATH + * + * Enables the use of Unix domain sockets as connection endpoint and + * sets the path to the given string. + * + * + * Added in cURL 7.40.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_URL + * + * The URL to fetch. This can also be set when initializing a + * session with curl_init. + * + * + * + * + * + * CURLOPT_USERAGENT + * + * The contents of the "User-Agent: " header to be + * used in a HTTP request. + * + * + * + * + * + * CURLOPT_USERNAME + * + * The user name to use in authentication. + * + * + * Added in cURL 7.19.1. Available since PHP 5.5.0. + * + * + * + * CURLOPT_USERPWD + * + * A username and password formatted as + * "[username]:[password]" to use for the + * connection. + * + * + * + * + * + * CURLOPT_XOAUTH2_BEARER + * + * Specifies the OAuth 2.0 access token. + * + * + * Added in cURL 7.33.0. Available since PHP 7.0.7. + * + * + * + * + * + * + * A custom request method to use instead of + * "GET" or "HEAD" when doing + * a HTTP request. This is useful for doing + * "DELETE" or other, more obscure HTTP requests. + * Valid values are things like "GET", + * "POST", "CONNECT" and so on; + * i.e. Do not enter a whole HTTP request line here. For instance, + * entering "GET /index.html HTTP/1.0\r\n\r\n" + * would be incorrect. + * + * + * Don't do this without making sure the server supports the custom + * request method first. + * + * + * + * Don't do this without making sure the server supports the custom + * request method first. + * + * The default protocol to use if the URL is missing a scheme name. + * + * Set the name of the network interface that the DNS resolver should bind to. + * This must be an interface name (not an address). + * + * Set the local IPv4 address that the resolver should bind to. The argument + * should contain a single numerical IPv4 address as a string. + * + * Set the local IPv6 address that the resolver should bind to. The argument + * should contain a single numerical IPv6 address as a string. + * + * Secure Remote Password (SRP) authentication for TLS provides mutual authentication + * if both sides have a shared secret. To use TLS-SRP, you must also set the + * CURLOPT_PROXY_TLSAUTH_USERNAME and + * CURLOPT_PROXY_TLSAUTH_PASSWORD options. + * + * The secret password needed to use the private SSL key specified in + * CURLOPT_SSLKEY. + * + * + * Since this option contains a sensitive password, remember to keep + * the PHP script it is contained within safe. + * + * + * + * Since this option contains a sensitive password, remember to keep + * the PHP script it is contained within safe. + * + * value should be an array for the + * following values of the option parameter: + * + * + * + * + * Option + * Set value to + * Notes + * + * + * + * + * CURLOPT_CONNECT_TO + * + * Connect to a specific host and port instead of the URL's host and port. + * Accepts an array of strings with the format + * HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT. + * + * + * Added in cURL 7.49.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_HTTP200ALIASES + * + * An array of HTTP 200 responses that will be treated as valid + * responses and not as errors. + * + * + * Added in cURL 7.10.3. + * + * + * + * CURLOPT_HTTPHEADER + * + * An array of HTTP header fields to set, in the format + * + * array('Content-type: text/plain', 'Content-length: 100') + * + * + * + * + * + * + * CURLOPT_POSTQUOTE + * + * An array of FTP commands to execute on the server after the FTP + * request has been performed. + * + * + * + * + * + * CURLOPT_PROXYHEADER + * + * An array of custom HTTP headers to pass to proxies. + * + * + * Added in cURL 7.37.0. Available since PHP 7.0.7. + * + * + * + * CURLOPT_QUOTE + * + * An array of FTP commands to execute on the server prior to the FTP + * request. + * + * + * + * + * + * CURLOPT_RESOLVE + * + * Provide a custom address for a specific host and port pair. An array + * of hostname, port, and IP address strings, each element separated by + * a colon. In the format: + * + * array("example.com:80:127.0.0.1") + * + * + * + * Added in cURL 7.21.3. Available since PHP 5.5.0. + * + * + * + * + * + * + * value should be a stream resource (using + * fopen, for example) for the following values of the + * option parameter: + * + * + * + * + * Option + * Set value to + * + * + * + * + * CURLOPT_FILE + * + * The file that the transfer should be written to. The default + * is STDOUT (the browser window). + * + * + * + * CURLOPT_INFILE + * + * The file that the transfer should be read from when uploading. + * + * + * + * CURLOPT_STDERR + * + * An alternative location to output errors to instead of + * STDERR. + * + * + * + * CURLOPT_WRITEHEADER + * + * The file that the header part of the transfer is written to. + * + * + * + * + * + * + * value should be the name of a valid function or a Closure + * for the following values of the option parameter: + * + * + * + * + * Option + * Set value to + * + * + * + * + * CURLOPT_HEADERFUNCTION + * + * A callback accepting two parameters. + * The first is the cURL resource, the second is a + * string with the header data to be written. The header data must + * be written by this callback. Return the number of + * bytes written. + * + * + * + * CURLOPT_PASSWDFUNCTION + * + * A callback accepting three parameters. + * The first is the cURL resource, the second is a + * string containing a password prompt, and the third is the maximum + * password length. Return the string containing the password. + * + * + * + * CURLOPT_PROGRESSFUNCTION + * + * + * A callback accepting five parameters. + * The first is the cURL resource, the second is the total number of + * bytes expected to be downloaded in this transfer, the third is + * the number of bytes downloaded so far, the fourth is the total + * number of bytes expected to be uploaded in this transfer, and the + * fifth is the number of bytes uploaded so far. + * + * + * + * The callback is only called when the CURLOPT_NOPROGRESS + * option is set to FALSE. + * + * + * + * Return a non-zero value to abort the transfer. In which case, the + * transfer will set a CURLE_ABORTED_BY_CALLBACK + * error. + * + * + * + * + * CURLOPT_READFUNCTION + * + * A callback accepting three parameters. + * The first is the cURL resource, the second is a + * stream resource provided to cURL through the option + * CURLOPT_INFILE, and the third is the maximum + * amount of data to be read. The callback must return a string + * with a length equal or smaller than the amount of data requested, + * typically by reading it from the passed stream resource. It should + * return an empty string to signal EOF. + * + * + * + * CURLOPT_WRITEFUNCTION + * + * A callback accepting two parameters. + * The first is the cURL resource, and the second is a + * string with the data to be written. The data must be saved by + * this callback. It must return the exact number of bytes written + * or the transfer will be aborted with an error. + * + * + * + * + * + * + * A callback accepting five parameters. + * The first is the cURL resource, the second is the total number of + * bytes expected to be downloaded in this transfer, the third is + * the number of bytes downloaded so far, the fourth is the total + * number of bytes expected to be uploaded in this transfer, and the + * fifth is the number of bytes uploaded so far. + * + * The callback is only called when the CURLOPT_NOPROGRESS + * option is set to FALSE. + * + * Return a non-zero value to abort the transfer. In which case, the + * transfer will set a CURLE_ABORTED_BY_CALLBACK + * error. + * + * Other values: + * + * + * + * + * Option + * Set value to + * + * + * + * + * CURLOPT_SHARE + * + * A result of curl_share_init. Makes the cURL + * handle to use the data from the shared handle. + * + * + * + * + * + * @throws CurlException + * + */ +function curl_setopt($ch, int $option, $value): void +{ + error_clear_last(); + $result = \curl_setopt($ch, $option, $value); + if ($result === false) { + throw CurlException::createFromCurlResource($ch); + } +} + + +/** + * Return an integer containing the last share curl error number. + * + * @param resource $sh A cURL share handle returned by curl_share_init. + * @return int Returns an integer containing the last share curl error number. + * @throws CurlException + * + */ +function curl_share_errno($sh): int +{ + error_clear_last(); + $result = \curl_share_errno($sh); + if ($result === false) { + throw CurlException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets an option on the given cURL share handle. + * + * @param resource $sh A cURL share handle returned by curl_share_init. + * @param int $option + * + * + * + * Option + * Description + * + * + * + * + * CURLSHOPT_SHARE + * + * Specifies a type of data that should be shared. + * + * + * + * CURLSHOPT_UNSHARE + * + * Specifies a type of data that will be no longer shared. + * + * + * + * + * + * @param string $value + * + * + * + * Value + * Description + * + * + * + * + * CURL_LOCK_DATA_COOKIE + * + * Shares cookie data. + * + * + * + * CURL_LOCK_DATA_DNS + * + * Shares DNS cache. Note that when you use cURL multi handles, + * all handles added to the same multi handle will share DNS cache + * by default. + * + * + * + * CURL_LOCK_DATA_SSL_SESSION + * + * Shares SSL session IDs, reducing the time spent on the SSL + * handshake when reconnecting to the same server. Note that SSL + * session IDs are reused within the same handle by default. + * + * + * + * + * + * @throws CurlException + * + */ +function curl_share_setopt($sh, int $option, string $value): void +{ + error_clear_last(); + $result = \curl_share_setopt($sh, $option, $value); + if ($result === false) { + throw CurlException::createFromPhpError(); + } +} + + +/** + * This function decodes the given URL encoded string. + * + * @param resource $ch A cURL handle returned by + * curl_init. + * @param string $str The URL encoded string to be decoded. + * @return string Returns decoded string. + * @throws CurlException + * + */ +function curl_unescape($ch, string $str): string +{ + error_clear_last(); + $result = \curl_unescape($ch, $str); + if ($result === false) { + throw CurlException::createFromCurlResource($ch); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/datetime.php b/vendor/thecodingmachine/safe/generated/datetime.php new file mode 100644 index 000000000..01bfa9364 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/datetime.php @@ -0,0 +1,631 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\DatetimeException; + +/** + * Returns associative array with detailed info about given date/time. + * + * @param string $format Format accepted by DateTime::createFromFormat. + * @param string $datetime String representing the date/time. + * @return array Returns associative array with detailed info about given date/time. + * @throws DatetimeException + * + */ +function date_parse_from_format(string $format, string $datetime): array +{ + error_clear_last(); + $result = \date_parse_from_format($format, $datetime); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $datetime Date/time in format accepted by + * DateTimeImmutable::__construct. + * @return array Returns array with information about the parsed date/time + * on success. + * @throws DatetimeException + * + */ +function date_parse(string $datetime): array +{ + error_clear_last(); + $result = \date_parse($datetime); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param int $timestamp Unix timestamp. + * @param float $latitude Latitude in degrees. + * @param float $longitude Longitude in degrees. + * @return array Returns array on success. + * The structure of the array is detailed in the following list: + * + * + * + * sunrise + * + * + * The timestamp of the sunrise (zenith angle = 90°35'). + * + * + * + * + * sunset + * + * + * The timestamp of the sunset (zenith angle = 90°35'). + * + * + * + * + * transit + * + * + * The timestamp when the sun is at its zenith, i.e. has reached its topmost + * point. + * + * + * + * + * civil_twilight_begin + * + * + * The start of the civil dawn (zenith angle = 96°). It ends at sunrise. + * + * + * + * + * civil_twilight_end + * + * + * The end of the civil dusk (zenith angle = 96°). It starts at sunset. + * + * + * + * + * nautical_twilight_begin + * + * + * The start of the nautical dawn (zenith angle = 102°). It ends at + * civil_twilight_begin. + * + * + * + * + * nautical_twilight_end + * + * + * The end of the nautical dusk (zenith angle = 102°). It starts at + * civil_twilight_end. + * + * + * + * + * astronomical_twilight_begin + * + * + * The start of the astronomical dawn (zenith angle = 108°). It ends at + * nautical_twilight_begin. + * + * + * + * + * astronomical_twilight_end + * + * + * The end of the astronomical dusk (zenith angle = 108°). It starts at + * nautical_twilight_end. + * + * + * + * + * + * The values of the array elements are either UNIX timestamps, FALSE if the + * sun is below the respective zenith for the whole day, or TRUE if the sun is + * above the respective zenith for the whole day. + * @throws DatetimeException + * + */ +function date_sun_info(int $timestamp, float $latitude, float $longitude): array +{ + error_clear_last(); + $result = \date_sun_info($timestamp, $latitude, $longitude); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * date_sunrise returns the sunrise time for a given + * day (specified as a timestamp) and location. + * + * @param int $timestamp The timestamp of the day from which the sunrise + * time is taken. + * @param int $returnFormat + * returnFormat constants + * + * + * + * constant + * description + * example + * + * + * + * + * SUNFUNCS_RET_STRING + * returns the result as string + * 16:46 + * + * + * SUNFUNCS_RET_DOUBLE + * returns the result as float + * 16.78243132 + * + * + * SUNFUNCS_RET_TIMESTAMP + * returns the result as integer (timestamp) + * 1095034606 + * + * + * + * + * @param float $latitude Defaults to North, pass in a negative value for South. + * See also: date.default_latitude + * @param float $longitude Defaults to East, pass in a negative value for West. + * See also: date.default_longitude + * @param float $zenith zenith is the angle between the center of the sun + * and a line perpendicular to earth's surface. It defaults to + * date.sunrise_zenith + * + * Common zenith angles + * + * + * + * Angle + * Description + * + * + * + * + * 90°50' + * Sunrise: the point where the sun becomes visible. + * + * + * 96° + * Civil twilight: conventionally used to signify the start of dawn. + * + * + * 102° + * Nautical twilight: the point at which the horizon starts being visible at sea. + * + * + * 108° + * Astronomical twilight: the point at which the sun starts being the source of any illumination. + * + * + * + * + * @param float $utcOffset Specified in hours. + * The utcOffset is ignored, if + * returnFormat is + * SUNFUNCS_RET_TIMESTAMP. + * @return mixed Returns the sunrise time in a specified returnFormat on + * success. One potential reason for failure is that the + * sun does not rise at all, which happens inside the polar circles for part of + * the year. + * @throws DatetimeException + * + */ +function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0) +{ + error_clear_last(); + if ($utcOffset !== 0) { + $result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset); + } elseif ($zenith !== null) { + $result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith); + } elseif ($longitude !== null) { + $result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude); + } elseif ($latitude !== null) { + $result = \date_sunrise($timestamp, $returnFormat, $latitude); + } else { + $result = \date_sunrise($timestamp, $returnFormat); + } + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * date_sunset returns the sunset time for a given + * day (specified as a timestamp) and location. + * + * @param int $timestamp The timestamp of the day from which the sunset + * time is taken. + * @param int $returnFormat + * returnFormat constants + * + * + * + * constant + * description + * example + * + * + * + * + * SUNFUNCS_RET_STRING + * returns the result as string + * 16:46 + * + * + * SUNFUNCS_RET_DOUBLE + * returns the result as float + * 16.78243132 + * + * + * SUNFUNCS_RET_TIMESTAMP + * returns the result as integer (timestamp) + * 1095034606 + * + * + * + * + * @param float $latitude Defaults to North, pass in a negative value for South. + * See also: date.default_latitude + * @param float $longitude Defaults to East, pass in a negative value for West. + * See also: date.default_longitude + * @param float $zenith zenith is the angle between the center of the sun + * and a line perpendicular to earth's surface. It defaults to + * date.sunset_zenith + * + * Common zenith angles + * + * + * + * Angle + * Description + * + * + * + * + * 90°50' + * Sunset: the point where the sun becomes invisible. + * + * + * 96° + * Civil twilight: conventionally used to signify the end of dusk. + * + * + * 102° + * Nautical twilight: the point at which the horizon ends being visible at sea. + * + * + * 108° + * Astronomical twilight: the point at which the sun ends being the source of any illumination. + * + * + * + * + * @param float $utcOffset Specified in hours. + * The utcOffset is ignored, if + * returnFormat is + * SUNFUNCS_RET_TIMESTAMP. + * @return mixed Returns the sunset time in a specified returnFormat on + * success. One potential reason for failure is that the + * sun does not set at all, which happens inside the polar circles for part of + * the year. + * @throws DatetimeException + * + */ +function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0) +{ + error_clear_last(); + if ($utcOffset !== 0) { + $result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset); + } elseif ($zenith !== null) { + $result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith); + } elseif ($longitude !== null) { + $result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude); + } elseif ($latitude !== null) { + $result = \date_sunset($timestamp, $returnFormat, $latitude); + } else { + $result = \date_sunset($timestamp, $returnFormat); + } + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns a string formatted according to the given format string using the + * given integer timestamp or the current time + * if no timestamp is given. In other words, timestamp + * is optional and defaults to the value of time. + * + * @param string $format Format accepted by DateTimeInterface::format. + * @param int $timestamp The optional timestamp parameter is an + * integer Unix timestamp that defaults to the current + * local time if a timestamp is not given. In other + * words, it defaults to the value of time. + * @return string Returns a formatted date string. If a non-numeric value is used for + * timestamp, FALSE is returned and an + * E_WARNING level error is emitted. + * @throws DatetimeException + * + */ +function date(string $format, int $timestamp = null): string +{ + error_clear_last(); + if ($timestamp !== null) { + $result = \date($format, $timestamp); + } else { + $result = \date($format); + } + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * Identical to the date function except that + * the time returned is Greenwich Mean Time (GMT). + * + * @param string $format The format of the outputted date string. See the formatting + * options for the date function. + * @param int $timestamp The optional timestamp parameter is an + * integer Unix timestamp that defaults to the current + * local time if a timestamp is not given. In other + * words, it defaults to the value of time. + * @return string Returns a formatted date string. If a non-numeric value is used for + * timestamp, FALSE is returned and an + * E_WARNING level error is emitted. + * @throws DatetimeException + * + */ +function gmdate(string $format, int $timestamp = null): string +{ + error_clear_last(); + if ($timestamp !== null) { + $result = \gmdate($format, $timestamp); + } else { + $result = \gmdate($format); + } + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the Unix timestamp corresponding to the arguments + * given. This timestamp is a long integer containing the number of + * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time + * specified. + * + * Arguments may be left out in order from right to left; any + * arguments thus omitted will be set to the current value according + * to the local date and time. + * + * @param int $hour The number of the hour relative to the start of the day determined by + * month, day and year. + * Negative values reference the hour before midnight of the day in question. + * Values greater than 23 reference the appropriate hour in the following day(s). + * @param int $minute The number of the minute relative to the start of the hour. + * Negative values reference the minute in the previous hour. + * Values greater than 59 reference the appropriate minute in the following hour(s). + * @param int $second The number of seconds relative to the start of the minute. + * Negative values reference the second in the previous minute. + * Values greater than 59 reference the appropriate second in the following minute(s). + * @param int $month The number of the month relative to the end of the previous year. + * Values 1 to 12 reference the normal calendar months of the year in question. + * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. + * Values greater than 12 reference the appropriate month in the following year(s). + * @param int $day The number of the day relative to the end of the previous month. + * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. + * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. + * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). + * @param int $year The number of the year, may be a two or four digit value, + * with values between 0-69 mapping to 2000-2069 and 70-100 to + * 1970-2000. On systems where time_t is a 32bit signed integer, as + * most common today, the valid range for year + * is somewhere between 1901 and 2038. However, before PHP 5.1.0 this + * range was limited from 1970 to 2038 on some systems (e.g. Windows). + * @return int mktime returns the Unix timestamp of the arguments + * given. + * If the arguments are invalid, the function returns FALSE (before PHP 5.1 + * it returned -1). + * @throws DatetimeException + * + */ +function mktime(int $hour = null, int $minute = null, int $second = null, int $month = null, int $day = null, int $year = null): int +{ + error_clear_last(); + if ($year !== null) { + $result = \mktime($hour, $minute, $second, $month, $day, $year); + } elseif ($day !== null) { + $result = \mktime($hour, $minute, $second, $month, $day); + } elseif ($month !== null) { + $result = \mktime($hour, $minute, $second, $month); + } elseif ($second !== null) { + $result = \mktime($hour, $minute, $second); + } elseif ($minute !== null) { + $result = \mktime($hour, $minute); + } elseif ($hour !== null) { + $result = \mktime($hour); + } else { + $result = \mktime(); + } + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * strptime returns an array with the + * date parsed. + * + * Month and weekday names and other language dependent strings respect the + * current locale set with setlocale (LC_TIME). + * + * @param string $date The string to parse (e.g. returned from strftime). + * @param string $format The format used in date (e.g. the same as + * used in strftime). Note that some of the format + * options available to strftime may not have any + * effect within strptime; the exact subset that are + * supported will vary based on the operating system and C library in + * use. + * + * For more information about the format options, read the + * strftime page. + * @return array Returns an array. + * + * + * The following parameters are returned in the array + * + * + * + * parameters + * Description + * + * + * + * + * "tm_sec" + * Seconds after the minute (0-61) + * + * + * "tm_min" + * Minutes after the hour (0-59) + * + * + * "tm_hour" + * Hour since midnight (0-23) + * + * + * "tm_mday" + * Day of the month (1-31) + * + * + * "tm_mon" + * Months since January (0-11) + * + * + * "tm_year" + * Years since 1900 + * + * + * "tm_wday" + * Days since Sunday (0-6) + * + * + * "tm_yday" + * Days since January 1 (0-365) + * + * + * "unparsed" + * the date part which was not + * recognized using the specified format + * + * + * + * + * @throws DatetimeException + * + */ +function strptime(string $date, string $format): array +{ + error_clear_last(); + $result = \strptime($date, $format); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * Each parameter of this function uses the default time zone unless a + * time zone is specified in that parameter. Be careful not to use + * different time zones in each parameter unless that is intended. + * See date_default_timezone_get on the various + * ways to define the default time zone. + * + * @param string $datetime A date/time string. Valid formats are explained in Date and Time Formats. + * @param int $now The timestamp which is used as a base for the calculation of relative + * dates. + * @return int Returns a timestamp on success, FALSE otherwise. Previous to PHP 5.1.0, + * this function would return -1 on failure. + * @throws DatetimeException + * + */ +function strtotime(string $datetime, int $now = null): int +{ + error_clear_last(); + if ($now !== null) { + $result = \strtotime($datetime, $now); + } else { + $result = \strtotime($datetime); + } + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $abbr Time zone abbreviation. + * @param int $utcOffset Offset from GMT in seconds. Defaults to -1 which means that first found + * time zone corresponding to abbr is returned. + * Otherwise exact offset is searched and only if not found then the first + * time zone with any offset is returned. + * @param int $isDST Daylight saving time indicator. Defaults to -1, which means that + * whether the time zone has daylight saving or not is not taken into + * consideration when searching. If this is set to 1, then the + * utcOffset is assumed to be an offset with + * daylight saving in effect; if 0, then utcOffset + * is assumed to be an offset without daylight saving in effect. If + * abbr doesn't exist then the time zone is + * searched solely by the utcOffset and + * isDST. + * @return string Returns time zone name on success. + * @throws DatetimeException + * + */ +function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1): string +{ + error_clear_last(); + $result = \timezone_name_from_abbr($abbr, $utcOffset, $isDST); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/dir.php b/vendor/thecodingmachine/safe/generated/dir.php new file mode 100644 index 000000000..628dec537 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/dir.php @@ -0,0 +1,157 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\DirException; + +/** + * Changes PHP's current directory to + * directory. + * + * @param string $directory The new current directory + * @throws DirException + * + */ +function chdir(string $directory): void +{ + error_clear_last(); + $result = \chdir($directory); + if ($result === false) { + throw DirException::createFromPhpError(); + } +} + + +/** + * Changes the root directory of the current process to + * directory, and changes the current + * working directory to "/". + * + * This function is only available to GNU and BSD systems, and + * only when using the CLI, CGI or Embed SAPI. Also, this function + * requires root privileges. + * + * @param string $directory The path to change the root directory to. + * @throws DirException + * + */ +function chroot(string $directory): void +{ + error_clear_last(); + $result = \chroot($directory); + if ($result === false) { + throw DirException::createFromPhpError(); + } +} + + +/** + * Gets the current working directory. + * + * @return string Returns the current working directory on success. + * + * On some Unix variants, getcwd will return + * FALSE if any one of the parent directories does not have the + * readable or search mode set, even if the current directory + * does. See chmod for more information on + * modes and permissions. + * @throws DirException + * + */ +function getcwd(): string +{ + error_clear_last(); + $result = \getcwd(); + if ($result === false) { + throw DirException::createFromPhpError(); + } + return $result; +} + + +/** + * Opens up a directory handle to be used in subsequent + * closedir, readdir, and + * rewinddir calls. + * + * @param string $path The directory path that is to be opened + * @param resource $context For a description of the context parameter, + * refer to the streams section of + * the manual. + * @return resource Returns a directory handle resource on success + * @throws DirException + * + */ +function opendir(string $path, $context = null) +{ + error_clear_last(); + if ($context !== null) { + $result = \opendir($path, $context); + } else { + $result = \opendir($path); + } + if ($result === false) { + throw DirException::createFromPhpError(); + } + return $result; +} + + +/** + * Resets the directory stream indicated by + * dir_handle to the beginning of the + * directory. + * + * @param resource $dir_handle The directory handle resource previously opened + * with opendir. If the directory handle is + * not specified, the last link opened by opendir + * is assumed. + * @throws DirException + * + */ +function rewinddir($dir_handle = null): void +{ + error_clear_last(); + if ($dir_handle !== null) { + $result = \rewinddir($dir_handle); + } else { + $result = \rewinddir(); + } + if ($result === false) { + throw DirException::createFromPhpError(); + } +} + + +/** + * Returns an array of files and directories from the + * directory. + * + * @param string $directory The directory that will be scanned. + * @param int $sorting_order By default, the sorted order is alphabetical in ascending order. If + * the optional sorting_order is set to + * SCANDIR_SORT_DESCENDING, then the sort order is + * alphabetical in descending order. If it is set to + * SCANDIR_SORT_NONE then the result is unsorted. + * @param resource $context For a description of the context parameter, + * refer to the streams section of + * the manual. + * @return array Returns an array of filenames on success. If directory is not a directory, then + * boolean FALSE is returned, and an error of level + * E_WARNING is generated. + * @throws DirException + * + */ +function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array +{ + error_clear_last(); + if ($context !== null) { + $result = \scandir($directory, $sorting_order, $context); + } else { + $result = \scandir($directory, $sorting_order); + } + if ($result === false) { + throw DirException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/eio.php b/vendor/thecodingmachine/safe/generated/eio.php new file mode 100644 index 000000000..8d2f538e8 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/eio.php @@ -0,0 +1,2071 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\EioException; + +/** + * eio_busy artificially increases load taking + * delay seconds to execute. May be used for debugging, + * or benchmarking. + * + * @param int $delay Delay in seconds + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback This callback is called when all the group requests are done. + * @param mixed $data Arbitrary variable passed to callback. + * @return resource eio_busy returns request resource on success. + * @throws EioException + * + */ +function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_busy($delay, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_chmod changes file, or directory permissions. The + * new permissions are specified by mode. + * + * @param string $path Path to the target file or directory + * Avoid relative + * paths + * @param int $mode The new permissions. E.g. 0644. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_chmod returns request resource on success. + * @throws EioException + * + */ +function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_chmod($path, $mode, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * Changes file, or directory permissions. + * + * @param string $path Path to file or directory. + * Avoid relative + * paths + * @param int $uid User ID. Is ignored when equal to -1. + * @param int $gid Group ID. Is ignored when equal to -1. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_chown returns request resource on success. + * @throws EioException + * + */ +function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_chown($path, $uid, $gid, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_close closes file specified by + * fd. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_close returns request resource on success. + * @throws EioException + * + */ +function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_close($fd, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_custom executes custom function specified by + * execute processing it just like any other eio_* call. + * + * @param callable $execute Specifies the request function that should match the following prototype: + * + * + * callback is event completion callback that should match the following + * prototype: + * + * + * data is the data passed to + * execute via data argument + * without modifications + * result value returned by execute + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_custom returns request resource on success. + * @throws EioException + * + */ +function eio_custom(callable $execute, int $pri, callable $callback, $data = null) +{ + error_clear_last(); + $result = \eio_custom($execute, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_dup2 duplicates file descriptor. + * + * @param mixed $fd Source stream, Socket resource, or numeric file descriptor + * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_dup2 returns request resource on success. + * @throws EioException + * + */ +function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_dup2($fd, $fd2, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_event_loop polls libeio until all requests proceeded. + * + * @throws EioException + * + */ +function eio_event_loop(): void +{ + error_clear_last(); + $result = \eio_event_loop(); + if ($result === false) { + throw EioException::createFromPhpError(); + } +} + + +/** + * eio_fallocate allows the caller to directly manipulate the allocated disk space for the + * file specified by fd file descriptor for the byte + * range starting at offset and continuing for + * length bytes. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. + * @param int $mode Currently only one flag is supported for mode: + * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant + * FALLOC_FL_KEEP_SIZE). + * @param int $offset Specifies start of the byte range. + * @param int $length Specifies length the byte range. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_fallocate returns request resource on success. + * @throws EioException + * + */ +function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_fallocate($fd, $mode, $offset, $length, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_fchmod changes permissions for the file specified + * by fd file descriptor. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. + * @param int $mode The new permissions. E.g. 0644. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_fchmod returns request resource on success. + * @throws EioException + * + */ +function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_fchmod($fd, $mode, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_fdatasync synchronizes a file's in-core state with storage device. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_fdatasync returns request resource on success. + * @throws EioException + * + */ +function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_fdatasync($fd, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_fstat returns file status information in + * result argument of callback + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_busy returns request resource on success. + * @throws EioException + * + */ +function eio_fstat($fd, int $pri, callable $callback, $data = null) +{ + error_clear_last(); + if ($data !== null) { + $result = \eio_fstat($fd, $pri, $callback, $data); + } else { + $result = \eio_fstat($fd, $pri, $callback); + } + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_fstatvfs returns file system statistics in + * result of callback. + * + * @param mixed $fd A file descriptor of a file within the mounted file system. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_fstatvfs returns request resource on success. + * @throws EioException + * + */ +function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) +{ + error_clear_last(); + if ($data !== null) { + $result = \eio_fstatvfs($fd, $pri, $callback, $data); + } else { + $result = \eio_fstatvfs($fd, $pri, $callback); + } + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * Synchronize a file's in-core state with storage device + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_fsync returns request resource on success. + * @throws EioException + * + */ +function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_fsync($fd, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_ftruncate causes a regular file referenced by + * fd file descriptor to be truncated to precisely + * length bytes. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor. + * @param int $offset Offset from beginning of the file + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_ftruncate returns request resource on success. + * @throws EioException + * + */ +function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_ftruncate($fd, $offset, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_futime changes file last access and modification + * times. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open + * @param float $atime Access time + * @param float $mtime Modification time + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_futime returns request resource on success. + * @throws EioException + * + */ +function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_futime($fd, $atime, $mtime, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_grp creates a request group. + * + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param string $data is custom data passed to the request. + * @return resource eio_grp returns request group resource on success. + * @throws EioException + * + */ +function eio_grp(callable $callback, string $data = null) +{ + error_clear_last(); + $result = \eio_grp($callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_lstat returns file status information in + * result argument of callback + * + * @param string $path The file path + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_lstat returns request resource on success. + * @throws EioException + * + */ +function eio_lstat(string $path, int $pri, callable $callback, $data = null) +{ + error_clear_last(); + $result = \eio_lstat($path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_mkdir creates directory with specified access + * mode. + * + * @param string $path Path for the new directory. + * @param int $mode Access mode, e.g. 0755 + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_mkdir returns request resource on success. + * @throws EioException + * + */ +function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_mkdir($path, $mode, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_mknod creates ordinary or special(often) file. + * + * @param string $path Path for the new node(file). + * @param int $mode Specifies both the permissions to use and the type of node to be + * created. It should be a combination (using bitwise OR) of one of the + * file types listed below and the permissions for the new node(e.g. 0640). + * + * Possible file types are: EIO_S_IFREG(regular file), + * EIO_S_IFCHR(character file), + * EIO_S_IFBLK(block special file), + * EIO_S_IFIFO(FIFO - named pipe) and + * EIO_S_IFSOCK(UNIX domain socket). + * + * To specify permissions EIO_S_I* constants could be + * used. + * @param int $dev If the file type is EIO_S_IFCHR or + * EIO_S_IFBLK then dev specifies the major and minor + * numbers of the newly created device special file. Otherwise + * dev ignored. See mknod(2) man page for + * details. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_mknod returns request resource on success. + * @throws EioException + * + */ +function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_mknod($path, $mode, $dev, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_nop does nothing, except go through the whole + * request cycle. Could be useful in debugging. + * + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_nop returns request resource on success. + * @throws EioException + * + */ +function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_nop($pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_readahead populates the page cache with data from a file so that subsequent reads from + * that file will not block on disk I/O. See READAHEAD(2) man page for details. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor + * @param int $offset Starting point from which data is to be read. + * @param int $length Number of bytes to be read. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_readahead returns request resource on success. + * @throws EioException + * + */ +function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_readahead($fd, $offset, $length, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads through a whole directory(via the opendir, readdir and + * closedir system calls) and returns either the names or an array in + * result argument of callback + * function, depending on the flags argument. + * + * @param string $path Directory path. + * @param int $flags Combination of EIO_READDIR_* constants. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param string $data is custom data passed to the request. + * @return resource eio_readdir returns request resource on success. Sets result argument of + * callback function according to + * flags: + * + * + * + * + * + * + * EIO_READDIR_DENTS + * (integer) + * + * + * + * eio_readdir flag. If specified, the result argument of the callback + * becomes an array with the following keys: + * 'names' - array of directory names + * 'dents' - array of struct + * eio_dirent-like arrays having the following keys each: + * 'name' - the directory name; + * 'type' - one of EIO_DT_* + * constants; + * 'inode' - the inode number, if available, otherwise + * unspecified; + * + * + * + * + * + * EIO_READDIR_DIRS_FIRST + * (integer) + * + * + * + * When this flag is specified, the names will be returned in an order + * where likely directories come first, in optimal stat order. + * + * + * + * + * + * EIO_READDIR_STAT_ORDER + * (integer) + * + * + * + * When this flag is specified, then the names will be returned in an order + * suitable for stat'ing each one. When planning to + * stat all files in the given directory, the + * returned order will likely be + * fastest. + * + * + * + * + * + * EIO_READDIR_FOUND_UNKNOWN + * (integer) + * + * + * + * + * + * + * + * + * + * + * + * Node types: + * + * + * + * + * + * EIO_DT_UNKNOWN + * (integer) + * + * + * + * Unknown node type(very common). Further stat needed. + * + * + * + * + * + * EIO_DT_FIFO + * (integer) + * + * + * + * FIFO node type + * + * + * + * + * + * EIO_DT_CHR + * (integer) + * + * + * + * Node type + * + * + * + * + * + * EIO_DT_MPC + * (integer) + * + * + * + * Multiplexed char device (v7+coherent) node type + * + * + * + * + * + * EIO_DT_DIR + * (integer) + * + * + * + * Directory node type + * + * + * + * + * + * EIO_DT_NAM + * (integer) + * + * + * + * Xenix special named file node type + * + * + * + * + * + * EIO_DT_BLK + * (integer) + * + * + * + * Node type + * + * + * + * + * + * EIO_DT_MPB + * (integer) + * + * + * + * Multiplexed block device (v7+coherent) + * + * + * + * + * + * EIO_DT_REG + * (integer) + * + * + * + * Node type + * + * + * + * + * + * EIO_DT_NWK + * (integer) + * + * + * + * + * + * + * + * + * EIO_DT_CMP + * (integer) + * + * + * + * HP-UX network special node type + * + * + * + * + * + * EIO_DT_LNK + * (integer) + * + * + * + * Link node type + * + * + * + * + * + * EIO_DT_SOCK + * (integer) + * + * + * + * Socket node type + * + * + * + * + * + * EIO_DT_DOOR + * (integer) + * + * + * + * Solaris door node type + * + * + * + * + * + * EIO_DT_WHT + * (integer) + * + * + * + * Node type + * + * + * + * + * + * EIO_DT_MAX + * (integer) + * + * + * + * Highest node type value + * + * + * + * + * + * + * + * @throws EioException + * + */ +function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = null) +{ + error_clear_last(); + $result = \eio_readdir($path, $flags, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $path Source symbolic link path + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param string $data is custom data passed to the request. + * @return resource eio_readlink returns request resource on success. + * @throws EioException + * + */ +function eio_readlink(string $path, int $pri, callable $callback, string $data = null) +{ + error_clear_last(); + $result = \eio_readlink($path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_rename renames or moves a file to new location. + * + * @param string $path Source path + * @param string $new_path Target path + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_rename returns request resource on success. + * @throws EioException + * + */ +function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_rename($path, $new_path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_rmdir removes a directory. + * + * @param string $path Directory path + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_rmdir returns request resource on success. + * @throws EioException + * + */ +function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_rmdir($path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_seek repositions the offset of the open file associated with + * stream, Socket resource, or file descriptor specified by fd to the argument offset according to the directive whence as follows: + * + * EIO_SEEK_SET - Set position equal to offset bytes. + * EIO_SEEK_CUR - Set position to current location plus offset. + * EIO_SEEK_END - Set position to end-of-file plus offset. + * + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor + * @param int $offset Starting point from which data is to be read. + * @param int $whence Number of bytes to be read. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_seek returns request resource on success. + * @throws EioException + * + */ +function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_seek($fd, $offset, $whence, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_sendfile copies data between one file descriptor + * and another. See SENDFILE(2) man page for details. + * + * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. + * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. + * @param int $offset Offset within the source file. + * @param int $length Number of bytes to copy. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param string $data is custom data passed to the request. + * @return resource eio_sendfile returns request resource on success. + * @throws EioException + * + */ +function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null, callable $callback = null, string $data = null) +{ + error_clear_last(); + if ($data !== null) { + $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback, $data); + } elseif ($callback !== null) { + $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback); + } elseif ($pri !== null) { + $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri); + } else { + $result = \eio_sendfile($out_fd, $in_fd, $offset, $length); + } + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_stat returns file status information in + * result argument of callback + * + * @param string $path The file path + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_stat returns request resource on success. On success assigns result argument of + * callback to an array. + * @throws EioException + * + */ +function eio_stat(string $path, int $pri, callable $callback, $data = null) +{ + error_clear_last(); + $result = \eio_stat($path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_statvfs returns file system statistics information in + * result argument of callback + * + * @param string $path Pathname of any file within the mounted file system + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_statvfs returns request resource on success. On success assigns result argument of + * callback to an array. + * @throws EioException + * + */ +function eio_statvfs(string $path, int $pri, callable $callback, $data = null) +{ + error_clear_last(); + if ($data !== null) { + $result = \eio_statvfs($path, $pri, $callback, $data); + } else { + $result = \eio_statvfs($path, $pri, $callback); + } + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_symlink creates a symbolic link + * new_path to path. + * + * @param string $path Source path + * @param string $new_path Target path + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_symlink returns request resource on success. + * @throws EioException + * + */ +function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_symlink($path, $new_path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file + * descriptor fd with disk. + * + * @param mixed $fd File descriptor + * @param int $offset The starting byte of the file range to be synchronized + * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If + * nbytes is zero, then all bytes from offset through + * to the end of file are synchronized. + * @param int $flags A bit-mask. Can include any of the following values: + * EIO_SYNC_FILE_RANGE_WAIT_BEFORE, + * EIO_SYNC_FILE_RANGE_WRITE, + * EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have + * the same meaning as their SYNC_FILE_RANGE_* + * counterparts(see SYNC_FILE_RANGE(2) man page). + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_sync_file_range returns request resource on success. + * @throws EioException + * + */ +function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_sync_file_range($fd, $offset, $nbytes, $flags, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param int $pri + * @param callable $callback + * @param mixed $data + * @return resource eio_sync returns request resource on success. + * @throws EioException + * + */ +function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_sync($pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param mixed $fd File descriptor + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_syncfs returns request resource on success. + * @throws EioException + * + */ +function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_syncfs($fd, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_truncate causes the regular file named by path to be truncated to + * a size of precisely length bytes + * + * @param string $path File path + * @param int $offset Offset from beginning of the file. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_busy returns request resource on success. + * @throws EioException + * + */ +function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_truncate($path, $offset, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_unlink deletes a name from the file system. + * + * @param string $path Path to file + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_unlink returns request resource on success. + * @throws EioException + * + */ +function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_unlink($path, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $path Path to the file. + * @param float $atime Access time + * @param float $mtime Modification time + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_utime returns request resource on success. + * @throws EioException + * + */ +function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_utime($path, $atime, $mtime, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} + + +/** + * eio_write writes up to length + * bytes from str at offset + * offset from the beginning of the file. + * + * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open + * @param string $str Source string + * @param int $length Maximum number of bytes to write. + * @param int $offset Offset from the beginning of file. + * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. + * If NULL passed, pri internally is set to + * EIO_PRI_DEFAULT. + * @param callable $callback + * callback function is called when the request is done. + * It should match the following prototype: + * + * + * data + * is custom data passed to the request. + * + * + * result + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * + * req + * is optional request resource which can be used with functions like eio_get_last_error + * + * + * + * is custom data passed to the request. + * + * request-specific result value; basically, the value returned by corresponding + * system call. + * + * is optional request resource which can be used with functions like eio_get_last_error + * @param mixed $data is custom data passed to the request. + * @return resource eio_write returns request resource on success. + * @throws EioException + * + */ +function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +{ + error_clear_last(); + $result = \eio_write($fd, $str, $length, $offset, $pri, $callback, $data); + if ($result === false) { + throw EioException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/errorfunc.php b/vendor/thecodingmachine/safe/generated/errorfunc.php new file mode 100644 index 000000000..ac64a7d8b --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/errorfunc.php @@ -0,0 +1,82 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ErrorfuncException; + +/** + * Sends an error message to the web server's error log or to a file. + * + * @param string $message The error message that should be logged. + * @param int $message_type Says where the error should go. The possible message types are as + * follows: + * + * + * error_log log types + * + * + * + * 0 + * + * message is sent to PHP's system logger, using + * the Operating System's system logging mechanism or a file, depending + * on what the error_log + * configuration directive is set to. This is the default option. + * + * + * + * 1 + * + * message is sent by email to the address in + * the destination parameter. This is the only + * message type where the fourth parameter, + * extra_headers is used. + * + * + * + * 2 + * + * No longer an option. + * + * + * + * 3 + * + * message is appended to the file + * destination. A newline is not automatically + * added to the end of the message string. + * + * + * + * 4 + * + * message is sent directly to the SAPI logging + * handler. + * + * + * + * + * + * @param string $destination The destination. Its meaning depends on the + * message_type parameter as described above. + * @param string $extra_headers The extra headers. It's used when the message_type + * parameter is set to 1. + * This message type uses the same internal function as + * mail does. + * @throws ErrorfuncException + * + */ +function error_log(string $message, int $message_type = 0, string $destination = null, string $extra_headers = null): void +{ + error_clear_last(); + if ($extra_headers !== null) { + $result = \error_log($message, $message_type, $destination, $extra_headers); + } elseif ($destination !== null) { + $result = \error_log($message, $message_type, $destination); + } else { + $result = \error_log($message, $message_type); + } + if ($result === false) { + throw ErrorfuncException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/exec.php b/vendor/thecodingmachine/safe/generated/exec.php new file mode 100644 index 000000000..e9a40e08b --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/exec.php @@ -0,0 +1,159 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ExecException; + +/** + * proc_get_status fetches data about a + * process opened using proc_open. + * + * @param resource $process The proc_open resource that will + * be evaluated. + * @return array An array of collected information on success. The returned array contains the following elements: + * + * + * + * + * elementtypedescription + * + * + * + * command + * string + * + * The command string that was passed to proc_open. + * + * + * + * pid + * int + * process id + * + * + * running + * bool + * + * TRUE if the process is still running, FALSE if it has + * terminated. + * + * + * + * signaled + * bool + * + * TRUE if the child process has been terminated by + * an uncaught signal. Always set to FALSE on Windows. + * + * + * + * stopped + * bool + * + * TRUE if the child process has been stopped by a + * signal. Always set to FALSE on Windows. + * + * + * + * exitcode + * int + * + * The exit code returned by the process (which is only + * meaningful if running is FALSE). + * Only first call of this function return real value, next calls return + * -1. + * + * + * + * termsig + * int + * + * The number of the signal that caused the child process to terminate + * its execution (only meaningful if signaled is TRUE). + * + * + * + * stopsig + * int + * + * The number of the signal that caused the child process to stop its + * execution (only meaningful if stopped is TRUE). + * + * + * + * + * + * @throws ExecException + * + */ +function proc_get_status($process): array +{ + error_clear_last(); + $result = \proc_get_status($process); + if ($result === false) { + throw ExecException::createFromPhpError(); + } + return $result; +} + + +/** + * proc_nice changes the priority of the current + * process by the amount specified in increment. A + * positive increment will lower the priority of the + * current process, whereas a negative increment + * will raise the priority. + * + * proc_nice is not related to + * proc_open and its associated functions in any way. + * + * @param int $increment The new priority value, the value of this may differ on platforms. + * + * On Unix, a low value, such as -20 means high priority + * wheras a positive value have a lower priority. + * + * For Windows the increment parameter have the + * following meanings: + * @throws ExecException + * + */ +function proc_nice(int $increment): void +{ + error_clear_last(); + $result = \proc_nice($increment); + if ($result === false) { + throw ExecException::createFromPhpError(); + } +} + + +/** + * system is just like the C version of the + * function in that it executes the given + * command and outputs the result. + * + * The system call also tries to automatically + * flush the web server's output buffer after each line of output if + * PHP is running as a server module. + * + * If you need to execute a command and have all the data from the + * command passed directly back without any interference, use the + * passthru function. + * + * @param string $command The command that will be executed. + * @param int $return_var If the return_var argument is present, then the + * return status of the executed command will be written to this + * variable. + * @return string Returns the last line of the command output on success. + * @throws ExecException + * + */ +function system(string $command, int &$return_var = null): string +{ + error_clear_last(); + $result = \system($command, $return_var); + if ($result === false) { + throw ExecException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/fileinfo.php b/vendor/thecodingmachine/safe/generated/fileinfo.php new file mode 100644 index 000000000..50345b67c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/fileinfo.php @@ -0,0 +1,75 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\FileinfoException; + +/** + * This function closes the resource opened by finfo_open. + * + * @param resource $finfo Fileinfo resource returned by finfo_open. + * @throws FileinfoException + * + */ +function finfo_close($finfo): void +{ + error_clear_last(); + $result = \finfo_close($finfo); + if ($result === false) { + throw FileinfoException::createFromPhpError(); + } +} + + +/** + * Procedural style + * + * Object oriented style (constructor): + * + * This function opens a magic database and returns its resource. + * + * @param int $options One or disjunction of more Fileinfo + * constants. + * @param string $magic_file Name of a magic database file, usually something like + * /path/to/magic.mime. If not specified, the + * MAGIC environment variable is used. If the + * environment variable isn't set, then PHP's bundled magic database will + * be used. + * + * Passing NULL or an empty string will be equivalent to the default + * value. + * @return resource (Procedural style only) + * Returns a magic database resource on success. + * @throws FileinfoException + * + */ +function finfo_open(int $options = FILEINFO_NONE, string $magic_file = "") +{ + error_clear_last(); + $result = \finfo_open($options, $magic_file); + if ($result === false) { + throw FileinfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the MIME content type for a file as determined by using + * information from the magic.mime file. + * + * @param string $filename Path to the tested file. + * @return string Returns the content type in MIME format, like + * text/plain or application/octet-stream. + * @throws FileinfoException + * + */ +function mime_content_type(string $filename): string +{ + error_clear_last(); + $result = \mime_content_type($filename); + if ($result === false) { + throw FileinfoException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/filesystem.php b/vendor/thecodingmachine/safe/generated/filesystem.php new file mode 100644 index 000000000..ee0a4bdf1 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/filesystem.php @@ -0,0 +1,1488 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\FilesystemException; + +/** + * Attempts to change the group of the file filename + * to group. + * + * Only the superuser may change the group of a file arbitrarily; other users + * may change the group of a file to any group of which that user is a member. + * + * @param string $filename Path to the file. + * @param string|int $group A group name or number. + * @throws FilesystemException + * + */ +function chgrp(string $filename, $group): void +{ + error_clear_last(); + $result = \chgrp($filename, $group); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to change the mode of the specified file to that given in + * mode. + * + * @param string $filename Path to the file. + * @param int $mode Note that mode is not automatically + * assumed to be an octal value, so to ensure the expected operation, + * you need to prefix mode with a zero (0). + * Strings such as "g+w" will not work properly. + * + * + * + * + * ]]> + * + * + * + * The mode parameter consists of three octal + * number components specifying access restrictions for the owner, + * the user group in which the owner is in, and to everybody else in + * this order. One component can be computed by adding up the needed + * permissions for that target user base. Number 1 means that you + * grant execute rights, number 2 means that you make the file + * writeable, number 4 means that you make the file readable. Add + * up these numbers to specify needed rights. You can also read more + * about modes on Unix systems with 'man 1 chmod' + * and 'man 2 chmod'. + * + * + * + * + */ +function chmod(string $filename, int $mode): void +{ + error_clear_last(); + $result = \chmod($filename, $mode); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to change the owner of the file filename + * to user user. Only the superuser may change the + * owner of a file. + * + * @param string $filename Path to the file. + * @param string|int $user A user name or number. + * @throws FilesystemException + * + */ +function chown(string $filename, $user): void +{ + error_clear_last(); + $result = \chown($filename, $user); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Makes a copy of the file source to + * dest. + * + * If you wish to move a file, use the rename function. + * + * @param string $source Path to the source file. + * @param string $dest The destination path. If dest is a URL, the + * copy operation may fail if the wrapper does not support overwriting of + * existing files. + * + * If the destination file already exists, it will be overwritten. + * @param resource $context A valid context resource created with + * stream_context_create. + * @throws FilesystemException + * + */ +function copy(string $source, string $dest, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \copy($source, $dest, $context); + } else { + $result = \copy($source, $dest); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Given a string containing a directory, this function will return the + * number of bytes available on the corresponding filesystem or disk + * partition. + * + * @param string $directory A directory of the filesystem or disk partition. + * + * Given a file name instead of a directory, the behaviour of the + * function is unspecified and may differ between operating systems and + * PHP versions. + * @return float Returns the number of available bytes as a float. + * @throws FilesystemException + * + */ +function disk_free_space(string $directory): float +{ + error_clear_last(); + $result = \disk_free_space($directory); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Given a string containing a directory, this function will return the total + * number of bytes on the corresponding filesystem or disk partition. + * + * @param string $directory A directory of the filesystem or disk partition. + * @return float Returns the total number of bytes as a float. + * @throws FilesystemException + * + */ +function disk_total_space(string $directory): float +{ + error_clear_last(); + $result = \disk_total_space($directory); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * The file pointed to by handle is closed. + * + * @param resource $handle The file pointer must be valid, and must point to a file successfully + * opened by fopen or fsockopen. + * @throws FilesystemException + * + */ +function fclose($handle): void +{ + error_clear_last(); + $result = \fclose($handle); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * This function forces a write of all buffered output to the resource + * pointed to by the file handle. + * + * @param resource $handle The file pointer must be valid, and must point to + * a file successfully opened by fopen or + * fsockopen (and not yet closed by + * fclose). + * @throws FilesystemException + * + */ +function fflush($handle): void +{ + error_clear_last(); + $result = \fflush($handle); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * This function is similar to file, except that + * file_get_contents returns the file in a + * string, starting at the specified offset + * up to maxlen bytes. On failure, + * file_get_contents will return FALSE. + * + * file_get_contents is the preferred way to read the + * contents of a file into a string. It will use memory mapping techniques if + * supported by your OS to enhance performance. + * + * @param string $filename Name of the file to read. + * @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used + * to trigger include path + * search. + * This is not possible if strict typing + * is enabled, since FILE_USE_INCLUDE_PATH is an + * int. Use TRUE instead. + * @param resource|null $context A valid context resource created with + * stream_context_create. If you don't need to use a + * custom context, you can skip this parameter by NULL. + * @param int $offset The offset where the reading starts on the original stream. + * Negative offsets count from the end of the stream. + * + * Seeking (offset) is not supported with remote files. + * Attempting to seek on non-local files may work with small offsets, but this + * is unpredictable because it works on the buffered stream. + * @param int $maxlen Maximum length of data read. The default is to read until end + * of file is reached. Note that this parameter is applied to the + * stream processed by the filters. + * @return string The function returns the read data. + * @throws FilesystemException + * + */ +function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, int $maxlen = null): string +{ + error_clear_last(); + if ($maxlen !== null) { + $result = \file_get_contents($filename, $use_include_path, $context, $offset, $maxlen); + } elseif ($offset !== 0) { + $result = \file_get_contents($filename, $use_include_path, $context, $offset); + } elseif ($context !== null) { + $result = \file_get_contents($filename, $use_include_path, $context); + } else { + $result = \file_get_contents($filename, $use_include_path); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is identical to calling fopen, + * fwrite and fclose successively + * to write data to a file. + * + * If filename does not exist, the file is created. + * Otherwise, the existing file is overwritten, unless the + * FILE_APPEND flag is set. + * + * @param string $filename Path to the file where to write the data. + * @param mixed $data The data to write. Can be either a string, an + * array or a stream resource. + * + * If data is a stream resource, the + * remaining buffer of that stream will be copied to the specified file. + * This is similar with using stream_copy_to_stream. + * + * You can also specify the data parameter as a single + * dimension array. This is equivalent to + * file_put_contents($filename, implode('', $array)). + * @param int $flags The value of flags can be any combination of + * the following flags, joined with the binary OR (|) + * operator. + * + * + * Available flags + * + * + * + * Flag + * Description + * + * + * + * + * + * FILE_USE_INCLUDE_PATH + * + * + * Search for filename in the include directory. + * See include_path for more + * information. + * + * + * + * + * FILE_APPEND + * + * + * If file filename already exists, append + * the data to the file instead of overwriting it. + * + * + * + * + * LOCK_EX + * + * + * Acquire an exclusive lock on the file while proceeding to the + * writing. In other words, a flock call happens + * between the fopen call and the + * fwrite call. This is not identical to an + * fopen call with mode "x". + * + * + * + * + * + * @param resource $context A valid context resource created with + * stream_context_create. + * @return int This function returns the number of bytes that were written to the file. + * @throws FilesystemException + * + */ +function file_put_contents(string $filename, $data, int $flags = 0, $context = null): int +{ + error_clear_last(); + if ($context !== null) { + $result = \file_put_contents($filename, $data, $flags, $context); + } else { + $result = \file_put_contents($filename, $data, $flags); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads an entire file into an array. + * + * @param string $filename Path to the file. + * @param int $flags The optional parameter flags can be one, or + * more, of the following constants: + * + * + * + * FILE_USE_INCLUDE_PATH + * + * + * + * Search for the file in the include_path. + * + * + * + * + * + * FILE_IGNORE_NEW_LINES + * + * + * + * Omit newline at the end of each array element + * + * + * + * + * + * FILE_SKIP_EMPTY_LINES + * + * + * + * Skip empty lines + * + * + * + * + * @param resource $context + * @return array Returns the file in an array. Each element of the array corresponds to a + * line in the file, with the newline still attached. Upon failure, + * file returns FALSE. + * @throws FilesystemException + * + */ +function file(string $filename, int $flags = 0, $context = null): array +{ + error_clear_last(); + if ($context !== null) { + $result = \file($filename, $flags, $context); + } else { + $result = \file($filename, $flags); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $filename Path to the file. + * @return int Returns the time the file was last accessed. + * The time is returned as a Unix timestamp. + * @throws FilesystemException + * + */ +function fileatime(string $filename): int +{ + error_clear_last(); + $result = \fileatime($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the inode change time of a file. + * + * @param string $filename Path to the file. + * @return int Returns the time the file was last changed. + * The time is returned as a Unix timestamp. + * @throws FilesystemException + * + */ +function filectime(string $filename): int +{ + error_clear_last(); + $result = \filectime($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the file inode. + * + * @param string $filename Path to the file. + * @return int Returns the inode number of the file. + * @throws FilesystemException + * + */ +function fileinode(string $filename): int +{ + error_clear_last(); + $result = \fileinode($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns the time when the data blocks of a file were being + * written to, that is, the time when the content of the file was changed. + * + * @param string $filename Path to the file. + * @return int Returns the time the file was last modified. + * The time is returned as a Unix timestamp, which is + * suitable for the date function. + * @throws FilesystemException + * + */ +function filemtime(string $filename): int +{ + error_clear_last(); + $result = \filemtime($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the file owner. + * + * @param string $filename Path to the file. + * @return int Returns the user ID of the owner of the file. + * The user ID is returned in numerical format, use + * posix_getpwuid to resolve it to a username. + * @throws FilesystemException + * + */ +function fileowner(string $filename): int +{ + error_clear_last(); + $result = \fileowner($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the size for the given file. + * + * @param string $filename Path to the file. + * @return int Returns the size of the file in bytes, or FALSE (and generates an error + * of level E_WARNING) in case of an error. + * @throws FilesystemException + * + */ +function filesize(string $filename): int +{ + error_clear_last(); + $result = \filesize($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * flock allows you to perform a simple reader/writer + * model which can be used on virtually every platform (including most Unix + * derivatives and even Windows). + * + * On versions of PHP before 5.3.2, the lock is released also by + * fclose (which is also called automatically when script + * finished). + * + * PHP supports a portable way of locking complete files in an advisory way + * (which means all accessing programs have to use the same way of locking + * or it will not work). By default, this function will block until the + * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. + * + * @param resource $handle A file system pointer resource + * that is typically created using fopen. + * @param int $operation operation is one of the following: + * + * + * + * LOCK_SH to acquire a shared lock (reader). + * + * + * + * + * LOCK_EX to acquire an exclusive lock (writer). + * + * + * + * + * LOCK_UN to release a lock (shared or exclusive). + * + * + * + * + * It is also possible to add LOCK_NB as a bitmask to one + * of the above operations, if flock should not + * block during the locking attempt. + * @param int|null $wouldblock The optional third argument is set to 1 if the lock would block + * (EWOULDBLOCK errno condition). + * @throws FilesystemException + * + */ +function flock($handle, int $operation, ?int &$wouldblock = null): void +{ + error_clear_last(); + $result = \flock($handle, $operation, $wouldblock); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * fopen binds a named resource, specified by + * filename, to a stream. + * + * @param string $filename If filename is of the form "scheme://...", it + * is assumed to be a URL and PHP will search for a protocol handler + * (also known as a wrapper) for that scheme. If no wrappers for that + * protocol are registered, PHP will emit a notice to help you track + * potential problems in your script and then continue as though + * filename specifies a regular file. + * + * If PHP has decided that filename specifies + * a local file, then it will try to open a stream on that file. + * The file must be accessible to PHP, so you need to ensure that + * the file access permissions allow this access. + * If you have enabled + * open_basedir further + * restrictions may apply. + * + * If PHP has decided that filename specifies + * a registered protocol, and that protocol is registered as a + * network URL, PHP will check to make sure that + * allow_url_fopen is + * enabled. If it is switched off, PHP will emit a warning and + * the fopen call will fail. + * + * The list of supported protocols can be found in . Some protocols (also referred to as + * wrappers) support context + * and/or php.ini options. Refer to the specific page for the + * protocol in use for a list of options which can be set. (e.g. + * php.ini value user_agent used by the + * http wrapper). + * + * On the Windows platform, be careful to escape any backslashes + * used in the path to the file, or use forward slashes. + * + * + * + * ]]> + * + * + * @param string $mode The mode parameter specifies the type of access + * you require to the stream. It may be any of the following: + * + * + * A list of possible modes for fopen + * using mode + * + * + * + * + * mode + * Description + * + * + * + * + * 'r' + * + * Open for reading only; place the file pointer at the + * beginning of the file. + * + * + * + * 'r+' + * + * Open for reading and writing; place the file pointer at + * the beginning of the file. + * + * + * + * 'w' + * + * Open for writing only; place the file pointer at the + * beginning of the file and truncate the file to zero length. + * If the file does not exist, attempt to create it. + * + * + * + * 'w+' + * + * Open for reading and writing; place the file pointer at + * the beginning of the file and truncate the file to zero + * length. If the file does not exist, attempt to create it. + * + * + * + * 'a' + * + * Open for writing only; place the file pointer at the end of + * the file. If the file does not exist, attempt to create it. + * In this mode, fseek has no effect, writes are always appended. + * + * + * + * 'a+' + * + * Open for reading and writing; place the file pointer at + * the end of the file. If the file does not exist, attempt to + * create it. In this mode, fseek only affects + * the reading position, writes are always appended. + * + * + * + * 'x' + * + * Create and open for writing only; place the file pointer at the + * beginning of the file. If the file already exists, the + * fopen call will fail by returning FALSE and + * generating an error of level E_WARNING. If + * the file does not exist, attempt to create it. This is equivalent + * to specifying O_EXCL|O_CREAT flags for the + * underlying open(2) system call. + * + * + * + * 'x+' + * + * Create and open for reading and writing; otherwise it has the + * same behavior as 'x'. + * + * + * + * 'c' + * + * Open the file for writing only. If the file does not exist, it is + * created. If it exists, it is neither truncated (as opposed to + * 'w'), nor the call to this function fails (as is + * the case with 'x'). The file pointer is + * positioned on the beginning of the file. This may be useful if it's + * desired to get an advisory lock (see flock) + * before attempting to modify the file, as using + * 'w' could truncate the file before the lock + * was obtained (if truncation is desired, + * ftruncate can be used after the lock is + * requested). + * + * + * + * 'c+' + * + * Open the file for reading and writing; otherwise it has the same + * behavior as 'c'. + * + * + * + * 'e' + * + * Set close-on-exec flag on the opened file descriptor. Only + * available in PHP compiled on POSIX.1-2008 conform systems. + * + * + * + * + * + * + * Different operating system families have different line-ending + * conventions. When you write a text file and want to insert a line + * break, you need to use the correct line-ending character(s) for your + * operating system. Unix based systems use \n as the + * line ending character, Windows based systems use \r\n + * as the line ending characters and Macintosh based systems (Mac OS Classic) used + * \r as the line ending character. + * + * If you use the wrong line ending characters when writing your files, you + * might find that other applications that open those files will "look + * funny". + * + * Windows offers a text-mode translation flag ('t') + * which will transparently translate \n to + * \r\n when working with the file. In contrast, you + * can also use 'b' to force binary mode, which will not + * translate your data. To use these flags, specify either + * 'b' or 't' as the last character + * of the mode parameter. + * + * The default translation mode is 'b'. + * You can use the 't' + * mode if you are working with plain-text files and you use + * \n to delimit your line endings in your script, but + * expect your files to be readable with applications such as old versions of notepad. You + * should use the 'b' in all other cases. + * + * If you specify the 't' flag when working with binary files, you + * may experience strange problems with your data, including broken image + * files and strange problems with \r\n characters. + * + * For portability, it is also strongly recommended that + * you re-write code that uses or relies upon the 't' + * mode so that it uses the correct line endings and + * 'b' mode instead. + * @param bool $use_include_path The optional third use_include_path parameter + * can be set to '1' or TRUE if you want to search for the file in the + * include_path, too. + * @param resource $context + * @return resource Returns a file pointer resource on success + * @throws FilesystemException + * + */ +function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null) +{ + error_clear_last(); + if ($context !== null) { + $result = \fopen($filename, $mode, $use_include_path, $context); + } else { + $result = \fopen($filename, $mode, $use_include_path); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * fputcsv formats a line (passed as a + * fields array) as CSV and writes it (terminated by a + * newline) to the specified file handle. + * + * @param resource $handle The file pointer must be valid, and must point to + * a file successfully opened by fopen or + * fsockopen (and not yet closed by + * fclose). + * @param array $fields An array of strings. + * @param string $delimiter The optional delimiter parameter sets the field + * delimiter (one character only). + * @param string $enclosure The optional enclosure parameter sets the field + * enclosure (one character only). + * @param string $escape_char The optional escape_char parameter sets the + * escape character (at most one character). + * An empty string ("") disables the proprietary escape mechanism. + * @return int Returns the length of the written string. + * @throws FilesystemException + * + */ +function fputcsv($handle, array $fields, string $delimiter = ",", string $enclosure = '"', string $escape_char = "\\"): int +{ + error_clear_last(); + $result = \fputcsv($handle, $fields, $delimiter, $enclosure, $escape_char); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * fread reads up to + * length bytes from the file pointer + * referenced by handle. Reading stops as soon as one + * of the following conditions is met: + * + * + * + * length bytes have been read + * + * + * + * + * EOF (end of file) is reached + * + * + * + * + * a packet becomes available or the + * socket timeout occurs (for network streams) + * + * + * + * + * if the stream is read buffered and it does not represent a plain file, at + * most one read of up to a number of bytes equal to the chunk size (usually + * 8192) is made; depending on the previously buffered data, the size of the + * returned data may be larger than the chunk size. + * + * + * + * + * @param resource $handle A file system pointer resource + * that is typically created using fopen. + * @param int $length Up to length number of bytes read. + * @return string Returns the read string. + * @throws FilesystemException + * + */ +function fread($handle, int $length): string +{ + error_clear_last(); + $result = \fread($handle, $length); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Takes the filepointer, handle, and truncates the file to + * length, size. + * + * @param resource $handle The file pointer. + * + * The handle must be open for writing. + * @param int $size The size to truncate to. + * + * If size is larger than the file then the file + * is extended with null bytes. + * + * If size is smaller than the file then the file + * is truncated to that size. + * @throws FilesystemException + * + */ +function ftruncate($handle, int $size): void +{ + error_clear_last(); + $result = \ftruncate($handle, $size); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $handle A file system pointer resource + * that is typically created using fopen. + * @param string $string The string that is to be written. + * @param int $length If the length argument is given, writing will + * stop after length bytes have been written or + * the end of string is reached, whichever comes + * first. + * + * Note that if the length argument is given, + * then the magic_quotes_runtime + * configuration option will be ignored and no slashes will be + * stripped from string. + * @return int + * @throws FilesystemException + * + */ +function fwrite($handle, string $string, int $length = null): int +{ + error_clear_last(); + if ($length !== null) { + $result = \fwrite($handle, $string, $length); + } else { + $result = \fwrite($handle, $string); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * The glob function searches for all the pathnames + * matching pattern according to the rules used by + * the libc glob() function, which is similar to the rules used by common + * shells. + * + * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. + * + * Special characters: + * + * + * + * * - Matches zero or more characters. + * + * + * + * + * ? - Matches exactly one character (any character). + * + * + * + * + * [...] - Matches one character from a group of + * characters. If the first character is !, + * matches any character not in the group. + * + * + * + * + * \ - Escapes the following character, + * except when the GLOB_NOESCAPE flag is used. + * + * + * + * @param int $flags Valid flags: + * + * + * + * GLOB_MARK - Adds a slash (a backslash on Windows) to each directory returned + * + * + * + * + * GLOB_NOSORT - Return files as they appear in the + * directory (no sorting). When this flag is not used, the pathnames are + * sorted alphabetically + * + * + * + * + * GLOB_NOCHECK - Return the search pattern if no + * files matching it were found + * + * + * + * + * GLOB_NOESCAPE - Backslashes do not quote + * metacharacters + * + * + * + * + * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', + * or 'c' + * + * + * + * + * GLOB_ONLYDIR - Return only directory entries + * which match the pattern + * + * + * + * + * GLOB_ERR - Stop on read errors (like unreadable + * directories), by default errors are ignored. + * + * + * + * @return array Returns an array containing the matched files/directories, an empty array + * if no file matched. + * @throws FilesystemException + * + */ +function glob(string $pattern, int $flags = 0): array +{ + error_clear_last(); + $result = \glob($pattern, $flags); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Attempts to change the group of the symlink filename + * to group. + * + * Only the superuser may change the group of a symlink arbitrarily; other + * users may change the group of a symlink to any group of which that user is + * a member. + * + * @param string $filename Path to the symlink. + * @param string|int $group The group specified by name or number. + * @throws FilesystemException + * + */ +function lchgrp(string $filename, $group): void +{ + error_clear_last(); + $result = \lchgrp($filename, $group); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to change the owner of the symlink filename + * to user user. + * + * Only the superuser may change the owner of a symlink. + * + * @param string $filename Path to the file. + * @param string|int $user User name or number. + * @throws FilesystemException + * + */ +function lchown(string $filename, $user): void +{ + error_clear_last(); + $result = \lchown($filename, $user); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * link creates a hard link. + * + * @param string $target Target of the link. + * @param string $link The link name. + * @throws FilesystemException + * + */ +function link(string $target, string $link): void +{ + error_clear_last(); + $result = \link($target, $link); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to create the directory specified by pathname. + * + * @param string $pathname The directory path. + * @param int $mode The mode is 0777 by default, which means the widest possible + * access. For more information on modes, read the details + * on the chmod page. + * + * mode is ignored on Windows. + * + * Note that you probably want to specify the mode as an octal number, + * which means it should have a leading zero. The mode is also modified + * by the current umask, which you can change using + * umask. + * @param bool $recursive Allows the creation of nested directories specified in the + * pathname. + * @param resource $context + * @throws FilesystemException + * + */ +function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \mkdir($pathname, $mode, $recursive, $context); + } else { + $result = \mkdir($pathname, $mode, $recursive); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * parse_ini_file loads in the + * ini file specified in filename, + * and returns the settings in it in an associative array. + * + * The structure of the ini file is the same as the php.ini's. + * + * @param string $filename The filename of the ini file being parsed. If a relative path is used, + * it is evaluated relative to the current working directory, then the + * include_path. + * @param bool $process_sections By setting the process_sections + * parameter to TRUE, you get a multidimensional array, with + * the section names and settings included. The default + * for process_sections is FALSE + * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or + * INI_SCANNER_RAW. If INI_SCANNER_RAW + * is supplied, then option values will not be parsed. + * + * + * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. + * In this mode boolean, null and integer types are preserved when possible. + * String values "true", "on" and "yes" + * are converted to TRUE. "false", "off", "no" + * and "none" are considered FALSE. "null" is converted to NULL + * in typed mode. Also, all numeric strings are converted to integer type if it is possible. + * @return array The settings are returned as an associative array on success. + * @throws FilesystemException + * + */ +function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array +{ + error_clear_last(); + $result = \parse_ini_file($filename, $process_sections, $scanner_mode); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * parse_ini_string returns the settings in string + * ini in an associative array. + * + * The structure of the ini string is the same as the php.ini's. + * + * @param string $ini The contents of the ini file being parsed. + * @param bool $process_sections By setting the process_sections + * parameter to TRUE, you get a multidimensional array, with + * the section names and settings included. The default + * for process_sections is FALSE + * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or + * INI_SCANNER_RAW. If INI_SCANNER_RAW + * is supplied, then option values will not be parsed. + * + * + * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. + * In this mode boolean, null and integer types are preserved when possible. + * String values "true", "on" and "yes" + * are converted to TRUE. "false", "off", "no" + * and "none" are considered FALSE. "null" is converted to NULL + * in typed mode. Also, all numeric strings are converted to integer type if it is possible. + * @return array The settings are returned as an associative array on success. + * @throws FilesystemException + * + */ +function parse_ini_string(string $ini, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array +{ + error_clear_last(); + $result = \parse_ini_string($ini, $process_sections, $scanner_mode); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads a file and writes it to the output buffer. + * + * @param string $filename The filename being read. + * @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if + * you want to search for the file in the include_path, too. + * @param resource $context A context stream resource. + * @return int Returns the number of bytes read from the file on success + * @throws FilesystemException + * + */ +function readfile(string $filename, bool $use_include_path = false, $context = null): int +{ + error_clear_last(); + if ($context !== null) { + $result = \readfile($filename, $use_include_path, $context); + } else { + $result = \readfile($filename, $use_include_path); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * readlink does the same as the readlink C function. + * + * @param string $path The symbolic link path. + * @return string Returns the contents of the symbolic link path. + * @throws FilesystemException + * + */ +function readlink(string $path): string +{ + error_clear_last(); + $result = \readlink($path); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * realpath expands all symbolic links and + * resolves references to /./, /../ and extra / characters in + * the input path and returns the canonicalized + * absolute pathname. + * + * @param string $path The path being checked. + * + * + * Whilst a path must be supplied, the value can be an empty string. + * In this case, the value is interpreted as the current directory. + * + * + * + * Whilst a path must be supplied, the value can be an empty string. + * In this case, the value is interpreted as the current directory. + * @return string Returns the canonicalized absolute pathname on success. The resulting path + * will have no symbolic link, /./ or /../ components. Trailing delimiters, + * such as \ and /, are also removed. + * + * realpath returns FALSE on failure, e.g. if + * the file does not exist. + * @throws FilesystemException + * + */ +function realpath(string $path): string +{ + error_clear_last(); + $result = \realpath($path); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Attempts to rename oldname to + * newname, moving it between directories if necessary. + * If renaming a file and newname exists, + * it will be overwritten. If renaming a directory and + * newname exists, + * this function will emit a warning. + * + * @param string $oldname The old name. + * + * The wrapper used in oldname + * must match the wrapper used in + * newname. + * @param string $newname The new name. + * @param resource $context + * @throws FilesystemException + * + */ +function rename(string $oldname, string $newname, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \rename($oldname, $newname, $context); + } else { + $result = \rename($oldname, $newname); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Sets the file position indicator for handle + * to the beginning of the file stream. + * + * @param resource $handle The file pointer must be valid, and must point to a file + * successfully opened by fopen. + * @throws FilesystemException + * + */ +function rewind($handle): void +{ + error_clear_last(); + $result = \rewind($handle); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to remove the directory named by dirname. + * The directory must be empty, and the relevant permissions must permit this. + * A E_WARNING level error will be generated on failure. + * + * @param string $dirname Path to the directory. + * @param resource $context + * @throws FilesystemException + * + */ +function rmdir(string $dirname, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \rmdir($dirname, $context); + } else { + $result = \rmdir($dirname); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * symlink creates a symbolic link to the existing + * target with the specified name + * link. + * + * @param string $target Target of the link. + * @param string $link The link name. + * @throws FilesystemException + * + */ +function symlink(string $target, string $link): void +{ + error_clear_last(); + $result = \symlink($target, $link); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. + * If the directory does not exist or is not writable, tempnam may + * generate a file in the system's temporary directory, and return + * the full path to that file, including its name. + * + * @param string $dir The directory where the temporary filename will be created. + * @param string $prefix The prefix of the generated temporary filename. + * @return string Returns the new temporary filename (with path). + * @throws FilesystemException + * + */ +function tempnam(string $dir, string $prefix): string +{ + error_clear_last(); + $result = \tempnam($dir, $prefix); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Creates a temporary file with a unique name in read-write (w+) mode and + * returns a file handle. + * + * The file is automatically removed when closed (for example, by calling + * fclose, or when there are no remaining references to + * the file handle returned by tmpfile), or when the + * script ends. + * + * @return resource Returns a file handle, similar to the one returned by + * fopen, for the new file. + * @throws FilesystemException + * + */ +function tmpfile() +{ + error_clear_last(); + $result = \tmpfile(); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Attempts to set the access and modification times of the file named in the + * filename parameter to the value given in + * time. + * Note that the access time is always modified, regardless of the number + * of parameters. + * + * If the file does not exist, it will be created. + * + * @param string $filename The name of the file being touched. + * @param int $time The touch time. If time is not supplied, + * the current system time is used. + * @param int $atime If present, the access time of the given filename is set to + * the value of atime. Otherwise, it is set to + * the value passed to the time parameter. + * If neither are present, the current system time is used. + * @throws FilesystemException + * + */ +function touch(string $filename, int $time = null, int $atime = null): void +{ + error_clear_last(); + if ($atime !== null) { + $result = \touch($filename, $time, $atime); + } elseif ($time !== null) { + $result = \touch($filename, $time); + } else { + $result = \touch($filename); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Deletes filename. Similar to the Unix C unlink() + * function. An E_WARNING level error will be generated on + * failure. + * + * @param string $filename Path to the file. + * @param resource $context + * @throws FilesystemException + * + */ +function unlink(string $filename, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \unlink($filename, $context); + } else { + $result = \unlink($filename); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/filter.php b/vendor/thecodingmachine/safe/generated/filter.php new file mode 100644 index 000000000..2d836c6c9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/filter.php @@ -0,0 +1,93 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\FilterException; + +/** + * This function is useful for retrieving many values without + * repetitively calling filter_input. + * + * @param int $type One of INPUT_GET, INPUT_POST, + * INPUT_COOKIE, INPUT_SERVER, or + * INPUT_ENV. + * @param int|array $definition An array defining the arguments. A valid key is a string + * containing a variable name and a valid value is either a filter type, or an array + * optionally specifying the filter, flags and options. If the value is an + * array, valid keys are filter which specifies the + * filter type, + * flags which specifies any flags that apply to the + * filter, and options which specifies any options that + * apply to the filter. See the example below for a better understanding. + * + * This parameter can be also an integer holding a filter constant. Then all values in the + * input array are filtered by this filter. + * @param bool $add_empty Add missing keys as NULL to the return value. + * @return mixed An array containing the values of the requested variables on success. + * If the input array designated by type is not populated, + * the function returns NULL if the FILTER_NULL_ON_FAILURE + * flag is not given, or FALSE otherwise. For other failures, FALSE is returned. + * + * An array value will be FALSE if the filter fails, or NULL if + * the variable is not set. Or if the flag FILTER_NULL_ON_FAILURE + * is used, it returns FALSE if the variable is not set and NULL if the filter + * fails. If the add_empty parameter is FALSE, no array + * element will be added for unset variables. + * @throws FilterException + * + */ +function filter_input_array(int $type, $definition = null, bool $add_empty = true) +{ + error_clear_last(); + if ($add_empty !== true) { + $result = \filter_input_array($type, $definition, $add_empty); + } elseif ($definition !== null) { + $result = \filter_input_array($type, $definition); + } else { + $result = \filter_input_array($type); + } + if ($result === false) { + throw FilterException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is useful for retrieving many values without + * repetitively calling filter_var. + * + * @param array $data An array with string keys containing the data to filter. + * @param mixed $definition An array defining the arguments. A valid key is a string + * containing a variable name and a valid value is either a + * filter type, or an + * array optionally specifying the filter, flags and options. + * If the value is an array, valid keys are filter + * which specifies the filter type, + * flags which specifies any flags that apply to the + * filter, and options which specifies any options that + * apply to the filter. See the example below for a better understanding. + * + * This parameter can be also an integer holding a filter constant. Then all values in the + * input array are filtered by this filter. + * @param bool $add_empty Add missing keys as NULL to the return value. + * @return mixed An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if + * the variable is not set. + * @throws FilterException + * + */ +function filter_var_array(array $data, $definition = null, bool $add_empty = true) +{ + error_clear_last(); + if ($add_empty !== true) { + $result = \filter_var_array($data, $definition, $add_empty); + } elseif ($definition !== null) { + $result = \filter_var_array($data, $definition); + } else { + $result = \filter_var_array($data); + } + if ($result === false) { + throw FilterException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/fpm.php b/vendor/thecodingmachine/safe/generated/fpm.php new file mode 100644 index 000000000..08b394107 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/fpm.php @@ -0,0 +1,22 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\FpmException; + +/** + * This function flushes all response data to the client and finishes the + * request. This allows for time consuming tasks to be performed without + * leaving the connection to the client open. + * + * @throws FpmException + * + */ +function fastcgi_finish_request(): void +{ + error_clear_last(); + $result = \fastcgi_finish_request(); + if ($result === false) { + throw FpmException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/ftp.php b/vendor/thecodingmachine/safe/generated/ftp.php new file mode 100644 index 000000000..174882657 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ftp.php @@ -0,0 +1,496 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\FtpException; + +/** + * Sends an ALLO command to the remote FTP server to + * allocate space for a file to be uploaded. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param int $filesize The number of bytes to allocate. + * @param string $result A textual representation of the servers response will be returned by + * reference in result if a variable is provided. + * @throws FtpException + * + */ +function ftp_alloc($ftp_stream, int $filesize, string &$result = null): void +{ + error_clear_last(); + $result = \ftp_alloc($ftp_stream, $filesize, $result); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $ftp + * @param string $remote_file + * @param string $local_file + * @param int $mode + * @throws FtpException + * + */ +function ftp_append($ftp, string $remote_file, string $local_file, int $mode = FTP_BINARY): void +{ + error_clear_last(); + $result = \ftp_append($ftp, $remote_file, $local_file, $mode); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * Changes to the parent directory. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @throws FtpException + * + */ +function ftp_cdup($ftp_stream): void +{ + error_clear_last(); + $result = \ftp_cdup($ftp_stream); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * Changes the current directory to the specified one. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $directory The target directory. + * @throws FtpException + * + */ +function ftp_chdir($ftp_stream, string $directory): void +{ + error_clear_last(); + $result = \ftp_chdir($ftp_stream, $directory); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * Sets the permissions on the specified remote file to + * mode. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param int $mode The new permissions, given as an octal value. + * @param string $filename The remote file. + * @return int Returns the new file permissions on success. + * @throws FtpException + * + */ +function ftp_chmod($ftp_stream, int $mode, string $filename): int +{ + error_clear_last(); + $result = \ftp_chmod($ftp_stream, $mode, $filename); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * ftp_close closes the given link identifier + * and releases the resource. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @throws FtpException + * + */ +function ftp_close($ftp_stream): void +{ + error_clear_last(); + $result = \ftp_close($ftp_stream); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_connect opens an FTP connection to the + * specified host. + * + * @param string $host The FTP server address. This parameter shouldn't have any trailing + * slashes and shouldn't be prefixed with ftp://. + * @param int $port This parameter specifies an alternate port to connect to. If it is + * omitted or set to zero, then the default FTP port, 21, will be used. + * @param int $timeout This parameter specifies the timeout in seconds for all subsequent network operations. + * If omitted, the default value is 90 seconds. The timeout can be changed and + * queried at any time with ftp_set_option and + * ftp_get_option. + * @return resource Returns a FTP stream on success. + * @throws FtpException + * + */ +function ftp_connect(string $host, int $port = 21, int $timeout = 90) +{ + error_clear_last(); + $result = \ftp_connect($host, $port, $timeout); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * ftp_delete deletes the file specified by + * path from the FTP server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $path The file to delete. + * @throws FtpException + * + */ +function ftp_delete($ftp_stream, string $path): void +{ + error_clear_last(); + $result = \ftp_delete($ftp_stream, $path); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_fget retrieves remote_file + * from the FTP server, and writes it to the given file pointer. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param resource $handle An open file pointer in which we store the data. + * @param string $remote_file The remote file path. + * @param int $mode The transfer mode. Must be either FTP_ASCII or + * FTP_BINARY. + * @param int $resumepos The position in the remote file to start downloading from. + * @throws FtpException + * + */ +function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_BINARY, int $resumepos = 0): void +{ + error_clear_last(); + $result = \ftp_fget($ftp_stream, $handle, $remote_file, $mode, $resumepos); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_fput uploads the data from a file pointer + * to a remote file on the FTP server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $remote_file The remote file path. + * @param resource $handle An open file pointer on the local file. Reading stops at end of file. + * @param int $mode The transfer mode. Must be either FTP_ASCII or + * FTP_BINARY. + * @param int $startpos The position in the remote file to start uploading to. + * @throws FtpException + * + */ +function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_BINARY, int $startpos = 0): void +{ + error_clear_last(); + $result = \ftp_fput($ftp_stream, $remote_file, $handle, $mode, $startpos); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_get retrieves a remote file from the FTP server, + * and saves it into a local file. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $local_file The local file path (will be overwritten if the file already exists). + * @param string $remote_file The remote file path. + * @param int $mode The transfer mode. Must be either FTP_ASCII or + * FTP_BINARY. + * @param int $resumepos The position in the remote file to start downloading from. + * @throws FtpException + * + */ +function ftp_get($ftp_stream, string $local_file, string $remote_file, int $mode = FTP_BINARY, int $resumepos = 0): void +{ + error_clear_last(); + $result = \ftp_get($ftp_stream, $local_file, $remote_file, $mode, $resumepos); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * Logs in to the given FTP stream. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $username The username (USER). + * @param string $password The password (PASS). + * @throws FtpException + * + */ +function ftp_login($ftp_stream, string $username, string $password): void +{ + error_clear_last(); + $result = \ftp_login($ftp_stream, $username, $password); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * Creates the specified directory on the FTP server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $directory The name of the directory that will be created. + * @return string Returns the newly created directory name on success. + * @throws FtpException + * + */ +function ftp_mkdir($ftp_stream, string $directory): string +{ + error_clear_last(); + $result = \ftp_mkdir($ftp_stream, $directory); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $directory The directory to be listed. + * @return array Returns an array of arrays with file infos from the specified directory on success. + * @throws FtpException + * + */ +function ftp_mlsd($ftp_stream, string $directory): array +{ + error_clear_last(); + $result = \ftp_mlsd($ftp_stream, $directory); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $directory The directory to be listed. This parameter can also include arguments, eg. + * ftp_nlist($conn_id, "-la /your/dir"); + * Note that this parameter isn't escaped so there may be some issues with + * filenames containing spaces and other characters. + * @return array Returns an array of filenames from the specified directory on success. + * @throws FtpException + * + */ +function ftp_nlist($ftp_stream, string $directory): array +{ + error_clear_last(); + $result = \ftp_nlist($ftp_stream, $directory); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * ftp_pasv turns on or off passive mode. In + * passive mode, data connections are initiated by the client, + * rather than by the server. + * It may be needed if the client is behind firewall. + * + * Please note that ftp_pasv can only be called after a + * successful login or otherwise it will fail. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param bool $pasv If TRUE, the passive mode is turned on, else it's turned off. + * @throws FtpException + * + */ +function ftp_pasv($ftp_stream, bool $pasv): void +{ + error_clear_last(); + $result = \ftp_pasv($ftp_stream, $pasv); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_put stores a local file on the FTP server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $remote_file The remote file path. + * @param string $local_file The local file path. + * @param int $mode The transfer mode. Must be either FTP_ASCII or + * FTP_BINARY. + * @param int $startpos The position in the remote file to start uploading to. + * @throws FtpException + * + */ +function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode = FTP_BINARY, int $startpos = 0): void +{ + error_clear_last(); + $result = \ftp_put($ftp_stream, $remote_file, $local_file, $mode, $startpos); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @return string Returns the current directory name. + * @throws FtpException + * + */ +function ftp_pwd($ftp_stream): string +{ + error_clear_last(); + $result = \ftp_pwd($ftp_stream); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * ftp_rename renames a file or a directory on the FTP + * server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $oldname The old file/directory name. + * @param string $newname The new name. + * @throws FtpException + * + */ +function ftp_rename($ftp_stream, string $oldname, string $newname): void +{ + error_clear_last(); + $result = \ftp_rename($ftp_stream, $oldname, $newname); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * Removes the specified directory on the FTP server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $directory The directory to delete. This must be either an absolute or relative + * path to an empty directory. + * @throws FtpException + * + */ +function ftp_rmdir($ftp_stream, string $directory): void +{ + error_clear_last(); + $result = \ftp_rmdir($ftp_stream, $directory); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_site sends the given SITE + * command to the FTP server. + * + * SITE commands are not standardized, and vary from server + * to server. They are useful for handling such things as file permissions and + * group membership. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @param string $command The SITE command. Note that this parameter isn't escaped so there may + * be some issues with filenames containing spaces and other characters. + * @throws FtpException + * + */ +function ftp_site($ftp_stream, string $command): void +{ + error_clear_last(); + $result = \ftp_site($ftp_stream, $command); + if ($result === false) { + throw FtpException::createFromPhpError(); + } +} + + +/** + * ftp_ssl_connect opens an explicit SSL-FTP connection to the + * specified host. That implies that + * ftp_ssl_connect will succeed even if the server is not + * configured for SSL-FTP, or its certificate is invalid. Only when + * ftp_login is called, the client will send the + * appropriate AUTH FTP command, so ftp_login will fail in + * the mentioned cases. + * + * @param string $host The FTP server address. This parameter shouldn't have any trailing + * slashes and shouldn't be prefixed with ftp://. + * @param int $port This parameter specifies an alternate port to connect to. If it is + * omitted or set to zero, then the default FTP port, 21, will be used. + * @param int $timeout This parameter specifies the timeout for all subsequent network operations. + * If omitted, the default value is 90 seconds. The timeout can be changed and + * queried at any time with ftp_set_option and + * ftp_get_option. + * @return resource Returns a SSL-FTP stream on success. + * @throws FtpException + * + */ +function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90) +{ + error_clear_last(); + $result = \ftp_ssl_connect($host, $port, $timeout); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the system type identifier of the remote FTP server. + * + * @param resource $ftp_stream The link identifier of the FTP connection. + * @return string Returns the remote system type. + * @throws FtpException + * + */ +function ftp_systype($ftp_stream): string +{ + error_clear_last(); + $result = \ftp_systype($ftp_stream); + if ($result === false) { + throw FtpException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/funchand.php b/vendor/thecodingmachine/safe/generated/funchand.php new file mode 100644 index 000000000..64654526e --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/funchand.php @@ -0,0 +1,47 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\FunchandException; + +/** + * Creates an anonymous function from the parameters passed, and + * returns a unique name for it. + * + * @param string $args The function arguments. + * @param string $code The function code. + * @return string Returns a unique function name as a string. + * @throws FunchandException + * + */ +function create_function(string $args, string $code): string +{ + error_clear_last(); + $result = \create_function($args, $code); + if ($result === false) { + throw FunchandException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param callable(): void $function The function to register. + * @param mixed $params + * @throws FunchandException + * + */ +function register_tick_function(callable $function, ...$params): void +{ + error_clear_last(); + if ($params !== []) { + $result = \register_tick_function($function, ...$params); + } else { + $result = \register_tick_function($function); + } + if ($result === false) { + throw FunchandException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/functionsList.php b/vendor/thecodingmachine/safe/generated/functionsList.php new file mode 100644 index 000000000..a43e7efa6 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/functionsList.php @@ -0,0 +1,1070 @@ +<?php + +return [ + 'apache_getenv', + 'apache_get_version', + 'apache_request_headers', + 'apache_reset_timeout', + 'apache_response_headers', + 'apache_setenv', + 'apcu_cache_info', + 'apcu_cas', + 'apcu_dec', + 'apcu_fetch', + 'apcu_inc', + 'apcu_sma_info', + 'apc_fetch', + 'array_combine', + 'array_flip', + 'array_replace', + 'array_replace_recursive', + 'array_walk_recursive', + 'arsort', + 'asort', + 'base64_decode', + 'bzclose', + 'bzflush', + 'bzread', + 'bzwrite', + 'chdir', + 'chgrp', + 'chmod', + 'chown', + 'chroot', + 'class_alias', + 'class_implements', + 'class_parents', + 'class_uses', + 'cli_set_process_title', + 'closelog', + 'com_event_sink', + 'com_load_typelib', + 'com_print_typeinfo', + 'convert_uudecode', + 'convert_uuencode', + 'copy', + 'create_function', + 'cubrid_free_result', + 'cubrid_get_charset', + 'cubrid_get_client_info', + 'cubrid_get_db_parameter', + 'cubrid_get_server_info', + 'cubrid_insert_id', + 'cubrid_lob2_new', + 'cubrid_lob2_size', + 'cubrid_lob2_size64', + 'cubrid_lob2_tell', + 'cubrid_lob2_tell64', + 'cubrid_set_db_parameter', + 'curl_escape', + 'curl_exec', + 'curl_getinfo', + 'curl_init', + 'curl_multi_errno', + 'curl_multi_info_read', + 'curl_multi_init', + 'curl_setopt', + 'curl_share_errno', + 'curl_share_setopt', + 'curl_unescape', + 'date', + 'date_parse', + 'date_parse_from_format', + 'date_sunrise', + 'date_sunset', + 'date_sun_info', + 'db2_autocommit', + 'db2_bind_param', + 'db2_client_info', + 'db2_close', + 'db2_commit', + 'db2_execute', + 'db2_free_result', + 'db2_free_stmt', + 'db2_get_option', + 'db2_pclose', + 'db2_rollback', + 'db2_server_info', + 'db2_set_option', + 'define', + 'deflate_add', + 'deflate_init', + 'disk_free_space', + 'disk_total_space', + 'dl', + 'dns_get_record', + 'eio_busy', + 'eio_chmod', + 'eio_chown', + 'eio_close', + 'eio_custom', + 'eio_dup2', + 'eio_event_loop', + 'eio_fallocate', + 'eio_fchmod', + 'eio_fdatasync', + 'eio_fstat', + 'eio_fstatvfs', + 'eio_fsync', + 'eio_ftruncate', + 'eio_futime', + 'eio_grp', + 'eio_lstat', + 'eio_mkdir', + 'eio_mknod', + 'eio_nop', + 'eio_readahead', + 'eio_readdir', + 'eio_readlink', + 'eio_rename', + 'eio_rmdir', + 'eio_seek', + 'eio_sendfile', + 'eio_stat', + 'eio_statvfs', + 'eio_symlink', + 'eio_sync', + 'eio_syncfs', + 'eio_sync_file_range', + 'eio_truncate', + 'eio_unlink', + 'eio_utime', + 'eio_write', + 'error_log', + 'fastcgi_finish_request', + 'fbird_blob_cancel', + 'fclose', + 'fflush', + 'file', + 'fileatime', + 'filectime', + 'fileinode', + 'filemtime', + 'fileowner', + 'filesize', + 'file_get_contents', + 'file_put_contents', + 'filter_input_array', + 'filter_var_array', + 'finfo_close', + 'finfo_open', + 'flock', + 'fopen', + 'fputcsv', + 'fread', + 'fsockopen', + 'ftp_alloc', + 'ftp_append', + 'ftp_cdup', + 'ftp_chdir', + 'ftp_chmod', + 'ftp_close', + 'ftp_connect', + 'ftp_delete', + 'ftp_fget', + 'ftp_fput', + 'ftp_get', + 'ftp_login', + 'ftp_mkdir', + 'ftp_mlsd', + 'ftp_nlist', + 'ftp_pasv', + 'ftp_put', + 'ftp_pwd', + 'ftp_rename', + 'ftp_rmdir', + 'ftp_site', + 'ftp_ssl_connect', + 'ftp_systype', + 'ftruncate', + 'fwrite', + 'getallheaders', + 'getcwd', + 'gethostname', + 'getimagesize', + 'getlastmod', + 'getmygid', + 'getmyinode', + 'getmypid', + 'getmyuid', + 'getopt', + 'getprotobyname', + 'getprotobynumber', + 'get_headers', + 'glob', + 'gmdate', + 'gmp_binomial', + 'gmp_export', + 'gmp_import', + 'gmp_random_seed', + 'gnupg_adddecryptkey', + 'gnupg_addencryptkey', + 'gnupg_addsignkey', + 'gnupg_cleardecryptkeys', + 'gnupg_clearencryptkeys', + 'gnupg_clearsignkeys', + 'gnupg_setarmor', + 'gnupg_setsignmode', + 'gzclose', + 'gzcompress', + 'gzdecode', + 'gzdeflate', + 'gzencode', + 'gzgets', + 'gzgetss', + 'gzinflate', + 'gzpassthru', + 'gzrewind', + 'gzuncompress', + 'hash_hkdf', + 'hash_update_file', + 'header_register_callback', + 'hex2bin', + 'highlight_file', + 'highlight_string', + 'ibase_add_user', + 'ibase_backup', + 'ibase_blob_cancel', + 'ibase_blob_create', + 'ibase_blob_get', + 'ibase_close', + 'ibase_commit', + 'ibase_commit_ret', + 'ibase_connect', + 'ibase_delete_user', + 'ibase_drop_db', + 'ibase_free_event_handler', + 'ibase_free_query', + 'ibase_free_result', + 'ibase_maintain_db', + 'ibase_modify_user', + 'ibase_name_result', + 'ibase_pconnect', + 'ibase_restore', + 'ibase_rollback', + 'ibase_rollback_ret', + 'ibase_service_attach', + 'ibase_service_detach', + 'iconv', + 'iconv_get_encoding', + 'iconv_set_encoding', + 'image2wbmp', + 'imageaffine', + 'imageaffinematrixconcat', + 'imageaffinematrixget', + 'imagealphablending', + 'imageantialias', + 'imagearc', + 'imagebmp', + 'imagechar', + 'imagecharup', + 'imagecolorat', + 'imagecolordeallocate', + 'imagecolormatch', + 'imageconvolution', + 'imagecopy', + 'imagecopymerge', + 'imagecopymergegray', + 'imagecopyresampled', + 'imagecopyresized', + 'imagecreate', + 'imagecreatefrombmp', + 'imagecreatefromgd', + 'imagecreatefromgd2', + 'imagecreatefromgd2part', + 'imagecreatefromgif', + 'imagecreatefromjpeg', + 'imagecreatefrompng', + 'imagecreatefromwbmp', + 'imagecreatefromwebp', + 'imagecreatefromxbm', + 'imagecreatefromxpm', + 'imagecreatetruecolor', + 'imagecrop', + 'imagecropauto', + 'imagedashedline', + 'imagedestroy', + 'imageellipse', + 'imagefill', + 'imagefilledarc', + 'imagefilledellipse', + 'imagefilledpolygon', + 'imagefilledrectangle', + 'imagefilltoborder', + 'imagefilter', + 'imageflip', + 'imagegammacorrect', + 'imagegd', + 'imagegd2', + 'imagegif', + 'imagegrabscreen', + 'imagegrabwindow', + 'imagejpeg', + 'imagelayereffect', + 'imageline', + 'imageloadfont', + 'imageopenpolygon', + 'imagepng', + 'imagepolygon', + 'imagerectangle', + 'imagerotate', + 'imagesavealpha', + 'imagescale', + 'imagesetbrush', + 'imagesetclip', + 'imagesetinterpolation', + 'imagesetpixel', + 'imagesetstyle', + 'imagesetthickness', + 'imagesettile', + 'imagestring', + 'imagestringup', + 'imagesx', + 'imagesy', + 'imagetruecolortopalette', + 'imagettfbbox', + 'imagettftext', + 'imagewbmp', + 'imagewebp', + 'imagexbm', + 'imap_append', + 'imap_check', + 'imap_clearflag_full', + 'imap_close', + 'imap_createmailbox', + 'imap_deletemailbox', + 'imap_fetchstructure', + 'imap_gc', + 'imap_headerinfo', + 'imap_mail', + 'imap_mailboxmsginfo', + 'imap_mail_compose', + 'imap_mail_copy', + 'imap_mail_move', + 'imap_mutf7_to_utf8', + 'imap_num_msg', + 'imap_open', + 'imap_renamemailbox', + 'imap_savebody', + 'imap_setacl', + 'imap_setflag_full', + 'imap_set_quota', + 'imap_sort', + 'imap_subscribe', + 'imap_thread', + 'imap_timeout', + 'imap_undelete', + 'imap_unsubscribe', + 'imap_utf8_to_mutf7', + 'inet_ntop', + 'inflate_add', + 'inflate_get_read_len', + 'inflate_get_status', + 'inflate_init', + 'ingres_autocommit', + 'ingres_close', + 'ingres_commit', + 'ingres_connect', + 'ingres_execute', + 'ingres_field_name', + 'ingres_field_type', + 'ingres_free_result', + 'ingres_pconnect', + 'ingres_result_seek', + 'ingres_rollback', + 'ingres_set_environment', + 'ini_get', + 'ini_set', + 'inotify_init', + 'inotify_rm_watch', + 'iptcembed', + 'iptcparse', + 'jdtounix', + 'jpeg2wbmp', + 'json_decode', + 'json_encode', + 'json_last_error_msg', + 'krsort', + 'ksort', + 'lchgrp', + 'lchown', + 'ldap_add', + 'ldap_add_ext', + 'ldap_bind', + 'ldap_bind_ext', + 'ldap_control_paged_result', + 'ldap_control_paged_result_response', + 'ldap_count_entries', + 'ldap_delete', + 'ldap_delete_ext', + 'ldap_exop', + 'ldap_exop_passwd', + 'ldap_exop_whoami', + 'ldap_explode_dn', + 'ldap_first_attribute', + 'ldap_first_entry', + 'ldap_free_result', + 'ldap_get_attributes', + 'ldap_get_dn', + 'ldap_get_entries', + 'ldap_get_option', + 'ldap_get_values', + 'ldap_get_values_len', + 'ldap_list', + 'ldap_modify_batch', + 'ldap_mod_add', + 'ldap_mod_add_ext', + 'ldap_mod_del', + 'ldap_mod_del_ext', + 'ldap_mod_replace', + 'ldap_mod_replace_ext', + 'ldap_next_attribute', + 'ldap_parse_exop', + 'ldap_parse_result', + 'ldap_read', + 'ldap_rename', + 'ldap_rename_ext', + 'ldap_sasl_bind', + 'ldap_search', + 'ldap_set_option', + 'ldap_unbind', + 'libxml_get_last_error', + 'libxml_set_external_entity_loader', + 'link', + 'lzf_compress', + 'lzf_decompress', + 'mailparse_msg_extract_part_file', + 'mailparse_msg_free', + 'mailparse_msg_parse', + 'mailparse_msg_parse_file', + 'mailparse_stream_encode', + 'mb_chr', + 'mb_detect_order', + 'mb_encoding_aliases', + 'mb_eregi_replace', + 'mb_ereg_replace', + 'mb_ereg_replace_callback', + 'mb_ereg_search_getregs', + 'mb_ereg_search_init', + 'mb_ereg_search_regs', + 'mb_ereg_search_setpos', + 'mb_http_output', + 'mb_internal_encoding', + 'mb_ord', + 'mb_parse_str', + 'mb_regex_encoding', + 'mb_send_mail', + 'mb_split', + 'mb_str_split', + 'md5_file', + 'metaphone', + 'mime_content_type', + 'mkdir', + 'mktime', + 'msg_queue_exists', + 'msg_receive', + 'msg_remove_queue', + 'msg_send', + 'msg_set_queue', + 'msql_affected_rows', + 'msql_close', + 'msql_connect', + 'msql_create_db', + 'msql_data_seek', + 'msql_db_query', + 'msql_drop_db', + 'msql_field_len', + 'msql_field_name', + 'msql_field_seek', + 'msql_field_table', + 'msql_field_type', + 'msql_free_result', + 'msql_pconnect', + 'msql_query', + 'msql_select_db', + 'mysqli_get_cache_stats', + 'mysqli_get_client_stats', + 'mysqlnd_ms_dump_servers', + 'mysqlnd_ms_fabric_select_global', + 'mysqlnd_ms_fabric_select_shard', + 'mysqlnd_ms_get_last_used_connection', + 'mysqlnd_qc_clear_cache', + 'mysqlnd_qc_set_is_select', + 'mysqlnd_qc_set_storage_handler', + 'mysql_close', + 'mysql_connect', + 'mysql_create_db', + 'mysql_data_seek', + 'mysql_db_name', + 'mysql_db_query', + 'mysql_drop_db', + 'mysql_fetch_lengths', + 'mysql_field_flags', + 'mysql_field_len', + 'mysql_field_name', + 'mysql_field_seek', + 'mysql_free_result', + 'mysql_get_host_info', + 'mysql_get_proto_info', + 'mysql_get_server_info', + 'mysql_info', + 'mysql_list_dbs', + 'mysql_list_fields', + 'mysql_list_processes', + 'mysql_list_tables', + 'mysql_num_fields', + 'mysql_num_rows', + 'mysql_query', + 'mysql_real_escape_string', + 'mysql_result', + 'mysql_select_db', + 'mysql_set_charset', + 'mysql_tablename', + 'mysql_thread_id', + 'mysql_unbuffered_query', + 'natcasesort', + 'natsort', + 'ob_end_clean', + 'ob_end_flush', + 'oci_bind_array_by_name', + 'oci_bind_by_name', + 'oci_cancel', + 'oci_close', + 'oci_commit', + 'oci_connect', + 'oci_define_by_name', + 'oci_execute', + 'oci_fetch_all', + 'oci_field_name', + 'oci_field_precision', + 'oci_field_scale', + 'oci_field_size', + 'oci_field_type', + 'oci_field_type_raw', + 'oci_free_descriptor', + 'oci_free_statement', + 'oci_new_collection', + 'oci_new_connect', + 'oci_new_cursor', + 'oci_new_descriptor', + 'oci_num_fields', + 'oci_num_rows', + 'oci_parse', + 'oci_pconnect', + 'oci_result', + 'oci_rollback', + 'oci_server_version', + 'oci_set_action', + 'oci_set_call_timeout', + 'oci_set_client_identifier', + 'oci_set_client_info', + 'oci_set_db_operation', + 'oci_set_edition', + 'oci_set_module_name', + 'oci_set_prefetch', + 'oci_statement_type', + 'oci_unregister_taf_callback', + 'odbc_autocommit', + 'odbc_binmode', + 'odbc_columnprivileges', + 'odbc_columns', + 'odbc_commit', + 'odbc_data_source', + 'odbc_exec', + 'odbc_execute', + 'odbc_fetch_into', + 'odbc_field_len', + 'odbc_field_name', + 'odbc_field_num', + 'odbc_field_scale', + 'odbc_field_type', + 'odbc_foreignkeys', + 'odbc_gettypeinfo', + 'odbc_longreadlen', + 'odbc_prepare', + 'odbc_primarykeys', + 'odbc_result', + 'odbc_result_all', + 'odbc_rollback', + 'odbc_setoption', + 'odbc_specialcolumns', + 'odbc_statistics', + 'odbc_tableprivileges', + 'odbc_tables', + 'opcache_compile_file', + 'opcache_get_status', + 'opendir', + 'openlog', + 'openssl_cipher_iv_length', + 'openssl_csr_export', + 'openssl_csr_export_to_file', + 'openssl_csr_get_subject', + 'openssl_csr_new', + 'openssl_csr_sign', + 'openssl_decrypt', + 'openssl_dh_compute_key', + 'openssl_digest', + 'openssl_encrypt', + 'openssl_open', + 'openssl_pbkdf2', + 'openssl_pkcs7_decrypt', + 'openssl_pkcs7_encrypt', + 'openssl_pkcs7_read', + 'openssl_pkcs7_sign', + 'openssl_pkcs12_export', + 'openssl_pkcs12_export_to_file', + 'openssl_pkcs12_read', + 'openssl_pkey_export', + 'openssl_pkey_export_to_file', + 'openssl_pkey_get_private', + 'openssl_pkey_get_public', + 'openssl_pkey_new', + 'openssl_private_decrypt', + 'openssl_private_encrypt', + 'openssl_public_decrypt', + 'openssl_public_encrypt', + 'openssl_random_pseudo_bytes', + 'openssl_seal', + 'openssl_sign', + 'openssl_x509_export', + 'openssl_x509_export_to_file', + 'openssl_x509_fingerprint', + 'openssl_x509_read', + 'output_add_rewrite_var', + 'output_reset_rewrite_vars', + 'pack', + 'parse_ini_file', + 'parse_ini_string', + 'parse_url', + 'password_hash', + 'pcntl_exec', + 'pcntl_getpriority', + 'pcntl_setpriority', + 'pcntl_signal_dispatch', + 'pcntl_sigprocmask', + 'pcntl_strerror', + 'PDF_activate_item', + 'PDF_add_locallink', + 'PDF_add_nameddest', + 'PDF_add_note', + 'PDF_add_pdflink', + 'PDF_add_thumbnail', + 'PDF_add_weblink', + 'PDF_attach_file', + 'PDF_begin_layer', + 'PDF_begin_page', + 'PDF_begin_page_ext', + 'PDF_circle', + 'PDF_clip', + 'PDF_close', + 'PDF_closepath', + 'PDF_closepath_fill_stroke', + 'PDF_closepath_stroke', + 'PDF_close_pdi', + 'PDF_close_pdi_page', + 'PDF_concat', + 'PDF_continue_text', + 'PDF_curveto', + 'PDF_delete', + 'PDF_end_layer', + 'PDF_end_page', + 'PDF_end_page_ext', + 'PDF_end_pattern', + 'PDF_end_template', + 'PDF_fill', + 'PDF_fill_stroke', + 'PDF_fit_image', + 'PDF_fit_pdi_page', + 'PDF_fit_textline', + 'PDF_initgraphics', + 'PDF_lineto', + 'PDF_makespotcolor', + 'PDF_moveto', + 'PDF_open_file', + 'PDF_place_image', + 'PDF_place_pdi_page', + 'PDF_rect', + 'PDF_restore', + 'PDF_rotate', + 'PDF_save', + 'PDF_scale', + 'PDF_setcolor', + 'PDF_setdash', + 'PDF_setdashpattern', + 'PDF_setflat', + 'PDF_setfont', + 'PDF_setgray', + 'PDF_setgray_fill', + 'PDF_setgray_stroke', + 'PDF_setlinejoin', + 'PDF_setlinewidth', + 'PDF_setmatrix', + 'PDF_setmiterlimit', + 'PDF_setrgbcolor', + 'PDF_setrgbcolor_fill', + 'PDF_setrgbcolor_stroke', + 'PDF_set_border_color', + 'PDF_set_border_dash', + 'PDF_set_border_style', + 'PDF_set_info', + 'PDF_set_layer_dependency', + 'PDF_set_parameter', + 'PDF_set_text_pos', + 'PDF_set_value', + 'PDF_show', + 'PDF_show_xy', + 'PDF_skew', + 'PDF_stroke', + 'pg_cancel_query', + 'pg_client_encoding', + 'pg_close', + 'pg_connect', + 'pg_connection_reset', + 'pg_convert', + 'pg_copy_from', + 'pg_copy_to', + 'pg_dbname', + 'pg_delete', + 'pg_end_copy', + 'pg_execute', + 'pg_field_name', + 'pg_field_table', + 'pg_field_type', + 'pg_flush', + 'pg_free_result', + 'pg_host', + 'pg_insert', + 'pg_last_error', + 'pg_last_notice', + 'pg_last_oid', + 'pg_lo_close', + 'pg_lo_export', + 'pg_lo_import', + 'pg_lo_open', + 'pg_lo_read', + 'pg_lo_read_all', + 'pg_lo_seek', + 'pg_lo_truncate', + 'pg_lo_unlink', + 'pg_lo_write', + 'pg_meta_data', + 'pg_options', + 'pg_parameter_status', + 'pg_pconnect', + 'pg_ping', + 'pg_port', + 'pg_prepare', + 'pg_put_line', + 'pg_query', + 'pg_query_params', + 'pg_result_error_field', + 'pg_result_seek', + 'pg_select', + 'pg_send_execute', + 'pg_send_prepare', + 'pg_send_query', + 'pg_send_query_params', + 'pg_socket', + 'pg_trace', + 'pg_tty', + 'pg_update', + 'pg_version', + 'phpcredits', + 'phpinfo', + 'png2wbmp', + 'posix_access', + 'posix_getgrnam', + 'posix_getpgid', + 'posix_initgroups', + 'posix_kill', + 'posix_mkfifo', + 'posix_mknod', + 'posix_setegid', + 'posix_seteuid', + 'posix_setgid', + 'posix_setpgid', + 'posix_setrlimit', + 'posix_setuid', + 'preg_match', + 'preg_match_all', + 'preg_replace', + 'preg_split', + 'proc_get_status', + 'proc_nice', + 'pspell_add_to_personal', + 'pspell_add_to_session', + 'pspell_clear_session', + 'pspell_config_create', + 'pspell_config_data_dir', + 'pspell_config_dict_dir', + 'pspell_config_ignore', + 'pspell_config_mode', + 'pspell_config_personal', + 'pspell_config_repl', + 'pspell_config_runtogether', + 'pspell_config_save_repl', + 'pspell_new', + 'pspell_new_config', + 'pspell_save_wordlist', + 'pspell_store_replacement', + 'ps_add_launchlink', + 'ps_add_locallink', + 'ps_add_note', + 'ps_add_pdflink', + 'ps_add_weblink', + 'ps_arc', + 'ps_arcn', + 'ps_begin_page', + 'ps_begin_pattern', + 'ps_begin_template', + 'ps_circle', + 'ps_clip', + 'ps_close', + 'ps_closepath', + 'ps_closepath_stroke', + 'ps_close_image', + 'ps_continue_text', + 'ps_curveto', + 'ps_delete', + 'ps_end_page', + 'ps_end_pattern', + 'ps_end_template', + 'ps_fill', + 'ps_fill_stroke', + 'ps_get_parameter', + 'ps_hyphenate', + 'ps_include_file', + 'ps_lineto', + 'ps_moveto', + 'ps_new', + 'ps_open_file', + 'ps_place_image', + 'ps_rect', + 'ps_restore', + 'ps_rotate', + 'ps_save', + 'ps_scale', + 'ps_setcolor', + 'ps_setdash', + 'ps_setflat', + 'ps_setfont', + 'ps_setgray', + 'ps_setlinecap', + 'ps_setlinejoin', + 'ps_setlinewidth', + 'ps_setmiterlimit', + 'ps_setoverprintmode', + 'ps_setpolydash', + 'ps_set_border_color', + 'ps_set_border_dash', + 'ps_set_border_style', + 'ps_set_info', + 'ps_set_parameter', + 'ps_set_text_pos', + 'ps_set_value', + 'ps_shading', + 'ps_shading_pattern', + 'ps_shfill', + 'ps_show', + 'ps_show2', + 'ps_show_xy', + 'ps_show_xy2', + 'ps_stroke', + 'ps_symbol', + 'ps_translate', + 'putenv', + 'readfile', + 'readgzfile', + 'readline_add_history', + 'readline_callback_handler_install', + 'readline_clear_history', + 'readline_completion_function', + 'readline_read_history', + 'readline_write_history', + 'readlink', + 'realpath', + 'register_tick_function', + 'rename', + 'rewind', + 'rewinddir', + 'rmdir', + 'rpmaddtag', + 'rrd_create', + 'rsort', + 'sapi_windows_cp_conv', + 'sapi_windows_cp_set', + 'sapi_windows_generate_ctrl_event', + 'sapi_windows_vt100_support', + 'scandir', + 'sem_acquire', + 'sem_get', + 'sem_release', + 'sem_remove', + 'session_abort', + 'session_decode', + 'session_destroy', + 'session_regenerate_id', + 'session_reset', + 'session_unset', + 'session_write_close', + 'settype', + 'set_include_path', + 'set_time_limit', + 'sha1_file', + 'shmop_delete', + 'shmop_read', + 'shmop_write', + 'shm_put_var', + 'shm_remove', + 'shm_remove_var', + 'shuffle', + 'simplexml_import_dom', + 'simplexml_load_file', + 'simplexml_load_string', + 'sleep', + 'socket_accept', + 'socket_addrinfo_bind', + 'socket_addrinfo_connect', + 'socket_bind', + 'socket_connect', + 'socket_create', + 'socket_create_listen', + 'socket_create_pair', + 'socket_export_stream', + 'socket_getpeername', + 'socket_getsockname', + 'socket_get_option', + 'socket_import_stream', + 'socket_listen', + 'socket_read', + 'socket_send', + 'socket_sendmsg', + 'socket_sendto', + 'socket_set_block', + 'socket_set_nonblock', + 'socket_set_option', + 'socket_shutdown', + 'socket_write', + 'socket_wsaprotocol_info_export', + 'socket_wsaprotocol_info_import', + 'socket_wsaprotocol_info_release', + 'sodium_crypto_pwhash', + 'sodium_crypto_pwhash_str', + 'solr_get_version', + 'sort', + 'soundex', + 'spl_autoload_register', + 'spl_autoload_unregister', + 'sprintf', + 'sqlsrv_begin_transaction', + 'sqlsrv_cancel', + 'sqlsrv_client_info', + 'sqlsrv_close', + 'sqlsrv_commit', + 'sqlsrv_configure', + 'sqlsrv_execute', + 'sqlsrv_free_stmt', + 'sqlsrv_get_field', + 'sqlsrv_next_result', + 'sqlsrv_num_fields', + 'sqlsrv_num_rows', + 'sqlsrv_prepare', + 'sqlsrv_query', + 'sqlsrv_rollback', + 'ssdeep_fuzzy_compare', + 'ssdeep_fuzzy_hash', + 'ssdeep_fuzzy_hash_filename', + 'ssh2_auth_agent', + 'ssh2_auth_hostbased_file', + 'ssh2_auth_password', + 'ssh2_auth_pubkey_file', + 'ssh2_connect', + 'ssh2_disconnect', + 'ssh2_exec', + 'ssh2_publickey_add', + 'ssh2_publickey_init', + 'ssh2_publickey_remove', + 'ssh2_scp_recv', + 'ssh2_scp_send', + 'ssh2_sftp', + 'ssh2_sftp_chmod', + 'ssh2_sftp_mkdir', + 'ssh2_sftp_rename', + 'ssh2_sftp_rmdir', + 'ssh2_sftp_symlink', + 'ssh2_sftp_unlink', + 'stream_context_set_params', + 'stream_copy_to_stream', + 'stream_filter_append', + 'stream_filter_prepend', + 'stream_filter_register', + 'stream_filter_remove', + 'stream_get_contents', + 'stream_isatty', + 'stream_resolve_include_path', + 'stream_set_blocking', + 'stream_set_timeout', + 'stream_socket_accept', + 'stream_socket_client', + 'stream_socket_pair', + 'stream_socket_server', + 'stream_socket_shutdown', + 'stream_supports_lock', + 'stream_wrapper_register', + 'stream_wrapper_restore', + 'stream_wrapper_unregister', + 'strptime', + 'strtotime', + 'substr', + 'swoole_async_write', + 'swoole_async_writefile', + 'swoole_event_defer', + 'swoole_event_del', + 'swoole_event_write', + 'symlink', + 'syslog', + 'system', + 'tempnam', + 'timezone_name_from_abbr', + 'time_nanosleep', + 'time_sleep_until', + 'tmpfile', + 'touch', + 'uasort', + 'uksort', + 'unlink', + 'unpack', + 'uopz_extend', + 'uopz_implement', + 'usort', + 'virtual', + 'vsprintf', + 'xdiff_file_bdiff', + 'xdiff_file_bpatch', + 'xdiff_file_diff', + 'xdiff_file_diff_binary', + 'xdiff_file_patch_binary', + 'xdiff_file_rabdiff', + 'xdiff_string_bpatch', + 'xdiff_string_patch', + 'xdiff_string_patch_binary', + 'xmlrpc_set_type', + 'xml_parser_create', + 'xml_parser_create_ns', + 'xml_set_object', + 'yaml_parse', + 'yaml_parse_file', + 'yaml_parse_url', + 'yaz_ccl_parse', + 'yaz_close', + 'yaz_connect', + 'yaz_database', + 'yaz_element', + 'yaz_present', + 'yaz_search', + 'yaz_wait', + 'zip_entry_close', + 'zip_entry_open', + 'zip_entry_read', + 'zlib_decode', +]; diff --git a/vendor/thecodingmachine/safe/generated/gmp.php b/vendor/thecodingmachine/safe/generated/gmp.php new file mode 100644 index 000000000..dae15975d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/gmp.php @@ -0,0 +1,87 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\GmpException; + +/** + * Calculates the binomial coefficient C(n, k). + * + * @param \GMP|string|int $n Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. + * @param int $k + * @return \GMP Returns the binomial coefficient C(n, k). + * @throws GmpException + * + */ +function gmp_binomial($n, int $k): \GMP +{ + error_clear_last(); + $result = \gmp_binomial($n, $k); + if ($result === false) { + throw GmpException::createFromPhpError(); + } + return $result; +} + + +/** + * Export a GMP number to a binary string + * + * @param \GMP|string|int $gmpnumber The GMP number being exported + * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter. + * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. + * @return string Returns a string. + * @throws GmpException + * + */ +function gmp_export($gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string +{ + error_clear_last(); + $result = \gmp_export($gmpnumber, $word_size, $options); + if ($result === false) { + throw GmpException::createFromPhpError(); + } + return $result; +} + + +/** + * Import a GMP number from a binary string + * + * @param string $data The binary string being imported + * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter. + * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. + * @return \GMP Returns a GMP number. + * @throws GmpException + * + */ +function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): \GMP +{ + error_clear_last(); + $result = \gmp_import($data, $word_size, $options); + if ($result === false) { + throw GmpException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param \GMP|string|int $seed The seed to be set for the gmp_random, + * gmp_random_bits, and + * gmp_random_range functions. + * + * Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. + * @throws GmpException + * + */ +function gmp_random_seed($seed): void +{ + error_clear_last(); + $result = \gmp_random_seed($seed); + if ($result === false) { + throw GmpException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/gnupg.php b/vendor/thecodingmachine/safe/generated/gnupg.php new file mode 100644 index 000000000..b5d85ca3a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/gnupg.php @@ -0,0 +1,168 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\GnupgException; + +/** + * + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @param string $fingerprint The fingerprint key. + * @param string $passphrase The pass phrase. + * @throws GnupgException + * + */ +function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphrase): void +{ + error_clear_last(); + $result = \gnupg_adddecryptkey($identifier, $fingerprint, $passphrase); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @param string $fingerprint The fingerprint key. + * @throws GnupgException + * + */ +function gnupg_addencryptkey($identifier, string $fingerprint): void +{ + error_clear_last(); + $result = \gnupg_addencryptkey($identifier, $fingerprint); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @param string $fingerprint The fingerprint key. + * @param string $passphrase The pass phrase. + * @throws GnupgException + * + */ +function gnupg_addsignkey($identifier, string $fingerprint, string $passphrase = null): void +{ + error_clear_last(); + if ($passphrase !== null) { + $result = \gnupg_addsignkey($identifier, $fingerprint, $passphrase); + } else { + $result = \gnupg_addsignkey($identifier, $fingerprint); + } + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @throws GnupgException + * + */ +function gnupg_cleardecryptkeys($identifier): void +{ + error_clear_last(); + $result = \gnupg_cleardecryptkeys($identifier); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @throws GnupgException + * + */ +function gnupg_clearencryptkeys($identifier): void +{ + error_clear_last(); + $result = \gnupg_clearencryptkeys($identifier); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @throws GnupgException + * + */ +function gnupg_clearsignkeys($identifier): void +{ + error_clear_last(); + $result = \gnupg_clearsignkeys($identifier); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * Toggle the armored output. + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @param int $armor Pass a non-zero integer-value to this function to enable armored-output + * (default). + * Pass 0 to disable armored output. + * @throws GnupgException + * + */ +function gnupg_setarmor($identifier, int $armor): void +{ + error_clear_last(); + $result = \gnupg_setarmor($identifier, $armor); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} + + +/** + * Sets the mode for signing. + * + * @param resource $identifier The gnupg identifier, from a call to + * gnupg_init or gnupg. + * @param int $signmode The mode for signing. + * + * signmode takes a constant indicating what type of + * signature should be produced. The possible values are + * GNUPG_SIG_MODE_NORMAL, + * GNUPG_SIG_MODE_DETACH and + * GNUPG_SIG_MODE_CLEAR. + * By default GNUPG_SIG_MODE_CLEAR is used. + * @throws GnupgException + * + */ +function gnupg_setsignmode($identifier, int $signmode): void +{ + error_clear_last(); + $result = \gnupg_setsignmode($identifier, $signmode); + if ($result === false) { + throw GnupgException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/hash.php b/vendor/thecodingmachine/safe/generated/hash.php new file mode 100644 index 000000000..2c327c0e3 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/hash.php @@ -0,0 +1,61 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\HashException; + +/** + * + * + * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..) + * See hash_algos for a list of supported algorithms. + * + * + * Non-cryptographic hash functions are not allowed. + * + * + * + * Non-cryptographic hash functions are not allowed. + * @param string $ikm Input keying material (raw binary). Cannot be empty. + * @param int $length Desired output length in bytes. + * Cannot be greater than 255 times the chosen hash function size. + * + * If length is 0, the output length + * will default to the chosen hash function size. + * @param string $info Application/context-specific info string. + * @param string $salt Salt to use during derivation. + * + * While optional, adding random salt significantly improves the strength of HKDF. + * @return string Returns a string containing a raw binary representation of the derived key + * (also known as output keying material - OKM);. + * @throws HashException + * + */ +function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string +{ + error_clear_last(); + $result = \hash_hkdf($algo, $ikm, $length, $info, $salt); + if ($result === false) { + throw HashException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param \HashContext $hcontext Hashing context returned by hash_init. + * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. + * @param \HashContext|null $scontext Stream context as returned by stream_context_create. + * @throws HashException + * + */ +function hash_update_file(\HashContext $hcontext, string $filename, ?\HashContext $scontext = null): void +{ + error_clear_last(); + $result = \hash_update_file($hcontext, $filename, $scontext); + if ($result === false) { + throw HashException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/ibase.php b/vendor/thecodingmachine/safe/generated/ibase.php new file mode 100644 index 000000000..49697400d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ibase.php @@ -0,0 +1,633 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\IbaseException; + +/** + * This function will discard a BLOB if it has not yet been closed by + * fbird_blob_close. + * + * @param resource $blob_handle A BLOB handle opened with fbird_blob_create. + * @throws IbaseException + * + */ +function fbird_blob_cancel($blob_handle): void +{ + error_clear_last(); + $result = \fbird_blob_cancel($blob_handle); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $service_handle The handle on the database server service. + * @param string $user_name The login name of the new database user. + * @param string $password The password of the new user. + * @param string $first_name The first name of the new database user. + * @param string $middle_name The middle name of the new database user. + * @param string $last_name The last name of the new database user. + * @throws IbaseException + * + */ +function ibase_add_user($service_handle, string $user_name, string $password, string $first_name = null, string $middle_name = null, string $last_name = null): void +{ + error_clear_last(); + if ($last_name !== null) { + $result = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name); + } elseif ($middle_name !== null) { + $result = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name); + } elseif ($first_name !== null) { + $result = \ibase_add_user($service_handle, $user_name, $password, $first_name); + } else { + $result = \ibase_add_user($service_handle, $user_name, $password); + } + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you + * won't get any responses. + * + * @param resource $service_handle A previously opened connection to the database server. + * @param string $source_db The absolute file path to the database on the database server. You can also use a database alias. + * @param string $dest_file The path to the backup file on the database server. + * @param int $options Additional options to pass to the database server for backup. + * The options parameter can be a combination + * of the following constants: + * IBASE_BKP_IGNORE_CHECKSUMS, + * IBASE_BKP_IGNORE_LIMBO, + * IBASE_BKP_METADATA_ONLY, + * IBASE_BKP_NO_GARBAGE_COLLECT, + * IBASE_BKP_OLD_DESCRIPTIONS, + * IBASE_BKP_NON_TRANSPORTABLE or + * IBASE_BKP_CONVERT. + * Read the section about for further information. + * @param bool $verbose Since the backup process is done on the database server, you don't have any chance + * to get its output. This argument is useless. + * @return mixed Returns TRUE on success. + * + * Since the backup process is done on the (remote) server, this function just passes the arguments to it. + * While the arguments are legal, you won't get FALSE. + * @throws IbaseException + * + */ +function ibase_backup($service_handle, string $source_db, string $dest_file, int $options = 0, bool $verbose = false) +{ + error_clear_last(); + $result = \ibase_backup($service_handle, $source_db, $dest_file, $options, $verbose); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * This function will discard a BLOB if it has not yet been closed by + * ibase_blob_close. + * + * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. + * @throws IbaseException + * + */ +function ibase_blob_cancel($blob_handle): void +{ + error_clear_last(); + $result = \ibase_blob_cancel($blob_handle); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * ibase_blob_create creates a new BLOB for filling with + * data. + * + * @param resource $link_identifier An InterBase link identifier. If omitted, the last opened link is + * assumed. + * @return resource Returns a BLOB handle for later use with + * ibase_blob_add. + * @throws IbaseException + * + */ +function ibase_blob_create($link_identifier = null) +{ + error_clear_last(); + $result = \ibase_blob_create($link_identifier); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns at most len bytes from a BLOB + * that has been opened for reading by ibase_blob_open. + * + * @param resource $blob_handle A BLOB handle opened with ibase_blob_open. + * @param int $len Size of returned data. + * @return string Returns at most len bytes from the BLOB. + * @throws IbaseException + * + */ +function ibase_blob_get($blob_handle, int $len): string +{ + error_clear_last(); + $result = \ibase_blob_get($blob_handle, $len); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * Closes the link to an InterBase database that's associated with + * a connection id returned from ibase_connect. + * Default transaction on link is committed, other transactions are + * rolled back. + * + * @param resource $connection_id An InterBase link identifier returned from + * ibase_connect. If omitted, the last opened link + * is assumed. + * @throws IbaseException + * + */ +function ibase_close($connection_id = null): void +{ + error_clear_last(); + $result = \ibase_close($connection_id); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Commits a transaction without closing it. + * + * @param resource $link_or_trans_identifier If called without an argument, this function commits the default + * transaction of the default link. If the argument is a connection + * identifier, the default transaction of the corresponding connection + * will be committed. If the argument is a transaction identifier, the + * corresponding transaction will be committed. The transaction context + * will be retained, so statements executed from within this transaction + * will not be invalidated. + * @throws IbaseException + * + */ +function ibase_commit_ret($link_or_trans_identifier = null): void +{ + error_clear_last(); + $result = \ibase_commit_ret($link_or_trans_identifier); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Commits a transaction. + * + * @param resource $link_or_trans_identifier If called without an argument, this function commits the default + * transaction of the default link. If the argument is a connection + * identifier, the default transaction of the corresponding connection + * will be committed. If the argument is a transaction identifier, the + * corresponding transaction will be committed. + * @throws IbaseException + * + */ +function ibase_commit($link_or_trans_identifier = null): void +{ + error_clear_last(); + $result = \ibase_commit($link_or_trans_identifier); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Establishes a connection to an Firebird/InterBase server. + * + * In case a second call is made to ibase_connect with + * the same arguments, no new link will be established, but instead, the link + * identifier of the already opened link will be returned. The link to the + * server will be closed as soon as the execution of the script ends, unless + * it's closed earlier by explicitly calling ibase_close. + * + * @param string $database The database argument has to be a valid path to + * database file on the server it resides on. If the server is not local, + * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' + * (TCP/IP with interbase server on custom TCP port), '//hostname/' + * (NetBEUI), depending on the connection + * protocol used. + * @param string $username The user name. Can be set with the + * ibase.default_user php.ini directive. + * @param string $password The password for username. Can be set with the + * ibase.default_password php.ini directive. + * @param string $charset charset is the default character set for a + * database. + * @param int $buffers buffers is the number of database buffers to + * allocate for the server-side cache. If 0 or omitted, server chooses + * its own default. + * @param int $dialect dialect selects the default SQL dialect for any + * statement executed within a connection, and it defaults to the highest + * one supported by client libraries. + * @param string $role Functional only with InterBase 5 and up. + * @param int $sync + * @return resource Returns an Firebird/InterBase link identifier on success. + * @throws IbaseException + * + */ +function ibase_connect(string $database = null, string $username = null, string $password = null, string $charset = null, int $buffers = null, int $dialect = null, string $role = null, int $sync = null) +{ + error_clear_last(); + if ($sync !== null) { + $result = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync); + } elseif ($role !== null) { + $result = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role); + } elseif ($dialect !== null) { + $result = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect); + } elseif ($buffers !== null) { + $result = \ibase_connect($database, $username, $password, $charset, $buffers); + } elseif ($charset !== null) { + $result = \ibase_connect($database, $username, $password, $charset); + } elseif ($password !== null) { + $result = \ibase_connect($database, $username, $password); + } elseif ($username !== null) { + $result = \ibase_connect($database, $username); + } elseif ($database !== null) { + $result = \ibase_connect($database); + } else { + $result = \ibase_connect(); + } + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $service_handle The handle on the database server service. + * @param string $user_name The login name of the user you want to delete from the database. + * @throws IbaseException + * + */ +function ibase_delete_user($service_handle, string $user_name): void +{ + error_clear_last(); + $result = \ibase_delete_user($service_handle, $user_name); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * This functions drops a database that was opened by either ibase_connect + * or ibase_pconnect. The database is closed and deleted from the server. + * + * @param resource $connection An InterBase link identifier. If omitted, the last opened link is + * assumed. + * @throws IbaseException + * + */ +function ibase_drop_db($connection = null): void +{ + error_clear_last(); + $result = \ibase_drop_db($connection); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * This function causes the registered event handler specified by + * event to be cancelled. The callback function will + * no longer be called for the events it was registered to handle. + * + * @param resource $event An event resource, created by + * ibase_set_event_handler. + * @throws IbaseException + * + */ +function ibase_free_event_handler($event): void +{ + error_clear_last(); + $result = \ibase_free_event_handler($event); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Frees a prepared query. + * + * @param resource $query A query prepared with ibase_prepare. + * @throws IbaseException + * + */ +function ibase_free_query($query): void +{ + error_clear_last(); + $result = \ibase_free_query($query); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Frees a result set. + * + * @param resource $result_identifier A result set created by ibase_query or + * ibase_execute. + * @throws IbaseException + * + */ +function ibase_free_result($result_identifier): void +{ + error_clear_last(); + $result = \ibase_free_result($result_identifier); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $service_handle + * @param string $db + * @param int $action + * @param int $argument + * @throws IbaseException + * + */ +function ibase_maintain_db($service_handle, string $db, int $action, int $argument = 0): void +{ + error_clear_last(); + $result = \ibase_maintain_db($service_handle, $db, $action, $argument); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $service_handle The handle on the database server service. + * @param string $user_name The login name of the database user to modify. + * @param string $password The user's new password. + * @param string $first_name The user's new first name. + * @param string $middle_name The user's new middle name. + * @param string $last_name The user's new last name. + * @throws IbaseException + * + */ +function ibase_modify_user($service_handle, string $user_name, string $password, string $first_name = null, string $middle_name = null, string $last_name = null): void +{ + error_clear_last(); + if ($last_name !== null) { + $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name); + } elseif ($middle_name !== null) { + $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name); + } elseif ($first_name !== null) { + $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name); + } else { + $result = \ibase_modify_user($service_handle, $user_name, $password); + } + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * This function assigns a name to a result set. This name can be used later in + * UPDATE|DELETE ... WHERE CURRENT OF name statements. + * + * @param resource $result An InterBase result set. + * @param string $name The name to be assigned. + * @throws IbaseException + * + */ +function ibase_name_result($result, string $name): void +{ + error_clear_last(); + $result = \ibase_name_result($result, $name); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Opens a persistent connection to an InterBase database. + * + * ibase_pconnect acts very much like + * ibase_connect with two major differences. + * + * First, when connecting, the function will first try to find a (persistent) + * link that's already opened with the same parameters. If one is found, an + * identifier for it will be returned instead of opening a new connection. + * + * Second, the connection to the InterBase server will not be closed when the + * execution of the script ends. Instead, the link will remain open for + * future use (ibase_close will not close links + * established by ibase_pconnect). This type of link is + * therefore called 'persistent'. + * + * @param string $database The database argument has to be a valid path to + * database file on the server it resides on. If the server is not local, + * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' + * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection + * protocol used. + * @param string $username The user name. Can be set with the + * ibase.default_user php.ini directive. + * @param string $password The password for username. Can be set with the + * ibase.default_password php.ini directive. + * @param string $charset charset is the default character set for a + * database. + * @param int $buffers buffers is the number of database buffers to + * allocate for the server-side cache. If 0 or omitted, server chooses + * its own default. + * @param int $dialect dialect selects the default SQL dialect for any + * statement executed within a connection, and it defaults to the highest + * one supported by client libraries. Functional only with InterBase 6 + * and up. + * @param string $role Functional only with InterBase 5 and up. + * @param int $sync + * @return resource Returns an InterBase link identifier on success. + * @throws IbaseException + * + */ +function ibase_pconnect(string $database = null, string $username = null, string $password = null, string $charset = null, int $buffers = null, int $dialect = null, string $role = null, int $sync = null) +{ + error_clear_last(); + if ($sync !== null) { + $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync); + } elseif ($role !== null) { + $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role); + } elseif ($dialect !== null) { + $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect); + } elseif ($buffers !== null) { + $result = \ibase_pconnect($database, $username, $password, $charset, $buffers); + } elseif ($charset !== null) { + $result = \ibase_pconnect($database, $username, $password, $charset); + } elseif ($password !== null) { + $result = \ibase_pconnect($database, $username, $password); + } elseif ($username !== null) { + $result = \ibase_pconnect($database, $username); + } elseif ($database !== null) { + $result = \ibase_pconnect($database); + } else { + $result = \ibase_pconnect(); + } + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you + * won't get any responses. + * + * @param resource $service_handle A previously opened connection to the database server. + * @param string $source_file The absolute path on the server where the backup file is located. + * @param string $dest_db The path to create the new database on the server. You can also use database alias. + * @param int $options Additional options to pass to the database server for restore. + * The options parameter can be a combination + * of the following constants: + * IBASE_RES_DEACTIVATE_IDX, + * IBASE_RES_NO_SHADOW, + * IBASE_RES_NO_VALIDITY, + * IBASE_RES_ONE_AT_A_TIME, + * IBASE_RES_REPLACE, + * IBASE_RES_CREATE, + * IBASE_RES_USE_ALL_SPACE, + * IBASE_PRP_PAGE_BUFFERS, + * IBASE_PRP_SWEEP_INTERVAL, + * IBASE_RES_CREATE. + * Read the section about for further information. + * @param bool $verbose Since the restore process is done on the database server, you don't have any chance + * to get its output. This argument is useless. + * @return mixed Returns TRUE on success. + * + * Since the restore process is done on the (remote) server, this function just passes the arguments to it. + * While the arguments are legal, you won't get FALSE. + * @throws IbaseException + * + */ +function ibase_restore($service_handle, string $source_file, string $dest_db, int $options = 0, bool $verbose = false) +{ + error_clear_last(); + $result = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * Rolls back a transaction without closing it. + * + * @param resource $link_or_trans_identifier If called without an argument, this function rolls back the default + * transaction of the default link. If the argument is a connection + * identifier, the default transaction of the corresponding connection + * will be rolled back. If the argument is a transaction identifier, the + * corresponding transaction will be rolled back. The transaction context + * will be retained, so statements executed from within this transaction + * will not be invalidated. + * @throws IbaseException + * + */ +function ibase_rollback_ret($link_or_trans_identifier = null): void +{ + error_clear_last(); + $result = \ibase_rollback_ret($link_or_trans_identifier); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * Rolls back a transaction. + * + * @param resource $link_or_trans_identifier If called without an argument, this function rolls back the default + * transaction of the default link. If the argument is a connection + * identifier, the default transaction of the corresponding connection + * will be rolled back. If the argument is a transaction identifier, the + * corresponding transaction will be rolled back. + * @throws IbaseException + * + */ +function ibase_rollback($link_or_trans_identifier = null): void +{ + error_clear_last(); + $result = \ibase_rollback($link_or_trans_identifier); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $host The name or ip address of the database host. You can define the port by adding + * '/' and port number. If no port is specified, port 3050 will be used. + * @param string $dba_username The name of any valid user. + * @param string $dba_password The user's password. + * @return resource Returns a Interbase / Firebird link identifier on success. + * @throws IbaseException + * + */ +function ibase_service_attach(string $host, string $dba_username, string $dba_password) +{ + error_clear_last(); + $result = \ibase_service_attach($host, $dba_username, $dba_password); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $service_handle A previously created connection to the database server. + * @throws IbaseException + * + */ +function ibase_service_detach($service_handle): void +{ + error_clear_last(); + $result = \ibase_service_detach($service_handle); + if ($result === false) { + throw IbaseException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/ibmDb2.php b/vendor/thecodingmachine/safe/generated/ibmDb2.php new file mode 100644 index 000000000..f97e7b086 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ibmDb2.php @@ -0,0 +1,1221 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\IbmDb2Exception; + +/** + * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. + * + * @param resource $connection A valid database connection resource variable as returned from + * db2_connect or db2_pconnect. + * @param int $value One of the following constants: + * + * + * DB2_AUTOCOMMIT_OFF + * + * + * Turns AUTOCOMMIT off. + * + * + * + * + * DB2_AUTOCOMMIT_ON + * + * + * Turns AUTOCOMMIT on. + * + * + * + * + * + * Turns AUTOCOMMIT off. + * + * Turns AUTOCOMMIT on. + * @return mixed When db2_autocommit receives only the + * connection parameter, it returns the current state + * of AUTOCOMMIT for the requested connection as an integer value. A value of + * DB2_AUTOCOMMIT_OFF indicates that AUTOCOMMIT is off, while a value of DB2_AUTOCOMMIT_ON indicates that + * AUTOCOMMIT is on. + * + * When db2_autocommit receives both the + * connection parameter and + * autocommit parameter, it attempts to set the + * AUTOCOMMIT state of the requested connection to the corresponding state. + * Returns TRUE on success. + * @throws IbmDb2Exception + * + */ +function db2_autocommit($connection, int $value = null) +{ + error_clear_last(); + if ($value !== null) { + $result = \db2_autocommit($connection, $value); + } else { + $result = \db2_autocommit($connection); + } + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Binds a PHP variable to an SQL statement parameter in a statement resource + * returned by db2_prepare. This function gives you more + * control over the parameter type, data type, precision, and scale for the + * parameter than simply passing the variable as part of the optional input + * array to db2_execute. + * + * @param resource $stmt A prepared statement returned from db2_prepare. + * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared + * statement. + * @param string $variable_name A string specifying the name of the PHP variable to bind to the + * parameter specified by parameter_number. + * @param int $parameter_type A constant specifying whether the PHP variable should be bound to the + * SQL parameter as an input parameter (DB2_PARAM_IN), + * an output parameter (DB2_PARAM_OUT), or as a + * parameter that accepts input and returns output + * (DB2_PARAM_INOUT). To avoid memory overhead, you can + * also specify DB2_PARAM_FILE to bind the PHP variable + * to the name of a file that contains large object (BLOB, CLOB, or DBCLOB) + * data. + * @param int $data_type A constant specifying the SQL data type that the PHP variable should be + * bound as: one of DB2_BINARY, + * DB2_CHAR, DB2_DOUBLE, or + * DB2_LONG . + * @param int $precision Specifies the precision with which the variable should be bound to the + * database. This parameter can also be used for retrieving XML output values + * from stored procedures. A non-negative value specifies the maximum size of + * the XML data that will be retrieved from the database. If this parameter + * is not used, a default of 1MB will be assumed for retrieving the XML + * output value from the stored procedure. + * @param int $scale Specifies the scale with which the variable should be bound to the + * database. + * @throws IbmDb2Exception + * + */ +function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $parameter_type = null, int $data_type = 0, int $precision = -1, int $scale = 0): void +{ + error_clear_last(); + if ($scale !== 0) { + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale); + } elseif ($precision !== -1) { + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision); + } elseif ($data_type !== 0) { + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type); + } elseif ($parameter_type !== null) { + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type); + } else { + $result = \db2_bind_param($stmt, $parameter_number, $variable_name); + } + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * This function returns an object with read-only properties that return + * information about the DB2 database client. The following table lists + * the DB2 client properties: + * + * DB2 client properties + * + * + * + * Property name + * Return type + * Description + * + * + * + * + * APPL_CODEPAGE + * int + * The application code page. + * + * + * CONN_CODEPAGE + * int + * The code page for the current connection. + * + * + * DATA_SOURCE_NAME + * string + * The data source name (DSN) used to create the current connection + * to the database. + * + * + * DRIVER_NAME + * string + * The name of the library that implements the DB2 Call + * Level Interface (CLI) specification. + * + * + * DRIVER_ODBC_VER + * string + * The version of ODBC that the DB2 client supports. This returns a + * string "MM.mm" where MM is the major version and + * mm is the minor version. The DB2 client always + * returns "03.51". + * + * + * + * DRIVER_VER + * string + * The version of the client, in the form of a string "MM.mm.uuuu" where + * MM is the major version, + * mm is the minor version, + * and uuuu is the update. For example, "08.02.0001" + * represents major version 8, minor version 2, update 1. + * + * + * + * ODBC_SQL_CONFORMANCE + * string + * + * The level of ODBC SQL grammar supported by the client: + * + * + * MINIMUM + * + * + * Supports the minimum ODBC SQL grammar. + * + * + * + * + * CORE + * + * + * Supports the core ODBC SQL grammar. + * + * + * + * + * EXTENDED + * + * + * Supports extended ODBC SQL grammar. + * + * + * + * + * + * + * + * + * ODBC_VER + * string + * The version of ODBC that the ODBC driver manager supports. This + * returns a string "MM.mm.rrrr" where MM is the major + * version, mm is the minor version, and + * rrrr is the release. The DB2 client always returns + * "03.01.0000". + * + * + * + * + * + * + * @param resource $connection Specifies an active DB2 client connection. + * @return object Returns an object on a successful call. Returns FALSE on failure. + * @throws IbmDb2Exception + * + */ +function db2_client_info($connection): object +{ + error_clear_last(); + $result = \db2_client_info($connection); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * This function closes a DB2 client connection created with + * db2_connect and returns the corresponding + * resources to the database server. + * + * If you attempt to close a persistent DB2 client connection created with + * db2_pconnect, the close request is ignored and the + * persistent DB2 client connection remains available for the next caller. + * + * @param resource $connection Specifies an active DB2 client connection. + * @throws IbmDb2Exception + * + */ +function db2_close($connection): void +{ + error_clear_last(); + $result = \db2_close($connection); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * Commits an in-progress transaction on the specified connection resource and + * begins a new transaction. PHP applications normally default to AUTOCOMMIT + * mode, so db2_commit is not necessary unless AUTOCOMMIT + * has been turned off for the connection resource. + * + * @param resource $connection A valid database connection resource variable as returned from + * db2_connect or db2_pconnect. + * @throws IbmDb2Exception + * + */ +function db2_commit($connection): void +{ + error_clear_last(); + $result = \db2_commit($connection); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * db2_execute executes an SQL statement that was + * prepared by db2_prepare. + * + * If the SQL statement returns a result set, for example, a SELECT statement + * or a CALL to a stored procedure that returns one or more result sets, you + * can retrieve a row as an array from the stmt resource + * using db2_fetch_assoc, + * db2_fetch_both, or + * db2_fetch_array. Alternatively, you can use + * db2_fetch_row to move the result set pointer to the + * next row and fetch a column at a time from that row with + * db2_result. + * + * Refer to db2_prepare for a brief discussion of the + * advantages of using db2_prepare and + * db2_execute rather than db2_exec. + * + * @param resource $stmt A prepared statement returned from db2_prepare. + * @param array $parameters An array of input parameters matching any parameter markers contained + * in the prepared statement. + * @throws IbmDb2Exception + * + */ +function db2_execute($stmt, array $parameters = null): void +{ + error_clear_last(); + if ($parameters !== null) { + $result = \db2_execute($stmt, $parameters); + } else { + $result = \db2_execute($stmt); + } + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * Frees the system and database resources that are associated with a result + * set. These resources are freed implicitly when a script finishes, but you + * can call db2_free_result to explicitly free the result + * set resources before the end of the script. + * + * @param resource $stmt A valid statement resource. + * @throws IbmDb2Exception + * + */ +function db2_free_result($stmt): void +{ + error_clear_last(); + $result = \db2_free_result($stmt); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * Frees the system and database resources that are associated with a statement + * resource. These resources are freed implicitly when a script finishes, but + * you can call db2_free_stmt to explicitly free the + * statement resources before the end of the script. + * + * @param resource $stmt A valid statement resource. + * @throws IbmDb2Exception + * + */ +function db2_free_stmt($stmt): void +{ + error_clear_last(); + $result = \db2_free_stmt($stmt); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * Retrieves the value of a specified option value for a statement resource + * or a connection resource. + * + * @param resource $resource A valid statement resource as returned from + * db2_prepare or a valid connection resource as + * returned from db2_connect or + * db2_pconnect. + * @param string $option A valid statement or connection options. The following new options are available + * as of ibm_db2 version 1.6.0. They provide useful tracking information + * that can be set during execution with db2_get_option. + * + * + * Prior versions of ibm_db2 do not support these new options. + * + * + * When the value in each option is being set, some servers might not handle + * the entire length provided and might truncate the value. + * + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, + * 0 through 9, and the underscore (_) or period (.). + * + * + * + * + * userid + * + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host + * database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for + * identification purposes only and is not used for any authorization. + * + * + * + * + * + * + * acctstr + * + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. + * + * + * + * + * + * + * applname + * + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. + * + * + * + * + * + * + * wrkstnname + * + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. + * + * + * + * + * + * + * + * Prior versions of ibm_db2 do not support these new options. + * + * When the value in each option is being set, some servers might not handle + * the entire length provided and might truncate the value. + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, + * 0 through 9, and the underscore (_) or period (.). + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host + * database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for + * identification purposes only and is not used for any authorization. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for + * identification purposes only and is not used for any authorization. + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. + * @return string Returns the current setting of the connection attribute provided on success. + * @throws IbmDb2Exception + * + */ +function db2_get_option($resource, string $option): string +{ + error_clear_last(); + $result = \db2_get_option($resource, $option); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * This function closes a DB2 client connection created with + * db2_pconnect and returns the corresponding resources + * to the database server. + * + * + * This function is only available on i5/OS in response to i5/OS system + * administration requests. + * + * + * + * If you have a persistent DB2 client connection created with + * db2_pconnect, you may use this function to close the + * connection. To avoid substantial connection performance penalties, this + * function should only be used in rare cases when the persistent connection + * has become unresponsive or the persistent connection will not be needed for + * a long period of time. + * + * @param resource $resource Specifies an active DB2 client connection. + * @throws IbmDb2Exception + * + */ +function db2_pclose($resource): void +{ + error_clear_last(); + $result = \db2_pclose($resource); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * Rolls back an in-progress transaction on the specified connection resource and + * begins a new transaction. PHP applications normally default to AUTOCOMMIT + * mode, so db2_rollback normally has no effect unless + * AUTOCOMMIT has been turned off for the connection resource. + * + * @param resource $connection A valid database connection resource variable as returned from + * db2_connect or db2_pconnect. + * @throws IbmDb2Exception + * + */ +function db2_rollback($connection): void +{ + error_clear_last(); + $result = \db2_rollback($connection); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} + + +/** + * This function returns an object with read-only properties that return + * information about the IBM DB2, Cloudscape, or Apache Derby database server. + * The following table lists the database server properties: + * + * Database server properties + * + * + * + * Property name + * Return type + * Description + * + * + * + * + * DBMS_NAME + * string + * The name of the database server to which you are + * connected. For DB2 servers this is a combination of + * DB2 followed by the operating system on which + * the database server is running. + * + * + * DBMS_VER + * string + * The version of the database server, in the form of a string + * "MM.mm.uuuu" where MM is the major version, + * mm is the minor version, + * and uuuu is the update. For example, "08.02.0001" + * represents major version 8, minor version 2, update 1. + * + * + * + * DB_CODEPAGE + * int + * The code page of the database to which you are connected. + * + * + * DB_NAME + * string + * The name of the database to which you are connected. + * + * + * DFT_ISOLATION + * string + * + * The default transaction isolation level supported by the + * server: + * + * + * UR + * + * + * Uncommitted read: changes are immediately visible by all + * concurrent transactions. + * + * + * + * + * CS + * + * + * Cursor stability: a row read by one transaction can be altered and + * committed by a second concurrent transaction. + * + * + * + * + * RS + * + * + * Read stability: a transaction can add or remove rows matching a + * search condition or a pending transaction. + * + * + * + * + * RR + * + * + * Repeatable read: data affected by pending transaction is not + * available to other transactions. + * + * + * + * + * NC + * + * + * No commit: any changes are visible at the end of a successful + * operation. Explicit commits and rollbacks are not allowed. + * + * + * + * + * + * + * + * + * IDENTIFIER_QUOTE_CHAR + * string + * The character used to delimit an identifier. + * + * + * INST_NAME + * string + * The instance on the database server that contains the + * database. + * + * + * ISOLATION_OPTION + * array + * An array of the isolation options supported by the + * database server. The isolation options are described in + * the DFT_ISOLATION property. + * + * + * KEYWORDS + * array + * An array of the keywords reserved by the database + * server. + * + * + * LIKE_ESCAPE_CLAUSE + * bool + * TRUE if the database server supports the + * use of % and _ wildcard + * characters. FALSE if the database server does not + * support these wildcard characters. + * + * + * MAX_COL_NAME_LEN + * int + * Maximum length of a column name supported by the database + * server, expressed in bytes. + * + * + * MAX_IDENTIFIER_LEN + * int + * Maximum length of an SQL identifier supported by the database + * server, expressed in characters. + * + * + * MAX_INDEX_SIZE + * int + * Maximum size of columns combined in an index supported by the + * database server, expressed in bytes. + * + * + * MAX_PROC_NAME_LEN + * int + * Maximum length of a procedure name supported by the database + * server, expressed in bytes. + * + * + * MAX_ROW_SIZE + * int + * Maximum length of a row in a base table supported by the + * database server, expressed in bytes. + * + * + * MAX_SCHEMA_NAME_LEN + * int + * Maximum length of a schema name supported by the database + * server, expressed in bytes. + * + * + * MAX_STATEMENT_LEN + * int + * Maximum length of an SQL statement supported by the database + * server, expressed in bytes. + * + * + * MAX_TABLE_NAME_LEN + * int + * Maximum length of a table name supported by the database + * server, expressed in bytes. + * + * + * NON_NULLABLE_COLUMNS + * bool + * TRUE if the database server supports columns that can be + * defined as NOT NULL, FALSE if the database server does not support + * columns defined as NOT NULL. + * + * + * PROCEDURES + * bool + * TRUE if the database server supports the use of the CALL + * statement to call stored procedures, FALSE if the database + * server does not support the CALL statement. + * + * + * SPECIAL_CHARS + * string + * A string containing all of the characters other than + * a-Z, 0-9, and underscore that can be used in an identifier name. + * + * + * SQL_CONFORMANCE + * string + * + * The level of conformance to the ANSI/ISO SQL-92 specification + * offered by the database server: + * + * + * ENTRY + * + * + * Entry-level SQL-92 compliance. + * + * + * + * + * FIPS127 + * + * + * FIPS-127-2 transitional compliance. + * + * + * + * + * FULL + * + * + * Full level SQL-92 compliance. + * + * + * + * + * INTERMEDIATE + * + * + * Intermediate level SQL-92 compliance. + * + * + * + * + * + * + * + * + * + * + * + * @param resource $connection Specifies an active DB2 client connection. + * @return object Returns an object on a successful call. Returns FALSE on failure. + * @throws IbmDb2Exception + * + */ +function db2_server_info($connection): object +{ + error_clear_last(); + $result = \db2_server_info($connection); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Sets options for a statement resource or a connection resource. You + * cannot set options for result set resources. + * + * @param resource $resource A valid statement resource as returned from + * db2_prepare or a valid connection resource as + * returned from db2_connect or + * db2_pconnect. + * @param array $options An associative array containing valid statement or connection + * options. This parameter can be used to change autocommit values, + * cursor types (scrollable or forward), and to specify the case of + * the column names (lower, upper, or natural) that will appear in a + * result set. + * + * + * autocommit + * + * + * Passing DB2_AUTOCOMMIT_ON turns + * autocommit on for the specified connection resource. + * + * + * Passing DB2_AUTOCOMMIT_OFF turns + * autocommit off for the specified connection resource. + * + * + * + * + * cursor + * + * + * Passing DB2_FORWARD_ONLY specifies a + * forward-only cursor for a statement resource. This is the + * default cursor type, and is supported by all database + * servers. + * + * + * Passing DB2_SCROLLABLE specifies a + * scrollable cursor for a statement resource. Scrollable + * cursors enable result set rows to be accessed in + * non-sequential order, but are only supported by + * IBM DB2 Universal Database databases. + * + * + * + * + * binmode + * + * + * Passing DB2_BINARY specifies that + * binary data will be returned as is. This is the default + * mode. This is the equivalent of setting + * ibm_db2.binmode=1 in php.ini. + * + * + * Passing DB2_CONVERT specifies that + * binary data will be converted to hexadecimal encoding, + * and will be returned as such. This is the equivalent of + * setting ibm_db2.binmode=2 in php.ini. + * + * + * Passing DB2_PASSTHRU specifies that + * binary data will be converted to NULL. This is the + * equivalent of setting ibm_db2.binmode=3 + * in php.ini. + * + * + * + * + * db2_attr_case + * + * + * Passing DB2_CASE_LOWER specifies that + * column names of the result set are returned in lower case. + * + * + * Passing DB2_CASE_UPPER specifies that + * column names of the result set are returned in upper case. + * + * + * Passing DB2_CASE_NATURAL specifies that + * column names of the result set are returned in natural + * case. + * + * + * + * + * deferred_prepare + * + * + * Passing DB2_DEFERRED_PREPARE_ON turns deferred + * prepare on for the specified statement resource. + * + * + * Passing DB2_DEFERRED_PREPARE_OFF turns deferred + * prepare off for the specified statement resource. + * + * + * + * + * + * Passing DB2_AUTOCOMMIT_ON turns + * autocommit on for the specified connection resource. + * + * Passing DB2_AUTOCOMMIT_OFF turns + * autocommit off for the specified connection resource. + * + * Passing DB2_FORWARD_ONLY specifies a + * forward-only cursor for a statement resource. This is the + * default cursor type, and is supported by all database + * servers. + * + * Passing DB2_SCROLLABLE specifies a + * scrollable cursor for a statement resource. Scrollable + * cursors enable result set rows to be accessed in + * non-sequential order, but are only supported by + * IBM DB2 Universal Database databases. + * + * Passing DB2_BINARY specifies that + * binary data will be returned as is. This is the default + * mode. This is the equivalent of setting + * ibm_db2.binmode=1 in php.ini. + * + * Passing DB2_CONVERT specifies that + * binary data will be converted to hexadecimal encoding, + * and will be returned as such. This is the equivalent of + * setting ibm_db2.binmode=2 in php.ini. + * + * Passing DB2_PASSTHRU specifies that + * binary data will be converted to NULL. This is the + * equivalent of setting ibm_db2.binmode=3 + * in php.ini. + * + * Passing DB2_CASE_LOWER specifies that + * column names of the result set are returned in lower case. + * + * Passing DB2_CASE_UPPER specifies that + * column names of the result set are returned in upper case. + * + * Passing DB2_CASE_NATURAL specifies that + * column names of the result set are returned in natural + * case. + * + * Passing DB2_DEFERRED_PREPARE_ON turns deferred + * prepare on for the specified statement resource. + * + * Passing DB2_DEFERRED_PREPARE_OFF turns deferred + * prepare off for the specified statement resource. + * + * The following new i5/OS options are available in ibm_db2 version 1.5.1 + * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. + * + * + * i5_fetch_only + * + * + * DB2_I5_FETCH_ON - Cursors are read-only + * and cannot be used for positioned updates or deletes. This + * is the default unless SQL_ATTR_FOR_FETCH_ONLY + * environment has been set to SQL_FALSE. + * + * + * DB2_I5_FETCH_OFF - Cursors can be used + * for positioned updates and deletes. + * + * + * + * + * + * DB2_I5_FETCH_ON - Cursors are read-only + * and cannot be used for positioned updates or deletes. This + * is the default unless SQL_ATTR_FOR_FETCH_ONLY + * environment has been set to SQL_FALSE. + * + * DB2_I5_FETCH_OFF - Cursors can be used + * for positioned updates and deletes. + * + * The following new option is available in ibm_db2 version 1.8.0 and later. + * + * + * rowcount + * + * + * DB2_ROWCOUNT_PREFETCH_ON - Client can request + * the full row count prior to fetching, which means that + * db2_num_rows returns the number of rows selected + * even when a ROLLFORWARD_ONLY cursor is used. + * + * + * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request + * the full row count prior to fetching. + * + * + * + * + * + * DB2_ROWCOUNT_PREFETCH_ON - Client can request + * the full row count prior to fetching, which means that + * db2_num_rows returns the number of rows selected + * even when a ROLLFORWARD_ONLY cursor is used. + * + * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request + * the full row count prior to fetching. + * + * The following new options are available in ibm_db2 version 1.7.0 and later. + * + * + * trusted_user + * + * + * To switch the user to a trusted user, pass the User ID (String) + * of the trusted user as the value of this key. This option can + * be set on a connection resource only. To use this option, trusted + * context must be enabled on the connection resource. + * + * + * + * + * trusted_password + * + * + * The password (String) that corresponds to the user specified + * by the trusted_user key. + * + * + * + * + * + * To switch the user to a trusted user, pass the User ID (String) + * of the trusted user as the value of this key. This option can + * be set on a connection resource only. To use this option, trusted + * context must be enabled on the connection resource. + * + * The password (String) that corresponds to the user specified + * by the trusted_user key. + * + * The following new options are available in ibm_db2 version 1.6.0 and later. + * These options provide useful tracking information that can be accessed during + * execution with db2_get_option. + * + * + * When the value in each option is being set, some servers might not handle + * the entire length provided and might truncate the value. + * + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, + * 0 through 9, and the underscore (_) or period (.). + * + * + * + * + * userid + * + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host + * database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for + * identification purposes only and is not used for any authorization. + * + * + * + * + * + * + * acctstr + * + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. + * + * + * + * + * + * + * applname + * + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. + * + * + * + * + * + * + * wrkstnname + * + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. + * + * + * + * + * + * + * + * When the value in each option is being set, some servers might not handle + * the entire length provided and might truncate the value. + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, + * 0 through 9, and the underscore (_) or period (.). + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host + * database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for + * identification purposes only and is not used for any authorization. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for + * identification purposes only and is not used for any authorization. + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the + * host database server when using DB2 Connect. + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. + * @param int $type Passing DB2_AUTOCOMMIT_ON turns + * autocommit on for the specified connection resource. + * + * Passing DB2_AUTOCOMMIT_OFF turns + * autocommit off for the specified connection resource. + * @throws IbmDb2Exception + * + */ +function db2_set_option($resource, array $options, int $type): void +{ + error_clear_last(); + $result = \db2_set_option($resource, $options, $type); + if ($result === false) { + throw IbmDb2Exception::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/iconv.php b/vendor/thecodingmachine/safe/generated/iconv.php new file mode 100644 index 000000000..44cf96ab8 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/iconv.php @@ -0,0 +1,96 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\IconvException; + +/** + * Retrieve internal configuration variables of iconv extension. + * + * @param string $type The value of the optional type can be: + * + * all + * input_encoding + * output_encoding + * internal_encoding + * + * @return mixed Returns the current value of the internal configuration variable if + * successful. + * + * If type is omitted or set to "all", + * iconv_get_encoding returns an array that + * stores all these variables. + * @throws IconvException + * + */ +function iconv_get_encoding(string $type = "all") +{ + error_clear_last(); + $result = \iconv_get_encoding($type); + if ($result === false) { + throw IconvException::createFromPhpError(); + } + return $result; +} + + +/** + * Changes the value of the internal configuration variable specified by + * type to charset. + * + * @param string $type The value of type can be any one of these: + * + * input_encoding + * output_encoding + * internal_encoding + * + * @param string $charset The character set. + * @throws IconvException + * + */ +function iconv_set_encoding(string $type, string $charset): void +{ + error_clear_last(); + $result = \iconv_set_encoding($type, $charset); + if ($result === false) { + throw IconvException::createFromPhpError(); + } +} + + +/** + * Performs a character set conversion on the string + * str from in_charset + * to out_charset. + * + * @param string $in_charset The input charset. + * @param string $out_charset The output charset. + * + * If you append the string //TRANSLIT to + * out_charset transliteration is activated. This + * means that when a character can't be represented in the target charset, + * it can be approximated through one or several similarly looking + * characters. If you append the string //IGNORE, + * characters that cannot be represented in the target charset are silently + * discarded. Otherwise, E_NOTICE is generated and the function + * will return FALSE. + * + * If and how //TRANSLIT works exactly depends on the + * system's iconv() implementation (cf. ICONV_IMPL). + * Some implementations are known to ignore //TRANSLIT, + * so the conversion is likely to fail for characters which are illegal for + * the out_charset. + * @param string $str The string to be converted. + * @return string Returns the converted string. + * @throws IconvException + * + */ +function iconv(string $in_charset, string $out_charset, string $str): string +{ + error_clear_last(); + $result = \iconv($in_charset, $out_charset, $str); + if ($result === false) { + throw IconvException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/image.php b/vendor/thecodingmachine/safe/generated/image.php new file mode 100644 index 000000000..f1dc2183c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/image.php @@ -0,0 +1,2704 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ImageException; + +/** + * The getimagesize function will determine the + * size of any supported given image file and return the dimensions along with + * the file type and a height/width text string to be used inside a + * normal HTML IMG tag and the + * correspondent HTTP content type. + * + * getimagesize can also return some more information + * in imageinfo parameter. + * + * @param string $filename This parameter specifies the file you wish to retrieve information + * about. It can reference a local file or (configuration permitting) a + * remote file using one of the supported streams. + * @param array $imageinfo This optional parameter allows you to extract some extended + * information from the image file. Currently, this will return the + * different JPG APP markers as an associative array. + * Some programs use these APP markers to embed text information in + * images. A very common one is to embed + * IPTC information in the APP13 marker. + * You can use the iptcparse function to parse the + * binary APP13 marker into something readable. + * + * The imageinfo only supports + * JFIF files. + * @return array Returns an array with up to 7 elements. Not all image types will include + * the channels and bits elements. + * + * Index 0 and 1 contains respectively the width and the height of the image. + * + * Index 2 is one of the IMAGETYPE_XXX constants indicating + * the type of the image. + * + * Index 3 is a text string with the correct + * height="yyy" width="xxx" string that can be used + * directly in an IMG tag. + * + * mime is the correspondant MIME type of the image. + * This information can be used to deliver images with the correct HTTP + * Content-type header: + * + * getimagesize and MIME types + * + * + * ]]> + * + * + * + * channels will be 3 for RGB pictures and 4 for CMYK + * pictures. + * + * bits is the number of bits for each color. + * + * For some image types, the presence of channels and + * bits values can be a bit + * confusing. As an example, GIF always uses 3 channels + * per pixel, but the number of bits per pixel cannot be calculated for an + * animated GIF with a global color table. + * + * On failure, FALSE is returned. + * @throws ImageException + * + */ +function getimagesize(string $filename, array &$imageinfo = null): array +{ + error_clear_last(); + $result = \getimagesize($filename, $imageinfo); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * image2wbmp outputs or save a WBMP + * version of the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param string|null $filename Path to the saved file. If not given, the raw image stream will be + * output directly. + * @param int $foreground You can set the foreground color with this parameter by setting an + * identifier obtained from imagecolorallocate. + * The default foreground color is black. + * @throws ImageException + * + */ +function image2wbmp($image, ?string $filename = null, int $foreground = null): void +{ + error_clear_last(); + if ($foreground !== null) { + $result = \image2wbmp($image, $filename, $foreground); + } elseif ($filename !== null) { + $result = \image2wbmp($image, $filename); + } else { + $result = \image2wbmp($image); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $affine Array with keys 0 to 5. + * @param array $clip Array with keys "x", "y", "width" and "height". + * @return resource Return affined image resource on success. + * @throws ImageException + * + */ +function imageaffine($image, array $affine, array $clip = null) +{ + error_clear_last(); + if ($clip !== null) { + $result = \imageaffine($image, $affine, $clip); + } else { + $result = \imageaffine($image, $affine); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the concatenation of two affine transformation matrices, + * what is useful if multiple transformations should be applied to the same + * image in one go. + * + * @param array $m1 An affine transformation matrix (an array with keys + * 0 to 5 and float values). + * @param array $m2 An affine transformation matrix (an array with keys + * 0 to 5 and float values). + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys + * 0 to 5 and float values). + * @throws ImageException + * + */ +function imageaffinematrixconcat(array $m1, array $m2): array +{ + error_clear_last(); + $result = \imageaffinematrixconcat($m1, $m2); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns an affine transformation matrix. + * + * @param int $type One of the IMG_AFFINE_* constants. + * @param array|float $options If type is IMG_AFFINE_TRANSLATE + * or IMG_AFFINE_SCALE, + * options has to be an array with keys x + * and y, both having float values. + * + * If type is IMG_AFFINE_ROTATE, + * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, + * options has to be a float specifying the angle. + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys + * 0 to 5 and float values). + * @throws ImageException + * + */ +function imageaffinematrixget(int $type, $options = null): array +{ + error_clear_last(); + if ($options !== null) { + $result = \imageaffinematrixget($type, $options); + } else { + $result = \imageaffinematrixget($type); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagealphablending allows for two different + * modes of drawing on truecolor images. In blending mode, the + * alpha channel component of the color supplied to all drawing function, + * such as imagesetpixel determines how much of the + * underlying color should be allowed to shine through. As a result, gd + * automatically blends the existing color at that point with the drawing color, + * and stores the result in the image. The resulting pixel is opaque. In + * non-blending mode, the drawing color is copied literally with its alpha channel + * information, replacing the destination pixel. Blending mode is not available + * when drawing on palette images. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param bool $blendmode Whether to enable the blending mode or not. On true color images + * the default value is TRUE otherwise the default value is FALSE + * @throws ImageException + * + */ +function imagealphablending($image, bool $blendmode): void +{ + error_clear_last(); + $result = \imagealphablending($image, $blendmode); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Activate the fast drawing antialiased methods for lines and wired polygons. + * It does not support alpha components. It works using a direct blend + * operation. It works only with truecolor images. + * + * Thickness and styled are not supported. + * + * Using antialiased primitives with transparent background color can end with + * some unexpected results. The blend method uses the background color as any + * other colors. The lack of alpha component support does not allow an alpha + * based antialiasing method. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param bool $enabled Whether to enable antialiasing or not. + * @throws ImageException + * + */ +function imageantialias($image, bool $enabled): void +{ + error_clear_last(); + $result = \imageantialias($image, $enabled); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagearc draws an arc of circle centered at the given + * coordinates. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $cx x-coordinate of the center. + * @param int $cy y-coordinate of the center. + * @param int $width The arc width. + * @param int $height The arc height. + * @param int $start The arc start angle, in degrees. + * @param int $end The arc end angle, in degrees. + * 0° is located at the three-o'clock position, and the arc is drawn + * clockwise. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagearc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color): void +{ + error_clear_last(); + $result = \imagearc($image, $cx, $cy, $width, $height, $start, $end, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs or saves a BMP version of the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * + * NULL is invalid if the compressed arguments is + * not used. + * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. + * @throws ImageException + * + */ +function imagebmp($image, $to = null, bool $compressed = true): void +{ + error_clear_last(); + $result = \imagebmp($image, $to, $compressed); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagechar draws the first character of + * c in the image identified by + * image with its upper-left at + * x,y (top left is 0, + * 0) with the color color. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $font Can be 1, 2, 3, 4, 5 for built-in + * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your + * own font identifiers registered with imageloadfont. + * @param int $x x-coordinate of the start. + * @param int $y y-coordinate of the start. + * @param string $c The character to draw. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagechar($image, int $font, int $x, int $y, string $c, int $color): void +{ + error_clear_last(); + $result = \imagechar($image, $font, $x, $y, $c, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws the character c vertically at the specified + * coordinate on the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $font Can be 1, 2, 3, 4, 5 for built-in + * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your + * own font identifiers registered with imageloadfont. + * @param int $x x-coordinate of the start. + * @param int $y y-coordinate of the start. + * @param string $c The character to draw. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagecharup($image, int $font, int $x, int $y, string $c, int $color): void +{ + error_clear_last(); + $result = \imagecharup($image, $font, $x, $y, $c, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Returns the index of the color of the pixel at the + * specified location in the image specified by image. + * + * If the image is a + * truecolor image, this function returns the RGB value of that pixel as + * integer. Use bitshifting and masking to access the distinct red, green and blue + * component values: + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x x-coordinate of the point. + * @param int $y y-coordinate of the point. + * @return int Returns the index of the color. + * @throws ImageException + * + */ +function imagecolorat($image, int $x, int $y): int +{ + error_clear_last(); + $result = \imagecolorat($image, $x, $y); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * De-allocates a color previously allocated with + * imagecolorallocate or + * imagecolorallocatealpha. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $color The color identifier. + * @throws ImageException + * + */ +function imagecolordeallocate($image, int $color): void +{ + error_clear_last(); + $result = \imagecolordeallocate($image, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Makes the colors of the palette version of an image more closely match the true color version. + * + * @param resource $image1 A truecolor image resource. + * @param resource $image2 A palette image resource pointing to an image that has the same + * size as image1. + * @throws ImageException + * + */ +function imagecolormatch($image1, $image2): void +{ + error_clear_last(); + $result = \imagecolormatch($image1, $image2); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Applies a convolution matrix on the image, using the given coefficient and + * offset. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. + * @param float $div The divisor of the result of the convolution, used for normalization. + * @param float $offset Color offset. + * @throws ImageException + * + */ +function imageconvolution($image, array $matrix, float $div, float $offset): void +{ + error_clear_last(); + $result = \imageconvolution($image, $matrix, $div, $offset); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Copy a part of src_im onto + * dst_im starting at the x,y coordinates + * src_x, src_y with + * a width of src_w and a height of + * src_h. The portion defined will be copied + * onto the x,y coordinates, dst_x and + * dst_y. + * + * @param resource $dst_im Destination image resource. + * @param resource $src_im Source image resource. + * @param int $dst_x x-coordinate of destination point. + * @param int $dst_y y-coordinate of destination point. + * @param int $src_x x-coordinate of source point. + * @param int $src_y y-coordinate of source point. + * @param int $src_w Source width. + * @param int $src_h Source height. + * @throws ImageException + * + */ +function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): void +{ + error_clear_last(); + $result = \imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Copy a part of src_im onto + * dst_im starting at the x,y coordinates + * src_x, src_y with + * a width of src_w and a height of + * src_h. The portion defined will be copied + * onto the x,y coordinates, dst_x and + * dst_y. + * + * @param resource $dst_im Destination image resource. + * @param resource $src_im Source image resource. + * @param int $dst_x x-coordinate of destination point. + * @param int $dst_y y-coordinate of destination point. + * @param int $src_x x-coordinate of source point. + * @param int $src_y y-coordinate of source point. + * @param int $src_w Source width. + * @param int $src_h Source height. + * @param int $pct The two images will be merged according to pct + * which can range from 0 to 100. When pct = 0, + * no action is taken, when 100 this function behaves identically + * to imagecopy for pallete images, except for + * ignoring alpha components, while it implements alpha transparency + * for true colour images. + * @throws ImageException + * + */ +function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void +{ + error_clear_last(); + $result = \imagecopymerge($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagecopymergegray copy a part of src_im onto + * dst_im starting at the x,y coordinates + * src_x, src_y with + * a width of src_w and a height of + * src_h. The portion defined will be copied + * onto the x,y coordinates, dst_x and + * dst_y. + * + * This function is identical to imagecopymerge except + * that when merging it preserves the hue of the source by converting + * the destination pixels to gray scale before the copy operation. + * + * @param resource $dst_im Destination image resource. + * @param resource $src_im Source image resource. + * @param int $dst_x x-coordinate of destination point. + * @param int $dst_y y-coordinate of destination point. + * @param int $src_x x-coordinate of source point. + * @param int $src_y y-coordinate of source point. + * @param int $src_w Source width. + * @param int $src_h Source height. + * @param int $pct The src_im will be changed to grayscale according + * to pct where 0 is fully grayscale and 100 is + * unchanged. When pct = 100 this function behaves + * identically to imagecopy for pallete images, except for + * ignoring alpha components, while + * it implements alpha transparency for true colour images. + * @throws ImageException + * + */ +function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void +{ + error_clear_last(); + $result = \imagecopymergegray($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagecopyresampled copies a rectangular + * portion of one image to another image, smoothly interpolating pixel + * values so that, in particular, reducing the size of an image still + * retains a great deal of clarity. + * + * In other words, imagecopyresampled will take a + * rectangular area from src_image of width + * src_w and height src_h at + * position (src_x,src_y) + * and place it in a rectangular area of dst_image + * of width dst_w and height dst_h + * at position (dst_x,dst_y). + * + * If the source and destination coordinates and width and heights + * differ, appropriate stretching or shrinking of the image fragment + * will be performed. The coordinates refer to the upper left + * corner. This function can be used to copy regions within the + * same image (if dst_image is the same as + * src_image) but if the regions overlap the + * results will be unpredictable. + * + * @param resource $dst_image Destination image resource. + * @param resource $src_image Source image resource. + * @param int $dst_x x-coordinate of destination point. + * @param int $dst_y y-coordinate of destination point. + * @param int $src_x x-coordinate of source point. + * @param int $src_y y-coordinate of source point. + * @param int $dst_w Destination width. + * @param int $dst_h Destination height. + * @param int $src_w Source width. + * @param int $src_h Source height. + * @throws ImageException + * + */ +function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void +{ + error_clear_last(); + $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagecopyresized copies a rectangular + * portion of one image to another image. + * dst_image is the destination image, + * src_image is the source image identifier. + * + * In other words, imagecopyresized will take a + * rectangular area from src_image of width + * src_w and height src_h at + * position (src_x,src_y) + * and place it in a rectangular area of dst_image + * of width dst_w and height dst_h + * at position (dst_x,dst_y). + * + * If the source and destination coordinates and width and heights + * differ, appropriate stretching or shrinking of the image fragment + * will be performed. The coordinates refer to the upper left + * corner. This function can be used to copy regions within the + * same image (if dst_image is the same as + * src_image) but if the regions overlap the + * results will be unpredictable. + * + * @param resource $dst_image Destination image resource. + * @param resource $src_image Source image resource. + * @param int $dst_x x-coordinate of destination point. + * @param int $dst_y y-coordinate of destination point. + * @param int $src_x x-coordinate of source point. + * @param int $src_y y-coordinate of source point. + * @param int $dst_w Destination width. + * @param int $dst_h Destination height. + * @param int $src_w Source width. + * @param int $src_h Source height. + * @throws ImageException + * + */ +function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void +{ + error_clear_last(); + $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagecreate returns an image identifier + * representing a blank image of specified size. + * + * In general, we recommend the use of + * imagecreatetruecolor instead of + * imagecreate so that image processing occurs on the + * highest quality image possible. If you want to output a palette image, then + * imagetruecolortopalette should be called immediately + * before saving the image with imagepng or + * imagegif. + * + * @param int $width The image width. + * @param int $height The image height. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreate(int $width, int $height) +{ + error_clear_last(); + $result = \imagecreate($width, $height); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefrombmp returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the BMP image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefrombmp(string $filename) +{ + error_clear_last(); + $result = \imagecreatefrombmp($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Create a new image from GD file or URL. + * + * @param string $filename Path to the GD file. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromgd(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromgd($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Create a new image from GD2 file or URL. + * + * @param string $filename Path to the GD2 image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromgd2(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromgd2($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Create a new image from a given part of GD2 file or URL. + * + * @param string $filename Path to the GD2 image. + * @param int $srcX x-coordinate of source point. + * @param int $srcY y-coordinate of source point. + * @param int $width Source width. + * @param int $height Source height. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromgd2part(string $filename, int $srcX, int $srcY, int $width, int $height) +{ + error_clear_last(); + $result = \imagecreatefromgd2part($filename, $srcX, $srcY, $width, $height); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefromgif returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the GIF image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromgif(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromgif($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefromjpeg returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the JPEG image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromjpeg(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromjpeg($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefrompng returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the PNG image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefrompng(string $filename) +{ + error_clear_last(); + $result = \imagecreatefrompng($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefromwbmp returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the WBMP image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromwbmp(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromwbmp($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefromwebp returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the WebP image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromwebp(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromwebp($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefromxbm returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the XBM image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromxbm(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromxbm($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatefromxpm returns an image identifier + * representing the image obtained from the given filename. + * + * @param string $filename Path to the XPM image. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatefromxpm(string $filename) +{ + error_clear_last(); + $result = \imagecreatefromxpm($filename); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagecreatetruecolor returns an image identifier + * representing a black image of the specified size. + * + * @param int $width Image width. + * @param int $height Image height. + * @return resource Returns an image resource identifier on success, FALSE on errors. + * @throws ImageException + * + */ +function imagecreatetruecolor(int $width, int $height) +{ + error_clear_last(); + $result = \imagecreatetruecolor($width, $height); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Crops an image to the given rectangular area and returns the resulting image. + * The given image is not modified. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $rect The cropping rectangle as array with keys + * x, y, width and + * height. + * @return resource Return cropped image resource on success. + * @throws ImageException + * + */ +function imagecrop($image, array $rect) +{ + error_clear_last(); + $result = \imagecrop($image, $rect); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Automatically crops an image according to the given + * mode. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $mode One of the following constants: + * @param float $threshold + * @param int $color + * @return resource Returns a cropped image resource on success. + * If the complete image was cropped, imagecrop returns FALSE. + * @throws ImageException + * + */ +function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = .5, int $color = -1) +{ + error_clear_last(); + $result = \imagecropauto($image, $mode, $threshold, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is deprecated. Use combination of + * imagesetstyle and imageline + * instead. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x1 Upper left x coordinate. + * @param int $y1 Upper left y coordinate 0, 0 is the top left corner of the image. + * @param int $x2 Bottom right x coordinate. + * @param int $y2 Bottom right y coordinate. + * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color): void +{ + error_clear_last(); + $result = \imagedashedline($image, $x1, $y1, $x2, $y2, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagedestroy frees any memory associated + * with image image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @throws ImageException + * + */ +function imagedestroy($image): void +{ + error_clear_last(); + $result = \imagedestroy($image); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws an ellipse centered at the specified coordinates. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $cx x-coordinate of the center. + * @param int $cy y-coordinate of the center. + * @param int $width The ellipse width. + * @param int $height The ellipse height. + * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imageellipse($image, int $cx, int $cy, int $width, int $height, int $color): void +{ + error_clear_last(); + $result = \imageellipse($image, $cx, $cy, $width, $height, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Performs a flood fill starting at the given coordinate (top left is 0, 0) + * with the given color in the + * image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x x-coordinate of start point. + * @param int $y y-coordinate of start point. + * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagefill($image, int $x, int $y, int $color): void +{ + error_clear_last(); + $result = \imagefill($image, $x, $y, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws a partial arc centered at the specified coordinate in the + * given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $cx x-coordinate of the center. + * @param int $cy y-coordinate of the center. + * @param int $width The arc width. + * @param int $height The arc height. + * @param int $start The arc start angle, in degrees. + * @param int $end The arc end angle, in degrees. + * 0° is located at the three-o'clock position, and the arc is drawn + * clockwise. + * @param int $color A color identifier created with imagecolorallocate. + * @param int $style A bitwise OR of the following possibilities: + * + * IMG_ARC_PIE + * IMG_ARC_CHORD + * IMG_ARC_NOFILL + * IMG_ARC_EDGED + * + * IMG_ARC_PIE and IMG_ARC_CHORD are + * mutually exclusive; IMG_ARC_CHORD just + * connects the starting and ending angles with a straight line, while + * IMG_ARC_PIE produces a rounded edge. + * IMG_ARC_NOFILL indicates that the arc + * or chord should be outlined, not filled. IMG_ARC_EDGED, + * used together with IMG_ARC_NOFILL, indicates that the + * beginning and ending angles should be connected to the center - this is a + * good way to outline (rather than fill) a 'pie slice'. + * @throws ImageException + * + */ +function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style): void +{ + error_clear_last(); + $result = \imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws an ellipse centered at the specified coordinate on the given + * image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $cx x-coordinate of the center. + * @param int $cy y-coordinate of the center. + * @param int $width The ellipse width. + * @param int $height The ellipse height. + * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, int $color): void +{ + error_clear_last(); + $result = \imagefilledellipse($image, $cx, $cy, $width, $height, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagefilledpolygon creates a filled polygon + * in the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $points An array containing the x and y + * coordinates of the polygons vertices consecutively. + * @param int $num_points Total number of points (vertices), which must be at least 3. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagefilledpolygon($image, array $points, int $num_points, int $color): void +{ + error_clear_last(); + $result = \imagefilledpolygon($image, $points, $num_points, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Creates a rectangle filled with color in the given + * image starting at point 1 and ending at point 2. + * 0, 0 is the top left corner of the image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x1 x-coordinate for point 1. + * @param int $y1 y-coordinate for point 1. + * @param int $x2 x-coordinate for point 2. + * @param int $y2 y-coordinate for point 2. + * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void +{ + error_clear_last(); + $result = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagefilltoborder performs a flood fill + * whose border color is defined by border. + * The starting point for the fill is x, + * y (top left is 0, 0) and the region is + * filled with color color. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x x-coordinate of start. + * @param int $y y-coordinate of start. + * @param int $border The border color. A color identifier created with imagecolorallocate. + * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagefilltoborder($image, int $x, int $y, int $border, int $color): void +{ + error_clear_last(); + $result = \imagefilltoborder($image, $x, $y, $border, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagefilter applies the given filter + * filtertype on the image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $filtertype filtertype can be one of the following: + * + * + * + * IMG_FILTER_NEGATE: Reverses all colors of + * the image. + * + * + * + * + * IMG_FILTER_GRAYSCALE: Converts the image into + * grayscale by changing the red, green and blue components to their + * weighted sum using the same coefficients as the REC.601 luma (Y') + * calculation. The alpha components are retained. For palette images the + * result may differ due to palette limitations. + * + * + * + * + * IMG_FILTER_BRIGHTNESS: Changes the brightness + * of the image. Use arg1 to set the level of + * brightness. The range for the brightness is -255 to 255. + * + * + * + * + * IMG_FILTER_CONTRAST: Changes the contrast of + * the image. Use arg1 to set the level of + * contrast. + * + * + * + * + * IMG_FILTER_COLORIZE: Like + * IMG_FILTER_GRAYSCALE, except you can specify the + * color. Use arg1, arg2 and + * arg3 in the form of + * red, green, + * blue and arg4 for the + * alpha channel. The range for each color is 0 to 255. + * + * + * + * + * IMG_FILTER_EDGEDETECT: Uses edge detection to + * highlight the edges in the image. + * + * + * + * + * IMG_FILTER_EMBOSS: Embosses the image. + * + * + * + * + * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using + * the Gaussian method. + * + * + * + * + * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. + * + * + * + * + * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to + * achieve a "sketchy" effect. + * + * + * + * + * IMG_FILTER_SMOOTH: Makes the image smoother. + * Use arg1 to set the level of smoothness. + * + * + * + * + * IMG_FILTER_PIXELATE: Applies pixelation effect + * to the image, use arg1 to set the block size + * and arg2 to set the pixelation effect mode. + * + * + * + * + * IMG_FILTER_SCATTER: Applies scatter effect + * to the image, use arg1 and + * arg2 to define the effect strength and + * additionally arg3 to only apply the + * on select pixel colors. + * + * + * + * @param int $arg1 + * + * + * IMG_FILTER_BRIGHTNESS: Brightness level. + * + * + * + * + * IMG_FILTER_CONTRAST: Contrast level. + * + * + * + * + * IMG_FILTER_COLORIZE: Value of red component. + * + * + * + * + * IMG_FILTER_SMOOTH: Smoothness level. + * + * + * + * + * IMG_FILTER_PIXELATE: Block size in pixels. + * + * + * + * + * IMG_FILTER_SCATTER: Effect substraction level. + * This must not be higher or equal to the addition level set with + * arg2. + * + * + * + * @param int $arg2 + * + * + * IMG_FILTER_COLORIZE: Value of green component. + * + * + * + * + * IMG_FILTER_PIXELATE: Whether to use advanced pixelation + * effect or not (defaults to FALSE). + * + * + * + * + * IMG_FILTER_SCATTER: Effect addition level. + * + * + * + * @param int $arg3 + * + * + * IMG_FILTER_COLORIZE: Value of blue component. + * + * + * + * + * IMG_FILTER_SCATTER: Optional array indexed color values + * to apply effect at. + * + * + * + * @param int $arg4 + * + * + * IMG_FILTER_COLORIZE: Alpha channel, A value + * between 0 and 127. 0 indicates completely opaque while 127 indicates + * completely transparent. + * + * + * + * @throws ImageException + * + */ +function imagefilter($image, int $filtertype, int $arg1 = null, int $arg2 = null, int $arg3 = null, int $arg4 = null): void +{ + error_clear_last(); + if ($arg4 !== null) { + $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3, $arg4); + } elseif ($arg3 !== null) { + $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3); + } elseif ($arg2 !== null) { + $result = \imagefilter($image, $filtertype, $arg1, $arg2); + } elseif ($arg1 !== null) { + $result = \imagefilter($image, $filtertype, $arg1); + } else { + $result = \imagefilter($image, $filtertype); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Flips the image image using the given + * mode. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: + * + * + * + * + * + * Constant + * Meaning + * + * + * + * + * IMG_FLIP_HORIZONTAL + * + * Flips the image horizontally. + * + * + * + * IMG_FLIP_VERTICAL + * + * Flips the image vertically. + * + * + * + * IMG_FLIP_BOTH + * + * Flips the image both horizontally and vertically. + * + * + * + * + * + * @throws ImageException + * + */ +function imageflip($image, int $mode): void +{ + error_clear_last(); + $result = \imageflip($image, $mode); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Applies gamma correction to the given gd image + * given an input and an output gamma. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param float $inputgamma The input gamma. + * @param float $outputgamma The output gamma. + * @throws ImageException + * + */ +function imagegammacorrect($image, float $inputgamma, float $outputgamma): void +{ + error_clear_last(); + $result = \imagegammacorrect($image, $inputgamma, $outputgamma); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs a GD image to the given to. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @throws ImageException + * + */ +function imagegd($image, $to = null): void +{ + error_clear_last(); + $result = \imagegd($image, $to); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs a GD2 image to the given to. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @param int $chunk_size Chunk size. + * @param int $type Either IMG_GD2_RAW or + * IMG_GD2_COMPRESSED. Default is + * IMG_GD2_RAW. + * @throws ImageException + * + */ +function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2_RAW): void +{ + error_clear_last(); + $result = \imagegd2($image, $to, $chunk_size, $type); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagegif creates the GIF + * file in to from the image image. The + * image argument is the return from the + * imagecreate or imagecreatefrom* + * function. + * + * The image format will be GIF87a unless the + * image has been made transparent with + * imagecolortransparent, in which case the + * image format will be GIF89a. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @throws ImageException + * + */ +function imagegif($image, $to = null): void +{ + error_clear_last(); + $result = \imagegif($image, $to); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Grabs a screenshot of the whole screen. + * + * @return resource Returns an image resource identifier on success, FALSE on failure. + * @throws ImageException + * + */ +function imagegrabscreen() +{ + error_clear_last(); + $result = \imagegrabscreen(); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Grabs a window or its client area using a windows handle (HWND property in COM instance) + * + * @param int $window_handle The HWND window ID. + * @param int $client_area Include the client area of the application window. + * @return resource Returns an image resource identifier on success, FALSE on failure. + * @throws ImageException + * + */ +function imagegrabwindow(int $window_handle, int $client_area = 0) +{ + error_clear_last(); + $result = \imagegrabwindow($window_handle, $client_area); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagejpeg creates a JPEG file from + * the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @param int $quality quality is optional, and ranges from 0 (worst + * quality, smaller file) to 100 (best quality, biggest file). The + * default (-1) uses the default IJG quality value (about 75). + * @throws ImageException + * + */ +function imagejpeg($image, $to = null, int $quality = -1): void +{ + error_clear_last(); + $result = \imagejpeg($image, $to, $quality); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Set the alpha blending flag to use layering effects. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $effect One of the following constants: + * + * + * IMG_EFFECT_REPLACE + * + * + * Use pixel replacement (equivalent of passing TRUE to + * imagealphablending) + * + * + * + * + * IMG_EFFECT_ALPHABLEND + * + * + * Use normal pixel blending (equivalent of passing FALSE to + * imagealphablending) + * + * + * + * + * IMG_EFFECT_NORMAL + * + * + * Same as IMG_EFFECT_ALPHABLEND. + * + * + * + * + * IMG_EFFECT_OVERLAY + * + * + * Overlay has the effect that black background pixels will remain + * black, white background pixels will remain white, but grey + * background pixels will take the colour of the foreground pixel. + * + * + * + * + * IMG_EFFECT_MULTIPLY + * + * + * Overlays with a multiply effect. + * + * + * + * + * @throws ImageException + * + */ +function imagelayereffect($image, int $effect): void +{ + error_clear_last(); + $result = \imagelayereffect($image, $effect); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws a line between the two given points. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x1 x-coordinate for first point. + * @param int $y1 y-coordinate for first point. + * @param int $x2 x-coordinate for second point. + * @param int $y2 y-coordinate for second point. + * @param int $color The line color. A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void +{ + error_clear_last(); + $result = \imageline($image, $x1, $y1, $x2, $y2, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imageloadfont loads a user-defined bitmap and returns + * its identifier. + * + * @param string $file The font file format is currently binary and architecture + * dependent. This means you should generate the font files on the + * same type of CPU as the machine you are running PHP on. + * + * + * Font file format + * + * + * + * byte position + * C data type + * description + * + * + * + * + * byte 0-3 + * int + * number of characters in the font + * + * + * byte 4-7 + * int + * + * value of first character in the font (often 32 for space) + * + * + * + * byte 8-11 + * int + * pixel width of each character + * + * + * byte 12-15 + * int + * pixel height of each character + * + * + * byte 16- + * char + * + * array with character data, one byte per pixel in each + * character, for a total of (nchars*width*height) bytes. + * + * + * + * + * + * @return int The font identifier which is always bigger than 5 to avoid conflicts with + * built-in fontss. + * @throws ImageException + * + */ +function imageloadfont(string $file): int +{ + error_clear_last(); + $result = \imageloadfont($file); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imageopenpolygon draws an open polygon on the given + * image. Contrary to imagepolygon, + * no line is drawn between the last and the first point. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $points An array containing the polygon's vertices, e.g.: + * + * + * + * + * points[0] + * = x0 + * + * + * points[1] + * = y0 + * + * + * points[2] + * = x1 + * + * + * points[3] + * = y1 + * + * + * + * + * @param int $num_points Total number of points (vertices), which must be at least 3. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imageopenpolygon($image, array $points, int $num_points, int $color): void +{ + error_clear_last(); + $result = \imageopenpolygon($image, $points, $num_points, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs or saves a PNG image from the given + * image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * + * NULL is invalid if the quality and + * filters arguments are not used. + * @param int $quality Compression level: from 0 (no compression) to 9. + * The default (-1) uses the zlib compression default. + * For more information see the zlib manual. + * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be + * set to any combination of the PNG_FILTER_XXX + * constants. PNG_NO_FILTER or + * PNG_ALL_FILTERS may also be used to respectively + * disable or activate all filters. + * The default value (-1) disables filtering. + * @throws ImageException + * + */ +function imagepng($image, $to = null, int $quality = -1, int $filters = -1): void +{ + error_clear_last(); + $result = \imagepng($image, $to, $quality, $filters); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagepolygon creates a polygon in the given + * image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $points An array containing the polygon's vertices, e.g.: + * + * + * + * + * points[0] + * = x0 + * + * + * points[1] + * = y0 + * + * + * points[2] + * = x1 + * + * + * points[3] + * = y1 + * + * + * + * + * @param int $num_points Total number of points (vertices), which must be at least 3. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagepolygon($image, array $points, int $num_points, int $color): void +{ + error_clear_last(); + $result = \imagepolygon($image, $points, $num_points, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagerectangle creates a rectangle starting at + * the specified coordinates. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x1 Upper left x coordinate. + * @param int $y1 Upper left y coordinate + * 0, 0 is the top left corner of the image. + * @param int $x2 Bottom right x coordinate. + * @param int $y2 Bottom right y coordinate. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void +{ + error_clear_last(); + $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Rotates the image image using the given + * angle in degrees. + * + * The center of rotation is the center of the image, and the rotated + * image may have different dimensions than the original image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the + * number of degrees to rotate the image anticlockwise. + * @param int $bgd_color Specifies the color of the uncovered zone after the rotation + * @param int $dummy This parameter is unused. + * @return resource Returns an image resource for the rotated image. + * @throws ImageException + * + */ +function imagerotate($image, float $angle, int $bgd_color, int $dummy = 0) +{ + error_clear_last(); + $result = \imagerotate($image, $angle, $bgd_color, $dummy); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagesavealpha sets the flag which determines whether to retain + * full alpha channel information (as opposed to single-color transparency) + * when saving PNG images. + * + * Alphablending has to be disabled (imagealphablending($im, false)) + * to retain the alpha-channel in the first place. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param bool $saveflag Whether to save the alpha channel or not. Defaults to FALSE. + * @throws ImageException + * + */ +function imagesavealpha($image, bool $saveflag): void +{ + error_clear_last(); + $result = \imagesavealpha($image, $saveflag); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagescale scales an image using the given + * interpolation algorithm. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $new_width The width to scale the image to. + * @param int $new_height The height to scale the image to. If omitted or negative, the aspect + * ratio will be preserved. + * @param int $mode One of IMG_NEAREST_NEIGHBOUR, + * IMG_BILINEAR_FIXED, + * IMG_BICUBIC, + * IMG_BICUBIC_FIXED or anything else (will use two + * pass). + * + * + * IMG_WEIGHTED4 is not yet supported. + * + * + * @return resource Return the scaled image resource on success. + * @throws ImageException + * + */ +function imagescale($image, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED) +{ + error_clear_last(); + $result = \imagescale($image, $new_width, $new_height, $mode); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagesetbrush sets the brush image to be + * used by all line drawing functions (such as imageline + * and imagepolygon) when drawing with the special + * colors IMG_COLOR_BRUSHED or + * IMG_COLOR_STYLEDBRUSHED. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param resource $brush An image resource. + * @throws ImageException + * + */ +function imagesetbrush($image, $brush): void +{ + error_clear_last(); + $result = \imagesetbrush($image, $brush); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagesetclip sets the current clipping rectangle, i.e. + * the area beyond which no pixels will be drawn. + * + * @param resource $im An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x1 The x-coordinate of the upper left corner. + * @param int $y1 The y-coordinate of the upper left corner. + * @param int $x2 The x-coordinate of the lower right corner. + * @param int $y2 The y-coordinate of the lower right corner. + * @throws ImageException + * + */ +function imagesetclip($im, int $x1, int $y1, int $x2, int $y2): void +{ + error_clear_last(); + $result = \imagesetclip($im, $x1, $y1, $x2, $y2); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Sets the interpolation method, setting an interpolation method affects the rendering + * of various functions in GD, such as the imagerotate function. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $method The interpolation method, which can be one of the following: + * + * + * + * IMG_BELL: Bell filter. + * + * + * + * + * IMG_BESSEL: Bessel filter. + * + * + * + * + * IMG_BICUBIC: Bicubic interpolation. + * + * + * + * + * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. + * + * + * + * + * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). + * + * + * + * + * IMG_BLACKMAN: Blackman window function. + * + * + * + * + * IMG_BOX: Box blur filter. + * + * + * + * + * IMG_BSPLINE: Spline interpolation. + * + * + * + * + * IMG_CATMULLROM: Cubic Hermite spline interpolation. + * + * + * + * + * IMG_GAUSSIAN: Gaussian function. + * + * + * + * + * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. + * + * + * + * + * IMG_HERMITE: Hermite interpolation. + * + * + * + * + * IMG_HAMMING: Hamming filter. + * + * + * + * + * IMG_HANNING: Hanning filter. + * + * + * + * + * IMG_MITCHELL: Mitchell filter. + * + * + * + * + * IMG_POWER: Power interpolation. + * + * + * + * + * IMG_QUADRATIC: Inverse quadratic interpolation. + * + * + * + * + * IMG_SINC: Sinc function. + * + * + * + * + * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. + * + * + * + * + * IMG_WEIGHTED4: Weighting filter. + * + * + * + * + * IMG_TRIANGLE: Triangle interpolation. + * + * + * + * @throws ImageException + * + */ +function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void +{ + error_clear_last(); + $result = \imagesetinterpolation($image, $method); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagesetpixel draws a pixel at the specified + * coordinate. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $x x-coordinate. + * @param int $y y-coordinate. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagesetpixel($image, int $x, int $y, int $color): void +{ + error_clear_last(); + $result = \imagesetpixel($image, $x, $y, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagesetstyle sets the style to be used by all + * line drawing functions (such as imageline + * and imagepolygon) when drawing with the special + * color IMG_COLOR_STYLED or lines of images with color + * IMG_COLOR_STYLEDBRUSHED. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param array $style An array of pixel colors. You can use the + * IMG_COLOR_TRANSPARENT constant to add a + * transparent pixel. + * Note that style must not be an empty array. + * @throws ImageException + * + */ +function imagesetstyle($image, array $style): void +{ + error_clear_last(); + $result = \imagesetstyle($image, $style); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagesetthickness sets the thickness of the lines + * drawn when drawing rectangles, polygons, arcs etc. to + * thickness pixels. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $thickness Thickness, in pixels. + * @throws ImageException + * + */ +function imagesetthickness($image, int $thickness): void +{ + error_clear_last(); + $result = \imagesetthickness($image, $thickness); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * imagesettile sets the tile image to be + * used by all region filling functions (such as imagefill + * and imagefilledpolygon) when filling with the special + * color IMG_COLOR_TILED. + * + * A tile is an image used to fill an area with a repeated pattern. Any + * GD image can be used as a tile, and by setting the transparent color index of the tile + * image with imagecolortransparent, a tile allows certain parts + * of the underlying area to shine through can be created. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param resource $tile The image resource to be used as a tile. + * @throws ImageException + * + */ +function imagesettile($image, $tile): void +{ + error_clear_last(); + $result = \imagesettile($image, $tile); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws a string at the given coordinates. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $font Can be 1, 2, 3, 4, 5 for built-in + * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your + * own font identifiers registered with imageloadfont. + * @param int $x x-coordinate of the upper left corner. + * @param int $y y-coordinate of the upper left corner. + * @param string $string The string to be written. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagestring($image, int $font, int $x, int $y, string $string, int $color): void +{ + error_clear_last(); + $result = \imagestring($image, $font, $x, $y, $string, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Draws a string vertically at the given + * coordinates. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param int $font Can be 1, 2, 3, 4, 5 for built-in + * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your + * own font identifiers registered with imageloadfont. + * @param int $x x-coordinate of the bottom left corner. + * @param int $y y-coordinate of the bottom left corner. + * @param string $string The string to be written. + * @param int $color A color identifier created with imagecolorallocate. + * @throws ImageException + * + */ +function imagestringup($image, int $font, int $x, int $y, string $string, int $color): void +{ + error_clear_last(); + $result = \imagestringup($image, $font, $x, $y, $string, $color); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Returns the width of the given image resource. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @return int Return the width of the images. + * @throws ImageException + * + */ +function imagesx($image): int +{ + error_clear_last(); + $result = \imagesx($image); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the height of the given image resource. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @return int Return the height of the images. + * @throws ImageException + * + */ +function imagesy($image): int +{ + error_clear_last(); + $result = \imagesy($image); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagetruecolortopalette converts a truecolor image + * to a palette image. The code for this function was originally drawn from + * the Independent JPEG Group library code, which is excellent. The code + * has been modified to preserve as much alpha channel information as + * possible in the resulting palette, in addition to preserving colors as + * well as possible. This does not work as well as might be hoped. It is + * usually best to simply produce a truecolor output image instead, which + * guarantees the highest output quality. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param bool $dither Indicates if the image should be dithered - if it is TRUE then + * dithering will be used which will result in a more speckled image but + * with better color approximation. + * @param int $ncolors Sets the maximum number of colors that should be retained in the palette. + * @throws ImageException + * + */ +function imagetruecolortopalette($image, bool $dither, int $ncolors): void +{ + error_clear_last(); + $result = \imagetruecolortopalette($image, $dither, $ncolors); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * This function calculates and returns the bounding box in pixels + * for a TrueType text. + * + * @param float $size The font size in points. + * @param float $angle Angle in degrees in which text will be measured. + * @param string $fontfile The path to the TrueType font you wish to use. + * + * Depending on which version of the GD library PHP is using, when + * fontfile does not begin with a leading + * / then .ttf will be appended + * to the filename and the library will attempt to search for that + * filename along a library-defined font path. + * + * When using versions of the GD library lower than 2.0.18, a space character, + * rather than a semicolon, was used as the 'path separator' for different font files. + * Unintentional use of this feature will result in the warning message: + * Warning: Could not find/open font. For these affected versions, the + * only solution is moving the font to a path which does not contain spaces. + * + * In many cases where a font resides in the same directory as the script using it + * the following trick will alleviate any include problems. + * + * + * ]]> + * + * + * Note that open_basedir does + * not apply to fontfile. + * @param string $text The string to be measured. + * @return array imagettfbbox returns an array with 8 + * elements representing four points making the bounding box of the + * text on success and FALSE on error. + * + * + * + * + * key + * contents + * + * + * + * + * 0 + * lower left corner, X position + * + * + * 1 + * lower left corner, Y position + * + * + * 2 + * lower right corner, X position + * + * + * 3 + * lower right corner, Y position + * + * + * 4 + * upper right corner, X position + * + * + * 5 + * upper right corner, Y position + * + * + * 6 + * upper left corner, X position + * + * + * 7 + * upper left corner, Y position + * + * + * + * + * + * The points are relative to the text regardless of the + * angle, so "upper left" means in the top left-hand + * corner seeing the text horizontally. + * @throws ImageException + * + */ +function imagettfbbox(float $size, float $angle, string $fontfile, string $text): array +{ + error_clear_last(); + $result = \imagettfbbox($size, $angle, $fontfile, $text); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Writes the given text into the image using TrueType + * fonts. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param float $size The font size in points. + * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. + * Higher values represent a counter-clockwise rotation. For example, a + * value of 90 would result in bottom-to-top reading text. + * @param int $x The coordinates given by x and + * y will define the basepoint of the first + * character (roughly the lower-left corner of the character). This + * is different from the imagestring, where + * x and y define the + * upper-left corner of the first character. For example, "top left" + * is 0, 0. + * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the + * very bottom of the character. + * @param int $color The color index. Using the negative of a color index has the effect of + * turning off antialiasing. See imagecolorallocate. + * @param string $fontfile The path to the TrueType font you wish to use. + * + * Depending on which version of the GD library PHP is using, when + * fontfile does not begin with a leading + * / then .ttf will be appended + * to the filename and the library will attempt to search for that + * filename along a library-defined font path. + * + * When using versions of the GD library lower than 2.0.18, a space character, + * rather than a semicolon, was used as the 'path separator' for different font files. + * Unintentional use of this feature will result in the warning message: + * Warning: Could not find/open font. For these affected versions, the + * only solution is moving the font to a path which does not contain spaces. + * + * In many cases where a font resides in the same directory as the script using it + * the following trick will alleviate any include problems. + * + * + * ]]> + * + * + * Note that open_basedir does + * not apply to fontfile. + * @param string $text The text string in UTF-8 encoding. + * + * May include decimal numeric character references (of the form: + * &#8364;) to access characters in a font beyond position 127. + * The hexadecimal format (like &#xA9;) is supported. + * Strings in UTF-8 encoding can be passed directly. + * + * Named entities, such as &copy;, are not supported. Consider using + * html_entity_decode + * to decode these named entities into UTF-8 strings. + * + * If a character is used in the string which is not supported by the + * font, a hollow rectangle will replace the character. + * @return array Returns an array with 8 elements representing four points making the + * bounding box of the text. The order of the points is lower left, lower + * right, upper right, upper left. The points are relative to the text + * regardless of the angle, so "upper left" means in the top left-hand + * corner when you see the text horizontally. + * @throws ImageException + * + */ +function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text): array +{ + error_clear_last(); + $result = \imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagewbmp outputs or save a WBMP + * version of the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @param int $foreground You can set the foreground color with this parameter by setting an + * identifier obtained from imagecolorallocate. + * The default foreground color is black. + * @throws ImageException + * + */ +function imagewbmp($image, $to = null, int $foreground = null): void +{ + error_clear_last(); + if ($foreground !== null) { + $result = \imagewbmp($image, $to, $foreground); + } else { + $result = \imagewbmp($image, $to); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs or saves a WebP version of the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @param int $quality quality ranges from 0 (worst + * quality, smaller file) to 100 (best quality, biggest file). + * @throws ImageException + * + */ +function imagewebp($image, $to = null, int $quality = 80): void +{ + error_clear_last(); + $result = \imagewebp($image, $to, $quality); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs or save an XBM version of the given + * image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param string|null $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly. + * + * The filename (without the .xbm extension) is also + * used for the C identifiers of the XBM, whereby non + * alphanumeric characters of the current locale are substituted by + * underscores. If filename is set to NULL, + * image is used to build the C identifiers. + * @param int $foreground You can set the foreground color with this parameter by setting an + * identifier obtained from imagecolorallocate. + * The default foreground color is black. All other colors are treated as + * background. + * @throws ImageException + * + */ +function imagexbm($image, ?string $filename, int $foreground = null): void +{ + error_clear_last(); + if ($foreground !== null) { + $result = \imagexbm($image, $filename, $foreground); + } else { + $result = \imagexbm($image, $filename); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Embeds binary IPTC data into a JPEG image. + * + * @param string $iptcdata The data to be written. + * @param string $jpeg_file_name Path to the JPEG image. + * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be + * returned as a string. Otherwise the JPEG will be printed to STDOUT. + * @return string|bool If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @throws ImageException + * + */ +function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0) +{ + error_clear_last(); + $result = \iptcembed($iptcdata, $jpeg_file_name, $spool); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Parses an IPTC block into its single tags. + * + * @param string $iptcblock A binary IPTC block. + * @return array Returns an array using the tagmarker as an index and the value as the + * value. It returns FALSE on error or if no IPTC data was found. + * @throws ImageException + * + */ +function iptcparse(string $iptcblock): array +{ + error_clear_last(); + $result = \iptcparse($iptcblock); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Converts a JPEG file into a WBMP file. + * + * @param string $jpegname Path to JPEG file. + * @param string $wbmpname Path to destination WBMP file. + * @param int $dest_height Destination image height. + * @param int $dest_width Destination image width. + * @param int $threshold Threshold value, between 0 and 8 (inclusive). + * @throws ImageException + * + */ +function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void +{ + error_clear_last(); + $result = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Converts a PNG file into a WBMP file. + * + * @param string $pngname Path to PNG file. + * @param string $wbmpname Path to destination WBMP file. + * @param int $dest_height Destination image height. + * @param int $dest_width Destination image width. + * @param int $threshold Threshold value, between 0 and 8 (inclusive). + * @throws ImageException + * + */ +function png2wbmp(string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void +{ + error_clear_last(); + $result = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/imap.php b/vendor/thecodingmachine/safe/generated/imap.php new file mode 100644 index 000000000..acd8672c6 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/imap.php @@ -0,0 +1,1481 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ImapException; + +/** + * Appends a string message to the specified mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @param string $message The message to be append, as a string + * + * When talking to the Cyrus IMAP server, you must use "\r\n" as + * your end-of-line terminator instead of "\n" or the operation will + * fail + * @param string $options If provided, the options will also be written + * to the mailbox + * @param string $internal_date If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that conforms to the rfc2060 specifications for a date_time value. + * @throws ImapException + * + */ +function imap_append($imap_stream, string $mailbox, string $message, string $options = null, string $internal_date = null): void +{ + error_clear_last(); + $result = \imap_append($imap_stream, $mailbox, $message, $options, $internal_date); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Checks information about the current mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @return \stdClass Returns the information in an object with following properties: + * + * + * + * Date - current system time formatted according to RFC2822 + * + * + * + * + * Driver - protocol used to access this mailbox: + * POP3, IMAP, NNTP + * + * + * + * + * Mailbox - the mailbox name + * + * + * + * + * Nmsgs - number of messages in the mailbox + * + * + * + * + * Recent - number of recent messages in the mailbox + * + * + * + * + * Returns FALSE on failure. + * @throws ImapException + * + */ +function imap_check($imap_stream): \stdClass +{ + error_clear_last(); + $result = \imap_check($imap_stream); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * This function causes a store to delete the specified + * flag to the flags set for the + * messages in the specified sequence. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $sequence A sequence of message numbers. You can enumerate desired messages + * with the X,Y syntax, or retrieve all messages + * within an interval with the X:Y syntax + * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", + * "\\Deleted", and "\\Draft" (as defined by RFC2060) + * @param int $options options are a bit mask and may contain + * the single option: + * + * + * + * ST_UID - The sequence argument contains UIDs + * instead of sequence numbers + * + * + * + * @throws ImapException + * + */ +function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $options = 0): void +{ + error_clear_last(); + $result = \imap_clearflag_full($imap_stream, $sequence, $flag, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Closes the imap stream. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $flag If set to CL_EXPUNGE, the function will silently + * expunge the mailbox before closing, removing all messages marked for + * deletion. You can achieve the same thing by using + * imap_expunge + * @throws ImapException + * + */ +function imap_close($imap_stream, int $flag = 0): void +{ + error_clear_last(); + $result = \imap_close($imap_stream, $flag); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Creates a new mailbox specified by mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $mailbox The mailbox name, see imap_open for more + * information. Names containing international characters should be + * encoded by imap_utf7_encode + * @throws ImapException + * + */ +function imap_createmailbox($imap_stream, string $mailbox): void +{ + error_clear_last(); + $result = \imap_createmailbox($imap_stream, $mailbox); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Deletes the specified mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @throws ImapException + * + */ +function imap_deletemailbox($imap_stream, string $mailbox): void +{ + error_clear_last(); + $result = \imap_deletemailbox($imap_stream, $mailbox); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Fetches all the structured information for a given message. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $msg_number The message number + * @param int $options This optional parameter only has a single option, + * FT_UID, which tells the function to treat the + * msg_number argument as a + * UID. + * @return \stdClass Returns an object with properties listed in the table below. + * + * + * + * Returned Object for imap_fetchstructure + * + * + * + * + * type + * Primary body type + * + * + * encoding + * Body transfer encoding + * + * + * ifsubtype + * TRUE if there is a subtype string + * + * + * subtype + * MIME subtype + * + * + * ifdescription + * TRUE if there is a description string + * + * + * description + * Content description string + * + * + * ifid + * TRUE if there is an identification string + * + * + * id + * Identification string + * + * + * lines + * Number of lines + * + * + * bytes + * Number of bytes + * + * + * ifdisposition + * TRUE if there is a disposition string + * + * + * disposition + * Disposition string + * + * + * ifdparameters + * TRUE if the dparameters array exists + * + * + * dparameters + * An array of objects where each object has an + * "attribute" and a "value" + * property corresponding to the parameters on the + * Content-disposition MIME + * header. + * + * + * ifparameters + * TRUE if the parameters array exists + * + * + * parameters + * An array of objects where each object has an + * "attribute" and a "value" + * property. + * + * + * parts + * An array of objects identical in structure to the top-level + * object, each of which corresponds to a MIME body + * part. + * + * + * + * + * + * + * Primary body type (value may vary with used library, use of constants is recommended) + * + * + * ValueTypeConstant + * + * + * 0textTYPETEXT + * 1multipartTYPEMULTIPART + * 2messageTYPEMESSAGE + * 3applicationTYPEAPPLICATION + * 4audioTYPEAUDIO + * 5imageTYPEIMAGE + * 6videoTYPEVIDEO + * 7modelTYPEMODEL + * 8otherTYPEOTHER + * + * + * + * + * + * Transfer encodings (value may vary with used library, use of constants is recommended) + * + * + * ValueTypeConstant + * + * + * 07bitENC7BIT + * 18bitENC8BIT + * 2BinaryENCBINARY + * 3Base64ENCBASE64 + * 4Quoted-PrintableENCQUOTEDPRINTABLE + * 5otherENCOTHER + * + * + * + * @throws ImapException + * + */ +function imap_fetchstructure($imap_stream, int $msg_number, int $options = 0): \stdClass +{ + error_clear_last(); + $result = \imap_fetchstructure($imap_stream, $msg_number, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Purges the cache of entries of a specific type. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $caches Specifies the cache to purge. It may one or a combination + * of the following constants: + * IMAP_GC_ELT (message cache elements), + * IMAP_GC_ENV (envelope and bodies), + * IMAP_GC_TEXTS (texts). + * @throws ImapException + * + */ +function imap_gc($imap_stream, int $caches): void +{ + error_clear_last(); + $result = \imap_gc($imap_stream, $caches); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Gets information about the given message number by reading its headers. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $msg_number The message number + * @param int $fromlength Number of characters for the fetchfrom property. + * Must be greater than or equal to zero. + * @param int $subjectlength Number of characters for the fetchsubject property + * Must be greater than or equal to zero. + * @param string $defaulthost + * @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties: + * + * + * + * toaddress - full to: line, up to 1024 characters + * + * + * + * + * to - an array of objects from the To: line, with the following + * properties: personal, adl, + * mailbox, and host + * + * + * + * + * fromaddress - full from: line, up to 1024 characters + * + * + * + * + * from - an array of objects from the From: line, with the following + * properties: personal, adl, + * mailbox, and host + * + * + * + * + * ccaddress - full cc: line, up to 1024 characters + * + * + * + * + * cc - an array of objects from the Cc: line, with the following + * properties: personal, adl, + * mailbox, and host + * + * + * + * + * bccaddress - full bcc: line, up to 1024 characters + * + * + * + * + * bcc - an array of objects from the Bcc: line, with the following + * properties: personal, adl, + * mailbox, and host + * + * + * + * + * reply_toaddress - full Reply-To: line, up to 1024 characters + * + * + * + * + * reply_to - an array of objects from the Reply-To: line, with the following + * properties: personal, adl, + * mailbox, and host + * + * + * + * + * senderaddress - full sender: line, up to 1024 characters + * + * + * + * + * sender - an array of objects from the Sender: line, with the following + * properties: personal, adl, + * mailbox, and host + * + * + * + * + * return_pathaddress - full Return-Path: line, up to 1024 characters + * + * + * + * + * return_path - an array of objects from the Return-Path: line, with the + * following properties: personal, + * adl, mailbox, and + * host + * + * + * + * + * remail - + * + * + * + * + * date - The message date as found in its headers + * + * + * + * + * Date - Same as date + * + * + * + * + * subject - The message subject + * + * + * + * + * Subject - Same as subject + * + * + * + * + * in_reply_to - + * + * + * + * + * message_id - + * + * + * + * + * newsgroups - + * + * + * + * + * followup_to - + * + * + * + * + * references - + * + * + * + * + * Recent - R if recent and seen, N + * if recent and not seen, ' ' if not recent. + * + * + * + * + * Unseen - U if not seen AND not recent, ' ' if seen + * OR not seen and recent + * + * + * + * + * Flagged - F if flagged, ' ' if not flagged + * + * + * + * + * Answered - A if answered, ' ' if unanswered + * + * + * + * + * Deleted - D if deleted, ' ' if not deleted + * + * + * + * + * Draft - X if draft, ' ' if not draft + * + * + * + * + * Msgno - The message number + * + * + * + * + * MailDate - + * + * + * + * + * Size - The message size + * + * + * + * + * udate - mail message date in Unix time + * + * + * + * + * fetchfrom - from line formatted to fit fromlength + * characters + * + * + * + * + * fetchsubject - subject line formatted to fit + * subjectlength characters + * + * + * + * @throws ImapException + * + */ +function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int $subjectlength = 0, string $defaulthost = null): \stdClass +{ + error_clear_last(); + $result = \imap_headerinfo($imap_stream, $msg_number, $fromlength, $subjectlength, $defaulthost); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Create a MIME message based on the given envelope + * and body sections. + * + * @param array $envelope An associative array of header fields. Valid keys are: "remail", + * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", + * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. + * To set additional headers, the key "custom_headers" is supported, which expects + * an array of those headers, e.g. ["User-Agent: My Mail Client"]. + * @param array $body An indexed array of bodies. The first body is the main body of the message; + * only if it has a type of TYPEMULTIPART, further bodies + * are processed; these bodies constitute the bodies of the parts. + * + * + * Body Array Structure + * + * + * + * Key + * Type + * Description + * + * + * + * + * type + * int + * + * The MIME type. + * One of TYPETEXT (default), TYPEMULTIPART, + * TYPEMESSAGE, TYPEAPPLICATION, + * TYPEAUDIO, TYPEIMAGE, + * TYPEMODEL or TYPEOTHER. + * + * + * + * encoding + * int + * + * The Content-Transfer-Encoding. + * One of ENC7BIT (default), ENC8BIT, + * ENCBINARY, ENCBASE64, + * ENCQUOTEDPRINTABLE or ENCOTHER. + * + * + * + * charset + * string + * The charset parameter of the MIME type. + * + * + * type.parameters + * array + * An associative array of Content-Type parameter names and their values. + * + * + * subtype + * string + * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. + * + * + * id + * string + * The Content-ID. + * + * + * description + * string + * The Content-Description. + * + * + * disposition.type + * string + * The Content-Disposition, e.g. 'attachment'. + * + * + * disposition + * array + * An associative array of Content-Disposition parameter names and values. + * + * + * contents.data + * string + * The payload. + * + * + * lines + * int + * The size of the payload in lines. + * + * + * bytes + * int + * The size of the payload in bytes. + * + * + * md5 + * string + * The MD5 checksum of the payload. + * + * + * + * + * @return string Returns the MIME message as string. + * @throws ImapException + * + */ +function imap_mail_compose(array $envelope, array $body): string +{ + error_clear_last(); + $result = \imap_mail_compose($envelope, $body); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Copies mail messages specified by msglist + * to specified mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $msglist msglist is a range not just message + * numbers (as described in RFC2060). + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @param int $options options is a bitmask of one or more of + * + * + * + * CP_UID - the sequence numbers contain UIDS + * + * + * + * + * CP_MOVE - Delete the messages from + * the current mailbox after copying + * + * + * + * @throws ImapException + * + */ +function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $options = 0): void +{ + error_clear_last(); + $result = \imap_mail_copy($imap_stream, $msglist, $mailbox, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Moves mail messages specified by msglist to the + * specified mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $msglist msglist is a range not just message numbers + * (as described in RFC2060). + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @param int $options options is a bitmask and may contain the single option: + * + * + * + * CP_UID - the sequence numbers contain UIDS + * + * + * + * @throws ImapException + * + */ +function imap_mail_move($imap_stream, string $msglist, string $mailbox, int $options = 0): void +{ + error_clear_last(); + $result = \imap_mail_move($imap_stream, $msglist, $mailbox, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * This function allows sending of emails with correct handling of + * Cc and Bcc receivers. + * + * The parameters to, cc + * and bcc are all strings and are all parsed + * as RFC822 address lists. + * + * @param string $to The receiver + * @param string $subject The mail subject + * @param string $message The mail body, see imap_mail_compose + * @param string $additional_headers As string with additional headers to be set on the mail + * @param string $cc + * @param string $bcc The receivers specified in bcc will get the + * mail, but are excluded from the headers. + * @param string $rpath Use this parameter to specify return path upon mail delivery failure. + * This is useful when using PHP as a mail client for multiple users. + * @throws ImapException + * + */ +function imap_mail(string $to, string $subject, string $message, string $additional_headers = null, string $cc = null, string $bcc = null, string $rpath = null): void +{ + error_clear_last(); + $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $rpath); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Checks the current mailbox status on the server. It is similar to + * imap_status, but will additionally sum up the size of + * all messages in the mailbox, which will take some additional time to + * execute. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @return \stdClass Returns the information in an object with following properties: + * + * Mailbox properties + * + * + * + * Date + * date of last change (current datetime) + * + * + * Driver + * driver + * + * + * Mailbox + * name of the mailbox + * + * + * Nmsgs + * number of messages + * + * + * Recent + * number of recent messages + * + * + * Unread + * number of unread messages + * + * + * Deleted + * number of deleted messages + * + * + * Size + * mailbox size + * + * + * + * + * + * Returns FALSE on failure. + * @throws ImapException + * + */ +function imap_mailboxmsginfo($imap_stream): \stdClass +{ + error_clear_last(); + $result = \imap_mailboxmsginfo($imap_stream); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. + * + * @param string $in A string encoded in modified UTF-7. + * @return string Returns in converted to UTF-8. + * @throws ImapException + * + */ +function imap_mutf7_to_utf8(string $in): string +{ + error_clear_last(); + $result = \imap_mutf7_to_utf8($in); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the number of messages in the current mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @return int Return the number of messages in the current mailbox, as an integer. + * @throws ImapException + * + */ +function imap_num_msg($imap_stream): int +{ + error_clear_last(); + $result = \imap_num_msg($imap_stream); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Opens an IMAP stream to a mailbox. + * + * This function can also be used to open streams to POP3 and + * NNTP servers, but some functions and features are only + * available on IMAP servers. + * + * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. + * The special name INBOX stands for the current users + * personal mailbox. Mailbox names that contain international characters + * besides those in the printable ASCII space have to be encoded with + * imap_utf7_encode. + * + * The server part, which is enclosed in '{' and '}', consists of the servers + * name or ip address, an optional port (prefixed by ':'), and an optional + * protocol specification (prefixed by '/'). + * + * The server part is mandatory in all mailbox + * parameters. + * + * All names which start with { are remote names, and are + * in the form "{" remote_system_name [":" port] [flags] "}" + * [mailbox_name] where: + * + * + * + * remote_system_name - Internet domain name or + * bracketed IP address of server. + * + * + * + * + * port - optional TCP port number, default is the + * default port for that service + * + * + * + * + * flags - optional flags, see following table. + * + * + * + * + * mailbox_name - remote mailbox name, default is INBOX + * + * + * + * + * + * Optional flags for names + * + * + * + * Flag + * Description + * + * + * + * + * /service=service + * mailbox access service, default is "imap" + * + * + * /user=user + * remote user name for login on the server + * + * + * /authuser=user + * remote authentication user; if specified this is the user name + * whose password is used (e.g. administrator) + * + * + * /anonymous + * remote access as anonymous user + * + * + * /debug + * record protocol telemetry in application's debug log + * + * + * /secure + * do not transmit a plaintext password over the network + * + * + * /imap, /imap2, + * /imap2bis, /imap4, + * /imap4rev1 + * equivalent to /service=imap + * + * + * /pop3 + * equivalent to /service=pop3 + * + * + * /nntp + * equivalent to /service=nntp + * + * + * /norsh + * do not use rsh or ssh to establish a preauthenticated IMAP + * session + * + * + * /ssl + * use the Secure Socket Layer to encrypt the session + * + * + * /validate-cert + * validate certificates from TLS/SSL server (this is the default + * behavior) + * + * + * /novalidate-cert + * do not validate certificates from TLS/SSL server, needed if + * server uses self-signed certificates + * + * + * /tls + * force use of start-TLS to encrypt the session, and reject + * connection to servers that do not support it + * + * + * /notls + * do not do start-TLS to encrypt the session, even with servers + * that support it + * + * + * /readonly + * request read-only mailbox open (IMAP only; ignored on NNTP, and + * an error with SMTP and POP3) + * + * + * + * + * @param string $username The user name + * @param string $password The password associated with the username + * @param int $options The options are a bit mask with one or more of + * the following: + * + * + * + * OP_READONLY - Open mailbox read-only + * + * + * + * + * OP_ANONYMOUS - Don't use or update a + * .newsrc for news (NNTP only) + * + * + * + * + * OP_HALFOPEN - For IMAP + * and NNTP names, open a connection but + * don't open a mailbox. + * + * + * + * + * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close + * (see also imap_delete and + * imap_expunge) + * + * + * + * + * OP_DEBUG - Debug protocol negotiations + * + * + * + * + * OP_SHORTCACHE - Short (elt-only) caching + * + * + * + * + * OP_SILENT - Don't pass up events (internal use) + * + * + * + * + * OP_PROTOTYPE - Return driver prototype + * + * + * + * + * OP_SECURE - Don't do non-secure authentication + * + * + * + * @param int $n_retries Number of maximum connect attempts + * @param array|null $params Connection parameters, the following (string) keys maybe used + * to set one or more connection parameters: + * + * + * + * DISABLE_AUTHENTICATOR - Disable authentication properties + * + * + * + * @return resource Returns an IMAP stream on success. + * @throws ImapException + * + */ +function imap_open(string $mailbox, string $username, string $password, int $options = 0, int $n_retries = 0, ?array $params = null) +{ + error_clear_last(); + $result = \imap_open($mailbox, $username, $password, $options, $n_retries, $params); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * This function renames on old mailbox to new mailbox (see + * imap_open for the format of + * mbox names). + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $old_mbox The old mailbox name, see imap_open for more + * information + * @param string $new_mbox The new mailbox name, see imap_open for more + * information + * @throws ImapException + * + */ +function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): void +{ + error_clear_last(); + $result = \imap_renamemailbox($imap_stream, $old_mbox, $new_mbox); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Saves a part or the whole body of the specified message. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string|resource $file The path to the saved file as a string, or a valid file descriptor + * returned by fopen. + * @param int $msg_number The message number + * @param string $part_number The part number. It is a string of integers delimited by period which + * index into a body part list as per the IMAP4 specification + * @param int $options A bitmask with one or more of the following: + * + * + * + * FT_UID - The msg_number is a UID + * + * + * + * + * FT_PEEK - Do not set the \Seen flag if + * not already set + * + * + * + * + * FT_INTERNAL - The return string is in + * internal format, will not canonicalize to CRLF. + * + * + * + * @throws ImapException + * + */ +function imap_savebody($imap_stream, $file, int $msg_number, string $part_number = "", int $options = 0): void +{ + error_clear_last(); + $result = \imap_savebody($imap_stream, $file, $msg_number, $part_number, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Sets an upper limit quota on a per mailbox basis. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard + * format for a mailbox: user.name. + * @param int $quota_limit The maximum size (in KB) for the quota_root + * @throws ImapException + * + */ +function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): void +{ + error_clear_last(); + $result = \imap_set_quota($imap_stream, $quota_root, $quota_limit); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Sets the ACL for a giving mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @param string $id The user to give the rights to. + * @param string $rights The rights to give to the user. Passing an empty string will delete + * acl. + * @throws ImapException + * + */ +function imap_setacl($imap_stream, string $mailbox, string $id, string $rights): void +{ + error_clear_last(); + $result = \imap_setacl($imap_stream, $mailbox, $id, $rights); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Causes a store to add the specified flag to the + * flags set for the messages in the specified + * sequence. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $sequence A sequence of message numbers. You can enumerate desired messages + * with the X,Y syntax, or retrieve all messages + * within an interval with the X:Y syntax + * @param string $flag The flags which you can set are \Seen, + * \Answered, \Flagged, + * \Deleted, and \Draft as + * defined by RFC2060. + * @param int $options A bit mask that may contain the single option: + * + * + * + * ST_UID - The sequence argument contains UIDs + * instead of sequence numbers + * + * + * + * @throws ImapException + * + */ +function imap_setflag_full($imap_stream, string $sequence, string $flag, int $options = NIL): void +{ + error_clear_last(); + $result = \imap_setflag_full($imap_stream, $sequence, $flag, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Gets and sorts message numbers by the given parameters. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $criteria Criteria can be one (and only one) of the following: + * + * + * + * SORTDATE - message Date + * + * + * + * + * SORTARRIVAL - arrival date + * + * + * + * + * SORTFROM - mailbox in first From address + * + * + * + * + * SORTSUBJECT - message subject + * + * + * + * + * SORTTO - mailbox in first To address + * + * + * + * + * SORTCC - mailbox in first cc address + * + * + * + * + * SORTSIZE - size of message in octets + * + * + * + * @param int $reverse Set this to 1 for reverse sorting + * @param int $options The options are a bitmask of one or more of the + * following: + * + * + * + * SE_UID - Return UIDs instead of sequence numbers + * + * + * + * + * SE_NOPREFETCH - Don't prefetch searched messages + * + * + * + * @param string $search_criteria IMAP2-format search criteria string. For details see + * imap_search. + * @param string $charset MIME character set to use when sorting strings. + * @return array Returns an array of message numbers sorted by the given + * parameters. + * @throws ImapException + * + */ +function imap_sort($imap_stream, int $criteria, int $reverse, int $options = 0, string $search_criteria = null, string $charset = null): array +{ + error_clear_last(); + $result = \imap_sort($imap_stream, $criteria, $reverse, $options, $search_criteria, $charset); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Subscribe to a new mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @throws ImapException + * + */ +function imap_subscribe($imap_stream, string $mailbox): void +{ + error_clear_last(); + $result = \imap_subscribe($imap_stream, $mailbox); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Gets a tree of a threaded message. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $options + * @return array imap_thread returns an associative array containing + * a tree of messages threaded by REFERENCES. + * + * Every message in the current mailbox will be represented by three entries + * in the resulting array: + * + * + * $thread["XX.num"] - current message number + * + * + * $thread["XX.next"] + * + * + * $thread["XX.branch"] + * + * + * @throws ImapException + * + */ +function imap_thread($imap_stream, int $options = SE_FREE): array +{ + error_clear_last(); + $result = \imap_thread($imap_stream, $options); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets or fetches the imap timeout. + * + * @param int $timeout_type One of the following: + * IMAP_OPENTIMEOUT, + * IMAP_READTIMEOUT, + * IMAP_WRITETIMEOUT, or + * IMAP_CLOSETIMEOUT. + * @param int $timeout The timeout, in seconds. + * @return mixed If the timeout parameter is set, this function + * returns TRUE on success. + * + * If timeout is not provided or evaluates to -1, + * the current timeout value of timeout_type is + * returned as an integer. + * @throws ImapException + * + */ +function imap_timeout(int $timeout_type, int $timeout = -1) +{ + error_clear_last(); + $result = \imap_timeout($timeout_type, $timeout); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} + + +/** + * Removes the deletion flag for a specified message, which is set by + * imap_delete or imap_mail_move. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param int $msg_number The message number + * @param int $flags + * @throws ImapException + * + */ +function imap_undelete($imap_stream, int $msg_number, int $flags = 0): void +{ + error_clear_last(); + $result = \imap_undelete($imap_stream, $msg_number, $flags); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Unsubscribe from the specified mailbox. + * + * @param resource $imap_stream An IMAP stream returned by + * imap_open. + * @param string $mailbox The mailbox name, see imap_open for more + * information + * @throws ImapException + * + */ +function imap_unsubscribe($imap_stream, string $mailbox): void +{ + error_clear_last(); + $result = \imap_unsubscribe($imap_stream, $mailbox); + if ($result === false) { + throw ImapException::createFromPhpError(); + } +} + + +/** + * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). + * + * @param string $in A UTF-8 encoded string. + * @return string Returns in converted to modified UTF-7. + * @throws ImapException + * + */ +function imap_utf8_to_mutf7(string $in): string +{ + error_clear_last(); + $result = \imap_utf8_to_mutf7($in); + if ($result === false) { + throw ImapException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/info.php b/vendor/thecodingmachine/safe/generated/info.php new file mode 100644 index 000000000..1a76b406e --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/info.php @@ -0,0 +1,511 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\InfoException; + +/** + * Sets the process title visible in tools such as top and + * ps. This function is available only in + * CLI mode. + * + * @param string $title The new title. + * @throws InfoException + * + */ +function cli_set_process_title(string $title): void +{ + error_clear_last(); + $result = \cli_set_process_title($title); + if ($result === false) { + throw InfoException::createFromPhpError(); + } +} + + +/** + * Loads the PHP extension given by the parameter + * library. + * + * Use extension_loaded to test whether a given + * extension is already available or not. This works on both built-in + * extensions and dynamically loaded ones (either through php.ini or + * dl). + * + * @param string $library This parameter is only the filename of the + * extension to load which also depends on your platform. For example, + * the sockets extension (if compiled + * as a shared module, not the default!) would be called + * sockets.so on Unix platforms whereas it is called + * php_sockets.dll on the Windows platform. + * + * The directory where the extension is loaded from depends on your + * platform: + * + * Windows - If not explicitly set in the php.ini, the extension is + * loaded from C:\php5\ by default. + * + * Unix - If not explicitly set in the php.ini, the default extension + * directory depends on + * + * + * + * whether PHP has been built with --enable-debug + * or not + * + * + * + * + * whether PHP has been built with (experimental) ZTS (Zend Thread Safety) + * support or not + * + * + * + * + * the current internal ZEND_MODULE_API_NO (Zend + * internal module API number, which is basically the date on which a + * major module API change happened, e.g. 20010901) + * + * + * + * Taking into account the above, the directory then defaults to + * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, + * e.g. + * /usr/local/php/lib/php/extensions/debug-non-zts-20010901 + * or + * /usr/local/php/lib/php/extensions/no-debug-zts-20010901. + * @throws InfoException + * + */ +function dl(string $library): void +{ + error_clear_last(); + $result = \dl($library); + if ($result === false) { + throw InfoException::createFromPhpError(); + } +} + + +/** + * Gets the time of the last modification of the main script of execution. + * + * If you're interested in getting the last modification time + * of a different file, consider using filemtime. + * + * @return int Returns the time of the last modification of the current + * page. The value returned is a Unix timestamp, suitable for + * feeding to date. + * @throws InfoException + * + */ +function getlastmod(): int +{ + error_clear_last(); + $result = \getlastmod(); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @return int Returns the group ID of the current script. + * @throws InfoException + * + */ +function getmygid(): int +{ + error_clear_last(); + $result = \getmygid(); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the inode of the current script. + * + * @return int Returns the current script's inode as an integer. + * @throws InfoException + * + */ +function getmyinode(): int +{ + error_clear_last(); + $result = \getmyinode(); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the current PHP process ID. + * + * @return int Returns the current PHP process ID. + * @throws InfoException + * + */ +function getmypid(): int +{ + error_clear_last(); + $result = \getmypid(); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @return int Returns the user ID of the current script. + * @throws InfoException + * + */ +function getmyuid(): int +{ + error_clear_last(); + $result = \getmyuid(); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Parses options passed to the script. + * + * @param string $options + * @param array $longopts + * @param int|null $optind + * @return array|array|array This function will return an array of option / argument pairs. + * @throws InfoException + * + */ +function getopt(string $options, array $longopts = null, ?int &$optind = null): array +{ + error_clear_last(); + if ($optind !== null) { + $result = \getopt($options, $longopts, $optind); + } elseif ($longopts !== null) { + $result = \getopt($options, $longopts); + } else { + $result = \getopt($options); + } + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the value of the configuration option on success. + * + * @param string $varname The configuration option name. + * @return string Returns the value of the configuration option as a string on success, or an + * empty string for null values. Returns FALSE if the + * configuration option doesn't exist. + * @throws InfoException + * + */ +function ini_get(string $varname): string +{ + error_clear_last(); + $result = \ini_get($varname); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the value of the given configuration option. The configuration option + * will keep this new value during the script's execution, and will be restored + * at the script's ending. + * + * @param string $varname Not all the available options can be changed using + * ini_set. There is a list of all available options + * in the appendix. + * @param string|int|float|bool $newvalue The new value for the option. + * @return string Returns the old value on success, FALSE on failure. + * @throws InfoException + * + */ +function ini_set(string $varname, $newvalue): string +{ + error_clear_last(); + $result = \ini_set($varname, $newvalue); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * This function prints out the credits listing the PHP developers, + * modules, etc. It generates the appropriate HTML codes to insert + * the information in a page. + * + * @param int $flag To generate a custom credits page, you may want to use the + * flag parameter. + * + * + * Pre-defined phpcredits flags + * + * + * + * name + * description + * + * + * + * + * CREDITS_ALL + * + * All the credits, equivalent to using: CREDITS_DOCS + + * CREDITS_GENERAL + CREDITS_GROUP + + * CREDITS_MODULES + CREDITS_FULLPAGE. + * It generates a complete stand-alone HTML page with the appropriate tags. + * + * + * + * CREDITS_DOCS + * The credits for the documentation team + * + * + * CREDITS_FULLPAGE + * + * Usually used in combination with the other flags. Indicates + * that a complete stand-alone HTML page needs to be + * printed including the information indicated by the other + * flags. + * + * + * + * CREDITS_GENERAL + * + * General credits: Language design and concept, PHP authors + * and SAPI module. + * + * + * + * CREDITS_GROUP + * A list of the core developers + * + * + * CREDITS_MODULES + * + * A list of the extension modules for PHP, and their authors + * + * + * + * CREDITS_SAPI + * + * A list of the server API modules for PHP, and their authors + * + * + * + * + * + * @throws InfoException + * + */ +function phpcredits(int $flag = CREDITS_ALL): void +{ + error_clear_last(); + $result = \phpcredits($flag); + if ($result === false) { + throw InfoException::createFromPhpError(); + } +} + + +/** + * Outputs a large amount of information about the current state of PHP. + * This includes information about PHP compilation options and extensions, + * the PHP version, server information and environment (if compiled as a + * module), the PHP environment, OS version information, paths, master and + * local values of configuration options, HTTP headers, and the PHP License. + * + * Because every system is setup differently, phpinfo is + * commonly used to check configuration settings and for available + * predefined variables + * on a given system. + * + * phpinfo is also a valuable debugging tool as it + * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. + * + * @param int $what The output may be customized by passing one or more of the + * following constants bitwise values summed + * together in the optional what parameter. + * One can also combine the respective constants or bitwise values + * together with the bitwise or operator. + * + * + * phpinfo options + * + * + * + * Name (constant) + * Value + * Description + * + * + * + * + * INFO_GENERAL + * 1 + * + * The configuration line, php.ini location, build date, Web + * Server, System and more. + * + * + * + * INFO_CREDITS + * 2 + * + * PHP Credits. See also phpcredits. + * + * + * + * INFO_CONFIGURATION + * 4 + * + * Current Local and Master values for PHP directives. See + * also ini_get. + * + * + * + * INFO_MODULES + * 8 + * + * Loaded modules and their respective settings. See also + * get_loaded_extensions. + * + * + * + * INFO_ENVIRONMENT + * 16 + * + * Environment Variable information that's also available in + * $_ENV. + * + * + * + * INFO_VARIABLES + * 32 + * + * Shows all + * predefined variables from EGPCS (Environment, GET, + * POST, Cookie, Server). + * + * + * + * INFO_LICENSE + * 64 + * + * PHP License information. See also the license FAQ. + * + * + * + * INFO_ALL + * -1 + * + * Shows all of the above. + * + * + * + * + * + * @throws InfoException + * + */ +function phpinfo(int $what = INFO_ALL): void +{ + error_clear_last(); + $result = \phpinfo($what); + if ($result === false) { + throw InfoException::createFromPhpError(); + } +} + + +/** + * Adds setting to the server environment. The + * environment variable will only exist for the duration of the current + * request. At the end of the request the environment is restored to its + * original state. + * + * @param string $setting The setting, like "FOO=BAR" + * @throws InfoException + * + */ +function putenv(string $setting): void +{ + error_clear_last(); + $result = \putenv($setting); + if ($result === false) { + throw InfoException::createFromPhpError(); + } +} + + +/** + * Sets the include_path + * configuration option for the duration of the script. + * + * @param string $new_include_path The new value for the include_path + * @return string Returns the old include_path on + * success. + * @throws InfoException + * + */ +function set_include_path(string $new_include_path): string +{ + error_clear_last(); + $result = \set_include_path($new_include_path); + if ($result === false) { + throw InfoException::createFromPhpError(); + } + return $result; +} + + +/** + * Set the number of seconds a script is allowed to run. If this is reached, + * the script returns a fatal error. The default limit is 30 seconds or, if + * it exists, the max_execution_time value defined in the + * php.ini. + * + * When called, set_time_limit restarts the timeout + * counter from zero. In other words, if the timeout is the default 30 + * seconds, and 25 seconds into script execution a call such as + * set_time_limit(20) is made, the script will run for a + * total of 45 seconds before timing out. + * + * @param int $seconds The maximum execution time, in seconds. If set to zero, no time limit + * is imposed. + * @throws InfoException + * + */ +function set_time_limit(int $seconds): void +{ + error_clear_last(); + $result = \set_time_limit($seconds); + if ($result === false) { + throw InfoException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/ingres-ii.php b/vendor/thecodingmachine/safe/generated/ingres-ii.php new file mode 100644 index 000000000..9ea8b5f35 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ingres-ii.php @@ -0,0 +1,720 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\IngresiiException; + +/** + * ingres_autocommit is called before opening a + * transaction (before the first call to + * ingres_query or just after a call to + * ingres_rollback or + * ingres_commit) to switch the + * autocommit mode of the server on or off (when the script begins + * the autocommit mode is off). + * + * When autocommit mode is on, every query is automatically + * committed by the server, as if ingres_commit + * was called after every call to ingres_query. + * To see if autocommit is enabled use, + * ingres_autocommit_state. + * + * By default Ingres will rollback any uncommitted transactions at the end of + * a request. Use this function or ingres_commit to + * ensure your data is committed to the database. + * + * @param resource $link The connection link identifier + * @throws IngresiiException + * + */ +function ingres_autocommit($link): void +{ + error_clear_last(); + $result = \ingres_autocommit($link); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * ingres_close closes the connection to + * the Ingres server that is associated with the specified link. + * + * ingres_close is usually unnecessary, as it + * will not close persistent connections and all non-persistent connections + * are automatically closed at the end of the script. + * + * @param resource $link The connection link identifier + * @throws IngresiiException + * + */ +function ingres_close($link): void +{ + error_clear_last(); + $result = \ingres_close($link); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * ingres_commit commits the currently open + * transaction, making all changes made to the database permanent. + * + * This closes the transaction. A new transaction can be opened by sending a + * query with ingres_query. + * + * You can also have the server commit automatically after every + * query by calling ingres_autocommit before + * opening the transaction. + * + * By default Ingres will roll back any uncommitted transactions at the end of + * a request. Use this function or ingres_autocommit to + * ensure your that data is committed to the database. + * + * @param resource $link The connection link identifier + * @throws IngresiiException + * + */ +function ingres_commit($link): void +{ + error_clear_last(); + $result = \ingres_commit($link); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * ingres_connect opens a connection with the + * given Ingres database. + * + * The connection is closed when the script ends or when + * ingres_close is called on this link. + * + * @param string $database The database name. Must follow the syntax: + * + * [vnode::]dbname[/svr_class] + * @param string $username The Ingres user name + * @param string $password The password associated with username + * @param array $options ingres_connect options + * + * + * + * + * Option name + * Option type + * Description + * Example + * + * + * + * + * date_century_boundary + * integer + * The threshold by which a 2-digit year is determined to be in + * the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY. + * 50 + * + * + * group + * string + * Specifies the group ID of the user, equivalent to the "-G" + * flag + * payroll + * + * + * role + * string + * The role ID of the application. If a role password is + * required, the parameter value should be specified as "role/password" + * + * + * effective_user + * string + * The ingres user account being impersonated, equivalent to the "-u" flag + * another_user + * + * + * dbms_password + * string + * The internal database password for the user connecting to Ingres + * s3cr3t + * + * + * table_structure + * string + * + * The default structure for new tables. + * Valid values for table_structure are: + * + * INGRES_STRUCTURE_BTREE + * INGRES_STRUCTURE_HASH + * INGRES_STRUCTURE_HEAP + * INGRES_STRUCTURE_ISAM + * INGRES_STRUCTURE_CBTREE + * INGRES_STRUCTURE_CISAM + * INGRES_STRUCTURE_CHASH + * INGRES_STRUCTURE_CHEAP + * + * + * + * INGRES_STRUCTURE_BTREE + * + * + * index_structure + * string + * + * The default structure for new secondary indexes. Valid values + * for index_structure are: + * + * INGRES_STRUCTURE_CBTREE + * INGRES_STRUCTURE_CISAM + * INGRES_STRUCTURE_CHASH + * INGRES_STRUCTURE_BTREE + * INGRES_STRUCTURE_HASH + * INGRES_STRUCTURE_ISAM + * + * + * + * INGRES_STRUCTURE_HASH + * + * + * login_local + * boolean + * Determines how the connection user ID and password are + * used when a VNODE is included in the target database string. + * If set to TRUE, the user ID and password are used to locally access + * the VNODE, and the VNODE login information is used to establish the DBMS + * connection. If set to FALSE, the process user ID is used to access + * the VNODE, and the connection user ID and password are used in place + * of the VNODE login information to establish the DBMS connection. + * This parameter is ignored if no VNODE is included in the target + * database string. The default is FALSE. + * TRUE + * + * + * timezone + * string + * Controls the timezone of the session. If not set it will + * default to the value defined by II_TIMEZONE_NAME. If + * II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight + * Savings) is used. + * + * + * date_format + * integer + * Sets the allowable input and output format for Ingres dates. + * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is + * not set the default date format is US, e.g. mm/dd/yy. Valid values + * for date_format are: + * + * INGRES_DATE_DMY + * INGRES_DATE_FINISH + * INGRES_DATE_GERMAN + * INGRES_DATE_ISO + * INGRES_DATE_ISO4 + * INGRES_DATE_MDY + * INGRES_DATE_MULTINATIONAL + * INGRES_DATE_MULTINATIONAL4 + * INGRES_DATE_YMD + * INGRES_DATE_US + * + * + * + * INGRES_DATE_MULTINATIONAL4 + * + * + * decimal_separator + * string + * The character identifier for decimal data + * "," + * + * + * money_lort + * integer + * Leading or trailing currency sign. Valid values for money_lort + * are: + * + * INGRES_MONEY_LEADING + * INGRES_MONEY_TRAILING + * + * + * + * INGRES_MONEY_TRAILING + * + * + * money_sign + * string + * The currency symbol to be used with the MONEY datatype + * € + * + * + * money_precision + * integer + * The precision of the MONEY datatype + * 3 + * + * + * float4_precision + * integer + * Precision of the FLOAT4 datatype + * 10 + * + * + * float8_precision + * integer + * Precision of the FLOAT8 data + * 10 + * + * + * blob_segment_length + * integer + * The amount of data in bytes to fetch at a time when retrieving + * BLOB or CLOB data, defaults to 4096 bytes when not explicitly set + * 8192 + * + * + * + * + * + * The default structure for new tables. + * Valid values for table_structure are: + * + * INGRES_STRUCTURE_BTREE + * INGRES_STRUCTURE_HASH + * INGRES_STRUCTURE_HEAP + * INGRES_STRUCTURE_ISAM + * INGRES_STRUCTURE_CBTREE + * INGRES_STRUCTURE_CISAM + * INGRES_STRUCTURE_CHASH + * INGRES_STRUCTURE_CHEAP + * + * + * The default structure for new secondary indexes. Valid values + * for index_structure are: + * + * INGRES_STRUCTURE_CBTREE + * INGRES_STRUCTURE_CISAM + * INGRES_STRUCTURE_CHASH + * INGRES_STRUCTURE_BTREE + * INGRES_STRUCTURE_HASH + * INGRES_STRUCTURE_ISAM + * + * + * Sets the allowable input and output format for Ingres dates. + * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is + * not set the default date format is US, e.g. mm/dd/yy. Valid values + * for date_format are: + * + * INGRES_DATE_DMY + * INGRES_DATE_FINISH + * INGRES_DATE_GERMAN + * INGRES_DATE_ISO + * INGRES_DATE_ISO4 + * INGRES_DATE_MDY + * INGRES_DATE_MULTINATIONAL + * INGRES_DATE_MULTINATIONAL4 + * INGRES_DATE_YMD + * INGRES_DATE_US + * + * + * Leading or trailing currency sign. Valid values for money_lort + * are: + * + * INGRES_MONEY_LEADING + * INGRES_MONEY_TRAILING + * + * @return resource Returns a Ingres link resource on success + * @throws IngresiiException + * + */ +function ingres_connect(string $database = null, string $username = null, string $password = null, array $options = null) +{ + error_clear_last(); + if ($options !== null) { + $result = \ingres_connect($database, $username, $password, $options); + } elseif ($password !== null) { + $result = \ingres_connect($database, $username, $password); + } elseif ($username !== null) { + $result = \ingres_connect($database, $username); + } elseif ($database !== null) { + $result = \ingres_connect($database); + } else { + $result = \ingres_connect(); + } + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } + return $result; +} + + +/** + * Execute a query prepared using ingres_prepare. + * + * @param resource $result The result query identifier + * @param array $params An array of parameter values to be used with the query + * @param string $types A string containing a sequence of types for the parameter values + * passed. See the types parameter in + * ingres_query for the list of type codes. + * @throws IngresiiException + * + */ +function ingres_execute($result, array $params = null, string $types = null): void +{ + error_clear_last(); + if ($types !== null) { + $result = \ingres_execute($result, $params, $types); + } elseif ($params !== null) { + $result = \ingres_execute($result, $params); + } else { + $result = \ingres_execute($result); + } + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * ingres_field_name returns the name of a field + * in a query result. + * + * @param resource $result The query result identifier + * @param int $index index is the field whose name will be + * retrieved. + * + * The possible values of index depend upon + * the value + * of ingres.array_index_start. + * If ingres.array_index_start + * is 1 (the default) + * then index must be + * between 1 and the value returned + * by ingres_num_fields. If ingres.array_index_start + * is 0 then index must + * be between 0 + * and ingres_num_fields - + * 1. + * @return string Returns the name of a field + * in a query result + * @throws IngresiiException + * + */ +function ingres_field_name($result, int $index): string +{ + error_clear_last(); + $result = \ingres_field_name($result, $index); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } + return $result; +} + + +/** + * Get the type of a field in a query result. + * + * @param resource $result The query result identifier + * @param int $index index is the field whose type will be + * retrieved. + * + * The possible values of index depend upon + * the value + * of ingres.array_index_start. + * If ingres.array_index_start + * is 1 (the default) + * then index must be + * between 1 and the value returned + * by ingres_num_fields. If ingres.array_index_start + * is 0 then index must + * be between 0 + * and ingres_num_fields - + * 1. + * @return string ingres_field_type returns the type of a + * field in a query result. Examples of + * types returned are IIAPI_BYTE_TYPE, + * IIAPI_CHA_TYPE, IIAPI_DTE_TYPE, + * IIAPI_FLT_TYPE, IIAPI_INT_TYPE, + * IIAPI_VCH_TYPE. Some of these types can map to more + * than one SQL type depending on the length of the field (see + * ingres_field_length). For example + * IIAPI_FLT_TYPE can be a float4 or a float8. For detailed + * information, see the Ingres OpenAPI User Guide, Appendix + * "Data Types" in the Ingres documentation. + * @throws IngresiiException + * + */ +function ingres_field_type($result, int $index): string +{ + error_clear_last(); + $result = \ingres_field_type($result, $index); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $result The query result identifier + * @throws IngresiiException + * + */ +function ingres_free_result($result): void +{ + error_clear_last(); + $result = \ingres_free_result($result); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * Open a persistent connection to an Ingres database. + * + * There are only two differences between this function and + * ingres_connect: First, when connecting, the + * function will initially try to find a (persistent) link that is + * already opened with the same parameters. If one is found, an + * identifier for it will be returned instead of opening a new + * connection. Second, the connection to the Ingres server will not + * be closed when the execution of the script ends. Instead, the + * link will remain open for future use + * (ingres_close will not close links + * established by ingres_pconnect). This type + * of link is therefore called "persistent". + * + * @param string $database The database name. Must follow the syntax: + * + * [vnode::]dbname[/svr_class] + * @param string $username The Ingres user name + * @param string $password The password associated with username + * @param array $options See ingres_connect for the list of options that + * can be passed + * @return resource Returns an Ingres link resource on success + * @throws IngresiiException + * + */ +function ingres_pconnect(string $database = null, string $username = null, string $password = null, array $options = null) +{ + error_clear_last(); + if ($options !== null) { + $result = \ingres_pconnect($database, $username, $password, $options); + } elseif ($password !== null) { + $result = \ingres_pconnect($database, $username, $password); + } elseif ($username !== null) { + $result = \ingres_pconnect($database, $username); + } elseif ($database !== null) { + $result = \ingres_pconnect($database); + } else { + $result = \ingres_pconnect(); + } + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is used to position the cursor associated with the result + * resource before issuing a fetch. If ingres.array_index_start + * is set to 0 then the first row is 0 else it is 1. + * ingres_result_seek can be used only with queries that + * make use of scrollable + * cursors. It cannot be used with + * ingres_unbuffered_query. + * + * @param resource $result The result identifier for a query + * @param int $position The row to position the cursor on. If ingres.array_index_start + * is set to 0, then the first row is 0, else it is 1 + * @throws IngresiiException + * + */ +function ingres_result_seek($result, int $position): void +{ + error_clear_last(); + $result = \ingres_result_seek($result, $position); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * ingres_rollback rolls back the currently + * open transaction, actually cancelling all changes made to the + * database during the transaction. + * + * This closes the transaction. A new transaction can be opened by sending a + * query with ingres_query. + * + * @param resource $link The connection link identifier + * @throws IngresiiException + * + */ +function ingres_rollback($link): void +{ + error_clear_last(); + $result = \ingres_rollback($link); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} + + +/** + * ingres_set_environment is called to set environmental + * options that affect the output of certain values from Ingres, such as the + * timezone, date format, decimal character separator, and float precision. + * + * @param resource $link The connection link identifier + * @param array $options An enumerated array of option name/value pairs. The following table + * lists the option name and the expected type + * + * + * + * + * + * Option name + * Option type + * Description + * Example + * + * + * + * + * date_century_boundary + * integer + * The threshold by which a 2-digit year is determined to be in + * the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY + * 50 + * + * + * timezone + * string + * Controls the timezone of the session. If not set, it will + * default the value defined by II_TIMEZONE_NAME. If + * II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight + * Savings) is used. + * UNITED-KINGDOM + * + * + * date_format + * integer + * Sets the allowable input and output format for Ingres dates. + * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is + * not set, the default date format is US, for example mm/dd/yy. Valid values + * for date_format are: + * + * INGRES_DATE_DMY + * INGRES_DATE_FINISH + * INGRES_DATE_GERMAN + * INGRES_DATE_ISO + * INGRES_DATE_ISO4 + * INGRES_DATE_MDY + * INGRES_DATE_MULTINATIONAL + * INGRES_DATE_MULTINATIONAL4 + * INGRES_DATE_YMD + * INGRES_DATE_US + * + * + * + * INGRES_DATE_ISO4 + * + * + * decimal_separator + * string + * The character identifier for decimal data + * "," + * + * + * money_lort + * integer + * Leading or trailing currency sign. Valid values for money_lort + * are: + * + * INGRES_MONEY_LEADING + * INGRES_MONEY_TRAILING + * + * + * + * INGRES_MONEY_LEADING + * + * + * money_sign + * string + * The currency symbol to be used with the MONEY datatype + * € + * + * + * money_precision + * integer + * The precision of the MONEY datatype + * 2 + * + * + * float4_precision + * integer + * Precision of the FLOAT4 datatype + * 10 + * + * + * float8_precision + * integer + * Precision of the FLOAT8 data + * 10 + * + * + * blob_segment_length + * integer + * The amount of data in bytes to fetch at a time when retrieving + * BLOB or CLOB data. Defaults to 4096 bytes when not set explicitly + * 8192 + * + * + * + * + * + * Sets the allowable input and output format for Ingres dates. + * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is + * not set, the default date format is US, for example mm/dd/yy. Valid values + * for date_format are: + * + * INGRES_DATE_DMY + * INGRES_DATE_FINISH + * INGRES_DATE_GERMAN + * INGRES_DATE_ISO + * INGRES_DATE_ISO4 + * INGRES_DATE_MDY + * INGRES_DATE_MULTINATIONAL + * INGRES_DATE_MULTINATIONAL4 + * INGRES_DATE_YMD + * INGRES_DATE_US + * + * + * Leading or trailing currency sign. Valid values for money_lort + * are: + * + * INGRES_MONEY_LEADING + * INGRES_MONEY_TRAILING + * + * @throws IngresiiException + * + */ +function ingres_set_environment($link, array $options): void +{ + error_clear_last(); + $result = \ingres_set_environment($link, $options); + if ($result === false) { + throw IngresiiException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/inotify.php b/vendor/thecodingmachine/safe/generated/inotify.php new file mode 100644 index 000000000..2e0704159 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/inotify.php @@ -0,0 +1,44 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\InotifyException; + +/** + * Initialize an inotify instance for use with + * inotify_add_watch + * + * @return resource A stream resource. + * @throws InotifyException + * + */ +function inotify_init() +{ + error_clear_last(); + $result = \inotify_init(); + if ($result === false) { + throw InotifyException::createFromPhpError(); + } + return $result; +} + + +/** + * inotify_rm_watch removes the watch + * watch_descriptor from the inotify instance + * inotify_instance. + * + * @param resource $inotify_instance Resource returned by + * inotify_init + * @param int $watch_descriptor Watch to remove from the instance + * @throws InotifyException + * + */ +function inotify_rm_watch($inotify_instance, int $watch_descriptor): void +{ + error_clear_last(); + $result = \inotify_rm_watch($inotify_instance, $watch_descriptor); + if ($result === false) { + throw InotifyException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/json.php b/vendor/thecodingmachine/safe/generated/json.php new file mode 100644 index 000000000..dad455ccd --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/json.php @@ -0,0 +1,73 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\JsonException; + +/** + * Returns a string containing the JSON representation of the supplied + * value. + * + * The encoding is affected by the supplied options + * and additionally the encoding of float values depends on the value of + * serialize_precision. + * + * @param mixed $value The value being encoded. Can be any type except + * a resource. + * + * All string data must be UTF-8 encoded. + * + * PHP implements a superset of JSON as specified in the original + * RFC 7159. + * @param int $options Bitmask consisting of + * JSON_FORCE_OBJECT, + * JSON_HEX_QUOT, + * JSON_HEX_TAG, + * JSON_HEX_AMP, + * JSON_HEX_APOS, + * JSON_INVALID_UTF8_IGNORE, + * JSON_INVALID_UTF8_SUBSTITUTE, + * JSON_NUMERIC_CHECK, + * JSON_PARTIAL_OUTPUT_ON_ERROR, + * JSON_PRESERVE_ZERO_FRACTION, + * JSON_PRETTY_PRINT, + * JSON_UNESCAPED_LINE_TERMINATORS, + * JSON_UNESCAPED_SLASHES, + * JSON_UNESCAPED_UNICODE, + * JSON_THROW_ON_ERROR. + * The behaviour of these constants is described on the + * JSON constants page. + * @param int $depth Set the maximum depth. Must be greater than zero. + * @return string Returns a JSON encoded string on success. + * @throws JsonException + * + */ +function json_encode($value, int $options = 0, int $depth = 512): string +{ + error_clear_last(); + $result = \json_encode($value, $options, $depth); + if ($result === false) { + throw JsonException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the error string of the last json_encode or json_decode + * call, which did not specify JSON_THROW_ON_ERROR. + * + * @return string Returns the error message on success, "No error" if no + * error has occurred. + * @throws JsonException + * + */ +function json_last_error_msg(): string +{ + error_clear_last(); + $result = \json_last_error_msg(); + if ($result === false) { + throw JsonException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/ldap.php b/vendor/thecodingmachine/safe/generated/ldap.php new file mode 100644 index 000000000..871f29580 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ldap.php @@ -0,0 +1,1603 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\LdapException; + +/** + * Does the same thing as ldap_add but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_add_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_add_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Add entries in the LDAP directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An array that specifies the information about the entry. The values in + * the entries are indexed by individual attributes. + * In case of multiple values for an attribute, they are indexed using + * integers starting with 0. + * + * + * + * ]]> + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_add($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Does the same thing as ldap_bind but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string|null $bind_rdn + * @param string|null $bind_password + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_bind_ext($link_identifier, ?string $bind_rdn = null, ?string $bind_password = null, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_bind_ext($link_identifier, $bind_rdn, $bind_password, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Binds to the LDAP directory with specified RDN and password. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string|null $bind_rdn + * @param string|null $bind_password + * @throws LdapException + * + */ +function ldap_bind($link_identifier, ?string $bind_rdn = null, ?string $bind_password = null): void +{ + error_clear_last(); + $result = \ldap_bind($link_identifier, $bind_rdn, $bind_password); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Retrieve the pagination information send by the server. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param resource $result + * @param string|null $cookie An opaque structure sent by the server. + * @param int|null $estimated The estimated number of entries to retrieve. + * @throws LdapException + * + */ +function ldap_control_paged_result_response($link, $result, ?string &$cookie = null, ?int &$estimated = null): void +{ + error_clear_last(); + $result = \ldap_control_paged_result_response($link, $result, $cookie, $estimated); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Enable LDAP pagination by sending the pagination control (page size, cookie...). + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param int $pagesize The number of entries by page. + * @param bool $iscritical Indicates whether the pagination is critical or not. + * If true and if the server doesn't support pagination, the search + * will return no result. + * @param string $cookie An opaque structure sent by the server + * (ldap_control_paged_result_response). + * @throws LdapException + * + */ +function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): void +{ + error_clear_last(); + $result = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Returns the number of entries stored in the result of previous search + * operations. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_identifier The internal LDAP result. + * @return int Returns number of entries in the result. + * @throws LdapException + * + */ +function ldap_count_entries($link_identifier, $result_identifier): int +{ + error_clear_last(); + $result = \ldap_count_entries($link_identifier, $result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Does the same thing as ldap_delete but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_delete_ext($link_identifier, string $dn, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_delete_ext($link_identifier, $dn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Deletes a particular entry in LDAP directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_delete($link_identifier, string $dn, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_delete($link_identifier, $dn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Performs a PASSWD extended operation. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param string $user dn of the user to change the password of. + * @param string $oldpw The old password of this user. May be ommited depending of server configuration. + * @param string $newpw The new password for this user. May be omitted or empty to have a generated password. + * @param array $serverctrls If provided, a password policy request control is send with the request and this is + * filled with an array of LDAP Controls + * returned with the request. + * @return mixed Returns the generated password if newpw is empty or omitted. + * Otherwise returns TRUE on success. + * @throws LdapException + * + */ +function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", array &$serverctrls = null) +{ + error_clear_last(); + $result = \ldap_exop_passwd($link, $user, $oldpw, $newpw, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Performs a WHOAMI extended operation and returns the data. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @return string The data returned by the server. + * @throws LdapException + * + */ +function ldap_exop_whoami($link): string +{ + error_clear_last(); + $result = \ldap_exop_whoami($link); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Performs an extended operation on the specified link with + * reqoid the OID of the operation and + * reqdata the data. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send. + * @param string $reqdata The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded. + * @param array|null $serverctrls Array of LDAP Controls to send with the request. + * @param string|null $retdata Will be filled with the extended operation response data if provided. + * If not provided you may use ldap_parse_exop on the result object + * later to get this data. + * @param string|null $retoid Will be filled with the response OID if provided, usually equal to the request OID. + * @return mixed When used with retdata, returns TRUE on success. + * When used without retdata, returns a result identifier. + * @throws LdapException + * + */ +function ldap_exop($link, string $reqoid, string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null) +{ + error_clear_last(); + $result = \ldap_exop($link, $reqoid, $reqdata, $serverctrls, $retdata, $retoid); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Splits the DN returned by ldap_get_dn and breaks it + * up into its component parts. Each part is known as Relative Distinguished + * Name, or RDN. + * + * @param string $dn The distinguished name of an LDAP entity. + * @param int $with_attrib Used to request if the RDNs are returned with only values or their + * attributes as well. To get RDNs with the attributes (i.e. in + * attribute=value format) set with_attrib to 0 + * and to get only values set it to 1. + * @return array Returns an array of all DN components. + * The first element in the array has count key and + * represents the number of returned values, next elements are numerically + * indexed DN components. + * @throws LdapException + * + */ +function ldap_explode_dn(string $dn, int $with_attrib): array +{ + error_clear_last(); + $result = \ldap_explode_dn($dn, $with_attrib); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the first attribute in the given entry. Remaining attributes are + * retrieved by calling ldap_next_attribute successively. + * + * Similar to reading entries, attributes are also read one by one from a + * particular entry. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return string Returns the first attribute in the entry on success and FALSE on + * error. + * @throws LdapException + * + */ +function ldap_first_attribute($link_identifier, $result_entry_identifier): string +{ + error_clear_last(); + $result = \ldap_first_attribute($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the entry identifier for first entry in the result. This entry + * identifier is then supplied to ldap_next_entry + * routine to get successive entries from the result. + * + * Entries in the LDAP result are read sequentially using the + * ldap_first_entry and + * ldap_next_entry functions. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_identifier + * @return resource Returns the result entry identifier for the first entry on success and + * FALSE on error. + * @throws LdapException + * + */ +function ldap_first_entry($link_identifier, $result_identifier) +{ + error_clear_last(); + $result = \ldap_first_entry($link_identifier, $result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Frees up the memory allocated internally to store the result. All result + * memory will be automatically freed when the script terminates. + * + * Typically all the memory allocated for the LDAP result gets freed at the + * end of the script. In case the script is making successive searches which + * return large result sets, ldap_free_result could be + * called to keep the runtime memory usage by the script low. + * + * @param resource $result_identifier + * @throws LdapException + * + */ +function ldap_free_result($result_identifier): void +{ + error_clear_last(); + $result = \ldap_free_result($result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Reads attributes and values from an entry in the search result. + * + * Having located a specific entry in the directory, you can find out what + * information is held for that entry by using this call. You would use this + * call for an application which "browses" directory entries and/or where you + * do not know the structure of the directory entries. In many applications + * you will be searching for a specific attribute such as an email address or + * a surname, and won't care what other data is held. + * + * + * + * + * + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return array Returns a complete entry information in a multi-dimensional array + * on success and FALSE on error. + * @throws LdapException + * + */ +function ldap_get_attributes($link_identifier, $result_entry_identifier): array +{ + error_clear_last(); + $result = \ldap_get_attributes($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Finds out the DN of an entry in the result. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return string Returns the DN of the result entry and FALSE on error. + * @throws LdapException + * + */ +function ldap_get_dn($link_identifier, $result_entry_identifier): string +{ + error_clear_last(); + $result = \ldap_get_dn($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads multiple entries from the given result, and then reading the + * attributes and multiple values. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_identifier + * @return array Returns a complete result information in a multi-dimensional array on + * success and FALSE on error. + * + * The structure of the array is as follows. + * The attribute index is converted to lowercase. (Attributes are + * case-insensitive for directory servers, but not when used as + * array indices.) + * + * + * + * + * + * @throws LdapException + * + */ +function ldap_get_entries($link_identifier, $result_identifier): array +{ + error_clear_last(); + $result = \ldap_get_entries($link_identifier, $result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets retval to the value of the specified option. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param int $option The parameter option can be one of: + * + * + * + * + * Option + * Type + * since + * + * + * + * + * LDAP_OPT_DEREF + * integer + * + * + * + * LDAP_OPT_SIZELIMIT + * integer + * + * + * + * LDAP_OPT_TIMELIMIT + * integer + * + * + * + * LDAP_OPT_NETWORK_TIMEOUT + * integer + * + * + * + * LDAP_OPT_PROTOCOL_VERSION + * integer + * + * + * + * LDAP_OPT_ERROR_NUMBER + * integer + * + * + * + * LDAP_OPT_DIAGNOSTIC_MESSAGE + * integer + * + * + * + * LDAP_OPT_REFERRALS + * bool + * + * + * + * LDAP_OPT_RESTART + * bool + * + * + * + * LDAP_OPT_HOST_NAME + * string + * + * + * + * LDAP_OPT_ERROR_STRING + * string + * + * + * + * LDAP_OPT_MATCHED_DN + * string + * + * + * + * LDAP_OPT_SERVER_CONTROLS + * array + * + * + * + * LDAP_OPT_CLIENT_CONTROLS + * array + * + * + * + * LDAP_OPT_X_KEEPALIVE_IDLE + * int + * 7.1 + * + * + * LDAP_OPT_X_KEEPALIVE_PROBES + * int + * 7.1 + * + * + * LDAP_OPT_X_KEEPALIVE_INTERVAL + * int + * 7.1 + * + * + * LDAP_OPT_X_TLS_CACERTDIR + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CACERTFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CERTFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CIPHER_SUITE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRLCHECK + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRL_NONE + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRL_PEER + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRL_ALL + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRLFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_DHFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_KEYILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_PACKAGE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_PROTOCOL_MIN + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_RANDOM_FILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_REQUIRE_CERT + * integer + * + * + * + * + * + * @param mixed $retval This will be set to the option value. + * @throws LdapException + * + */ +function ldap_get_option($link_identifier, int $option, &$retval): void +{ + error_clear_last(); + $result = \ldap_get_option($link_identifier, $option, $retval); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Reads all the values of the attribute in the entry in the result. + * + * This function is used exactly like ldap_get_values + * except that it handles binary data and not string data. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @param string $attribute + * @return array Returns an array of values for the attribute on success and FALSE on + * error. Individual values are accessed by integer index in the array. The + * first index is 0. The number of values can be found by indexing "count" + * in the resultant array. + * @throws LdapException + * + */ +function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array +{ + error_clear_last(); + $result = \ldap_get_values_len($link_identifier, $result_entry_identifier, $attribute); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads all the values of the attribute in the entry in the result. + * + * This call needs a result_entry_identifier, + * so needs to be preceded by one of the ldap search calls and one + * of the calls to get an individual entry. + * + * You application will either be hard coded to look for certain + * attributes (such as "surname" or "mail") or you will have to use + * the ldap_get_attributes call to work out + * what attributes exist for a given entry. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @param string $attribute + * @return array Returns an array of values for the attribute on success and FALSE on + * error. The number of values can be found by indexing "count" in the + * resultant array. Individual values are accessed by integer index in the + * array. The first index is 0. + * + * LDAP allows more than one entry for an attribute, so it can, for example, + * store a number of email addresses for one person's directory entry all + * labeled with the attribute "mail" + * + * + * return_value["count"] = number of values for attribute + * return_value[0] = first value of attribute + * return_value[i] = ith value of attribute + * + * + * @throws LdapException + * + */ +function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array +{ + error_clear_last(); + $result = \ldap_get_values($link_identifier, $result_entry_identifier, $attribute); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Performs the search for a specified filter on the + * directory with the scope LDAP_SCOPE_ONELEVEL. + * + * LDAP_SCOPE_ONELEVEL means that the search should only + * return information that is at the level immediately below the + * base_dn given in the call. + * (Equivalent to typing "ls" and getting a list of files and folders in the + * current working directory.) + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $base_dn The base DN for the directory. + * @param string $filter + * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). + * Note that the "dn" is always returned irrespective of which attributes + * types are requested. + * + * Using this parameter is much more efficient than the default action + * (which is to return all attributes and their associated values). + * The use of this parameter should therefore be considered good + * practice. + * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 + * both attributes types and attribute values are fetched which is the + * default behaviour. + * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 + * means no limit. + * + * This parameter can NOT override server-side preset sizelimit. You can + * set it lower though. + * + * Some directory server hosts will be configured to return no more than + * a preset number of entries. If this occurs, the server will indicate + * that it has only returned a partial results set. This also occurs if + * you use this parameter to limit the count of fetched entries. + * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting + * this to 0 means no limit. + * + * This parameter can NOT override server-side preset timelimit. You can + * set it lower though. + * @param int $deref Specifies how aliases should be handled during the search. It can be + * one of the following: + * + * + * + * LDAP_DEREF_NEVER - (default) aliases are never + * dereferenced. + * + * + * + * + * LDAP_DEREF_SEARCHING - aliases should be + * dereferenced during the search but not when locating the base object + * of the search. + * + * + * + * + * LDAP_DEREF_FINDING - aliases should be + * dereferenced when locating the base object but not during the search. + * + * + * + * + * LDAP_DEREF_ALWAYS - aliases should be dereferenced + * always. + * + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @return resource Returns a search result identifier. + * @throws LdapException + * + */ +function ldap_list($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null) +{ + error_clear_last(); + if ($serverctrls !== null) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls); + } elseif ($deref !== LDAP_DEREF_NEVER) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); + } elseif ($timelimit !== -1) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit); + } elseif ($sizelimit !== -1) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit); + } elseif ($attrsonly !== 0) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly); + } elseif ($attributes !== null) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes); + } else { + $result = \ldap_list($link_identifier, $base_dn, $filter); + } + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Does the same thing as ldap_mod_add but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_mod_add_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Adds one or more attribute values to the specified dn. + * To add a whole new object see ldap_add function. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_mod_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_mod_add($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Does the same thing as ldap_mod_del but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_mod_del_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_mod_del_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Removes one or more attribute values from the specified dn. + * Object deletions are done by the + * ldap_delete function. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_mod_del($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_mod_del($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Does the same thing as ldap_mod_replace but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_mod_replace_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_mod_replace_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Replaces one or more attributes from the specified dn. + * It may also add or remove attributes. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_mod_replace($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_mod_replace($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Modifies an existing entry in the LDAP directory. Allows detailed + * specification of the modifications to perform. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An array that specifies the modifications to make. Each entry in this + * array is an associative array with two or three keys: + * attrib maps to the name of the attribute to modify, + * modtype maps to the type of modification to perform, + * and (depending on the type of modification) values + * maps to an array of attribute values relevant to the modification. + * + * Possible values for modtype include: + * + * + * LDAP_MODIFY_BATCH_ADD + * + * + * Each value specified through values is added (as + * an additional value) to the attribute named by + * attrib. + * + * + * + * + * LDAP_MODIFY_BATCH_REMOVE + * + * + * Each value specified through values is removed + * from the attribute named by attrib. Any value of + * the attribute not contained in the values array + * will remain untouched. + * + * + * + * + * LDAP_MODIFY_BATCH_REMOVE_ALL + * + * + * All values are removed from the attribute named by + * attrib. A values entry must + * not be provided. + * + * + * + * + * LDAP_MODIFY_BATCH_REPLACE + * + * + * All current values of the attribute named by + * attrib are replaced with the values specified + * through values. + * + * + * + * + * + * Each value specified through values is added (as + * an additional value) to the attribute named by + * attrib. + * + * Each value specified through values is removed + * from the attribute named by attrib. Any value of + * the attribute not contained in the values array + * will remain untouched. + * + * All values are removed from the attribute named by + * attrib. A values entry must + * not be provided. + * + * All current values of the attribute named by + * attrib are replaced with the values specified + * through values. + * + * Note that any value for attrib must be a string, any + * value for values must be an array of strings, and + * any value for modtype must be one of the + * LDAP_MODIFY_BATCH_* constants listed above. + * @param array $serverctrls Each value specified through values is added (as + * an additional value) to the attribute named by + * attrib. + * @throws LdapException + * + */ +function ldap_modify_batch($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_modify_batch($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Retrieves the attributes in an entry. The first call to + * ldap_next_attribute is made with the + * result_entry_identifier returned from + * ldap_first_attribute. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return string Returns the next attribute in an entry on success and FALSE on + * error. + * @throws LdapException + * + */ +function ldap_next_attribute($link_identifier, $result_entry_identifier): string +{ + error_clear_last(); + $result = \ldap_next_attribute($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Parse LDAP extended operation data from result object result + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param resource $result An LDAP result resource, returned by ldap_exop. + * @param string|null $retdata Will be filled by the response data. + * @param string|null $retoid Will be filled by the response OID. + * @throws LdapException + * + */ +function ldap_parse_exop($link, $result, ?string &$retdata = null, ?string &$retoid = null): void +{ + error_clear_last(); + $result = \ldap_parse_exop($link, $result, $retdata, $retoid); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Parses an LDAP search result. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param resource $result An LDAP result resource, returned by ldap_list or + * ldap_search. + * @param int|null $errcode A reference to a variable that will be set to the LDAP error code in + * the result, or 0 if no error occurred. + * @param string|null $matcheddn A reference to a variable that will be set to a matched DN if one was + * recognised within the request, otherwise it will be set to NULL. + * @param string|null $errmsg A reference to a variable that will be set to the LDAP error message in + * the result, or an empty string if no error occurred. + * @param array|null $referrals A reference to a variable that will be set to an array set + * to all of the referral strings in the result, or an empty array if no + * referrals were returned. + * @param array|null $serverctrls An array of LDAP Controls which have been sent with the response. + * @throws LdapException + * + */ +function ldap_parse_result($link, $result, ?int &$errcode, ?string &$matcheddn = null, ?string &$errmsg = null, ?array &$referrals = null, ?array &$serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_parse_result($link, $result, $errcode, $matcheddn, $errmsg, $referrals, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Performs the search for a specified filter on the + * directory with the scope LDAP_SCOPE_BASE. So it is + * equivalent to reading an entry from the directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $base_dn The base DN for the directory. + * @param string $filter An empty filter is not allowed. If you want to retrieve absolutely all + * information for this entry, use a filter of + * objectClass=*. If you know which entry types are + * used on the directory server, you might use an appropriate filter such + * as objectClass=inetOrgPerson. + * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). + * Note that the "dn" is always returned irrespective of which attributes + * types are requested. + * + * Using this parameter is much more efficient than the default action + * (which is to return all attributes and their associated values). + * The use of this parameter should therefore be considered good + * practice. + * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 + * both attributes types and attribute values are fetched which is the + * default behaviour. + * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 + * means no limit. + * + * This parameter can NOT override server-side preset sizelimit. You can + * set it lower though. + * + * Some directory server hosts will be configured to return no more than + * a preset number of entries. If this occurs, the server will indicate + * that it has only returned a partial results set. This also occurs if + * you use this parameter to limit the count of fetched entries. + * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting + * this to 0 means no limit. + * + * This parameter can NOT override server-side preset timelimit. You can + * set it lower though. + * @param int $deref Specifies how aliases should be handled during the search. It can be + * one of the following: + * + * + * + * LDAP_DEREF_NEVER - (default) aliases are never + * dereferenced. + * + * + * + * + * LDAP_DEREF_SEARCHING - aliases should be + * dereferenced during the search but not when locating the base object + * of the search. + * + * + * + * + * LDAP_DEREF_FINDING - aliases should be + * dereferenced when locating the base object but not during the search. + * + * + * + * + * LDAP_DEREF_ALWAYS - aliases should be dereferenced + * always. + * + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @return resource Returns a search result identifier. + * @throws LdapException + * + */ +function ldap_read($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null) +{ + error_clear_last(); + if ($serverctrls !== null) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls); + } elseif ($deref !== LDAP_DEREF_NEVER) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); + } elseif ($timelimit !== -1) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit); + } elseif ($sizelimit !== -1) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit); + } elseif ($attrsonly !== 0) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly); + } elseif ($attributes !== null) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes); + } else { + $result = \ldap_read($link_identifier, $base_dn, $filter); + } + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Does the same thing as ldap_rename but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param string $newrdn + * @param string $newparent + * @param bool $deleteoldrdn + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_rename_ext($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * The entry specified by dn is renamed/moved. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param string $newrdn The new RDN. + * @param string $newparent The new parent/superior entry. + * @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) + * is retained as non-distinguished values of the entry. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_rename($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_rename($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $link + * @param string $binddn + * @param string $password + * @param string $sasl_mech + * @param string $sasl_realm + * @param string $sasl_authc_id + * @param string $sasl_authz_id + * @param string $props + * @throws LdapException + * + */ +function ldap_sasl_bind($link, string $binddn = null, string $password = null, string $sasl_mech = null, string $sasl_realm = null, string $sasl_authc_id = null, string $sasl_authz_id = null, string $props = null): void +{ + error_clear_last(); + $result = \ldap_sasl_bind($link, $binddn, $password, $sasl_mech, $sasl_realm, $sasl_authc_id, $sasl_authz_id, $props); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Performs the search for a specified filter on the directory with the scope + * of LDAP_SCOPE_SUBTREE. This is equivalent to searching + * the entire directory. + * + * From 4.0.5 on it's also possible to do parallel searches. To do this + * you use an array of link identifiers, rather than a single identifier, + * as the first argument. If you don't want the same base DN and the + * same filter for all the searches, you can also use an array of base DNs + * and/or an array of filters. Those arrays must be of the same size as + * the link identifier array since the first entries of the arrays are + * used for one search, the second entries are used for another, and so + * on. When doing parallel searches an array of search result + * identifiers is returned, except in case of error, then the entry + * corresponding to the search will be FALSE. This is very much like + * the value normally returned, except that a result identifier is always + * returned when a search was made. There are some rare cases where the + * normal search returns FALSE while the parallel search returns an + * identifier. + * + * @param resource|array $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $base_dn The base DN for the directory. + * @param string $filter The search filter can be simple or advanced, using boolean operators in + * the format described in the LDAP documentation (see the Netscape Directory SDK or + * RFC4515 for full + * information on filters). + * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). + * Note that the "dn" is always returned irrespective of which attributes + * types are requested. + * + * Using this parameter is much more efficient than the default action + * (which is to return all attributes and their associated values). + * The use of this parameter should therefore be considered good + * practice. + * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 + * both attributes types and attribute values are fetched which is the + * default behaviour. + * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 + * means no limit. + * + * This parameter can NOT override server-side preset sizelimit. You can + * set it lower though. + * + * Some directory server hosts will be configured to return no more than + * a preset number of entries. If this occurs, the server will indicate + * that it has only returned a partial results set. This also occurs if + * you use this parameter to limit the count of fetched entries. + * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting + * this to 0 means no limit. + * + * This parameter can NOT override server-side preset timelimit. You can + * set it lower though. + * @param int $deref Specifies how aliases should be handled during the search. It can be + * one of the following: + * + * + * + * LDAP_DEREF_NEVER - (default) aliases are never + * dereferenced. + * + * + * + * + * LDAP_DEREF_SEARCHING - aliases should be + * dereferenced during the search but not when locating the base object + * of the search. + * + * + * + * + * LDAP_DEREF_FINDING - aliases should be + * dereferenced when locating the base object but not during the search. + * + * + * + * + * LDAP_DEREF_ALWAYS - aliases should be dereferenced + * always. + * + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @return resource Returns a search result identifier. + * @throws LdapException + * + */ +function ldap_search($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null) +{ + error_clear_last(); + if ($serverctrls !== null) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls); + } elseif ($deref !== LDAP_DEREF_NEVER) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); + } elseif ($timelimit !== -1) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit); + } elseif ($sizelimit !== -1) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit); + } elseif ($attrsonly !== 0) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly); + } elseif ($attributes !== null) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes); + } else { + $result = \ldap_search($link_identifier, $base_dn, $filter); + } + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the value of the specified option to be newval. + * + * @param resource|null $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param int $option The parameter option can be one of: + * + * + * + * + * Option + * Type + * Available since + * + * + * + * + * LDAP_OPT_DEREF + * integer + * + * + * + * LDAP_OPT_SIZELIMIT + * integer + * + * + * + * LDAP_OPT_TIMELIMIT + * integer + * + * + * + * LDAP_OPT_NETWORK_TIMEOUT + * integer + * PHP 5.3.0 + * + * + * LDAP_OPT_PROTOCOL_VERSION + * integer + * + * + * + * LDAP_OPT_ERROR_NUMBER + * integer + * + * + * + * LDAP_OPT_REFERRALS + * bool + * + * + * + * LDAP_OPT_RESTART + * bool + * + * + * + * LDAP_OPT_HOST_NAME + * string + * + * + * + * LDAP_OPT_ERROR_STRING + * string + * + * + * + * LDAP_OPT_DIAGNOSTIC_MESSAGE + * string + * + * + * + * LDAP_OPT_MATCHED_DN + * string + * + * + * + * LDAP_OPT_SERVER_CONTROLS + * array + * + * + * + * LDAP_OPT_CLIENT_CONTROLS + * array + * + * + * + * LDAP_OPT_X_KEEPALIVE_IDLE + * int + * PHP 7.1.0 + * + * + * LDAP_OPT_X_KEEPALIVE_PROBES + * int + * PHP 7.1.0 + * + * + * LDAP_OPT_X_KEEPALIVE_INTERVAL + * int + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CACERTDIR + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CACERTFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CERTFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CIPHER_SUITE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CRLCHECK + * integer + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CRLFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_DHFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_KEYFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_PROTOCOL_MIN + * integer + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_RANDOM_FILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_REQUIRE_CERT + * integer + * PHP 7.0.5 + * + * + * + * + * + * LDAP_OPT_SERVER_CONTROLS and + * LDAP_OPT_CLIENT_CONTROLS require a list of + * controls, this means that the value must be an array of controls. A + * control consists of an oid identifying the control, + * an optional value, and an optional flag for + * criticality. In PHP a control is given by an + * array containing an element with the key oid + * and string value, and two optional elements. The optional + * elements are key value with string value + * and key iscritical with boolean value. + * iscritical defaults to FALSE + * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt + * for details. See also the second example below. + * @param mixed $newval The new value for the specified option. + * @throws LdapException + * + */ +function ldap_set_option($link_identifier, int $option, $newval): void +{ + error_clear_last(); + $result = \ldap_set_option($link_identifier, $option, $newval); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Unbinds from the LDAP directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @throws LdapException + * + */ +function ldap_unbind($link_identifier): void +{ + error_clear_last(); + $result = \ldap_unbind($link_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/libxml.php b/vendor/thecodingmachine/safe/generated/libxml.php new file mode 100644 index 000000000..cef784c42 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/libxml.php @@ -0,0 +1,43 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\LibxmlException; + +/** + * Retrieve last error from libxml. + * + * @return \LibXMLError Returns a LibXMLError object if there is any error in the + * buffer, FALSE otherwise. + * @throws LibxmlException + * + */ +function libxml_get_last_error(): \LibXMLError +{ + error_clear_last(); + $result = \libxml_get_last_error(); + if ($result === false) { + throw LibxmlException::createFromPhpError(); + } + return $result; +} + + +/** + * Changes the default external entity loader. + * + * @param callable $resolver_function A callable that takes three arguments. Two strings, a public id + * and system id, and a context (an array with four keys) as the third argument. + * This callback should return a resource, a string from which a resource can be + * opened, or NULL. + * @throws LibxmlException + * + */ +function libxml_set_external_entity_loader(callable $resolver_function): void +{ + error_clear_last(); + $result = \libxml_set_external_entity_loader($resolver_function); + if ($result === false) { + throw LibxmlException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/lzf.php b/vendor/thecodingmachine/safe/generated/lzf.php new file mode 100644 index 000000000..7fce838a4 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/lzf.php @@ -0,0 +1,44 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\LzfException; + +/** + * lzf_compress compresses the given + * data string using LZF encoding. + * + * @param string $data The string to compress. + * @return string Returns the compressed data. + * @throws LzfException + * + */ +function lzf_compress(string $data): string +{ + error_clear_last(); + $result = \lzf_compress($data); + if ($result === false) { + throw LzfException::createFromPhpError(); + } + return $result; +} + + +/** + * lzf_compress decompresses the given + * data string containing lzf encoded data. + * + * @param string $data The compressed string. + * @return string Returns the decompressed data. + * @throws LzfException + * + */ +function lzf_decompress(string $data): string +{ + error_clear_last(); + $result = \lzf_decompress($data); + if ($result === false) { + throw LzfException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/mailparse.php b/vendor/thecodingmachine/safe/generated/mailparse.php new file mode 100644 index 000000000..1bae182a6 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/mailparse.php @@ -0,0 +1,127 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MailparseException; + +/** + * Extracts/decodes a message section from the supplied filename. + * + * The contents of the section will be decoded according to their transfer + * encoding - base64, quoted-printable and uuencoded text are supported. + * + * @param resource $mimemail A valid MIME resource, created with + * mailparse_msg_create. + * @param mixed $filename Can be a file name or a valid stream resource. + * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the + * extracted section, or NULL to make this function return the + * extracted section. + * + * If not specified, the contents will be sent to "stdout". + * @return string If callbackfunc is not NULL returns TRUE on + * success. + * + * If callbackfunc is set to NULL, returns the + * extracted section as a string. + * @throws MailparseException + * + */ +function mailparse_msg_extract_part_file($mimemail, $filename, callable $callbackfunc = null): string +{ + error_clear_last(); + if ($callbackfunc !== null) { + $result = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc); + } else { + $result = \mailparse_msg_extract_part_file($mimemail, $filename); + } + if ($result === false) { + throw MailparseException::createFromPhpError(); + } + return $result; +} + + +/** + * Frees a MIME resource. + * + * @param resource $mimemail A valid MIME resource allocated by + * mailparse_msg_create or + * mailparse_msg_parse_file. + * @throws MailparseException + * + */ +function mailparse_msg_free($mimemail): void +{ + error_clear_last(); + $result = \mailparse_msg_free($mimemail); + if ($result === false) { + throw MailparseException::createFromPhpError(); + } +} + + +/** + * Parses a file. + * This is the optimal way of parsing a mail file that you have on disk. + * + * @param string $filename Path to the file holding the message. + * The file is opened and streamed through the parser. + * + * The message contained in filename is supposed to end with a newline + * (CRLF); otherwise the last line of the message will not be parsed. + * @return resource Returns a MIME resource representing the structure. + * @throws MailparseException + * + */ +function mailparse_msg_parse_file(string $filename) +{ + error_clear_last(); + $result = \mailparse_msg_parse_file($filename); + if ($result === false) { + throw MailparseException::createFromPhpError(); + } + return $result; +} + + +/** + * Incrementally parse data into the supplied mime mail resource. + * + * This function allow you to stream portions of a file at a time, rather + * than read and parse the whole thing. + * + * @param resource $mimemail A valid MIME resource. + * @param string $data The final chunk of data is supposed to end with a newline + * (CRLF); otherwise the last line of the message will not be parsed. + * @throws MailparseException + * + */ +function mailparse_msg_parse($mimemail, string $data): void +{ + error_clear_last(); + $result = \mailparse_msg_parse($mimemail, $data); + if ($result === false) { + throw MailparseException::createFromPhpError(); + } +} + + +/** + * Streams data from the source file pointer, apply + * encoding and write to the destination file pointer. + * + * @param resource $sourcefp A valid file handle. The file is streamed through the parser. + * @param resource $destfp The destination file handle in which the encoded data will be written. + * @param string $encoding One of the character encodings supported by the + * mbstring module. + * @throws MailparseException + * + */ +function mailparse_stream_encode($sourcefp, $destfp, string $encoding): void +{ + error_clear_last(); + $result = \mailparse_stream_encode($sourcefp, $destfp, $encoding); + if ($result === false) { + throw MailparseException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/mbstring.php b/vendor/thecodingmachine/safe/generated/mbstring.php new file mode 100644 index 000000000..fa0829438 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/mbstring.php @@ -0,0 +1,526 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MbstringException; + +/** + * + * + * @param int $cp + * @param string $encoding + * @return string Returns a specific character. + * @throws MbstringException + * + */ +function mb_chr(int $cp, string $encoding = null): string +{ + error_clear_last(); + if ($encoding !== null) { + $result = \mb_chr($cp, $encoding); + } else { + $result = \mb_chr($cp); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the automatic character + * encoding detection order to encoding_list. + * + * @param mixed $encoding_list encoding_list is an array or + * comma separated list of character encoding. See supported encodings. + * + * If encoding_list is omitted, it returns + * the current character encoding detection order as array. + * + * This setting affects mb_detect_encoding and + * mb_send_mail. + * + * mbstring currently implements the following + * encoding detection filters. If there is an invalid byte sequence + * for the following encodings, encoding detection will fail. + * + * For ISO-8859-*, mbstring + * always detects as ISO-8859-*. + * + * For UTF-16, UTF-32, + * UCS2 and UCS4, encoding + * detection will fail always. + * @return bool|array When setting the encoding detection order, TRUE is returned on success. + * + * When getting the encoding detection order, an ordered array of the encodings is returned. + * @throws MbstringException + * + */ +function mb_detect_order($encoding_list = null) +{ + error_clear_last(); + if ($encoding_list !== null) { + $result = \mb_detect_order($encoding_list); + } else { + $result = \mb_detect_order(); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns an array of aliases for a known encoding type. + * + * @param string $encoding The encoding type being checked, for aliases. + * @return array Returns a numerically indexed array of encoding aliases on success + * @throws MbstringException + * + */ +function mb_encoding_aliases(string $encoding): array +{ + error_clear_last(); + $result = \mb_encoding_aliases($encoding); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Scans string for matches to + * pattern, then replaces the matched text + * with the output of callback function. + * + * The behavior of this function is almost identical to mb_ereg_replace, + * except for the fact that instead of + * replacement parameter, one should specify a + * callback. + * + * @param string $pattern The regular expression pattern. + * + * Multibyte characters may be used in pattern. + * @param callable $callback A callback that will be called and passed an array of matched elements + * in the subject string. The callback should + * return the replacement string. + * + * You'll often need the callback function + * for a mb_ereg_replace_callback in just one place. + * In this case you can use an + * anonymous function to + * declare the callback within the call to + * mb_ereg_replace_callback. By doing it this way + * you have all information for the call in one place and do not + * clutter the function namespace with a callback function's name + * not used anywhere else. + * @param string $string The string being checked. + * @param string $option The search option. See mb_regex_set_options for explanation. + * @return string The resultant string on success. + * @throws MbstringException + * + */ +function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $option = "msr"): string +{ + error_clear_last(); + $result = \mb_ereg_replace_callback($pattern, $callback, $string, $option); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $pattern The regular expression pattern. + * + * Multibyte characters may be used in pattern. + * @param string $replacement The replacement text. + * @param string $string The string being checked. + * @param string $option + * @return string The resultant string on success. + * @throws MbstringException + * + */ +function mb_ereg_replace(string $pattern, string $replacement, string $string, string $option = "msr"): string +{ + error_clear_last(); + $result = \mb_ereg_replace($pattern, $replacement, $string, $option); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @return array + * @throws MbstringException + * + */ +function mb_ereg_search_getregs(): array +{ + error_clear_last(); + $result = \mb_ereg_search_getregs(); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * mb_ereg_search_init sets + * string and pattern + * for a multibyte regular expression. These values are used for + * mb_ereg_search, + * mb_ereg_search_pos, and + * mb_ereg_search_regs. + * + * @param string $string The search string. + * @param string $pattern The search pattern. + * @param string $option The search option. See mb_regex_set_options for explanation. + * @throws MbstringException + * + */ +function mb_ereg_search_init(string $string, string $pattern = null, string $option = "msr"): void +{ + error_clear_last(); + if ($option !== "msr") { + $result = \mb_ereg_search_init($string, $pattern, $option); + } elseif ($pattern !== null) { + $result = \mb_ereg_search_init($string, $pattern); + } else { + $result = \mb_ereg_search_init($string); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } +} + + +/** + * Returns the matched part of a multibyte regular expression. + * + * @param string $pattern The search pattern. + * @param string $option The search option. See mb_regex_set_options for explanation. + * @return array + * @throws MbstringException + * + */ +function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): array +{ + error_clear_last(); + if ($option !== "ms") { + $result = \mb_ereg_search_regs($pattern, $option); + } elseif ($pattern !== null) { + $result = \mb_ereg_search_regs($pattern); + } else { + $result = \mb_ereg_search_regs(); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param int $position The position to set. If it is negative, it counts from the end of the string. + * @throws MbstringException + * + */ +function mb_ereg_search_setpos(int $position): void +{ + error_clear_last(); + $result = \mb_ereg_search_setpos($position); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. + * @param string $replace The replacement text. + * @param string $string The searched string. + * @param string $option + * @return string The resultant string. + * @throws MbstringException + * + */ +function mb_eregi_replace(string $pattern, string $replace, string $string, string $option = "msri"): string +{ + error_clear_last(); + $result = \mb_eregi_replace($pattern, $replace, $string, $option); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Set/Get the HTTP output character encoding. + * Output after this function is called will be converted from the set internal encoding to encoding. + * + * @param string $encoding If encoding is set, + * mb_http_output sets the HTTP output character + * encoding to encoding. + * + * If encoding is omitted, + * mb_http_output returns the current HTTP output + * character encoding. + * @return string|bool If encoding is omitted, + * mb_http_output returns the current HTTP output + * character encoding. Otherwise, + * Returns TRUE on success. + * @throws MbstringException + * + */ +function mb_http_output(string $encoding = null) +{ + error_clear_last(); + if ($encoding !== null) { + $result = \mb_http_output($encoding); + } else { + $result = \mb_http_output(); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Set/Get the internal character encoding + * + * @param string $encoding encoding is the character encoding name + * used for the HTTP input character encoding conversion, HTTP output + * character encoding conversion, and the default character encoding + * for string functions defined by the mbstring module. + * You should notice that the internal encoding is totally different from the one for multibyte regex. + * @return string|bool If encoding is set, then + * Returns TRUE on success. + * In this case, the character encoding for multibyte regex is NOT changed. + * If encoding is omitted, then + * the current character encoding name is returned. + * @throws MbstringException + * + */ +function mb_internal_encoding(string $encoding = null) +{ + error_clear_last(); + if ($encoding !== null) { + $result = \mb_internal_encoding($encoding); + } else { + $result = \mb_internal_encoding(); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $str + * @param string $encoding + * @return int Returns a code point of character. + * @throws MbstringException + * + */ +function mb_ord(string $str, string $encoding = null): int +{ + error_clear_last(); + if ($encoding !== null) { + $result = \mb_ord($str, $encoding); + } else { + $result = \mb_ord($str); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Parses GET/POST/COOKIE data and + * sets global variables. Since PHP does not provide raw POST/COOKIE + * data, it can only be used for GET data for now. It parses URL + * encoded data, detects encoding, converts coding to internal + * encoding and set values to the result array or + * global variables. + * + * @param string $encoded_string The URL encoded data. + * @param array|null $result An array containing decoded and character encoded converted values. + * @throws MbstringException + * + */ +function mb_parse_str(string $encoded_string, ?array &$result): void +{ + error_clear_last(); + $result = \mb_parse_str($encoded_string, $result); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } +} + + +/** + * Set/Get character encoding for a multibyte regex. + * + * @param string $encoding The encoding + * parameter is the character encoding. If it is omitted, the internal character + * encoding value will be used. + * @return string|bool + * @throws MbstringException + * + */ +function mb_regex_encoding(string $encoding = null) +{ + error_clear_last(); + if ($encoding !== null) { + $result = \mb_regex_encoding($encoding); + } else { + $result = \mb_regex_encoding(); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * Sends email. Headers and messages are converted and encoded according + * to the mb_language setting. It's a wrapper function + * for mail, so see also mail for details. + * + * @param string $to The mail addresses being sent to. Multiple + * recipients may be specified by putting a comma between each + * address in to. + * This parameter is not automatically encoded. + * @param string $subject The subject of the mail. + * @param string $message The message of the mail. + * @param string|array|null $additional_headers String or array to be inserted at the end of the email header. + * + * This is typically used to add extra headers (From, Cc, and Bcc). + * Multiple extra headers should be separated with a CRLF (\r\n). + * Validate parameter not to be injected unwanted headers by attackers. + * + * If an array is passed, its keys are the header names and its + * values are the respective header values. + * + * When sending mail, the mail must contain + * a From header. This can be set with the + * additional_headers parameter, or a default + * can be set in php.ini. + * + * Failing to do this will result in an error + * message similar to Warning: mail(): "sendmail_from" not + * set in php.ini or custom "From:" header missing. + * The From header sets also + * Return-Path under Windows. + * + * If messages are not received, try using a LF (\n) only. + * Some Unix mail transfer agents (most notably + * qmail) replace LF by CRLF + * automatically (which leads to doubling CR if CRLF is used). + * This should be a last resort, as it does not comply with + * RFC 2822. + * @param string $additional_parameter additional_parameter is a MTA command line + * parameter. It is useful when setting the correct Return-Path + * header when using sendmail. + * + * This parameter is escaped by escapeshellcmd internally + * to prevent command execution. escapeshellcmd prevents + * command execution, but allows to add additional parameters. For security reason, + * this parameter should be validated. + * + * Since escapeshellcmd is applied automatically, some characters + * that are allowed as email addresses by internet RFCs cannot be used. Programs + * that are required to use these characters mail cannot be used. + * + * The user that the webserver runs as should be added as a trusted user to the + * sendmail configuration to prevent a 'X-Warning' header from being added + * to the message when the envelope sender (-f) is set using this method. + * For sendmail users, this file is /etc/mail/trusted-users. + * @throws MbstringException + * + */ +function mb_send_mail(string $to, string $subject, string $message, $additional_headers = null, string $additional_parameter = null): void +{ + error_clear_last(); + $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_parameter); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $pattern The regular expression pattern. + * @param string $string The string being split. + * @param int $limit + * @return array The result as an array. + * @throws MbstringException + * + */ +function mb_split(string $pattern, string $string, int $limit = -1): array +{ + error_clear_last(); + $result = \mb_split($pattern, $string, $limit); + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} + + +/** + * This function will return an array of strings, it is a version of str_split with support for encodings of variable character size as well as fixed-size encodings of 1,2 or 4 byte characters. + * If the split_length parameter is specified, the string is broken down into chunks of the specified length in characters (not bytes). + * The encoding parameter can be optionally specified and it is good practice to do so. + * + * @param string $string The string to split into characters or chunks. + * @param int $split_length If specified, each element of the returned array will be composed of multiple characters instead of a single character. + * @param string $encoding The encoding + * parameter is the character encoding. If it is omitted, the internal character + * encoding value will be used. + * + * A string specifying one of the supported encodings. + * @return array mb_str_split returns an array of strings. + * @throws MbstringException + * + */ +function mb_str_split(string $string, int $split_length = 1, string $encoding = null): array +{ + error_clear_last(); + if ($encoding !== null) { + $result = \mb_str_split($string, $split_length, $encoding); + } else { + $result = \mb_str_split($string, $split_length); + } + if ($result === false) { + throw MbstringException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/misc.php b/vendor/thecodingmachine/safe/generated/misc.php new file mode 100644 index 000000000..ff636fd49 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/misc.php @@ -0,0 +1,464 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MiscException; + +/** + * Defines a named constant at runtime. + * + * @param string $name The name of the constant. + * + * It is possible to define constants with reserved or + * even invalid names, whose value can (only) be retrieved with + * constant. However, doing so is not recommended. + * @param mixed $value The value of the constant. In PHP 5, value must + * be a scalar value (integer, + * float, string, boolean, or + * NULL). In PHP 7, array values are also accepted. + * + * While it is possible to define resource constants, it is + * not recommended and may cause unpredictable behavior. + * @param bool $case_insensitive If set to TRUE, the constant will be defined case-insensitive. + * The default behavior is case-sensitive; i.e. + * CONSTANT and Constant represent + * different values. + * + * Case-insensitive constants are stored as lower-case. + * @throws MiscException + * + */ +function define(string $name, $value, bool $case_insensitive = false): void +{ + error_clear_last(); + $result = \define($name, $value, $case_insensitive); + if ($result === false) { + throw MiscException::createFromPhpError(); + } +} + + +/** + * Prints out or returns a syntax highlighted version of the code contained + * in filename using the colors defined in the + * built-in syntax highlighter for PHP. + * + * Many servers are configured to automatically highlight files + * with a phps extension. For example, + * example.phps when viewed will show the + * syntax highlighted source of the file. To enable this, add this + * line to the httpd.conf: + * + * @param string $filename Path to the PHP file to be highlighted. + * @param bool $return Set this parameter to TRUE to make this function return the + * highlighted code. + * @return string|bool If return is set to TRUE, returns the highlighted + * code as a string instead of printing it out. Otherwise, it will return + * TRUE on success, FALSE on failure. + * @throws MiscException + * + */ +function highlight_file(string $filename, bool $return = false) +{ + error_clear_last(); + $result = \highlight_file($filename, $return); + if ($result === false) { + throw MiscException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $str The PHP code to be highlighted. This should include the opening tag. + * @param bool $return Set this parameter to TRUE to make this function return the + * highlighted code. + * @return string|bool If return is set to TRUE, returns the highlighted + * code as a string instead of printing it out. Otherwise, it will return + * TRUE on success, FALSE on failure. + * @throws MiscException + * + */ +function highlight_string(string $str, bool $return = false) +{ + error_clear_last(); + $result = \highlight_string($str, $return); + if ($result === false) { + throw MiscException::createFromPhpError(); + } + return $result; +} + + +/** + * Pack given arguments into a binary string according to + * format. + * + * The idea for this function was taken from Perl and all formatting codes + * work the same as in Perl. However, there are some formatting codes that are + * missing such as Perl's "u" format code. + * + * Note that the distinction between signed and unsigned values only + * affects the function unpack, where as + * function pack gives the same result for + * signed and unsigned format codes. + * + * @param string $format The format string consists of format codes + * followed by an optional repeater argument. The repeater argument can + * be either an integer value or * for repeating to + * the end of the input data. For a, A, h, H the repeat count specifies + * how many characters of one data argument are taken, for @ it is the + * absolute position where to put the next data, for everything else the + * repeat count specifies how many data arguments are consumed and packed + * into the resulting binary string. + * + * Currently implemented formats are: + * + * pack format characters + * + * + * + * Code + * Description + * + * + * + * + * a + * NUL-padded string + * + * + * A + * SPACE-padded string + * + * h + * Hex string, low nibble first + * + * H + * Hex string, high nibble first + * csigned char + * + * C + * unsigned char + * + * s + * signed short (always 16 bit, machine byte order) + * + * + * S + * unsigned short (always 16 bit, machine byte order) + * + * + * n + * unsigned short (always 16 bit, big endian byte order) + * + * + * v + * unsigned short (always 16 bit, little endian byte order) + * + * + * i + * signed integer (machine dependent size and byte order) + * + * + * I + * unsigned integer (machine dependent size and byte order) + * + * + * l + * signed long (always 32 bit, machine byte order) + * + * + * L + * unsigned long (always 32 bit, machine byte order) + * + * + * N + * unsigned long (always 32 bit, big endian byte order) + * + * + * V + * unsigned long (always 32 bit, little endian byte order) + * + * + * q + * signed long long (always 64 bit, machine byte order) + * + * + * Q + * unsigned long long (always 64 bit, machine byte order) + * + * + * J + * unsigned long long (always 64 bit, big endian byte order) + * + * + * P + * unsigned long long (always 64 bit, little endian byte order) + * + * + * f + * float (machine dependent size and representation) + * + * + * g + * float (machine dependent size, little endian byte order) + * + * + * G + * float (machine dependent size, big endian byte order) + * + * + * d + * double (machine dependent size and representation) + * + * + * e + * double (machine dependent size, little endian byte order) + * + * + * E + * double (machine dependent size, big endian byte order) + * + * + * x + * NUL byte + * + * + * X + * Back up one byte + * + * + * Z + * NUL-padded string (new in PHP 5.5) + * + * + * @ + * NUL-fill to absolute position + * + * + * + * + * @param mixed $params + * @return string Returns a binary string containing data. + * @throws MiscException + * + */ +function pack(string $format, ...$params): string +{ + error_clear_last(); + if ($params !== []) { + $result = \pack($format, ...$params); + } else { + $result = \pack($format); + } + if ($result === false) { + throw MiscException::createFromPhpError(); + } + return $result; +} + + +/** + * Convert string from one codepage to another. + * + * @param int|string $in_codepage The codepage of the subject string. + * Either the codepage name or identifier. + * @param int|string $out_codepage The codepage to convert the subject string to. + * Either the codepage name or identifier. + * @param string $subject The string to convert. + * @return string The subject string converted to + * out_codepage. + * @throws MiscException + * + */ +function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): string +{ + error_clear_last(); + $result = \sapi_windows_cp_conv($in_codepage, $out_codepage, $subject); + if ($result === null) { + throw MiscException::createFromPhpError(); + } + return $result; +} + + +/** + * Set the codepage of the current process. + * + * @param int $cp A codepage identifier. + * @throws MiscException + * + */ +function sapi_windows_cp_set(int $cp): void +{ + error_clear_last(); + $result = \sapi_windows_cp_set($cp); + if ($result === false) { + throw MiscException::createFromPhpError(); + } +} + + +/** + * Sends a CTRL event to another process in the same process group. + * + * @param int $event The CTRL even to send; + * either PHP_WINDOWS_EVENT_CTRL_C + * or PHP_WINDOWS_EVENT_CTRL_BREAK. + * @param int $pid The ID of the process to which to send the event to. If 0 + * is given, the event is sent to all processes of the process group. + * @throws MiscException + * + */ +function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void +{ + error_clear_last(); + $result = \sapi_windows_generate_ctrl_event($event, $pid); + if ($result === false) { + throw MiscException::createFromPhpError(); + } +} + + +/** + * If enable is omitted, the function returns TRUE if the stream stream has VT100 control codes enabled, FALSE otherwise. + * + * If enable is specified, the function will try to enable or disable the VT100 features of the stream stream. + * If the feature has been successfully enabled (or disabled). + * + * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. + * + * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal. + * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences. + * + * @param resource $stream The stream on which the function will operate. + * @param bool $enable If specified, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). + * @throws MiscException + * + */ +function sapi_windows_vt100_support($stream, bool $enable = null): void +{ + error_clear_last(); + if ($enable !== null) { + $result = \sapi_windows_vt100_support($stream, $enable); + } else { + $result = \sapi_windows_vt100_support($stream); + } + if ($result === false) { + throw MiscException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $seconds Halt time in seconds. + * @return int Returns zero on success. + * + * If the call was interrupted by a signal, sleep returns + * a non-zero value. On Windows, this value will always be + * 192 (the value of the + * WAIT_IO_COMPLETION constant within the Windows API). + * On other platforms, the return value will be the number of seconds left to + * sleep. + * @throws MiscException + * + */ +function sleep(int $seconds): int +{ + error_clear_last(); + $result = \sleep($seconds); + if ($result === false) { + throw MiscException::createFromPhpError(); + } + return $result; +} + + +/** + * Delays program execution for the given number of + * seconds and nanoseconds. + * + * @param int $seconds Must be a non-negative integer. + * @param int $nanoseconds Must be a non-negative integer less than 1 billion. + * @return array{0:int,1:int}|bool Returns TRUE on success. + * + * If the delay was interrupted by a signal, an associative array will be + * returned with the components: + * + * + * + * seconds - number of seconds remaining in + * the delay + * + * + * + * + * nanoseconds - number of nanoseconds + * remaining in the delay + * + * + * + * @throws MiscException + * + */ +function time_nanosleep(int $seconds, int $nanoseconds) +{ + error_clear_last(); + $result = \time_nanosleep($seconds, $nanoseconds); + if ($result === false) { + throw MiscException::createFromPhpError(); + } + return $result; +} + + +/** + * Makes the script sleep until the specified + * timestamp. + * + * @param float $timestamp The timestamp when the script should wake. + * @throws MiscException + * + */ +function time_sleep_until(float $timestamp): void +{ + error_clear_last(); + $result = \time_sleep_until($timestamp); + if ($result === false) { + throw MiscException::createFromPhpError(); + } +} + + +/** + * Unpacks from a binary string into an array according to the given + * format. + * + * The unpacked data is stored in an associative array. To + * accomplish this you have to name the different format codes and + * separate them by a slash /. If a repeater argument is present, + * then each of the array keys will have a sequence number behind + * the given name. + * + * @param string $format See pack for an explanation of the format codes. + * @param string $data The packed data. + * @param int $offset The offset to begin unpacking from. + * @return array Returns an associative array containing unpacked elements of binary + * string. + * @throws MiscException + * + */ +function unpack(string $format, string $data, int $offset = 0): array +{ + error_clear_last(); + $result = \unpack($format, $data, $offset); + if ($result === false) { + throw MiscException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/msql.php b/vendor/thecodingmachine/safe/generated/msql.php new file mode 100644 index 000000000..331c1b6cd --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/msql.php @@ -0,0 +1,443 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MsqlException; + +/** + * Returns number of affected rows by the last SELECT, UPDATE or DELETE + * query associated with result. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @return int Returns the number of affected rows on success. + * @throws MsqlException + * + */ +function msql_affected_rows($result): int +{ + error_clear_last(); + $result = \msql_affected_rows($result); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_close closes the non-persistent connection to + * the mSQL server that's associated with the specified link identifier. + * + * Using msql_close isn't usually necessary, as + * non-persistent open links are automatically closed at the end of the + * script's execution. See also freeing resources. + * + * @param resource|null $link_identifier The mSQL connection. + * If not specified, the last link opened by msql_connect + * is assumed. If no such link is found, the function will try to establish a + * link as if msql_connect was called, and use it. + * @throws MsqlException + * + */ +function msql_close($link_identifier = null): void +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \msql_close($link_identifier); + } else { + $result = \msql_close(); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} + + +/** + * msql_connect establishes a connection to a mSQL + * server. + * + * If a second call is made to msql_connect with + * the same arguments, no new link will be established, but instead, the + * link identifier of the already opened link will be returned. + * + * The link to the server will be closed as soon as the execution of the + * script ends, unless it's closed earlier by explicitly calling + * msql_close. + * + * @param string $hostname The hostname can also include a port number. e.g. + * hostname,port. + * + * If not specified, the connection is established by the means of a Unix + * domain socket, being then more efficient then a localhost TCP socket + * connection. + * + * While this function will accept a colon (:) as a + * host/port separator, a comma (,) is the preferred + * method. + * @return resource Returns a positive mSQL link identifier on success. + * @throws MsqlException + * + */ +function msql_connect(string $hostname = null) +{ + error_clear_last(); + if ($hostname !== null) { + $result = \msql_connect($hostname); + } else { + $result = \msql_connect(); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_create_db attempts to create a new database on + * the mSQL server. + * + * @param string $database_name The name of the mSQL database. + * @param resource|null $link_identifier The mSQL connection. + * If not specified, the last link opened by msql_connect + * is assumed. If no such link is found, the function will try to establish a + * link as if msql_connect was called, and use it. + * @throws MsqlException + * + */ +function msql_create_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \msql_create_db($database_name, $link_identifier); + } else { + $result = \msql_create_db($database_name); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} + + +/** + * msql_data_seek moves the internal row + * pointer of the mSQL result associated with the specified query + * identifier to point to the specified row number. The next call + * to msql_fetch_row would return that + * row. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @param int $row_number The seeked row number. + * @throws MsqlException + * + */ +function msql_data_seek($result, int $row_number): void +{ + error_clear_last(); + $result = \msql_data_seek($result, $row_number); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} + + +/** + * msql_db_query selects a database and executes a query + * on it. + * + * @param string $database The name of the mSQL database. + * @param string $query The SQL query. + * @param resource|null $link_identifier The mSQL connection. + * If not specified, the last link opened by msql_connect + * is assumed. If no such link is found, the function will try to establish a + * link as if msql_connect was called, and use it. + * @return resource Returns a positive mSQL query identifier to the query result. + * @throws MsqlException + * + */ +function msql_db_query(string $database, string $query, $link_identifier = null) +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \msql_db_query($database, $query, $link_identifier); + } else { + $result = \msql_db_query($database, $query); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_drop_db attempts to drop (remove) a database + * from the mSQL server. + * + * @param string $database_name The name of the database. + * @param resource|null $link_identifier The mSQL connection. + * If not specified, the last link opened by msql_connect + * is assumed. If no such link is found, the function will try to establish a + * link as if msql_connect was called, and use it. + * @throws MsqlException + * + */ +function msql_drop_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \msql_drop_db($database_name, $link_identifier); + } else { + $result = \msql_drop_db($database_name); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} + + +/** + * msql_field_len returns the length of the specified + * field. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 1. + * @return int Returns the length of the specified field. + * @throws MsqlException + * + */ +function msql_field_len($result, int $field_offset): int +{ + error_clear_last(); + $result = \msql_field_len($result, $field_offset); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_field_name gets the name of the specified field + * index. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 1. + * @return string The name of the field. + * @throws MsqlException + * + */ +function msql_field_name($result, int $field_offset): string +{ + error_clear_last(); + $result = \msql_field_name($result, $field_offset); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Seeks to the specified field offset. If the next call to + * msql_fetch_field won't include a field offset, this + * field would be returned. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 1. + * @throws MsqlException + * + */ +function msql_field_seek($result, int $field_offset): void +{ + error_clear_last(); + $result = \msql_field_seek($result, $field_offset); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} + + +/** + * Returns the name of the table that the specified field is in. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 1. + * @return int The name of the table on success. + * @throws MsqlException + * + */ +function msql_field_table($result, int $field_offset): int +{ + error_clear_last(); + $result = \msql_field_table($result, $field_offset); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_field_type gets the type of the specified field + * index. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 1. + * @return string The type of the field. One of int, + * char, real, ident, + * null or unknown. This functions will + * return FALSE on failure. + * @throws MsqlException + * + */ +function msql_field_type($result, int $field_offset): string +{ + error_clear_last(); + $result = \msql_field_type($result, $field_offset); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_free_result frees the memory associated + * with query_identifier. When PHP completes a + * request, this memory is freed automatically, so you only need to + * call this function when you want to make sure you don't use too + * much memory while the script is running. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * msql_query. + * @throws MsqlException + * + */ +function msql_free_result($result): void +{ + error_clear_last(); + $result = \msql_free_result($result); + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} + + +/** + * msql_pconnect acts very much like + * msql_connect with two major differences. + * + * First, when connecting, the function would first try to find a + * (persistent) link that's already open with the same host. + * If one is found, an identifier for it will be returned instead of opening + * a new connection. + * + * Second, the connection to the SQL server will not be closed when the + * execution of the script ends. Instead, the link will remain open for + * future use (msql_close will not close links + * established by this function). + * + * @param string $hostname The hostname can also include a port number. e.g. + * hostname,port. + * + * If not specified, the connection is established by the means of a Unix + * domain socket, being more efficient than a localhost TCP socket + * connection. + * @return resource Returns a positive mSQL link identifier on success. + * @throws MsqlException + * + */ +function msql_pconnect(string $hostname = null) +{ + error_clear_last(); + if ($hostname !== null) { + $result = \msql_pconnect($hostname); + } else { + $result = \msql_pconnect(); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_query sends a query to the currently active + * database on the server that's associated with the specified link + * identifier. + * + * @param string $query The SQL query. + * @param resource|null $link_identifier The mSQL connection. + * If not specified, the last link opened by msql_connect + * is assumed. If no such link is found, the function will try to establish a + * link as if msql_connect was called, and use it. + * @return resource Returns a positive mSQL query identifier on success. + * @throws MsqlException + * + */ +function msql_query(string $query, $link_identifier = null) +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \msql_query($query, $link_identifier); + } else { + $result = \msql_query($query); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * msql_select_db sets the current active database on + * the server that's associated with the specified + * link_identifier. + * + * Subsequent calls to msql_query will be made on the + * active database. + * + * @param string $database_name The database name. + * @param resource|null $link_identifier The mSQL connection. + * If not specified, the last link opened by msql_connect + * is assumed. If no such link is found, the function will try to establish a + * link as if msql_connect was called, and use it. + * @throws MsqlException + * + */ +function msql_select_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + if ($link_identifier !== null) { + $result = \msql_select_db($database_name, $link_identifier); + } else { + $result = \msql_select_db($database_name); + } + if ($result === false) { + throw MsqlException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/mysql.php b/vendor/thecodingmachine/safe/generated/mysql.php new file mode 100644 index 000000000..475c609c9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/mysql.php @@ -0,0 +1,938 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MysqlException; + +/** + * mysql_close closes the non-persistent connection to + * the MySQL server that's associated with the specified link identifier. If + * link_identifier isn't specified, the last opened + * link is used. + * + * + * Open non-persistent MySQL connections and result sets are automatically destroyed when a + * PHP script finishes its execution. So, while explicitly closing open + * connections and freeing result sets is optional, doing so is recommended. + * This will immediately return resources to PHP and MySQL, which can + * improve performance. For related information, see + * freeing resources + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no connection is found or + * established, an E_WARNING level error is + * generated. + * @throws MysqlException + * + */ +function mysql_close($link_identifier = null): void +{ + error_clear_last(); + $result = \mysql_close($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * Opens or reuses a connection to a MySQL server. + * + * @param string $server The MySQL server. It can also include a port number. e.g. + * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for + * the localhost. + * + * If the PHP directive + * mysql.default_host is undefined (default), then the default + * value is 'localhost:3306'. In SQL safe mode, this parameter is ignored + * and value 'localhost:3306' is always used. + * @param string $username The username. Default value is defined by mysql.default_user. In + * SQL safe mode, this parameter is ignored and the name of the user that + * owns the server process is used. + * @param string $password The password. Default value is defined by mysql.default_password. In + * SQL safe mode, this parameter is ignored and empty password is used. + * @param bool $new_link If a second call is made to mysql_connect + * with the same arguments, no new link will be established, but + * instead, the link identifier of the already opened link will be + * returned. The new_link parameter modifies this + * behavior and makes mysql_connect always open + * a new link, even if mysql_connect was called + * before with the same parameters. + * In SQL safe mode, this parameter is ignored. + * @param int $client_flags The client_flags parameter can be a combination + * of the following constants: + * 128 (enable LOAD DATA LOCAL handling), + * MYSQL_CLIENT_SSL, + * MYSQL_CLIENT_COMPRESS, + * MYSQL_CLIENT_IGNORE_SPACE or + * MYSQL_CLIENT_INTERACTIVE. + * Read the section about for further information. + * In SQL safe mode, this parameter is ignored. + * @return resource Returns a MySQL link identifier on success. + * @throws MysqlException + * + */ +function mysql_connect(string $server = null, string $username = null, string $password = null, bool $new_link = false, int $client_flags = 0) +{ + error_clear_last(); + if ($client_flags !== 0) { + $result = \mysql_connect($server, $username, $password, $new_link, $client_flags); + } elseif ($new_link !== false) { + $result = \mysql_connect($server, $username, $password, $new_link); + } elseif ($password !== null) { + $result = \mysql_connect($server, $username, $password); + } elseif ($username !== null) { + $result = \mysql_connect($server, $username); + } elseif ($server !== null) { + $result = \mysql_connect($server); + } else { + $result = \mysql_connect(); + } + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_create_db attempts to create a new + * database on the server associated with the specified link + * identifier. + * + * @param string $database_name The name of the database being created. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @throws MysqlException + * + */ +function mysql_create_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + $result = \mysql_create_db($database_name, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * mysql_data_seek moves the internal row + * pointer of the MySQL result associated with the specified result + * identifier to point to the specified row number. The next call + * to a MySQL fetch function, such as mysql_fetch_assoc, + * would return that row. + * + * row_number starts at 0. The + * row_number should be a value in the range from 0 to + * mysql_num_rows - 1. However if the result set + * is empty (mysql_num_rows == 0), a seek to 0 will + * fail with an E_WARNING and + * mysql_data_seek will return FALSE. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @param int $row_number The desired row number of the new result pointer. + * @throws MysqlException + * + */ +function mysql_data_seek($result, int $row_number): void +{ + error_clear_last(); + $result = \mysql_data_seek($result, $row_number); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * Retrieve the database name from a call to + * mysql_list_dbs. + * + * @param resource $result The result pointer from a call to mysql_list_dbs. + * @param int $row The index into the result set. + * @param mixed $field The field name. + * @return string Returns the database name on success. If FALSE + * is returned, use mysql_error to determine the nature + * of the error. + * @throws MysqlException + * + */ +function mysql_db_name($result, int $row, $field = null): string +{ + error_clear_last(); + $result = \mysql_db_name($result, $row, $field); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_db_query selects a database, and executes a + * query on it. + * + * @param string $database The name of the database that will be selected. + * @param string $query The MySQL query. + * + * Data inside the query should be properly escaped. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource|bool Returns a positive MySQL result resource to the query result. The function also returns TRUE/FALSE for + * INSERT/UPDATE/DELETE + * queries to indicate success/failure. + * @throws MysqlException + * + */ +function mysql_db_query(string $database, string $query, $link_identifier = null) +{ + error_clear_last(); + $result = \mysql_db_query($database, $query, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_drop_db attempts to drop (remove) an + * entire database from the server associated with the specified + * link identifier. This function is deprecated, it is preferable to use + * mysql_query to issue an sql + * DROP DATABASE statement instead. + * + * @param string $database_name The name of the database that will be deleted. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @throws MysqlException + * + */ +function mysql_drop_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + $result = \mysql_drop_db($database_name, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * Returns an array that corresponds to the lengths of each field + * in the last row fetched by MySQL. + * + * mysql_fetch_lengths stores the lengths of + * each result column in the last row returned by + * mysql_fetch_row, + * mysql_fetch_assoc, + * mysql_fetch_array, and + * mysql_fetch_object in an array, starting at + * offset 0. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @return array An array of lengths on success. + * @throws MysqlException + * + */ +function mysql_fetch_lengths($result): array +{ + error_clear_last(); + $result = \mysql_fetch_lengths($result); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_field_flags returns the field flags of + * the specified field. The flags are reported as a single word + * per flag separated by a single space, so that you can split the + * returned value using explode. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 0. If + * field_offset does not exist, an error of level + * E_WARNING is also issued. + * @return string Returns a string of flags associated with the result. + * + * The following flags are reported, if your version of MySQL + * is current enough to support them: "not_null", + * "primary_key", "unique_key", + * "multiple_key", "blob", + * "unsigned", "zerofill", + * "binary", "enum", + * "auto_increment" and "timestamp". + * @throws MysqlException + * + */ +function mysql_field_flags($result, int $field_offset): string +{ + error_clear_last(); + $result = \mysql_field_flags($result, $field_offset); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_field_len returns the length of the + * specified field. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 0. If + * field_offset does not exist, an error of level + * E_WARNING is also issued. + * @return int The length of the specified field index on success. + * @throws MysqlException + * + */ +function mysql_field_len($result, int $field_offset): int +{ + error_clear_last(); + $result = \mysql_field_len($result, $field_offset); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_field_name returns the name of the + * specified field index. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 0. If + * field_offset does not exist, an error of level + * E_WARNING is also issued. + * @return string The name of the specified field index on success. + * @throws MysqlException + * + */ +function mysql_field_name($result, int $field_offset): string +{ + error_clear_last(); + $result = \mysql_field_name($result, $field_offset); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Seeks to the specified field offset. If the next call to + * mysql_fetch_field doesn't include a field + * offset, the field offset specified in + * mysql_field_seek will be returned. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @param int $field_offset The numerical field offset. The + * field_offset starts at 0. If + * field_offset does not exist, an error of level + * E_WARNING is also issued. + * @throws MysqlException + * + */ +function mysql_field_seek($result, int $field_offset): void +{ + error_clear_last(); + $result = \mysql_field_seek($result, $field_offset); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * mysql_free_result will free all memory + * associated with the result identifier result. + * + * mysql_free_result only needs to be called if + * you are concerned about how much memory is being used for queries + * that return large result sets. All associated result memory is + * automatically freed at the end of the script's execution. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @throws MysqlException + * + */ +function mysql_free_result($result): void +{ + error_clear_last(); + $result = \mysql_free_result($result); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * Describes the type of connection in use for the connection, including the + * server host name. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return string Returns a string describing the type of MySQL connection in use for the + * connection. + * @throws MysqlException + * + */ +function mysql_get_host_info($link_identifier = null): string +{ + error_clear_last(); + $result = \mysql_get_host_info($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the MySQL protocol. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return int Returns the MySQL protocol on success. + * @throws MysqlException + * + */ +function mysql_get_proto_info($link_identifier = null): int +{ + error_clear_last(); + $result = \mysql_get_proto_info($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the MySQL server version. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return string Returns the MySQL server version on success. + * @throws MysqlException + * + */ +function mysql_get_server_info($link_identifier = null): string +{ + error_clear_last(); + $result = \mysql_get_server_info($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns detailed information about the last query. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return string Returns information about the statement on success. See the example below for which statements provide information, + * and what the returned value may look like. Statements that are not listed + * will return FALSE. + * @throws MysqlException + * + */ +function mysql_info($link_identifier = null): string +{ + error_clear_last(); + $result = \mysql_info($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns a result pointer containing the databases available from the + * current mysql daemon. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource Returns a result pointer resource on success. Use the mysql_tablename function to traverse + * this result pointer, or any function for result tables, such as + * mysql_fetch_array. + * @throws MysqlException + * + */ +function mysql_list_dbs($link_identifier = null) +{ + error_clear_last(); + $result = \mysql_list_dbs($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves information about the given table name. + * + * This function is deprecated. It is preferable to use + * mysql_query to issue an SQL SHOW COLUMNS FROM + * table [LIKE 'name'] statement instead. + * + * @param string $database_name The name of the database that's being queried. + * @param string $table_name The name of the table that's being queried. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource A result pointer resource on success. + * + * The returned result can be used with mysql_field_flags, + * mysql_field_len, + * mysql_field_name and + * mysql_field_type. + * @throws MysqlException + * + */ +function mysql_list_fields(string $database_name, string $table_name, $link_identifier = null) +{ + error_clear_last(); + $result = \mysql_list_fields($database_name, $table_name, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the current MySQL server threads. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource A result pointer resource on success. + * @throws MysqlException + * + */ +function mysql_list_processes($link_identifier = null) +{ + error_clear_last(); + $result = \mysql_list_processes($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves a list of table names from a MySQL database. + * + * This function is deprecated. It is preferable to use + * mysql_query to issue an SQL SHOW TABLES + * [FROM db_name] [LIKE 'pattern'] statement instead. + * + * @param string $database The name of the database + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource A result pointer resource on success. + * + * Use the mysql_tablename function to + * traverse this result pointer, or any function for result tables, + * such as mysql_fetch_array. + * @throws MysqlException + * + */ +function mysql_list_tables(string $database, $link_identifier = null) +{ + error_clear_last(); + $result = \mysql_list_tables($database, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the number of fields from a query. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @return int Returns the number of fields in the result set resource on + * success. + * @throws MysqlException + * + */ +function mysql_num_fields($result): int +{ + error_clear_last(); + $result = \mysql_num_fields($result); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the number of rows from a result set. This command is only valid + * for statements like SELECT or SHOW that return an actual result set. + * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or + * DELETE query, use mysql_affected_rows. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @return int The number of rows in a result set on success. + * @throws MysqlException + * + */ +function mysql_num_rows($result): int +{ + error_clear_last(); + $result = \mysql_num_rows($result); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_query sends a unique query (multiple queries + * are not supported) to the currently + * active database on the server that's associated with the + * specified link_identifier. + * + * @param string $query An SQL query + * + * The query string should not end with a semicolon. + * Data inside the query should be properly escaped. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource|bool For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, + * mysql_query + * returns a resource on success. + * + * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, + * mysql_query returns TRUE on success. + * + * The returned result resource should be passed to + * mysql_fetch_array, and other + * functions for dealing with result tables, to access the returned data. + * + * Use mysql_num_rows to find out how many rows + * were returned for a SELECT statement or + * mysql_affected_rows to find out how many + * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE + * statement. + * + * mysql_query will also fail and return FALSE + * if the user does not have permission to access the table(s) referenced by + * the query. + * @throws MysqlException + * + */ +function mysql_query(string $query, $link_identifier = null) +{ + error_clear_last(); + $result = \mysql_query($query, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Escapes special characters in the unescaped_string, + * taking into account the current character set of the connection so that it + * is safe to place it in a mysql_query. If binary data + * is to be inserted, this function must be used. + * + * mysql_real_escape_string calls MySQL's library function + * mysql_real_escape_string, which prepends backslashes to the following characters: + * \x00, \n, + * \r, \, ', + * " and \x1a. + * + * This function must always (with few exceptions) be used to make data + * safe before sending a query to MySQL. + * + * @param string $unescaped_string The string that is to be escaped. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return string Returns the escaped string. + * @throws MysqlException + * + */ +function mysql_real_escape_string(string $unescaped_string, $link_identifier = null): string +{ + error_clear_last(); + $result = \mysql_real_escape_string($unescaped_string, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the contents of one cell from a MySQL result set. + * + * When working on large result sets, you should consider using one + * of the functions that fetch an entire row (specified below). As + * these functions return the contents of multiple cells in one + * function call, they're MUCH quicker than + * mysql_result. Also, note that specifying a + * numeric offset for the field argument is much quicker than + * specifying a fieldname or tablename.fieldname argument. + * + * @param resource $result The result resource that + * is being evaluated. This result comes from a call to + * mysql_query. + * @param int $row The row number from the result that's being retrieved. Row numbers + * start at 0. + * @param mixed $field The name or offset of the field being retrieved. + * + * It can be the field's offset, the field's name, or the field's table + * dot field name (tablename.fieldname). If the column name has been + * aliased ('select foo as bar from...'), use the alias instead of the + * column name. If undefined, the first field is retrieved. + * @return string The contents of one cell from a MySQL result set on success. + * @throws MysqlException + * + */ +function mysql_result($result, int $row, $field = 0): string +{ + error_clear_last(); + $result = \mysql_result($result, $row, $field); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the current active database on the server that's associated with the + * specified link identifier. Every subsequent call to + * mysql_query will be made on the active database. + * + * @param string $database_name The name of the database that is to be selected. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @throws MysqlException + * + */ +function mysql_select_db(string $database_name, $link_identifier = null): void +{ + error_clear_last(); + $result = \mysql_select_db($database_name, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * Sets the default character set for the current connection. + * + * @param string $charset A valid character set name. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @throws MysqlException + * + */ +function mysql_set_charset(string $charset, $link_identifier = null): void +{ + error_clear_last(); + $result = \mysql_set_charset($charset, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } +} + + +/** + * Retrieves the table name from a result. + * + * This function is deprecated. It is preferable to use + * mysql_query to issue an SQL SHOW TABLES + * [FROM db_name] [LIKE 'pattern'] statement instead. + * + * @param resource $result A result pointer resource that's returned from + * mysql_list_tables. + * @param int $i The integer index (row/table number) + * @return string The name of the table on success. + * + * Use the mysql_tablename function to + * traverse this result pointer, or any function for result tables, + * such as mysql_fetch_array. + * @throws MysqlException + * + */ +function mysql_tablename($result, int $i): string +{ + error_clear_last(); + $result = \mysql_tablename($result, $i); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the current thread ID. If the connection is lost, and a reconnect + * with mysql_ping is executed, the thread ID will + * change. This means only retrieve the thread ID when needed. + * + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return int The thread ID on success. + * @throws MysqlException + * + */ +function mysql_thread_id($link_identifier = null): int +{ + error_clear_last(); + $result = \mysql_thread_id($link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} + + +/** + * mysql_unbuffered_query sends the SQL query + * query to MySQL without automatically + * fetching and buffering the result rows as + * mysql_query does. This saves a considerable + * amount of memory with SQL queries that produce large result sets, + * and you can start working on the result set immediately after the + * first row has been retrieved as you don't have to wait until the + * complete SQL query has been performed. To use + * mysql_unbuffered_query while multiple database + * connections are open, you must specify the optional parameter + * link_identifier to identify which connection + * you want to use. + * + * @param string $query The SQL query to execute. + * + * Data inside the query should be properly escaped. + * @param resource $link_identifier The MySQL connection. If the + * link identifier is not specified, the last link opened by + * mysql_connect is assumed. If no such link is found, it + * will try to create one as if mysql_connect had been called + * with no arguments. If no connection is found or established, an + * E_WARNING level error is generated. + * @return resource|bool For SELECT, SHOW, DESCRIBE or EXPLAIN statements, + * mysql_unbuffered_query + * returns a resource on success. + * + * For other type of SQL statements, UPDATE, DELETE, DROP, etc, + * mysql_unbuffered_query returns TRUE on success. + * @throws MysqlException + * + */ +function mysql_unbuffered_query(string $query, $link_identifier = null) +{ + error_clear_last(); + $result = \mysql_unbuffered_query($query, $link_identifier); + if ($result === false) { + throw MysqlException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/mysqli.php b/vendor/thecodingmachine/safe/generated/mysqli.php new file mode 100644 index 000000000..c8807af4a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/mysqli.php @@ -0,0 +1,42 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MysqliException; + +/** + * Returns an empty array. + * Available only with mysqlnd. + * + * @return array Returns an empty array on success, FALSE otherwise. + * @throws MysqliException + * + */ +function mysqli_get_cache_stats(): array +{ + error_clear_last(); + $result = \mysqli_get_cache_stats(); + if ($result === false) { + throw MysqliException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns client per-process statistics. + * Available only with mysqlnd. + * + * @return array Returns an array with client stats if success, FALSE otherwise. + * @throws MysqliException + * + */ +function mysqli_get_client_stats(): array +{ + error_clear_last(); + $result = \mysqli_get_client_stats(); + if ($result === false) { + throw MysqliException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/mysqlndMs.php b/vendor/thecodingmachine/safe/generated/mysqlndMs.php new file mode 100644 index 000000000..2fd4f32a2 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/mysqlndMs.php @@ -0,0 +1,119 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MysqlndMsException; + +/** + * Returns a list of currently configured servers. + * + * @param mixed $connection A MySQL connection handle obtained from any of the + * connect functions of the mysqli, + * mysql or + * PDO_MYSQL extensions. + * @return array FALSE on error. Otherwise, returns an array with two entries + * masters and slaves each of which contains + * an array listing all corresponding servers. + * + * The function can be used to check and debug the list of servers currently + * used by the plugin. It is mostly useful when the list of servers changes at + * runtime, for example, when using MySQL Fabric. + * + * masters and slaves server entries + * @throws MysqlndMsException + * + */ +function mysqlnd_ms_dump_servers($connection): array +{ + error_clear_last(); + $result = \mysqlnd_ms_dump_servers($connection); + if ($result === false) { + throw MysqlndMsException::createFromPhpError(); + } + return $result; +} + + +/** + * MySQL Fabric related. + * + * Switch the connection to the nodes handling global sharding queries + * for the given table name. + * + * @param mixed $connection A MySQL connection handle obtained from any of the + * connect functions of the mysqli, + * mysql or + * PDO_MYSQL extensions. + * @param mixed $table_name The table name to ask Fabric about. + * @return array FALSE on error. Otherwise, TRUE + * @throws MysqlndMsException + * + */ +function mysqlnd_ms_fabric_select_global($connection, $table_name): array +{ + error_clear_last(); + $result = \mysqlnd_ms_fabric_select_global($connection, $table_name); + if ($result === false) { + throw MysqlndMsException::createFromPhpError(); + } + return $result; +} + + +/** + * MySQL Fabric related. + * + * Switch the connection to the shards responsible for the + * given table name and shard key. + * + * @param mixed $connection A MySQL connection handle obtained from any of the + * connect functions of the mysqli, + * mysql or + * PDO_MYSQL extensions. + * @param mixed $table_name The table name to ask Fabric about. + * @param mixed $shard_key The shard key to ask Fabric about. + * @return array FALSE on error. Otherwise, TRUE + * @throws MysqlndMsException + * + */ +function mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key): array +{ + error_clear_last(); + $result = \mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key); + if ($result === false) { + throw MysqlndMsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns an array which describes the last used connection from the plugins + * connection pool currently pointed to by the user connection handle. If using the + * plugin, a user connection handle represents a pool of database connections. + * It is not possible to tell from the user connection handles properties to which + * database server from the pool the user connection handle points. + * + * The function can be used to debug or monitor PECL mysqlnd_ms. + * + * @param mixed $connection A MySQL connection handle obtained from any of the + * connect functions of the mysqli, + * mysql or + * PDO_MYSQL extensions. + * @return array FALSE on error. Otherwise, an + * array which describes the connection used to + * execute the last statement on. + * + * Array which describes the connection. + * @throws MysqlndMsException + * + */ +function mysqlnd_ms_get_last_used_connection($connection): array +{ + error_clear_last(); + $result = \mysqlnd_ms_get_last_used_connection($connection); + if ($result === false) { + throw MysqlndMsException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/mysqlndQc.php b/vendor/thecodingmachine/safe/generated/mysqlndQc.php new file mode 100644 index 000000000..9a99a379c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/mysqlndQc.php @@ -0,0 +1,103 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\MysqlndQcException; + +/** + * Flush all cache contents. + * + * Flushing the cache is a storage handler responsibility. + * All built-in storage handler but the + * memcache storage + * handler support flushing the cache. The + * memcache + * storage handler cannot flush its cache contents. + * + * User-defined storage handler may or may not support the operation. + * + * @throws MysqlndQcException + * + */ +function mysqlnd_qc_clear_cache(): void +{ + error_clear_last(); + $result = \mysqlnd_qc_clear_cache(); + if ($result === false) { + throw MysqlndQcException::createFromPhpError(); + } +} + + +/** + * Installs a callback which decides whether a statement is cached. + * + * There are several ways of hinting PELC/mysqlnd_qc to cache a query. + * By default, PECL/mysqlnd_qc attempts to cache a if caching of all statements + * is enabled or the query string begins with a certain SQL hint. + * The plugin internally calls a function named is_select() + * to find out. This internal function can be replaced with a user-defined callback. + * Then, the user-defined callback is responsible to decide whether the plugin + * attempts to cache a statement. Because the internal function is replaced + * with the callback, the callback gains full control. The callback is free + * to ignore the configuration setting mysqlnd_qc.cache_by_default + * and SQL hints. + * + * The callback is invoked for every statement inspected by the plugin. + * It is given the statements string as a parameter. The callback returns + * FALSE if the statement shall not be cached. It returns TRUE to + * make the plugin attempt to cache the statements result set, if any. + * A so-created cache entry is given the default TTL set with the + * PHP configuration directive mysqlnd_qc.ttl. + * If a different TTL shall be used, the callback returns a numeric + * value to be used as the TTL. + * + * The internal is_select function is part of the internal + * cache storage handler interface. Thus, a user-defined storage handler + * offers the same capabilities. + * + * @param string $callback + * @return mixed Returns TRUE on success. + * @throws MysqlndQcException + * + */ +function mysqlnd_qc_set_is_select(string $callback) +{ + error_clear_last(); + $result = \mysqlnd_qc_set_is_select($callback); + if ($result === false) { + throw MysqlndQcException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the storage handler used by the query cache. A list of available + * storage handler can be obtained from + * mysqlnd_qc_get_available_handlers. + * Which storage are available depends on the compile time + * configuration of the query cache plugin. The + * default storage handler is always available. + * All other storage handler must be enabled explicitly when building the + * extension. + * + * @param string $handler Handler can be of type string representing the name of a + * built-in storage handler or an object of type + * mysqlnd_qc_handler_default. + * The names of the built-in storage handler are + * default, + * APC, + * MEMCACHE, + * sqlite. + * @throws MysqlndQcException + * + */ +function mysqlnd_qc_set_storage_handler(string $handler): void +{ + error_clear_last(); + $result = \mysqlnd_qc_set_storage_handler($handler); + if ($result === false) { + throw MysqlndQcException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/network.php b/vendor/thecodingmachine/safe/generated/network.php new file mode 100644 index 000000000..6d46b6ce3 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/network.php @@ -0,0 +1,639 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\NetworkException; + +/** + * closelog closes the descriptor being used to write to + * the system logger. The use of closelog is optional. + * + * @throws NetworkException + * + */ +function closelog(): void +{ + error_clear_last(); + $result = \closelog(); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } +} + + +/** + * Fetch DNS Resource Records associated with the given + * hostname. + * + * @param string $hostname hostname should be a valid DNS hostname such + * as "www.example.com". Reverse lookups can be generated + * using in-addr.arpa notation, but + * gethostbyaddr is more suitable for + * the majority of reverse lookups. + * + * Per DNS standards, email addresses are given in user.host format (for + * example: hostmaster.example.com as opposed to [email protected]), + * be sure to check this value and modify if necessary before using it + * with a functions such as mail. + * @param int $type By default, dns_get_record will search for any + * resource records associated with hostname. + * To limit the query, specify the optional type + * parameter. May be any one of the following: + * DNS_A, DNS_CNAME, + * DNS_HINFO, DNS_CAA, + * DNS_MX, DNS_NS, + * DNS_PTR, DNS_SOA, + * DNS_TXT, DNS_AAAA, + * DNS_SRV, DNS_NAPTR, + * DNS_A6, DNS_ALL + * or DNS_ANY. + * + * Because of eccentricities in the performance of libresolv + * between platforms, DNS_ANY will not + * always return every record, the slower DNS_ALL + * will collect all records more reliably. + * + * DNS_CAA is not supported on Windows. + * @param array|null $authns Passed by reference and, if given, will be populated with Resource + * Records for the Authoritative Name Servers. + * @param array|null $addtl Passed by reference and, if given, will be populated with any + * Additional Records. + * @param bool $raw The type will be interpreted as a raw DNS type ID + * (the DNS_* constants cannot be used). + * The return value will contain a data key, which needs + * to be manually parsed. + * @return array This function returns an array of associative arrays. Each associative array contains + * at minimum the following keys: + * + * Basic DNS attributes + * + * + * + * Attribute + * Meaning + * + * + * + * + * host + * + * The record in the DNS namespace to which the rest of the associated data refers. + * + * + * + * class + * + * dns_get_record only returns Internet class records and as + * such this parameter will always return IN. + * + * + * + * type + * + * String containing the record type. Additional attributes will also be contained + * in the resulting array dependant on the value of type. See table below. + * + * + * + * ttl + * + * "Time To Live" remaining for this record. This will not equal + * the record's original ttl, but will rather equal the original ttl minus whatever + * length of time has passed since the authoritative name server was queried. + * + * + * + * + * + * + * + * Other keys in associative arrays dependant on 'type' + * + * + * + * Type + * Extra Columns + * + * + * + * + * A + * + * ip: An IPv4 addresses in dotted decimal notation. + * + * + * + * MX + * + * pri: Priority of mail exchanger. + * Lower numbers indicate greater priority. + * target: FQDN of the mail exchanger. + * See also dns_get_mx. + * + * + * + * CNAME + * + * target: FQDN of location in DNS namespace to which + * the record is aliased. + * + * + * + * NS + * + * target: FQDN of the name server which is authoritative + * for this hostname. + * + * + * + * PTR + * + * target: Location within the DNS namespace to which + * this record points. + * + * + * + * TXT + * + * txt: Arbitrary string data associated with this record. + * + * + * + * HINFO + * + * cpu: IANA number designating the CPU of the machine + * referenced by this record. + * os: IANA number designating the Operating System on + * the machine referenced by this record. + * See IANA's Operating System + * Names for the meaning of these values. + * + * + * + * CAA + * + * flags: A one-byte bitfield; currently only bit 0 is defined, + * meaning 'critical'; other bits are reserved and should be ignored. + * tag: The CAA tag name (alphanumeric ASCII string). + * value: The CAA tag value (binary string, may use subformats). + * For additional information see: RFC 6844 + * + * + * + * SOA + * + * mname: FQDN of the machine from which the resource + * records originated. + * rname: Email address of the administrative contact + * for this domain. + * serial: Serial # of this revision of the requested + * domain. + * refresh: Refresh interval (seconds) secondary name + * servers should use when updating remote copies of this domain. + * retry: Length of time (seconds) to wait after a + * failed refresh before making a second attempt. + * expire: Maximum length of time (seconds) a secondary + * DNS server should retain remote copies of the zone data without a + * successful refresh before discarding. + * minimum-ttl: Minimum length of time (seconds) a + * client can continue to use a DNS resolution before it should request + * a new resolution from the server. Can be overridden by individual + * resource records. + * + * + * + * AAAA + * + * ipv6: IPv6 address + * + * + * + * A6(PHP >= 5.1.0) + * + * masklen: Length (in bits) to inherit from the target + * specified by chain. + * ipv6: Address for this specific record to merge with + * chain. + * chain: Parent record to merge with + * ipv6 data. + * + * + * + * SRV + * + * pri: (Priority) lowest priorities should be used first. + * weight: Ranking to weight which of commonly prioritized + * targets should be chosen at random. + * target and port: hostname and port + * where the requested service can be found. + * For additional information see: RFC 2782 + * + * + * + * NAPTR + * + * order and pref: Equivalent to + * pri and weight above. + * flags, services, regex, + * and replacement: Parameters as defined by + * RFC 2915. + * + * + * + * + * + * @throws NetworkException + * + */ +function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authns = null, ?array &$addtl = null, bool $raw = false): array +{ + error_clear_last(); + $result = \dns_get_record($hostname, $type, $authns, $addtl, $raw); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } + return $result; +} + + +/** + * Initiates a socket connection to the resource specified by + * hostname. + * + * PHP supports targets in the Internet and Unix domains as described in + * . A list of supported transports can also be + * retrieved using stream_get_transports. + * + * The socket will by default be opened in blocking mode. You can + * switch it to non-blocking mode by using + * stream_set_blocking. + * + * The function stream_socket_client is similar but + * provides a richer set of options, including non-blocking connection and the + * ability to provide a stream context. + * + * @param string $hostname If OpenSSL support is + * installed, you may prefix the hostname + * with either ssl:// or tls:// to + * use an SSL or TLS client connection over TCP/IP to connect to the + * remote host. + * @param int $port The port number. This can be omitted and skipped with + * -1 for transports that do not use ports, such as + * unix://. + * @param int|null $errno If provided, holds the system level error number that occurred in the + * system-level connect() call. + * + * If the value returned in errno is + * 0 and the function returned FALSE, it is an + * indication that the error occurred before the + * connect() call. This is most likely due to a + * problem initializing the socket. + * @param string|null $errstr The error message as a string. + * @param float $timeout The connection timeout, in seconds. + * + * If you need to set a timeout for reading/writing data over the + * socket, use stream_set_timeout, as the + * timeout parameter to + * fsockopen only applies while connecting the + * socket. + * @return resource fsockopen returns a file pointer which may be used + * together with the other file functions (such as + * fgets, fgetss, + * fwrite, fclose, and + * feof). If the call fails, it will return FALSE + * @throws NetworkException + * + */ +function fsockopen(string $hostname, int $port = -1, ?int &$errno = null, ?string &$errstr = null, float $timeout = null) +{ + error_clear_last(); + if ($timeout !== null) { + $result = \fsockopen($hostname, $port, $errno, $errstr, $timeout); + } else { + $result = \fsockopen($hostname, $port, $errno, $errstr); + } + if ($result === false) { + throw NetworkException::createFromPhpError(); + } + return $result; +} + + +/** + * gethostname gets the standard host name for + * the local machine. + * + * @return string Returns a string with the hostname on success, otherwise FALSE is + * returned. + * @throws NetworkException + * + */ +function gethostname(): string +{ + error_clear_last(); + $result = \gethostname(); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } + return $result; +} + + +/** + * getprotobyname returns the protocol number + * associated with the protocol name as per + * /etc/protocols. + * + * @param string $name The protocol name. + * @return int Returns the protocol number. + * @throws NetworkException + * + */ +function getprotobyname(string $name): int +{ + error_clear_last(); + $result = \getprotobyname($name); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } + return $result; +} + + +/** + * getprotobynumber returns the protocol name + * associated with protocol number as per + * /etc/protocols. + * + * @param int $number The protocol number. + * @return string Returns the protocol name as a string. + * @throws NetworkException + * + */ +function getprotobynumber(int $number): string +{ + error_clear_last(); + $result = \getprotobynumber($number); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } + return $result; +} + + +/** + * Registers a function that will be called when PHP starts sending output. + * + * The callback is executed just after PHP prepares all + * headers to be sent, and before any other output is sent, creating a window + * to manipulate the outgoing headers before being sent. + * + * @param callable $callback Function called just before the headers are sent. It gets no parameters + * and the return value is ignored. + * @throws NetworkException + * + */ +function header_register_callback(callable $callback): void +{ + error_clear_last(); + $result = \header_register_callback($callback); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $in_addr A 32bit IPv4, or 128bit IPv6 address. + * @return string Returns a string representation of the address. + * @throws NetworkException + * + */ +function inet_ntop(string $in_addr): string +{ + error_clear_last(); + $result = \inet_ntop($in_addr); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } + return $result; +} + + +/** + * openlog opens a connection to the system + * logger for a program. + * + * The use of openlog is optional. It + * will automatically be called by syslog if + * necessary, in which case ident will default + * to FALSE. + * + * @param string $ident The string ident is added to each message. + * @param int $option The option argument is used to indicate + * what logging options will be used when generating a log message. + * + * openlog Options + * + * + * + * Constant + * Description + * + * + * + * + * LOG_CONS + * + * if there is an error while sending data to the system logger, + * write directly to the system console + * + * + * + * LOG_NDELAY + * + * open the connection to the logger immediately + * + * + * + * LOG_ODELAY + * + * (default) delay opening the connection until the first + * message is logged + * + * + * + * LOG_PERROR + * print log message also to standard error + * + * + * LOG_PID + * include PID with each message + * + * + * + * + * You can use one or more of these options. When using multiple options + * you need to OR them, i.e. to open the connection + * immediately, write to the console and include the PID in each message, + * you will use: LOG_CONS | LOG_NDELAY | LOG_PID + * @param int $facility The facility argument is used to specify what + * type of program is logging the message. This allows you to specify + * (in your machine's syslog configuration) how messages coming from + * different facilities will be handled. + * + * openlog Facilities + * + * + * + * Constant + * Description + * + * + * + * + * LOG_AUTH + * + * security/authorization messages (use + * LOG_AUTHPRIV instead + * in systems where that constant is defined) + * + * + * + * LOG_AUTHPRIV + * security/authorization messages (private) + * + * + * LOG_CRON + * clock daemon (cron and at) + * + * + * LOG_DAEMON + * other system daemons + * + * + * LOG_KERN + * kernel messages + * + * + * LOG_LOCAL0 ... LOG_LOCAL7 + * reserved for local use, these are not available in Windows + * + * + * LOG_LPR + * line printer subsystem + * + * + * LOG_MAIL + * mail subsystem + * + * + * LOG_NEWS + * USENET news subsystem + * + * + * LOG_SYSLOG + * messages generated internally by syslogd + * + * + * LOG_USER + * generic user-level messages + * + * + * LOG_UUCP + * UUCP subsystem + * + * + * + * + * + * LOG_USER is the only valid log type under Windows + * operating systems + * @throws NetworkException + * + */ +function openlog(string $ident, int $option, int $facility): void +{ + error_clear_last(); + $result = \openlog($ident, $option, $facility); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } +} + + +/** + * syslog generates a log message that will be + * distributed by the system logger. + * + * For information on setting up a user defined log handler, see the + * syslog.conf + * 5 Unix manual page. More + * information on the syslog facilities and option can be found in the man + * pages for syslog + * 3 on Unix machines. + * + * @param int $priority priority is a combination of the facility and + * the level. Possible values are: + * + * syslog Priorities (in descending order) + * + * + * + * Constant + * Description + * + * + * + * + * LOG_EMERG + * system is unusable + * + * + * LOG_ALERT + * action must be taken immediately + * + * + * LOG_CRIT + * critical conditions + * + * + * LOG_ERR + * error conditions + * + * + * LOG_WARNING + * warning conditions + * + * + * LOG_NOTICE + * normal, but significant, condition + * + * + * LOG_INFO + * informational message + * + * + * LOG_DEBUG + * debug-level message + * + * + * + * + * @param string $message The message to send, except that the two characters + * %m will be replaced by the error message string + * (strerror) corresponding to the present value of + * errno. + * @throws NetworkException + * + */ +function syslog(int $priority, string $message): void +{ + error_clear_last(); + $result = \syslog($priority, $message); + if ($result === false) { + throw NetworkException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/oci8.php b/vendor/thecodingmachine/safe/generated/oci8.php new file mode 100644 index 000000000..f2bac2781 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/oci8.php @@ -0,0 +1,1721 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\Oci8Exception; + +/** + * Binds the PHP array var_array to the Oracle + * placeholder name, which points to an Oracle PL/SQL + * array. Whether it will be used for input or output will be determined at + * run-time. + * + * @param resource $statement A valid OCI statement identifier. + * @param string $name The Oracle placeholder. + * @param array $var_array An array. + * @param int $max_table_length Sets the maximum length both for incoming and result arrays. + * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, + * oci_bind_array_by_name will find the longest + * element in the incoming array and will use it as the maximum length. + * @param int $type Should be used to set the type of PL/SQL array items. See list of + * available types below: + * + * + * + * + * SQLT_NUM - for arrays of NUMBER. + * + * + * + * + * SQLT_INT - for arrays of INTEGER (Note: INTEGER + * it is actually a synonym for NUMBER(38), but + * SQLT_NUM type won't work in this case even + * though they are synonyms). + * + * + * + * + * SQLT_FLT - for arrays of FLOAT. + * + * + * + * + * SQLT_AFC - for arrays of CHAR. + * + * + * + * + * SQLT_CHR - for arrays of VARCHAR2. + * + * + * + * + * SQLT_VCS - for arrays of VARCHAR. + * + * + * + * + * SQLT_AVC - for arrays of CHARZ. + * + * + * + * + * SQLT_STR - for arrays of STRING. + * + * + * + * + * SQLT_LVC - for arrays of LONG VARCHAR. + * + * + * + * + * SQLT_ODT - for arrays of DATE. + * + * + * + * + * SQLT_NUM - for arrays of NUMBER. + * + * SQLT_INT - for arrays of INTEGER (Note: INTEGER + * it is actually a synonym for NUMBER(38), but + * SQLT_NUM type won't work in this case even + * though they are synonyms). + * + * SQLT_FLT - for arrays of FLOAT. + * + * SQLT_AFC - for arrays of CHAR. + * + * SQLT_CHR - for arrays of VARCHAR2. + * + * SQLT_VCS - for arrays of VARCHAR. + * + * SQLT_AVC - for arrays of CHARZ. + * + * SQLT_STR - for arrays of STRING. + * + * SQLT_LVC - for arrays of LONG VARCHAR. + * + * SQLT_ODT - for arrays of DATE. + * @throws Oci8Exception + * + */ +function oci_bind_array_by_name($statement, string $name, array &$var_array, int $max_table_length, int $max_item_length = -1, int $type = SQLT_AFC): void +{ + error_clear_last(); + $result = \oci_bind_array_by_name($statement, $name, $var_array, $max_table_length, $max_item_length, $type); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Binds a PHP variable variable to the Oracle + * bind variable placeholder bv_name. Binding + * is important for Oracle database performance and also as a way to + * avoid SQL Injection security issues. + * + * Binding allows the database to reuse the statement context and + * caches from previous executions of the statement, even if another + * user or process originally executed it. Binding reduces SQL + * Injection concerns because the data associated with a bind + * variable is never treated as part of the SQL statement. It does + * not need quoting or escaping. + * + * PHP variables that have been bound can be changed and the + * statement re-executed without needing to re-parse the statement or + * re-bind. + * + * In Oracle, bind variables are commonly divided + * into IN binds for values that are passed into + * the database, and OUT binds for values that are + * returned to PHP. A bind variable may be + * both IN and OUT. Whether a + * bind variable will be used for input or output is determined at + * run-time. + * + * You must specify maxlength when using + * an OUT bind so that PHP allocates enough memory + * to hold the returned value. + * + * For IN binds it is recommended to set + * the maxlength length if the statement is + * re-executed multiple times with different values for the PHP + * variable. Otherwise Oracle may truncate data to the length of the + * initial PHP variable value. If you don't know what the maximum + * length will be, then re-call oci_bind_by_name + * with the current data size prior to + * each oci_execute call. Binding an + * unnecessarily large length will have an impact on process memory + * in the database. + * + * A bind call tells Oracle which memory address to read data from. + * For IN binds that address needs to contain + * valid data when oci_execute is called. This + * means that the variable bound must remain in scope until + * execution. If it doesn't, unexpected results or errors such as + * "ORA-01460: unimplemented or unreasonable conversion requested" + * may occur. For OUT binds one symptom is no + * value being set in the PHP variable. + * + * For a statement that is repeatedly executed, binding values that + * never change may reduce the ability of the Oracle optimizer to + * choose the best statement execution plan. Long running statements + * that are rarely re-executed may not benefit from binding. However + * in both cases, binding might be safer than joining strings into a + * SQL statement, as this can be a security risk if unfiltered user + * text is concatenated. + * + * @param resource $statement A valid OCI8 statement identifer. + * @param string $bv_name The colon-prefixed bind variable placeholder used in the + * statement. The colon is optional + * in bv_name. Oracle does not use question + * marks for placeholders. + * @param mixed $variable The PHP variable to be associated with bv_name + * @param int $maxlength Sets the maximum length for the data. If you set it to -1, this + * function will use the current length + * of variable to set the maximum + * length. In this case the variable must + * exist and contain data + * when oci_bind_by_name is called. + * @param int $type The datatype that Oracle will treat the data as. The + * default type used + * is SQLT_CHR. Oracle will convert the data + * between this type and the database column (or PL/SQL variable + * type), when possible. + * + * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you + * need to allocate it first using the + * oci_new_descriptor function. The + * length is not used for abstract datatypes + * and should be set to -1. + * + * Possible values for type are: + * + * + * + * SQLT_BFILEE or OCI_B_BFILE + * - for BFILEs; + * + * + * + * + * SQLT_CFILEE or OCI_B_CFILEE + * - for CFILEs; + * + * + * + * + * SQLT_CLOB or OCI_B_CLOB + * - for CLOBs; + * + * + * + * + * SQLT_BLOB or OCI_B_BLOB + * - for BLOBs; + * + * + * + * + * SQLT_RDD or OCI_B_ROWID + * - for ROWIDs; + * + * + * + * + * SQLT_NTY or OCI_B_NTY + * - for named datatypes; + * + * + * + * + * SQLT_INT or OCI_B_INT - for integers; + * + * + * + * + * SQLT_CHR - for VARCHARs; + * + * + * + * + * SQLT_BIN or OCI_B_BIN + * - for RAW columns; + * + * + * + * + * SQLT_LNG - for LONG columns; + * + * + * + * + * SQLT_LBI - for LONG RAW columns; + * + * + * + * + * SQLT_RSET - for cursors created + * with oci_new_cursor; + * + * + * + * + * SQLT_BOL or OCI_B_BOL + * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) + * + * + * + * + * SQLT_BFILEE or OCI_B_BFILE + * - for BFILEs; + * + * SQLT_CFILEE or OCI_B_CFILEE + * - for CFILEs; + * + * SQLT_CLOB or OCI_B_CLOB + * - for CLOBs; + * + * SQLT_BLOB or OCI_B_BLOB + * - for BLOBs; + * + * SQLT_RDD or OCI_B_ROWID + * - for ROWIDs; + * + * SQLT_NTY or OCI_B_NTY + * - for named datatypes; + * + * SQLT_INT or OCI_B_INT - for integers; + * + * SQLT_CHR - for VARCHARs; + * + * SQLT_BIN or OCI_B_BIN + * - for RAW columns; + * + * SQLT_LNG - for LONG columns; + * + * SQLT_LBI - for LONG RAW columns; + * + * SQLT_RSET - for cursors created + * with oci_new_cursor; + * + * SQLT_BOL or OCI_B_BOL + * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) + * @throws Oci8Exception + * + */ +function oci_bind_by_name($statement, string $bv_name, &$variable, int $maxlength = -1, int $type = SQLT_CHR): void +{ + error_clear_last(); + $result = \oci_bind_by_name($statement, $bv_name, $variable, $maxlength, $type); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Invalidates a cursor, freeing all associated resources and cancels the + * ability to read from it. + * + * @param resource $statement An OCI statement. + * @throws Oci8Exception + * + */ +function oci_cancel($statement): void +{ + error_clear_last(); + $result = \oci_cancel($statement); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Unsets connection. The underlying database + * connection is closed if no other resources are using it and if it + * was created with oci_connect + * or oci_new_connect. + * + * It is recommended to close connections that are no longer needed + * because this makes database resources available for other users. + * + * @param resource $connection An Oracle connection identifier returned by + * oci_connect, oci_pconnect, + * or oci_new_connect. + * @throws Oci8Exception + * + */ +function oci_close($connection): void +{ + error_clear_last(); + $result = \oci_close($connection); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Commits the outstanding transaction for the + * Oracle connection. A commit ends the + * current transaction and makes permanent all changes. It releases + * all locks held. + * + * A transaction begins when the first SQL statement that changes data + * is executed with oci_execute using + * the OCI_NO_AUTO_COMMIT flag. Further data + * changes made by other statements become part of the same + * transaction. Data changes made in a transaction are temporary + * until the transaction is committed or rolled back. Other users of + * the database will not see the changes until they are committed. + * + * When inserting or updating data, using transactions is recommended + * for relational data consistency and for performance reasons. + * + * @param resource $connection An Oracle connection identifier, returned by + * oci_connect, oci_pconnect, or oci_new_connect. + * @throws Oci8Exception + * + */ +function oci_commit($connection): void +{ + error_clear_last(); + $result = \oci_commit($connection); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Returns a connection identifier needed for most other OCI8 operations. + * + * See Connection Handling for + * general information on connection management and connection + * pooling. + * + * From PHP 5.1.2 (PECL OCI8 1.1) oci_close can + * be used to close the connection. + * + * The second and subsequent calls to oci_connect + * with the same parameters will return the connection handle returned + * from the first call. This means that transactions in one handle are + * also in the other handles, because they use the + * same underlying database connection. If two + * handles need to be transactionally isolated from each other, use + * oci_new_connect instead. + * + * @param string $username The Oracle user name. + * @param string $password The password for username. + * @param string $connection_string Contains + * the Oracle instance to connect to. It can be + * an Easy Connect + * string, or a Connect Name from + * the tnsnames.ora file, or the name of a local + * Oracle instance. + * + * If not specified, PHP uses + * environment variables such as TWO_TASK (on Linux) + * or LOCAL (on Windows) + * and ORACLE_SID to determine the + * Oracle instance to connect to. + * + * + * To use the Easy Connect naming method, PHP must be linked with Oracle + * 10g or greater Client libraries. The Easy Connect string for Oracle + * 10g is of the form: + * [//]host_name[:port][/service_name]. From Oracle + * 11g, the syntax is: + * [//]host_name[:port][/service_name][:server_type][/instance_name]. + * Service names can be found by running the Oracle + * utility lsnrctl status on the database server + * machine. + * + * + * The tnsnames.ora file can be in the Oracle Net + * search path, which + * includes $ORACLE_HOME/network/admin + * and /etc. Alternatively + * set TNS_ADMIN so + * that $TNS_ADMIN/tnsnames.ora is read. Make sure + * the web daemon has read access to the file. + * @param string $character_set Determines + * the character set used by the Oracle Client libraries. The character + * set does not need to match the character set used by the database. If + * it doesn't match, Oracle will do its best to convert data to and from + * the database character set. Depending on the character sets this may + * not give usable results. Conversion also adds some time overhead. + * + * If not specified, the + * Oracle Client libraries determine a character set from + * the NLS_LANG environment variable. + * + * Passing this parameter can + * reduce the time taken to connect. + * @param int $session_mode This + * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the + * following values: OCI_DEFAULT, + * OCI_SYSOPER and OCI_SYSDBA. + * If either OCI_SYSOPER or + * OCI_SYSDBA were specified, this function will try + * to establish privileged connection using external credentials. + * Privileged connections are disabled by default. To enable them you + * need to set oci8.privileged_connect + * to On. + * + * + * PHP 5.3 (PECL OCI8 1.3.4) introduced the + * OCI_CRED_EXT mode value. This tells Oracle to use + * External or OS authentication, which must be configured in the + * database. The OCI_CRED_EXT flag can only be used + * with username of "/" and a empty password. + * oci8.privileged_connect + * may be On or Off. + * + * + * OCI_CRED_EXT may be combined with the + * OCI_SYSOPER or + * OCI_SYSDBA modes. + * + * + * OCI_CRED_EXT is not supported on Windows for + * security reasons. + * @return resource Returns a connection identifier. + * @throws Oci8Exception + * + */ +function oci_connect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null) +{ + error_clear_last(); + if ($session_mode !== null) { + $result = \oci_connect($username, $password, $connection_string, $character_set, $session_mode); + } elseif ($character_set !== null) { + $result = \oci_connect($username, $password, $connection_string, $character_set); + } elseif ($connection_string !== null) { + $result = \oci_connect($username, $password, $connection_string); + } else { + $result = \oci_connect($username, $password); + } + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Associates a PHP variable with a column for query fetches using oci_fetch. + * + * The oci_define_by_name call must occur before + * executing oci_execute. + * + * @param resource $statement A valid OCI8 statement + * identifier created by oci_parse and executed + * by oci_execute, or a REF + * CURSOR statement identifier. + * @param string $column_name The column name used in the query. + * + * Use uppercase for Oracle's default, non-case sensitive column + * names. Use the exact column name case for case-sensitive + * column names. + * @param mixed $variable The PHP variable that will contain the returned column value. + * @param int $type The data type to be returned. Generally not needed. Note that + * Oracle-style data conversions are not performed. For example, + * SQLT_INT will be ignored and the returned + * data type will still be SQLT_CHR. + * + * You can optionally use oci_new_descriptor + * to allocate LOB/ROWID/BFILE descriptors. + * @throws Oci8Exception + * + */ +function oci_define_by_name($statement, string $column_name, &$variable, int $type = SQLT_CHR): void +{ + error_clear_last(); + $result = \oci_define_by_name($statement, $column_name, $variable, $type); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Executes a statement previously returned + * from oci_parse. + * + * After execution, statements like INSERT will + * have data committed to the database by default. For statements + * like SELECT, execution performs the logic of the + * query. Query results can subsequently be fetched in PHP with + * functions like oci_fetch_array. + * + * Each parsed statement may be executed multiple times, saving the + * cost of re-parsing. This is commonly used + * for INSERT statements when data is bound + * with oci_bind_by_name. + * + * @param resource $statement A valid OCI statement identifier. + * @param int $mode An optional second parameter can be one of the following constants: + * + * Execution Modes + * + * + * + * Constant + * Description + * + * + * + * + * OCI_COMMIT_ON_SUCCESS + * Automatically commit all outstanding changes for + * this connection when the statement has succeeded. This + * is the default. + * + * + * OCI_DESCRIBE_ONLY + * Make query meta data available to functions + * like oci_field_name but do not + * create a result set. Any subsequent fetch call such + * as oci_fetch_array will + * fail. + * + * + * OCI_NO_AUTO_COMMIT + * Do not automatically commit changes. Prior to PHP + * 5.3.2 (PECL OCI8 1.4) + * use OCI_DEFAULT which is equivalent + * to OCI_NO_AUTO_COMMIT. + * + * + * + * + * + * Using OCI_NO_AUTO_COMMIT mode starts or continues a + * transaction. Transactions are automatically rolled back when + * the connection is closed, or when the script ends. Explicitly + * call oci_commit to commit a transaction, + * or oci_rollback to abort it. + * + * When inserting or updating data, using transactions is + * recommended for relational data consistency and for performance + * reasons. + * + * If OCI_NO_AUTO_COMMIT mode is used for any + * statement including queries, and + * oci_commit + * or oci_rollback is not subsequently + * called, then OCI8 will perform a rollback at the end of the + * script even if no data was changed. To avoid an unnecessary + * rollback, many scripts do not + * use OCI_NO_AUTO_COMMIT mode for queries or + * PL/SQL. Be careful to ensure the appropriate transactional + * consistency for the application when + * using oci_execute with different modes in + * the same script. + * @throws Oci8Exception + * + */ +function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void +{ + error_clear_last(); + $result = \oci_execute($statement, $mode); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Fetches multiple rows from a query into a two-dimensional array. + * By default, all rows are returned. + * + * This function can be called only once for each query executed + * with oci_execute. + * + * @param resource $statement A valid OCI8 statement + * identifier created by oci_parse and executed + * by oci_execute, or a REF + * CURSOR statement identifier. + * @param array|null $output The variable to contain the returned rows. + * + * LOB columns are returned as strings, where Oracle supports + * conversion. + * + * See oci_fetch_array for more information + * on how data and types are fetched. + * @param int $skip The number of initial rows to discard when fetching the + * result. The default value is 0, so the first row onwards is + * returned. + * @param int $maxrows The number of rows to return. The default is -1 meaning return + * all the rows from skip + 1 onwards. + * @param int $flags Parameter flags indicates the array + * structure and whether associative arrays should be used. + * + * oci_fetch_all Array Structure Modes + * + * + * + * Constant + * Description + * + * + * + * + * OCI_FETCHSTATEMENT_BY_ROW + * The outer array will contain one sub-array per query + * row. + * + * + * OCI_FETCHSTATEMENT_BY_COLUMN + * The outer array will contain one sub-array per query + * column. This is the default. + * + * + * + * + * + * Arrays can be indexed either by column heading or numerically. + * Only one index mode will be returned. + * + * oci_fetch_all Array Index Modes + * + * + * + * Constant + * Description + * + * + * + * + * OCI_NUM + * Numeric indexes are used for each column's array. + * + * + * OCI_ASSOC + * Associative indexes are used for each column's + * array. This is the default. + * + * + * + * + * + * Use the addition operator "+" to choose a combination + * of array structure and index modes. + * + * Oracle's default, non-case sensitive column names will have + * uppercase array keys. Case-sensitive column names will have + * array keys using the exact column case. + * Use var_dump + * on output to verify the appropriate case + * to use for each query. + * + * Queries that have more than one column with the same name + * should use column aliases. Otherwise only one of the columns + * will appear in an associative array. + * @return int Returns the number of rows in output, which + * may be 0 or more. + * @throws Oci8Exception + * + */ +function oci_fetch_all($statement, ?array &$output, int $skip = 0, int $maxrows = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN + OCI_ASSOC): int +{ + error_clear_last(); + $result = \oci_fetch_all($statement, $output, $skip, $maxrows, $flags); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the name of the field. + * + * @param resource $statement A valid OCI statement identifier. + * @param mixed $field Can be the field's index (1-based) or name. + * @return string Returns the name as a strings. + * @throws Oci8Exception + * + */ +function oci_field_name($statement, $field): string +{ + error_clear_last(); + $result = \oci_field_name($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns precision of the field. + * + * For FLOAT columns, precision is nonzero and scale is -127. + * If precision is 0, then column is NUMBER. Else it's + * NUMBER(precision, scale). + * + * @param resource $statement A valid OCI statement identifier. + * @param mixed $field Can be the field's index (1-based) or name. + * @return int Returns the precision as an integers. + * @throws Oci8Exception + * + */ +function oci_field_precision($statement, $field): int +{ + error_clear_last(); + $result = \oci_field_precision($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the scale of the column with field index. + * + * For FLOAT columns, precision is nonzero and scale is -127. + * If precision is 0, then column is NUMBER. Else it's + * NUMBER(precision, scale). + * + * @param resource $statement A valid OCI statement identifier. + * @param mixed $field Can be the field's index (1-based) or name. + * @return int Returns the scale as an integers. + * @throws Oci8Exception + * + */ +function oci_field_scale($statement, $field): int +{ + error_clear_last(); + $result = \oci_field_scale($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the size of a field. + * + * @param resource $statement A valid OCI statement identifier. + * @param mixed $field Can be the field's index (1-based) or name. + * @return int Returns the size of a field in bytess. + * @throws Oci8Exception + * + */ +function oci_field_size($statement, $field): int +{ + error_clear_last(); + $result = \oci_field_size($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns Oracle's raw "SQLT" data type of the field. + * + * If you want a field's type name, then use oci_field_type instead. + * + * @param resource $statement A valid OCI statement identifier. + * @param mixed $field Can be the field's index (1-based) or name. + * @return int Returns Oracle's raw data type as a numbers. + * @throws Oci8Exception + * + */ +function oci_field_type_raw($statement, $field): int +{ + error_clear_last(); + $result = \oci_field_type_raw($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns a field's data type name. + * + * @param resource $statement A valid OCI statement identifier. + * @param mixed $field Can be the field's index (1-based) or name. + * @return mixed Returns the field data type as a strings. + * @throws Oci8Exception + * + */ +function oci_field_type($statement, $field) +{ + error_clear_last(); + $result = \oci_field_type($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Frees a descriptor allocated by oci_new_descriptor. + * + * @param resource $descriptor + * @throws Oci8Exception + * + */ +function oci_free_descriptor($descriptor): void +{ + error_clear_last(); + $result = \oci_free_descriptor($descriptor); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Frees resources associated with Oracle's cursor or statement, which was + * received from as a result of oci_parse or obtained + * from Oracle. + * + * @param resource $statement A valid OCI statement identifier. + * @throws Oci8Exception + * + */ +function oci_free_statement($statement): void +{ + error_clear_last(); + $result = \oci_free_statement($statement); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Allocates a new collection object. + * + * @param resource $connection An Oracle connection identifier, returned by + * oci_connect or oci_pconnect. + * @param string $tdo Should be a valid named type (uppercase). + * @param string $schema Should point to the scheme, where the named type was created. The name + * of the current user is the default value. + * @return \OCI-Collection Returns a new OCICollection object. + * @throws Oci8Exception + * + */ +function oci_new_collection($connection, string $tdo, string $schema = null) +{ + error_clear_last(); + $result = \oci_new_collection($connection, $tdo, $schema); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Establishes a new connection to an Oracle server and logs on. + * + * Unlike oci_connect and + * oci_pconnect, oci_new_connect + * does not cache connections and will always return a brand-new freshly + * opened connection handle. This is useful if your application needs + * transactional isolation between two sets of queries. + * + * @param string $username The Oracle user name. + * @param string $password The password for username. + * @param string $connection_string Contains + * the Oracle instance to connect to. It can be + * an Easy Connect + * string, or a Connect Name from + * the tnsnames.ora file, or the name of a local + * Oracle instance. + * + * If not specified, PHP uses + * environment variables such as TWO_TASK (on Linux) + * or LOCAL (on Windows) + * and ORACLE_SID to determine the + * Oracle instance to connect to. + * + * + * To use the Easy Connect naming method, PHP must be linked with Oracle + * 10g or greater Client libraries. The Easy Connect string for Oracle + * 10g is of the form: + * [//]host_name[:port][/service_name]. From Oracle + * 11g, the syntax is: + * [//]host_name[:port][/service_name][:server_type][/instance_name]. + * Service names can be found by running the Oracle + * utility lsnrctl status on the database server + * machine. + * + * + * The tnsnames.ora file can be in the Oracle Net + * search path, which + * includes $ORACLE_HOME/network/admin + * and /etc. Alternatively + * set TNS_ADMIN so + * that $TNS_ADMIN/tnsnames.ora is read. Make sure + * the web daemon has read access to the file. + * @param string $character_set Determines + * the character set used by the Oracle Client libraries. The character + * set does not need to match the character set used by the database. If + * it doesn't match, Oracle will do its best to convert data to and from + * the database character set. Depending on the character sets this may + * not give usable results. Conversion also adds some time overhead. + * + * If not specified, the + * Oracle Client libraries determine a character set from + * the NLS_LANG environment variable. + * + * Passing this parameter can + * reduce the time taken to connect. + * @param int $session_mode This + * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the + * following values: OCI_DEFAULT, + * OCI_SYSOPER and OCI_SYSDBA. + * If either OCI_SYSOPER or + * OCI_SYSDBA were specified, this function will try + * to establish privileged connection using external credentials. + * Privileged connections are disabled by default. To enable them you + * need to set oci8.privileged_connect + * to On. + * + * + * PHP 5.3 (PECL OCI8 1.3.4) introduced the + * OCI_CRED_EXT mode value. This tells Oracle to use + * External or OS authentication, which must be configured in the + * database. The OCI_CRED_EXT flag can only be used + * with username of "/" and a empty password. + * oci8.privileged_connect + * may be On or Off. + * + * + * OCI_CRED_EXT may be combined with the + * OCI_SYSOPER or + * OCI_SYSDBA modes. + * + * + * OCI_CRED_EXT is not supported on Windows for + * security reasons. + * @return resource Returns a connection identifier. + * @throws Oci8Exception + * + */ +function oci_new_connect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null) +{ + error_clear_last(); + if ($session_mode !== null) { + $result = \oci_new_connect($username, $password, $connection_string, $character_set, $session_mode); + } elseif ($character_set !== null) { + $result = \oci_new_connect($username, $password, $connection_string, $character_set); + } elseif ($connection_string !== null) { + $result = \oci_new_connect($username, $password, $connection_string); + } else { + $result = \oci_new_connect($username, $password); + } + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Allocates a new statement handle on the specified connection. + * + * @param resource $connection An Oracle connection identifier, returned by + * oci_connect or oci_pconnect. + * @return resource Returns a new statement handle. + * @throws Oci8Exception + * + */ +function oci_new_cursor($connection) +{ + error_clear_last(); + $result = \oci_new_cursor($connection); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Allocates resources to hold descriptor or LOB locator. + * + * @param resource $connection An Oracle connection identifier, returned by + * oci_connect or oci_pconnect. + * @param int $type Valid values for type are: + * OCI_DTYPE_FILE, OCI_DTYPE_LOB and + * OCI_DTYPE_ROWID. + * @return \OCI-Lob Returns a new LOB or FILE descriptor on success, FALSE on error. + * @throws Oci8Exception + * + */ +function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) +{ + error_clear_last(); + $result = \oci_new_descriptor($connection, $type); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the number of columns in the given statement. + * + * @param resource $statement A valid OCI statement identifier. + * @return int Returns the number of columns as an integers. + * @throws Oci8Exception + * + */ +function oci_num_fields($statement): int +{ + error_clear_last(); + $result = \oci_num_fields($statement); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the number of rows affected during statement execution. + * + * @param resource $statement A valid OCI statement identifier. + * @return int Returns the number of rows affected as an integers. + * @throws Oci8Exception + * + */ +function oci_num_rows($statement): int +{ + error_clear_last(); + $result = \oci_num_rows($statement); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Prepares sql_text using + * connection and returns the statement identifier, + * which can be used with oci_bind_by_name, + * oci_execute and other functions. + * + * Statement identifiers can be freed + * with oci_free_statement or by setting the + * variable to NULL. + * + * @param resource $connection An Oracle connection identifier, returned by + * oci_connect, oci_pconnect, or oci_new_connect. + * @param string $sql_text The SQL or PL/SQL statement. + * + * SQL statements should not end with a + * semi-colon (";"). PL/SQL + * statements should end with a semi-colon + * (";"). + * @return resource Returns a statement handle on success. + * @throws Oci8Exception + * + */ +function oci_parse($connection, string $sql_text) +{ + error_clear_last(); + $result = \oci_parse($connection, $sql_text); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Creates a persistent connection to an Oracle server and logs on. + * + * Persistent connections are cached and re-used between requests, resulting + * in reduced overhead on each page load; a typical PHP application will have + * a single persistent connection open against an Oracle server per Apache + * child process (or PHP FastCGI/CGI process). See the Persistent Database + * Connections section for more information. + * + * @param string $username The Oracle user name. + * @param string $password The password for username. + * @param string $connection_string Contains + * the Oracle instance to connect to. It can be + * an Easy Connect + * string, or a Connect Name from + * the tnsnames.ora file, or the name of a local + * Oracle instance. + * + * If not specified, PHP uses + * environment variables such as TWO_TASK (on Linux) + * or LOCAL (on Windows) + * and ORACLE_SID to determine the + * Oracle instance to connect to. + * + * + * To use the Easy Connect naming method, PHP must be linked with Oracle + * 10g or greater Client libraries. The Easy Connect string for Oracle + * 10g is of the form: + * [//]host_name[:port][/service_name]. From Oracle + * 11g, the syntax is: + * [//]host_name[:port][/service_name][:server_type][/instance_name]. + * Service names can be found by running the Oracle + * utility lsnrctl status on the database server + * machine. + * + * + * The tnsnames.ora file can be in the Oracle Net + * search path, which + * includes $ORACLE_HOME/network/admin + * and /etc. Alternatively + * set TNS_ADMIN so + * that $TNS_ADMIN/tnsnames.ora is read. Make sure + * the web daemon has read access to the file. + * @param string $character_set Determines + * the character set used by the Oracle Client libraries. The character + * set does not need to match the character set used by the database. If + * it doesn't match, Oracle will do its best to convert data to and from + * the database character set. Depending on the character sets this may + * not give usable results. Conversion also adds some time overhead. + * + * If not specified, the + * Oracle Client libraries determine a character set from + * the NLS_LANG environment variable. + * + * Passing this parameter can + * reduce the time taken to connect. + * @param int $session_mode This + * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the + * following values: OCI_DEFAULT, + * OCI_SYSOPER and OCI_SYSDBA. + * If either OCI_SYSOPER or + * OCI_SYSDBA were specified, this function will try + * to establish privileged connection using external credentials. + * Privileged connections are disabled by default. To enable them you + * need to set oci8.privileged_connect + * to On. + * + * + * PHP 5.3 (PECL OCI8 1.3.4) introduced the + * OCI_CRED_EXT mode value. This tells Oracle to use + * External or OS authentication, which must be configured in the + * database. The OCI_CRED_EXT flag can only be used + * with username of "/" and a empty password. + * oci8.privileged_connect + * may be On or Off. + * + * + * OCI_CRED_EXT may be combined with the + * OCI_SYSOPER or + * OCI_SYSDBA modes. + * + * + * OCI_CRED_EXT is not supported on Windows for + * security reasons. + * @return resource Returns a connection identifier. + * @throws Oci8Exception + * + */ +function oci_pconnect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null) +{ + error_clear_last(); + if ($session_mode !== null) { + $result = \oci_pconnect($username, $password, $connection_string, $character_set, $session_mode); + } elseif ($character_set !== null) { + $result = \oci_pconnect($username, $password, $connection_string, $character_set); + } elseif ($connection_string !== null) { + $result = \oci_pconnect($username, $password, $connection_string); + } else { + $result = \oci_pconnect($username, $password); + } + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the data from field in the current row, + * fetched by oci_fetch. + * + * For details on the data type mapping performed by + * the OCI8 extension, see the datatypes + * supported by the driver + * + * @param resource $statement + * @param mixed $field Can be either use the column number (1-based) or the column name. + * The case of the column name must be the case that Oracle meta data + * describes the column as, which is uppercase for columns created + * case insensitively. + * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and + * FILEs). + * @throws Oci8Exception + * + */ +function oci_result($statement, $field): string +{ + error_clear_last(); + $result = \oci_result($statement, $field); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Reverts all uncommitted changes for the Oracle + * connection and ends the transaction. It + * releases all locks held. All Oracle SAVEPOINTS + * are erased. + * + * A transaction begins when the first SQL statement that changes data + * is executed with oci_execute using + * the OCI_NO_AUTO_COMMIT flag. Further data + * changes made by other statements become part of the same + * transaction. Data changes made in a transaction are temporary + * until the transaction is committed or rolled back. Other users of + * the database will not see the changes until they are committed. + * + * When inserting or updating data, using transactions is recommended + * for relational data consistency and for performance reasons. + * + * @param resource $connection An Oracle connection identifier, returned by + * oci_connect, oci_pconnect + * or oci_new_connect. + * @throws Oci8Exception + * + */ +function oci_rollback($connection): void +{ + error_clear_last(); + $result = \oci_rollback($connection); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Returns a string with the Oracle Database version and available options + * + * @param resource $connection + * @return string Returns the version information as a string. + * @throws Oci8Exception + * + */ +function oci_server_version($connection): string +{ + error_clear_last(); + $result = \oci_server_version($connection); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the action name for Oracle tracing. + * + * The action name is registered with the database when the next + * 'round-trip' from PHP to the database occurs, typically when an SQL + * statement is executed. + * + * The action name can subsequently be queried from database administration + * views such as V$SESSION. It can be used for + * tracing and monitoring such as with V$SQLAREA + * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. + * + * The value may be retained across persistent connections. + * + * @param resource $connection An Oracle connection identifier, + * returned by oci_connect, oci_pconnect, + * or oci_new_connect. + * @param string $action_name User chosen string up to 32 bytes long. + * @throws Oci8Exception + * + */ +function oci_set_action($connection, string $action_name): void +{ + error_clear_last(); + $result = \oci_set_action($connection, $action_name); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets a timeout limiting the maxium time a database round-trip using this connection may take. + * + * Each OCI8 operation may make zero or more calls to Oracle's client + * library. These internal calls may then may make zero or more + * round-trips to Oracle Database. If any one of those round-trips + * takes more than time_out milliseconds, then the + * operation is cancelled and an error is returned to the application. + * + * The time_out value applies to each round-trip + * individually, not to the sum of all round-trips. Time spent + * processing in PHP OCI8 before or after the completion of each + * round-trip is not counted. + * + * When a call is interrupted, Oracle will attempt to clean up the + * connection for reuse. This operation is allowed to run for + * another time_out period. Depending on the + * outcome of the cleanup, the connection may or may not be reusable. + * + * When persistent connections are used, the timeout value will be + * retained across PHP requests. + * + * The oci_set_call_timeout function is available + * when OCI8 uses Oracle 18 (or later) Client libraries. + * + * @param resource $connection An Oracle connection identifier, + * returned by oci_connect, oci_pconnect, + * or oci_new_connect. + * @param int $time_out The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take. + * @throws Oci8Exception + * + */ +function oci_set_call_timeout($connection, int $time_out): void +{ + error_clear_last(); + $result = \oci_set_call_timeout($connection, $time_out); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets the client identifier used by various database components to + * identify lightweight application users who authenticate as the same + * database user. + * + * The client identifier is registered with the database when the next + * 'round-trip' from PHP to the database occurs, typically when an SQL + * statement is executed. + * + * The identifier can subsequently be queried, for example + * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') + * FROM DUAL. Database administration views such + * as V$SESSION will also contain the value. It + * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE + * for tracing and can also be used for auditing. + * + * The value may be retained across page requests that use the same persistent connection. + * + * @param resource $connection An Oracle connection identifier, + * returned by oci_connect, oci_pconnect, + * or oci_new_connect. + * @param string $client_identifier User chosen string up to 64 bytes long. + * @throws Oci8Exception + * + */ +function oci_set_client_identifier($connection, string $client_identifier): void +{ + error_clear_last(); + $result = \oci_set_client_identifier($connection, $client_identifier); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets the client information for Oracle tracing. + * + * The client information is registered with the database when the next + * 'round-trip' from PHP to the database occurs, typically when an SQL + * statement is executed. + * + * The client information can subsequently be queried from database + * administration views such as V$SESSION. + * + * The value may be retained across persistent connections. + * + * @param resource $connection An Oracle connection identifier, + * returned by oci_connect, oci_pconnect, + * or oci_new_connect. + * @param string $client_info User chosen string up to 64 bytes long. + * @throws Oci8Exception + * + */ +function oci_set_client_info($connection, string $client_info): void +{ + error_clear_last(); + $result = \oci_set_client_info($connection, $client_info); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets the DBOP for Oracle tracing. + * + * The database operation name is registered with the database when the next + * 'round-trip' from PHP to the database occurs, typically when a SQL + * statement is executed. + * + * The database operation can subsequently be queried from database administration + * views such as V$SQL_MONITOR. + * + * The oci_set_db_operation function is available + * when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later). + * + * @param resource $connection An Oracle connection identifier, + * returned by oci_connect, oci_pconnect, + * or oci_new_connect. + * @param string $dbop User chosen string. + * @throws Oci8Exception + * + */ +function oci_set_db_operation($connection, string $dbop): void +{ + error_clear_last(); + $result = \oci_set_db_operation($connection, $dbop); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets the database "edition" of objects to be used by a subsequent + * connections. + * + * Oracle Editions allow concurrent versions of applications to run + * using the same schema and object names. This is useful for + * upgrading live systems. + * + * Call oci_set_edition before calling + * oci_connect, oci_pconnect + * or oci_new_connect. + * + * If an edition is set that is not valid in the database, connection + * will fail even if oci_set_edition returns success. + * + * When using persistent connections, if a connection with the + * requested edition setting already exists, it is reused. Otherwise, + * a different persistent connection is created + * + * @param string $edition Oracle Database edition name previously created with the SQL + * "CREATE EDITION" command. + * @throws Oci8Exception + * + */ +function oci_set_edition(string $edition): void +{ + error_clear_last(); + $result = \oci_set_edition($edition); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets the module name for Oracle tracing. + * + * The module name is registered with the database when the next + * 'round-trip' from PHP to the database occurs, typically when an SQL + * statement is executed. + * + * The name can subsequently be queried from database administration + * views such as V$SESSION. It can be used for + * tracing and monitoring such as with V$SQLAREA + * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. + * + * The value may be retained across persistent connections. + * + * @param resource $connection An Oracle connection identifier, + * returned by oci_connect, oci_pconnect, + * or oci_new_connect. + * @param string $module_name User chosen string up to 48 bytes long. + * @throws Oci8Exception + * + */ +function oci_set_module_name($connection, string $module_name): void +{ + error_clear_last(); + $result = \oci_set_module_name($connection, $module_name); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Sets the number of rows to be buffered by the Oracle Client + * libraries after a successful query call + * to oci_execute and for each subsequent + * internal fetch request to the database. For queries returning a + * large number of rows, performance can be significantly improved by + * increasing the prefetch count above the + * default oci8.default_prefetch + * value. + * + * Prefetching is Oracle's efficient way of returning more than one + * data row from the database in each network request. This can + * result in better network and CPU utilization. The buffering of + * rows is internal to OCI8 and the behavior of OCI8 fetching + * functions is unchanged regardless of the prefetch count. For + * example, oci_fetch_row will always return one + * row. The prefetch buffer is per-statement and is not used by + * re-executed statements or by other connections. + * + * Call oci_set_prefetch before + * calling oci_execute. + * + * A tuning goal is to set the prefetch value to a reasonable size for + * the network and database to handle. For queries returning a very + * large number of rows, overall system efficiency might be better if + * rows are retrieved from the database in several chunks (i.e set the + * prefetch value smaller than the number of rows). This allows the + * database to handle other users' statements while the PHP script is + * processing the current set of rows. + * + * Query prefetching was introduced in Oracle 8i. REF CURSOR + * prefetching was introduced in Oracle 11gR2 and occurs when PHP is + * linked with Oracle 11gR2 (or later) Client libraries. + * Nested cursor prefetching was + * introduced in Oracle 11gR2 and requires both the Oracle Client + * libraries and the database to be version 11gR2 or greater. + * + * Prefetching is not supported when queries contain LONG or LOB + * columns. The prefetch value is ignored and single-row fetches will + * be used in all the situations when prefetching is not supported. + * + * When using Oracle Database 12c, the prefetch + * value set by PHP can be overridden by Oracle's + * client oraaccess.xml configuration file. Refer + * to Oracle documentation for more detail. + * + * @param resource $statement A valid OCI8 statement + * identifier created by oci_parse and executed + * by oci_execute, or a REF + * CURSOR statement identifier. + * @param int $rows The number of rows to be prefetched, >= 0 + * @throws Oci8Exception + * + */ +function oci_set_prefetch($statement, int $rows): void +{ + error_clear_last(); + $result = \oci_set_prefetch($statement, $rows); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} + + +/** + * Returns a keyword identifying the type of the + * OCI8 statement. + * + * @param resource $statement A valid OCI8 statement identifier from oci_parse. + * @return string Returns the type of statement as one of the + * following strings. + * + * Statement type + * + * + * + * Return String + * Notes + * + * + * + * + * ALTER + * + * + * + * BEGIN + * + * + * + * CALL + * Introduced in PHP 5.2.1 (PECL OCI8 1.2.3) + * + * + * CREATE + * + * + * + * DECLARE + * + * + * + * DELETE + * + * + * + * DROP + * + * + * + * INSERT + * + * + * + * SELECT + * + * + * + * UPDATE + * + * + * + * UNKNOW. + * @throws Oci8Exception + * + */ +function oci_statement_type($statement): string +{ + error_clear_last(); + $result = \oci_statement_type($statement); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Unregister the user-defined callback function registered to connection + * by oci_register_taf_callback. See + * OCI8 Transparent Application Failover (TAF) Support + * for information. + * + * @param resource $connection An Oracle connection identifier. + * @throws Oci8Exception + * + */ +function oci_unregister_taf_callback($connection): void +{ + error_clear_last(); + $result = \oci_unregister_taf_callback($connection); + if ($result === false) { + throw Oci8Exception::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/opcache.php b/vendor/thecodingmachine/safe/generated/opcache.php new file mode 100644 index 000000000..04a58205f --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/opcache.php @@ -0,0 +1,42 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\OpcacheException; + +/** + * This function compiles a PHP script and adds it to the opcode cache without + * executing it. This can be used to prime the cache after a Web server + * restart by pre-caching files that will be included in later requests. + * + * @param string $file The path to the PHP script to be compiled. + * @throws OpcacheException + * + */ +function opcache_compile_file(string $file): void +{ + error_clear_last(); + $result = \opcache_compile_file($file); + if ($result === false) { + throw OpcacheException::createFromPhpError(); + } +} + + +/** + * This function returns state information about the cache instance + * + * @param bool $get_scripts Include script specific state information + * @return array Returns an array of information, optionally containing script specific state information. + * @throws OpcacheException + * + */ +function opcache_get_status(bool $get_scripts = true): array +{ + error_clear_last(); + $result = \opcache_get_status($get_scripts); + if ($result === false) { + throw OpcacheException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/openssl.php b/vendor/thecodingmachine/safe/generated/openssl.php new file mode 100644 index 000000000..117b53d6a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/openssl.php @@ -0,0 +1,1088 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\OpensslException; + +/** + * Gets the cipher initialization vector (iv) length. + * + * @param string $method The cipher method, see openssl_get_cipher_methods for a list of potential values. + * @return int Returns the cipher length on success. + * @throws OpensslException + * + */ +function openssl_cipher_iv_length(string $method): int +{ + error_clear_last(); + $result = \openssl_cipher_iv_length($method); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_csr_export_to_file takes the Certificate + * Signing Request represented by csr and saves it + * in PEM format into the file named by outfilename. + * + * @param string|resource $csr See CSR parameters for a list of valid values. + * @param string $outfilename Path to the output file. + * @param bool $notext + * The optional parameter notext affects + * the verbosity of the output; if it is FALSE, then additional human-readable + * information is included in the output. The default value of + * notext is TRUE. + * @throws OpensslException + * + */ +function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = true): void +{ + error_clear_last(); + $result = \openssl_csr_export_to_file($csr, $outfilename, $notext); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_csr_export takes the Certificate Signing + * Request represented by csr and stores it in + * PEM format in out, which is passed by + * reference. + * + * @param string|resource $csr See CSR parameters for a list of valid values. + * @param string|null $out on success, this string will contain the PEM encoded CSR + * @param bool $notext + * The optional parameter notext affects + * the verbosity of the output; if it is FALSE, then additional human-readable + * information is included in the output. The default value of + * notext is TRUE. + * @throws OpensslException + * + */ +function openssl_csr_export($csr, ?string &$out, bool $notext = true): void +{ + error_clear_last(); + $result = \openssl_csr_export($csr, $out, $notext); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_csr_get_subject returns subject + * distinguished name information encoded in the csr + * including fields commonName (CN), organizationName (O), countryName (C) etc. + * + * @param string|resource $csr See CSR parameters for a list of valid values. + * @param bool $use_shortnames shortnames controls how the data is indexed in the + * array - if shortnames is TRUE (the default) then + * fields will be indexed with the short name form, otherwise, the long name + * form will be used - e.g.: CN is the shortname form of commonName. + * @return array Returns an associative array with subject description. + * @throws OpensslException + * + */ +function openssl_csr_get_subject($csr, bool $use_shortnames = true): array +{ + error_clear_last(); + $result = \openssl_csr_get_subject($csr, $use_shortnames); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_csr_new generates a new CSR (Certificate Signing Request) + * based on the information provided by dn. + * + * @param array $dn The Distinguished Name or subject fields to be used in the certificate. + * @param resource $privkey privkey should be set to a private key that was + * previously generated by openssl_pkey_new (or + * otherwise obtained from the other openssl_pkey family of functions). + * The corresponding public portion of the key will be used to sign the + * CSR. + * @param array $configargs By default, the information in your system openssl.conf + * is used to initialize the request; you can specify a configuration file + * section by setting the config_section_section key of + * configargs. You can also specify an alternative + * openssl configuration file by setting the value of the + * config key to the path of the file you want to use. + * The following keys, if present in configargs + * behave as their equivalents in the openssl.conf, as + * listed in the table below. + * + * Configuration overrides + * + * + * + * configargs key + * type + * openssl.conf equivalent + * description + * + * + * + * + * digest_alg + * string + * default_md + * Digest method or signature hash, usually one of openssl_get_md_methods + * + * + * x509_extensions + * string + * x509_extensions + * Selects which extensions should be used when creating an x509 + * certificate + * + * + * req_extensions + * string + * req_extensions + * Selects which extensions should be used when creating a CSR + * + * + * private_key_bits + * integer + * default_bits + * Specifies how many bits should be used to generate a private + * key + * + * + * private_key_type + * integer + * none + * Specifies the type of private key to create. This can be one + * of OPENSSL_KEYTYPE_DSA, + * OPENSSL_KEYTYPE_DH, + * OPENSSL_KEYTYPE_RSA or + * OPENSSL_KEYTYPE_EC. + * The default value is OPENSSL_KEYTYPE_RSA. + * + * + * + * encrypt_key + * boolean + * encrypt_key + * Should an exported key (with passphrase) be encrypted? + * + * + * encrypt_key_cipher + * integer + * none + * + * One of cipher constants. + * + * + * + * curve_name + * string + * none + * + * One of openssl_get_curve_names. + * + * + * + * config + * string + * N/A + * + * Path to your own alternative openssl.conf file. + * + * + * + * + * + * @param array $extraattribs extraattribs is used to specify additional + * configuration options for the CSR. Both dn and + * extraattribs are associative arrays whose keys are + * converted to OIDs and applied to the relevant part of the request. + * @return resource Returns the CSR. + * @throws OpensslException + * + */ +function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $extraattribs = null) +{ + error_clear_last(); + if ($extraattribs !== null) { + $result = \openssl_csr_new($dn, $privkey, $configargs, $extraattribs); + } elseif ($configargs !== null) { + $result = \openssl_csr_new($dn, $privkey, $configargs); + } else { + $result = \openssl_csr_new($dn, $privkey); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_csr_sign generates an x509 certificate + * resource from the given CSR. + * + * @param string|resource $csr A CSR previously generated by openssl_csr_new. + * It can also be the path to a PEM encoded CSR when specified as + * file://path/to/csr or an exported string generated + * by openssl_csr_export. + * @param mixed $cacert The generated certificate will be signed by cacert. + * If cacert is NULL, the generated certificate + * will be a self-signed certificate. + * @param string|resource|array $priv_key priv_key is the private key that corresponds to + * cacert. + * @param int $days days specifies the length of time for which the + * generated certificate will be valid, in days. + * @param array $configargs You can finetune the CSR signing by configargs. + * See openssl_csr_new for more information about + * configargs. + * @param int $serial An optional the serial number of issued certificate. If not specified + * it will default to 0. + * @return resource Returns an x509 certificate resource on success, FALSE on failure. + * @throws OpensslException + * + */ +function openssl_csr_sign($csr, $cacert, $priv_key, int $days, array $configargs = null, int $serial = 0) +{ + error_clear_last(); + if ($serial !== 0) { + $result = \openssl_csr_sign($csr, $cacert, $priv_key, $days, $configargs, $serial); + } elseif ($configargs !== null) { + $result = \openssl_csr_sign($csr, $cacert, $priv_key, $days, $configargs); + } else { + $result = \openssl_csr_sign($csr, $cacert, $priv_key, $days); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * Takes a raw or base64 encoded string and decrypts it using a given method and key. + * + * @param string $data The encrypted message to be decrypted. + * @param string $method The cipher method. For a list of available cipher methods, use + * openssl_get_cipher_methods. + * @param string $key The key. + * @param int $options options can be one of + * OPENSSL_RAW_DATA, + * OPENSSL_ZERO_PADDING. + * @param string $iv A non-NULL Initialization Vector. + * @param string $tag The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE. + * @param string $aad Additional authentication data. + * @return string The decrypted string on success. + * @throws OpensslException + * + */ +function openssl_decrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string +{ + error_clear_last(); + $result = \openssl_decrypt($data, $method, $key, $options, $iv, $tag, $aad); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * The shared secret returned by openssl_dh_compute_key is + * often used as an encryption key to secretly communicate with a remote party. + * This is known as the Diffie-Hellman key exchange. + * + * @param string $pub_key DH Public key of the remote party. + * @param resource $dh_key A local DH private key, corresponding to the public key to be shared with the remote party. + * @return string Returns shared secret on success. + * @throws OpensslException + * + */ +function openssl_dh_compute_key(string $pub_key, $dh_key): string +{ + error_clear_last(); + $result = \openssl_dh_compute_key($pub_key, $dh_key); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * Computes a digest hash value for the given data using a given method, + * and returns a raw or binhex encoded string. + * + * @param string $data The data. + * @param string $method The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. + * @param bool $raw_output Setting to TRUE will return as raw output data, otherwise the return + * value is binhex encoded. + * @return string Returns the digested hash value on success. + * @throws OpensslException + * + */ +function openssl_digest(string $data, string $method, bool $raw_output = false): string +{ + error_clear_last(); + $result = \openssl_digest($data, $method, $raw_output); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_open opens (decrypts) + * sealed_data using the private key associated with + * the key identifier priv_key_id and the envelope key + * env_key, and fills + * open_data with the decrypted data. + * The envelope key is generated when the + * data are sealed and can only be used by one specific private key. See + * openssl_seal for more information. + * + * @param string $sealed_data + * @param string|null $open_data If the call is successful the opened data is returned in this + * parameter. + * @param string $env_key + * @param string|array|resource $priv_key_id + * @param string $method The cipher method. + * @param string $iv The initialization vector. + * @throws OpensslException + * + */ +function openssl_open(string $sealed_data, ?string &$open_data, string $env_key, $priv_key_id, string $method = "RC4", string $iv = null): void +{ + error_clear_last(); + if ($iv !== null) { + $result = \openssl_open($sealed_data, $open_data, $env_key, $priv_key_id, $method, $iv); + } else { + $result = \openssl_open($sealed_data, $open_data, $env_key, $priv_key_id, $method); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), + * a key derivation function defined in PKCS5 v2. + * + * @param string $password Password from which the derived key is generated. + * @param string $salt PBKDF2 recommends a crytographic salt of at least 64 bits (8 bytes). + * @param int $key_length Length of desired output key. + * @param int $iterations The number of iterations desired. NIST + * recommends at least 10,000. + * @param string $digest_algorithm Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1. + * @return string Returns raw binary string. + * @throws OpensslException + * + */ +function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algorithm = "sha1"): string +{ + error_clear_last(); + $result = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algorithm); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_pkcs12_export_to_file stores + * x509 into a file named by + * filename in a PKCS#12 file format. + * + * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. + * @param string $filename Path to the output file. + * @param string|array|resource $priv_key Private key component of PKCS#12 file. + * See Public/Private Key parameters for a list of valid values. + * @param string $pass Encryption password for unlocking the PKCS#12 file. + * @param array $args Optional array, other keys will be ignored. + * + * + * + * + * Key + * Description + * + * + * + * + * "extracerts" + * array of extra certificates or a single certificate to be included in the PKCS#12 file. + * + * + * "friendlyname" + * string to be used for the supplied certificate and key + * + * + * + * + * @throws OpensslException + * + */ +function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, string $pass, array $args = null): void +{ + error_clear_last(); + if ($args !== null) { + $result = \openssl_pkcs12_export_to_file($x509, $filename, $priv_key, $pass, $args); + } else { + $result = \openssl_pkcs12_export_to_file($x509, $filename, $priv_key, $pass); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkcs12_export stores + * x509 into a string named by + * out in a PKCS#12 file format. + * + * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. + * @param string|null $out On success, this will hold the PKCS#12. + * @param string|array|resource $priv_key Private key component of PKCS#12 file. + * See Public/Private Key parameters for a list of valid values. + * @param string $pass Encryption password for unlocking the PKCS#12 file. + * @param array $args Optional array, other keys will be ignored. + * + * + * + * + * Key + * Description + * + * + * + * + * "extracerts" + * array of extra certificates or a single certificate to be included in the PKCS#12 file. + * + * + * "friendlyname" + * string to be used for the supplied certificate and key + * + * + * + * + * @throws OpensslException + * + */ +function openssl_pkcs12_export($x509, ?string &$out, $priv_key, string $pass, array $args = null): void +{ + error_clear_last(); + if ($args !== null) { + $result = \openssl_pkcs12_export($x509, $out, $priv_key, $pass, $args); + } else { + $result = \openssl_pkcs12_export($x509, $out, $priv_key, $pass); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by + * pkcs12 into a array named + * certs. + * + * @param string $pkcs12 The certificate store contents, not its file name. + * @param array|null $certs On success, this will hold the Certificate Store Data. + * @param string $pass Encryption password for unlocking the PKCS#12 file. + * @throws OpensslException + * + */ +function openssl_pkcs12_read(string $pkcs12, ?array &$certs, string $pass): void +{ + error_clear_last(); + $result = \openssl_pkcs12_read($pkcs12, $certs, $pass); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * Decrypts the S/MIME encrypted message contained in the file specified by + * infilename using the certificate and its + * associated private key specified by recipcert and + * recipkey. + * + * @param string $infilename + * @param string $outfilename The decrypted message is written to the file specified by + * outfilename. + * @param string|resource $recipcert + * @param string|resource|array $recipkey + * @throws OpensslException + * + */ +function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipcert, $recipkey = null): void +{ + error_clear_last(); + if ($recipkey !== null) { + $result = \openssl_pkcs7_decrypt($infilename, $outfilename, $recipcert, $recipkey); + } else { + $result = \openssl_pkcs7_decrypt($infilename, $outfilename, $recipcert); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkcs7_encrypt takes the contents of the + * file named infile and encrypts them using an RC2 + * 40-bit cipher so that they can only be read by the intended recipients + * specified by recipcerts. + * + * @param string $infile + * @param string $outfile + * @param string|resource|array $recipcerts Either a lone X.509 certificate, or an array of X.509 certificates. + * @param array $headers headers is an array of headers that + * will be prepended to the data after it has been encrypted. + * + * headers can be either an associative array + * keyed by header name, or an indexed array, where each element contains + * a single header line. + * @param int $flags flags can be used to specify options that affect + * the encoding process - see PKCS7 + * constants. + * @param int $cipherid One of cipher constants. + * @throws OpensslException + * + */ +function openssl_pkcs7_encrypt(string $infile, string $outfile, $recipcerts, array $headers, int $flags = 0, int $cipherid = OPENSSL_CIPHER_RC2_40): void +{ + error_clear_last(); + $result = \openssl_pkcs7_encrypt($infile, $outfile, $recipcerts, $headers, $flags, $cipherid); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $infilename + * @param array|null $certs + * @throws OpensslException + * + */ +function openssl_pkcs7_read(string $infilename, ?array &$certs): void +{ + error_clear_last(); + $result = \openssl_pkcs7_read($infilename, $certs); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkcs7_sign takes the contents of the file + * named infilename and signs them using the + * certificate and its matching private key specified by + * signcert and privkey + * parameters. + * + * @param string $infilename The input file you are intending to digitally sign. + * @param string $outfilename The file which the digital signature will be written to. + * @param string|resource $signcert The X.509 certificate used to digitally sign infilename. + * See Key/Certificate parameters for a list of valid values. + * @param string|resource|array $privkey privkey is the private key corresponding to signcert. + * See Public/Private Key parameters for a list of valid values. + * @param array $headers headers is an array of headers that + * will be prepended to the data after it has been signed (see + * openssl_pkcs7_encrypt for more information about + * the format of this parameter). + * @param int $flags flags can be used to alter the output - see PKCS7 constants. + * @param string $extracerts extracerts specifies the name of a file containing + * a bunch of extra certificates to include in the signature which can for + * example be used to help the recipient to verify the certificate that you used. + * @throws OpensslException + * + */ +function openssl_pkcs7_sign(string $infilename, string $outfilename, $signcert, $privkey, array $headers, int $flags = PKCS7_DETACHED, string $extracerts = null): void +{ + error_clear_last(); + if ($extracerts !== null) { + $result = \openssl_pkcs7_sign($infilename, $outfilename, $signcert, $privkey, $headers, $flags, $extracerts); + } else { + $result = \openssl_pkcs7_sign($infilename, $outfilename, $signcert, $privkey, $headers, $flags); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkey_export_to_file saves an ascii-armoured + * (PEM encoded) rendition of key into the file named + * by outfilename. + * + * @param resource|string|array $key + * @param string $outfilename Path to the output file. + * @param string $passphrase The key can be optionally protected by a + * passphrase. + * @param array $configargs configargs can be used to fine-tune the export + * process by specifying and/or overriding options for the openssl + * configuration file. See openssl_csr_new for more + * information about configargs. + * @throws OpensslException + * + */ +function openssl_pkey_export_to_file($key, string $outfilename, string $passphrase = null, array $configargs = null): void +{ + error_clear_last(); + if ($configargs !== null) { + $result = \openssl_pkey_export_to_file($key, $outfilename, $passphrase, $configargs); + } elseif ($passphrase !== null) { + $result = \openssl_pkey_export_to_file($key, $outfilename, $passphrase); + } else { + $result = \openssl_pkey_export_to_file($key, $outfilename); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkey_export exports + * key as a PEM encoded string and stores it into + * out (which is passed by reference). + * + * @param resource $key + * @param string|null $out + * @param string $passphrase The key is optionally protected by passphrase. + * @param array $configargs configargs can be used to fine-tune the export + * process by specifying and/or overriding options for the openssl + * configuration file. See openssl_csr_new for more + * information about configargs. + * @throws OpensslException + * + */ +function openssl_pkey_export($key, ?string &$out, string $passphrase = null, array $configargs = null): void +{ + error_clear_last(); + if ($configargs !== null) { + $result = \openssl_pkey_export($key, $out, $passphrase, $configargs); + } elseif ($passphrase !== null) { + $result = \openssl_pkey_export($key, $out, $passphrase); + } else { + $result = \openssl_pkey_export($key, $out); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_pkey_get_private parses + * key and prepares it for use by other functions. + * + * @param string $key key can be one of the following: + * + * a string having the format + * file://path/to/file.pem. The named file must + * contain a PEM encoded certificate/private key (it may contain both). + * + * + * A PEM formatted private key. + * + * @param string $passphrase The optional parameter passphrase must be used + * if the specified key is encrypted (protected by a passphrase). + * @return resource Returns a positive key resource identifier on success. + * @throws OpensslException + * + */ +function openssl_pkey_get_private(string $key, string $passphrase = "") +{ + error_clear_last(); + $result = \openssl_pkey_get_private($key, $passphrase); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_pkey_get_public extracts the public key from + * certificate and prepares it for use by other + * functions. + * + * @param resource|string $certificate certificate can be one of the following: + * + * an X.509 certificate resource + * a string having the format + * file://path/to/file.pem. The named file must + * contain a PEM encoded certificate/public key (it may contain both). + * + * + * A PEM formatted public key. + * + * @return resource Returns a positive key resource identifier on success. + * @throws OpensslException + * + */ +function openssl_pkey_get_public($certificate) +{ + error_clear_last(); + $result = \openssl_pkey_get_public($certificate); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_pkey_new generates a new private and public + * key pair. The public component of the key can be obtained using + * openssl_pkey_get_public. + * + * @param array $configargs You can finetune the key generation (such as specifying the number of + * bits) using configargs. See + * openssl_csr_new for more information about + * configargs. + * @return resource Returns a resource identifier for the pkey on success. + * @throws OpensslException + * + */ +function openssl_pkey_new(array $configargs = null) +{ + error_clear_last(); + if ($configargs !== null) { + $result = \openssl_pkey_new($configargs); + } else { + $result = \openssl_pkey_new(); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_private_decrypt decrypts + * data that was previously encrypted via + * openssl_public_encrypt and stores the result into + * decrypted. + * + * You can use this function e.g. to decrypt data which is supposed to only be available to you. + * + * @param string $data + * @param string|null $decrypted + * @param string|resource|array $key key must be the private key corresponding that + * was used to encrypt the data. + * @param int $padding padding can be one of + * OPENSSL_PKCS1_PADDING, + * OPENSSL_SSLV23_PADDING, + * OPENSSL_PKCS1_OAEP_PADDING, + * OPENSSL_NO_PADDING. + * @throws OpensslException + * + */ +function openssl_private_decrypt(string $data, ?string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void +{ + error_clear_last(); + $result = \openssl_private_decrypt($data, $decrypted, $key, $padding); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_private_encrypt encrypts data + * with private key and stores the result into + * crypted. Encrypted data can be decrypted via + * openssl_public_decrypt. + * + * This function can be used e.g. to sign data (or its hash) to prove that it + * is not written by someone else. + * + * @param string $data + * @param string|null $crypted + * @param string|resource|array $key + * @param int $padding padding can be one of + * OPENSSL_PKCS1_PADDING, + * OPENSSL_NO_PADDING. + * @throws OpensslException + * + */ +function openssl_private_encrypt(string $data, ?string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void +{ + error_clear_last(); + $result = \openssl_private_encrypt($data, $crypted, $key, $padding); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_public_decrypt decrypts + * data that was previous encrypted via + * openssl_private_encrypt and stores the result into + * decrypted. + * + * You can use this function e.g. to check if the message was written by the + * owner of the private key. + * + * @param string $data + * @param string|null $decrypted + * @param string|resource $key key must be the public key corresponding that + * was used to encrypt the data. + * @param int $padding padding can be one of + * OPENSSL_PKCS1_PADDING, + * OPENSSL_NO_PADDING. + * @throws OpensslException + * + */ +function openssl_public_decrypt(string $data, ?string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void +{ + error_clear_last(); + $result = \openssl_public_decrypt($data, $decrypted, $key, $padding); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_public_encrypt encrypts data + * with public key and stores the result into + * crypted. Encrypted data can be decrypted via + * openssl_private_decrypt. + * + * This function can be used e.g. to encrypt message which can be then read + * only by owner of the private key. It can be also used to store secure data + * in database. + * + * @param string $data + * @param string|null $crypted This will hold the result of the encryption. + * @param string|resource $key The public key. + * @param int $padding padding can be one of + * OPENSSL_PKCS1_PADDING, + * OPENSSL_SSLV23_PADDING, + * OPENSSL_PKCS1_OAEP_PADDING, + * OPENSSL_NO_PADDING. + * @throws OpensslException + * + */ +function openssl_public_encrypt(string $data, ?string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void +{ + error_clear_last(); + $result = \openssl_public_encrypt($data, $crypted, $key, $padding); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * Generates a string of pseudo-random bytes, with the number of bytes + * determined by the length parameter. + * + * It also indicates if a cryptographically strong algorithm was used to produce the + * pseudo-random bytes, and does this via the optional crypto_strong + * parameter. It's rare for this to be FALSE, but some systems may be broken or old. + * + * @param int $length The length of the desired string of bytes. Must be a positive integer. PHP will + * try to cast this parameter to a non-null integer to use it. + * @param bool|null $crypto_strong If passed into the function, this will hold a boolean value that determines + * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, + * passwords, etc. TRUE if it did, otherwise FALSE + * @return string Returns the generated string of bytes on success. + * @throws OpensslException + * + */ +function openssl_random_pseudo_bytes(int $length, ?bool &$crypto_strong = null): string +{ + error_clear_last(); + $result = \openssl_random_pseudo_bytes($length, $crypto_strong); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_seal seals (encrypts) + * data by using the given method with a randomly generated + * secret key. The key is encrypted with each of the public keys + * associated with the identifiers in pub_key_ids + * and each encrypted key is returned + * in env_keys. This means that one can send + * sealed data to multiple recipients (provided one has obtained their + * public keys). Each recipient must receive both the sealed data and + * the envelope key that was encrypted with the recipient's public key. + * + * @param string $data The data to seal. + * @param string|null $sealed_data The sealed data. + * @param array $env_keys Array of encrypted keys. + * @param array $pub_key_ids Array of public key resource identifiers. + * @param string $method The cipher method. + * @param string $iv The initialization vector. + * @return int Returns the length of the sealed data on success. + * If successful the sealed data is returned in + * sealed_data, and the envelope keys in + * env_keys. + * @throws OpensslException + * + */ +function openssl_seal(string $data, ?string &$sealed_data, array &$env_keys, array $pub_key_ids, string $method = "RC4", string &$iv = null): int +{ + error_clear_last(); + $result = \openssl_seal($data, $sealed_data, $env_keys, $pub_key_ids, $method, $iv); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_sign computes a signature for the + * specified data by generating a cryptographic + * digital signature using the private key associated with + * priv_key_id. Note that the data itself is + * not encrypted. + * + * @param string $data The string of data you wish to sign + * @param string|null $signature If the call was successful the signature is returned in + * signature. + * @param resource|string $priv_key_id resource - a key, returned by openssl_get_privatekey + * + * string - a PEM formatted key + * @param int|string $signature_alg int - one of these Signature Algorithms. + * + * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". + * @throws OpensslException + * + */ +function openssl_sign(string $data, ?string &$signature, $priv_key_id, $signature_alg = OPENSSL_ALGO_SHA1): void +{ + error_clear_last(); + $result = \openssl_sign($data, $signature, $priv_key_id, $signature_alg); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_x509_export_to_file stores + * x509 into a file named by + * outfilename in a PEM encoded format. + * + * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. + * @param string $outfilename Path to the output file. + * @param bool $notext + * The optional parameter notext affects + * the verbosity of the output; if it is FALSE, then additional human-readable + * information is included in the output. The default value of + * notext is TRUE. + * @throws OpensslException + * + */ +function openssl_x509_export_to_file($x509, string $outfilename, bool $notext = true): void +{ + error_clear_last(); + $result = \openssl_x509_export_to_file($x509, $outfilename, $notext); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_x509_export stores + * x509 into a string named by + * output in a PEM encoded format. + * + * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. + * @param string|null $output On success, this will hold the PEM. + * @param bool $notext + * The optional parameter notext affects + * the verbosity of the output; if it is FALSE, then additional human-readable + * information is included in the output. The default value of + * notext is TRUE. + * @throws OpensslException + * + */ +function openssl_x509_export($x509, ?string &$output, bool $notext = true): void +{ + error_clear_last(); + $result = \openssl_x509_export($x509, $output, $notext); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } +} + + +/** + * openssl_x509_fingerprint returns the digest of + * x509 as a string. + * + * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. + * @param string $hash_algorithm The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods. + * @param bool $raw_output When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. + * @return string Returns a string containing the calculated certificate fingerprint as lowercase hexits unless raw_output is set to TRUE in which case the raw binary representation of the message digest is returned. + * + * Returns FALSE on failure. + * @throws OpensslException + * + */ +function openssl_x509_fingerprint($x509, string $hash_algorithm = "sha1", bool $raw_output = false): string +{ + error_clear_last(); + $result = \openssl_x509_fingerprint($x509, $hash_algorithm, $raw_output); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + + +/** + * openssl_x509_read parses the certificate supplied by + * x509certdata and returns a resource identifier for + * it. + * + * @param string|resource $x509certdata X509 certificate. See Key/Certificate parameters for a list of valid values. + * @return resource Returns a resource identifier on success. + * @throws OpensslException + * + */ +function openssl_x509_read($x509certdata) +{ + error_clear_last(); + $result = \openssl_x509_read($x509certdata); + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/outcontrol.php b/vendor/thecodingmachine/safe/generated/outcontrol.php new file mode 100644 index 000000000..fce7c6dd8 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/outcontrol.php @@ -0,0 +1,100 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\OutcontrolException; + +/** + * This function discards the contents of the topmost output buffer and turns + * off this output buffering. If you want to further process the buffer's + * contents you have to call ob_get_contents before + * ob_end_clean as the buffer contents are discarded + * when ob_end_clean is called. + * + * The output buffer must be started by + * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE + * and PHP_OUTPUT_HANDLER_REMOVABLE + * flags. Otherwise ob_end_clean will not work. + * + * @throws OutcontrolException + * + */ +function ob_end_clean(): void +{ + error_clear_last(); + $result = \ob_end_clean(); + if ($result === false) { + throw OutcontrolException::createFromPhpError(); + } +} + + +/** + * This function will send the contents of the topmost output buffer (if + * any) and turn this output buffer off. If you want to further + * process the buffer's contents you have to call + * ob_get_contents before + * ob_end_flush as the buffer contents are + * discarded after ob_end_flush is called. + * + * The output buffer must be started by + * ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE + * and PHP_OUTPUT_HANDLER_REMOVABLE + * flags. Otherwise ob_end_flush will not work. + * + * @throws OutcontrolException + * + */ +function ob_end_flush(): void +{ + error_clear_last(); + $result = \ob_end_flush(); + if ($result === false) { + throw OutcontrolException::createFromPhpError(); + } +} + + +/** + * This function adds another name/value pair to the URL rewrite mechanism. + * The name and value will be added to URLs (as GET parameter) and forms + * (as hidden input fields) the same way as the session ID when transparent + * URL rewriting is enabled with session.use_trans_sid. + * + * This function's behaviour is controlled by the url_rewriter.tags and + * url_rewriter.hosts php.ini + * parameters. + * + * Note that this function can be successfully called at most once per request. + * + * @param string $name The variable name. + * @param string $value The variable value. + * @throws OutcontrolException + * + */ +function output_add_rewrite_var(string $name, string $value): void +{ + error_clear_last(); + $result = \output_add_rewrite_var($name, $value); + if ($result === false) { + throw OutcontrolException::createFromPhpError(); + } +} + + +/** + * This function resets the URL rewriter and removes all rewrite + * variables previously set by the output_add_rewrite_var + * function. + * + * @throws OutcontrolException + * + */ +function output_reset_rewrite_vars(): void +{ + error_clear_last(); + $result = \output_reset_rewrite_vars(); + if ($result === false) { + throw OutcontrolException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/password.php b/vendor/thecodingmachine/safe/generated/password.php new file mode 100644 index 000000000..3808e02b9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/password.php @@ -0,0 +1,126 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PasswordException; + +/** + * password_hash creates a new password hash using a strong one-way hashing + * algorithm. password_hash is compatible with crypt. + * Therefore, password hashes created by crypt can be used with + * password_hash. + * + * + * + * + * PASSWORD_DEFAULT - Use the bcrypt algorithm (default as of PHP 5.5.0). + * Note that this constant is designed to change over time as new and stronger algorithms are added + * to PHP. For that reason, the length of the result from using this identifier can change over + * time. Therefore, it is recommended to store the result in a database column that can expand + * beyond 60 characters (255 characters would be a good choice). + * + * + * + * + * PASSWORD_BCRYPT - Use the CRYPT_BLOWFISH algorithm to + * create the hash. This will produce a standard crypt compatible hash using + * the "$2y$" identifier. The result will always be a 60 character string. + * + * + * + * + * PASSWORD_ARGON2I - Use the Argon2i hashing algorithm to create the hash. + * This algorithm is only available if PHP has been compiled with Argon2 support. + * + * + * + * + * PASSWORD_ARGON2ID - Use the Argon2id hashing algorithm to create the hash. + * This algorithm is only available if PHP has been compiled with Argon2 support. + * + * + * + * + * + * + * + * salt (string) - to manually provide a salt to use when hashing the password. + * Note that this will override and prevent a salt from being automatically generated. + * + * + * If omitted, a random salt will be generated by password_hash for + * each password hashed. This is the intended mode of operation. + * + * + * + * The salt option has been deprecated as of PHP 7.0.0. It is now + * preferred to simply use the salt that is generated by default. + * + * + * + * + * + * cost (integer) - which denotes the algorithmic cost that should be used. + * Examples of these values can be found on the crypt page. + * + * + * If omitted, a default value of 10 will be used. This is a good + * baseline cost, but you may want to consider increasing it depending on your hardware. + * + * + * + * + * + * + * + * memory_cost (integer) - Maximum memory (in kibibytes) that may + * be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST. + * + * + * + * + * time_cost (integer) - Maximum amount of time it may + * take to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_TIME_COST. + * + * + * + * + * threads (integer) - Number of threads to use for computing + * the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS. + * + * + * + * + * @param string $password The user's password. + * + * Using the PASSWORD_BCRYPT as the + * algorithm, will result + * in the password parameter being truncated to a + * maximum length of 72 characters. + * @param int|string|null $algo A password algorithm constant denoting the algorithm to use when hashing the password. + * @param array $options An associative array containing options. See the password algorithm constants for documentation on the supported options for each algorithm. + * + * If omitted, a random salt will be created and the default cost will be + * used. + * @return string Returns the hashed password. + * + * The used algorithm, cost and salt are returned as part of the hash. Therefore, + * all information that's needed to verify the hash is included in it. This allows + * the password_verify function to verify the hash without + * needing separate storage for the salt or algorithm information. + * @throws PasswordException + * + */ +function password_hash(string $password, $algo, array $options = null): string +{ + error_clear_last(); + if ($options !== null) { + $result = \password_hash($password, $algo, $options); + } else { + $result = \password_hash($password, $algo); + } + if ($result === false) { + throw PasswordException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/pcntl.php b/vendor/thecodingmachine/safe/generated/pcntl.php new file mode 100644 index 000000000..1cb721e22 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/pcntl.php @@ -0,0 +1,166 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PcntlException; + +/** + * Executes the program with the given arguments. + * + * @param string $path path must be the path to a binary executable or a + * script with a valid path pointing to an executable in the shebang ( + * #!/usr/local/bin/perl for example) as the first line. See your system's + * man execve(2) page for additional information. + * @param array $args args is an array of argument strings passed to the + * program. + * @param array $envs envs is an array of strings which are passed as + * environment to the program. The array is in the format of name => value, + * the key being the name of the environmental variable and the value being + * the value of that variable. + * @throws PcntlException + * + */ +function pcntl_exec(string $path, array $args = null, array $envs = null): void +{ + error_clear_last(); + if ($envs !== null) { + $result = \pcntl_exec($path, $args, $envs); + } elseif ($args !== null) { + $result = \pcntl_exec($path, $args); + } else { + $result = \pcntl_exec($path); + } + if ($result === false) { + throw PcntlException::createFromPhpError(); + } +} + + +/** + * pcntl_getpriority gets the priority of + * pid. Because priority levels can differ between + * system types and kernel versions, please see your system's getpriority(2) + * man page for specific details. + * + * @param int $pid If not specified, the pid of the current process is used. + * @param int $process_identifier One of PRIO_PGRP, PRIO_USER + * or PRIO_PROCESS. + * @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable + * scheduling. + * @throws PcntlException + * + */ +function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCESS): int +{ + error_clear_last(); + if ($process_identifier !== PRIO_PROCESS) { + $result = \pcntl_getpriority($pid, $process_identifier); + } elseif ($pid !== null) { + $result = \pcntl_getpriority($pid); + } else { + $result = \pcntl_getpriority(); + } + if ($result === false) { + throw PcntlException::createFromPhpError(); + } + return $result; +} + + +/** + * pcntl_setpriority sets the priority of + * pid. + * + * @param int $priority priority is generally a value in the range + * -20 to 20. The default priority + * is 0 while a lower numerical value causes more + * favorable scheduling. Because priority levels can differ between + * system types and kernel versions, please see your system's setpriority(2) + * man page for specific details. + * @param int $pid If not specified, the pid of the current process is used. + * @param int $process_identifier One of PRIO_PGRP, PRIO_USER + * or PRIO_PROCESS. + * @throws PcntlException + * + */ +function pcntl_setpriority(int $priority, int $pid = null, int $process_identifier = PRIO_PROCESS): void +{ + error_clear_last(); + if ($process_identifier !== PRIO_PROCESS) { + $result = \pcntl_setpriority($priority, $pid, $process_identifier); + } elseif ($pid !== null) { + $result = \pcntl_setpriority($priority, $pid); + } else { + $result = \pcntl_setpriority($priority); + } + if ($result === false) { + throw PcntlException::createFromPhpError(); + } +} + + +/** + * The pcntl_signal_dispatch function calls the signal + * handlers installed by pcntl_signal for each pending + * signal. + * + * @throws PcntlException + * + */ +function pcntl_signal_dispatch(): void +{ + error_clear_last(); + $result = \pcntl_signal_dispatch(); + if ($result === false) { + throw PcntlException::createFromPhpError(); + } +} + + +/** + * The pcntl_sigprocmask function adds, removes or sets blocked + * signals, depending on the how parameter. + * + * @param int $how Sets the behavior of pcntl_sigprocmask. Possible + * values: + * + * SIG_BLOCK: Add the signals to the + * currently blocked signals. + * SIG_UNBLOCK: Remove the signals from the + * currently blocked signals. + * SIG_SETMASK: Replace the currently + * blocked signals by the given list of signals. + * + * @param array $set List of signals. + * @param array|null $oldset The oldset parameter is set to an array + * containing the list of the previously blocked signals. + * @throws PcntlException + * + */ +function pcntl_sigprocmask(int $how, array $set, ?array &$oldset = null): void +{ + error_clear_last(); + $result = \pcntl_sigprocmask($how, $set, $oldset); + if ($result === false) { + throw PcntlException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $errno + * @return string Returns error description on success. + * @throws PcntlException + * + */ +function pcntl_strerror(int $errno): string +{ + error_clear_last(); + $result = \pcntl_strerror($errno); + if ($result === false) { + throw PcntlException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/pcre.php b/vendor/thecodingmachine/safe/generated/pcre.php new file mode 100644 index 000000000..c40f14cc2 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/pcre.php @@ -0,0 +1,659 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PcreException; + +/** + * Searches subject for all matches to the regular + * expression given in pattern and puts them in + * matches in the order specified by + * flags. + * + * After the first match is found, the subsequent searches are continued + * on from end of the last match. + * + * @param string $pattern The pattern to search for, as a string. + * @param string $subject The input string. + * @param array $matches Array of all matches in multi-dimensional array ordered according to + * flags. + * @param int $flags Can be a combination of the following flags (note that it doesn't make + * sense to use PREG_PATTERN_ORDER together with + * PREG_SET_ORDER): + * + * + * PREG_PATTERN_ORDER + * + * + * Orders results so that $matches[0] is an array of full + * pattern matches, $matches[1] is an array of strings matched by + * the first parenthesized subpattern, and so on. + * + * + * + * + * + * ]]> + * + * The above example will output: + * + * example: , this is a test + * example: , this is a test + * ]]> + * + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * + * + * + * If the pattern contains named subpatterns, $matches + * additionally contains entries for keys with the subpattern name. + * + * + * If the pattern contains duplicate named subpatterns, only the rightmost + * subpattern is stored in $matches[NAME]. + * + * + * + * ]]> + * + * The above example will output: + * + * + * [1] => bar + * ) + * ]]> + * + * + * + * + * + * + * PREG_SET_ORDER + * + * + * Orders results so that $matches[0] is an array of first set + * of matches, $matches[1] is an array of second set of matches, + * and so on. + * + * + * + * ]]> + * + * The above example will output: + * + * example: , example: + * this is a test, this is a test + * ]]> + * + * + * + * + * + * + * PREG_OFFSET_CAPTURE + * + * + * If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array of arrays where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * ) + * + * [1] => Array + * ( + * [0] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * ) + * + * [2] => Array + * ( + * [0] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * ) + * + * [3] => Array + * ( + * [0] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * + * ) + * ]]> + * + * + * + * + * + * + * PREG_UNMATCHED_AS_NULL + * + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * + * + * + * + * Orders results so that $matches[0] is an array of full + * pattern matches, $matches[1] is an array of strings matched by + * the first parenthesized subpattern, and so on. + * + * + * + * + * ]]> + * + * The above example will output: + * + * example: , this is a test + * example: , this is a test + * ]]> + * + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * + * + * The above example will output: + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * If the pattern contains named subpatterns, $matches + * additionally contains entries for keys with the subpattern name. + * + * If the pattern contains duplicate named subpatterns, only the rightmost + * subpattern is stored in $matches[NAME]. + * + * + * + * ]]> + * + * The above example will output: + * + * + * [1] => bar + * ) + * ]]> + * + * + * + * The above example will output: + * + * Orders results so that $matches[0] is an array of first set + * of matches, $matches[1] is an array of second set of matches, + * and so on. + * + * + * + * ]]> + * + * The above example will output: + * + * example: , example: + * this is a test, this is a test + * ]]> + * + * + * + * The above example will output: + * + * If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array of arrays where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * ) + * + * [1] => Array + * ( + * [0] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * ) + * + * [2] => Array + * ( + * [0] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * ) + * + * [3] => Array + * ( + * [0] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * + * ) + * ]]> + * + * + * + * The above example will output: + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * If no order flag is given, PREG_PATTERN_ORDER is + * assumed. + * @param int $offset Orders results so that $matches[0] is an array of full + * pattern matches, $matches[1] is an array of strings matched by + * the first parenthesized subpattern, and so on. + * + * + * + * + * ]]> + * + * The above example will output: + * + * example: , this is a test + * example: , this is a test + * ]]> + * + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * + * + * The above example will output: + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * If the pattern contains named subpatterns, $matches + * additionally contains entries for keys with the subpattern name. + * + * If the pattern contains duplicate named subpatterns, only the rightmost + * subpattern is stored in $matches[NAME]. + * + * + * + * ]]> + * + * The above example will output: + * + * + * [1] => bar + * ) + * ]]> + * + * + * + * The above example will output: + * @return int Returns the number of full pattern matches (which might be zero). + * @throws PcreException + * + */ +function preg_match_all(string $pattern, string $subject, array &$matches = null, int $flags = PREG_PATTERN_ORDER, int $offset = 0): int +{ + error_clear_last(); + $result = \preg_match_all($pattern, $subject, $matches, $flags, $offset); + if ($result === false) { + throw PcreException::createFromPhpError(); + } + return $result; +} + + +/** + * Searches subject for a match to the regular + * expression given in pattern. + * + * @param string $pattern The pattern to search for, as a string. + * @param string $subject The input string. + * @param array $matches If matches is provided, then it is filled with + * the results of search. $matches[0] will contain the + * text that matched the full pattern, $matches[1] + * will have the text that matched the first captured parenthesized + * subpattern, and so on. + * @param int $flags flags can be a combination of the following flags: + * + * + * PREG_OFFSET_CAPTURE + * + * + * If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * [1] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * [2] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * [3] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * ]]> + * + * + * + * + * + * + * PREG_UNMATCHED_AS_NULL + * + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * + * + * ]]> + * + * The above example will output: + * + * + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * string(0) "" + * [3]=> + * string(1) "c" + * } + * array(4) { + * [0]=> + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * NULL + * [3]=> + * string(1) "c" + * } + * ]]> + * + * + * + * + * + * + * + * If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * [1] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * [2] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * [3] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * ]]> + * + * + * + * The above example will output: + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * + * + * ]]> + * + * The above example will output: + * + * + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * string(0) "" + * [3]=> + * string(1) "c" + * } + * array(4) { + * [0]=> + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * NULL + * [3]=> + * string(1) "c" + * } + * ]]> + * + * + * + * The above example will output: + * @param int $offset If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * [1] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * [2] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * [3] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * ]]> + * + * + * + * The above example will output: + * @return int preg_match returns 1 if the pattern + * matches given subject, 0 if it does not. + * @throws PcreException + * + */ +function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int +{ + error_clear_last(); + $result = \preg_match($pattern, $subject, $matches, $flags, $offset); + if ($result === false) { + throw PcreException::createFromPhpError(); + } + return $result; +} + + +/** + * Split the given string by a regular expression. + * + * @param string $pattern The pattern to search for, as a string. + * @param string $subject The input string. + * @param int|null $limit If specified, then only substrings up to limit + * are returned with the rest of the string being placed in the last + * substring. A limit of -1 or 0 means "no limit". + * @param int $flags flags can be any combination of the following + * flags (combined with the | bitwise operator): + * + * + * PREG_SPLIT_NO_EMPTY + * + * + * If this flag is set, only non-empty pieces will be returned by + * preg_split. + * + * + * + * + * PREG_SPLIT_DELIM_CAPTURE + * + * + * If this flag is set, parenthesized expression in the delimiter pattern + * will be captured and returned as well. + * + * + * + * + * PREG_SPLIT_OFFSET_CAPTURE + * + * + * If this flag is set, for every occurring match the appendant string + * offset will also be returned. Note that this changes the return + * value in an array where every element is an array consisting of the + * matched string at offset 0 and its string offset + * into subject at offset 1. + * + * + * + * + * + * If this flag is set, for every occurring match the appendant string + * offset will also be returned. Note that this changes the return + * value in an array where every element is an array consisting of the + * matched string at offset 0 and its string offset + * into subject at offset 1. + * @return array Returns an array containing substrings of subject + * split along boundaries matched by pattern. + * @throws PcreException + * + */ +function preg_split(string $pattern, string $subject, ?int $limit = -1, int $flags = 0): array +{ + error_clear_last(); + $result = \preg_split($pattern, $subject, $limit, $flags); + if ($result === false) { + throw PcreException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/pdf.php b/vendor/thecodingmachine/safe/generated/pdf.php new file mode 100644 index 000000000..d039b27a9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/pdf.php @@ -0,0 +1,1553 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PdfException; + +/** + * Activates a previously created structure element or other content item. + * Returns TRUE on success. + * + * @param resource $pdfdoc + * @param int $id + * @throws PdfException + * + */ +function PDF_activate_item($pdfdoc, int $id): void +{ + error_clear_last(); + $result = \PDF_activate_item($pdfdoc, $id); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Add a link annotation to a target within the current PDF file. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_create_action with type=GoTo + * and PDF_create_annotation with + * type=Link instead. + * + * @param resource $pdfdoc + * @param float $lowerleftx + * @param float $lowerlefty + * @param float $upperrightx + * @param float $upperrighty + * @param int $page + * @param string $dest + * @throws PdfException + * + */ +function PDF_add_locallink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, int $page, string $dest): void +{ + error_clear_last(); + $result = \PDF_add_locallink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Creates a named destination on an arbitrary page in the current document. + * Returns TRUE on success. + * + * @param resource $pdfdoc + * @param string $name + * @param string $optlist + * @throws PdfException + * + */ +function PDF_add_nameddest($pdfdoc, string $name, string $optlist): void +{ + error_clear_last(); + $result = \PDF_add_nameddest($pdfdoc, $name, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets an annotation for the current page. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_create_annotation with + * type=Text instead. + * + * @param resource $pdfdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open + * @throws PdfException + * + */ +function PDF_add_note($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void +{ + error_clear_last(); + $result = \PDF_add_note($pdfdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Add a file link annotation to a PDF target. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_create_action with + * type=GoToR and + * PDF_create_annotation with + * type=Link instead. + * + * @param resource $pdfdoc + * @param float $bottom_left_x + * @param float $bottom_left_y + * @param float $up_right_x + * @param float $up_right_y + * @param string $filename + * @param int $page + * @param string $dest + * @throws PdfException + * + */ +function PDF_add_pdflink($pdfdoc, float $bottom_left_x, float $bottom_left_y, float $up_right_x, float $up_right_y, string $filename, int $page, string $dest): void +{ + error_clear_last(); + $result = \PDF_add_pdflink($pdfdoc, $bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Adds an existing image as thumbnail for the current page. + * Returns TRUE on success. + * + * @param resource $pdfdoc + * @param int $image + * @throws PdfException + * + */ +function PDF_add_thumbnail($pdfdoc, int $image): void +{ + error_clear_last(); + $result = \PDF_add_thumbnail($pdfdoc, $image); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Adds a weblink annotation to a target url on the Web. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_create_action with type=URI + * and PDF_create_annotation with + * type=Link instead. + * + * @param resource $pdfdoc + * @param float $lowerleftx + * @param float $lowerlefty + * @param float $upperrightx + * @param float $upperrighty + * @param string $url + * @throws PdfException + * + */ +function PDF_add_weblink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, string $url): void +{ + error_clear_last(); + $result = \PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Adds a file attachment annotation. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_create_annotation with + * type=FileAttachment instead. + * + * @param resource $pdfdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param string $description + * @param string $author + * @param string $mimetype + * @param string $icon + * @throws PdfException + * + */ +function PDF_attach_file($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $filename, string $description, string $author, string $mimetype, string $icon): void +{ + error_clear_last(); + $result = \PDF_attach_file($pdfdoc, $llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Starts a layer for subsequent output on the page. Returns TRUE on success. + * + * This function requires PDF 1.5. + * + * @param resource $pdfdoc + * @param int $layer + * @throws PdfException + * + */ +function PDF_begin_layer($pdfdoc, int $layer): void +{ + error_clear_last(); + $result = \PDF_begin_layer($pdfdoc, $layer); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Adds a new page to the document, and specifies various options. + * The parameters width and height + * are the dimensions of the new page in points. Returns TRUE on success. + * + * + * Common Page Sizes in Points + * + * + * + * name + * size + * + * + * + * + * A0 + * 2380 x 3368 + * + * + * A1 + * 1684 x 2380 + * + * + * A2 + * 1190 x 1684 + * + * + * A3 + * 842 x 1190 + * + * + * A4 + * 595 x 842 + * + * + * A5 + * 421 x 595 + * + * + * A6 + * 297 x 421 + * + * + * B5 + * 501 x 709 + * + * + * letter (8.5" x 11") + * 612 x 792 + * + * + * legal (8.5" x 14") + * 612 x 1008 + * + * + * ledger (17" x 11") + * 1224 x 792 + * + * + * 11" x 17" + * 792 x 1224 + * + * + * + * + * + * @param resource $pdfdoc + * @param float $width + * @param float $height + * @param string $optlist + * @throws PdfException + * + */ +function PDF_begin_page_ext($pdfdoc, float $width, float $height, string $optlist): void +{ + error_clear_last(); + $result = \PDF_begin_page_ext($pdfdoc, $width, $height, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Adds a new page to the document. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_begin_page_ext instead. + * + * @param resource $pdfdoc + * @param float $width + * @param float $height + * @throws PdfException + * + */ +function PDF_begin_page($pdfdoc, float $width, float $height): void +{ + error_clear_last(); + $result = \PDF_begin_page($pdfdoc, $width, $height); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Adds a circle. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param float $x + * @param float $y + * @param float $r + * @throws PdfException + * + */ +function PDF_circle($pdfdoc, float $x, float $y, float $r): void +{ + error_clear_last(); + $result = \PDF_circle($pdfdoc, $x, $y, $r); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Uses the current path as clipping path, and terminate the path. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_clip($p): void +{ + error_clear_last(); + $result = \PDF_clip($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Closes the page handle, and frees all page-related resources. Returns TRUE on success. + * + * @param resource $p + * @param int $page + * @throws PdfException + * + */ +function PDF_close_pdi_page($p, int $page): void +{ + error_clear_last(); + $result = \PDF_close_pdi_page($p, $page); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Closes all open page handles, and closes the input PDF document. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 7, + * use PDF_close_pdi_document instead. + * + * @param resource $p + * @param int $doc + * @throws PdfException + * + */ +function PDF_close_pdi($p, int $doc): void +{ + error_clear_last(); + $result = \PDF_close_pdi($p, $doc); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Closes the generated PDF file, and frees all document-related resources. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_end_document instead. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_close($p): void +{ + error_clear_last(); + $result = \PDF_close($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Closes the path, fills, and strokes it. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_closepath_fill_stroke($p): void +{ + error_clear_last(); + $result = \PDF_closepath_fill_stroke($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Closes the path, and strokes it. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_closepath_stroke($p): void +{ + error_clear_last(); + $result = \PDF_closepath_stroke($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Closes the current path. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_closepath($p): void +{ + error_clear_last(); + $result = \PDF_closepath($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Concatenates a matrix to the current transformation matrix (CTM). Returns TRUE on success. + * + * @param resource $p + * @param float $a + * @param float $b + * @param float $c + * @param float $d + * @param float $e + * @param float $f + * @throws PdfException + * + */ +function PDF_concat($p, float $a, float $b, float $c, float $d, float $e, float $f): void +{ + error_clear_last(); + $result = \PDF_concat($p, $a, $b, $c, $d, $e, $f); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Prints text at the next line. Returns TRUE on success. + * + * @param resource $p + * @param string $text + * @throws PdfException + * + */ +function PDF_continue_text($p, string $text): void +{ + error_clear_last(); + $result = \PDF_continue_text($p, $text); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Draws a Bezier curve from the current point, using 3 more control points. + * Returns TRUE on success. + * + * @param resource $p + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 + * @throws PdfException + * + */ +function PDF_curveto($p, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void +{ + error_clear_last(); + $result = \PDF_curveto($p, $x1, $y1, $x2, $y2, $x3, $y3); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Deletes a PDFlib object, and frees all internal resources. Returns TRUE on success. + * + * @param resource $pdfdoc + * @throws PdfException + * + */ +function PDF_delete($pdfdoc): void +{ + error_clear_last(); + $result = \PDF_delete($pdfdoc); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Deactivates all active layers. Returns TRUE on success. + * + * This function requires PDF 1.5. + * + * @param resource $pdfdoc + * @throws PdfException + * + */ +function PDF_end_layer($pdfdoc): void +{ + error_clear_last(); + $result = \PDF_end_layer($pdfdoc); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Finishes a page, and applies various options. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param string $optlist + * @throws PdfException + * + */ +function PDF_end_page_ext($pdfdoc, string $optlist): void +{ + error_clear_last(); + $result = \PDF_end_page_ext($pdfdoc, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Finishes the page. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_end_page($p): void +{ + error_clear_last(); + $result = \PDF_end_page($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Finishes the pattern definition. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_end_pattern($p): void +{ + error_clear_last(); + $result = \PDF_end_pattern($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Finishes a template definition. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_end_template($p): void +{ + error_clear_last(); + $result = \PDF_end_template($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Fills and strokes the current path with the current fill and stroke color. + * Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_fill_stroke($p): void +{ + error_clear_last(); + $result = \PDF_fill_stroke($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Fills the interior of the current path with the current fill color. + * Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_fill($p): void +{ + error_clear_last(); + $result = \PDF_fill($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Places an image or template on the page, subject to various options. + * Returns TRUE on success. + * + * @param resource $pdfdoc + * @param int $image + * @param float $x + * @param float $y + * @param string $optlist + * @throws PdfException + * + */ +function PDF_fit_image($pdfdoc, int $image, float $x, float $y, string $optlist): void +{ + error_clear_last(); + $result = \PDF_fit_image($pdfdoc, $image, $x, $y, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Places an imported PDF page on the page, subject to various options. + * Returns TRUE on success. + * + * @param resource $pdfdoc + * @param int $page + * @param float $x + * @param float $y + * @param string $optlist + * @throws PdfException + * + */ +function PDF_fit_pdi_page($pdfdoc, int $page, float $x, float $y, string $optlist): void +{ + error_clear_last(); + $result = \PDF_fit_pdi_page($pdfdoc, $page, $x, $y, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Places a single line of text on the page, subject to various options. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param string $text + * @param float $x + * @param float $y + * @param string $optlist + * @throws PdfException + * + */ +function PDF_fit_textline($pdfdoc, string $text, float $x, float $y, string $optlist): void +{ + error_clear_last(); + $result = \PDF_fit_textline($pdfdoc, $text, $x, $y, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Reset all color and graphics state parameters to their defaults. + * Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_initgraphics($p): void +{ + error_clear_last(); + $result = \PDF_initgraphics($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Draws a line from the current point to another point. Returns TRUE on success. + * + * @param resource $p + * @param float $x + * @param float $y + * @throws PdfException + * + */ +function PDF_lineto($p, float $x, float $y): void +{ + error_clear_last(); + $result = \PDF_lineto($p, $x, $y); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Finds a built-in spot color name, or makes a named spot color from the + * current fill color. Returns TRUE on success. + * + * @param resource $p + * @param string $spotname + * @return int + * @throws PdfException + * + */ +function PDF_makespotcolor($p, string $spotname): int +{ + error_clear_last(); + $result = \PDF_makespotcolor($p, $spotname); + if ($result === false) { + throw PdfException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the current point for graphics output. Returns TRUE on success. + * + * @param resource $p + * @param float $x + * @param float $y + * @throws PdfException + * + */ +function PDF_moveto($p, float $x, float $y): void +{ + error_clear_last(); + $result = \PDF_moveto($p, $x, $y); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Creates a new PDF file using the supplied file name. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * PDF_begin_document instead. + * + * @param resource $p + * @param string $filename + * @throws PdfException + * + */ +function PDF_open_file($p, string $filename): void +{ + error_clear_last(); + $result = \PDF_open_file($p, $filename); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Places an image and scales it. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 5, use + * PDF_fit_image instead. + * + * @param resource $pdfdoc + * @param int $image + * @param float $x + * @param float $y + * @param float $scale + * @throws PdfException + * + */ +function PDF_place_image($pdfdoc, int $image, float $x, float $y, float $scale): void +{ + error_clear_last(); + $result = \PDF_place_image($pdfdoc, $image, $x, $y, $scale); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Places a PDF page and scales it. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 5, use + * PDF_fit_pdi_page instead. + * + * @param resource $pdfdoc + * @param int $page + * @param float $x + * @param float $y + * @param float $sx + * @param float $sy + * @throws PdfException + * + */ +function PDF_place_pdi_page($pdfdoc, int $page, float $x, float $y, float $sx, float $sy): void +{ + error_clear_last(); + $result = \PDF_place_pdi_page($pdfdoc, $page, $x, $y, $sx, $sy); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Draws a rectangle. Returns TRUE on success. + * + * @param resource $p + * @param float $x + * @param float $y + * @param float $width + * @param float $height + * @throws PdfException + * + */ +function PDF_rect($p, float $x, float $y, float $width, float $height): void +{ + error_clear_last(); + $result = \PDF_rect($p, $x, $y, $width, $height); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Restores the most recently saved graphics state. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_restore($p): void +{ + error_clear_last(); + $result = \PDF_restore($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Rotates the coordinate system. Returns TRUE on success. + * + * @param resource $p + * @param float $phi + * @throws PdfException + * + */ +function PDF_rotate($p, float $phi): void +{ + error_clear_last(); + $result = \PDF_rotate($p, $phi); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Saves the current graphics state. Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_save($p): void +{ + error_clear_last(); + $result = \PDF_save($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Scales the coordinate system. Returns TRUE on success. + * + * @param resource $p + * @param float $sx + * @param float $sy + * @throws PdfException + * + */ +function PDF_scale($p, float $sx, float $sy): void +{ + error_clear_last(); + $result = \PDF_scale($p, $sx, $sy); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the border color for all kinds of annotations. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * the option annotcolor in + * PDF_create_annotation instead. + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue + * @throws PdfException + * + */ +function PDF_set_border_color($p, float $red, float $green, float $blue): void +{ + error_clear_last(); + $result = \PDF_set_border_color($p, $red, $green, $blue); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the border dash style for all kinds of annotations. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * the option dasharray in + * PDF_create_annotation instead. + * + * @param resource $pdfdoc + * @param float $black + * @param float $white + * @throws PdfException + * + */ +function PDF_set_border_dash($pdfdoc, float $black, float $white): void +{ + error_clear_last(); + $result = \PDF_set_border_dash($pdfdoc, $black, $white); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the border style for all kinds of annotations. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 6, use + * the options borderstyle and + * linewidth in + * PDF_create_annotation instead. + * + * @param resource $pdfdoc + * @param string $style + * @param float $width + * @throws PdfException + * + */ +function PDF_set_border_style($pdfdoc, string $style, float $width): void +{ + error_clear_last(); + $result = \PDF_set_border_style($pdfdoc, $style, $width); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Fill document information field key with + * value. Returns TRUE on success. + * + * @param resource $p + * @param string $key + * @param string $value + * @throws PdfException + * + */ +function PDF_set_info($p, string $key, string $value): void +{ + error_clear_last(); + $result = \PDF_set_info($p, $key, $value); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Defines hierarchical and group relationships among layers. Returns TRUE on success. + * + * This function requires PDF 1.5. + * + * @param resource $pdfdoc + * @param string $type + * @param string $optlist + * @throws PdfException + * + */ +function PDF_set_layer_dependency($pdfdoc, string $type, string $optlist): void +{ + error_clear_last(); + $result = \PDF_set_layer_dependency($pdfdoc, $type, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets some PDFlib parameter with string type. Returns TRUE on success. + * + * @param resource $p + * @param string $key + * @param string $value + * @throws PdfException + * + */ +function PDF_set_parameter($p, string $key, string $value): void +{ + error_clear_last(); + $result = \PDF_set_parameter($p, $key, $value); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the position for text output on the page. Returns TRUE on success. + * + * @param resource $p + * @param float $x + * @param float $y + * @throws PdfException + * + */ +function PDF_set_text_pos($p, float $x, float $y): void +{ + error_clear_last(); + $result = \PDF_set_text_pos($p, $x, $y); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the value of some PDFlib parameter with numerical type. Returns TRUE on success. + * + * @param resource $p + * @param string $key + * @param float $value + * @throws PdfException + * + */ +function PDF_set_value($p, string $key, float $value): void +{ + error_clear_last(); + $result = \PDF_set_value($p, $key, $value); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current color space and color. Returns TRUE on success. + * + * @param resource $p + * @param string $fstype + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 + * @throws PdfException + * + */ +function PDF_setcolor($p, string $fstype, string $colorspace, float $c1, float $c2, float $c3, float $c4): void +{ + error_clear_last(); + $result = \PDF_setcolor($p, $fstype, $colorspace, $c1, $c2, $c3, $c4); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current dash pattern to b black + * and w white units. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param float $b + * @param float $w + * @throws PdfException + * + */ +function PDF_setdash($pdfdoc, float $b, float $w): void +{ + error_clear_last(); + $result = \PDF_setdash($pdfdoc, $b, $w); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets a dash pattern defined by an option list. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param string $optlist + * @throws PdfException + * + */ +function PDF_setdashpattern($pdfdoc, string $optlist): void +{ + error_clear_last(); + $result = \PDF_setdashpattern($pdfdoc, $optlist); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the flatness parameter. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param float $flatness + * @throws PdfException + * + */ +function PDF_setflat($pdfdoc, float $flatness): void +{ + error_clear_last(); + $result = \PDF_setflat($pdfdoc, $flatness); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current font in the specified fontsize, using a + * font handle returned by PDF_load_font. + * Returns TRUE on success. + * + * @param resource $pdfdoc + * @param int $font + * @param float $fontsize + * @throws PdfException + * + */ +function PDF_setfont($pdfdoc, int $font, float $fontsize): void +{ + error_clear_last(); + $result = \PDF_setfont($pdfdoc, $font, $fontsize); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current fill color to a gray value between 0 and 1 inclusive. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 4, use + * PDF_setcolor instead. + * + * @param resource $p + * @param float $g + * @throws PdfException + * + */ +function PDF_setgray_fill($p, float $g): void +{ + error_clear_last(); + $result = \PDF_setgray_fill($p, $g); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current stroke color to a gray value between 0 and 1 inclusive. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 4, use + * PDF_setcolor instead. + * + * @param resource $p + * @param float $g + * @throws PdfException + * + */ +function PDF_setgray_stroke($p, float $g): void +{ + error_clear_last(); + $result = \PDF_setgray_stroke($p, $g); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current fill and stroke color to a gray value between 0 and 1 inclusive. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 4, use + * PDF_setcolor instead. + * + * @param resource $p + * @param float $g + * @throws PdfException + * + */ +function PDF_setgray($p, float $g): void +{ + error_clear_last(); + $result = \PDF_setgray($p, $g); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the linejoin parameter to specify the shape + * at the corners of paths that are stroked. Returns TRUE on success. + * + * @param resource $p + * @param int $value + * @throws PdfException + * + */ +function PDF_setlinejoin($p, int $value): void +{ + error_clear_last(); + $result = \PDF_setlinejoin($p, $value); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current line width. Returns TRUE on success. + * + * @param resource $p + * @param float $width + * @throws PdfException + * + */ +function PDF_setlinewidth($p, float $width): void +{ + error_clear_last(); + $result = \PDF_setlinewidth($p, $width); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Explicitly sets the current transformation matrix. Returns TRUE on success. + * + * @param resource $p + * @param float $a + * @param float $b + * @param float $c + * @param float $d + * @param float $e + * @param float $f + * @throws PdfException + * + */ +function PDF_setmatrix($p, float $a, float $b, float $c, float $d, float $e, float $f): void +{ + error_clear_last(); + $result = \PDF_setmatrix($p, $a, $b, $c, $d, $e, $f); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the miter limit.Returns TRUE on success. + * + * @param resource $pdfdoc + * @param float $miter + * @throws PdfException + * + */ +function PDF_setmiterlimit($pdfdoc, float $miter): void +{ + error_clear_last(); + $result = \PDF_setmiterlimit($pdfdoc, $miter); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current fill color to the supplied RGB values. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 4, use + * PDF_setcolor instead. + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue + * @throws PdfException + * + */ +function PDF_setrgbcolor_fill($p, float $red, float $green, float $blue): void +{ + error_clear_last(); + $result = \PDF_setrgbcolor_fill($p, $red, $green, $blue); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current stroke color to the supplied RGB values. Returns TRUE on success. + * + * This function is deprecated since PDFlib version 4, use + * PDF_setcolor instead. + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue + * @throws PdfException + * + */ +function PDF_setrgbcolor_stroke($p, float $red, float $green, float $blue): void +{ + error_clear_last(); + $result = \PDF_setrgbcolor_stroke($p, $red, $green, $blue); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Sets the current fill and stroke color to the supplied RGB values. + * Returns TRUE on success. + * + * This function is deprecated since PDFlib version 4, use + * PDF_setcolor instead. + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue + * @throws PdfException + * + */ +function PDF_setrgbcolor($p, float $red, float $green, float $blue): void +{ + error_clear_last(); + $result = \PDF_setrgbcolor($p, $red, $green, $blue); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Prints text in the current font. Returns TRUE on success. + * + * @param resource $p + * @param string $text + * @param float $x + * @param float $y + * @throws PdfException + * + */ +function PDF_show_xy($p, string $text, float $x, float $y): void +{ + error_clear_last(); + $result = \PDF_show_xy($p, $text, $x, $y); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Prints text in the current font and size at + * the current position. Returns TRUE on success. + * + * @param resource $pdfdoc + * @param string $text + * @throws PdfException + * + */ +function PDF_show($pdfdoc, string $text): void +{ + error_clear_last(); + $result = \PDF_show($pdfdoc, $text); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Skews the coordinate system in x and y direction by alpha + * and beta degrees, respectively. Returns TRUE on success. + * + * @param resource $p + * @param float $alpha + * @param float $beta + * @throws PdfException + * + */ +function PDF_skew($p, float $alpha, float $beta): void +{ + error_clear_last(); + $result = \PDF_skew($p, $alpha, $beta); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} + + +/** + * Strokes the path with the current color and line width, and clear it. + * Returns TRUE on success. + * + * @param resource $p + * @throws PdfException + * + */ +function PDF_stroke($p): void +{ + error_clear_last(); + $result = \PDF_stroke($p); + if ($result === false) { + throw PdfException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/pgsql.php b/vendor/thecodingmachine/safe/generated/pgsql.php new file mode 100644 index 000000000..007faacbb --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/pgsql.php @@ -0,0 +1,1878 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PgsqlException; + +/** + * pg_cancel_query cancels an asynchronous query sent with + * pg_send_query, pg_send_query_params + * or pg_send_execute. You cannot cancel a query executed using + * pg_query. + * + * @param resource $connection PostgreSQL database connection resource. + * @throws PgsqlException + * + */ +function pg_cancel_query($connection): void +{ + error_clear_last(); + $result = \pg_cancel_query($connection); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * PostgreSQL supports automatic character set conversion between + * server and client for certain character sets. + * pg_client_encoding returns the client + * encoding as a string. The returned string will be one of the + * standard PostgreSQL encoding identifiers. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return string The client encoding. + * @throws PgsqlException + * + */ +function pg_client_encoding($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_client_encoding($connection); + } else { + $result = \pg_client_encoding(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_close closes the non-persistent + * connection to a PostgreSQL database associated with the given + * connection resource. + * + * If there is open large object resource on the connection, do not + * close the connection before closing all large object resources. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @throws PgsqlException + * + */ +function pg_close($connection = null): void +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_close($connection); + } else { + $result = \pg_close(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_connect opens a connection to a + * PostgreSQL database specified by the + * connection_string. + * + * If a second call is made to pg_connect with + * the same connection_string as an existing connection, the + * existing connection will be returned unless you pass + * PGSQL_CONNECT_FORCE_NEW as + * connect_type. + * + * The old syntax with multiple parameters + * $conn = pg_connect("host", "port", "options", "tty", "dbname") + * has been deprecated. + * + * @param string $connection_string The connection_string can be empty to use all default parameters, or it + * can contain one or more parameter settings separated by whitespace. + * Each parameter setting is in the form keyword = value. Spaces around + * the equal sign are optional. To write an empty value or a value + * containing spaces, surround it with single quotes, e.g., keyword = + * 'a value'. Single quotes and backslashes within the value must be + * escaped with a backslash, i.e., \' and \\. + * + * The currently recognized parameter keywords are: + * host, hostaddr, port, + * dbname (defaults to value of user), + * user, + * password, connect_timeout, + * options, tty (ignored), sslmode, + * requiressl (deprecated in favor of sslmode), and + * service. Which of these arguments exist depends + * on your PostgreSQL version. + * + * The options parameter can be used to set command line parameters + * to be invoked by the server. + * @param int $connect_type If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection + * is created, even if the connection_string is identical to + * an existing connection. + * + * If PGSQL_CONNECT_ASYNC is given, then the + * connection is established asynchronously. The state of the connection + * can then be checked via pg_connect_poll or + * pg_connection_status. + * @return resource PostgreSQL connection resource on success, FALSE on failure. + * @throws PgsqlException + * + */ +function pg_connect(string $connection_string, int $connect_type = null) +{ + error_clear_last(); + if ($connect_type !== null) { + $result = \pg_connect($connection_string, $connect_type); + } else { + $result = \pg_connect($connection_string); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_connection_reset resets the connection. + * It is useful for error recovery. + * + * @param resource $connection PostgreSQL database connection resource. + * @throws PgsqlException + * + */ +function pg_connection_reset($connection): void +{ + error_clear_last(); + $result = \pg_connection_reset($connection); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_convert checks and converts the values in + * assoc_array into suitable values for use in an SQL + * statement. Precondition for pg_convert is the + * existence of a table table_name which has at least + * as many columns as assoc_array has elements. The + * fieldnames in table_name must match the indices in + * assoc_array and the corresponding datatypes must be + * compatible. Returns an array with the converted values on success, FALSE + * otherwise. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table against which to convert types. + * @param array $assoc_array Data to be converted. + * @param int $options Any number of PGSQL_CONV_IGNORE_DEFAULT, + * PGSQL_CONV_FORCE_NULL or + * PGSQL_CONV_IGNORE_NOT_NULL, combined. + * @return array An array of converted values. + * @throws PgsqlException + * + */ +function pg_convert($connection, string $table_name, array $assoc_array, int $options = 0): array +{ + error_clear_last(); + $result = \pg_convert($connection, $table_name, $assoc_array, $options); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_copy_from inserts records into a table from + * rows. It issues a COPY FROM SQL command + * internally to insert records. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table into which to copy the rows. + * @param array $rows An array of data to be copied into table_name. + * Each value in rows becomes a row in table_name. + * Each value in rows should be a delimited string of the values + * to insert into each field. Values should be linefeed terminated. + * @param string $delimiter The token that separates values for each field in each element of + * rows. Default is TAB. + * @param string $null_as How SQL NULL values are represented in the + * rows. Default is \N ("\\N"). + * @throws PgsqlException + * + */ +function pg_copy_from($connection, string $table_name, array $rows, string $delimiter = null, string $null_as = null): void +{ + error_clear_last(); + if ($null_as !== null) { + $result = \pg_copy_from($connection, $table_name, $rows, $delimiter, $null_as); + } elseif ($delimiter !== null) { + $result = \pg_copy_from($connection, $table_name, $rows, $delimiter); + } else { + $result = \pg_copy_from($connection, $table_name, $rows); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_copy_to copies a table to an array. It + * issues COPY TO SQL command internally to + * retrieve records. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table from which to copy the data into rows. + * @param string $delimiter The token that separates values for each field in each element of + * rows. Default is TAB. + * @param string $null_as How SQL NULL values are represented in the + * rows. Default is \N ("\\N"). + * @return array An array with one element for each line of COPY data. + * It returns FALSE on failure. + * @throws PgsqlException + * + */ +function pg_copy_to($connection, string $table_name, string $delimiter = null, string $null_as = null): array +{ + error_clear_last(); + if ($null_as !== null) { + $result = \pg_copy_to($connection, $table_name, $delimiter, $null_as); + } elseif ($delimiter !== null) { + $result = \pg_copy_to($connection, $table_name, $delimiter); + } else { + $result = \pg_copy_to($connection, $table_name); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_dbname returns the name of the database + * that the given PostgreSQL connection + * resource. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return string A string containing the name of the database the + * connection is to. + * @throws PgsqlException + * + */ +function pg_dbname($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_dbname($connection); + } else { + $result = \pg_dbname(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_delete deletes records from a table + * specified by the keys and values + * in assoc_array. If options + * is specified, pg_convert is applied + * to assoc_array with the specified options. + * + * If options is specified, + * pg_convert is applied to + * assoc_array with the specified flags. + * + * By default pg_delete passes raw values. Values + * must be escaped or PGSQL_DML_ESCAPE option must be + * specified. PGSQL_DML_ESCAPE quotes and escapes + * parameters/identifiers. Therefore, table/column names became case + * sensitive. + * + * Note that neither escape nor prepared query can protect LIKE query, + * JSON, Array, Regex, etc. These parameters should be handled + * according to their contexts. i.e. Escape/validate values. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table from which to delete rows. + * @param array $assoc_array An array whose keys are field names in the table table_name, + * and whose values are the values of those fields that are to be deleted. + * @param int $options Any number of PGSQL_CONV_FORCE_NULL, + * PGSQL_DML_NO_CONV, + * PGSQL_DML_ESCAPE, + * PGSQL_DML_EXEC, + * PGSQL_DML_ASYNC or + * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the + * options then query string is returned. When PGSQL_DML_NO_CONV + * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed + * via options. + * @throws PgsqlException + * + */ +function pg_delete($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC) +{ + error_clear_last(); + $result = \pg_delete($connection, $table_name, $assoc_array, $options); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_end_copy syncs the PostgreSQL frontend + * (usually a web server process) with the PostgreSQL server after + * doing a copy operation performed by + * pg_put_line. pg_end_copy + * must be issued, otherwise the PostgreSQL server may get out of + * sync with the frontend and will report an error. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @throws PgsqlException + * + */ +function pg_end_copy($connection = null): void +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_end_copy($connection); + } else { + $result = \pg_end_copy(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * Sends a request to execute a prepared statement with given parameters, and + * waits for the result. + * + * pg_execute is like pg_query_params, + * but the command to be executed is + * specified by naming a previously-prepared statement, instead of giving a + * query string. This feature allows commands that will be used repeatedly to + * be parsed and planned just once, rather than each time they are executed. + * The statement must have been prepared previously in the current session. + * pg_execute is supported only against PostgreSQL 7.4 or + * higher connections; it will fail when using earlier versions. + * + * The parameters are identical to pg_query_params, except that the name of a + * prepared statement is given instead of a query string. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $stmtname The name of the prepared statement to execute. if + * "" is specified, then the unnamed statement is executed. The name must have + * been previously prepared using pg_prepare, + * pg_send_prepare or a PREPARE SQL + * command. + * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders + * in the original prepared query string. The number of elements in the array + * must match the number of placeholders. + * + * Elements are converted to strings by calling this function. + * @return resource A query result resource on success. + * @throws PgsqlException + * + */ +function pg_execute($connection = null, string $stmtname = null, array $params = null) +{ + error_clear_last(); + if ($params !== null) { + $result = \pg_execute($connection, $stmtname, $params); + } elseif ($stmtname !== null) { + $result = \pg_execute($connection, $stmtname); + } elseif ($connection !== null) { + $result = \pg_execute($connection); + } else { + $result = \pg_execute(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_field_name returns the name of the field + * occupying the given field_number in the + * given PostgreSQL result resource. Field + * numbering starts from 0. + * + * @param resource $result PostgreSQL query result resource, returned by pg_query, + * pg_query_params or pg_execute + * (among others). + * @param int $field_number Field number, starting from 0. + * @return string The field name. + * @throws PgsqlException + * + */ +function pg_field_name($result, int $field_number): string +{ + error_clear_last(); + $result = \pg_field_name($result, $field_number); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_field_table returns the name of the table that field + * belongs to, or the table's oid if oid_only is TRUE. + * + * @param resource $result PostgreSQL query result resource, returned by pg_query, + * pg_query_params or pg_execute + * (among others). + * @param int $field_number Field number, starting from 0. + * @param bool $oid_only By default the tables name that field belongs to is returned but + * if oid_only is set to TRUE, then the + * oid will instead be returned. + * @return mixed On success either the fields table name or oid. Or, FALSE on failure. + * @throws PgsqlException + * + */ +function pg_field_table($result, int $field_number, bool $oid_only = false) +{ + error_clear_last(); + $result = \pg_field_table($result, $field_number, $oid_only); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_field_type returns a string containing the + * base type name of the given field_number in the + * given PostgreSQL result resource. + * + * @param resource $result PostgreSQL query result resource, returned by pg_query, + * pg_query_params or pg_execute + * (among others). + * @param int $field_number Field number, starting from 0. + * @return string A string containing the base name of the field's type. + * @throws PgsqlException + * + */ +function pg_field_type($result, int $field_number): string +{ + error_clear_last(); + $result = \pg_field_type($result, $field_number); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_flush flushes any outbound query data waiting to be + * sent on the connection. + * + * @param resource $connection PostgreSQL database connection resource. + * @return mixed Returns TRUE if the flush was successful or no data was waiting to be + * flushed, 0 if part of the pending data was flushed but + * more remains. + * @throws PgsqlException + * + */ +function pg_flush($connection) +{ + error_clear_last(); + $result = \pg_flush($connection); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_free_result frees the memory and data associated with the + * specified PostgreSQL query result resource. + * + * This function need only be called if memory + * consumption during script execution is a problem. Otherwise, all result memory will + * be automatically freed when the script ends. + * + * @param resource $result PostgreSQL query result resource, returned by pg_query, + * pg_query_params or pg_execute + * (among others). + * @throws PgsqlException + * + */ +function pg_free_result($result): void +{ + error_clear_last(); + $result = \pg_free_result($result); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_host returns the host name of the given + * PostgreSQL connection resource is + * connected to. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return string A string containing the name of the host the + * connection is to. + * @throws PgsqlException + * + */ +function pg_host($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_host($connection); + } else { + $result = \pg_host(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_insert inserts the values + * of assoc_array into the table specified + * by table_name. If options + * is specified, pg_convert is applied + * to assoc_array with the specified options. + * + * If options is specified, + * pg_convert is applied to + * assoc_array with the specified flags. + * + * By default pg_insert passes raw values. Values + * must be escaped or PGSQL_DML_ESCAPE option must be + * specified. PGSQL_DML_ESCAPE quotes and escapes + * parameters/identifiers. Therefore, table/column names became case + * sensitive. + * + * Note that neither escape nor prepared query can protect LIKE query, + * JSON, Array, Regex, etc. These parameters should be handled + * according to their contexts. i.e. Escape/validate values. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table into which to insert rows. The table table_name must at least + * have as many columns as assoc_array has elements. + * @param array $assoc_array An array whose keys are field names in the table table_name, + * and whose values are the values of those fields that are to be inserted. + * @param int $options Any number of PGSQL_CONV_OPTS, + * PGSQL_DML_NO_CONV, + * PGSQL_DML_ESCAPE, + * PGSQL_DML_EXEC, + * PGSQL_DML_ASYNC or + * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the + * options then query string is returned. When PGSQL_DML_NO_CONV + * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @return mixed Returns the connection resource on success. Returns string if PGSQL_DML_STRING is passed + * via options. + * @throws PgsqlException + * + */ +function pg_insert($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC) +{ + error_clear_last(); + $result = \pg_insert($connection, $table_name, $assoc_array, $options); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_last_error returns the last error message + * for a given connection. + * + * Error messages may be overwritten by internal PostgreSQL (libpq) + * function calls. It may not return an appropriate error message if + * multiple errors occur inside a PostgreSQL module function. + * + * Use pg_result_error, pg_result_error_field, + * pg_result_status and + * pg_connection_status for better error handling. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return string A string containing the last error message on the + * given connection. + * @throws PgsqlException + * + */ +function pg_last_error($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_last_error($connection); + } else { + $result = \pg_last_error(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_last_notice returns the last notice + * message from the PostgreSQL server on the specified + * connection. The PostgreSQL server sends notice + * messages in several cases, for instance when creating a SERIAL + * column in a table. + * + * With pg_last_notice, you can avoid issuing useless + * queries by checking whether or not the notice is related to your transaction. + * + * Notice message tracking can be set to optional by setting 1 for + * pgsql.ignore_notice in php.ini. + * + * Notice message logging can be set to optional by setting 0 for + * pgsql.log_notice in php.ini. + * Unless pgsql.ignore_notice is set + * to 0, notice message cannot be logged. + * + * @param resource $connection PostgreSQL database connection resource. + * @param int $option One of PGSQL_NOTICE_LAST (to return last notice), + * PGSQL_NOTICE_ALL (to return all notices), + * or PGSQL_NOTICE_CLEAR (to clear notices). + * @return string A string containing the last notice on the + * given connection with + * PGSQL_NOTICE_LAST, + * an array with PGSQL_NOTICE_ALL, + * a boolean with PGSQL_NOTICE_CLEAR. + * @throws PgsqlException + * + */ +function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST): string +{ + error_clear_last(); + $result = \pg_last_notice($connection, $option); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_last_oid is used to retrieve the + * OID assigned to an inserted row. + * + * OID field became an optional field from PostgreSQL 7.2 and will + * not be present by default in PostgreSQL 8.1. When the + * OID field is not present in a table, the programmer must use + * pg_result_status to check for successful + * insertion. + * + * To get the value of a SERIAL field in an inserted + * row, it is necessary to use the PostgreSQL CURRVAL + * function, naming the sequence whose last value is required. If the + * name of the sequence is unknown, the pg_get_serial_sequence + * PostgreSQL 8.0 function is necessary. + * + * PostgreSQL 8.1 has a function LASTVAL that returns + * the value of the most recently used sequence in the session. This avoids + * the need for naming the sequence, table or column altogether. + * + * @param resource $result PostgreSQL query result resource, returned by pg_query, + * pg_query_params or pg_execute + * (among others). + * @return string A string containing the OID assigned to the most recently inserted + * row in the specified connection or + * no available OID. + * @throws PgsqlException + * + */ +function pg_last_oid($result): string +{ + error_clear_last(); + $result = \pg_last_oid($result); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_lo_close closes a large + * object. large_object is a resource for the + * large object from pg_lo_open. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. + * @throws PgsqlException + * + */ +function pg_lo_close($large_object): void +{ + error_clear_last(); + $result = \pg_lo_close($large_object); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_lo_export takes a large object in a + * PostgreSQL database and saves its contents to a file on the local + * filesystem. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param int $oid The OID of the large object in the database. + * @param string $pathname The full path and file name of the file in which to write the + * large object on the client filesystem. + * @throws PgsqlException + * + */ +function pg_lo_export($connection = null, int $oid = null, string $pathname = null): void +{ + error_clear_last(); + if ($pathname !== null) { + $result = \pg_lo_export($connection, $oid, $pathname); + } elseif ($oid !== null) { + $result = \pg_lo_export($connection, $oid); + } elseif ($connection !== null) { + $result = \pg_lo_export($connection); + } else { + $result = \pg_lo_export(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_lo_import creates a new large object + * in the database using a file on the filesystem as its data + * source. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $pathname The full path and file name of the file on the client + * filesystem from which to read the large object data. + * @param mixed $object_id If an object_id is given the function + * will try to create a large object with this id, else a free + * object id is assigned by the server. The parameter + * was added in PHP 5.3 and relies on functionality that first + * appeared in PostgreSQL 8.1. + * @return int The OID of the newly created large object. + * @throws PgsqlException + * + */ +function pg_lo_import($connection = null, string $pathname = null, $object_id = null): int +{ + error_clear_last(); + if ($object_id !== null) { + $result = \pg_lo_import($connection, $pathname, $object_id); + } elseif ($pathname !== null) { + $result = \pg_lo_import($connection, $pathname); + } elseif ($connection !== null) { + $result = \pg_lo_import($connection); + } else { + $result = \pg_lo_import(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_lo_open opens a large object in the database + * and returns large object resource so that it can be manipulated. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param int $oid The OID of the large object in the database. + * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and + * write. + * @return resource A large object resource. + * @throws PgsqlException + * + */ +function pg_lo_open($connection, int $oid, string $mode) +{ + error_clear_last(); + $result = \pg_lo_open($connection, $oid, $mode); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_lo_read_all reads a large object and passes + * it straight through to the browser after sending all pending + * headers. Mainly intended for sending binary data like images or + * sound. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. + * @return int Number of bytes read. + * @throws PgsqlException + * + */ +function pg_lo_read_all($large_object): int +{ + error_clear_last(); + $result = \pg_lo_read_all($large_object); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_lo_read reads at most + * len bytes from a large object and + * returns it as a string. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. + * @param int $len An optional maximum number of bytes to return. + * @return string A string containing len bytes from the + * large object. + * @throws PgsqlException + * + */ +function pg_lo_read($large_object, int $len = 8192): string +{ + error_clear_last(); + $result = \pg_lo_read($large_object, $len); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_lo_seek seeks a position within a large object + * resource. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. + * @param int $offset The number of bytes to seek. + * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), + * PGSQL_SEEK_CUR (seek from current position) + * or PGSQL_SEEK_END (seek from object end) . + * @throws PgsqlException + * + */ +function pg_lo_seek($large_object, int $offset, int $whence = PGSQL_SEEK_CUR): void +{ + error_clear_last(); + $result = \pg_lo_seek($large_object, $offset, $whence); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_lo_truncate truncates a large object + * resource. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. + * @param int $size The number of bytes to truncate. + * @throws PgsqlException + * + */ +function pg_lo_truncate($large_object, int $size): void +{ + error_clear_last(); + $result = \pg_lo_truncate($large_object, $size); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_lo_unlink deletes a large object with the + * oid. Returns TRUE on success. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param int $oid The OID of the large object in the database. + * @throws PgsqlException + * + */ +function pg_lo_unlink($connection, int $oid): void +{ + error_clear_last(); + $result = \pg_lo_unlink($connection, $oid); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_lo_write writes data into a large object + * at the current seek position. + * + * To use the large object interface, it is necessary to + * enclose it within a transaction block. + * + * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. + * @param string $data The data to be written to the large object. If len is + * specified and is less than the length of data, only + * len bytes will be written. + * @param int $len An optional maximum number of bytes to write. Must be greater than zero + * and no greater than the length of data. Defaults to + * the length of data. + * @return int The number of bytes written to the large object. + * @throws PgsqlException + * + */ +function pg_lo_write($large_object, string $data, int $len = null): int +{ + error_clear_last(); + if ($len !== null) { + $result = \pg_lo_write($large_object, $data, $len); + } else { + $result = \pg_lo_write($large_object, $data); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_meta_data returns table definition for + * table_name as an array. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name The name of the table. + * @param bool $extended Flag for returning extended meta data. Default to FALSE. + * @return array An array of the table definition. + * @throws PgsqlException + * + */ +function pg_meta_data($connection, string $table_name, bool $extended = false): array +{ + error_clear_last(); + $result = \pg_meta_data($connection, $table_name, $extended); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_options will return a string containing + * the options specified on the given PostgreSQL + * connection resource. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return string A string containing the connection + * options. + * @throws PgsqlException + * + */ +function pg_options($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_options($connection); + } else { + $result = \pg_options(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Looks up a current parameter setting of the server. + * + * Certain parameter values are reported by the server automatically at + * connection startup or whenever their values change. pg_parameter_status can be + * used to interrogate these settings. It returns the current value of a + * parameter if known, or FALSE if the parameter is not known. + * + * Parameters reported as of PostgreSQL 8.0 include server_version, + * server_encoding, client_encoding, + * is_superuser, session_authorization, + * DateStyle, TimeZone, and integer_datetimes. + * (server_encoding, TimeZone, and + * integer_datetimes were not reported by releases before 8.0.) Note that + * server_version, server_encoding and integer_datetimes + * cannot change after PostgreSQL startup. + * + * PostgreSQL 7.3 or lower servers do not report parameter settings, + * pg_parameter_status + * includes logic to obtain values for server_version and + * client_encoding + * anyway. Applications are encouraged to use pg_parameter_status rather than ad + * hoc code to determine these values. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $param_name Possible param_name values include server_version, + * server_encoding, client_encoding, + * is_superuser, session_authorization, + * DateStyle, TimeZone, and + * integer_datetimes. Note that this value is case-sensitive. + * @return string A string containing the value of the parameter, FALSE on failure or invalid + * param_name. + * @throws PgsqlException + * + */ +function pg_parameter_status($connection = null, string $param_name = null): string +{ + error_clear_last(); + if ($param_name !== null) { + $result = \pg_parameter_status($connection, $param_name); + } elseif ($connection !== null) { + $result = \pg_parameter_status($connection); + } else { + $result = \pg_parameter_status(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_pconnect opens a connection to a + * PostgreSQL database. It returns a connection resource that is + * needed by other PostgreSQL functions. + * + * If a second call is made to pg_pconnect with + * the same connection_string as an existing connection, the + * existing connection will be returned unless you pass + * PGSQL_CONNECT_FORCE_NEW as + * connect_type. + * + * To enable persistent connection, the pgsql.allow_persistent + * php.ini directive must be set to "On" (which is the default). + * The maximum number of persistent connection can be defined with the pgsql.max_persistent + * php.ini directive (defaults to -1 for no limit). The total number + * of connections can be set with the pgsql.max_links + * php.ini directive. + * + * pg_close will not close persistent links + * generated by pg_pconnect. + * + * @param string $connection_string The connection_string can be empty to use all default parameters, or it + * can contain one or more parameter settings separated by whitespace. + * Each parameter setting is in the form keyword = value. Spaces around + * the equal sign are optional. To write an empty value or a value + * containing spaces, surround it with single quotes, e.g., keyword = + * 'a value'. Single quotes and backslashes within the value must be + * escaped with a backslash, i.e., \' and \\. + * + * The currently recognized parameter keywords are: + * host, hostaddr, port, + * dbname, user, + * password, connect_timeout, + * options, tty (ignored), sslmode, + * requiressl (deprecated in favor of sslmode), and + * service. Which of these arguments exist depends + * on your PostgreSQL version. + * @param int $connect_type If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection + * is created, even if the connection_string is identical to + * an existing connection. + * @return resource PostgreSQL connection resource on success, FALSE on failure. + * @throws PgsqlException + * + */ +function pg_pconnect(string $connection_string, int $connect_type = null) +{ + error_clear_last(); + if ($connect_type !== null) { + $result = \pg_pconnect($connection_string, $connect_type); + } else { + $result = \pg_pconnect($connection_string); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_ping pings a database connection and tries to + * reconnect it if it is broken. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @throws PgsqlException + * + */ +function pg_ping($connection = null): void +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_ping($connection); + } else { + $result = \pg_ping(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_port returns the port number that the + * given PostgreSQL connection resource is + * connected to. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return int An int containing the port number of the database + * server the connection is to. + * @throws PgsqlException + * + */ +function pg_port($connection = null): int +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_port($connection); + } else { + $result = \pg_port(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_prepare creates a prepared statement for later execution with + * pg_execute or pg_send_execute. + * This feature allows commands that will be used repeatedly to + * be parsed and planned just once, rather than each time they are executed. + * pg_prepare is supported only against PostgreSQL 7.4 or + * higher connections; it will fail when using earlier versions. + * + * The function creates a prepared statement named stmtname from the query + * string, which must contain a single SQL command. stmtname may be "" to + * create an unnamed statement, in which case any pre-existing unnamed + * statement is automatically replaced; otherwise it is an error if the + * statement name is already defined in the current session. If any parameters + * are used, they are referred to in the query as $1, $2, etc. + * + * Prepared statements for use with pg_prepare can also be created by + * executing SQL PREPARE statements. (But pg_prepare is more flexible since it + * does not require parameter types to be pre-specified.) Also, although there + * is no PHP function for deleting a prepared statement, the SQL DEALLOCATE + * statement can be used for that purpose. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If + * "" is specified, then an unnamed statement is created, overwriting any + * previously defined unnamed statement. + * @param string $query The parameterized SQL statement. Must contain only a single statement. + * (multiple statements separated by semi-colons are not allowed.) If any parameters + * are used, they are referred to as $1, $2, etc. + * @return resource A query result resource on success. + * @throws PgsqlException + * + */ +function pg_prepare($connection = null, string $stmtname = null, string $query = null) +{ + error_clear_last(); + if ($query !== null) { + $result = \pg_prepare($connection, $stmtname, $query); + } elseif ($stmtname !== null) { + $result = \pg_prepare($connection, $stmtname); + } elseif ($connection !== null) { + $result = \pg_prepare($connection); + } else { + $result = \pg_prepare(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_put_line sends a NULL-terminated string + * to the PostgreSQL backend server. This is needed in conjunction + * with PostgreSQL's COPY FROM command. + * + * COPY is a high-speed data loading interface + * supported by PostgreSQL. Data is passed in without being parsed, + * and in a single transaction. + * + * An alternative to using raw pg_put_line commands + * is to use pg_copy_from. This is a far simpler + * interface. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL + * terminator is added automatically. + * @throws PgsqlException + * + */ +function pg_put_line($connection = null, string $data = null): void +{ + error_clear_last(); + if ($data !== null) { + $result = \pg_put_line($connection, $data); + } elseif ($connection !== null) { + $result = \pg_put_line($connection); + } else { + $result = \pg_put_line(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * Submits a command to the server and waits for the result, with the ability + * to pass parameters separately from the SQL command text. + * + * pg_query_params is like pg_query, + * but offers additional functionality: parameter + * values can be specified separately from the command string proper. + * pg_query_params is supported only against PostgreSQL 7.4 or + * higher connections; it will fail when using earlier versions. + * + * If parameters are used, they are referred to in the + * query string as $1, $2, etc. The same parameter may + * appear more than once in the query; the same value + * will be used in that case. params specifies the + * actual values of the parameters. A NULL value in this array means the + * corresponding parameter is SQL NULL. + * + * The primary advantage of pg_query_params over pg_query + * is that parameter values + * may be separated from the query string, thus avoiding the need for tedious + * and error-prone quoting and escaping. Unlike pg_query, + * pg_query_params allows at + * most one SQL command in the given string. (There can be semicolons in it, + * but not more than one nonempty command.) + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $query The parameterized SQL statement. Must contain only a single statement. + * (multiple statements separated by semi-colons are not allowed.) If any parameters + * are used, they are referred to as $1, $2, etc. + * + * User-supplied values should always be passed as parameters, not + * interpolated into the query string, where they form possible + * SQL injection + * attack vectors and introduce bugs when handling data containing quotes. + * If for some reason you cannot use a parameter, ensure that interpolated + * values are properly escaped. + * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders + * in the original prepared query string. The number of elements in the array + * must match the number of placeholders. + * + * Values intended for bytea fields are not supported as + * parameters. Use pg_escape_bytea instead, or use the + * large object functions. + * @return resource A query result resource on success. + * @throws PgsqlException + * + */ +function pg_query_params($connection = null, string $query = null, array $params = null) +{ + error_clear_last(); + if ($params !== null) { + $result = \pg_query_params($connection, $query, $params); + } elseif ($query !== null) { + $result = \pg_query_params($connection, $query); + } elseif ($connection !== null) { + $result = \pg_query_params($connection); + } else { + $result = \pg_query_params(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_query executes the query + * on the specified database connection. + * pg_query_params should be preferred + * in most cases. + * + * If an error occurs, and FALSE is returned, details of the error can + * be retrieved using the pg_last_error + * function if the connection is valid. + * + * + * + * Although connection can be omitted, it + * is not recommended, since it can be the cause of hard to find + * bugs in scripts. + * + * + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, + * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands + * included in the query string. However, using multiple transactions in one function call is not recommended. + * + * String interpolation of user-supplied data is extremely dangerous and is + * likely to lead to SQL + * injection vulnerabilities. In most cases + * pg_query_params should be preferred, passing + * user-supplied values as parameters rather than substituting them into + * the query string. + * + * Any user-supplied data substituted directly into a query string should + * be properly escaped. + * @return resource A query result resource on success. + * @throws PgsqlException + * + */ +function pg_query($connection = null, string $query = null) +{ + error_clear_last(); + if ($query !== null) { + $result = \pg_query($connection, $query); + } elseif ($connection !== null) { + $result = \pg_query($connection); + } else { + $result = \pg_query(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_result_error_field returns one of the detailed error message + * fields associated with result resource. It is only available + * against a PostgreSQL 7.4 or above server. The error field is specified by + * the fieldcode. + * + * Because pg_query and pg_query_params return FALSE if the query fails, + * you must use pg_send_query and + * pg_get_result to get the result handle. + * + * If you need to get additional error information from failed pg_query queries, + * use pg_set_error_verbosity and pg_last_error + * and then parse the result. + * + * @param resource $result A PostgreSQL query result resource from a previously executed + * statement. + * @param int $fieldcode Possible fieldcode values are: PGSQL_DIAG_SEVERITY, + * PGSQL_DIAG_SQLSTATE, PGSQL_DIAG_MESSAGE_PRIMARY, + * PGSQL_DIAG_MESSAGE_DETAIL, + * PGSQL_DIAG_MESSAGE_HINT, PGSQL_DIAG_STATEMENT_POSITION, + * PGSQL_DIAG_INTERNAL_POSITION (PostgreSQL 8.0+ only), + * PGSQL_DIAG_INTERNAL_QUERY (PostgreSQL 8.0+ only), + * PGSQL_DIAG_CONTEXT, PGSQL_DIAG_SOURCE_FILE, + * PGSQL_DIAG_SOURCE_LINE or + * PGSQL_DIAG_SOURCE_FUNCTION. + * @return string|null A string containing the contents of the error field, NULL if the field does not exist. + * @throws PgsqlException + * + */ +function pg_result_error_field($result, int $fieldcode): ?string +{ + error_clear_last(); + $result = \pg_result_error_field($result, $fieldcode); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_result_seek sets the internal row offset in + * a result resource. + * + * @param resource $result PostgreSQL query result resource, returned by pg_query, + * pg_query_params or pg_execute + * (among others). + * @param int $offset Row to move the internal offset to in the result resource. + * Rows are numbered starting from zero. + * @throws PgsqlException + * + */ +function pg_result_seek($result, int $offset): void +{ + error_clear_last(); + $result = \pg_result_seek($result, $offset); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_select selects records specified by + * assoc_array which has + * field=>value. For a successful query, it returns an + * array containing all records and fields that match the condition + * specified by assoc_array. + * + * If options is specified, + * pg_convert is applied to + * assoc_array with the specified flags. + * + * By default pg_select passes raw values. Values + * must be escaped or PGSQL_DML_ESCAPE option must be + * specified. PGSQL_DML_ESCAPE quotes and escapes + * parameters/identifiers. Therefore, table/column names became case + * sensitive. + * + * Note that neither escape nor prepared query can protect LIKE query, + * JSON, Array, Regex, etc. These parameters should be handled + * according to their contexts. i.e. Escape/validate values. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table from which to select rows. + * @param array $assoc_array An array whose keys are field names in the table table_name, + * and whose values are the conditions that a row must meet to be retrieved. + * @param int $options Any number of PGSQL_CONV_FORCE_NULL, + * PGSQL_DML_NO_CONV, + * PGSQL_DML_ESCAPE, + * PGSQL_DML_EXEC, + * PGSQL_DML_ASYNC or + * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the + * options then query string is returned. When PGSQL_DML_NO_CONV + * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @param int $result_type + * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed + * via options. + * @throws PgsqlException + * + */ +function pg_select($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC, int $result_type = PGSQL_ASSOC) +{ + error_clear_last(); + $result = \pg_select($connection, $table_name, $assoc_array, $options, $result_type); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * Sends a request to execute a prepared statement with given parameters, + * without waiting for the result(s). + * + * This is similar to pg_send_query_params, but the command to be executed is specified + * by naming a previously-prepared statement, instead of giving a query string. The + * function's parameters are handled identically to pg_execute. + * Like pg_execute, it will not work on pre-7.4 versions of + * PostgreSQL. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $stmtname The name of the prepared statement to execute. if + * "" is specified, then the unnamed statement is executed. The name must have + * been previously prepared using pg_prepare, + * pg_send_prepare or a PREPARE SQL + * command. + * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders + * in the original prepared query string. The number of elements in the array + * must match the number of placeholders. + * @throws PgsqlException + * + */ +function pg_send_execute($connection, string $stmtname, array $params): void +{ + error_clear_last(); + $result = \pg_send_execute($connection, $stmtname, $params); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * Sends a request to create a prepared statement with the given parameters, + * without waiting for completion. + * + * This is an asynchronous version of pg_prepare: it returns TRUE if it was able to + * dispatch the request, and FALSE if not. After a successful call, call + * pg_get_result to determine whether the server successfully created the + * prepared statement. The function's parameters are handled identically to + * pg_prepare. Like pg_prepare, it will not work + * on pre-7.4 versions of PostgreSQL. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If + * "" is specified, then an unnamed statement is created, overwriting any + * previously defined unnamed statement. + * @param string $query The parameterized SQL statement. Must contain only a single statement. + * (multiple statements separated by semi-colons are not allowed.) If any parameters + * are used, they are referred to as $1, $2, etc. + * @throws PgsqlException + * + */ +function pg_send_prepare($connection, string $stmtname, string $query): void +{ + error_clear_last(); + $result = \pg_send_prepare($connection, $stmtname, $query); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * Submits a command and separate parameters to the server without + * waiting for the result(s). + * + * This is equivalent to pg_send_query except that query + * parameters can be specified separately from the + * query string. The function's parameters are + * handled identically to pg_query_params. Like + * pg_query_params, it will not work on pre-7.4 PostgreSQL + * connections, and it allows only one command in the query string. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $query The parameterized SQL statement. Must contain only a single statement. + * (multiple statements separated by semi-colons are not allowed.) If any parameters + * are used, they are referred to as $1, $2, etc. + * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders + * in the original prepared query string. The number of elements in the array + * must match the number of placeholders. + * @throws PgsqlException + * + */ +function pg_send_query_params($connection, string $query, array $params): void +{ + error_clear_last(); + $result = \pg_send_query_params($connection, $query, $params); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_send_query sends a query or queries asynchronously to the + * connection. Unlike + * pg_query, it can send multiple queries at once to + * PostgreSQL and get the results one by one using + * pg_get_result. + * + * Script execution is not blocked while the queries are executing. Use + * pg_connection_busy to check if the connection is + * busy (i.e. the query is executing). Queries may be cancelled using + * pg_cancel_query. + * + * Although the user can send multiple queries at once, multiple queries + * cannot be sent over a busy connection. If a query is sent while + * the connection is busy, it waits until the last query is finished and + * discards all its results. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $query The SQL statement or statements to be executed. + * + * Data inside the query should be properly escaped. + * @throws PgsqlException + * + */ +function pg_send_query($connection, string $query): void +{ + error_clear_last(); + $result = \pg_send_query($connection, $query); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_socket returns a read only resource + * corresponding to the socket underlying the given PostgreSQL connection. + * + * @param resource $connection PostgreSQL database connection resource. + * @return resource A socket resource on success. + * @throws PgsqlException + * + */ +function pg_socket($connection) +{ + error_clear_last(); + $result = \pg_socket($connection); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_trace enables tracing of the PostgreSQL + * frontend/backend communication to a file. To fully understand the results, + * one needs to be familiar with the internals of PostgreSQL + * communication protocol. + * + * For those who are not, it can still be + * useful for tracing errors in queries sent to the server, you + * could do for example grep '^To backend' + * trace.log and see what queries actually were sent to the + * PostgreSQL server. For more information, refer to the + * PostgreSQL Documentation. + * + * @param string $pathname The full path and file name of the file in which to write the + * trace log. Same as in fopen. + * @param string $mode An optional file access mode, same as for fopen. + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @throws PgsqlException + * + */ +function pg_trace(string $pathname, string $mode = "w", $connection = null): void +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_trace($pathname, $mode, $connection); + } else { + $result = \pg_trace($pathname, $mode); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } +} + + +/** + * pg_tty returns the TTY name that server + * side debugging output is sent to on the given PostgreSQL + * connection resource. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return string A string containing the debug TTY of + * the connection. + * @throws PgsqlException + * + */ +function pg_tty($connection = null): string +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_tty($connection); + } else { + $result = \pg_tty(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_update updates records that matches + * condition with data. If + * options is specified, + * pg_convert is applied to + * data with specified options. + * + * pg_update updates records specified by + * assoc_array which has + * field=>value. + * + * If options is specified, + * pg_convert is applied to + * assoc_array with the specified flags. + * + * By default pg_update passes raw values. Values + * must be escaped or PGSQL_DML_ESCAPE option must be + * specified. PGSQL_DML_ESCAPE quotes and escapes + * parameters/identifiers. Therefore, table/column names became case + * sensitive. + * + * Note that neither escape nor prepared query can protect LIKE query, + * JSON, Array, Regex, etc. These parameters should be handled + * according to their contexts. i.e. Escape/validate values. + * + * @param resource $connection PostgreSQL database connection resource. + * @param string $table_name Name of the table into which to update rows. + * @param array $data An array whose keys are field names in the table table_name, + * and whose values are what matched rows are to be updated to. + * @param array $condition An array whose keys are field names in the table table_name, + * and whose values are the conditions that a row must meet to be updated. + * @param int $options Any number of PGSQL_CONV_FORCE_NULL, + * PGSQL_DML_NO_CONV, + * PGSQL_DML_ESCAPE, + * PGSQL_DML_EXEC, + * PGSQL_DML_ASYNC or + * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the + * options then query string is returned. When PGSQL_DML_NO_CONV + * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed + * via options. + * @throws PgsqlException + * + */ +function pg_update($connection, string $table_name, array $data, array $condition, int $options = PGSQL_DML_EXEC) +{ + error_clear_last(); + $result = \pg_update($connection, $table_name, $data, $condition, $options); + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} + + +/** + * pg_version returns an array with the client, protocol + * and server version. Protocol and server versions are only available if PHP + * was compiled with PostgreSQL 7.4 or later. + * + * For more detailed server information, use pg_parameter_status. + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + * @return array Returns an array with client, protocol + * and server keys and values (if available) or invalid connection. + * @throws PgsqlException + * + */ +function pg_version($connection = null): array +{ + error_clear_last(); + if ($connection !== null) { + $result = \pg_version($connection); + } else { + $result = \pg_version(); + } + if ($result === false) { + throw PgsqlException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/posix.php b/vendor/thecodingmachine/safe/generated/posix.php new file mode 100644 index 000000000..6ae99d88c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/posix.php @@ -0,0 +1,329 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PosixException; + +/** + * posix_access checks the user's permission of a file. + * + * @param string $file The name of the file to be tested. + * @param int $mode A mask consisting of one or more of POSIX_F_OK, + * POSIX_R_OK, POSIX_W_OK and + * POSIX_X_OK. + * + * POSIX_R_OK, POSIX_W_OK and + * POSIX_X_OK request checking whether the file + * exists and has read, write and execute permissions, respectively. + * POSIX_F_OK just requests checking for the + * existence of the file. + * @throws PosixException + * + */ +function posix_access(string $file, int $mode = POSIX_F_OK): void +{ + error_clear_last(); + $result = \posix_access($file, $mode); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Gets information about a group provided its name. + * + * @param string $name The name of the group + * @return array Returns an array on success. + * The array elements returned are: + * + * The group information array + * + * + * + * Element + * Description + * + * + * + * + * name + * + * The name element contains the name of the group. This is + * a short, usually less than 16 character "handle" of the + * group, not the real, full name. This should be the same as + * the name parameter used when + * calling the function, and hence redundant. + * + * + * + * passwd + * + * The passwd element contains the group's password in an + * encrypted format. Often, for example on a system employing + * "shadow" passwords, an asterisk is returned instead. + * + * + * + * gid + * + * Group ID of the group in numeric form. + * + * + * + * members + * + * This consists of an array of + * string's for all the members in the group. + * + * + * + * + * + * @throws PosixException + * + */ +function posix_getgrnam(string $name): array +{ + error_clear_last(); + $result = \posix_getgrnam($name); + if ($result === false) { + throw PosixException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the process group identifier of the process + * pid. + * + * @param int $pid The process id. + * @return int Returns the identifier, as an integer. + * @throws PosixException + * + */ +function posix_getpgid(int $pid): int +{ + error_clear_last(); + $result = \posix_getpgid($pid); + if ($result === false) { + throw PosixException::createFromPhpError(); + } + return $result; +} + + +/** + * Calculates the group access list for the user specified in name. + * + * @param string $name The user to calculate the list for. + * @param int $base_group_id Typically the group number from the password file. + * @throws PosixException + * + */ +function posix_initgroups(string $name, int $base_group_id): void +{ + error_clear_last(); + $result = \posix_initgroups($name, $base_group_id); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Send the signal sig to the process with + * the process identifier pid. + * + * @param int $pid The process identifier. + * @param int $sig One of the PCNTL signals constants. + * @throws PosixException + * + */ +function posix_kill(int $pid, int $sig): void +{ + error_clear_last(); + $result = \posix_kill($pid, $sig); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * posix_mkfifo creates a special + * FIFO file which exists in the file system and acts as + * a bidirectional communication endpoint for processes. + * + * @param string $pathname Path to the FIFO file. + * @param int $mode The second parameter mode has to be given in + * octal notation (e.g. 0644). The permission of the newly created + * FIFO also depends on the setting of the current + * umask. The permissions of the created file are + * (mode & ~umask). + * @throws PosixException + * + */ +function posix_mkfifo(string $pathname, int $mode): void +{ + error_clear_last(); + $result = \posix_mkfifo($pathname, $mode); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Creates a special or ordinary file. + * + * @param string $pathname The file to create + * @param int $mode This parameter is constructed by a bitwise OR between file type (one of + * the following constants: POSIX_S_IFREG, + * POSIX_S_IFCHR, POSIX_S_IFBLK, + * POSIX_S_IFIFO or + * POSIX_S_IFSOCK) and permissions. + * @param int $major The major device kernel identifier (required to pass when using + * S_IFCHR or S_IFBLK). + * @param int $minor The minor device kernel identifier. + * @throws PosixException + * + */ +function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0): void +{ + error_clear_last(); + $result = \posix_mknod($pathname, $mode, $major, $minor); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Set the effective group ID of the current process. This is a + * privileged function and needs appropriate privileges (usually + * root) on the system to be able to perform this function. + * + * @param int $gid The group id. + * @throws PosixException + * + */ +function posix_setegid(int $gid): void +{ + error_clear_last(); + $result = \posix_setegid($gid); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Set the effective user ID of the current process. This is a privileged + * function and needs appropriate privileges (usually root) on + * the system to be able to perform this function. + * + * @param int $uid The user id. + * @throws PosixException + * + */ +function posix_seteuid(int $uid): void +{ + error_clear_last(); + $result = \posix_seteuid($uid); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Set the real group ID of the current process. This is a + * privileged function and needs appropriate privileges (usually + * root) on the system to be able to perform this function. The + * appropriate order of function calls is + * posix_setgid first, + * posix_setuid last. + * + * @param int $gid The group id. + * @throws PosixException + * + */ +function posix_setgid(int $gid): void +{ + error_clear_last(); + $result = \posix_setgid($gid); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Let the process pid join the process group + * pgid. + * + * @param int $pid The process id. + * @param int $pgid The process group id. + * @throws PosixException + * + */ +function posix_setpgid(int $pid, int $pgid): void +{ + error_clear_last(); + $result = \posix_setpgid($pid, $pgid); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * posix_setrlimit sets the soft and hard limits for a + * given system resource. + * + * + * Each resource has an associated soft and hard limit. The soft + * limit is the value that the kernel enforces for the corresponding + * resource. The hard limit acts as a ceiling for the soft limit. + * An unprivileged process may only set its soft limit to a value + * from 0 to the hard limit, and irreversibly lower its hard limit. + * + * @param int $resource The + * resource limit constant + * corresponding to the limit that is being set. + * @param int $softlimit The soft limit, in whatever unit the resource limit requires, or + * POSIX_RLIMIT_INFINITY. + * @param int $hardlimit The hard limit, in whatever unit the resource limit requires, or + * POSIX_RLIMIT_INFINITY. + * @throws PosixException + * + */ +function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): void +{ + error_clear_last(); + $result = \posix_setrlimit($resource, $softlimit, $hardlimit); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} + + +/** + * Set the real user ID of the current process. This is a privileged + * function that needs appropriate privileges (usually root) on + * the system to be able to perform this function. + * + * @param int $uid The user id. + * @throws PosixException + * + */ +function posix_setuid(int $uid): void +{ + error_clear_last(); + $result = \posix_setuid($uid); + if ($result === false) { + throw PosixException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/ps.php b/vendor/thecodingmachine/safe/generated/ps.php new file mode 100644 index 000000000..a66667aa9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ps.php @@ -0,0 +1,1812 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PsException; + +/** + * Places a hyperlink at the given position pointing to a file program + * which is being started when clicked on. The hyperlink's source position + * is a rectangle + * with its lower left corner at (llx, lly) and its upper right corner at + * (urx, ury). The rectangle has by default a thin blue border. + * + * The note will not be visible if the document + * is printed or viewed but it will show up if the document is converted to + * pdf by either Acrobat Distiller™ or Ghostview. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $llx The x-coordinate of the lower left corner. + * @param float $lly The y-coordinate of the lower left corner. + * @param float $urx The x-coordinate of the upper right corner. + * @param float $ury The y-coordinate of the upper right corner. + * @param string $filename The path of the program to be started, when the link is clicked on. + * @throws PsException + * + */ +function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename): void +{ + error_clear_last(); + $result = \ps_add_launchlink($psdoc, $llx, $lly, $urx, $ury, $filename); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Places a hyperlink at the given position pointing to a page in the same + * document. Clicking on the link will jump to the given page. The first page + * in a document has number 1. + * + * The hyperlink's source position is a rectangle with its lower left corner at + * (llx, lly) and its upper + * right corner at (urx, ury). + * The rectangle has by default a thin blue border. + * + * The note will not be visible if the document + * is printed or viewed but it will show up if the document is converted to + * pdf by either Acrobat Distiller™ or Ghostview. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $llx The x-coordinate of the lower left corner. + * @param float $lly The y-coordinate of the lower left corner. + * @param float $urx The x-coordinate of the upper right corner. + * @param float $ury The y-coordinate of the upper right corner. + * @param int $page The number of the page displayed when clicking on the link. + * @param string $dest The parameter dest determines how the document + * is being viewed. It can be fitpage, + * fitwidth, fitheight, or + * fitbbox. + * @throws PsException + * + */ +function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury, int $page, string $dest): void +{ + error_clear_last(); + $result = \ps_add_locallink($psdoc, $llx, $lly, $urx, $ury, $page, $dest); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Adds a note at a certain position on the page. Notes are like little + * rectangular sheets with text on it, which can be placed anywhere on + * a page. They + * are shown either folded or unfolded. If folded, the specified icon + * is used as a placeholder. + * + * The note will not be visible if the document + * is printed or viewed but it will show up if the document is converted to + * pdf by either Acrobat Distiller™ or Ghostview. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $llx The x-coordinate of the lower left corner. + * @param float $lly The y-coordinate of the lower left corner. + * @param float $urx The x-coordinate of the upper right corner. + * @param float $ury The y-coordinate of the upper right corner. + * @param string $contents The text of the note. + * @param string $title The title of the note as displayed in the header of the note. + * @param string $icon The icon shown if the note is folded. This parameter can be set + * to comment, insert, + * note, paragraph, + * newparagraph, key, or + * help. + * @param int $open If open is unequal to zero the note will + * be shown unfolded after opening the document with a pdf viewer. + * @throws PsException + * + */ +function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void +{ + error_clear_last(); + $result = \ps_add_note($psdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Places a hyperlink at the given position pointing to a second pdf document. + * Clicking on the link will branch to the document at the given page. The + * first page in a document has number 1. + * + * The hyperlink's source position is a rectangle with its lower left corner at + * (llx, lly) and its upper + * right corner at (urx, ury). + * The rectangle has by default a thin blue border. + * + * The note will not be visible if the document + * is printed or viewed but it will show up if the document is converted to + * pdf by either Acrobat Distiller™ or Ghostview. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $llx The x-coordinate of the lower left corner. + * @param float $lly The y-coordinate of the lower left corner. + * @param float $urx The x-coordinate of the upper right corner. + * @param float $ury The y-coordinate of the upper right corner. + * @param string $filename The name of the pdf document to be opened when clicking on + * this link. + * @param int $page The page number of the destination pdf document + * @param string $dest The parameter dest determines how the document + * is being viewed. It can be fitpage, + * fitwidth, fitheight, or + * fitbbox. + * @throws PsException + * + */ +function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename, int $page, string $dest): void +{ + error_clear_last(); + $result = \ps_add_pdflink($psdoc, $llx, $lly, $urx, $ury, $filename, $page, $dest); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Places a hyperlink at the given position pointing to a web page. The + * hyperlink's source position is a rectangle with its lower left corner at + * (llx, lly) and + * its upper right corner at (urx, + * ury). The rectangle has by default a thin + * blue border. + * + * The note will not be visible if the document + * is printed or viewed but it will show up if the document is converted to + * pdf by either Acrobat Distiller™ or Ghostview. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $llx The x-coordinate of the lower left corner. + * @param float $lly The y-coordinate of the lower left corner. + * @param float $urx The x-coordinate of the upper right corner. + * @param float $ury The y-coordinate of the upper right corner. + * @param string $url The url of the hyperlink to be opened when clicking on + * this link, e.g. http://www.php.net. + * @throws PsException + * + */ +function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, string $url): void +{ + error_clear_last(); + $result = \ps_add_weblink($psdoc, $llx, $lly, $urx, $ury, $url); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Draws a portion of a circle with at middle point at + * (x, y). The arc starts at an + * angle of alpha and ends at an angle of + * beta. It is drawn counterclockwise (use + * ps_arcn to draw clockwise). The subpath added + * to the current path starts on the arc at angle alpha + * and ends on the arc at angle beta. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x The x-coordinate of the circle's middle point. + * @param float $y The y-coordinate of the circle's middle point. + * @param float $radius The radius of the circle + * @param float $alpha The start angle given in degrees. + * @param float $beta The end angle given in degrees. + * @throws PsException + * + */ +function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void +{ + error_clear_last(); + $result = \ps_arc($psdoc, $x, $y, $radius, $alpha, $beta); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Draws a portion of a circle with at middle point at + * (x, y). The arc starts at an + * angle of alpha and ends at an angle of + * beta. It is drawn clockwise (use + * ps_arc to draw counterclockwise). The subpath added to + * the current path starts on the arc at angle beta and + * ends on the arc at angle alpha. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x The x-coordinate of the circle's middle point. + * @param float $y The y-coordinate of the circle's middle point. + * @param float $radius The radius of the circle + * @param float $alpha The starting angle given in degrees. + * @param float $beta The end angle given in degrees. + * @throws PsException + * + */ +function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void +{ + error_clear_last(); + $result = \ps_arcn($psdoc, $x, $y, $radius, $alpha, $beta); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Starts a new page. Although the parameters width + * and height imply a different page size for each + * page, this is not possible in PostScript. The first call of + * ps_begin_page will set the page size for the whole + * document. Consecutive calls will have no effect, except for creating a new + * page. The situation is different if you intent to convert the PostScript + * document into PDF. This function places pdfmarks into the document which + * can set the size for each page indiviually. The resulting PDF document will + * have different page sizes. + * + * Though PostScript does not know different page sizes, pslib places + * a bounding box for each page into the document. This size is evaluated + * by some PostScript viewers and will have precedence over the BoundingBox + * in the Header of the document. This can lead to unexpected results when + * you set a BoundingBox whose lower left corner is not (0, 0), because the + * bounding box of the page will always have a lower left corner (0, 0) + * and overwrites the global setting. + * + * Each page is encapsulated into save/restore. This means, that most of the + * settings made on one page will not be retained on the next page. + * + * If there is up to the first call of ps_begin_page no + * call of ps_findfont, then the header of the PostScript + * document will be output and the bounding box will be set to the size of + * the first page. The lower left corner of the bounding box is set to (0, 0). + * If ps_findfont was called before, then the + * header has been output already, and the document will not have a valid + * bounding box. In order to prevent this, one should call + * ps_set_info to set the info field + * BoundingBox and possibly Orientation + * before any ps_findfont or + * ps_begin_page calls. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $width The width of the page in pixel, e.g. 596 for A4 format. + * @param float $height The height of the page in pixel, e.g. 842 for A4 format. + * @throws PsException + * + */ +function ps_begin_page($psdoc, float $width, float $height): void +{ + error_clear_last(); + $result = \ps_begin_page($psdoc, $width, $height); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Starts a new pattern. A pattern is like a page containing e.g. a drawing + * which can be used for filling areas. It is used like a color by calling + * ps_setcolor and setting the color space to + * pattern. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $width The width of the pattern in pixel. + * @param float $height The height of the pattern in pixel. + * @param float $xstep The distance in pixel of placements of the pattern in + * horizontal direction. + * @param float $ystep The distance in pixel of placements of the pattern in + * vertical direction. + * @param int $painttype Must be 1 or 2. + * @return int The identifier of the pattern. + * @throws PsException + * + */ +function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, float $ystep, int $painttype): int +{ + error_clear_last(); + $result = \ps_begin_pattern($psdoc, $width, $height, $xstep, $ystep, $painttype); + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * Starts a new template. A template is called a form in the postscript + * language. It is created similar to a pattern but used like an image. + * Templates are often used for drawings which are placed several times + * through out the document, e.g. like a company logo. All drawing functions + * may be used within a template. The template will not be drawn until + * it is placed by ps_place_image. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $width The width of the template in pixel. + * @param float $height The height of the template in pixel. + * @return int Returns TRUE on success. + * @throws PsException + * + */ +function ps_begin_template($psdoc, float $width, float $height): int +{ + error_clear_last(); + $result = \ps_begin_template($psdoc, $width, $height); + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * Draws a circle with its middle point at (x, + * y). The circle starts and ends at position + * (x+radius, + * y). If this function is called outside a path it + * will start a new path. If it is called within a path it will add the circle + * as a subpath. If the last drawing operation does not end in point + * (x+radius, + * y) then there will be a gap in the path. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x The x-coordinate of the circle's middle point. + * @param float $y The y-coordinate of the circle's middle point. + * @param float $radius The radius of the circle + * @throws PsException + * + */ +function ps_circle($psdoc, float $x, float $y, float $radius): void +{ + error_clear_last(); + $result = \ps_circle($psdoc, $x, $y, $radius); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Takes the current path and uses it to define the border of a clipping area. + * Everything drawn outside of that area will not be visible. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_clip($psdoc): void +{ + error_clear_last(); + $result = \ps_clip($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Closes an image and frees its resources. Once an image is closed + * it cannot be used anymore. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $imageid Resource identifier of the image as returned by + * ps_open_image or + * ps_open_image_file. + * @throws PsException + * + */ +function ps_close_image($psdoc, int $imageid): void +{ + error_clear_last(); + $result = \ps_close_image($psdoc, $imageid); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Closes the PostScript document. + * + * This function writes the trailer of the PostScript document. + * It also writes the bookmark tree. ps_close does + * not free any resources, which is done by ps_delete. + * + * This function is also called by ps_delete if it + * has not been called before. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_close($psdoc): void +{ + error_clear_last(); + $result = \ps_close($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Connects the last point with first point of a path and draws the resulting + * closed line. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_closepath_stroke($psdoc): void +{ + error_clear_last(); + $result = \ps_closepath_stroke($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Connects the last point with the first point of a path. The resulting + * path can be used for stroking, filling, clipping, etc.. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_closepath($psdoc): void +{ + error_clear_last(); + $result = \ps_closepath($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Output a text one line below the last line. The line spacing is + * taken from the value "leading" which must be set with + * ps_set_value. The actual position of the + * text is determined by the values "textx" and "texty" which can be requested + * with ps_get_value + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $text The text to output. + * @throws PsException + * + */ +function ps_continue_text($psdoc, string $text): void +{ + error_clear_last(); + $result = \ps_continue_text($psdoc, $text); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Add a section of a cubic Bézier curve described by the three given control + * points to the current path. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x1 x-coordinate of first control point. + * @param float $y1 y-coordinate of first control point. + * @param float $x2 x-coordinate of second control point. + * @param float $y2 y-coordinate of second control point. + * @param float $x3 x-coordinate of third control point. + * @param float $y3 y-coordinate of third control point. + * @throws PsException + * + */ +function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void +{ + error_clear_last(); + $result = \ps_curveto($psdoc, $x1, $y1, $x2, $y2, $x3, $y3); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Mainly frees memory used by the document. Also closes a file, if it was not + * closed before with ps_close. You should in any case + * close the file with ps_close before, because + * ps_close not just closes the file but also outputs a + * trailor containing PostScript comments like the number of pages in the + * document and adding the bookmark hierarchy. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_delete($psdoc): void +{ + error_clear_last(); + $result = \ps_delete($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Ends a page which was started with ps_begin_page. + * Ending a page will leave the current drawing context, which e.g. requires + * to reload fonts if they were loading within the page, and to set many + * other drawing parameters like the line width, or color.. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_end_page($psdoc): void +{ + error_clear_last(); + $result = \ps_end_page($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Ends a pattern which was started with ps_begin_pattern. + * Once a pattern has been ended, it can be used like a color to fill + * areas. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_end_pattern($psdoc): void +{ + error_clear_last(); + $result = \ps_end_pattern($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Ends a template which was started with ps_begin_template. + * Once a template has been ended, it can be used like an image. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_end_template($psdoc): void +{ + error_clear_last(); + $result = \ps_end_template($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Fills and draws the path constructed with previously called drawing + * functions like ps_lineto. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_fill_stroke($psdoc): void +{ + error_clear_last(); + $result = \ps_fill_stroke($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Fills the path constructed with previously called drawing functions like + * ps_lineto. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_fill($psdoc): void +{ + error_clear_last(); + $result = \ps_fill($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Gets several parameters which were directly set by + * ps_set_parameter or indirectly by one of the other + * functions. Parameters are by definition string + * values. This function cannot be used to retrieve resources which were also + * set by ps_set_parameter. + * + * The parameter name can have the following values. + * + * + * + * fontname + * + * + * The name of the currently active font or the font whose + * identifier is passed in parameter modifier. + * + * + * + * + * fontencoding + * + * + * The encoding of the currently active font. + * + * + * + * + * dottedversion + * + * + * The version of the underlying pslib library in the format + * <major>.<minor>.<subminor> + * + * + * + * + * scope + * + * + * The current drawing scope. Can be object, document, null, page, + * pattern, path, template, prolog, font, glyph. + * + * + * + * + * ligaturedisolvechar + * + * + * The character which dissolves a ligature. If your are using a font + * which contains the ligature `ff' and `|' is the char to dissolve the + * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. + * + * + * + * + * imageencoding + * + * + * The encoding used for encoding images. Can be either + * hex or 85. hex encoding + * uses two bytes in the postscript file each byte in the image. + * 85 stand for Ascii85 encoding. + * + * + * + * + * linenumbermode + * + * + * Set to paragraph if lines are numbered + * within a paragraph or box if they are + * numbered within the surrounding box. + * + * + * + * + * linebreak + * + * + * Only used if text is output with ps_show_boxed. + * If set to TRUE a carriage return will add a line + * break. + * + * + * + * + * parbreak + * + * + * Only used if text is output with ps_show_boxed. + * If set to TRUE a carriage return will start + * a new paragraph. + * + * + * + * + * hyphenation + * + * + * Only used if text is output with ps_show_boxed. + * If set to TRUE the paragraph will be hyphenated + * if a hypen dictionary is set and exists. + * + * + * + * + * hyphendict + * + * + * Filename of the dictionary used for hyphenation pattern. + * + * + * + * + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $name Name of the parameter. + * @param float $modifier An identifier needed if a parameter of a resource is requested, + * e.g. the size of an image. In such a case the resource id is + * passed. + * @return string Returns the value of the parameter. + * @throws PsException + * + */ +function ps_get_parameter($psdoc, string $name, float $modifier = null): string +{ + error_clear_last(); + if ($modifier !== null) { + $result = \ps_get_parameter($psdoc, $name, $modifier); + } else { + $result = \ps_get_parameter($psdoc, $name); + } + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * Hyphenates the passed word. ps_hyphenate evaluates the + * value hyphenminchars (set by ps_set_value) and + * the parameter hyphendict (set by ps_set_parameter). + * hyphendict must be set before calling this function. + * + * This function requires the locale category LC_CTYPE to be set properly. + * This is done when the extension is initialized by using the environment + * variables. On Unix systems read the man page of locale for more information. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $text text should not contain any non alpha + * characters. Possible positions for breaks are returned in an array of + * interger numbers. Each number is the position of the char in + * text after which a hyphenation can take place. + * @return array An array of integers indicating the position of possible breaks in + * the text. + * @throws PsException + * + */ +function ps_hyphenate($psdoc, string $text): array +{ + error_clear_last(); + $result = \ps_hyphenate($psdoc, $text); + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is + * currently not documented; only its argument list is available. + * + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $file + * @throws PsException + * + */ +function ps_include_file($psdoc, string $file): void +{ + error_clear_last(); + $result = \ps_include_file($psdoc, $file); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Adds a straight line from the current point to the given coordinates to the + * current path. Use ps_moveto to set the starting point + * of the line. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x x-coordinate of the end point of the line. + * @param float $y y-coordinate of the end point of the line. + * @throws PsException + * + */ +function ps_lineto($psdoc, float $x, float $y): void +{ + error_clear_last(); + $result = \ps_lineto($psdoc, $x, $y); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the current point to new coordinates. If this is the first call of + * ps_moveto after a previous path has been ended then it + * will start a new path. If this function is called in the middle of a path + * it will just set the current point and start a subpath. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x x-coordinate of the point to move to. + * @param float $y y-coordinate of the point to move to. + * @throws PsException + * + */ +function ps_moveto($psdoc, float $x, float $y): void +{ + error_clear_last(); + $result = \ps_moveto($psdoc, $x, $y); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Creates a new document instance. It does not create the file on disk or in + * memory, it just sets up everything. ps_new is usually + * followed by a call of ps_open_file to actually create + * the postscript document. + * + * @return resource Resource of PostScript document. The return value + * is passed to all other functions as the first argument. + * @throws PsException + * + */ +function ps_new() +{ + error_clear_last(); + $result = \ps_new(); + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * Creates a new file on disk and writes the PostScript document into it. The + * file will be closed when ps_close is called. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $filename The name of the postscript file. + * If filename is not passed the document will be + * created in memory and all output will go straight to the browser. + * @throws PsException + * + */ +function ps_open_file($psdoc, string $filename = null): void +{ + error_clear_last(); + if ($filename !== null) { + $result = \ps_open_file($psdoc, $filename); + } else { + $result = \ps_open_file($psdoc); + } + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Places a formerly loaded image on the page. The image can be scaled. + * If the image shall be rotated as well, you will have to rotate the + * coordinate system before with ps_rotate. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $imageid The resource identifier of the image as returned by + * ps_open_image or + * ps_open_image_file. + * @param float $x x-coordinate of the lower left corner of the image. + * @param float $y y-coordinate of the lower left corner of the image. + * @param float $scale The scaling factor for the image. A scale of 1.0 will result + * in a resolution of 72 dpi, because each pixel is equivalent to + * 1 point. + * @throws PsException + * + */ +function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): void +{ + error_clear_last(); + $result = \ps_place_image($psdoc, $imageid, $x, $y, $scale); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Draws a rectangle with its lower left corner at (x, + * y). The rectangle starts and ends in its lower left + * corner. If this function is called outside a path it will start a new path. + * If it is called within a path it will add the rectangle as a subpath. If + * the last drawing operation does not end in the lower left corner then there + * will be a gap in the path. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x x-coordinate of the lower left corner of the rectangle. + * @param float $y y-coordinate of the lower left corner of the rectangle. + * @param float $width The width of the image. + * @param float $height The height of the image. + * @throws PsException + * + */ +function ps_rect($psdoc, float $x, float $y, float $width, float $height): void +{ + error_clear_last(); + $result = \ps_rect($psdoc, $x, $y, $width, $height); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Restores a previously saved graphics context. Any call of + * ps_save must be accompanied by a call to + * ps_restore. All coordinate transformations, line + * style settings, color settings, etc. are being restored to the state + * before the call of ps_save. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_restore($psdoc): void +{ + error_clear_last(); + $result = \ps_restore($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the rotation of the coordinate system. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $rot Angle of rotation in degree. + * @throws PsException + * + */ +function ps_rotate($psdoc, float $rot): void +{ + error_clear_last(); + $result = \ps_rotate($psdoc, $rot); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Saves the current graphics context, containing colors, translation and + * rotation settings and some more. A saved context can be restored with + * ps_restore. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_save($psdoc): void +{ + error_clear_last(); + $result = \ps_save($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets horizontal and vertical scaling of the coordinate system. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x Scaling factor in horizontal direction. + * @param float $y Scaling factor in vertical direction. + * @throws PsException + * + */ +function ps_scale($psdoc, float $x, float $y): void +{ + error_clear_last(); + $result = \ps_scale($psdoc, $x, $y); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Links added with one of the functions ps_add_weblink, + * ps_add_pdflink, etc. will be displayed with a + * surounded rectangle when the postscript document is converted to + * pdf and viewed in a pdf viewer. This rectangle is not visible in + * the postscript document. + * This function sets the color of the rectangle's border line. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $red The red component of the border color. + * @param float $green The green component of the border color. + * @param float $blue The blue component of the border color. + * @throws PsException + * + */ +function ps_set_border_color($psdoc, float $red, float $green, float $blue): void +{ + error_clear_last(); + $result = \ps_set_border_color($psdoc, $red, $green, $blue); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Links added with one of the functions ps_add_weblink, + * ps_add_pdflink, etc. will be displayed with a + * surounded rectangle when the postscript document is converted to + * pdf and viewed in a pdf viewer. This rectangle is not visible in + * the postscript document. + * This function sets the length of the black and white portion of a + * dashed border line. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $black The length of the dash. + * @param float $white The length of the gap between dashes. + * @throws PsException + * + */ +function ps_set_border_dash($psdoc, float $black, float $white): void +{ + error_clear_last(); + $result = \ps_set_border_dash($psdoc, $black, $white); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Links added with one of the functions ps_add_weblink, + * ps_add_pdflink, etc. will be displayed with a + * surounded rectangle when the postscript document is converted to + * pdf and viewed in a pdf viewer. This rectangle is not visible in + * the postscript document. + * This function sets the appearance and width of the border line. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $style style can be solid or + * dashed. + * @param float $width The line width of the border. + * @throws PsException + * + */ +function ps_set_border_style($psdoc, string $style, float $width): void +{ + error_clear_last(); + $result = \ps_set_border_style($psdoc, $style, $width); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets certain information fields of the document. This fields will be shown + * as a comment in the header of the PostScript file. If the document is + * converted to pdf this fields will also be used for the document + * information. + * + * The BoundingBox is usually set to the value given to the + * first page. This only works if ps_findfont has not + * been called before. In such cases the BoundingBox would be left unset + * unless you set it explicitly with this function. + * + * This function will have no effect anymore when the header of the postscript + * file has been already written. It must be called before the first page + * or the first call of ps_findfont. + * + * @param resource $p Resource identifier of the postscript file + * as returned by ps_new. + * @param string $key The name of the information field to set. The values which can be + * set are Keywords, Subject, + * Title, Creator, + * Author, BoundingBox, and + * Orientation. Be aware that some of them has a + * meaning to PostScript viewers. + * @param string $val The value of the information field. The field + * Orientation can be set to either + * Portrait or Landscape. The + * BoundingBox is a string consisting of four numbers. + * The first two numbers are the coordinates of the lower left corner of + * the page. The last two numbers are the coordinates of the upper + * right corner. + * + * Up to version 0.2.6 of pslib, the BoundingBox and Orientation + * will be overwritten by ps_begin_page, + * unless ps_findfont has been called before. + * @throws PsException + * + */ +function ps_set_info($p, string $key, string $val): void +{ + error_clear_last(); + $result = \ps_set_info($p, $key, $val); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets several parameters which are used by many functions. Parameters are by + * definition string values. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $name For a list of possible names see ps_get_parameter. + * @param string $value The value of the parameter. + * @throws PsException + * + */ +function ps_set_parameter($psdoc, string $name, string $value): void +{ + error_clear_last(); + $result = \ps_set_parameter($psdoc, $name, $value); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Set the position for the next text output. You may alternatively set the x + * and y value separately by calling ps_set_value and + * choosing textx respectively texty as + * the value name. + * + * If you want to output text at a certain position it is more convenient + * to use ps_show_xy instead of setting the text position + * and calling ps_show. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x x-coordinate of the new text position. + * @param float $y y-coordinate of the new text position. + * @throws PsException + * + */ +function ps_set_text_pos($psdoc, float $x, float $y): void +{ + error_clear_last(); + $result = \ps_set_text_pos($psdoc, $x, $y); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets several values which are used by many functions. Parameters are by + * definition float values. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $name The name can be one of the following: + * + * + * textrendering + * + * + * The way how text is shown. + * + * + * + * + * textx + * + * + * The x coordinate for text output. + * + * + * + * + * texty + * + * + * The y coordinate for text output. + * + * + * + * + * wordspacing + * + * + * The distance between words relative to the width of a space. + * + * + * + * + * leading + * + * + * The distance between lines in pixels. + * + * + * + * + * + * The way how text is shown. + * + * The x coordinate for text output. + * + * The y coordinate for text output. + * + * The distance between words relative to the width of a space. + * + * The distance between lines in pixels. + * @param float $value The way how text is shown. + * @throws PsException + * + */ +function ps_set_value($psdoc, string $name, float $value): void +{ + error_clear_last(); + $result = \ps_set_value($psdoc, $name, $value); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the color for drawing, filling, or both. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $type The parameter type can be + * both, fill, or + * fillstroke. + * @param string $colorspace The colorspace should be one of gray, + * rgb, cmyk, + * spot, pattern. Depending on the + * colorspace either only the first, the first three or all parameters + * will be used. + * @param float $c1 Depending on the colorspace this is either the red component (rgb), + * the cyan component (cmyk), the gray value (gray), the identifier of + * the spot color or the identifier of the pattern. + * @param float $c2 Depending on the colorspace this is either the green component (rgb), + * the magenta component (cmyk). + * @param float $c3 Depending on the colorspace this is either the blue component (rgb), + * the yellow component (cmyk). + * @param float $c4 This must only be set in cmyk colorspace and specifies the black + * component. + * @throws PsException + * + */ +function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float $c2, float $c3, float $c4): void +{ + error_clear_last(); + $result = \ps_setcolor($psdoc, $type, $colorspace, $c1, $c2, $c3, $c4); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the length of the black and white portions of a dashed line. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $on The length of the dash. + * @param float $off The length of the gap between dashes. + * @throws PsException + * + */ +function ps_setdash($psdoc, float $on, float $off): void +{ + error_clear_last(); + $result = \ps_setdash($psdoc, $on, $off); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * This function is + * currently not documented; only its argument list is available. + * + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $value The value must be between 0.2 and 1. + * @throws PsException + * + */ +function ps_setflat($psdoc, float $value): void +{ + error_clear_last(); + $result = \ps_setflat($psdoc, $value); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets a font, which has to be loaded before with + * ps_findfont. Outputting text without setting a font + * results in an error. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $fontid The font identifier as returned by ps_findfont. + * @param float $size The size of the font. + * @throws PsException + * + */ +function ps_setfont($psdoc, int $fontid, float $size): void +{ + error_clear_last(); + $result = \ps_setfont($psdoc, $fontid, $size); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the gray value for all following drawing operations. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $gray The value must be between 0 (white) and 1 (black). + * @throws PsException + * + */ +function ps_setgray($psdoc, float $gray): void +{ + error_clear_last(); + $result = \ps_setgray($psdoc, $gray); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets how line ends look like. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $type The type of line ends. Possible values are + * PS_LINECAP_BUTT, + * PS_LINECAP_ROUND, or + * PS_LINECAP_SQUARED. + * @throws PsException + * + */ +function ps_setlinecap($psdoc, int $type): void +{ + error_clear_last(); + $result = \ps_setlinecap($psdoc, $type); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets how lines are joined. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $type The way lines are joined. Possible values are + * PS_LINEJOIN_MITER, + * PS_LINEJOIN_ROUND, or + * PS_LINEJOIN_BEVEL. + * @throws PsException + * + */ +function ps_setlinejoin($psdoc, int $type): void +{ + error_clear_last(); + $result = \ps_setlinejoin($psdoc, $type); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the line width for all following drawing operations. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $width The width of lines in points. + * @throws PsException + * + */ +function ps_setlinewidth($psdoc, float $width): void +{ + error_clear_last(); + $result = \ps_setlinewidth($psdoc, $width); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * If two lines join in a small angle and the line join is set to + * PS_LINEJOIN_MITER, then + * the resulting spike will be very long. The miter limit is the maximum + * ratio of the miter length (the length of the spike) and the line width. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $value The maximum ratio between the miter length and the line width. Larger + * values (> 10) will result in very long spikes when two lines meet + * in a small angle. Keep the default unless you know what you are doing. + * @throws PsException + * + */ +function ps_setmiterlimit($psdoc, float $value): void +{ + error_clear_last(); + $result = \ps_setmiterlimit($psdoc, $value); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * This function is + * currently not documented; only its argument list is available. + * + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $mode + * @throws PsException + * + */ +function ps_setoverprintmode($psdoc, int $mode): void +{ + error_clear_last(); + $result = \ps_setoverprintmode($psdoc, $mode); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets the length of the black and white portions of a dashed line. + * ps_setpolydash is used to set more complicated dash + * patterns. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $arr arr is a list of length elements alternately for + * the black and white portion. + * @throws PsException + * + */ +function ps_setpolydash($psdoc, float $arr): void +{ + error_clear_last(); + $result = \ps_setpolydash($psdoc, $arr); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Creates a pattern based on a shading, which has to be created before with + * ps_shading. Shading patterns can be used like regular + * patterns. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $shadingid The identifier of a shading previously created with + * ps_shading. + * @param string $optlist This argument is not currently used. + * @return int The identifier of the pattern. + * @throws PsException + * + */ +function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int +{ + error_clear_last(); + $result = \ps_shading_pattern($psdoc, $shadingid, $optlist); + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * Creates a shading, which can be used by ps_shfill or + * ps_shading_pattern. + * + * The color of the shading can be in any color space except for + * pattern. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $type The type of shading can be either radial or + * axial. Each shading starts with the current fill + * color and ends with the given color values passed in the parameters + * c1 to c4 + * (see ps_setcolor for their meaning). + * @param float $x0 The coordinates x0, y0, + * x1, y1 are the start and + * end point of the shading. If the type of shading is + * radial the two points are the middle points of + * a starting and ending circle. + * @param float $y0 See ps_setcolor for their meaning. + * @param float $x1 If the shading is of type radial the + * optlist must also contain the parameters + * r0 and r1 with the radius of the + * start and end circle. + * @param float $y1 + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 + * @param string $optlist + * @return int Returns the identifier of the pattern. + * @throws PsException + * + */ +function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float $y1, float $c1, float $c2, float $c3, float $c4, string $optlist): int +{ + error_clear_last(); + $result = \ps_shading($psdoc, $type, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist); + if ($result === false) { + throw PsException::createFromPhpError(); + } + return $result; +} + + +/** + * Fills an area with a shading, which has to be created before with + * ps_shading. This is an alternative way to creating + * a pattern from a shading ps_shading_pattern and using + * the pattern as the filling color. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $shadingid The identifier of a shading previously created with + * ps_shading. + * @throws PsException + * + */ +function ps_shfill($psdoc, int $shadingid): void +{ + error_clear_last(); + $result = \ps_shfill($psdoc, $shadingid); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Output a text at the given text position. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $text The text to be output. + * @param float $x x-coordinate of the lower left corner of the box surrounding the text. + * @param float $y y-coordinate of the lower left corner of the box surrounding the text. + * @throws PsException + * + */ +function ps_show_xy($psdoc, string $text, float $x, float $y): void +{ + error_clear_last(); + $result = \ps_show_xy($psdoc, $text, $x, $y); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * This function is + * currently not documented; only its argument list is available. + * + * + * @param resource $psdoc + * @param string $text + * @param int $len + * @param float $xcoor + * @param float $ycoor + * @throws PsException + * + */ +function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor): void +{ + error_clear_last(); + $result = \ps_show_xy2($psdoc, $text, $len, $xcoor, $ycoor); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Output a text at the current text position. The text position can be set + * by storing the x and y coordinates into the values textx + * and texty with the function + * ps_set_value. The function will issue an + * error if a font was not set before with ps_setfont. + * + * ps_show evaluates the following parameters and values + * as set by ps_set_parameter and + * ps_set_value. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $text The text to be output. + * @throws PsException + * + */ +function ps_show($psdoc, string $text): void +{ + error_clear_last(); + $result = \ps_show($psdoc, $text); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Output text at the current position. Do not print more than len characters. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param string $text The text to be output. + * @param int $len The maximum number of characters to print. + * @throws PsException + * + */ +function ps_show2($psdoc, string $text, int $len): void +{ + error_clear_last(); + $result = \ps_show2($psdoc, $text, $len); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Draws the path constructed with previously called drawing functions like + * ps_lineto. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @throws PsException + * + */ +function ps_stroke($psdoc): void +{ + error_clear_last(); + $result = \ps_stroke($psdoc); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Output the glyph at position ord in the font + * encoding vector of the current font. The font encoding for a font can be + * set when loading the font with ps_findfont. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param int $ord The position of the glyph in the font encoding vector. + * @throws PsException + * + */ +function ps_symbol($psdoc, int $ord): void +{ + error_clear_last(); + $result = \ps_symbol($psdoc, $ord); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} + + +/** + * Sets a new initial point of the coordinate system. + * + * @param resource $psdoc Resource identifier of the postscript file + * as returned by ps_new. + * @param float $x x-coordinate of the origin of the translated coordinate system. + * @param float $y y-coordinate of the origin of the translated coordinate system. + * @throws PsException + * + */ +function ps_translate($psdoc, float $x, float $y): void +{ + error_clear_last(); + $result = \ps_translate($psdoc, $x, $y); + if ($result === false) { + throw PsException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/pspell.php b/vendor/thecodingmachine/safe/generated/pspell.php new file mode 100644 index 000000000..4cf4c36a6 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/pspell.php @@ -0,0 +1,451 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\PspellException; + +/** + * + * + * @param int $dictionary_link + * @param string $word The added word. + * @throws PspellException + * + */ +function pspell_add_to_personal(int $dictionary_link, string $word): void +{ + error_clear_last(); + $result = \pspell_add_to_personal($dictionary_link, $word); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $dictionary_link + * @param string $word The added word. + * @throws PspellException + * + */ +function pspell_add_to_session(int $dictionary_link, string $word): void +{ + error_clear_last(); + $result = \pspell_add_to_session($dictionary_link, $word); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $dictionary_link + * @throws PspellException + * + */ +function pspell_clear_session(int $dictionary_link): void +{ + error_clear_last(); + $result = \pspell_clear_session($dictionary_link); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * Create a config used to open a dictionary. + * + * pspell_config_create has a very similar syntax to + * pspell_new. In fact, using + * pspell_config_create immediately followed by + * pspell_new_config will produce the exact same result. + * However, after creating a new config, you can also use + * pspell_config_* functions before calling + * pspell_new_config to take advantage of some + * advanced functionality. + * + * For more information and examples, check out inline manual pspell + * website:http://aspell.net/. + * + * @param string $language The language parameter is the language code which consists of the + * two letter ISO 639 language code and an optional two letter ISO + * 3166 country code after a dash or underscore. + * @param string $spelling The spelling parameter is the requested spelling for languages + * with more than one spelling such as English. Known values are + * 'american', 'british', and 'canadian'. + * @param string $jargon The jargon parameter contains extra information to distinguish + * two different words lists that have the same language and + * spelling parameters. + * @param string $encoding The encoding parameter is the encoding that words are expected to + * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', + * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned + * 32'. This parameter is largely untested, so be careful when + * using. + * @return int Returns a pspell config identifier. + * @throws PspellException + * + */ +function pspell_config_create(string $language, string $spelling = null, string $jargon = null, string $encoding = null): int +{ + error_clear_last(); + if ($encoding !== null) { + $result = \pspell_config_create($language, $spelling, $jargon, $encoding); + } elseif ($jargon !== null) { + $result = \pspell_config_create($language, $spelling, $jargon); + } elseif ($spelling !== null) { + $result = \pspell_config_create($language, $spelling); + } else { + $result = \pspell_config_create($language); + } + if ($result === false) { + throw PspellException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is + * currently not documented; only its argument list is available. + * + * + * @param int $conf + * @param string $directory + * @throws PspellException + * + */ +function pspell_config_data_dir(int $conf, string $directory): void +{ + error_clear_last(); + $result = \pspell_config_data_dir($conf, $directory); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * This function is + * currently not documented; only its argument list is available. + * + * + * @param int $conf + * @param string $directory + * @throws PspellException + * + */ +function pspell_config_dict_dir(int $conf, string $directory): void +{ + error_clear_last(); + $result = \pspell_config_dict_dir($conf, $directory); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $dictionary_link + * @param int $n Words less than n characters will be skipped. + * @throws PspellException + * + */ +function pspell_config_ignore(int $dictionary_link, int $n): void +{ + error_clear_last(); + $result = \pspell_config_ignore($dictionary_link, $n); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $dictionary_link + * @param int $mode The mode parameter is the mode in which spellchecker will work. + * There are several modes available: + * + * + * + * PSPELL_FAST - Fast mode (least number of + * suggestions) + * + * + * + * + * PSPELL_NORMAL - Normal mode (more suggestions) + * + * + * + * + * PSPELL_BAD_SPELLERS - Slow mode (a lot of + * suggestions) + * + * + * + * @throws PspellException + * + */ +function pspell_config_mode(int $dictionary_link, int $mode): void +{ + error_clear_last(); + $result = \pspell_config_mode($dictionary_link, $mode); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * Set a file that contains personal wordlist. The personal wordlist will be + * loaded and used in addition to the standard one after you call + * pspell_new_config. The file is also the file where + * pspell_save_wordlist will save personal wordlist to. + * + * pspell_config_personal should be used on a config + * before calling pspell_new_config. + * + * @param int $dictionary_link + * @param string $file The personal wordlist. If the file does not exist, it will be created. + * The file should be writable by whoever PHP runs as (e.g. nobody). + * @throws PspellException + * + */ +function pspell_config_personal(int $dictionary_link, string $file): void +{ + error_clear_last(); + $result = \pspell_config_personal($dictionary_link, $file); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * Set a file that contains replacement pairs. + * + * The replacement pairs improve the quality of the spellchecker. When a word + * is misspelled, and a proper suggestion was not found in the list, + * pspell_store_replacement can be used to store a + * replacement pair and then pspell_save_wordlist to + * save the wordlist along with the replacement pairs. + * + * pspell_config_repl should be used on a config + * before calling pspell_new_config. + * + * @param int $dictionary_link + * @param string $file The file should be writable by whoever PHP runs as (e.g. nobody). + * @throws PspellException + * + */ +function pspell_config_repl(int $dictionary_link, string $file): void +{ + error_clear_last(); + $result = \pspell_config_repl($dictionary_link, $file); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * This function determines whether run-together words will be treated as + * legal compounds. That is, "thecat" will be a legal compound, although + * there should be a space between the two words. Changing this setting only + * affects the results returned by pspell_check; + * pspell_suggest will still return suggestions. + * + * pspell_config_runtogether should be used on a config + * before calling pspell_new_config. + * + * @param int $dictionary_link + * @param bool $flag TRUE if run-together words should be treated as legal compounds, + * FALSE otherwise. + * @throws PspellException + * + */ +function pspell_config_runtogether(int $dictionary_link, bool $flag): void +{ + error_clear_last(); + $result = \pspell_config_runtogether($dictionary_link, $flag); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * pspell_config_save_repl determines whether + * pspell_save_wordlist will save the replacement pairs + * along with the wordlist. Usually there is no need to use this function + * because if pspell_config_repl is used, the + * replacement pairs will be saved by + * pspell_save_wordlist anyway, and if it is not, + * the replacement pairs will not be saved. + * + * pspell_config_save_repl should be used on a config + * before calling pspell_new_config. + * + * @param int $dictionary_link + * @param bool $flag TRUE if replacement pairs should be saved, FALSE otherwise. + * @throws PspellException + * + */ +function pspell_config_save_repl(int $dictionary_link, bool $flag): void +{ + error_clear_last(); + $result = \pspell_config_save_repl($dictionary_link, $flag); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $config The config parameter is the one returned by + * pspell_config_create when the config was created. + * @return int Returns a dictionary link identifier on success. + * @throws PspellException + * + */ +function pspell_new_config(int $config): int +{ + error_clear_last(); + $result = \pspell_new_config($config); + if ($result === false) { + throw PspellException::createFromPhpError(); + } + return $result; +} + + +/** + * pspell_new opens up a new dictionary and + * returns the dictionary link identifier for use in other pspell + * functions. + * + * For more information and examples, check out inline manual pspell + * website:http://aspell.net/. + * + * @param string $language The language parameter is the language code which consists of the + * two letter ISO 639 language code and an optional two letter ISO + * 3166 country code after a dash or underscore. + * @param string $spelling The spelling parameter is the requested spelling for languages + * with more than one spelling such as English. Known values are + * 'american', 'british', and 'canadian'. + * @param string $jargon The jargon parameter contains extra information to distinguish + * two different words lists that have the same language and + * spelling parameters. + * @param string $encoding The encoding parameter is the encoding that words are expected to + * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', + * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned + * 32'. This parameter is largely untested, so be careful when + * using. + * @param int $mode The mode parameter is the mode in which spellchecker will work. + * There are several modes available: + * + * + * + * PSPELL_FAST - Fast mode (least number of + * suggestions) + * + * + * + * + * PSPELL_NORMAL - Normal mode (more suggestions) + * + * + * + * + * PSPELL_BAD_SPELLERS - Slow mode (a lot of + * suggestions) + * + * + * + * + * PSPELL_RUN_TOGETHER - Consider run-together words + * as legal compounds. That is, "thecat" will be a legal compound, + * although there should be a space between the two words. Changing this + * setting only affects the results returned by + * pspell_check; pspell_suggest + * will still return suggestions. + * + * + * + * Mode is a bitmask constructed from different constants listed above. + * However, PSPELL_FAST, + * PSPELL_NORMAL and + * PSPELL_BAD_SPELLERS are mutually exclusive, so you + * should select only one of them. + * @return int Returns the dictionary link identifier on success. + * @throws PspellException + * + */ +function pspell_new(string $language, string $spelling = null, string $jargon = null, string $encoding = null, int $mode = 0): int +{ + error_clear_last(); + if ($mode !== 0) { + $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode); + } elseif ($encoding !== null) { + $result = \pspell_new($language, $spelling, $jargon, $encoding); + } elseif ($jargon !== null) { + $result = \pspell_new($language, $spelling, $jargon); + } elseif ($spelling !== null) { + $result = \pspell_new($language, $spelling); + } else { + $result = \pspell_new($language); + } + if ($result === false) { + throw PspellException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param int $dictionary_link A dictionary link identifier opened with + * pspell_new_personal. + * @throws PspellException + * + */ +function pspell_save_wordlist(int $dictionary_link): void +{ + error_clear_last(); + $result = \pspell_save_wordlist($dictionary_link); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $dictionary_link A dictionary link identifier, opened with + * pspell_new_personal + * @param string $misspelled The misspelled word. + * @param string $correct The fixed spelling for the misspelled word. + * @throws PspellException + * + */ +function pspell_store_replacement(int $dictionary_link, string $misspelled, string $correct): void +{ + error_clear_last(); + $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct); + if ($result === false) { + throw PspellException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/readline.php b/vendor/thecodingmachine/safe/generated/readline.php new file mode 100644 index 000000000..a1c52c755 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/readline.php @@ -0,0 +1,157 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ReadlineException; + +/** + * This function adds a line to the command line history. + * + * @param string $line The line to be added in the history. + * @throws ReadlineException + * + */ +function readline_add_history(string $line): void +{ + error_clear_last(); + $result = \readline_add_history($line); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * Sets up a readline callback interface then prints + * prompt and immediately returns. + * Calling this function twice without removing the previous + * callback interface will automatically and conveniently overwrite the old + * interface. + * + * The callback feature is useful when combined with + * stream_select as it allows interleaving of IO and + * user input, unlike readline. + * + * + * Readline Callback Interface Example + * + * 10) { + * $prompting = false; + * readline_callback_handler_remove(); + * } else { + * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback'); + * } + * } + * + * $c = 1; + * $prompting = true; + * + * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback'); + * + * while ($prompting) { + * $w = NULL; + * $e = NULL; + * $n = stream_select($r = array(STDIN), $w, $e, null); + * if ($n && in_array(STDIN, $r)) { + * // read a character, will call the callback when a newline is entered + * readline_callback_read_char(); + * } + * } + * + * echo "Prompting disabled. All done.\n"; + * ?> + * ]]> + * + * + * + * @param string $prompt The prompt message. + * @param callable $callback The callback function takes one parameter; the + * user input returned. + * @throws ReadlineException + * + */ +function readline_callback_handler_install(string $prompt, callable $callback): void +{ + error_clear_last(); + $result = \readline_callback_handler_install($prompt, $callback); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function clears the entire command line history. + * + * @throws ReadlineException + * + */ +function readline_clear_history(): void +{ + error_clear_last(); + $result = \readline_clear_history(); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function registers a completion function. This is the same kind of + * functionality you'd get if you hit your tab key while using Bash. + * + * @param callable $function You must supply the name of an existing function which accepts a + * partial command line and returns an array of possible matches. + * @throws ReadlineException + * + */ +function readline_completion_function(callable $function): void +{ + error_clear_last(); + $result = \readline_completion_function($function); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function reads a command history from a file. + * + * @param string $filename Path to the filename containing the command history. + * @throws ReadlineException + * + */ +function readline_read_history(string $filename = null): void +{ + error_clear_last(); + if ($filename !== null) { + $result = \readline_read_history($filename); + } else { + $result = \readline_read_history(); + } + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function writes the command history to a file. + * + * @param string $filename Path to the saved file. + * @throws ReadlineException + * + */ +function readline_write_history(string $filename = null): void +{ + error_clear_last(); + if ($filename !== null) { + $result = \readline_write_history($filename); + } else { + $result = \readline_write_history(); + } + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/rpminfo.php b/vendor/thecodingmachine/safe/generated/rpminfo.php new file mode 100644 index 000000000..44de1ce23 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/rpminfo.php @@ -0,0 +1,21 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\RpminfoException; + +/** + * Add an additional retrieved tag in subsequent queries. + * + * @param int $tag One of RPMTAG_* constant, see the rpminfo constants page. + * @throws RpminfoException + * + */ +function rpmaddtag(int $tag): void +{ + error_clear_last(); + $result = \rpmaddtag($tag); + if ($result === false) { + throw RpminfoException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/rrd.php b/vendor/thecodingmachine/safe/generated/rrd.php new file mode 100644 index 000000000..9bb3b5c52 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/rrd.php @@ -0,0 +1,23 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\RrdException; + +/** + * Creates the rdd database file. + * + * @param string $filename Filename for newly created rrd file. + * @param array $options Options for rrd create - list of strings. See man page of rrd create + * for whole list of options. + * @throws RrdException + * + */ +function rrd_create(string $filename, array $options): void +{ + error_clear_last(); + $result = \rrd_create($filename, $options); + if ($result === false) { + throw RrdException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/sem.php b/vendor/thecodingmachine/safe/generated/sem.php new file mode 100644 index 000000000..739e8b389 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/sem.php @@ -0,0 +1,367 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SemException; + +/** + * Checks whether the message queue key exists. + * + * @param int $key Queue key. + * @throws SemException + * + */ +function msg_queue_exists(int $key): void +{ + error_clear_last(); + $result = \msg_queue_exists($key); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * msg_receive will receive the first message from the + * specified queue of the type specified by + * desiredmsgtype. + * + * @param resource $queue Message queue resource handle + * @param int $desiredmsgtype If desiredmsgtype is 0, the message from the front + * of the queue is returned. If desiredmsgtype is + * greater than 0, then the first message of that type is returned. + * If desiredmsgtype is less than 0, the first + * message on the queue with a type less than or equal to the + * absolute value of desiredmsgtype will be read. + * If no messages match the criteria, your script will wait until a suitable + * message arrives on the queue. You can prevent the script from blocking + * by specifying MSG_IPC_NOWAIT in the + * flags parameter. + * @param int|null $msgtype The type of the message that was received will be stored in this + * parameter. + * @param int $maxsize The maximum size of message to be accepted is specified by the + * maxsize; if the message in the queue is larger + * than this size the function will fail (unless you set + * flags as described below). + * @param mixed $message The received message will be stored in message, + * unless there were errors receiving the message. + * @param bool $unserialize If set to + * TRUE, the message is treated as though it was serialized using the + * same mechanism as the session module. The message will be unserialized + * and then returned to your script. This allows you to easily receive + * arrays or complex object structures from other PHP scripts, or if you + * are using the WDDX serializer, from any WDDX compatible source. + * + * If unserialize is FALSE, the message will be + * returned as a binary-safe string. + * @param int $flags The optional flags allows you to pass flags to the + * low-level msgrcv system call. It defaults to 0, but you may specify one + * or more of the following values (by adding or ORing them together). + * + * Flag values for msg_receive + * + * + * + * MSG_IPC_NOWAIT + * If there are no messages of the + * desiredmsgtype, return immediately and do not + * wait. The function will fail and return an integer value + * corresponding to MSG_ENOMSG. + * + * + * + * MSG_EXCEPT + * Using this flag in combination with a + * desiredmsgtype greater than 0 will cause the + * function to receive the first message that is not equal to + * desiredmsgtype. + * + * + * MSG_NOERROR + * + * If the message is longer than maxsize, + * setting this flag will truncate the message to + * maxsize and will not signal an error. + * + * + * + * + * + * @param int|null $errorcode If the function fails, the optional errorcode + * will be set to the value of the system errno variable. + * @throws SemException + * + */ +function msg_receive($queue, int $desiredmsgtype, ?int &$msgtype, int $maxsize, &$message, bool $unserialize = true, int $flags = 0, ?int &$errorcode = null): void +{ + error_clear_last(); + $result = \msg_receive($queue, $desiredmsgtype, $msgtype, $maxsize, $message, $unserialize, $flags, $errorcode); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * msg_remove_queue destroys the message queue specified + * by the queue. Only use this function when all + * processes have finished working with the message queue and you need to + * release the system resources held by it. + * + * @param resource $queue Message queue resource handle + * @throws SemException + * + */ +function msg_remove_queue($queue): void +{ + error_clear_last(); + $result = \msg_remove_queue($queue); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * msg_send sends a message of type + * msgtype (which MUST be greater than 0) to + * the message queue specified by queue. + * + * @param resource $queue Message queue resource handle + * @param int $msgtype The type of the message (MUST be greater than 0) + * @param mixed $message The body of the message. + * + * If serialize set to FALSE is supplied, + * MUST be of type: string, integer, float + * or bool. In other case a warning will be issued. + * @param bool $serialize The optional serialize controls how the + * message is sent. serialize + * defaults to TRUE which means that the message is + * serialized using the same mechanism as the session module before being + * sent to the queue. This allows complex arrays and objects to be sent to + * other PHP scripts, or if you are using the WDDX serializer, to any WDDX + * compatible client. + * @param bool $blocking If the message is too large to fit in the queue, your script will wait + * until another process reads messages from the queue and frees enough + * space for your message to be sent. + * This is called blocking; you can prevent blocking by setting the + * optional blocking parameter to FALSE, in which + * case msg_send will immediately return FALSE if the + * message is too big for the queue, and set the optional + * errorcode to MSG_EAGAIN, + * indicating that you should try to send your message again a little + * later on. + * @param int|null $errorcode If the function fails, the optional errorcode will be set to the value of the system errno variable. + * @throws SemException + * + */ +function msg_send($queue, int $msgtype, $message, bool $serialize = true, bool $blocking = true, ?int &$errorcode = null): void +{ + error_clear_last(); + $result = \msg_send($queue, $msgtype, $message, $serialize, $blocking, $errorcode); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * msg_set_queue allows you to change the values of the + * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the + * underlying message queue data structure. + * + * Changing the data structure will require that PHP be running as the same + * user that created the queue, owns the queue (as determined by the + * existing msg_perm.xxx fields), or be running with root privileges. + * root privileges are required to raise the msg_qbytes values above the + * system defined limit. + * + * @param resource $queue Message queue resource handle + * @param array $data You specify the values you require by setting the value of the keys + * that you require in the data array. + * @throws SemException + * + */ +function msg_set_queue($queue, array $data): void +{ + error_clear_last(); + $result = \msg_set_queue($queue, $data); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * sem_acquire by default blocks (if necessary) until the + * semaphore can be acquired. A process attempting to acquire a semaphore which + * it has already acquired will block forever if acquiring the semaphore would + * cause its maximum number of semaphore to be exceeded. + * + * After processing a request, any semaphores acquired by the process but not + * explicitly released will be released automatically and a warning will be + * generated. + * + * @param resource $sem_identifier sem_identifier is a semaphore resource, + * obtained from sem_get. + * @param bool $nowait Specifies if the process shouldn't wait for the semaphore to be acquired. + * If set to true, the call will return + * false immediately if a semaphore cannot be immediately + * acquired. + * @throws SemException + * + */ +function sem_acquire($sem_identifier, bool $nowait = false): void +{ + error_clear_last(); + $result = \sem_acquire($sem_identifier, $nowait); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * sem_get returns an id that can be used to + * access the System V semaphore with the given key. + * + * A second call to sem_get for the same key + * will return a different semaphore identifier, but both + * identifiers access the same underlying semaphore. + * + * If key is 0, a new private semaphore + * is created for each call to sem_get. + * + * @param int $key + * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously + * is set to max_acquire. + * @param int $perm The semaphore permissions. Actually this value is + * set only if the process finds it is the only process currently + * attached to the semaphore. + * @param int $auto_release Specifies if the semaphore should be automatically released on request + * shutdown. + * @return resource Returns a positive semaphore identifier on success. + * @throws SemException + * + */ +function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1) +{ + error_clear_last(); + $result = \sem_get($key, $max_acquire, $perm, $auto_release); + if ($result === false) { + throw SemException::createFromPhpError(); + } + return $result; +} + + +/** + * sem_release releases the semaphore if it + * is currently acquired by the calling process, otherwise + * a warning is generated. + * + * After releasing the semaphore, sem_acquire + * may be called to re-acquire it. + * + * @param resource $sem_identifier A Semaphore resource handle as returned by + * sem_get. + * @throws SemException + * + */ +function sem_release($sem_identifier): void +{ + error_clear_last(); + $result = \sem_release($sem_identifier); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * sem_remove removes the given semaphore. + * + * After removing the semaphore, it is no longer accessible. + * + * @param resource $sem_identifier A semaphore resource identifier as returned + * by sem_get. + * @throws SemException + * + */ +function sem_remove($sem_identifier): void +{ + error_clear_last(); + $result = \sem_remove($sem_identifier); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * shm_put_var inserts or updates the + * variable with the given + * variable_key. + * + * Warnings (E_WARNING level) will be issued if + * shm_identifier is not a valid SysV shared memory + * index or if there was not enough shared memory remaining to complete your + * request. + * + * @param resource $shm_identifier A shared memory resource handle as returned by + * shm_attach + * @param int $variable_key The variable key. + * @param mixed $variable The variable. All variable types + * that serialize supports may be used: generally + * this means all types except for resources and some internal objects + * that cannot be serialized. + * @throws SemException + * + */ +function shm_put_var($shm_identifier, int $variable_key, $variable): void +{ + error_clear_last(); + $result = \shm_put_var($shm_identifier, $variable_key, $variable); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * Removes a variable with a given variable_key + * and frees the occupied memory. + * + * @param resource $shm_identifier The shared memory identifier as returned by + * shm_attach + * @param int $variable_key The variable key. + * @throws SemException + * + */ +function shm_remove_var($shm_identifier, int $variable_key): void +{ + error_clear_last(); + $result = \shm_remove_var($shm_identifier, $variable_key); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} + + +/** + * shm_remove removes the shared memory + * shm_identifier. All data will be destroyed. + * + * @param resource $shm_identifier The shared memory identifier as returned by + * shm_attach + * @throws SemException + * + */ +function shm_remove($shm_identifier): void +{ + error_clear_last(); + $result = \shm_remove($shm_identifier); + if ($result === false) { + throw SemException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/session.php b/vendor/thecodingmachine/safe/generated/session.php new file mode 100644 index 000000000..7b8c9478d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/session.php @@ -0,0 +1,153 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SessionException; + +/** + * session_abort finishes session without saving + * data. Thus the original values in session data are kept. + * + * @throws SessionException + * + */ +function session_abort(): void +{ + error_clear_last(); + $result = \session_abort(); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} + + +/** + * session_decode decodes the serialized session data provided in + * $data, and populates the $_SESSION superglobal + * with the result. + * + * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. + * The serialization method can be set using session.serialize_handler. + * + * @param string $data The encoded data to be stored. + * @throws SessionException + * + */ +function session_decode(string $data): void +{ + error_clear_last(); + $result = \session_decode($data); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} + + +/** + * In order to kill the session altogether, the + * session ID must also be unset. If a cookie is used to propagate the + * session ID (default behavior), then the session cookie must be deleted. + * setcookie may be used for that. + * + * When session.use_strict_mode + * is enabled. You do not have to remove obsolete session ID cookie because + * session module will not accept session ID cookie when there is no + * data associated to the session ID and set new session ID cookie. + * Enabling session.use_strict_mode + * is recommended for all sites. + * + * @throws SessionException + * + */ +function session_destroy(): void +{ + error_clear_last(); + $result = \session_destroy(); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} + + +/** + * session_regenerate_id will replace the current + * session id with a new one, and keep the current session information. + * + * When session.use_trans_sid + * is enabled, output must be started after session_regenerate_id + * call. Otherwise, old session ID is used. + * + * @param bool $delete_old_session Whether to delete the old associated session file or not. + * You should not delete old session if you need to avoid + * races caused by deletion or detect/avoid session hijack + * attacks. + * @throws SessionException + * + */ +function session_regenerate_id(bool $delete_old_session = false): void +{ + error_clear_last(); + $result = \session_regenerate_id($delete_old_session); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} + + +/** + * session_reset reinitializes a session with + * original values stored in session storage. This function requires an active session and + * discards changes in $_SESSION. + * + * @throws SessionException + * + */ +function session_reset(): void +{ + error_clear_last(); + $result = \session_reset(); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} + + +/** + * The session_unset function frees all session variables + * currently registered. + * + * @throws SessionException + * + */ +function session_unset(): void +{ + error_clear_last(); + $result = \session_unset(); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} + + +/** + * End the current session and store session data. + * + * Session data is usually stored after your script terminated without the + * need to call session_write_close, but as session data + * is locked to prevent concurrent writes only one script may operate on a + * session at any time. When using framesets together with sessions you will + * experience the frames loading one by one due to this locking. You can + * reduce the time needed to load all the frames by ending the session as + * soon as all changes to session variables are done. + * + * @throws SessionException + * + */ +function session_write_close(): void +{ + error_clear_last(); + $result = \session_write_close(); + if ($result === false) { + throw SessionException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/shmop.php b/vendor/thecodingmachine/safe/generated/shmop.php new file mode 100644 index 000000000..04ba57cb5 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/shmop.php @@ -0,0 +1,68 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ShmopException; + +/** + * shmop_delete is used to delete a shared memory block. + * + * @param resource $shmid The shared memory block resource created by + * shmop_open + * @throws ShmopException + * + */ +function shmop_delete($shmid): void +{ + error_clear_last(); + $result = \shmop_delete($shmid); + if ($result === false) { + throw ShmopException::createFromPhpError(); + } +} + + +/** + * shmop_read will read a string from shared memory block. + * + * @param resource $shmid The shared memory block identifier created by + * shmop_open + * @param int $start Offset from which to start reading + * @param int $count The number of bytes to read. + * 0 reads shmop_size($shmid) - $start bytes. + * @return string Returns the data. + * @throws ShmopException + * + */ +function shmop_read($shmid, int $start, int $count): string +{ + error_clear_last(); + $result = \shmop_read($shmid, $start, $count); + if ($result === false) { + throw ShmopException::createFromPhpError(); + } + return $result; +} + + +/** + * shmop_write will write a string into shared memory block. + * + * @param resource $shmid The shared memory block identifier created by + * shmop_open + * @param string $data A string to write into shared memory block + * @param int $offset Specifies where to start writing data inside the shared memory + * segment. + * @return int The size of the written data. + * @throws ShmopException + * + */ +function shmop_write($shmid, string $data, int $offset): int +{ + error_clear_last(); + $result = \shmop_write($shmid, $data, $offset); + if ($result === false) { + throw ShmopException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/simplexml.php b/vendor/thecodingmachine/safe/generated/simplexml.php new file mode 100644 index 000000000..118de4432 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/simplexml.php @@ -0,0 +1,94 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SimplexmlException; + +/** + * This function takes a node of a DOM + * document and makes it into a SimpleXML node. This new object can + * then be used as a native SimpleXML element. + * + * @param \DOMNode $node A DOM Element node + * @param string $class_name You may use this optional parameter so that + * simplexml_import_dom will return an object of + * the specified class. That class should extend the + * SimpleXMLElement class. + * @return \SimpleXMLElement Returns a SimpleXMLElement. + * @throws SimplexmlException + * + */ +function simplexml_import_dom(\DOMNode $node, string $class_name = "SimpleXMLElement"): \SimpleXMLElement +{ + error_clear_last(); + $result = \simplexml_import_dom($node, $class_name); + if ($result === false) { + throw SimplexmlException::createFromPhpError(); + } + return $result; +} + + +/** + * Convert the well-formed XML document in the given file to an object. + * + * @param string $filename Path to the XML file + * + * Libxml 2 unescapes the URI, so if you want to pass e.g. + * b&c as the URI parameter a, + * you have to call + * simplexml_load_file(rawurlencode('http://example.com/?a=' . + * urlencode('b&c'))). Since PHP 5.1.0 you don't need to do + * this because PHP will do it for you. + * @param string $class_name You may use this optional parameter so that + * simplexml_load_file will return an object of + * the specified class. That class should extend the + * SimpleXMLElement class. + * @param int $options Since PHP 5.1.0 and Libxml 2.6.0, you may also use the + * options parameter to specify additional Libxml parameters. + * @param string $ns Namespace prefix or URI. + * @param bool $is_prefix TRUE if ns is a prefix, FALSE if it's a URI; + * defaults to FALSE. + * @return \SimpleXMLElement Returns an object of class SimpleXMLElement with + * properties containing the data held within the XML document. + * @throws SimplexmlException + * + */ +function simplexml_load_file(string $filename, string $class_name = "SimpleXMLElement", int $options = 0, string $ns = "", bool $is_prefix = false): \SimpleXMLElement +{ + error_clear_last(); + $result = \simplexml_load_file($filename, $class_name, $options, $ns, $is_prefix); + if ($result === false) { + throw SimplexmlException::createFromPhpError(); + } + return $result; +} + + +/** + * Takes a well-formed XML string and returns it as an object. + * + * @param string $data A well-formed XML string + * @param string $class_name You may use this optional parameter so that + * simplexml_load_string will return an object of + * the specified class. That class should extend the + * SimpleXMLElement class. + * @param int $options Since PHP 5.1.0 and Libxml 2.6.0, you may also use the + * options parameter to specify additional Libxml parameters. + * @param string $ns Namespace prefix or URI. + * @param bool $is_prefix TRUE if ns is a prefix, FALSE if it's a URI; + * defaults to FALSE. + * @return \SimpleXMLElement Returns an object of class SimpleXMLElement with + * properties containing the data held within the xml document. + * @throws SimplexmlException + * + */ +function simplexml_load_string(string $data, string $class_name = "SimpleXMLElement", int $options = 0, string $ns = "", bool $is_prefix = false): \SimpleXMLElement +{ + error_clear_last(); + $result = \simplexml_load_string($data, $class_name, $options, $ns, $is_prefix); + if ($result === false) { + throw SimplexmlException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/sockets.php b/vendor/thecodingmachine/safe/generated/sockets.php new file mode 100644 index 000000000..d6cc892b4 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/sockets.php @@ -0,0 +1,813 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SocketsException; + +/** + * After the socket socket has been created + * using socket_create, bound to a name with + * socket_bind, and told to listen for connections + * with socket_listen, this function will accept + * incoming connections on that socket. Once a successful connection + * is made, a new socket resource is returned, which may be used + * for communication. If there are multiple connections queued on + * the socket, the first will be used. If there are no pending + * connections, socket_accept will block until + * a connection becomes present. If socket + * has been made non-blocking using + * socket_set_blocking or + * socket_set_nonblock, FALSE will be returned. + * + * The socket resource returned by + * socket_accept may not be used to accept new + * connections. The original listening socket + * socket, however, remains open and may be + * reused. + * + * @param resource $socket A valid socket resource created with socket_create. + * @return resource Returns a new socket resource on success. The actual + * error code can be retrieved by calling + * socket_last_error. This error code may be passed to + * socket_strerror to get a textual explanation of the + * error. + * @throws SocketsException + * + */ +function socket_accept($socket) +{ + error_clear_last(); + $result = \socket_accept($socket); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * Create a Socket resource, and bind it to the provided AddrInfo resource. The return + * value of this function may be used with socket_listen. + * + * @param resource $addr Resource created from socket_addrinfo_lookup. + * @return resource Returns a Socket resource on success. + * @throws SocketsException + * + */ +function socket_addrinfo_bind($addr) +{ + error_clear_last(); + $result = \socket_addrinfo_bind($addr); + if ($result === null) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * Create a Socket resource, and connect it to the provided AddrInfo resource. The return + * value of this function may be used with the rest of the socket functions. + * + * @param resource $addr Resource created from socket_addrinfo_lookup + * @return resource Returns a Socket resource on success. + * @throws SocketsException + * + */ +function socket_addrinfo_connect($addr) +{ + error_clear_last(); + $result = \socket_addrinfo_connect($addr); + if ($result === null) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * Binds the name given in address to the socket + * described by socket. This has to be done before + * a connection is be established using socket_connect + * or socket_listen. + * + * @param resource $socket A valid socket resource created with socket_create. + * @param string $address If the socket is of the AF_INET family, the + * address is an IP in dotted-quad notation + * (e.g. 127.0.0.1). + * + * If the socket is of the AF_UNIX family, the + * address is the path of a + * Unix-domain socket (e.g. /tmp/my.sock). + * @param int $port The port parameter is only used when + * binding an AF_INET socket, and designates + * the port on which to listen for connections. + * @throws SocketsException + * + */ +function socket_bind($socket, string $address, int $port = 0): void +{ + error_clear_last(); + $result = \socket_bind($socket, $address, $port); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * Initiate a connection to address using the socket resource + * socket, which must be a valid socket + * resource created with socket_create. + * + * @param resource $socket + * @param string $address The address parameter is either an IPv4 address + * in dotted-quad notation (e.g. 127.0.0.1) if + * socket is AF_INET, a valid + * IPv6 address (e.g. ::1) if IPv6 support is enabled and + * socket is AF_INET6 + * or the pathname of a Unix domain socket, if the socket family is + * AF_UNIX. + * @param int $port The port parameter is only used and is mandatory + * when connecting to an AF_INET or an + * AF_INET6 socket, and designates + * the port on the remote host to which a connection should be made. + * @throws SocketsException + * + */ +function socket_connect($socket, string $address, int $port = 0): void +{ + error_clear_last(); + $result = \socket_connect($socket, $address, $port); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * socket_create_listen creates a new socket resource of + * type AF_INET listening on all + * local interfaces on the given port waiting for new connections. + * + * This function is meant to ease the task of creating a new socket which + * only listens to accept new connections. + * + * @param int $port The port on which to listen on all interfaces. + * @param int $backlog The backlog parameter defines the maximum length + * the queue of pending connections may grow to. + * SOMAXCONN may be passed as + * backlog parameter, see + * socket_listen for more information. + * @return resource socket_create_listen returns a new socket resource + * on success. The error code can be retrieved with + * socket_last_error. This code may be passed to + * socket_strerror to get a textual explanation of the + * error. + * @throws SocketsException + * + */ +function socket_create_listen(int $port, int $backlog = 128) +{ + error_clear_last(); + $result = \socket_create_listen($port, $backlog); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * socket_create_pair creates two connected and + * indistinguishable sockets, and stores them in fd. + * This function is commonly used in IPC (InterProcess Communication). + * + * @param int $domain The domain parameter specifies the protocol + * family to be used by the socket. See socket_create + * for the full list. + * @param int $type The type parameter selects the type of communication + * to be used by the socket. See socket_create for the + * full list. + * @param int $protocol The protocol parameter sets the specific + * protocol within the specified domain to be used + * when communicating on the returned socket. The proper value can be retrieved by + * name by using getprotobyname. If + * the desired protocol is TCP, or UDP the corresponding constants + * SOL_TCP, and SOL_UDP + * can also be used. + * + * See socket_create for the full list of supported + * protocols. + * @param resource[]|null $fd Reference to an array in which the two socket resources will be inserted. + * @throws SocketsException + * + */ +function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$fd): void +{ + error_clear_last(); + $result = \socket_create_pair($domain, $type, $protocol, $fd); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * Creates and returns a socket resource, also referred to as an endpoint + * of communication. A typical network connection is made up of 2 sockets, one + * performing the role of the client, and another performing the role of the server. + * + * @param int $domain The domain parameter specifies the protocol + * family to be used by the socket. + * @param int $type The type parameter selects the type of communication + * to be used by the socket. + * @param int $protocol The protocol parameter sets the specific + * protocol within the specified domain to be used + * when communicating on the returned socket. The proper value can be + * retrieved by name by using getprotobyname. If + * the desired protocol is TCP, or UDP the corresponding constants + * SOL_TCP, and SOL_UDP + * can also be used. + * @return resource socket_create returns a socket resource on success. The actual error code can be retrieved by calling + * socket_last_error. This error code may be passed to + * socket_strerror to get a textual explanation of the + * error. + * @throws SocketsException + * + */ +function socket_create(int $domain, int $type, int $protocol) +{ + error_clear_last(); + $result = \socket_create($domain, $type, $protocol); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $socket + * @return resource Return resource. + * @throws SocketsException + * + */ +function socket_export_stream($socket) +{ + error_clear_last(); + $result = \socket_export_stream($socket); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * The socket_get_option function retrieves the value for + * the option specified by the optname parameter for the + * specified socket. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @param int $level The level parameter specifies the protocol + * level at which the option resides. For example, to retrieve options at + * the socket level, a level parameter of + * SOL_SOCKET would be used. Other levels, such as + * TCP, can be used by + * specifying the protocol number of that level. Protocol numbers can be + * found by using the getprotobyname function. + * @param int $optname Reports whether the socket lingers on + * socket_close if data is present. By default, + * when the socket is closed, it attempts to send all unsent data. + * In the case of a connection-oriented socket, + * socket_close will wait for its peer to + * acknowledge the data. + * + * If l_onoff is non-zero and + * l_linger is zero, all the + * unsent data will be discarded and RST (reset) is sent to the + * peer in the case of a connection-oriented socket. + * + * On the other hand, if l_onoff is + * non-zero and l_linger is non-zero, + * socket_close will block until all the data + * is sent or the time specified in l_linger + * elapses. If the socket is non-blocking, + * socket_close will fail and return an error. + * @return mixed Returns the value of the given options. + * @throws SocketsException + * + */ +function socket_get_option($socket, int $level, int $optname) +{ + error_clear_last(); + $result = \socket_get_option($socket, $level, $optname); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * Queries the remote side of the given socket which may either result in + * host/port or in a Unix filesystem path, dependent on its type. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @param string $address If the given socket is of type AF_INET or + * AF_INET6, socket_getpeername + * will return the peers (remote) IP address in + * appropriate notation (e.g. 127.0.0.1 or + * fe80::1) in the address + * parameter and, if the optional port parameter is + * present, also the associated port. + * + * If the given socket is of type AF_UNIX, + * socket_getpeername will return the Unix filesystem + * path (e.g. /var/run/daemon.sock) in the + * address parameter. + * @param int|null $port If given, this will hold the port associated to + * address. + * @throws SocketsException + * + */ +function socket_getpeername($socket, string &$address, ?int &$port = null): void +{ + error_clear_last(); + $result = \socket_getpeername($socket, $address, $port); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @param string|null $addr If the given socket is of type AF_INET + * or AF_INET6, socket_getsockname + * will return the local IP address in appropriate notation (e.g. + * 127.0.0.1 or fe80::1) in the + * address parameter and, if the optional + * port parameter is present, also the associated port. + * + * If the given socket is of type AF_UNIX, + * socket_getsockname will return the Unix filesystem + * path (e.g. /var/run/daemon.sock) in the + * address parameter. + * @param int|null $port If provided, this will hold the associated port. + * @throws SocketsException + * + */ +function socket_getsockname($socket, ?string &$addr, ?int &$port = null): void +{ + error_clear_last(); + $result = \socket_getsockname($socket, $addr, $port); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * Imports a stream that encapsulates a socket into a socket extension resource. + * + * @param resource $stream The stream resource to import. + * @return resource|false Returns FALSE. + * @throws SocketsException + * + */ +function socket_import_stream($stream) +{ + error_clear_last(); + $result = \socket_import_stream($stream); + if ($result === null) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * After the socket socket has been created + * using socket_create and bound to a name with + * socket_bind, it may be told to listen for incoming + * connections on socket. + * + * socket_listen is applicable only to sockets of + * type SOCK_STREAM or + * SOCK_SEQPACKET. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_addrinfo_bind + * @param int $backlog A maximum of backlog incoming connections will be + * queued for processing. If a connection request arrives with the queue + * full the client may receive an error with an indication of + * ECONNREFUSED, or, if the underlying protocol supports + * retransmission, the request may be ignored so that retries may succeed. + * + * The maximum number passed to the backlog + * parameter highly depends on the underlying platform. On Linux, it is + * silently truncated to SOMAXCONN. On win32, if + * passed SOMAXCONN, the underlying service provider + * responsible for the socket will set the backlog to a maximum + * reasonable value. There is no standard provision to + * find out the actual backlog value on this platform. + * @throws SocketsException + * + */ +function socket_listen($socket, int $backlog = 0): void +{ + error_clear_last(); + $result = \socket_listen($socket, $backlog); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * The function socket_read reads from the socket + * resource socket created by the + * socket_create or + * socket_accept functions. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @param int $length The maximum number of bytes read is specified by the + * length parameter. Otherwise you can use + * \r, \n, + * or \0 to end reading (depending on the type + * parameter, see below). + * @param int $type Optional type parameter is a named constant: + * + * + * + * PHP_BINARY_READ (Default) - use the system + * recv() function. Safe for reading binary data. + * + * + * + * + * PHP_NORMAL_READ - reading stops at + * \n or \r. + * + * + * + * @return string socket_read returns the data as a string on success (including if the remote host has closed the + * connection). The error code can be retrieved with + * socket_last_error. This code may be passed to + * socket_strerror to get a textual representation of + * the error. + * @throws SocketsException + * + */ +function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string +{ + error_clear_last(); + $result = \socket_read($socket, $length, $type); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * The function socket_send sends + * len bytes to the socket + * socket from buf. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @param string $buf A buffer containing the data that will be sent to the remote host. + * @param int $len The number of bytes that will be sent to the remote host from + * buf. + * @param int $flags The value of flags can be any combination of + * the following flags, joined with the binary OR (|) + * operator. + * + * Possible values for flags + * + * + * + * MSG_OOB + * + * Send OOB (out-of-band) data. + * + * + * + * MSG_EOR + * + * Indicate a record mark. The sent data completes the record. + * + * + * + * MSG_EOF + * + * Close the sender side of the socket and include an appropriate + * notification of this at the end of the sent data. The sent data + * completes the transaction. + * + * + * + * MSG_DONTROUTE + * + * Bypass routing, use direct interface. + * + * + * + * + * + * @return int socket_send returns the number of bytes sent. + * @throws SocketsException + * + */ +function socket_send($socket, string $buf, int $len, int $flags): int +{ + error_clear_last(); + $result = \socket_send($socket, $buf, $len, $flags); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $socket + * @param array $message + * @param int $flags + * @return int Returns the number of bytes sent. + * @throws SocketsException + * + */ +function socket_sendmsg($socket, array $message, int $flags = 0): int +{ + error_clear_last(); + $result = \socket_sendmsg($socket, $message, $flags); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * The function socket_sendto sends + * len bytes from buf + * through the socket socket to the + * port at the address addr. + * + * @param resource $socket A valid socket resource created using socket_create. + * @param string $buf The sent data will be taken from buffer buf. + * @param int $len len bytes from buf will be + * sent. + * @param int $flags The value of flags can be any combination of + * the following flags, joined with the binary OR (|) + * operator. + * + * Possible values for flags + * + * + * + * MSG_OOB + * + * Send OOB (out-of-band) data. + * + * + * + * MSG_EOR + * + * Indicate a record mark. The sent data completes the record. + * + * + * + * MSG_EOF + * + * Close the sender side of the socket and include an appropriate + * notification of this at the end of the sent data. The sent data + * completes the transaction. + * + * + * + * MSG_DONTROUTE + * + * Bypass routing, use direct interface. + * + * + * + * + * + * @param string $addr IP address of the remote host. + * @param int $port port is the remote port number at which the data + * will be sent. + * @return int socket_sendto returns the number of bytes sent to the + * remote host. + * @throws SocketsException + * + */ +function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, int $port = 0): int +{ + error_clear_last(); + $result = \socket_sendto($socket, $buf, $len, $flags, $addr, $port); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * The socket_set_block function removes the + * O_NONBLOCK flag on the socket specified by the + * socket parameter. + * + * When an operation (e.g. receive, send, connect, accept, ...) is performed on + * a blocking socket, the script will pause its execution until it receives + * a signal or it can perform the operation. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @throws SocketsException + * + */ +function socket_set_block($socket): void +{ + error_clear_last(); + $result = \socket_set_block($socket); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * The socket_set_nonblock function sets the + * O_NONBLOCK flag on the socket specified by + * the socket parameter. + * + * When an operation (e.g. receive, send, connect, accept, ...) is performed on + * a non-blocking socket, the script will not pause its execution until it receives a + * signal or it can perform the operation. Rather, if the operation would result + * in a block, the called function will fail. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @throws SocketsException + * + */ +function socket_set_nonblock($socket): void +{ + error_clear_last(); + $result = \socket_set_nonblock($socket); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * The socket_set_option function sets the option + * specified by the optname parameter, at the + * specified protocol level, to the value pointed to + * by the optval parameter for the + * socket. + * + * @param resource $socket A valid socket resource created with socket_create + * or socket_accept. + * @param int $level The level parameter specifies the protocol + * level at which the option resides. For example, to retrieve options at + * the socket level, a level parameter of + * SOL_SOCKET would be used. Other levels, such as + * TCP, can be used by specifying the protocol number of that level. + * Protocol numbers can be found by using the + * getprotobyname function. + * @param int $optname The available socket options are the same as those for the + * socket_get_option function. + * @param int|string|array $optval The option value. + * @throws SocketsException + * + */ +function socket_set_option($socket, int $level, int $optname, $optval): void +{ + error_clear_last(); + $result = \socket_set_option($socket, $level, $optname, $optval); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * The socket_shutdown function allows you to stop + * incoming, outgoing or all data (the default) from being sent through the + * socket + * + * @param resource $socket A valid socket resource created with socket_create. + * @param int $how The value of how can be one of the following: + * + * possible values for how + * + * + * + * 0 + * + * Shutdown socket reading + * + * + * + * 1 + * + * Shutdown socket writing + * + * + * + * 2 + * + * Shutdown socket reading and writing + * + * + * + * + * + * @throws SocketsException + * + */ +function socket_shutdown($socket, int $how = 2): void +{ + error_clear_last(); + $result = \socket_shutdown($socket, $how); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} + + +/** + * Exports the WSAPROTOCOL_INFO structure into shared memory and returns + * an identifier to be used with socket_wsaprotocol_info_import. The + * exported ID is only valid for the given target_pid. + * + * @param resource $socket A valid socket resource. + * @param int $target_pid The ID of the process which will import the socket. + * @return string Returns an identifier to be used for the import + * @throws SocketsException + * + */ +function socket_wsaprotocol_info_export($socket, int $target_pid): string +{ + error_clear_last(); + $result = \socket_wsaprotocol_info_export($socket, $target_pid); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * Imports a socket which has formerly been exported from another process. + * + * @param string $info_id The ID which has been returned by a former call to + * socket_wsaprotocol_info_export. + * @return resource Returns the socket resource + * @throws SocketsException + * + */ +function socket_wsaprotocol_info_import(string $info_id) +{ + error_clear_last(); + $result = \socket_wsaprotocol_info_import($info_id); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} + + +/** + * Releases the shared memory corresponding to the given info_id. + * + * @param string $info_id The ID which has been returned by a former call to + * socket_wsaprotocol_info_export. + * @throws SocketsException + * + */ +function socket_wsaprotocol_info_release(string $info_id): void +{ + error_clear_last(); + $result = \socket_wsaprotocol_info_release($info_id); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/sodium.php b/vendor/thecodingmachine/safe/generated/sodium.php new file mode 100644 index 000000000..6cb378adb --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/sodium.php @@ -0,0 +1,58 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SodiumException; + +/** + * Uses a CPU- and memory-hard hash algorithm along with a randomly-generated salt, and memory and CPU limits to generate an ASCII-encoded hash suitable for password storage. + * + * @param string $password string; The password to generate a hash for. + * @param int $opslimit Represents a maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. There are constants available to set the operations limit to appropriate values depending on intended use, in order of strength: SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE and SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE. + * @param int $memlimit The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE, and SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE. Typically these should be paired with the matching opslimit values. + * @return string Returns the hashed password. + * + * In order to produce the same password hash from the same password, the same values for opslimit and memlimit must be used. These are embedded within the generated hash, so + * everything that's needed to verify the hash is included. This allows + * the sodium_crypto_pwhash_str_verify function to verify the hash without + * needing separate storage for the other parameters. + * @throws SodiumException + * + */ +function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit): string +{ + error_clear_last(); + $result = \sodium_crypto_pwhash_str($password, $opslimit, $memlimit); + if ($result === false) { + throw SodiumException::createFromPhpError(); + } + return $result; +} + + +/** + * This function provides low-level access to libsodium's crypto_pwhash key derivation function. Unless you have specific reason to use this function, you should use sodium_crypto_pwhash_str or password_hash functions instead. + * + * @param int $length integer; The length of the password hash to generate, in bytes. + * @param string $password string; The password to generate a hash for. + * @param string $salt string A salt to add to the password before hashing. The salt should be unpredictable, ideally generated from a good random mumber source such as random_bytes, and have a length of at least SODIUM_CRYPTO_PWHASH_SALTBYTES bytes. + * @param int $opslimit Represents a maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. There are some constants available to set the operations limit to appropriate values depending on intended use, in order of strength: SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE and SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE. + * @param int $memlimit The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE, and SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE. Typically these should be paired with the matching opslimit values. + * @param int $alg integer A number indicating the hash algorithm to use. By default SODIUM_CRYPTO_PWHASH_ALG_DEFAULT (the currently recommended algorithm, which can change from one version of libsodium to another), or explicitly using SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13, representing the Argon2id algorithm version 1.3. + * @return string Returns the derived key. The return value is a binary string of the hash, not an ASCII-encoded representation, and does not contain additional information about the parameters used to create the hash, so you will need to keep that information if you are ever going to verify the password in future. Use sodium_crypto_pwhash_str to avoid needing to do all that. + * @throws SodiumException + * + */ +function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $alg = null): string +{ + error_clear_last(); + if ($alg !== null) { + $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit, $alg); + } else { + $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit); + } + if ($result === false) { + throw SodiumException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/solr.php b/vendor/thecodingmachine/safe/generated/solr.php new file mode 100644 index 000000000..4d4e0418a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/solr.php @@ -0,0 +1,22 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SolrException; + +/** + * This function returns the current version of the extension as a string. + * + * @return string It returns a string on success. + * @throws SolrException + * + */ +function solr_get_version(): string +{ + error_clear_last(); + $result = \solr_get_version(); + if ($result === false) { + throw SolrException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/spl.php b/vendor/thecodingmachine/safe/generated/spl.php new file mode 100644 index 000000000..679e68991 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/spl.php @@ -0,0 +1,139 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SplException; + +/** + * This function returns an array with the names of the interfaces that the + * given class and its parents implement. + * + * @param mixed $class An object (class instance) or a string (class or interface name). + * @param bool $autoload Whether to allow this function to load the class automatically through + * the __autoload magic method. + * @return array An array on success. + * @throws SplException + * + */ +function class_implements($class, bool $autoload = true): array +{ + error_clear_last(); + $result = \class_implements($class, $autoload); + if ($result === false) { + throw SplException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns an array with the name of the parent classes of + * the given class. + * + * @param mixed $class An object (class instance) or a string (class name). + * @param bool $autoload Whether to allow this function to load the class automatically through + * the __autoload magic method. + * @return array An array on success. + * @throws SplException + * + */ +function class_parents($class, bool $autoload = true): array +{ + error_clear_last(); + $result = \class_parents($class, $autoload); + if ($result === false) { + throw SplException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns an array with the names of the traits that the + * given class uses. This does however not include + * any traits used by a parent class. + * + * @param mixed $class An object (class instance) or a string (class name). + * @param bool $autoload Whether to allow this function to load the class automatically through + * the __autoload magic method. + * @return array An array on success. + * @throws SplException + * + */ +function class_uses($class, bool $autoload = true): array +{ + error_clear_last(); + $result = \class_uses($class, $autoload); + if ($result === false) { + throw SplException::createFromPhpError(); + } + return $result; +} + + +/** + * Register a function with the spl provided __autoload queue. If the queue + * is not yet activated it will be activated. + * + * If your code has an existing __autoload function then + * this function must be explicitly registered on the __autoload queue. This + * is because spl_autoload_register will effectively + * replace the engine cache for the __autoload function + * by either spl_autoload or + * spl_autoload_call. + * + * If there must be multiple autoload functions, spl_autoload_register + * allows for this. It effectively creates a queue of autoload functions, and + * runs through each of them in the order they are defined. By contrast, + * __autoload may only be defined once. + * + * @param callable(string):void $autoload_function The autoload function being registered. + * If no parameter is provided, then the default implementation of + * spl_autoload will be registered. + * @param bool $throw This parameter specifies whether + * spl_autoload_register should throw + * exceptions when the autoload_function + * cannot be registered. + * @param bool $prepend If true, spl_autoload_register will prepend + * the autoloader on the autoload queue instead of appending it. + * @throws SplException + * + */ +function spl_autoload_register(callable $autoload_function = null, bool $throw = true, bool $prepend = false): void +{ + error_clear_last(); + if ($prepend !== false) { + $result = \spl_autoload_register($autoload_function, $throw, $prepend); + } elseif ($throw !== true) { + $result = \spl_autoload_register($autoload_function, $throw); + } elseif ($autoload_function !== null) { + $result = \spl_autoload_register($autoload_function); + } else { + $result = \spl_autoload_register(); + } + if ($result === false) { + throw SplException::createFromPhpError(); + } +} + + +/** + * Removes a function from the autoload queue. If the queue + * is activated and empty after removing the given function then it will + * be deactivated. + * + * When this function results in the queue being deactivated, any + * __autoload function that previously existed will not be reactivated. + * + * @param mixed $autoload_function The autoload function being unregistered. + * @throws SplException + * + */ +function spl_autoload_unregister($autoload_function): void +{ + error_clear_last(); + $result = \spl_autoload_unregister($autoload_function); + if ($result === false) { + throw SplException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/sqlsrv.php b/vendor/thecodingmachine/safe/generated/sqlsrv.php new file mode 100644 index 000000000..e93aa37af --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/sqlsrv.php @@ -0,0 +1,429 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SqlsrvException; + +/** + * The transaction begun by sqlsrv_begin_transaction includes + * all statements that were executed after the call to + * sqlsrv_begin_transaction and before calls to + * sqlsrv_rollback or sqlsrv_commit. + * Explicit transactions should be started and committed or rolled back using + * these functions instead of executing SQL statements that begin and commit/roll + * back transactions. For more information, see + * SQLSRV Transactions. + * + * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @throws SqlsrvException + * + */ +function sqlsrv_begin_transaction($conn): void +{ + error_clear_last(); + $result = \sqlsrv_begin_transaction($conn); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Cancels a statement. Any results associated with the statement that have not + * been consumed are deleted. After sqlsrv_cancel has been + * called, the specified statement can be re-executed if it was created with + * sqlsrv_prepare. Calling sqlsrv_cancel + * is not necessary if all the results associated with the statement have been + * consumed. + * + * @param resource $stmt The statement resource to be cancelled. + * @throws SqlsrvException + * + */ +function sqlsrv_cancel($stmt): void +{ + error_clear_last(); + $result = \sqlsrv_cancel($stmt); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Returns information about the client and specified connection + * + * @param resource $conn The connection about which information is returned. + * @return array Returns an associative array with keys described in the table below. + * + * Array returned by sqlsrv_client_info + * + * + * + * Key + * Description + * + * + * + * + * DriverDllName + * SQLNCLI10.DLL + * + * + * DriverODBCVer + * ODBC version (xx.yy) + * + * + * DriverVer + * SQL Server Native Client DLL version (10.5.xxx) + * + * + * ExtensionVer + * php_sqlsrv.dll version (2.0.xxx.x) + * + * + * + * + * @throws SqlsrvException + * + */ +function sqlsrv_client_info($conn): array +{ + error_clear_last(); + $result = \sqlsrv_client_info($conn); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Closes an open connection and releases resourses associated with the connection. + * + * @param resource $conn The connection to be closed. + * @throws SqlsrvException + * + */ +function sqlsrv_close($conn): void +{ + error_clear_last(); + $result = \sqlsrv_close($conn); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Commits a transaction that was begun with sqlsrv_begin_transaction. + * The connection is returned to auto-commit mode after sqlsrv_commit + * is called. The transaction that is committed includes all statements that were + * executed after the call to sqlsrv_begin_transaction. + * Explicit transactions should be started and committed or rolled back using these + * functions instead of executing SQL statements that begin and commit/roll back + * transactions. For more information, see + * SQLSRV Transactions. + * + * @param resource $conn The connection on which the transaction is to be committed. + * @throws SqlsrvException + * + */ +function sqlsrv_commit($conn): void +{ + error_clear_last(); + $result = \sqlsrv_commit($conn); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Changes the driver error handling and logging configurations. + * + * @param string $setting The name of the setting to set. The possible values are + * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". + * @param mixed $value The value of the specified setting. The following table shows possible values: + * + * Error and Logging Setting Options + * + * + * + * Setting + * Options + * + * + * + * + * WarningsReturnAsErrors + * 1 (TRUE) or 0 (FALSE) + * + * + * LogSubsystems + * SQLSRV_LOG_SYSTEM_ALL (-1) + * SQLSRV_LOG_SYSTEM_CONN (2) + * SQLSRV_LOG_SYSTEM_INIT (1) + * SQLSRV_LOG_SYSTEM_OFF (0) + * SQLSRV_LOG_SYSTEM_STMT (4) + * SQLSRV_LOG_SYSTEM_UTIL (8) + * + * + * LogSeverity + * SQLSRV_LOG_SEVERITY_ALL (-1) + * SQLSRV_LOG_SEVERITY_ERROR (1) + * SQLSRV_LOG_SEVERITY_NOTICE (4) + * SQLSRV_LOG_SEVERITY_WARNING (2) + * + * + * + * + * @throws SqlsrvException + * + */ +function sqlsrv_configure(string $setting, $value): void +{ + error_clear_last(); + $result = \sqlsrv_configure($setting, $value); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Executes a statement prepared with sqlsrv_prepare. This + * function is ideal for executing a prepared statement multiple times with + * different parameter values. + * + * @param resource $stmt A statement resource returned by sqlsrv_prepare. + * @throws SqlsrvException + * + */ +function sqlsrv_execute($stmt): void +{ + error_clear_last(); + $result = \sqlsrv_execute($stmt); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Frees all resources for the specified statement. The statement cannot be used + * after sqlsrv_free_stmt has been called on it. If + * sqlsrv_free_stmt is called on an in-progress statement + * that alters server state, statement execution is terminated and the statement + * is rolled back. + * + * @param resource $stmt The statement for which resources are freed. + * Note that NULL is a valid parameter value. This allows the function to be + * called multiple times in a script. + * @throws SqlsrvException + * + */ +function sqlsrv_free_stmt($stmt): void +{ + error_clear_last(); + $result = \sqlsrv_free_stmt($stmt); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} + + +/** + * Gets field data from the currently selected row. Fields must be accessed in + * order. Field indices start at 0. + * + * @param resource $stmt A statement resource returned by sqlsrv_query or + * sqlsrv_execute. + * @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields + * must be accessed in order. i.e. If you access field index 1, then field + * index 0 will not be available. + * @param int $getAsType The PHP data type for the returned field data. If this parameter is not + * set, the field data will be returned as its default PHP data type. + * For information about default PHP data types, see + * Default PHP Data Types + * in the Microsoft SQLSRV documentation. + * @return mixed Returns data from the specified field on success. + * @throws SqlsrvException + * + */ +function sqlsrv_get_field($stmt, int $fieldIndex, int $getAsType = null) +{ + error_clear_last(); + if ($getAsType !== null) { + $result = \sqlsrv_get_field($stmt, $fieldIndex, $getAsType); + } else { + $result = \sqlsrv_get_field($stmt, $fieldIndex); + } + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Makes the next result of the specified statement active. Results include result + * sets, row counts, and output parameters. + * + * @param resource $stmt The statement on which the next result is being called. + * @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error + * occurred, and NULL if there are no more results to retrieve. + * @throws SqlsrvException + * + */ +function sqlsrv_next_result($stmt): ?bool +{ + error_clear_last(); + $result = \sqlsrv_next_result($stmt); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the number of fields (columns) on a statement. + * + * @param resource $stmt The statement for which the number of fields is returned. + * sqlsrv_num_fields can be called on a statement before + * or after statement execution. + * @return int Returns the number of fields on success. + * @throws SqlsrvException + * + */ +function sqlsrv_num_fields($stmt): int +{ + error_clear_last(); + $result = \sqlsrv_num_fields($stmt); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves the number of rows in a result set. This function requires that the + * statement resource be created with a static or keyset cursor. For more information, + * see sqlsrv_query, sqlsrv_prepare, + * or Specifying a Cursor Type and Selecting Rows + * in the Microsoft SQLSRV documentation. + * + * @param resource $stmt The statement for which the row count is returned. The statement resource + * must be created with a static or keyset cursor. For more information, see + * sqlsrv_query, sqlsrv_prepare, or + * Specifying a Cursor Type and Selecting Rows + * in the Microsoft SQLSRV documentation. + * @return int Returns the number of rows retrieved on success. + * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. + * @throws SqlsrvException + * + */ +function sqlsrv_num_rows($stmt): int +{ + error_clear_last(); + $result = \sqlsrv_num_rows($stmt); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Prepares a query for execution. This function is ideal for preparing a query + * that will be executed multiple times with different parameter values. + * + * @param resource $conn A connection resource returned by sqlsrv_connect. + * @param string $sql The string that defines the query to be prepared and executed. + * @param array $params An array specifying parameter information when executing a parameterized + * query. Array elements can be any of the following: + * + * A literal value + * A PHP variable + * An array with this structure: + * array($value [, $direction [, $phpType [, $sqlType]]]) + * + * The following table describes the elements in the array structure above: + * @param array $options An array specifying query property options. The supported keys are described + * in the following table: + * @return resource Returns a statement resource on success. + * @throws SqlsrvException + * + */ +function sqlsrv_prepare($conn, string $sql, array $params = null, array $options = null) +{ + error_clear_last(); + if ($options !== null) { + $result = \sqlsrv_prepare($conn, $sql, $params, $options); + } elseif ($params !== null) { + $result = \sqlsrv_prepare($conn, $sql, $params); + } else { + $result = \sqlsrv_prepare($conn, $sql); + } + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Prepares and executes a query. + * + * @param resource $conn A connection resource returned by sqlsrv_connect. + * @param string $sql The string that defines the query to be prepared and executed. + * @param array $params An array specifying parameter information when executing a parameterized query. + * Array elements can be any of the following: + * + * A literal value + * A PHP variable + * An array with this structure: + * array($value [, $direction [, $phpType [, $sqlType]]]) + * + * The following table describes the elements in the array structure above: + * @param array $options An array specifying query property options. The supported keys are described + * in the following table: + * @return resource Returns a statement resource on success. + * @throws SqlsrvException + * + */ +function sqlsrv_query($conn, string $sql, array $params = null, array $options = null) +{ + error_clear_last(); + if ($options !== null) { + $result = \sqlsrv_query($conn, $sql, $params, $options); + } elseif ($params !== null) { + $result = \sqlsrv_query($conn, $sql, $params); + } else { + $result = \sqlsrv_query($conn, $sql); + } + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } + return $result; +} + + +/** + * Rolls back a transaction that was begun with sqlsrv_begin_transaction + * and returns the connection to auto-commit mode. + * + * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @throws SqlsrvException + * + */ +function sqlsrv_rollback($conn): void +{ + error_clear_last(); + $result = \sqlsrv_rollback($conn); + if ($result === false) { + throw SqlsrvException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/ssdeep.php b/vendor/thecodingmachine/safe/generated/ssdeep.php new file mode 100644 index 000000000..662fc9b94 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ssdeep.php @@ -0,0 +1,70 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SsdeepException; + +/** + * Calculates the match score between signature1 + * and signature2 using + * context-triggered piecewise hashing, and returns the match + * score. + * + * @param string $signature1 The first fuzzy hash signature string. + * @param string $signature2 The second fuzzy hash signature string. + * @return int Returns an integer from 0 to 100 on success, FALSE otherwise. + * @throws SsdeepException + * + */ +function ssdeep_fuzzy_compare(string $signature1, string $signature2): int +{ + error_clear_last(); + $result = \ssdeep_fuzzy_compare($signature1, $signature2); + if ($result === false) { + throw SsdeepException::createFromPhpError(); + } + return $result; +} + + +/** + * ssdeep_fuzzy_hash_filename calculates the hash + * of the file specified by file_name using + * context-triggered piecewise + * hashing, and returns that hash. + * + * @param string $file_name The filename of the file to hash. + * @return string Returns a string on success, FALSE otherwise. + * @throws SsdeepException + * + */ +function ssdeep_fuzzy_hash_filename(string $file_name): string +{ + error_clear_last(); + $result = \ssdeep_fuzzy_hash_filename($file_name); + if ($result === false) { + throw SsdeepException::createFromPhpError(); + } + return $result; +} + + +/** + * ssdeep_fuzzy_hash calculates the hash of + * to_hash using + * context-triggered piecewise hashing, and returns that hash. + * + * @param string $to_hash The input string. + * @return string Returns a string on success, FALSE otherwise. + * @throws SsdeepException + * + */ +function ssdeep_fuzzy_hash(string $to_hash): string +{ + error_clear_last(); + $result = \ssdeep_fuzzy_hash($to_hash); + if ($result === false) { + throw SsdeepException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/ssh2.php b/vendor/thecodingmachine/safe/generated/ssh2.php new file mode 100644 index 000000000..96af9df32 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/ssh2.php @@ -0,0 +1,641 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\Ssh2Exception; + +/** + * Authenticate over SSH using the ssh agent + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $username Remote user name. + * @throws Ssh2Exception + * + */ +function ssh2_auth_agent($session, string $username): void +{ + error_clear_last(); + $result = \ssh2_auth_agent($session, $username); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Authenticate using a public hostkey read from a file. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $username + * @param string $hostname + * @param string $pubkeyfile + * @param string $privkeyfile + * @param string $passphrase If privkeyfile is encrypted (which it should + * be), the passphrase must be provided. + * @param string $local_username If local_username is omitted, then the value + * for username will be used for it. + * @throws Ssh2Exception + * + */ +function ssh2_auth_hostbased_file($session, string $username, string $hostname, string $pubkeyfile, string $privkeyfile, string $passphrase = null, string $local_username = null): void +{ + error_clear_last(); + if ($local_username !== null) { + $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase, $local_username); + } elseif ($passphrase !== null) { + $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase); + } else { + $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile); + } + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Authenticate over SSH using a plain password. Since version 0.12 this function + * also supports keyboard_interactive method. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $username Remote user name. + * @param string $password Password for username + * @throws Ssh2Exception + * + */ +function ssh2_auth_password($session, string $username, string $password): void +{ + error_clear_last(); + $result = \ssh2_auth_password($session, $username, $password); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Authenticate using a public key read from a file. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $username + * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: + * + * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 + * @param string $privkeyfile + * @param string $passphrase If privkeyfile is encrypted (which it should + * be), the passphrase must be provided. + * @throws Ssh2Exception + * + */ +function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, string $privkeyfile, string $passphrase = null): void +{ + error_clear_last(); + if ($passphrase !== null) { + $result = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase); + } else { + $result = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile); + } + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Establish a connection to a remote SSH server. + * + * Once connected, the client should verify the server's hostkey using + * ssh2_fingerprint, then authenticate using either + * password or public key. + * + * @param string $host + * @param int $port + * @param array $methods methods may be an associative array with up to four parameters + * as described below. + * + * + * methods may be an associative array + * with any or all of the following parameters. + * + * + * + * Index + * Meaning + * Supported Values* + * + * + * + * + * kex + * + * List of key exchange methods to advertise, comma separated + * in order of preference. + * + * + * diffie-hellman-group1-sha1, + * diffie-hellman-group14-sha1, and + * diffie-hellman-group-exchange-sha1 + * + * + * + * hostkey + * + * List of hostkey methods to advertise, comma separated + * in order of preference. + * + * + * ssh-rsa and + * ssh-dss + * + * + * + * client_to_server + * + * Associative array containing crypt, compression, and + * message authentication code (MAC) method preferences + * for messages sent from client to server. + * + * + * + * + * server_to_client + * + * Associative array containing crypt, compression, and + * message authentication code (MAC) method preferences + * for messages sent from server to client. + * + * + * + * + * + * + * + * * - Supported Values are dependent on methods supported by underlying library. + * See libssh2 documentation for additional + * information. + * + * + * + * client_to_server and + * server_to_client may be an associative array + * with any or all of the following parameters. + * + * + * + * + * Index + * Meaning + * Supported Values* + * + * + * + * + * crypt + * List of crypto methods to advertise, comma separated + * in order of preference. + * + * [email protected], + * aes256-cbc, + * aes192-cbc, + * aes128-cbc, + * 3des-cbc, + * blowfish-cbc, + * cast128-cbc, + * arcfour, and + * none** + * + * + * + * comp + * List of compression methods to advertise, comma separated + * in order of preference. + * + * zlib and + * none + * + * + * + * mac + * List of MAC methods to advertise, comma separated + * in order of preference. + * + * hmac-sha1, + * hmac-sha1-96, + * hmac-ripemd160, + * [email protected], and + * none** + * + * + * + * + * + * + * + * Crypt and MAC method "none" + * + * For security reasons, none is disabled by the underlying + * libssh2 library unless explicitly enabled + * during build time by using the appropriate ./configure options. See documentation + * for the underlying library for more information. + * + * + * + * For security reasons, none is disabled by the underlying + * libssh2 library unless explicitly enabled + * during build time by using the appropriate ./configure options. See documentation + * for the underlying library for more information. + * @param array $callbacks callbacks may be an associative array with any + * or all of the following parameters. + * + * + * Callbacks parameters + * + * + * + * + * Index + * Meaning + * Prototype + * + * + * + * + * ignore + * + * Name of function to call when an + * SSH2_MSG_IGNORE packet is received + * + * void ignore_cb($message) + * + * + * debug + * + * Name of function to call when an + * SSH2_MSG_DEBUG packet is received + * + * void debug_cb($message, $language, $always_display) + * + * + * macerror + * + * Name of function to call when a packet is received but the + * message authentication code failed. If the callback returns + * TRUE, the mismatch will be ignored, otherwise the connection + * will be terminated. + * + * bool macerror_cb($packet) + * + * + * disconnect + * + * Name of function to call when an + * SSH2_MSG_DISCONNECT packet is received + * + * void disconnect_cb($reason, $message, $language) + * + * + * + * + * @return resource Returns a resource on success. + * @throws Ssh2Exception + * + */ +function ssh2_connect(string $host, int $port = 22, array $methods = null, array $callbacks = null) +{ + error_clear_last(); + if ($callbacks !== null) { + $result = \ssh2_connect($host, $port, $methods, $callbacks); + } elseif ($methods !== null) { + $result = \ssh2_connect($host, $port, $methods); + } else { + $result = \ssh2_connect($host, $port); + } + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Close a connection to a remote SSH server. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @throws Ssh2Exception + * + */ +function ssh2_disconnect($session): void +{ + error_clear_last(); + $result = \ssh2_disconnect($session); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Execute a command at the remote end and allocate a channel for it. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $command + * @param string $pty + * @param array $env env may be passed as an associative array of + * name/value pairs to set in the target environment. + * @param int $width Width of the virtual terminal. + * @param int $height Height of the virtual terminal. + * @param int $width_height_type width_height_type should be one of + * SSH2_TERM_UNIT_CHARS or + * SSH2_TERM_UNIT_PIXELS. + * @return resource Returns a stream on success. + * @throws Ssh2Exception + * + */ +function ssh2_exec($session, string $command, string $pty = null, array $env = null, int $width = 80, int $height = 25, int $width_height_type = SSH2_TERM_UNIT_CHARS) +{ + error_clear_last(); + if ($width_height_type !== SSH2_TERM_UNIT_CHARS) { + $result = \ssh2_exec($session, $command, $pty, $env, $width, $height, $width_height_type); + } elseif ($height !== 25) { + $result = \ssh2_exec($session, $command, $pty, $env, $width, $height); + } elseif ($width !== 80) { + $result = \ssh2_exec($session, $command, $pty, $env, $width); + } elseif ($env !== null) { + $result = \ssh2_exec($session, $command, $pty, $env); + } elseif ($pty !== null) { + $result = \ssh2_exec($session, $command, $pty); + } else { + $result = \ssh2_exec($session, $command); + } + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. + * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa + * @param string $blob Publickey blob as raw binary data + * @param bool $overwrite If the specified key already exists, should it be overwritten? + * @param array $attributes Associative array of attributes to assign to this public key. + * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. + * To mark an attribute as mandatory, precede its name with an asterisk. + * If the server is unable to support an attribute marked mandatory, + * it will abort the add process. + * @throws Ssh2Exception + * + */ +function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwrite = false, array $attributes = null): void +{ + error_clear_last(); + if ($attributes !== null) { + $result = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite, $attributes); + } else { + $result = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite); + } + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Request the Publickey subsystem from an already connected SSH2 server. + * + * The publickey subsystem allows an already connected and authenticated + * client to manage the list of authorized public keys stored on the + * target server in an implementation agnostic manner. + * If the remote server does not support the publickey subsystem, + * the ssh2_publickey_init function will return FALSE. + * + * @param resource $session + * @return resource Returns an SSH2 Publickey Subsystem resource for use + * with all other ssh2_publickey_*() methods. + * @throws Ssh2Exception + * + */ +function ssh2_publickey_init($session) +{ + error_clear_last(); + $result = \ssh2_publickey_init($session); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } + return $result; +} + + +/** + * Removes an authorized publickey. + * + * @param resource $pkey Publickey Subsystem Resource + * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa + * @param string $blob Publickey blob as raw binary data + * @throws Ssh2Exception + * + */ +function ssh2_publickey_remove($pkey, string $algoname, string $blob): void +{ + error_clear_last(); + $result = \ssh2_publickey_remove($pkey, $algoname, $blob); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Copy a file from the remote server to the local filesystem using the SCP protocol. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $remote_file Path to the remote file. + * @param string $local_file Path to the local file. + * @throws Ssh2Exception + * + */ +function ssh2_scp_recv($session, string $remote_file, string $local_file): void +{ + error_clear_last(); + $result = \ssh2_scp_recv($session, $remote_file, $local_file); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Copy a file from the local filesystem to the remote server using the SCP protocol. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @param string $local_file Path to the local file. + * @param string $remote_file Path to the remote file. + * @param int $create_mode The file will be created with the mode specified by + * create_mode. + * @throws Ssh2Exception + * + */ +function ssh2_scp_send($session, string $local_file, string $remote_file, int $create_mode = 0644): void +{ + error_clear_last(); + $result = \ssh2_scp_send($session, $local_file, $remote_file, $create_mode); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Attempts to change the mode of the specified file to that given in + * mode. + * + * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param string $filename Path to the file. + * @param int $mode Permissions on the file. See the chmod for more details on this parameter. + * @throws Ssh2Exception + * + */ +function ssh2_sftp_chmod($sftp, string $filename, int $mode): void +{ + error_clear_last(); + $result = \ssh2_sftp_chmod($sftp, $filename, $mode); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Creates a directory on the remote file server with permissions set to + * mode. + * + * This function is similar to using mkdir with the + * ssh2.sftp:// wrapper. + * + * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param string $dirname Path of the new directory. + * @param int $mode Permissions on the new directory. + * @param bool $recursive If recursive is TRUE any parent directories + * required for dirname will be automatically created as well. + * @throws Ssh2Exception + * + */ +function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursive = false): void +{ + error_clear_last(); + $result = \ssh2_sftp_mkdir($sftp, $dirname, $mode, $recursive); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Renames a file on the remote filesystem. + * + * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param string $from The current file that is being renamed. + * @param string $to The new file name that replaces from. + * @throws Ssh2Exception + * + */ +function ssh2_sftp_rename($sftp, string $from, string $to): void +{ + error_clear_last(); + $result = \ssh2_sftp_rename($sftp, $from, $to); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Removes a directory from the remote file server. + * + * This function is similar to using rmdir with the + * ssh2.sftp:// wrapper. + * + * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param string $dirname + * @throws Ssh2Exception + * + */ +function ssh2_sftp_rmdir($sftp, string $dirname): void +{ + error_clear_last(); + $result = \ssh2_sftp_rmdir($sftp, $dirname); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Creates a symbolic link named link on the remote + * filesystem pointing to target. + * + * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param string $target Target of the symbolic link. + * @param string $link + * @throws Ssh2Exception + * + */ +function ssh2_sftp_symlink($sftp, string $target, string $link): void +{ + error_clear_last(); + $result = \ssh2_sftp_symlink($sftp, $target, $link); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Deletes a file on the remote filesystem. + * + * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param string $filename + * @throws Ssh2Exception + * + */ +function ssh2_sftp_unlink($sftp, string $filename): void +{ + error_clear_last(); + $result = \ssh2_sftp_unlink($sftp, $filename); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } +} + + +/** + * Request the SFTP subsystem from an already connected SSH2 server. + * + * @param resource $session An SSH connection link identifier, obtained from a call to + * ssh2_connect. + * @return resource This method returns an SSH2 SFTP resource for use with + * all other ssh2_sftp_*() methods and the + * ssh2.sftp:// fopen wrapper. + * @throws Ssh2Exception + * + */ +function ssh2_sftp($session) +{ + error_clear_last(); + $result = \ssh2_sftp($session); + if ($result === false) { + throw Ssh2Exception::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/stream.php b/vendor/thecodingmachine/safe/generated/stream.php new file mode 100644 index 000000000..573d0295a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/stream.php @@ -0,0 +1,609 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\StreamException; + +/** + * Sets parameters on the specified context. + * + * @param resource $stream_or_context The stream or context to apply the parameters too. + * @param array $params An array of parameters to set. + * + * params should be an associative array of the structure: + * $params['paramname'] = "paramvalue";. + * @throws StreamException + * + */ +function stream_context_set_params($stream_or_context, array $params): void +{ + error_clear_last(); + $result = \stream_context_set_params($stream_or_context, $params); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Makes a copy of up to maxlength bytes + * of data from the current position (or from the + * offset position, if specified) in + * source to dest. If + * maxlength is not specified, all remaining content in + * source will be copied. + * + * @param resource $source The source stream + * @param resource $dest The destination stream + * @param int $maxlength Maximum bytes to copy + * @param int $offset The offset where to start to copy data + * @return int Returns the total count of bytes copied. + * @throws StreamException + * + */ +function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset = 0): int +{ + error_clear_last(); + $result = \stream_copy_to_stream($source, $dest, $maxlength, $offset); + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Adds filtername to the list of filters + * attached to stream. + * + * @param resource $stream The target stream. + * @param string $filtername The filter name. + * @param int $read_write By default, stream_filter_append will + * attach the filter to the read filter chain + * if the file was opened for reading (i.e. File Mode: + * r, and/or +). The filter + * will also be attached to the write filter chain + * if the file was opened for writing (i.e. File Mode: + * w, a, and/or +). + * STREAM_FILTER_READ, + * STREAM_FILTER_WRITE, and/or + * STREAM_FILTER_ALL can also be passed to the + * read_write parameter to override this behavior. + * @param mixed $params This filter will be added with the specified + * params to the end of + * the list and will therefore be called last during stream operations. + * To add a filter to the beginning of the list, use + * stream_filter_prepend. + * @return resource Returns a resource on success. The resource can be + * used to refer to this filter instance during a call to + * stream_filter_remove. + * + * FALSE is returned if stream is not a resource or + * if filtername cannot be located. + * @throws StreamException + * + */ +function stream_filter_append($stream, string $filtername, int $read_write = null, $params = null) +{ + error_clear_last(); + if ($params !== null) { + $result = \stream_filter_append($stream, $filtername, $read_write, $params); + } elseif ($read_write !== null) { + $result = \stream_filter_append($stream, $filtername, $read_write); + } else { + $result = \stream_filter_append($stream, $filtername); + } + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Adds filtername to the list of filters + * attached to stream. + * + * @param resource $stream The target stream. + * @param string $filtername The filter name. + * @param int $read_write By default, stream_filter_prepend will + * attach the filter to the read filter chain + * if the file was opened for reading (i.e. File Mode: + * r, and/or +). The filter + * will also be attached to the write filter chain + * if the file was opened for writing (i.e. File Mode: + * w, a, and/or +). + * STREAM_FILTER_READ, + * STREAM_FILTER_WRITE, and/or + * STREAM_FILTER_ALL can also be passed to the + * read_write parameter to override this behavior. + * See stream_filter_append for an example of + * using this parameter. + * @param mixed $params This filter will be added with the specified params + * to the beginning of the list and will therefore be + * called first during stream operations. To add a filter to the end of the + * list, use stream_filter_append. + * @return resource Returns a resource on success. The resource can be + * used to refer to this filter instance during a call to + * stream_filter_remove. + * + * FALSE is returned if stream is not a resource or + * if filtername cannot be located. + * @throws StreamException + * + */ +function stream_filter_prepend($stream, string $filtername, int $read_write = null, $params = null) +{ + error_clear_last(); + if ($params !== null) { + $result = \stream_filter_prepend($stream, $filtername, $read_write, $params); + } elseif ($read_write !== null) { + $result = \stream_filter_prepend($stream, $filtername, $read_write); + } else { + $result = \stream_filter_prepend($stream, $filtername); + } + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * stream_filter_register allows you to implement + * your own filter on any registered stream used with all the other + * filesystem functions (such as fopen, + * fread etc.). + * + * @param string $filtername The filter name to be registered. + * @param string $classname To implement a filter, you need to define a class as an extension of + * php_user_filter with a number of member + * functions. When performing read/write operations on the stream + * to which your filter is attached, PHP will pass the data through your + * filter (and any other filters attached to that stream) so that the + * data may be modified as desired. You must implement the methods + * exactly as described in php_user_filter - doing + * otherwise will lead to undefined behaviour. + * @throws StreamException + * + */ +function stream_filter_register(string $filtername, string $classname): void +{ + error_clear_last(); + $result = \stream_filter_register($filtername, $classname); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Removes a stream filter previously added to a stream with + * stream_filter_prepend or + * stream_filter_append. Any data remaining in the + * filter's internal buffer will be flushed through to the next filter before + * removing it. + * + * @param resource $stream_filter The stream filter to be removed. + * @throws StreamException + * + */ +function stream_filter_remove($stream_filter): void +{ + error_clear_last(); + $result = \stream_filter_remove($stream_filter); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Identical to file_get_contents, except that + * stream_get_contents operates on an already open + * stream resource and returns the remaining contents in a string, up to + * maxlength bytes and starting at the specified + * offset. + * + * @param resource $handle A stream resource (e.g. returned from fopen) + * @param int $maxlength The maximum bytes to read. Defaults to -1 (read all the remaining + * buffer). + * @param int $offset Seek to the specified offset before reading. If this number is negative, + * no seeking will occur and reading will start from the current position. + * @return string Returns a string. + * @throws StreamException + * + */ +function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): string +{ + error_clear_last(); + $result = \stream_get_contents($handle, $maxlength, $offset); + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Determines if stream stream refers to a valid terminal type device. + * This is a more portable version of posix_isatty, since it works on Windows systems too. + * + * @param resource $stream + * @throws StreamException + * + */ +function stream_isatty($stream): void +{ + error_clear_last(); + $result = \stream_isatty($stream); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Resolve filename against the include path according to the same rules as fopen/include. + * + * @param string $filename The filename to resolve. + * @return string Returns a string containing the resolved absolute filename. + * @throws StreamException + * + */ +function stream_resolve_include_path(string $filename): string +{ + error_clear_last(); + $result = \stream_resolve_include_path($filename); + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets blocking or non-blocking mode on a stream. + * + * This function works for any stream that supports non-blocking mode + * (currently, regular files and socket streams). + * + * @param resource $stream The stream. + * @param bool $mode If mode is FALSE, the given stream + * will be switched to non-blocking mode, and if TRUE, it + * will be switched to blocking mode. This affects calls like + * fgets and fread + * that read from the stream. In non-blocking mode an + * fgets call will always return right away + * while in blocking mode it will wait for data to become available + * on the stream. + * @throws StreamException + * + */ +function stream_set_blocking($stream, bool $mode): void +{ + error_clear_last(); + $result = \stream_set_blocking($stream, $mode); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Sets the timeout value on stream, + * expressed in the sum of seconds and + * microseconds. + * + * When the stream times out, the 'timed_out' key of the array returned by + * stream_get_meta_data is set to TRUE, although no + * error/warning is generated. + * + * @param resource $stream The target stream. + * @param int $seconds The seconds part of the timeout to be set. + * @param int $microseconds The microseconds part of the timeout to be set. + * @throws StreamException + * + */ +function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void +{ + error_clear_last(); + $result = \stream_set_timeout($stream, $seconds, $microseconds); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Accept a connection on a socket previously created by + * stream_socket_server. + * + * @param resource $server_socket The server socket to accept a connection from. + * @param float $timeout Override the default socket accept timeout. Time should be given in + * seconds. + * @param string|null $peername Will be set to the name (address) of the client which connected, if + * included and available from the selected transport. + * + * Can also be determined later using + * stream_socket_get_name. + * @return resource Returns a stream to the accepted socket connection. + * @throws StreamException + * + */ +function stream_socket_accept($server_socket, float $timeout = null, ?string &$peername = null) +{ + error_clear_last(); + if ($peername !== null) { + $result = \stream_socket_accept($server_socket, $timeout, $peername); + } elseif ($timeout !== null) { + $result = \stream_socket_accept($server_socket, $timeout); + } else { + $result = \stream_socket_accept($server_socket); + } + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Initiates a stream or datagram connection to the destination specified + * by remote_socket. The type of socket created + * is determined by the transport specified using standard URL formatting: + * transport://target. For Internet Domain sockets + * (AF_INET) such as TCP and UDP, the target portion + * of the remote_socket parameter should consist of + * a hostname or IP address followed by a colon and a port number. For Unix + * domain sockets, the target portion should point + * to the socket file on the filesystem. + * + * @param string $remote_socket Address to the socket to connect to. + * @param int $errno Will be set to the system level error number if connection fails. + * @param string $errstr Will be set to the system level error message if the connection fails. + * @param float $timeout Number of seconds until the connect() system call + * should timeout. + * + * + * This parameter only applies when not making asynchronous + * connection attempts. + * + * + * + * + * To set a timeout for reading/writing data over the socket, use the + * stream_set_timeout, as the + * timeout only applies while making connecting + * the socket. + * + * + * + * To set a timeout for reading/writing data over the socket, use the + * stream_set_timeout, as the + * timeout only applies while making connecting + * the socket. + * @param int $flags Bitmask field which may be set to any combination of connection flags. + * Currently the select of connection flags is limited to + * STREAM_CLIENT_CONNECT (default), + * STREAM_CLIENT_ASYNC_CONNECT and + * STREAM_CLIENT_PERSISTENT. + * @param resource $context A valid context resource created with stream_context_create. + * @return resource On success a stream resource is returned which may + * be used together with the other file functions (such as + * fgets, fgetss, + * fwrite, fclose, and + * feof), FALSE on failure. + * @throws StreamException + * + */ +function stream_socket_client(string $remote_socket, int &$errno = null, string &$errstr = null, float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null) +{ + error_clear_last(); + if ($context !== null) { + $result = \stream_socket_client($remote_socket, $errno, $errstr, $timeout, $flags, $context); + } elseif ($flags !== STREAM_CLIENT_CONNECT) { + $result = \stream_socket_client($remote_socket, $errno, $errstr, $timeout, $flags); + } elseif ($timeout !== null) { + $result = \stream_socket_client($remote_socket, $errno, $errstr, $timeout); + } else { + $result = \stream_socket_client($remote_socket, $errno, $errstr); + } + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * stream_socket_pair creates a pair of connected, + * indistinguishable socket streams. This function is commonly used in IPC + * (Inter-Process Communication). + * + * @param int $domain The protocol family to be used: STREAM_PF_INET, + * STREAM_PF_INET6 or + * STREAM_PF_UNIX + * @param int $type The type of communication to be used: + * STREAM_SOCK_DGRAM, + * STREAM_SOCK_RAW, + * STREAM_SOCK_RDM, + * STREAM_SOCK_SEQPACKET or + * STREAM_SOCK_STREAM + * @param int $protocol The protocol to be used: STREAM_IPPROTO_ICMP, + * STREAM_IPPROTO_IP, + * STREAM_IPPROTO_RAW, + * STREAM_IPPROTO_TCP or + * STREAM_IPPROTO_UDP + * @return resource[] Returns an array with the two socket resources on success. + * @throws StreamException + * + */ +function stream_socket_pair(int $domain, int $type, int $protocol): iterable +{ + error_clear_last(); + $result = \stream_socket_pair($domain, $type, $protocol); + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Creates a stream or datagram socket on the specified + * local_socket. + * + * This function only creates a socket, to begin accepting connections + * use stream_socket_accept. + * + * @param string $local_socket The type of socket created is determined by the transport specified + * using standard URL formatting: transport://target. + * + * For Internet Domain sockets (AF_INET) such as TCP and UDP, the + * target portion of the + * remote_socket parameter should consist of a + * hostname or IP address followed by a colon and a port number. For + * Unix domain sockets, the target portion should + * point to the socket file on the filesystem. + * + * Depending on the environment, Unix domain sockets may not be available. + * A list of available transports can be retrieved using + * stream_get_transports. See + * for a list of bulitin transports. + * @param int $errno If the optional errno and errstr + * arguments are present they will be set to indicate the actual system + * level error that occurred in the system-level socket(), + * bind(), and listen() calls. If + * the value returned in errno is + * 0 and the function returned FALSE, it is an + * indication that the error occurred before the bind() + * call. This is most likely due to a problem initializing the socket. + * Note that the errno and + * errstr arguments will always be passed by reference. + * @param string $errstr See errno description. + * @param int $flags A bitmask field which may be set to any combination of socket creation + * flags. + * + * For UDP sockets, you must use STREAM_SERVER_BIND as + * the flags parameter. + * @param resource $context + * @return resource Returns the created stream. + * @throws StreamException + * + */ +function stream_socket_server(string $local_socket, int &$errno = null, string &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) +{ + error_clear_last(); + if ($context !== null) { + $result = \stream_socket_server($local_socket, $errno, $errstr, $flags, $context); + } else { + $result = \stream_socket_server($local_socket, $errno, $errstr, $flags); + } + if ($result === false) { + throw StreamException::createFromPhpError(); + } + return $result; +} + + +/** + * Shutdowns (partially or not) a full-duplex connection. + * + * @param resource $stream An open stream (opened with stream_socket_client, + * for example) + * @param int $how One of the following constants: STREAM_SHUT_RD + * (disable further receptions), STREAM_SHUT_WR + * (disable further transmissions) or + * STREAM_SHUT_RDWR (disable further receptions and + * transmissions). + * @throws StreamException + * + */ +function stream_socket_shutdown($stream, int $how): void +{ + error_clear_last(); + $result = \stream_socket_shutdown($stream, $how); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Tells whether the stream supports locking through + * flock. + * + * @param resource $stream The stream to check. + * @throws StreamException + * + */ +function stream_supports_lock($stream): void +{ + error_clear_last(); + $result = \stream_supports_lock($stream); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Allows you to implement your own protocol handlers and streams for use + * with all the other filesystem functions (such as fopen, + * fread etc.). + * + * @param string $protocol The wrapper name to be registered. + * @param string $classname The classname which implements the protocol. + * @param int $flags Should be set to STREAM_IS_URL if + * protocol is a URL protocol. Default is 0, local + * stream. + * @throws StreamException + * + */ +function stream_wrapper_register(string $protocol, string $classname, int $flags = 0): void +{ + error_clear_last(); + $result = \stream_wrapper_register($protocol, $classname, $flags); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Restores a built-in wrapper previously unregistered with + * stream_wrapper_unregister. + * + * @param string $protocol + * @throws StreamException + * + */ +function stream_wrapper_restore(string $protocol): void +{ + error_clear_last(); + $result = \stream_wrapper_restore($protocol); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} + + +/** + * Allows you to disable an already defined stream wrapper. Once the wrapper + * has been disabled you may override it with a user-defined wrapper using + * stream_wrapper_register or reenable it later on with + * stream_wrapper_restore. + * + * @param string $protocol + * @throws StreamException + * + */ +function stream_wrapper_unregister(string $protocol): void +{ + error_clear_last(); + $result = \stream_wrapper_unregister($protocol); + if ($result === false) { + throw StreamException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/strings.php b/vendor/thecodingmachine/safe/generated/strings.php new file mode 100644 index 000000000..9bc728415 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/strings.php @@ -0,0 +1,846 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\StringsException; + +/** + * convert_uudecode decodes a uuencoded string. + * + * @param string $data The uuencoded data. + * @return string Returns the decoded data as a string. + * @throws StringsException + * + */ +function convert_uudecode(string $data): string +{ + error_clear_last(); + $result = \convert_uudecode($data); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * convert_uuencode encodes a string using the uuencode + * algorithm. + * + * Uuencode translates all strings (including binary data) into printable + * characters, making them safe for network transmissions. Uuencoded data is + * about 35% larger than the original. + * + * @param string $data The data to be encoded. + * @return string Returns the uuencoded data. + * @throws StringsException + * + */ +function convert_uuencode(string $data): string +{ + error_clear_last(); + $result = \convert_uuencode($data); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Decodes a hexadecimally encoded binary string. + * + * @param string $data Hexadecimal representation of data. + * @return string Returns the binary representation of the given data. + * @throws StringsException + * + */ +function hex2bin(string $data): string +{ + error_clear_last(); + $result = \hex2bin($data); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Calculates the MD5 hash of the file specified by the + * filename parameter using the + * RSA Data Security, Inc. + * MD5 Message-Digest Algorithm, and returns that hash. + * The hash is a 32-character hexadecimal number. + * + * @param string $filename The filename + * @param bool $raw_output When TRUE, returns the digest in raw binary format with a length of + * 16. + * @return string Returns a string on success, FALSE otherwise. + * @throws StringsException + * + */ +function md5_file(string $filename, bool $raw_output = false): string +{ + error_clear_last(); + $result = \md5_file($filename, $raw_output); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Calculates the metaphone key of str. + * + * Similar to soundex metaphone creates the same key for + * similar sounding words. It's more accurate than + * soundex as it knows the basic rules of English + * pronunciation. The metaphone generated keys are of variable length. + * + * Metaphone was developed by Lawrence Philips + * <lphilips at verity dot com>. It is described in ["Practical + * Algorithms for Programmers", Binstock & Rex, Addison Wesley, + * 1995]. + * + * @param string $str The input string. + * @param int $phonemes This parameter restricts the returned metaphone key to + * phonemes characters in length. + * The default value of 0 means no restriction. + * @return string Returns the metaphone key as a string. + * @throws StringsException + * + */ +function metaphone(string $str, int $phonemes = 0): string +{ + error_clear_last(); + $result = \metaphone($str, $phonemes); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $filename The filename of the file to hash. + * @param bool $raw_output When TRUE, returns the digest in raw binary format with a length of + * 20. + * @return string Returns a string on success, FALSE otherwise. + * @throws StringsException + * + */ +function sha1_file(string $filename, bool $raw_output = false): string +{ + error_clear_last(); + $result = \sha1_file($filename, $raw_output); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Calculates the soundex key of str. + * + * Soundex keys have the property that words pronounced similarly + * produce the same soundex key, and can thus be used to simplify + * searches in databases where you know the pronunciation but not + * the spelling. This soundex function returns a string 4 characters + * long, starting with a letter. + * + * This particular soundex function is one described by Donald Knuth + * in "The Art Of Computer Programming, vol. 3: Sorting And + * Searching", Addison-Wesley (1973), pp. 391-392. + * + * @param string $str The input string. + * @return string Returns the soundex key as a string. + * @throws StringsException + * + */ +function soundex(string $str): string +{ + error_clear_last(); + $result = \soundex($str); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns a string produced according to the formatting string + * format. + * + * @param string $format The format string is composed of zero or more directives: + * ordinary characters (excluding %) that are + * copied directly to the result and conversion + * specifications, each of which results in fetching its + * own parameter. + * + * A conversion specification follows this prototype: + * %[argnum$][flags][width][.precision]specifier. + * + * An integer followed by a dollar sign $, + * to specify which number argument to treat in the conversion. + * + * + * Flags + * + * + * + * Flag + * Description + * + * + * + * + * - + * + * Left-justify within the given field width; + * Right justification is the default + * + * + * + * + + * + * Prefix positive numbers with a plus sign + * +; Default only negative + * are prefixed with a negative sign. + * + * + * + * (space) + * + * Pads the result with spaces. + * This is the default. + * + * + * + * 0 + * + * Only left-pads numbers with zeros. + * With s specifiers this can + * also right-pad with zeros. + * + * + * + * '(char) + * + * Pads the result with the character (char). + * + * + * + * + * + * + * An integer that says how many characters (minimum) + * this conversion should result in. + * + * A period . followed by an integer + * who's meaning depends on the specifier: + * + * + * + * For e, E, + * f and F + * specifiers: this is the number of digits to be printed + * after the decimal point (by default, this is 6). + * + * + * + * + * For g and G + * specifiers: this is the maximum number of significant + * digits to be printed. + * + * + * + * + * For s specifier: it acts as a cutoff point, + * setting a maximum character limit to the string. + * + * + * + * + * + * If the period is specified without an explicit value for precision, + * 0 is assumed. + * + * + * + * + * Specifiers + * + * + * + * Specifier + * Description + * + * + * + * + * % + * + * A literal percent character. No argument is required. + * + * + * + * b + * + * The argument is treated as an integer and presented + * as a binary number. + * + * + * + * c + * + * The argument is treated as an integer and presented + * as the character with that ASCII. + * + * + * + * d + * + * The argument is treated as an integer and presented + * as a (signed) decimal number. + * + * + * + * e + * + * The argument is treated as scientific notation (e.g. 1.2e+2). + * The precision specifier stands for the number of digits after the + * decimal point since PHP 5.2.1. In earlier versions, it was taken as + * number of significant digits (one less). + * + * + * + * E + * + * Like the e specifier but uses + * uppercase letter (e.g. 1.2E+2). + * + * + * + * f + * + * The argument is treated as a float and presented + * as a floating-point number (locale aware). + * + * + * + * F + * + * The argument is treated as a float and presented + * as a floating-point number (non-locale aware). + * Available as of PHP 5.0.3. + * + * + * + * g + * + * + * General format. + * + * + * Let P equal the precision if nonzero, 6 if the precision is omitted, + * or 1 if the precision is zero. + * Then, if a conversion with style E would have an exponent of X: + * + * + * If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). + * Otherwise, the conversion is with style e and precision P − 1. + * + * + * + * + * G + * + * Like the g specifier but uses + * E and f. + * + * + * + * o + * + * The argument is treated as an integer and presented + * as an octal number. + * + * + * + * s + * + * The argument is treated and presented as a string. + * + * + * + * u + * + * The argument is treated as an integer and presented + * as an unsigned decimal number. + * + * + * + * x + * + * The argument is treated as an integer and presented + * as a hexadecimal number (with lowercase letters). + * + * + * + * X + * + * The argument is treated as an integer and presented + * as a hexadecimal number (with uppercase letters). + * + * + * + * + * + * + * General format. + * + * Let P equal the precision if nonzero, 6 if the precision is omitted, + * or 1 if the precision is zero. + * Then, if a conversion with style E would have an exponent of X: + * + * If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). + * Otherwise, the conversion is with style e and precision P − 1. + * + * The c type specifier ignores padding and width + * + * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results + * + * Variables will be co-erced to a suitable type for the specifier: + * + * Type Handling + * + * + * + * Type + * Specifiers + * + * + * + * + * string + * s + * + * + * integer + * + * d, + * u, + * c, + * o, + * x, + * X, + * b + * + * + * + * double + * + * g, + * G, + * e, + * E, + * f, + * F + * + * + * + * + * + * @param mixed $params + * @return string Returns a string produced according to the formatting string + * format. + * @throws StringsException + * + */ +function sprintf(string $format, ...$params): string +{ + error_clear_last(); + if ($params !== []) { + $result = \sprintf($format, ...$params); + } else { + $result = \sprintf($format); + } + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the portion of string specified by the + * start and length parameters. + * + * @param string $string The input string. + * @param int $start If start is non-negative, the returned string + * will start at the start'th position in + * string, counting from zero. For instance, + * in the string 'abcdef', the character at + * position 0 is 'a', the + * character at position 2 is + * 'c', and so forth. + * + * If start is negative, the returned string + * will start at the start'th character + * from the end of string. + * + * If string is less than + * start characters long, FALSE will be returned. + * + * + * Using a negative start + * + * + * ]]> + * + * + * @param int $length If length is given and is positive, the string + * returned will contain at most length characters + * beginning from start (depending on the length of + * string). + * + * If length is given and is negative, then that many + * characters will be omitted from the end of string + * (after the start position has been calculated when a + * start is negative). If + * start denotes the position of this truncation or + * beyond, FALSE will be returned. + * + * If length is given and is 0, + * FALSE or NULL, an empty string will be returned. + * + * If length is omitted, the substring starting from + * start until the end of the string will be + * returned. + * @return string Returns the extracted part of string;, or + * an empty string. + * @throws StringsException + * + */ +function substr(string $string, int $start, int $length = null): string +{ + error_clear_last(); + if ($length !== null) { + $result = \substr($string, $start, $length); + } else { + $result = \substr($string, $start); + } + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Operates as sprintf but accepts an array of + * arguments, rather than a variable number of arguments. + * + * @param string $format The format string is composed of zero or more directives: + * ordinary characters (excluding %) that are + * copied directly to the result and conversion + * specifications, each of which results in fetching its + * own parameter. + * + * A conversion specification follows this prototype: + * %[argnum$][flags][width][.precision]specifier. + * + * An integer followed by a dollar sign $, + * to specify which number argument to treat in the conversion. + * + * + * Flags + * + * + * + * Flag + * Description + * + * + * + * + * - + * + * Left-justify within the given field width; + * Right justification is the default + * + * + * + * + + * + * Prefix positive numbers with a plus sign + * +; Default only negative + * are prefixed with a negative sign. + * + * + * + * (space) + * + * Pads the result with spaces. + * This is the default. + * + * + * + * 0 + * + * Only left-pads numbers with zeros. + * With s specifiers this can + * also right-pad with zeros. + * + * + * + * '(char) + * + * Pads the result with the character (char). + * + * + * + * + * + * + * An integer that says how many characters (minimum) + * this conversion should result in. + * + * A period . followed by an integer + * who's meaning depends on the specifier: + * + * + * + * For e, E, + * f and F + * specifiers: this is the number of digits to be printed + * after the decimal point (by default, this is 6). + * + * + * + * + * For g and G + * specifiers: this is the maximum number of significant + * digits to be printed. + * + * + * + * + * For s specifier: it acts as a cutoff point, + * setting a maximum character limit to the string. + * + * + * + * + * + * If the period is specified without an explicit value for precision, + * 0 is assumed. + * + * + * + * + * Specifiers + * + * + * + * Specifier + * Description + * + * + * + * + * % + * + * A literal percent character. No argument is required. + * + * + * + * b + * + * The argument is treated as an integer and presented + * as a binary number. + * + * + * + * c + * + * The argument is treated as an integer and presented + * as the character with that ASCII. + * + * + * + * d + * + * The argument is treated as an integer and presented + * as a (signed) decimal number. + * + * + * + * e + * + * The argument is treated as scientific notation (e.g. 1.2e+2). + * The precision specifier stands for the number of digits after the + * decimal point since PHP 5.2.1. In earlier versions, it was taken as + * number of significant digits (one less). + * + * + * + * E + * + * Like the e specifier but uses + * uppercase letter (e.g. 1.2E+2). + * + * + * + * f + * + * The argument is treated as a float and presented + * as a floating-point number (locale aware). + * + * + * + * F + * + * The argument is treated as a float and presented + * as a floating-point number (non-locale aware). + * Available as of PHP 5.0.3. + * + * + * + * g + * + * + * General format. + * + * + * Let P equal the precision if nonzero, 6 if the precision is omitted, + * or 1 if the precision is zero. + * Then, if a conversion with style E would have an exponent of X: + * + * + * If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). + * Otherwise, the conversion is with style e and precision P − 1. + * + * + * + * + * G + * + * Like the g specifier but uses + * E and f. + * + * + * + * o + * + * The argument is treated as an integer and presented + * as an octal number. + * + * + * + * s + * + * The argument is treated and presented as a string. + * + * + * + * u + * + * The argument is treated as an integer and presented + * as an unsigned decimal number. + * + * + * + * x + * + * The argument is treated as an integer and presented + * as a hexadecimal number (with lowercase letters). + * + * + * + * X + * + * The argument is treated as an integer and presented + * as a hexadecimal number (with uppercase letters). + * + * + * + * + * + * + * General format. + * + * Let P equal the precision if nonzero, 6 if the precision is omitted, + * or 1 if the precision is zero. + * Then, if a conversion with style E would have an exponent of X: + * + * If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). + * Otherwise, the conversion is with style e and precision P − 1. + * + * The c type specifier ignores padding and width + * + * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results + * + * Variables will be co-erced to a suitable type for the specifier: + * + * Type Handling + * + * + * + * Type + * Specifiers + * + * + * + * + * string + * s + * + * + * integer + * + * d, + * u, + * c, + * o, + * x, + * X, + * b + * + * + * + * double + * + * g, + * G, + * e, + * E, + * f, + * F + * + * + * + * + * + * @param array $args + * @return string Return array values as a formatted string according to + * format. + * @throws StringsException + * + */ +function vsprintf(string $format, array $args): string +{ + error_clear_last(); + $result = \vsprintf($format, $args); + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/swoole.php b/vendor/thecodingmachine/safe/generated/swoole.php new file mode 100644 index 000000000..334d96bd9 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/swoole.php @@ -0,0 +1,108 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\SwooleException; + +/** + * + * + * @param string $filename The filename being written. + * @param string $content The content writing to the file. + * @param int $offset The offset. + * @param callable $callback + * @throws SwooleException + * + */ +function swoole_async_write(string $filename, string $content, int $offset = null, callable $callback = null): void +{ + error_clear_last(); + if ($callback !== null) { + $result = \swoole_async_write($filename, $content, $offset, $callback); + } elseif ($offset !== null) { + $result = \swoole_async_write($filename, $content, $offset); + } else { + $result = \swoole_async_write($filename, $content); + } + if ($result === false) { + throw SwooleException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $filename The filename being written. + * @param string $content The content writing to the file. + * @param callable $callback + * @param int $flags + * @throws SwooleException + * + */ +function swoole_async_writefile(string $filename, string $content, callable $callback = null, int $flags = 0): void +{ + error_clear_last(); + if ($flags !== 0) { + $result = \swoole_async_writefile($filename, $content, $callback, $flags); + } elseif ($callback !== null) { + $result = \swoole_async_writefile($filename, $content, $callback); + } else { + $result = \swoole_async_writefile($filename, $content); + } + if ($result === false) { + throw SwooleException::createFromPhpError(); + } +} + + +/** + * + * + * @param callable $callback + * @throws SwooleException + * + */ +function swoole_event_defer(callable $callback): void +{ + error_clear_last(); + $result = \swoole_event_defer($callback); + if ($result === false) { + throw SwooleException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $fd + * @throws SwooleException + * + */ +function swoole_event_del(int $fd): void +{ + error_clear_last(); + $result = \swoole_event_del($fd); + if ($result === false) { + throw SwooleException::createFromPhpError(); + } +} + + +/** + * + * + * @param int $fd + * @param string $data + * @throws SwooleException + * + */ +function swoole_event_write(int $fd, string $data): void +{ + error_clear_last(); + $result = \swoole_event_write($fd, $data); + if ($result === false) { + throw SwooleException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/uodbc.php b/vendor/thecodingmachine/safe/generated/uodbc.php new file mode 100644 index 000000000..89775c825 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/uodbc.php @@ -0,0 +1,1009 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\UodbcException; + +/** + * Toggles autocommit behaviour. + * + * By default, auto-commit is on for a connection. Disabling + * auto-commit is equivalent with starting a transaction. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param bool $OnOff If OnOff is TRUE, auto-commit is enabled, if + * it is FALSE auto-commit is disabled. + * @return mixed Without the OnOff parameter, this function returns + * auto-commit status for connection_id. Non-zero is + * returned if auto-commit is on, 0 if it is off, or FALSE if an error + * occurs. + * + * If OnOff is set, this function returns TRUE on + * success. + * @throws UodbcException + * + */ +function odbc_autocommit($connection_id, bool $OnOff = false) +{ + error_clear_last(); + $result = \odbc_autocommit($connection_id, $OnOff); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Controls handling of binary column data. ODBC SQL types affected are + * BINARY, VARBINARY, and + * LONGVARBINARY. + * The default mode can be set using the + * uodbc.defaultbinmode php.ini directive. + * + * When binary SQL data is converted to character C data (ODBC_BINMODE_CONVERT), each byte + * (8 bits) of source data is represented as two ASCII characters. + * These characters are the ASCII character representation of the + * number in its hexadecimal form. For example, a binary + * 00000001 is converted to + * "01" and a binary 11111111 + * is converted to "FF". + * + * While the handling of BINARY and VARBINARY + * columns only depend on the binmode, the handling of LONGVARBINARY + * columns also depends on the longreadlen as well: + * + * LONGVARBINARY handling + * + * + * + * binmode + * longreadlen + * result + * + * + * + * + * ODBC_BINMODE_PASSTHRU + * 0 + * passthru + * + * + * ODBC_BINMODE_RETURN + * 0 + * passthru + * + * + * ODBC_BINMODE_CONVERT + * 0 + * passthru + * + * + * ODBC_BINMODE_PASSTHRU + * >0 + * passthru + * + * + * ODBC_BINMODE_RETURN + * >0 + * return as is + * + * + * ODBC_BINMODE_CONVERT + * >0 + * return as char + * + * + * + * + * + * If odbc_fetch_into is used, passthru means that an + * empty string is returned for these columns. + * If odbc_result is used, passthru means that the data are + * sent directly to the client (i.e. printed). + * + * @param int $result_id The result identifier. + * + * If result_id is 0, the + * settings apply as default for new results. + * @param int $mode Possible values for mode are: + * + * + * + * ODBC_BINMODE_PASSTHRU: Passthru BINARY data + * + * + * + * + * ODBC_BINMODE_RETURN: Return as is + * + * + * + * + * ODBC_BINMODE_CONVERT: Convert to char and return + * + * + * + * + * + * Handling of binary long + * columns is also affected by odbc_longreadlen. + * + * + * @throws UodbcException + * + */ +function odbc_binmode(int $result_id, int $mode): void +{ + error_clear_last(); + $result = \odbc_binmode($result_id, $mode); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } +} + + +/** + * Lists columns and associated privileges for the given table. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $table_name The table name. + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $column_name The column name. + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @return resource Returns an ODBC result identifier. + * This result identifier can be used to fetch a list of columns and + * associated privileges. + * + * The result set has the following columns: + * + * TABLE_CAT + * TABLE_SCHEM + * TABLE_NAME + * COLUMN_NAME + * GRANTOR + * GRANTEE + * PRIVILEGE + * IS_GRANTABLE + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_columnprivileges($connection_id, string $catalog, string $schema, string $table_name, string $column_name) +{ + error_clear_last(); + $result = \odbc_columnprivileges($connection_id, $catalog, $schema, $table_name, $column_name); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Lists all columns in the requested range. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $table_name The table name. + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $column_name The column name. + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @return resource Returns an ODBC result identifier. + * + * The result set has the following columns: + * + * TABLE_CAT + * TABLE_SCHEM + * TABLE_NAME + * COLUMN_NAME + * DATA_TYPE + * TYPE_NAME + * COLUMN_SIZE + * BUFFER_LENGTH + * DECIMAL_DIGITS + * NUM_PREC_RADIX + * NULLABLE + * REMARKS + * COLUMN_DEF + * SQL_DATA_TYPE + * SQL_DATETIME_SUB + * CHAR_OCTET_LENGTH + * ORDINAL_POSITION + * IS_NULLABLE + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_columns($connection_id, string $catalog = null, string $schema = null, string $table_name = null, string $column_name = null) +{ + error_clear_last(); + if ($column_name !== null) { + $result = \odbc_columns($connection_id, $catalog, $schema, $table_name, $column_name); + } elseif ($table_name !== null) { + $result = \odbc_columns($connection_id, $catalog, $schema, $table_name); + } elseif ($schema !== null) { + $result = \odbc_columns($connection_id, $catalog, $schema); + } elseif ($catalog !== null) { + $result = \odbc_columns($connection_id, $catalog); + } else { + $result = \odbc_columns($connection_id); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Commits all pending transactions on the connection. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @throws UodbcException + * + */ +function odbc_commit($connection_id): void +{ + error_clear_last(); + $result = \odbc_commit($connection_id); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } +} + + +/** + * This function will return the list of available DSN (after calling it + * several times). + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param int $fetch_type The fetch_type can be one of two constant types: + * SQL_FETCH_FIRST, SQL_FETCH_NEXT. + * Use SQL_FETCH_FIRST the first time this function is + * called, thereafter use the SQL_FETCH_NEXT. + * @return array Returns FALSE on error, an array upon success, and NULL after fetching + * the last available DSN. + * @throws UodbcException + * + */ +function odbc_data_source($connection_id, int $fetch_type): array +{ + error_clear_last(); + $result = \odbc_data_source($connection_id, $fetch_type); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Sends an SQL statement to the database server. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $query_string The SQL statement. + * @param int $flags This parameter is currently not used. + * @return resource Returns an ODBC result identifier if the SQL command was executed + * successfully. + * @throws UodbcException + * + */ +function odbc_exec($connection_id, string $query_string, int $flags = null) +{ + error_clear_last(); + if ($flags !== null) { + $result = \odbc_exec($connection_id, $query_string, $flags); + } else { + $result = \odbc_exec($connection_id, $query_string); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Executes a statement prepared with odbc_prepare. + * + * @param resource $result_id The result id resource, from odbc_prepare. + * @param array $parameters_array Parameters in parameter_array will be + * substituted for placeholders in the prepared statement in order. + * Elements of this array will be converted to strings by calling this + * function. + * + * Any parameters in parameter_array which + * start and end with single quotes will be taken as the name of a + * file to read and send to the database server as the data for the + * appropriate placeholder. + * @throws UodbcException + * + */ +function odbc_execute($result_id, array $parameters_array = null): void +{ + error_clear_last(); + if ($parameters_array !== null) { + $result = \odbc_execute($result_id, $parameters_array); + } else { + $result = \odbc_execute($result_id); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } +} + + +/** + * Fetch one result row into array. + * + * @param resource $result_id The result resource. + * @param array|null $result_array The result array + * that can be of any type since it will be converted to type + * array. The array will contain the column values starting at array + * index 0. + * @param int $rownumber The row number. + * @return int Returns the number of columns in the result; + * FALSE on error. + * @throws UodbcException + * + */ +function odbc_fetch_into($result_id, ?array &$result_array, int $rownumber = null): int +{ + error_clear_last(); + if ($rownumber !== null) { + $result = \odbc_fetch_into($result_id, $result_array, $rownumber); + } else { + $result = \odbc_fetch_into($result_id, $result_array); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the length of the field referenced by number in the given result + * identifier. + * + * @param resource $result_id The result identifier. + * @param int $field_number The field number. Field numbering starts at 1. + * @return int Returns the field length. + * @throws UodbcException + * + */ +function odbc_field_len($result_id, int $field_number): int +{ + error_clear_last(); + $result = \odbc_field_len($result_id, $field_number); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the name of the field occupying the given column number in the given + * result identifier. + * + * @param resource $result_id The result identifier. + * @param int $field_number The field number. Field numbering starts at 1. + * @return string Returns the field name as a string. + * @throws UodbcException + * + */ +function odbc_field_name($result_id, int $field_number): string +{ + error_clear_last(); + $result = \odbc_field_name($result_id, $field_number); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the number of the column slot that corresponds to the named field in + * the given result identifier. + * + * @param resource $result_id The result identifier. + * @param string $field_name The field name. + * @return int Returns the field number as a integer. + * Field numbering starts at 1. + * @throws UodbcException + * + */ +function odbc_field_num($result_id, string $field_name): int +{ + error_clear_last(); + $result = \odbc_field_num($result_id, $field_name); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the scale of the field referenced by number in the given result + * identifier. + * + * @param resource $result_id The result identifier. + * @param int $field_number The field number. Field numbering starts at 1. + * @return int Returns the field scale as a integer. + * @throws UodbcException + * + */ +function odbc_field_scale($result_id, int $field_number): int +{ + error_clear_last(); + $result = \odbc_field_scale($result_id, $field_number); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the SQL type of the field referenced by number in the given result + * identifier. + * + * @param resource $result_id The result identifier. + * @param int $field_number The field number. Field numbering starts at 1. + * @return string Returns the field type as a string. + * @throws UodbcException + * + */ +function odbc_field_type($result_id, int $field_number): string +{ + error_clear_last(); + $result = \odbc_field_type($result_id, $field_number); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves a list of foreign keys in the specified table or a list of + * foreign keys in other tables that refer to the primary key in the + * specified table + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $pk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the primary key table. + * @param string $pk_schema The schema ('owner' in ODBC 2 parlance) of the primary key table. + * @param string $pk_table The primary key table. + * @param string $fk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the foreign key table. + * @param string $fk_schema The schema ('owner' in ODBC 2 parlance) of the foreign key table. + * @param string $fk_table The foreign key table. + * @return resource Returns an ODBC result identifier. + * + * The result set has the following columns: + * + * PKTABLE_CAT + * PKTABLE_SCHEM + * PKTABLE_NAME + * PKCOLUMN_NAME + * FKTABLE_CAT + * FKTABLE_SCHEM + * FKTABLE_NAME + * FKCOLUMN_NAME + * KEY_SEQ + * UPDATE_RULE + * DELETE_RULE + * FK_NAME + * PK_NAME + * DEFERRABILITY + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_foreignkeys($connection_id, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) +{ + error_clear_last(); + $result = \odbc_foreignkeys($connection_id, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Retrieves information about data types supported by the data source. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param int $data_type The data type, which can be used to restrict the information to a + * single data type. + * @return resource Returns an ODBC result identifier. + * + * The result set has the following columns: + * + * TYPE_NAME + * DATA_TYPE + * PRECISION + * LITERAL_PREFIX + * LITERAL_SUFFIX + * CREATE_PARAMS + * NULLABLE + * CASE_SENSITIVE + * SEARCHABLE + * UNSIGNED_ATTRIBUTE + * MONEY + * AUTO_INCREMENT + * LOCAL_TYPE_NAME + * MINIMUM_SCALE + * MAXIMUM_SCALE + * + * + * The result set is ordered by DATA_TYPE and TYPE_NAME. + * @throws UodbcException + * + */ +function odbc_gettypeinfo($connection_id, int $data_type = null) +{ + error_clear_last(); + if ($data_type !== null) { + $result = \odbc_gettypeinfo($connection_id, $data_type); + } else { + $result = \odbc_gettypeinfo($connection_id); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Controls handling of LONG, LONGVARCHAR and LONGVARBINARY columns. + * The default length can be set using the + * uodbc.defaultlrl php.ini directive. + * + * @param resource $result_id The result identifier. + * @param int $length The number of bytes returned to PHP is controlled by the parameter + * length. If it is set to 0, long column data is passed through to the + * client (i.e. printed) when retrieved with odbc_result. + * @throws UodbcException + * + */ +function odbc_longreadlen($result_id, int $length): void +{ + error_clear_last(); + $result = \odbc_longreadlen($result_id, $length); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } +} + + +/** + * Prepares a statement for execution. The result identifier can be used + * later to execute the statement with odbc_execute. + * + * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support + * stored procedures that accept parameters of type IN, INOUT, and OUT as + * defined by the ODBC specification. However, the Unified ODBC driver + * currently only supports parameters of type IN to stored procedures. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $query_string The query string statement being prepared. + * @return resource Returns an ODBC result identifier if the SQL command was prepared + * successfully. + * @throws UodbcException + * + */ +function odbc_prepare($connection_id, string $query_string) +{ + error_clear_last(); + $result = \odbc_prepare($connection_id, $query_string); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns a result identifier that can be used to fetch the column names + * that comprise the primary key for a table. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param string $table + * @return resource Returns an ODBC result identifier. + * + * The result set has the following columns: + * + * TABLE_CAT + * TABLE_SCHEM + * TABLE_NAME + * COLUMN_NAME + * KEY_SEQ + * PK_NAME + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_primarykeys($connection_id, string $catalog, string $schema, string $table) +{ + error_clear_last(); + $result = \odbc_primarykeys($connection_id, $catalog, $schema, $table); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Prints all rows from a result identifier produced by + * odbc_exec. The result is printed in HTML table format. + * The data is not escaped. + * + * This function is not supposed to be used in production environments; it is + * merely meant for development purposes, to get a result set quickly rendered. + * + * @param resource $result_id The result identifier. + * @param string $format Additional overall table formatting. + * @return int Returns the number of rows in the result. + * @throws UodbcException + * + */ +function odbc_result_all($result_id, string $format = null): int +{ + error_clear_last(); + if ($format !== null) { + $result = \odbc_result_all($result_id, $format); + } else { + $result = \odbc_result_all($result_id); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Get result data + * + * @param resource $result_id The ODBC resource. + * @param mixed $field The field name being retrieved. It can either be an integer containing + * the column number of the field you want; or it can be a string + * containing the name of the field. + * @return mixed Returns the string contents of the field, FALSE on error, NULL for + * NULL data, or TRUE for binary data. + * @throws UodbcException + * + */ +function odbc_result($result_id, $field) +{ + error_clear_last(); + $result = \odbc_result($result_id, $field); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Rolls back all pending statements on the connection. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @throws UodbcException + * + */ +function odbc_rollback($connection_id): void +{ + error_clear_last(); + $result = \odbc_rollback($connection_id); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } +} + + +/** + * This function allows fiddling with the ODBC options for a + * particular connection or query result. It was written to help + * find work around to problems in quirky ODBC drivers. You should + * probably only use this function if you are an ODBC programmer and + * understand the effects the various options will have. You will + * certainly need a good ODBC reference to explain all the different + * options and values that can be used. Different driver versions + * support different options. + * + * Because the effects may vary depending on the ODBC driver, use of + * this function in scripts to be made publicly available is + * strongly discouraged. Also, some ODBC options are not available + * to this function because they must be set before the connection + * is established or the query is prepared. However, if on a + * particular job it can make PHP work so your boss doesn't tell you + * to use a commercial product, that's all that really + * matters. + * + * @param resource $id Is a connection id or result id on which to change the settings. + * For SQLSetConnectOption(), this is a connection id. + * For SQLSetStmtOption(), this is a result id. + * @param int $function Is the ODBC function to use. The value should be + * 1 for SQLSetConnectOption() and + * 2 for SQLSetStmtOption(). + * @param int $option The option to set. + * @param int $param The value for the given option. + * @throws UodbcException + * + */ +function odbc_setoption($id, int $function, int $option, int $param): void +{ + error_clear_last(); + $result = \odbc_setoption($id, $function, $option, $param); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } +} + + +/** + * Retrieves either the optimal set of columns that uniquely identifies a + * row in the table, or columns that are automatically updated when any + * value in the row is updated by a transaction. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param int $type + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param string $table The table. + * @param int $scope The scope, which orders the result set. + * One of SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION + * or SQL_SCOPE_SESSION. + * @param int $nullable Determines whether to return special columns that can have a NULL value. + * One of SQL_NO_NULLS or SQL_NULLABLE . + * @return resource Returns an ODBC result identifier. + * + * The result set has the following columns: + * + * SCOPE + * COLUMN_NAME + * DATA_TYPE + * TYPE_NAME + * COLUMN_SIZE + * BUFFER_LENGTH + * DECIMAL_DIGITS + * PSEUDO_COLUMN + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_specialcolumns($connection_id, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable) +{ + error_clear_last(); + $result = \odbc_specialcolumns($connection_id, $type, $catalog, $schema, $table, $scope, $nullable); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Get statistics about a table and its indexes. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param string $table_name The table name. + * @param int $unique The type of the index. + * One of SQL_INDEX_UNIQUE or SQL_INDEX_ALL. + * @param int $accuracy One of SQL_ENSURE or SQL_QUICK. + * The latter requests that the driver retrieve the CARDINALITY and + * PAGES only if they are readily available from the server. + * @return resource Returns an ODBC result identifier. + * + * The result set has the following columns: + * + * TABLE_CAT + * TABLE_SCHEM + * TABLE_NAME + * NON_UNIQUE + * INDEX_QUALIFIER + * INDEX_NAME + * TYPE + * ORDINAL_POSITION + * COLUMN_NAME + * ASC_OR_DESC + * CARDINALITY + * PAGES + * FILTER_CONDITION + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_statistics($connection_id, string $catalog, string $schema, string $table_name, int $unique, int $accuracy) +{ + error_clear_last(); + $result = \odbc_statistics($connection_id, $catalog, $schema, $table_name, $unique, $accuracy); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Lists tables in the requested range and the privileges associated + * with each table. + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $name The name. + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @return resource An ODBC result identifier. + * + * The result set has the following columns: + * + * TABLE_CAT + * TABLE_SCHEM + * TABLE_NAME + * GRANTOR + * GRANTEE + * PRIVILEGE + * IS_GRANTABLE + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_tableprivileges($connection_id, string $catalog, string $schema, string $name) +{ + error_clear_last(); + $result = \odbc_tableprivileges($connection_id, $catalog, $schema, $name); + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} + + +/** + * Lists all tables in the requested range. + * + * To support enumeration of qualifiers, owners, and table types, + * the following special semantics for the + * catalog, schema, + * name, and + * table_type are available: + * + * + * + * If catalog is a single percent + * character (%) and schema and + * name are empty strings, then the result + * set contains a list of valid qualifiers for the data + * source. (All columns except the TABLE_QUALIFIER column contain + * NULLs.) + * + * + * + * + * If schema is a single percent character + * (%) and catalog and + * name are empty strings, then the result + * set contains a list of valid owners for the data source. (All + * columns except the TABLE_OWNER column contain + * NULLs.) + * + * + * + * + * If table_type is a single percent + * character (%) and catalog, + * schema and name + * are empty strings, then the result set contains a list of + * valid table types for the data source. (All columns except the + * TABLE_TYPE column contain NULLs.) + * + * + * + * + * @param resource $connection_id The ODBC connection identifier, + * see odbc_connect for details. + * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). + * @param string $schema The schema ('owner' in ODBC 2 parlance). + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $name The name. + * This parameter accepts the following search patterns: + * % to match zero or more characters, + * and _ to match a single character. + * @param string $types If table_type is not an empty string, it + * must contain a list of comma-separated values for the types of + * interest; each value may be enclosed in single quotes (') or + * unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the + * data source does not support a specified table type, + * odbc_tables does not return any results for + * that type. + * @return resource Returns an ODBC result identifier containing the information. + * + * The result set has the following columns: + * + * TABLE_CAT + * TABLE_SCHEM + * TABLE_NAME + * TABLE_TYPE + * REMARKS + * + * Drivers can report additional columns. + * @throws UodbcException + * + */ +function odbc_tables($connection_id, string $catalog = null, string $schema = null, string $name = null, string $types = null) +{ + error_clear_last(); + if ($types !== null) { + $result = \odbc_tables($connection_id, $catalog, $schema, $name, $types); + } elseif ($name !== null) { + $result = \odbc_tables($connection_id, $catalog, $schema, $name); + } elseif ($schema !== null) { + $result = \odbc_tables($connection_id, $catalog, $schema); + } elseif ($catalog !== null) { + $result = \odbc_tables($connection_id, $catalog); + } else { + $result = \odbc_tables($connection_id); + } + if ($result === false) { + throw UodbcException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/uopz.php b/vendor/thecodingmachine/safe/generated/uopz.php new file mode 100644 index 000000000..ae0ee8f89 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/uopz.php @@ -0,0 +1,40 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\UopzException; + +/** + * Makes class extend parent + * + * @param string $class The name of the class to extend + * @param string $parent The name of the class to inherit + * @throws UopzException + * + */ +function uopz_extend(string $class, string $parent): void +{ + error_clear_last(); + $result = \uopz_extend($class, $parent); + if ($result === false) { + throw UopzException::createFromPhpError(); + } +} + + +/** + * Makes class implement interface + * + * @param string $class + * @param string $interface + * @throws UopzException + * + */ +function uopz_implement(string $class, string $interface): void +{ + error_clear_last(); + $result = \uopz_implement($class, $interface); + if ($result === false) { + throw UopzException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/url.php b/vendor/thecodingmachine/safe/generated/url.php new file mode 100644 index 000000000..56c08b551 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/url.php @@ -0,0 +1,144 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\UrlException; + +/** + * Decodes a base64 encoded data. + * + * @param string $data The encoded data. + * @param bool $strict If the strict parameter is set to TRUE + * then the base64_decode function will return + * FALSE if the input contains character from outside the base64 + * alphabet. Otherwise invalid characters will be silently discarded. + * @return string Returns the decoded data. The returned data may be + * binary. + * @throws UrlException + * + */ +function base64_decode(string $data, bool $strict = false): string +{ + error_clear_last(); + $result = \base64_decode($data, $strict); + if ($result === false) { + throw UrlException::createFromPhpError(); + } + return $result; +} + + +/** + * get_headers returns an array with the headers sent + * by the server in response to a HTTP request. + * + * @param string $url The target URL. + * @param int $format If the optional format parameter is set to non-zero, + * get_headers parses the response and sets the + * array's keys. + * @param resource $context A valid context resource created with + * stream_context_create. + * @return array Returns an indexed or associative array with the headers. + * @throws UrlException + * + */ +function get_headers(string $url, int $format = 0, $context = null): array +{ + error_clear_last(); + if ($context !== null) { + $result = \get_headers($url, $format, $context); + } else { + $result = \get_headers($url, $format); + } + if ($result === false) { + throw UrlException::createFromPhpError(); + } + return $result; +} + + +/** + * This function parses a URL and returns an associative array containing any + * of the various components of the URL that are present. + * The values of the array elements are not URL decoded. + * + * This function is not meant to validate + * the given URL, it only breaks it up into the above listed parts. Partial + * URLs are also accepted, parse_url tries its best to + * parse them correctly. + * + * @param string $url The URL to parse. Invalid characters are replaced by + * _. + * @param int $component Specify one of PHP_URL_SCHEME, + * PHP_URL_HOST, PHP_URL_PORT, + * PHP_URL_USER, PHP_URL_PASS, + * PHP_URL_PATH, PHP_URL_QUERY + * or PHP_URL_FRAGMENT to retrieve just a specific + * URL component as a string (except when + * PHP_URL_PORT is given, in which case the return + * value will be an integer). + * @return mixed On seriously malformed URLs, parse_url. + * + * If the component parameter is omitted, an + * associative array is returned. At least one element will be + * present within the array. Potential keys within this array are: + * + * + * + * scheme - e.g. http + * + * + * + * + * host + * + * + * + * + * port + * + * + * + * + * user + * + * + * + * + * pass + * + * + * + * + * path + * + * + * + * + * query - after the question mark ? + * + * + * + * + * fragment - after the hashmark # + * + * + * + * + * If the component parameter is specified, + * parse_url returns a string (or an + * integer, in the case of PHP_URL_PORT) + * instead of an array. If the requested component doesn't exist + * within the given URL, NULL will be returned. + * @throws UrlException + * + */ +function parse_url(string $url, int $component = -1) +{ + error_clear_last(); + $result = \parse_url($url, $component); + if ($result === false) { + throw UrlException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/var.php b/vendor/thecodingmachine/safe/generated/var.php new file mode 100644 index 000000000..14609f22d --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/var.php @@ -0,0 +1,60 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\VarException; + +/** + * Set the type of variable var to + * type. + * + * @param mixed $var The variable being converted. + * @param string $type Possibles values of type are: + * + * + * + * "boolean" or "bool" + * + * + * + * + * "integer" or "int" + * + * + * + * + * "float" or "double" + * + * + * + * + * "string" + * + * + * + * + * "array" + * + * + * + * + * "object" + * + * + * + * + * "null" + * + * + * + * @throws VarException + * + */ +function settype(&$var, string $type): void +{ + error_clear_last(); + $result = \settype($var, $type); + if ($result === false) { + throw VarException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/xdiff.php b/vendor/thecodingmachine/safe/generated/xdiff.php new file mode 100644 index 000000000..27feef39f --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/xdiff.php @@ -0,0 +1,236 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\XdiffException; + +/** + * Makes a binary diff of two files and stores the result in a patch file. + * This function works with both text and binary files. Resulting patch + * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. + * + * @param string $old_file Path to the first file. This file acts as "old" file. + * @param string $new_file Path to the second file. This file acts as "new" file. + * @param string $dest Path of the resulting patch file. Resulting file contains differences + * between "old" and "new" files. It is in binary format and is human-unreadable. + * @throws XdiffException + * + */ +function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): void +{ + error_clear_last(); + $result = \xdiff_file_bdiff($old_file, $new_file, $dest); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } +} + + +/** + * Patches a file with a binary + * patch and stores the result in a file dest. + * This function accepts patches created both via xdiff_file_bdiff + * and xdiff_file_rabdiff functions or their string counterparts. + * + * @param string $file The original file. + * @param string $patch The binary patch file. + * @param string $dest Path of the resulting file. + * @throws XdiffException + * + */ +function xdiff_file_bpatch(string $file, string $patch, string $dest): void +{ + error_clear_last(); + $result = \xdiff_file_bpatch($file, $patch, $dest); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } +} + + +/** + * Makes a binary diff of two files and stores the result in a patch file. + * This function works with both text and binary files. Resulting patch + * file can be later applied using xdiff_file_bpatch. + * + * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. + * + * @param string $old_file Path to the first file. This file acts as "old" file. + * @param string $new_file Path to the second file. This file acts as "new" file. + * @param string $dest Path of the resulting patch file. Resulting file contains differences + * between "old" and "new" files. It is in binary format and is human-unreadable. + * @throws XdiffException + * + */ +function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): void +{ + error_clear_last(); + $result = \xdiff_file_diff_binary($old_file, $new_file, $dest); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } +} + + +/** + * Makes an unified diff containing differences between old_file and + * new_file and stores it in dest file. The + * resulting file is human-readable. An optional context parameter + * specifies how many lines of context should be added around each change. + * Setting minimal parameter to true will result in outputting the shortest + * patch file possible (can take a long time). + * + * @param string $old_file Path to the first file. This file acts as "old" file. + * @param string $new_file Path to the second file. This file acts as "new" file. + * @param string $dest Path of the resulting patch file. + * @param int $context Indicates how many lines of context you want to include in diff + * result. + * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result + * (can take a long time). + * @throws XdiffException + * + */ +function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $context = 3, bool $minimal = false): void +{ + error_clear_last(); + $result = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } +} + + +/** + * Patches a file with a binary + * patch and stores the result in a file dest. + * This function accepts patches created both via xdiff_file_bdiff + * or xdiff_file_rabdiff functions or their string counterparts. + * + * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. + * + * @param string $file The original file. + * @param string $patch The binary patch file. + * @param string $dest Path of the resulting file. + * @throws XdiffException + * + */ +function xdiff_file_patch_binary(string $file, string $patch, string $dest): void +{ + error_clear_last(); + $result = \xdiff_file_patch_binary($file, $patch, $dest); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } +} + + +/** + * Makes a binary diff of two files and stores the result in a patch file. + * The difference between this function and xdiff_file_bdiff is different + * algorithm used which should result in faster execution and smaller diff produced. + * This function works with both text and binary files. Resulting patch + * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. + * + * For more details about differences between algorithm used please check libxdiff + * website. + * + * @param string $old_file Path to the first file. This file acts as "old" file. + * @param string $new_file Path to the second file. This file acts as "new" file. + * @param string $dest Path of the resulting patch file. Resulting file contains differences + * between "old" and "new" files. It is in binary format and is human-unreadable. + * @throws XdiffException + * + */ +function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): void +{ + error_clear_last(); + $result = \xdiff_file_rabdiff($old_file, $new_file, $dest); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } +} + + +/** + * Patches a string str with a binary patch. + * This function accepts patches created both via xdiff_string_bdiff + * and xdiff_string_rabdiff functions or their file counterparts. + * + * @param string $str The original binary string. + * @param string $patch The binary patch string. + * @return string Returns the patched string. + * @throws XdiffException + * + */ +function xdiff_string_bpatch(string $str, string $patch): string +{ + error_clear_last(); + $result = \xdiff_string_bpatch($str, $patch); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } + return $result; +} + + +/** + * Patches a string str with a binary patch. + * This function accepts patches created both via xdiff_string_bdiff + * and xdiff_string_rabdiff functions or their file counterparts. + * + * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. + * + * @param string $str The original binary string. + * @param string $patch The binary patch string. + * @return string Returns the patched string. + * @throws XdiffException + * + */ +function xdiff_string_patch_binary(string $str, string $patch): string +{ + error_clear_last(); + $result = \xdiff_string_patch_binary($str, $patch); + if ($result === false) { + throw XdiffException::createFromPhpError(); + } + return $result; +} + + +/** + * Patches a str string with an unified patch in patch parameter + * and returns the result. patch has to be an unified diff created by + * xdiff_file_diff/xdiff_string_diff function. + * An optional flags parameter specifies mode of operation. Any + * rejected parts of the patch will be stored inside error variable if + * it is provided. + * + * @param string $str The original string. + * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, + * xdiff_file_diff functions or compatible tools. + * @param int $flags flags can be either + * XDIFF_PATCH_NORMAL (default mode, normal patch) + * or XDIFF_PATCH_REVERSE (reversed patch). + * + * Starting from version 1.5.0, you can also use binary OR to enable + * XDIFF_PATCH_IGNORESPACE flag. + * @param string|null $error If provided then rejected parts are stored inside this variable. + * @return string Returns the patched string. + * @throws XdiffException + * + */ +function xdiff_string_patch(string $str, string $patch, int $flags = null, ?string &$error = null): string +{ + error_clear_last(); + if ($error !== null) { + $result = \xdiff_string_patch($str, $patch, $flags, $error); + } elseif ($flags !== null) { + $result = \xdiff_string_patch($str, $patch, $flags); + } else { + $result = \xdiff_string_patch($str, $patch); + } + if ($result === false) { + throw XdiffException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/xml.php b/vendor/thecodingmachine/safe/generated/xml.php new file mode 100644 index 000000000..4f9f6606c --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/xml.php @@ -0,0 +1,95 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\XmlException; + +/** + * xml_parser_create_ns creates a new XML parser + * with XML namespace support and returns a resource handle referencing + * it to be used by the other XML functions. + * + * @param string $encoding The input encoding is automatically detected, so that the + * encoding parameter specifies only the output + * encoding. In PHP 5.0.0 and 5.0.1, the default output charset is + * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported + * encodings are ISO-8859-1, UTF-8 and + * US-ASCII. + * @param string $separator With a namespace aware parser tag parameters passed to the various + * handler functions will consist of namespace and tag name separated by + * the string specified in separator. + * @return resource Returns a resource handle for the new XML parser. + * @throws XmlException + * + */ +function xml_parser_create_ns(string $encoding = null, string $separator = ":") +{ + error_clear_last(); + if ($separator !== ":") { + $result = \xml_parser_create_ns($encoding, $separator); + } elseif ($encoding !== null) { + $result = \xml_parser_create_ns($encoding); + } else { + $result = \xml_parser_create_ns(); + } + if ($result === false) { + throw XmlException::createFromPhpError(); + } + return $result; +} + + +/** + * xml_parser_create creates a new XML parser + * and returns a resource handle referencing it to be used by the + * other XML functions. + * + * @param string $encoding The optional encoding specifies the character + * encoding for the input/output in PHP 4. Starting from PHP 5, the input + * encoding is automatically detected, so that the + * encoding parameter specifies only the output + * encoding. In PHP 4, the default output encoding is the same as the + * input charset. If empty string is passed, the parser attempts to identify + * which encoding the document is encoded in by looking at the heading 3 or + * 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is + * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported + * encodings are ISO-8859-1, UTF-8 and + * US-ASCII. + * @return resource Returns a resource handle for the new XML parser. + * @throws XmlException + * + */ +function xml_parser_create(string $encoding = null) +{ + error_clear_last(); + if ($encoding !== null) { + $result = \xml_parser_create($encoding); + } else { + $result = \xml_parser_create(); + } + if ($result === false) { + throw XmlException::createFromPhpError(); + } + return $result; +} + + +/** + * This function allows to use parser inside + * object. All callback functions could be set with + * xml_set_element_handler etc and assumed to be + * methods of object. + * + * @param resource $parser A reference to the XML parser to use inside the object. + * @param object $object The object where to use the XML parser. + * @throws XmlException + * + */ +function xml_set_object($parser, object &$object): void +{ + error_clear_last(); + $result = \xml_set_object($parser, $object); + if ($result === false) { + throw XmlException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/xmlrpc.php b/vendor/thecodingmachine/safe/generated/xmlrpc.php new file mode 100644 index 000000000..15364fb4a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/xmlrpc.php @@ -0,0 +1,22 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\XmlrpcException; + +/** + * Sets xmlrpc type, base64 or datetime, for a PHP string value. + * + * @param string|\DateTime $value Value to set the type + * @param string $type 'base64' or 'datetime' + * @throws XmlrpcException + * + */ +function xmlrpc_set_type(&$value, string $type): void +{ + error_clear_last(); + $result = \xmlrpc_set_type($value, $type); + if ($result === false) { + throw XmlrpcException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/yaml.php b/vendor/thecodingmachine/safe/generated/yaml.php new file mode 100644 index 000000000..38daaf759 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/yaml.php @@ -0,0 +1,97 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\YamlException; + +/** + * Convert all or part of a YAML document stream read from a file to a PHP variable. + * + * @param string $filename Path to the file. + * @param int $pos Document to extract from stream (-1 for all + * documents, 0 for first document, ...). + * @param int|null $ndocs If ndocs is provided, then it is filled with the + * number of documents found in stream. + * @param array $callbacks Content handlers for YAML nodes. Associative array of YAML + * tag => callable mappings. See + * parse callbacks for more + * details. + * @return mixed Returns the value encoded in input in appropriate + * PHP type. If pos is -1 an + * array will be returned with one entry for each document found + * in the stream. + * @throws YamlException + * + */ +function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, array $callbacks = null) +{ + error_clear_last(); + $result = \yaml_parse_file($filename, $pos, $ndocs, $callbacks); + if ($result === false) { + throw YamlException::createFromPhpError(); + } + return $result; +} + + +/** + * Convert all or part of a YAML document stream read from a URL to a PHP variable. + * + * @param string $url url should be of the form "scheme://...". PHP + * will search for a protocol handler (also known as a wrapper) for that + * scheme. If no wrappers for that protocol are registered, PHP will emit + * a notice to help you track potential problems in your script and then + * continue as though filename specifies a regular file. + * @param int $pos Document to extract from stream (-1 for all + * documents, 0 for first document, ...). + * @param int|null $ndocs If ndocs is provided, then it is filled with the + * number of documents found in stream. + * @param array $callbacks Content handlers for YAML nodes. Associative array of YAML + * tag => callable mappings. See + * parse callbacks for more + * @return mixed Returns the value encoded in input in appropriate + * PHP type. If pos is + * -1 an array will be returned with one entry + * for each document found in the stream. + * @throws YamlException + * + */ +function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, array $callbacks = null) +{ + error_clear_last(); + $result = \yaml_parse_url($url, $pos, $ndocs, $callbacks); + if ($result === false) { + throw YamlException::createFromPhpError(); + } + return $result; +} + + +/** + * Convert all or part of a YAML document stream to a PHP variable. + * + * @param string $input The string to parse as a YAML document stream. + * @param int $pos Document to extract from stream (-1 for all + * documents, 0 for first document, ...). + * @param int|null $ndocs If ndocs is provided, then it is filled with the + * number of documents found in stream. + * @param array $callbacks Content handlers for YAML nodes. Associative array of YAML + * tag => callable mappings. See + * parse callbacks for more + * details. + * @return mixed Returns the value encoded in input in appropriate + * PHP type. If pos is -1 an + * array will be returned with one entry for each document found + * in the stream. + * @throws YamlException + * + */ +function yaml_parse(string $input, int $pos = 0, ?int &$ndocs = null, array $callbacks = null) +{ + error_clear_last(); + $result = \yaml_parse($input, $pos, $ndocs, $callbacks); + if ($result === false) { + throw YamlException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/yaz.php b/vendor/thecodingmachine/safe/generated/yaz.php new file mode 100644 index 000000000..29c1d33c4 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/yaz.php @@ -0,0 +1,438 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\YazException; + +/** + * This function invokes a CCL parser. It converts a given CCL FIND query to + * an RPN query which may be passed to the yaz_search + * function to perform a search. + * + * To define a set of valid CCL fields call yaz_ccl_conf + * prior to this function. + * + * @param resource $id The connection resource returned by yaz_connect. + * @param string $query The CCL FIND query. + * @param array|null $result If the function was executed successfully, this will be an array + * containing the valid RPN query under the key rpn. + * + * Upon failure, three indexes are set in this array to indicate the cause + * of failure: + * + * + * + * errorcode - the CCL error code (integer) + * + * + * + * + * errorstring - the CCL error string + * + * + * + * + * errorpos - approximate position in query of failure + * (integer is character position) + * + * + * + * + * errorcode - the CCL error code (integer) + * + * errorstring - the CCL error string + * + * errorpos - approximate position in query of failure + * (integer is character position) + * @throws YazException + * + */ +function yaz_ccl_parse($id, string $query, ?array &$result): void +{ + error_clear_last(); + $result = \yaz_ccl_parse($id, $query, $result); + if ($result === false) { + throw YazException::createFromPhpError(); + } +} + + +/** + * Closes the connection given by parameter id. + * + * @param resource $id The connection resource returned by yaz_connect. + * @throws YazException + * + */ +function yaz_close($id): void +{ + error_clear_last(); + $result = \yaz_close($id); + if ($result === false) { + throw YazException::createFromPhpError(); + } +} + + +/** + * This function returns a connection resource on success, zero on + * failure. + * + * yaz_connect prepares for a connection to a + * Z39.50 server. + * This function is non-blocking and does not attempt to establish + * a connection - it merely prepares a connect to be performed later when + * yaz_wait is called. + * + * @param string $zurl A string that takes the form host[:port][/database]. + * If port is omitted, port 210 is used. If database is omitted + * Default is used. + * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication + * string (OpenAuth). + * + * If given as an array, the contents of the array serves as options. + * + * + * user + * + * + * Username for authentication. + * + * + * + * + * group + * + * + * Group for authentication. + * + * + * + * + * password + * + * + * Password for authentication. + * + * + * + * + * cookie + * + * + * Cookie for session (YAZ proxy). + * + * + * + * + * proxy + * + * + * Proxy for connection (YAZ proxy). + * + * + * + * + * persistent + * + * + * A boolean. If TRUE the connection is persistent; If FALSE the + * connection is not persistent. By default connections are persistent. + * + * + * + * If you open a persistent connection, you won't be able to close + * it later with yaz_close. + * + * + * + * + * + * piggyback + * + * + * A boolean. If TRUE piggyback is enabled for searches; If FALSE + * piggyback is disabled. By default piggyback is enabled. + * + * + * Enabling piggyback is more efficient and usually saves a + * network-round-trip for first time fetches of records. However, a + * few Z39.50 servers do not support piggyback or they ignore element + * set names. For those, piggyback should be disabled. + * + * + * + * + * charset + * + * + * A string that specifies character set to be used in Z39.50 + * language and character set negotiation. Use strings such as: + * ISO-8859-1, UTF-8, + * UTF-16. + * + * + * Most Z39.50 servers do not support this feature (and thus, this is + * ignored). Many servers use the ISO-8859-1 encoding for queries and + * messages. MARC21/USMARC records are not affected by this setting. + * + * + * + * + * + * preferredMessageSize + * + * + * An integer that specifies the maximum byte size of all records + * to be returned by a target during retrieval. See the + * Z39.50 standard for more + * information. + * + * + * + * This option is supported in PECL YAZ 1.0.5 or later. + * + * + * + * + * + * + * maximumRecordSize + * + * + * An integer that specifies the maximum byte size of a single record + * to be returned by a target during retrieval. This + * entity is referred to as Exceptional-record-size in the + * Z39.50 standard. + * + * + * + * This option is supported in PECL YAZ 1.0.5 or later. + * + * + * + * + * + * + * + * Username for authentication. + * + * Group for authentication. + * + * Password for authentication. + * + * Cookie for session (YAZ proxy). + * + * Proxy for connection (YAZ proxy). + * + * A boolean. If TRUE the connection is persistent; If FALSE the + * connection is not persistent. By default connections are persistent. + * + * If you open a persistent connection, you won't be able to close + * it later with yaz_close. + * + * A boolean. If TRUE piggyback is enabled for searches; If FALSE + * piggyback is disabled. By default piggyback is enabled. + * + * Enabling piggyback is more efficient and usually saves a + * network-round-trip for first time fetches of records. However, a + * few Z39.50 servers do not support piggyback or they ignore element + * set names. For those, piggyback should be disabled. + * + * A string that specifies character set to be used in Z39.50 + * language and character set negotiation. Use strings such as: + * ISO-8859-1, UTF-8, + * UTF-16. + * + * Most Z39.50 servers do not support this feature (and thus, this is + * ignored). Many servers use the ISO-8859-1 encoding for queries and + * messages. MARC21/USMARC records are not affected by this setting. + * + * An integer that specifies the maximum byte size of all records + * to be returned by a target during retrieval. See the + * Z39.50 standard for more + * information. + * + * This option is supported in PECL YAZ 1.0.5 or later. + * + * An integer that specifies the maximum byte size of a single record + * to be returned by a target during retrieval. This + * entity is referred to as Exceptional-record-size in the + * Z39.50 standard. + * + * This option is supported in PECL YAZ 1.0.5 or later. + * @return mixed A connection resource on success, FALSE on error. + * @throws YazException + * + */ +function yaz_connect(string $zurl, $options = null) +{ + error_clear_last(); + if ($options !== null) { + $result = \yaz_connect($zurl, $options); + } else { + $result = \yaz_connect($zurl); + } + if ($result === false) { + throw YazException::createFromPhpError(); + } + return $result; +} + + +/** + * This function allows you to change databases within a session by + * specifying one or more databases to be used in search, retrieval, etc. + * - overriding databases specified in call to + * yaz_connect. + * + * @param resource $id The connection resource returned by yaz_connect. + * @param string $databases A string containing one or more databases. Multiple databases are + * separated by a plus sign +. + * @throws YazException + * + */ +function yaz_database($id, string $databases): void +{ + error_clear_last(); + $result = \yaz_database($id, $databases); + if ($result === false) { + throw YazException::createFromPhpError(); + } +} + + +/** + * This function sets the element set name for retrieval. + * + * Call this function before yaz_search or + * yaz_present to specify the element set name for + * records to be retrieved. + * + * @param resource $id The connection resource returned by yaz_connect. + * @param string $elementset Most servers support F (for full records) and + * B (for brief records). + * @throws YazException + * + */ +function yaz_element($id, string $elementset): void +{ + error_clear_last(); + $result = \yaz_element($id, $elementset); + if ($result === false) { + throw YazException::createFromPhpError(); + } +} + + +/** + * This function prepares for retrieval of records after a successful search. + * + * The yaz_range function should be called prior to this + * function to specify the range of records to be retrieved. + * + * @param resource $id The connection resource returned by yaz_connect. + * @throws YazException + * + */ +function yaz_present($id): void +{ + error_clear_last(); + $result = \yaz_present($id); + if ($result === false) { + throw YazException::createFromPhpError(); + } +} + + +/** + * yaz_search prepares for a search on the given + * connection. + * + * Like yaz_connect this function is non-blocking and + * only prepares for a search to be executed later when + * yaz_wait is called. + * + * @param resource $id The connection resource returned by yaz_connect. + * @param string $type This parameter represents the query type - only "rpn" + * is supported now in which case the third argument specifies a Type-1 + * query in prefix query notation. + * @param string $query The RPN query is a textual representation of the Type-1 query as + * defined by the Z39.50 standard. However, in the text representation + * as used by YAZ a prefix notation is used, that is the operator + * precedes the operands. The query string is a sequence of tokens where + * white space is ignored unless surrounded by double quotes. Tokens beginning + * with an at-character (@) are considered operators, + * otherwise they are treated as search terms. + * + * You can find information about attributes at the + * Z39.50 Maintenance Agency + * site. + * + * If you would like to use a more friendly notation, + * use the CCL parser - functions yaz_ccl_conf and + * yaz_ccl_parse. + * @throws YazException + * + */ +function yaz_search($id, string $type, string $query): void +{ + error_clear_last(); + $result = \yaz_search($id, $type, $query); + if ($result === false) { + throw YazException::createFromPhpError(); + } +} + + +/** + * This function carries out networked (blocked) activity for outstanding + * requests which have been prepared by the functions + * yaz_connect, yaz_search, + * yaz_present, yaz_scan and + * yaz_itemorder. + * + * yaz_wait returns when all servers have either + * completed all requests or aborted (in case of errors). + * + * @param array $options An associative array of options: + * + * + * timeout + * + * + * Sets timeout in seconds. If a server has not responded within the + * timeout it is considered dead and yaz_wait + * returns. The default value for timeout is 15 seconds. + * + * + * + * + * event + * + * + * A boolean. + * + * + * + * + * + * Sets timeout in seconds. If a server has not responded within the + * timeout it is considered dead and yaz_wait + * returns. The default value for timeout is 15 seconds. + * + * A boolean. + * @return mixed Returns TRUE on success. + * In event mode, returns resource. + * @throws YazException + * + */ +function yaz_wait(array &$options = null) +{ + error_clear_last(); + $result = \yaz_wait($options); + if ($result === false) { + throw YazException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/zip.php b/vendor/thecodingmachine/safe/generated/zip.php new file mode 100644 index 000000000..8fd22bb9a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/zip.php @@ -0,0 +1,71 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ZipException; + +/** + * Closes the specified directory entry. + * + * @param resource $zip_entry A directory entry previously opened zip_entry_open. + * @throws ZipException + * + */ +function zip_entry_close($zip_entry): void +{ + error_clear_last(); + $result = \zip_entry_close($zip_entry); + if ($result === false) { + throw ZipException::createFromPhpError(); + } +} + + +/** + * Opens a directory entry in a zip file for reading. + * + * @param resource $zip A valid resource handle returned by zip_open. + * @param resource $zip_entry A directory entry returned by zip_read. + * @param string $mode Any of the modes specified in the documentation of + * fopen. + * + * Currently, mode is ignored and is always + * "rb". This is due to the fact that zip support + * in PHP is read only access. + * @throws ZipException + * + */ +function zip_entry_open($zip, $zip_entry, string $mode = null): void +{ + error_clear_last(); + if ($mode !== null) { + $result = \zip_entry_open($zip, $zip_entry, $mode); + } else { + $result = \zip_entry_open($zip, $zip_entry); + } + if ($result === false) { + throw ZipException::createFromPhpError(); + } +} + + +/** + * Reads from an open directory entry. + * + * @param resource $zip_entry A directory entry returned by zip_read. + * @param int $length The number of bytes to return. + * + * This should be the uncompressed length you wish to read. + * @return string Returns the data read, empty string on end of a file. + * @throws ZipException + * + */ +function zip_entry_read($zip_entry, int $length = 1024): string +{ + error_clear_last(); + $result = \zip_entry_read($zip_entry, $length); + if ($result === false) { + throw ZipException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/zlib.php b/vendor/thecodingmachine/safe/generated/zlib.php new file mode 100644 index 000000000..4dc3ca94f --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/zlib.php @@ -0,0 +1,611 @@ +<?php + +namespace Safe; + +use Safe\Exceptions\ZlibException; + +/** + * Incrementally deflates data in the specified context. + * + * @param resource $context A context created with deflate_init. + * @param string $data A chunk of data to compress. + * @param int $flush_mode One of ZLIB_BLOCK, + * ZLIB_NO_FLUSH, + * ZLIB_PARTIAL_FLUSH, + * ZLIB_SYNC_FLUSH (default), + * ZLIB_FULL_FLUSH, ZLIB_FINISH. + * Normally you will want to set ZLIB_NO_FLUSH to + * maximize compression, and ZLIB_FINISH to terminate + * with the last chunk of data. See the zlib manual for a + * detailed description of these constants. + * @return string Returns a chunk of compressed data. + * @throws ZlibException + * + */ +function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string +{ + error_clear_last(); + $result = \deflate_add($context, $data, $flush_mode); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Initializes an incremental deflate context using the specified + * encoding. + * + * Note that the window option here only sets the window size + * of the algorithm, differently from the zlib filters where the same parameter + * also sets the encoding to use; the encoding must be set with the + * encoding parameter. + * + * Limitation: there is currently no way to set the header information on a GZIP + * compressed stream, which are set as follows: GZIP signature + * (\x1f\x8B); compression method (\x08 + * == DEFLATE); 6 zero bytes; the operating system set to the current system + * (\x00 = Windows, \x03 = Unix, etc.) + * + * @param int $encoding One of the ZLIB_ENCODING_* constants. + * @param array $options An associative array which may contain the following elements: + * + * + * level + * + * + * The compression level in range -1..9; defaults to -1. + * + * + * + * + * memory + * + * + * The compression memory level in range 1..9; defaults to 8. + * + * + * + * + * window + * + * + * The zlib window size (logarithmic) in range 8..15; defaults to 15. + * + * + * + * + * strategy + * + * + * One of ZLIB_FILTERED, + * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, + * ZLIB_FIXED or + * ZLIB_DEFAULT_STRATEGY (the default). + * + * + * + * + * dictionary + * + * + * A string or an array of strings + * of the preset dictionary (default: no preset dictionary). + * + * + * + * + * + * The compression level in range -1..9; defaults to -1. + * + * The compression memory level in range 1..9; defaults to 8. + * + * The zlib window size (logarithmic) in range 8..15; defaults to 15. + * + * One of ZLIB_FILTERED, + * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, + * ZLIB_FIXED or + * ZLIB_DEFAULT_STRATEGY (the default). + * + * A string or an array of strings + * of the preset dictionary (default: no preset dictionary). + * @return resource Returns a deflate context resource (zlib.deflate) on + * success. + * @throws ZlibException + * + */ +function deflate_init(int $encoding, array $options = null) +{ + error_clear_last(); + $result = \deflate_init($encoding, $options); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Closes the given gz-file pointer. + * + * @param resource $zp The gz-file pointer. It must be valid, and must point to a file + * successfully opened by gzopen. + * @throws ZlibException + * + */ +function gzclose($zp): void +{ + error_clear_last(); + $result = \gzclose($zp); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } +} + + +/** + * This function compresses the given string using the ZLIB + * data format. + * + * For details on the ZLIB compression algorithm see the document + * "ZLIB Compressed Data Format + * Specification version 3.3" (RFC 1950). + * + * @param string $data The data to compress. + * @param int $level The level of compression. Can be given as 0 for no compression up to 9 + * for maximum compression. + * + * If -1 is used, the default compression of the zlib library is used which is 6. + * @param int $encoding One of ZLIB_ENCODING_* constants. + * @return string The compressed string. + * @throws ZlibException + * + */ +function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string +{ + error_clear_last(); + $result = \gzcompress($data, $level, $encoding); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns a decoded version of the input + * data. + * + * @param string $data The data to decode, encoded by gzencode. + * @param int $length The maximum length of data to decode. + * @return string The decoded string. + * @throws ZlibException + * + */ +function gzdecode(string $data, int $length = null): string +{ + error_clear_last(); + if ($length !== null) { + $result = \gzdecode($data, $length); + } else { + $result = \gzdecode($data); + } + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * This function compresses the given string using the DEFLATE + * data format. + * + * For details on the DEFLATE compression algorithm see the document + * "DEFLATE Compressed Data Format + * Specification version 1.3" (RFC 1951). + * + * @param string $data The data to deflate. + * @param int $level The level of compression. Can be given as 0 for no compression up to 9 + * for maximum compression. If not given, the default compression level will + * be the default compression level of the zlib library. + * @param int $encoding One of ZLIB_ENCODING_* constants. + * @return string The deflated string. + * @throws ZlibException + * + */ +function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string +{ + error_clear_last(); + $result = \gzdeflate($data, $level, $encoding); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns a compressed version of the input + * data compatible with the output of the + * gzip program. + * + * For more information on the GZIP file format, see the document: + * GZIP file format specification + * version 4.3 (RFC 1952). + * + * @param string $data The data to encode. + * @param int $level The level of compression. Can be given as 0 for no compression up to 9 + * for maximum compression. If not given, the default compression level will + * be the default compression level of the zlib library. + * @param int $encoding_mode The encoding mode. Can be FORCE_GZIP (the default) + * or FORCE_DEFLATE. + * + * Prior to PHP 5.4.0, using FORCE_DEFLATE results in + * a standard zlib deflated string (inclusive zlib headers) after a gzip + * file header but without the trailing crc32 checksum. + * + * In PHP 5.4.0 and later, FORCE_DEFLATE generates + * RFC 1950 compliant output, consisting of a zlib header, the deflated + * data, and an Adler checksum. + * @return string The encoded string. + * @throws ZlibException + * + */ +function gzencode(string $data, int $level = -1, int $encoding_mode = FORCE_GZIP): string +{ + error_clear_last(); + $result = \gzencode($data, $level, $encoding_mode); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets a (uncompressed) string of up to length - 1 bytes read from the given + * file pointer. Reading ends when length - 1 bytes have been read, on a + * newline, or on EOF (whichever comes first). + * + * @param resource $zp The gz-file pointer. It must be valid, and must point to a file + * successfully opened by gzopen. + * @param int $length The length of data to get. + * @return string The uncompressed string. + * @throws ZlibException + * + */ +function gzgets($zp, int $length = null): string +{ + error_clear_last(); + if ($length !== null) { + $result = \gzgets($zp, $length); + } else { + $result = \gzgets($zp); + } + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Identical to gzgets, except that + * gzgetss attempts to strip any HTML and PHP + * tags from the text it reads. + * + * @param resource $zp The gz-file pointer. It must be valid, and must point to a file + * successfully opened by gzopen. + * @param int $length The length of data to get. + * @param string $allowable_tags You can use this optional parameter to specify tags which should not + * be stripped. + * @return string The uncompressed and stripped string. + * @throws ZlibException + * + */ +function gzgetss($zp, int $length, string $allowable_tags = null): string +{ + error_clear_last(); + if ($allowable_tags !== null) { + $result = \gzgetss($zp, $length, $allowable_tags); + } else { + $result = \gzgetss($zp, $length); + } + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * This function inflates a deflated string. + * + * @param string $data The data compressed by gzdeflate. + * @param int $length The maximum length of data to decode. + * @return string The original uncompressed data. + * + * The function will return an error if the uncompressed data is more than + * 32768 times the length of the compressed input data + * or more than the optional parameter length. + * @throws ZlibException + * + */ +function gzinflate(string $data, int $length = 0): string +{ + error_clear_last(); + $result = \gzinflate($data, $length); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads to EOF on the given gz-file pointer from the current position and + * writes the (uncompressed) results to standard output. + * + * @param resource $zp The gz-file pointer. It must be valid, and must point to a file + * successfully opened by gzopen. + * @return int The number of uncompressed characters read from gz + * and passed through to the input. + * @throws ZlibException + * + */ +function gzpassthru($zp): int +{ + error_clear_last(); + $result = \gzpassthru($zp); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the file position indicator of the given gz-file pointer to the + * beginning of the file stream. + * + * @param resource $zp The gz-file pointer. It must be valid, and must point to a file + * successfully opened by gzopen. + * @throws ZlibException + * + */ +function gzrewind($zp): void +{ + error_clear_last(); + $result = \gzrewind($zp); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } +} + + +/** + * This function uncompress a compressed string. + * + * @param string $data The data compressed by gzcompress. + * @param int $length The maximum length of data to decode. + * @return string The original uncompressed data. + * + * The function will return an error if the uncompressed data is more than + * 32768 times the length of the compressed input data + * or more than the optional parameter length. + * @throws ZlibException + * + */ +function gzuncompress(string $data, int $length = 0): string +{ + error_clear_last(); + $result = \gzuncompress($data, $length); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param resource $resource + * @return int Returns number of bytes read so far. + * @throws ZlibException + * + */ +function inflate_get_read_len($resource): int +{ + error_clear_last(); + $result = \inflate_get_read_len($resource); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Usually returns either ZLIB_OK or ZLIB_STREAM_END. + * + * @param resource $resource + * @return int Returns decompression status. + * @throws ZlibException + * + */ +function inflate_get_status($resource): int +{ + error_clear_last(); + $result = \inflate_get_status($resource); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Incrementally inflates encoded data in the specified context. + * + * Limitation: header information from GZIP compressed data are not made + * available. + * + * @param resource $context A context created with inflate_init. + * @param string $encoded_data A chunk of compressed data. + * @param int $flush_mode One of ZLIB_BLOCK, + * ZLIB_NO_FLUSH, + * ZLIB_PARTIAL_FLUSH, + * ZLIB_SYNC_FLUSH (default), + * ZLIB_FULL_FLUSH, ZLIB_FINISH. + * Normally you will want to set ZLIB_NO_FLUSH to + * maximize compression, and ZLIB_FINISH to terminate + * with the last chunk of data. See the zlib manual for a + * detailed description of these constants. + * @return string Returns a chunk of uncompressed data. + * @throws ZlibException + * + */ +function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string +{ + error_clear_last(); + $result = \inflate_add($context, $encoded_data, $flush_mode); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Initialize an incremental inflate context with the specified + * encoding. + * + * @param int $encoding One of the ZLIB_ENCODING_* constants. + * @param array $options An associative array which may contain the following elements: + * + * + * level + * + * + * The compression level in range -1..9; defaults to -1. + * + * + * + * + * memory + * + * + * The compression memory level in range 1..9; defaults to 8. + * + * + * + * + * window + * + * + * The zlib window size (logarithmic) in range 8..15; defaults to 15. + * + * + * + * + * strategy + * + * + * One of ZLIB_FILTERED, + * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, + * ZLIB_FIXED or + * ZLIB_DEFAULT_STRATEGY (the default). + * + * + * + * + * dictionary + * + * + * A string or an array of strings + * of the preset dictionary (default: no preset dictionary). + * + * + * + * + * + * The compression level in range -1..9; defaults to -1. + * + * The compression memory level in range 1..9; defaults to 8. + * + * The zlib window size (logarithmic) in range 8..15; defaults to 15. + * + * One of ZLIB_FILTERED, + * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, + * ZLIB_FIXED or + * ZLIB_DEFAULT_STRATEGY (the default). + * + * A string or an array of strings + * of the preset dictionary (default: no preset dictionary). + * @return resource Returns an inflate context resource (zlib.inflate) on + * success. + * @throws ZlibException + * + */ +function inflate_init(int $encoding, array $options = null) +{ + error_clear_last(); + $result = \inflate_init($encoding, $options); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads a file, decompresses it and writes it to standard output. + * + * readgzfile can be used to read a file which is not in + * gzip format; in this case readgzfile will directly + * read from the file without decompression. + * + * @param string $filename The file name. This file will be opened from the filesystem and its + * contents written to standard output. + * @param int $use_include_path You can set this optional parameter to 1, if you + * want to search for the file in the include_path too. + * @return int Returns the number of (uncompressed) bytes read from the file on success + * @throws ZlibException + * + */ +function readgzfile(string $filename, int $use_include_path = 0): int +{ + error_clear_last(); + $result = \readgzfile($filename, $use_include_path); + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} + + +/** + * Uncompress any raw/gzip/zlib encoded data. + * + * @param string $data + * @param int $max_decoded_len + * @return string Returns the uncompressed data. + * @throws ZlibException + * + */ +function zlib_decode(string $data, int $max_decoded_len = null): string +{ + error_clear_last(); + if ($max_decoded_len !== null) { + $result = \zlib_decode($data, $max_decoded_len); + } else { + $result = \zlib_decode($data); + } + if ($result === false) { + throw ZlibException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/lib/DateTime.php b/vendor/thecodingmachine/safe/lib/DateTime.php new file mode 100644 index 000000000..581ef35c0 --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/DateTime.php @@ -0,0 +1,81 @@ +<?php + +namespace Safe; + +use DateInterval; +use DateTimeInterface; +use DateTimeZone; +use Safe\Exceptions\DatetimeException; + +/** this class implements a safe version of the Datetime class */ +class DateTime extends \DateTime +{ + //switch from regular datetime to safe version + private static function createFromRegular(\DateTime $datetime): self + { + return new self($datetime->format('Y-m-d H:i:s.u'), $datetime->getTimezone()); + } + + /** + * @param string $format + * @param string $time + * @param DateTimeZone|null $timezone + * @throws DatetimeException + */ + public static function createFromFormat($format, $time, $timezone = null): self + { + $datetime = parent::createFromFormat($format, $time, $timezone); + if ($datetime === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($datetime); + } + + /** + * @param DateTimeInterface $datetime2 The date to compare to. + * @param boolean $absolute [optional] Whether to return absolute difference. + * @return DateInterval The DateInterval object representing the difference between the two dates. + * @throws DatetimeException + */ + public function diff($datetime2, $absolute = false): DateInterval + { + /** @var \DateInterval|false $result */ + $result = parent::diff($datetime2, $absolute); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; + } + + /** + * @param string $modify A date/time string. Valid formats are explained in <a href="https://secure.php.net/manual/en/datetime.formats.php">Date and Time Formats</a>. + * @return DateTime Returns the DateTime object for method chaining. + * @throws DatetimeException + */ + public function modify($modify): self + { + /** @var DateTime|false $result */ + $result = parent::modify($modify); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; + } + + /** + * @param int $year + * @param int $month + * @param int $day + * @return DateTime + * @throws DatetimeException + */ + public function setDate($year, $month, $day): self + { + /** @var DateTime|false $result */ + $result = parent::setDate($year, $month, $day); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; + } +} diff --git a/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php b/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php new file mode 100644 index 000000000..114ec3a3d --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php @@ -0,0 +1,262 @@ +<?php + +namespace Safe; + +use DateInterval; +use DateTime; +use DateTimeInterface; +use DateTimeZone; +use Safe\Exceptions\DatetimeException; + +/** + * This class is used to implement a safe version of the DatetimeImmutable class. + * While it technically overloads \DateTimeImmutable for typehint compatibility, + * it is actually used as a wrapper of \DateTimeImmutable, mostly to be able to overwrite functions like getTimestamp() while still being able to edit milliseconds via setTime(). + */ +class DateTimeImmutable extends \DateTimeImmutable +{ + /** + * @var \DateTimeImmutable + */ + private $innerDateTime; + + /** + * DateTimeImmutable constructor. + * @param string $time + * @param DateTimeZone|null $timezone + * @throws \Exception + */ + public function __construct($time = 'now', $timezone = null) + { + parent::__construct($time, $timezone); + $this->innerDateTime = new parent($time, $timezone); + } + + //switch between regular datetime and safe version + public static function createFromRegular(\DateTimeImmutable $datetime): self + { + $safeDatetime = new self($datetime->format('Y-m-d H:i:s.u'), $datetime->getTimezone()); //we need to also update the wrapper to not break the operators '<' and '>' + $safeDatetime->innerDateTime = $datetime; //to make sure we don't lose information because of the format(). + return $safeDatetime; + } + + //usefull if you need to switch back to regular DateTimeImmutable (for example when using DatePeriod) + public function getInnerDateTime(): \DateTimeImmutable + { + return $this->innerDateTime; + } + + ///////////////////////////////////////////////////////////////////////////// + // overload functions with false errors + + /** + * @param string $format + * @param string $time + * @param DateTimeZone|null $timezone + * @throws DatetimeException + */ + public static function createFromFormat($format, $time, $timezone = null): self + { + $datetime = parent::createFromFormat($format, $time, $timezone); + if ($datetime === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($datetime); + } + + /** + * @param string $format + * @return string + * @throws DatetimeException + */ + public function format($format): string + { + /** @var string|false $result */ + $result = $this->innerDateTime->format($format); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; + } + + /** + * @param DateTimeInterface $datetime2 + * @param bool $absolute + * @return DateInterval + * @throws DatetimeException + */ + public function diff($datetime2, $absolute = false): DateInterval + { + /** @var \DateInterval|false $result */ + $result = $this->innerDateTime->diff($datetime2, $absolute); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; + } + + /** + * @param string $modify + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function modify($modify): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->modify($modify); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); //we have to recreate a safe datetime because modify create a new instance of \DateTimeImmutable + } + + /** + * @param int $year + * @param int $month + * @param int $day + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function setDate($year, $month, $day): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->setDate($year, $month, $day); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); //we have to recreate a safe datetime because modify create a new instance of \DateTimeImmutable + } + + /** + * @param int $year + * @param int $week + * @param int $day + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function setISODate($year, $week, $day = 1): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->setISODate($year, $week, $day); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); //we have to recreate a safe datetime because modify create a new instance of \DateTimeImmutable + } + + /** + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function setTime($hour, $minute, $second = 0, $microseconds = 0): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->setTime($hour, $minute, $second, $microseconds); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); + } + + /** + * @param int $unixtimestamp + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function setTimestamp($unixtimestamp): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->setTimestamp($unixtimestamp); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); + } + + /** + * @param DateTimeZone $timezone + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function setTimezone($timezone): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->setTimezone($timezone); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); + } + + /** + * @param DateInterval $interval + * @return DateTimeImmutable + * @throws DatetimeException + */ + public function sub($interval): self + { + /** @var \DateTimeImmutable|false $result */ + $result = $this->innerDateTime->sub($interval); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return self::createFromRegular($result); + } + + /** + * @throws DatetimeException + */ + public function getOffset(): int + { + /** @var int|false $result */ + $result = $this->innerDateTime->getOffset(); + if ($result === false) { + throw DatetimeException::createFromPhpError(); + } + return $result; + } + + ////////////////////////////////////////////////////////////////////////////////////////// + //overload getters to use the inner datetime immutable instead of itself + + /** + * @param DateInterval $interval + * @return DateTimeImmutable + */ + public function add($interval): self + { + return self::createFromRegular($this->innerDateTime->add($interval)); + } + + /** + * @param DateTime $dateTime + * @return DateTimeImmutable + */ + public static function createFromMutable($dateTime): self + { + return self::createFromRegular(parent::createFromMutable($dateTime)); + } + + /** + * @param mixed[] $array + * @return DateTimeImmutable + */ + public static function __set_state($array): self + { + return self::createFromRegular(parent::__set_state($array)); + } + + public function getTimezone(): DateTimeZone + { + return $this->innerDateTime->getTimezone(); + } + + public function getTimestamp(): int + { + return $this->innerDateTime->getTimestamp(); + } +} diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php new file mode 100644 index 000000000..2814066b0 --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php @@ -0,0 +1,15 @@ +<?php + + +namespace Safe\Exceptions; + +class CurlException extends \Exception implements SafeExceptionInterface +{ + /** + * @param resource $ch + */ + public static function createFromCurlResource($ch): self + { + return new self(\curl_error($ch), \curl_errno($ch)); + } +} diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php b/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php new file mode 100644 index 000000000..4300d29e9 --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php @@ -0,0 +1,12 @@ +<?php + + +namespace Safe\Exceptions; + +class JsonException extends \Exception implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + return new self(\json_last_error_msg(), \json_last_error()); + } +} diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php b/vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php new file mode 100644 index 000000000..5f424af2d --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php @@ -0,0 +1,12 @@ +<?php + + +namespace Safe\Exceptions; + +class OpensslException extends \Exception implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + return new self(\openssl_error_string() ?: '', 0); + } +} diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php b/vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php new file mode 100644 index 000000000..ee6367ef6 --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php @@ -0,0 +1,21 @@ +<?php + + +namespace Safe\Exceptions; + +class PcreException extends \Exception implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $errorMap = [ + PREG_INTERNAL_ERROR => 'PREG_INTERNAL_ERROR: Internal error', + PREG_BACKTRACK_LIMIT_ERROR => 'PREG_BACKTRACK_LIMIT_ERROR: Backtrack limit reached', + PREG_RECURSION_LIMIT_ERROR => 'PREG_RECURSION_LIMIT_ERROR: Recursion limit reached', + PREG_BAD_UTF8_ERROR => 'PREG_BAD_UTF8_ERROR: Invalid UTF8 character', + PREG_BAD_UTF8_OFFSET_ERROR => 'PREG_BAD_UTF8_OFFSET_ERROR', + PREG_JIT_STACKLIMIT_ERROR => 'PREG_JIT_STACKLIMIT_ERROR', + ]; + $errMsg = $errorMap[preg_last_error()] ?? 'Unknown PCRE error: '.preg_last_error(); + return new self($errMsg, \preg_last_error()); + } +} diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php b/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php new file mode 100644 index 000000000..fbea6ad25 --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php @@ -0,0 +1,9 @@ +<?php + + +namespace Safe\Exceptions; + +interface SafeExceptionInterface extends \Throwable +{ + +} diff --git a/vendor/thecodingmachine/safe/lib/special_cases.php b/vendor/thecodingmachine/safe/lib/special_cases.php new file mode 100644 index 000000000..d18e2118b --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/special_cases.php @@ -0,0 +1,241 @@ +<?php +/** + * This file contains all the functions that could not be dealt with automatically using the code generator. + * If you add a function in this list, do not forget to add it in the generator/config/specialCasesFunctions.php + * + */ + +namespace Safe; + +use Safe\Exceptions\SocketsException; +use const PREG_NO_ERROR; +use Safe\Exceptions\ApcException; +use Safe\Exceptions\ApcuException; +use Safe\Exceptions\JsonException; +use Safe\Exceptions\OpensslException; +use Safe\Exceptions\PcreException; + +/** + * Wrapper for json_decode that throws when an error occurs. + * + * @param string $json JSON data to parse + * @param bool $assoc When true, returned objects will be converted + * into associative arrays. + * @param int $depth User specified recursion depth. + * @param int $options Bitmask of JSON decode options. + * + * @return mixed + * @throws JsonException if the JSON cannot be decoded. + * @link http://www.php.net/manual/en/function.json-decode.php + */ +function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) +{ + $data = \json_decode($json, $assoc, $depth, $options); + if (JSON_ERROR_NONE !== json_last_error()) { + throw JsonException::createFromPhpError(); + } + return $data; +} + + +/** + * Fetchs a stored variable from the cache. + * + * @param mixed $key The key used to store the value (with + * apc_store). If an array is passed then each + * element is fetched and returned. + * @return mixed The stored variable or array of variables on success; FALSE on failure + * @throws ApcException + * + */ +function apc_fetch($key) +{ + error_clear_last(); + $result = \apc_fetch($key, $success); + if ($success === false) { + throw ApcException::createFromPhpError(); + } + return $result; +} + +/** + * Fetchs an entry from the cache. + * + * @param string|string[] $key The key used to store the value (with + * apcu_store). If an array is passed then each + * element is fetched and returned. + * @return mixed The stored variable or array of variables on success + * @throws ApcuException + * + */ +function apcu_fetch($key) +{ + error_clear_last(); + $result = \apcu_fetch($key, $success); + if ($success === false) { + throw ApcuException::createFromPhpError(); + } + return $result; +} + +/** + * Searches subject for matches to + * pattern and replaces them with + * replacement. + * + * @param mixed $pattern The pattern to search for. It can be either a string or an array with + * strings. + * + * Several PCRE modifiers + * are also available. + * @param mixed $replacement The string or an array with strings to replace. If this parameter is a + * string and the pattern parameter is an array, + * all patterns will be replaced by that string. If both + * pattern and replacement + * parameters are arrays, each pattern will be + * replaced by the replacement counterpart. If + * there are fewer elements in the replacement + * array than in the pattern array, any extra + * patterns will be replaced by an empty string. + * + * replacement may contain references of the form + * \\n or + * $n, with the latter form + * being the preferred one. Every such reference will be replaced by the text + * captured by the n'th parenthesized pattern. + * n can be from 0 to 99, and + * \\0 or $0 refers to the text matched + * by the whole pattern. Opening parentheses are counted from left to right + * (starting from 1) to obtain the number of the capturing subpattern. + * To use backslash in replacement, it must be doubled + * ("\\\\" PHP string). + * + * When working with a replacement pattern where a backreference is + * immediately followed by another number (i.e.: placing a literal number + * immediately after a matched pattern), you cannot use the familiar + * \\1 notation for your backreference. + * \\11, for example, would confuse + * preg_replace since it does not know whether you + * want the \\1 backreference followed by a literal + * 1, or the \\11 backreference + * followed by nothing. In this case the solution is to use + * ${1}1. This creates an isolated + * $1 backreference, leaving the 1 + * as a literal. + * + * When using the deprecated e modifier, this function escapes + * some characters (namely ', ", + * \ and NULL) in the strings that replace the + * backreferences. This is done to ensure that no syntax errors arise + * from backreference usage with either single or double quotes (e.g. + * 'strlen(\'$1\')+strlen("$2")'). Make sure you are + * aware of PHP's string + * syntax to know exactly how the interpreted string will look. + * @param string|array|string[] $subject The string or an array with strings to search and replace. + * + * If subject is an array, then the search and + * replace is performed on every entry of subject, + * and the return value is an array as well. + * @param int $limit The maximum possible replacements for each pattern in each + * subject string. Defaults to + * -1 (no limit). + * @param int $count If specified, this variable will be filled with the number of + * replacements done. + * @return string|array|string[] preg_replace returns an array if the + * subject parameter is an array, or a string + * otherwise. + * + * If matches are found, the new subject will + * be returned, otherwise subject will be + * returned unchanged. + * + * @throws PcreException + * + */ +function preg_replace($pattern, $replacement, $subject, int $limit = -1, int &$count = null) +{ + error_clear_last(); + $result = \preg_replace($pattern, $replacement, $subject, $limit, $count); + if (preg_last_error() !== PREG_NO_ERROR || $result === null) { + throw PcreException::createFromPhpError(); + } + return $result; +} + +/** + * @param resource|null $dir_handle + * @return string|false + * @deprecated + * This function is only in safe because the php documentation is wrong + */ +function readdir($dir_handle = null) +{ + if ($dir_handle !== null) { + $result = \readdir($dir_handle); + } else { + $result = \readdir(); + } + return $result; +} + +/** + * Encrypts given data with given method and key, returns a raw + * or base64 encoded string + * + * @param string $data The plaintext message data to be encrypted. + * @param string $method The cipher method. For a list of available cipher methods, use openssl_get_cipher_methods. + * @param string $key The key. + * @param int $options options is a bitwise disjunction of the flags + * OPENSSL_RAW_DATA and + * OPENSSL_ZERO_PADDING. + * @param string $iv A non-NULL Initialization Vector. + * @param string $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). + * @param string $aad Additional authentication data. + * @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. + * @return string Returns the encrypted string. + * @throws OpensslException + * + */ +function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = "", string $aad = "", int $tag_length = 16): string +{ + error_clear_last(); + // The $tag parameter is handled in a weird way by openssl_encrypt. It cannot be provided unless encoding is AEAD + if (func_num_args() <= 5) { + $result = \openssl_encrypt($data, $method, $key, $options, $iv); + } else { + $result = \openssl_encrypt($data, $method, $key, $options, $iv, $tag, $aad, $tag_length); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} + +/** + * The function socket_write writes to the + * socket from the given + * buffer. + * + * @param resource $socket + * @param string $buffer The buffer to be written. + * @param int $length The optional parameter length can specify an + * alternate length of bytes written to the socket. If this length is + * greater than the buffer length, it is silently truncated to the length + * of the buffer. + * @return int Returns the number of bytes successfully written to the socket. + * The error code can be retrieved with + * socket_last_error. This code may be passed to + * socket_strerror to get a textual explanation of the + * error. + * @throws SocketsException + * + */ +function socket_write($socket, string $buffer, int $length = 0): int +{ + error_clear_last(); + $result = $length === 0 ? \socket_write($socket, $buffer) : \socket_write($socket, $buffer, $length); + if ($result === false) { + throw SocketsException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/rector-migrate-0.7.php b/vendor/thecodingmachine/safe/rector-migrate-0.7.php new file mode 100644 index 000000000..d1c599700 --- /dev/null +++ b/vendor/thecodingmachine/safe/rector-migrate-0.7.php @@ -0,0 +1,1081 @@ +<?php + +declare(strict_types=1); + +use Rector\Renaming\Rector\FuncCall\RenameFunctionRector; +use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; + +# This file configures rector/rector:~0.7.0 to replace all PHP functions with their equivalent "safe" functions +return static function (ContainerConfigurator $containerConfigurator): void { + $services = $containerConfigurator->services(); + + $services->set(RenameFunctionRector::class) + ->call('configure', [[ RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [ + 'apache_getenv' => 'Safe\apache_getenv', + 'apache_get_version' => 'Safe\apache_get_version', + 'apache_request_headers' => 'Safe\apache_request_headers', + 'apache_reset_timeout' => 'Safe\apache_reset_timeout', + 'apache_response_headers' => 'Safe\apache_response_headers', + 'apache_setenv' => 'Safe\apache_setenv', + 'apcu_cache_info' => 'Safe\apcu_cache_info', + 'apcu_cas' => 'Safe\apcu_cas', + 'apcu_dec' => 'Safe\apcu_dec', + 'apcu_fetch' => 'Safe\apcu_fetch', + 'apcu_inc' => 'Safe\apcu_inc', + 'apcu_sma_info' => 'Safe\apcu_sma_info', + 'apc_fetch' => 'Safe\apc_fetch', + 'array_combine' => 'Safe\array_combine', + 'array_flip' => 'Safe\array_flip', + 'array_replace' => 'Safe\array_replace', + 'array_replace_recursive' => 'Safe\array_replace_recursive', + 'array_walk_recursive' => 'Safe\array_walk_recursive', + 'arsort' => 'Safe\arsort', + 'asort' => 'Safe\asort', + 'base64_decode' => 'Safe\base64_decode', + 'bzclose' => 'Safe\bzclose', + 'bzflush' => 'Safe\bzflush', + 'bzread' => 'Safe\bzread', + 'bzwrite' => 'Safe\bzwrite', + 'chdir' => 'Safe\chdir', + 'chgrp' => 'Safe\chgrp', + 'chmod' => 'Safe\chmod', + 'chown' => 'Safe\chown', + 'chroot' => 'Safe\chroot', + 'class_alias' => 'Safe\class_alias', + 'class_implements' => 'Safe\class_implements', + 'class_parents' => 'Safe\class_parents', + 'class_uses' => 'Safe\class_uses', + 'cli_set_process_title' => 'Safe\cli_set_process_title', + 'closelog' => 'Safe\closelog', + 'com_event_sink' => 'Safe\com_event_sink', + 'com_load_typelib' => 'Safe\com_load_typelib', + 'com_print_typeinfo' => 'Safe\com_print_typeinfo', + 'convert_uudecode' => 'Safe\convert_uudecode', + 'convert_uuencode' => 'Safe\convert_uuencode', + 'copy' => 'Safe\copy', + 'create_function' => 'Safe\create_function', + 'cubrid_free_result' => 'Safe\cubrid_free_result', + 'cubrid_get_charset' => 'Safe\cubrid_get_charset', + 'cubrid_get_client_info' => 'Safe\cubrid_get_client_info', + 'cubrid_get_db_parameter' => 'Safe\cubrid_get_db_parameter', + 'cubrid_get_server_info' => 'Safe\cubrid_get_server_info', + 'cubrid_insert_id' => 'Safe\cubrid_insert_id', + 'cubrid_lob2_new' => 'Safe\cubrid_lob2_new', + 'cubrid_lob2_size' => 'Safe\cubrid_lob2_size', + 'cubrid_lob2_size64' => 'Safe\cubrid_lob2_size64', + 'cubrid_lob2_tell' => 'Safe\cubrid_lob2_tell', + 'cubrid_lob2_tell64' => 'Safe\cubrid_lob2_tell64', + 'cubrid_set_db_parameter' => 'Safe\cubrid_set_db_parameter', + 'curl_escape' => 'Safe\curl_escape', + 'curl_exec' => 'Safe\curl_exec', + 'curl_getinfo' => 'Safe\curl_getinfo', + 'curl_init' => 'Safe\curl_init', + 'curl_multi_errno' => 'Safe\curl_multi_errno', + 'curl_multi_info_read' => 'Safe\curl_multi_info_read', + 'curl_multi_init' => 'Safe\curl_multi_init', + 'curl_setopt' => 'Safe\curl_setopt', + 'curl_share_errno' => 'Safe\curl_share_errno', + 'curl_share_setopt' => 'Safe\curl_share_setopt', + 'curl_unescape' => 'Safe\curl_unescape', + 'date' => 'Safe\date', + 'date_parse' => 'Safe\date_parse', + 'date_parse_from_format' => 'Safe\date_parse_from_format', + 'date_sunrise' => 'Safe\date_sunrise', + 'date_sunset' => 'Safe\date_sunset', + 'date_sun_info' => 'Safe\date_sun_info', + 'db2_autocommit' => 'Safe\db2_autocommit', + 'db2_bind_param' => 'Safe\db2_bind_param', + 'db2_client_info' => 'Safe\db2_client_info', + 'db2_close' => 'Safe\db2_close', + 'db2_commit' => 'Safe\db2_commit', + 'db2_execute' => 'Safe\db2_execute', + 'db2_free_result' => 'Safe\db2_free_result', + 'db2_free_stmt' => 'Safe\db2_free_stmt', + 'db2_get_option' => 'Safe\db2_get_option', + 'db2_pclose' => 'Safe\db2_pclose', + 'db2_rollback' => 'Safe\db2_rollback', + 'db2_server_info' => 'Safe\db2_server_info', + 'db2_set_option' => 'Safe\db2_set_option', + 'define' => 'Safe\define', + 'deflate_add' => 'Safe\deflate_add', + 'deflate_init' => 'Safe\deflate_init', + 'disk_free_space' => 'Safe\disk_free_space', + 'disk_total_space' => 'Safe\disk_total_space', + 'dl' => 'Safe\dl', + 'dns_get_record' => 'Safe\dns_get_record', + 'eio_busy' => 'Safe\eio_busy', + 'eio_chmod' => 'Safe\eio_chmod', + 'eio_chown' => 'Safe\eio_chown', + 'eio_close' => 'Safe\eio_close', + 'eio_custom' => 'Safe\eio_custom', + 'eio_dup2' => 'Safe\eio_dup2', + 'eio_event_loop' => 'Safe\eio_event_loop', + 'eio_fallocate' => 'Safe\eio_fallocate', + 'eio_fchmod' => 'Safe\eio_fchmod', + 'eio_fdatasync' => 'Safe\eio_fdatasync', + 'eio_fstat' => 'Safe\eio_fstat', + 'eio_fstatvfs' => 'Safe\eio_fstatvfs', + 'eio_fsync' => 'Safe\eio_fsync', + 'eio_ftruncate' => 'Safe\eio_ftruncate', + 'eio_futime' => 'Safe\eio_futime', + 'eio_grp' => 'Safe\eio_grp', + 'eio_lstat' => 'Safe\eio_lstat', + 'eio_mkdir' => 'Safe\eio_mkdir', + 'eio_mknod' => 'Safe\eio_mknod', + 'eio_nop' => 'Safe\eio_nop', + 'eio_readahead' => 'Safe\eio_readahead', + 'eio_readdir' => 'Safe\eio_readdir', + 'eio_readlink' => 'Safe\eio_readlink', + 'eio_rename' => 'Safe\eio_rename', + 'eio_rmdir' => 'Safe\eio_rmdir', + 'eio_seek' => 'Safe\eio_seek', + 'eio_sendfile' => 'Safe\eio_sendfile', + 'eio_stat' => 'Safe\eio_stat', + 'eio_statvfs' => 'Safe\eio_statvfs', + 'eio_symlink' => 'Safe\eio_symlink', + 'eio_sync' => 'Safe\eio_sync', + 'eio_syncfs' => 'Safe\eio_syncfs', + 'eio_sync_file_range' => 'Safe\eio_sync_file_range', + 'eio_truncate' => 'Safe\eio_truncate', + 'eio_unlink' => 'Safe\eio_unlink', + 'eio_utime' => 'Safe\eio_utime', + 'eio_write' => 'Safe\eio_write', + 'error_log' => 'Safe\error_log', + 'fastcgi_finish_request' => 'Safe\fastcgi_finish_request', + 'fbird_blob_cancel' => 'Safe\fbird_blob_cancel', + 'fclose' => 'Safe\fclose', + 'fflush' => 'Safe\fflush', + 'file' => 'Safe\file', + 'fileatime' => 'Safe\fileatime', + 'filectime' => 'Safe\filectime', + 'fileinode' => 'Safe\fileinode', + 'filemtime' => 'Safe\filemtime', + 'fileowner' => 'Safe\fileowner', + 'filesize' => 'Safe\filesize', + 'file_get_contents' => 'Safe\file_get_contents', + 'file_put_contents' => 'Safe\file_put_contents', + 'filter_input_array' => 'Safe\filter_input_array', + 'filter_var_array' => 'Safe\filter_var_array', + 'finfo_close' => 'Safe\finfo_close', + 'finfo_open' => 'Safe\finfo_open', + 'flock' => 'Safe\flock', + 'fopen' => 'Safe\fopen', + 'fputcsv' => 'Safe\fputcsv', + 'fread' => 'Safe\fread', + 'fsockopen' => 'Safe\fsockopen', + 'ftp_alloc' => 'Safe\ftp_alloc', + 'ftp_append' => 'Safe\ftp_append', + 'ftp_cdup' => 'Safe\ftp_cdup', + 'ftp_chdir' => 'Safe\ftp_chdir', + 'ftp_chmod' => 'Safe\ftp_chmod', + 'ftp_close' => 'Safe\ftp_close', + 'ftp_connect' => 'Safe\ftp_connect', + 'ftp_delete' => 'Safe\ftp_delete', + 'ftp_fget' => 'Safe\ftp_fget', + 'ftp_fput' => 'Safe\ftp_fput', + 'ftp_get' => 'Safe\ftp_get', + 'ftp_login' => 'Safe\ftp_login', + 'ftp_mkdir' => 'Safe\ftp_mkdir', + 'ftp_mlsd' => 'Safe\ftp_mlsd', + 'ftp_nlist' => 'Safe\ftp_nlist', + 'ftp_pasv' => 'Safe\ftp_pasv', + 'ftp_put' => 'Safe\ftp_put', + 'ftp_pwd' => 'Safe\ftp_pwd', + 'ftp_rename' => 'Safe\ftp_rename', + 'ftp_rmdir' => 'Safe\ftp_rmdir', + 'ftp_site' => 'Safe\ftp_site', + 'ftp_ssl_connect' => 'Safe\ftp_ssl_connect', + 'ftp_systype' => 'Safe\ftp_systype', + 'ftruncate' => 'Safe\ftruncate', + 'fwrite' => 'Safe\fwrite', + 'getallheaders' => 'Safe\getallheaders', + 'getcwd' => 'Safe\getcwd', + 'gethostname' => 'Safe\gethostname', + 'getimagesize' => 'Safe\getimagesize', + 'getlastmod' => 'Safe\getlastmod', + 'getmygid' => 'Safe\getmygid', + 'getmyinode' => 'Safe\getmyinode', + 'getmypid' => 'Safe\getmypid', + 'getmyuid' => 'Safe\getmyuid', + 'getopt' => 'Safe\getopt', + 'getprotobyname' => 'Safe\getprotobyname', + 'getprotobynumber' => 'Safe\getprotobynumber', + 'get_headers' => 'Safe\get_headers', + 'glob' => 'Safe\glob', + 'gmdate' => 'Safe\gmdate', + 'gmp_binomial' => 'Safe\gmp_binomial', + 'gmp_export' => 'Safe\gmp_export', + 'gmp_import' => 'Safe\gmp_import', + 'gmp_random_seed' => 'Safe\gmp_random_seed', + 'gnupg_adddecryptkey' => 'Safe\gnupg_adddecryptkey', + 'gnupg_addencryptkey' => 'Safe\gnupg_addencryptkey', + 'gnupg_addsignkey' => 'Safe\gnupg_addsignkey', + 'gnupg_cleardecryptkeys' => 'Safe\gnupg_cleardecryptkeys', + 'gnupg_clearencryptkeys' => 'Safe\gnupg_clearencryptkeys', + 'gnupg_clearsignkeys' => 'Safe\gnupg_clearsignkeys', + 'gnupg_setarmor' => 'Safe\gnupg_setarmor', + 'gnupg_setsignmode' => 'Safe\gnupg_setsignmode', + 'gzclose' => 'Safe\gzclose', + 'gzcompress' => 'Safe\gzcompress', + 'gzdecode' => 'Safe\gzdecode', + 'gzdeflate' => 'Safe\gzdeflate', + 'gzencode' => 'Safe\gzencode', + 'gzgets' => 'Safe\gzgets', + 'gzgetss' => 'Safe\gzgetss', + 'gzinflate' => 'Safe\gzinflate', + 'gzpassthru' => 'Safe\gzpassthru', + 'gzrewind' => 'Safe\gzrewind', + 'gzuncompress' => 'Safe\gzuncompress', + 'hash_hkdf' => 'Safe\hash_hkdf', + 'hash_update_file' => 'Safe\hash_update_file', + 'header_register_callback' => 'Safe\header_register_callback', + 'hex2bin' => 'Safe\hex2bin', + 'highlight_file' => 'Safe\highlight_file', + 'highlight_string' => 'Safe\highlight_string', + 'ibase_add_user' => 'Safe\ibase_add_user', + 'ibase_backup' => 'Safe\ibase_backup', + 'ibase_blob_cancel' => 'Safe\ibase_blob_cancel', + 'ibase_blob_create' => 'Safe\ibase_blob_create', + 'ibase_blob_get' => 'Safe\ibase_blob_get', + 'ibase_close' => 'Safe\ibase_close', + 'ibase_commit' => 'Safe\ibase_commit', + 'ibase_commit_ret' => 'Safe\ibase_commit_ret', + 'ibase_connect' => 'Safe\ibase_connect', + 'ibase_delete_user' => 'Safe\ibase_delete_user', + 'ibase_drop_db' => 'Safe\ibase_drop_db', + 'ibase_free_event_handler' => 'Safe\ibase_free_event_handler', + 'ibase_free_query' => 'Safe\ibase_free_query', + 'ibase_free_result' => 'Safe\ibase_free_result', + 'ibase_maintain_db' => 'Safe\ibase_maintain_db', + 'ibase_modify_user' => 'Safe\ibase_modify_user', + 'ibase_name_result' => 'Safe\ibase_name_result', + 'ibase_pconnect' => 'Safe\ibase_pconnect', + 'ibase_restore' => 'Safe\ibase_restore', + 'ibase_rollback' => 'Safe\ibase_rollback', + 'ibase_rollback_ret' => 'Safe\ibase_rollback_ret', + 'ibase_service_attach' => 'Safe\ibase_service_attach', + 'ibase_service_detach' => 'Safe\ibase_service_detach', + 'iconv' => 'Safe\iconv', + 'iconv_get_encoding' => 'Safe\iconv_get_encoding', + 'iconv_set_encoding' => 'Safe\iconv_set_encoding', + 'image2wbmp' => 'Safe\image2wbmp', + 'imageaffine' => 'Safe\imageaffine', + 'imageaffinematrixconcat' => 'Safe\imageaffinematrixconcat', + 'imageaffinematrixget' => 'Safe\imageaffinematrixget', + 'imagealphablending' => 'Safe\imagealphablending', + 'imageantialias' => 'Safe\imageantialias', + 'imagearc' => 'Safe\imagearc', + 'imagebmp' => 'Safe\imagebmp', + 'imagechar' => 'Safe\imagechar', + 'imagecharup' => 'Safe\imagecharup', + 'imagecolorat' => 'Safe\imagecolorat', + 'imagecolordeallocate' => 'Safe\imagecolordeallocate', + 'imagecolormatch' => 'Safe\imagecolormatch', + 'imageconvolution' => 'Safe\imageconvolution', + 'imagecopy' => 'Safe\imagecopy', + 'imagecopymerge' => 'Safe\imagecopymerge', + 'imagecopymergegray' => 'Safe\imagecopymergegray', + 'imagecopyresampled' => 'Safe\imagecopyresampled', + 'imagecopyresized' => 'Safe\imagecopyresized', + 'imagecreate' => 'Safe\imagecreate', + 'imagecreatefrombmp' => 'Safe\imagecreatefrombmp', + 'imagecreatefromgd' => 'Safe\imagecreatefromgd', + 'imagecreatefromgd2' => 'Safe\imagecreatefromgd2', + 'imagecreatefromgd2part' => 'Safe\imagecreatefromgd2part', + 'imagecreatefromgif' => 'Safe\imagecreatefromgif', + 'imagecreatefromjpeg' => 'Safe\imagecreatefromjpeg', + 'imagecreatefrompng' => 'Safe\imagecreatefrompng', + 'imagecreatefromwbmp' => 'Safe\imagecreatefromwbmp', + 'imagecreatefromwebp' => 'Safe\imagecreatefromwebp', + 'imagecreatefromxbm' => 'Safe\imagecreatefromxbm', + 'imagecreatefromxpm' => 'Safe\imagecreatefromxpm', + 'imagecreatetruecolor' => 'Safe\imagecreatetruecolor', + 'imagecrop' => 'Safe\imagecrop', + 'imagecropauto' => 'Safe\imagecropauto', + 'imagedashedline' => 'Safe\imagedashedline', + 'imagedestroy' => 'Safe\imagedestroy', + 'imageellipse' => 'Safe\imageellipse', + 'imagefill' => 'Safe\imagefill', + 'imagefilledarc' => 'Safe\imagefilledarc', + 'imagefilledellipse' => 'Safe\imagefilledellipse', + 'imagefilledpolygon' => 'Safe\imagefilledpolygon', + 'imagefilledrectangle' => 'Safe\imagefilledrectangle', + 'imagefilltoborder' => 'Safe\imagefilltoborder', + 'imagefilter' => 'Safe\imagefilter', + 'imageflip' => 'Safe\imageflip', + 'imagegammacorrect' => 'Safe\imagegammacorrect', + 'imagegd' => 'Safe\imagegd', + 'imagegd2' => 'Safe\imagegd2', + 'imagegif' => 'Safe\imagegif', + 'imagegrabscreen' => 'Safe\imagegrabscreen', + 'imagegrabwindow' => 'Safe\imagegrabwindow', + 'imagejpeg' => 'Safe\imagejpeg', + 'imagelayereffect' => 'Safe\imagelayereffect', + 'imageline' => 'Safe\imageline', + 'imageloadfont' => 'Safe\imageloadfont', + 'imageopenpolygon' => 'Safe\imageopenpolygon', + 'imagepng' => 'Safe\imagepng', + 'imagepolygon' => 'Safe\imagepolygon', + 'imagerectangle' => 'Safe\imagerectangle', + 'imagerotate' => 'Safe\imagerotate', + 'imagesavealpha' => 'Safe\imagesavealpha', + 'imagescale' => 'Safe\imagescale', + 'imagesetbrush' => 'Safe\imagesetbrush', + 'imagesetclip' => 'Safe\imagesetclip', + 'imagesetinterpolation' => 'Safe\imagesetinterpolation', + 'imagesetpixel' => 'Safe\imagesetpixel', + 'imagesetstyle' => 'Safe\imagesetstyle', + 'imagesetthickness' => 'Safe\imagesetthickness', + 'imagesettile' => 'Safe\imagesettile', + 'imagestring' => 'Safe\imagestring', + 'imagestringup' => 'Safe\imagestringup', + 'imagesx' => 'Safe\imagesx', + 'imagesy' => 'Safe\imagesy', + 'imagetruecolortopalette' => 'Safe\imagetruecolortopalette', + 'imagettfbbox' => 'Safe\imagettfbbox', + 'imagettftext' => 'Safe\imagettftext', + 'imagewbmp' => 'Safe\imagewbmp', + 'imagewebp' => 'Safe\imagewebp', + 'imagexbm' => 'Safe\imagexbm', + 'imap_append' => 'Safe\imap_append', + 'imap_check' => 'Safe\imap_check', + 'imap_clearflag_full' => 'Safe\imap_clearflag_full', + 'imap_close' => 'Safe\imap_close', + 'imap_createmailbox' => 'Safe\imap_createmailbox', + 'imap_deletemailbox' => 'Safe\imap_deletemailbox', + 'imap_fetchstructure' => 'Safe\imap_fetchstructure', + 'imap_gc' => 'Safe\imap_gc', + 'imap_headerinfo' => 'Safe\imap_headerinfo', + 'imap_mail' => 'Safe\imap_mail', + 'imap_mailboxmsginfo' => 'Safe\imap_mailboxmsginfo', + 'imap_mail_compose' => 'Safe\imap_mail_compose', + 'imap_mail_copy' => 'Safe\imap_mail_copy', + 'imap_mail_move' => 'Safe\imap_mail_move', + 'imap_mutf7_to_utf8' => 'Safe\imap_mutf7_to_utf8', + 'imap_num_msg' => 'Safe\imap_num_msg', + 'imap_open' => 'Safe\imap_open', + 'imap_renamemailbox' => 'Safe\imap_renamemailbox', + 'imap_savebody' => 'Safe\imap_savebody', + 'imap_setacl' => 'Safe\imap_setacl', + 'imap_setflag_full' => 'Safe\imap_setflag_full', + 'imap_set_quota' => 'Safe\imap_set_quota', + 'imap_sort' => 'Safe\imap_sort', + 'imap_subscribe' => 'Safe\imap_subscribe', + 'imap_thread' => 'Safe\imap_thread', + 'imap_timeout' => 'Safe\imap_timeout', + 'imap_undelete' => 'Safe\imap_undelete', + 'imap_unsubscribe' => 'Safe\imap_unsubscribe', + 'imap_utf8_to_mutf7' => 'Safe\imap_utf8_to_mutf7', + 'inet_ntop' => 'Safe\inet_ntop', + 'inflate_add' => 'Safe\inflate_add', + 'inflate_get_read_len' => 'Safe\inflate_get_read_len', + 'inflate_get_status' => 'Safe\inflate_get_status', + 'inflate_init' => 'Safe\inflate_init', + 'ingres_autocommit' => 'Safe\ingres_autocommit', + 'ingres_close' => 'Safe\ingres_close', + 'ingres_commit' => 'Safe\ingres_commit', + 'ingres_connect' => 'Safe\ingres_connect', + 'ingres_execute' => 'Safe\ingres_execute', + 'ingres_field_name' => 'Safe\ingres_field_name', + 'ingres_field_type' => 'Safe\ingres_field_type', + 'ingres_free_result' => 'Safe\ingres_free_result', + 'ingres_pconnect' => 'Safe\ingres_pconnect', + 'ingres_result_seek' => 'Safe\ingres_result_seek', + 'ingres_rollback' => 'Safe\ingres_rollback', + 'ingres_set_environment' => 'Safe\ingres_set_environment', + 'ini_get' => 'Safe\ini_get', + 'ini_set' => 'Safe\ini_set', + 'inotify_init' => 'Safe\inotify_init', + 'inotify_rm_watch' => 'Safe\inotify_rm_watch', + 'iptcembed' => 'Safe\iptcembed', + 'iptcparse' => 'Safe\iptcparse', + 'jdtounix' => 'Safe\jdtounix', + 'jpeg2wbmp' => 'Safe\jpeg2wbmp', + 'json_decode' => 'Safe\json_decode', + 'json_encode' => 'Safe\json_encode', + 'json_last_error_msg' => 'Safe\json_last_error_msg', + 'krsort' => 'Safe\krsort', + 'ksort' => 'Safe\ksort', + 'lchgrp' => 'Safe\lchgrp', + 'lchown' => 'Safe\lchown', + 'ldap_add' => 'Safe\ldap_add', + 'ldap_add_ext' => 'Safe\ldap_add_ext', + 'ldap_bind' => 'Safe\ldap_bind', + 'ldap_bind_ext' => 'Safe\ldap_bind_ext', + 'ldap_control_paged_result' => 'Safe\ldap_control_paged_result', + 'ldap_control_paged_result_response' => 'Safe\ldap_control_paged_result_response', + 'ldap_count_entries' => 'Safe\ldap_count_entries', + 'ldap_delete' => 'Safe\ldap_delete', + 'ldap_delete_ext' => 'Safe\ldap_delete_ext', + 'ldap_exop' => 'Safe\ldap_exop', + 'ldap_exop_passwd' => 'Safe\ldap_exop_passwd', + 'ldap_exop_whoami' => 'Safe\ldap_exop_whoami', + 'ldap_explode_dn' => 'Safe\ldap_explode_dn', + 'ldap_first_attribute' => 'Safe\ldap_first_attribute', + 'ldap_first_entry' => 'Safe\ldap_first_entry', + 'ldap_free_result' => 'Safe\ldap_free_result', + 'ldap_get_attributes' => 'Safe\ldap_get_attributes', + 'ldap_get_dn' => 'Safe\ldap_get_dn', + 'ldap_get_entries' => 'Safe\ldap_get_entries', + 'ldap_get_option' => 'Safe\ldap_get_option', + 'ldap_get_values' => 'Safe\ldap_get_values', + 'ldap_get_values_len' => 'Safe\ldap_get_values_len', + 'ldap_list' => 'Safe\ldap_list', + 'ldap_modify_batch' => 'Safe\ldap_modify_batch', + 'ldap_mod_add' => 'Safe\ldap_mod_add', + 'ldap_mod_add_ext' => 'Safe\ldap_mod_add_ext', + 'ldap_mod_del' => 'Safe\ldap_mod_del', + 'ldap_mod_del_ext' => 'Safe\ldap_mod_del_ext', + 'ldap_mod_replace' => 'Safe\ldap_mod_replace', + 'ldap_mod_replace_ext' => 'Safe\ldap_mod_replace_ext', + 'ldap_next_attribute' => 'Safe\ldap_next_attribute', + 'ldap_parse_exop' => 'Safe\ldap_parse_exop', + 'ldap_parse_result' => 'Safe\ldap_parse_result', + 'ldap_read' => 'Safe\ldap_read', + 'ldap_rename' => 'Safe\ldap_rename', + 'ldap_rename_ext' => 'Safe\ldap_rename_ext', + 'ldap_sasl_bind' => 'Safe\ldap_sasl_bind', + 'ldap_search' => 'Safe\ldap_search', + 'ldap_set_option' => 'Safe\ldap_set_option', + 'ldap_unbind' => 'Safe\ldap_unbind', + 'libxml_get_last_error' => 'Safe\libxml_get_last_error', + 'libxml_set_external_entity_loader' => 'Safe\libxml_set_external_entity_loader', + 'link' => 'Safe\link', + 'lzf_compress' => 'Safe\lzf_compress', + 'lzf_decompress' => 'Safe\lzf_decompress', + 'mailparse_msg_extract_part_file' => 'Safe\mailparse_msg_extract_part_file', + 'mailparse_msg_free' => 'Safe\mailparse_msg_free', + 'mailparse_msg_parse' => 'Safe\mailparse_msg_parse', + 'mailparse_msg_parse_file' => 'Safe\mailparse_msg_parse_file', + 'mailparse_stream_encode' => 'Safe\mailparse_stream_encode', + 'mb_chr' => 'Safe\mb_chr', + 'mb_detect_order' => 'Safe\mb_detect_order', + 'mb_encoding_aliases' => 'Safe\mb_encoding_aliases', + 'mb_eregi_replace' => 'Safe\mb_eregi_replace', + 'mb_ereg_replace' => 'Safe\mb_ereg_replace', + 'mb_ereg_replace_callback' => 'Safe\mb_ereg_replace_callback', + 'mb_ereg_search_getregs' => 'Safe\mb_ereg_search_getregs', + 'mb_ereg_search_init' => 'Safe\mb_ereg_search_init', + 'mb_ereg_search_regs' => 'Safe\mb_ereg_search_regs', + 'mb_ereg_search_setpos' => 'Safe\mb_ereg_search_setpos', + 'mb_http_output' => 'Safe\mb_http_output', + 'mb_internal_encoding' => 'Safe\mb_internal_encoding', + 'mb_ord' => 'Safe\mb_ord', + 'mb_parse_str' => 'Safe\mb_parse_str', + 'mb_regex_encoding' => 'Safe\mb_regex_encoding', + 'mb_send_mail' => 'Safe\mb_send_mail', + 'mb_split' => 'Safe\mb_split', + 'mb_str_split' => 'Safe\mb_str_split', + 'md5_file' => 'Safe\md5_file', + 'metaphone' => 'Safe\metaphone', + 'mime_content_type' => 'Safe\mime_content_type', + 'mkdir' => 'Safe\mkdir', + 'mktime' => 'Safe\mktime', + 'msg_queue_exists' => 'Safe\msg_queue_exists', + 'msg_receive' => 'Safe\msg_receive', + 'msg_remove_queue' => 'Safe\msg_remove_queue', + 'msg_send' => 'Safe\msg_send', + 'msg_set_queue' => 'Safe\msg_set_queue', + 'msql_affected_rows' => 'Safe\msql_affected_rows', + 'msql_close' => 'Safe\msql_close', + 'msql_connect' => 'Safe\msql_connect', + 'msql_create_db' => 'Safe\msql_create_db', + 'msql_data_seek' => 'Safe\msql_data_seek', + 'msql_db_query' => 'Safe\msql_db_query', + 'msql_drop_db' => 'Safe\msql_drop_db', + 'msql_field_len' => 'Safe\msql_field_len', + 'msql_field_name' => 'Safe\msql_field_name', + 'msql_field_seek' => 'Safe\msql_field_seek', + 'msql_field_table' => 'Safe\msql_field_table', + 'msql_field_type' => 'Safe\msql_field_type', + 'msql_free_result' => 'Safe\msql_free_result', + 'msql_pconnect' => 'Safe\msql_pconnect', + 'msql_query' => 'Safe\msql_query', + 'msql_select_db' => 'Safe\msql_select_db', + 'mysqli_get_cache_stats' => 'Safe\mysqli_get_cache_stats', + 'mysqli_get_client_stats' => 'Safe\mysqli_get_client_stats', + 'mysqlnd_ms_dump_servers' => 'Safe\mysqlnd_ms_dump_servers', + 'mysqlnd_ms_fabric_select_global' => 'Safe\mysqlnd_ms_fabric_select_global', + 'mysqlnd_ms_fabric_select_shard' => 'Safe\mysqlnd_ms_fabric_select_shard', + 'mysqlnd_ms_get_last_used_connection' => 'Safe\mysqlnd_ms_get_last_used_connection', + 'mysqlnd_qc_clear_cache' => 'Safe\mysqlnd_qc_clear_cache', + 'mysqlnd_qc_set_is_select' => 'Safe\mysqlnd_qc_set_is_select', + 'mysqlnd_qc_set_storage_handler' => 'Safe\mysqlnd_qc_set_storage_handler', + 'mysql_close' => 'Safe\mysql_close', + 'mysql_connect' => 'Safe\mysql_connect', + 'mysql_create_db' => 'Safe\mysql_create_db', + 'mysql_data_seek' => 'Safe\mysql_data_seek', + 'mysql_db_name' => 'Safe\mysql_db_name', + 'mysql_db_query' => 'Safe\mysql_db_query', + 'mysql_drop_db' => 'Safe\mysql_drop_db', + 'mysql_fetch_lengths' => 'Safe\mysql_fetch_lengths', + 'mysql_field_flags' => 'Safe\mysql_field_flags', + 'mysql_field_len' => 'Safe\mysql_field_len', + 'mysql_field_name' => 'Safe\mysql_field_name', + 'mysql_field_seek' => 'Safe\mysql_field_seek', + 'mysql_free_result' => 'Safe\mysql_free_result', + 'mysql_get_host_info' => 'Safe\mysql_get_host_info', + 'mysql_get_proto_info' => 'Safe\mysql_get_proto_info', + 'mysql_get_server_info' => 'Safe\mysql_get_server_info', + 'mysql_info' => 'Safe\mysql_info', + 'mysql_list_dbs' => 'Safe\mysql_list_dbs', + 'mysql_list_fields' => 'Safe\mysql_list_fields', + 'mysql_list_processes' => 'Safe\mysql_list_processes', + 'mysql_list_tables' => 'Safe\mysql_list_tables', + 'mysql_num_fields' => 'Safe\mysql_num_fields', + 'mysql_num_rows' => 'Safe\mysql_num_rows', + 'mysql_query' => 'Safe\mysql_query', + 'mysql_real_escape_string' => 'Safe\mysql_real_escape_string', + 'mysql_result' => 'Safe\mysql_result', + 'mysql_select_db' => 'Safe\mysql_select_db', + 'mysql_set_charset' => 'Safe\mysql_set_charset', + 'mysql_tablename' => 'Safe\mysql_tablename', + 'mysql_thread_id' => 'Safe\mysql_thread_id', + 'mysql_unbuffered_query' => 'Safe\mysql_unbuffered_query', + 'natcasesort' => 'Safe\natcasesort', + 'natsort' => 'Safe\natsort', + 'ob_end_clean' => 'Safe\ob_end_clean', + 'ob_end_flush' => 'Safe\ob_end_flush', + 'oci_bind_array_by_name' => 'Safe\oci_bind_array_by_name', + 'oci_bind_by_name' => 'Safe\oci_bind_by_name', + 'oci_cancel' => 'Safe\oci_cancel', + 'oci_close' => 'Safe\oci_close', + 'oci_commit' => 'Safe\oci_commit', + 'oci_connect' => 'Safe\oci_connect', + 'oci_define_by_name' => 'Safe\oci_define_by_name', + 'oci_execute' => 'Safe\oci_execute', + 'oci_fetch_all' => 'Safe\oci_fetch_all', + 'oci_field_name' => 'Safe\oci_field_name', + 'oci_field_precision' => 'Safe\oci_field_precision', + 'oci_field_scale' => 'Safe\oci_field_scale', + 'oci_field_size' => 'Safe\oci_field_size', + 'oci_field_type' => 'Safe\oci_field_type', + 'oci_field_type_raw' => 'Safe\oci_field_type_raw', + 'oci_free_descriptor' => 'Safe\oci_free_descriptor', + 'oci_free_statement' => 'Safe\oci_free_statement', + 'oci_new_collection' => 'Safe\oci_new_collection', + 'oci_new_connect' => 'Safe\oci_new_connect', + 'oci_new_cursor' => 'Safe\oci_new_cursor', + 'oci_new_descriptor' => 'Safe\oci_new_descriptor', + 'oci_num_fields' => 'Safe\oci_num_fields', + 'oci_num_rows' => 'Safe\oci_num_rows', + 'oci_parse' => 'Safe\oci_parse', + 'oci_pconnect' => 'Safe\oci_pconnect', + 'oci_result' => 'Safe\oci_result', + 'oci_rollback' => 'Safe\oci_rollback', + 'oci_server_version' => 'Safe\oci_server_version', + 'oci_set_action' => 'Safe\oci_set_action', + 'oci_set_call_timeout' => 'Safe\oci_set_call_timeout', + 'oci_set_client_identifier' => 'Safe\oci_set_client_identifier', + 'oci_set_client_info' => 'Safe\oci_set_client_info', + 'oci_set_db_operation' => 'Safe\oci_set_db_operation', + 'oci_set_edition' => 'Safe\oci_set_edition', + 'oci_set_module_name' => 'Safe\oci_set_module_name', + 'oci_set_prefetch' => 'Safe\oci_set_prefetch', + 'oci_statement_type' => 'Safe\oci_statement_type', + 'oci_unregister_taf_callback' => 'Safe\oci_unregister_taf_callback', + 'odbc_autocommit' => 'Safe\odbc_autocommit', + 'odbc_binmode' => 'Safe\odbc_binmode', + 'odbc_columnprivileges' => 'Safe\odbc_columnprivileges', + 'odbc_columns' => 'Safe\odbc_columns', + 'odbc_commit' => 'Safe\odbc_commit', + 'odbc_data_source' => 'Safe\odbc_data_source', + 'odbc_exec' => 'Safe\odbc_exec', + 'odbc_execute' => 'Safe\odbc_execute', + 'odbc_fetch_into' => 'Safe\odbc_fetch_into', + 'odbc_field_len' => 'Safe\odbc_field_len', + 'odbc_field_name' => 'Safe\odbc_field_name', + 'odbc_field_num' => 'Safe\odbc_field_num', + 'odbc_field_scale' => 'Safe\odbc_field_scale', + 'odbc_field_type' => 'Safe\odbc_field_type', + 'odbc_foreignkeys' => 'Safe\odbc_foreignkeys', + 'odbc_gettypeinfo' => 'Safe\odbc_gettypeinfo', + 'odbc_longreadlen' => 'Safe\odbc_longreadlen', + 'odbc_prepare' => 'Safe\odbc_prepare', + 'odbc_primarykeys' => 'Safe\odbc_primarykeys', + 'odbc_result' => 'Safe\odbc_result', + 'odbc_result_all' => 'Safe\odbc_result_all', + 'odbc_rollback' => 'Safe\odbc_rollback', + 'odbc_setoption' => 'Safe\odbc_setoption', + 'odbc_specialcolumns' => 'Safe\odbc_specialcolumns', + 'odbc_statistics' => 'Safe\odbc_statistics', + 'odbc_tableprivileges' => 'Safe\odbc_tableprivileges', + 'odbc_tables' => 'Safe\odbc_tables', + 'opcache_compile_file' => 'Safe\opcache_compile_file', + 'opcache_get_status' => 'Safe\opcache_get_status', + 'opendir' => 'Safe\opendir', + 'openlog' => 'Safe\openlog', + 'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length', + 'openssl_csr_export' => 'Safe\openssl_csr_export', + 'openssl_csr_export_to_file' => 'Safe\openssl_csr_export_to_file', + 'openssl_csr_get_subject' => 'Safe\openssl_csr_get_subject', + 'openssl_csr_new' => 'Safe\openssl_csr_new', + 'openssl_csr_sign' => 'Safe\openssl_csr_sign', + 'openssl_decrypt' => 'Safe\openssl_decrypt', + 'openssl_dh_compute_key' => 'Safe\openssl_dh_compute_key', + 'openssl_digest' => 'Safe\openssl_digest', + 'openssl_encrypt' => 'Safe\openssl_encrypt', + 'openssl_open' => 'Safe\openssl_open', + 'openssl_pbkdf2' => 'Safe\openssl_pbkdf2', + 'openssl_pkcs7_decrypt' => 'Safe\openssl_pkcs7_decrypt', + 'openssl_pkcs7_encrypt' => 'Safe\openssl_pkcs7_encrypt', + 'openssl_pkcs7_read' => 'Safe\openssl_pkcs7_read', + 'openssl_pkcs7_sign' => 'Safe\openssl_pkcs7_sign', + 'openssl_pkcs12_export' => 'Safe\openssl_pkcs12_export', + 'openssl_pkcs12_export_to_file' => 'Safe\openssl_pkcs12_export_to_file', + 'openssl_pkcs12_read' => 'Safe\openssl_pkcs12_read', + 'openssl_pkey_export' => 'Safe\openssl_pkey_export', + 'openssl_pkey_export_to_file' => 'Safe\openssl_pkey_export_to_file', + 'openssl_pkey_get_private' => 'Safe\openssl_pkey_get_private', + 'openssl_pkey_get_public' => 'Safe\openssl_pkey_get_public', + 'openssl_pkey_new' => 'Safe\openssl_pkey_new', + 'openssl_private_decrypt' => 'Safe\openssl_private_decrypt', + 'openssl_private_encrypt' => 'Safe\openssl_private_encrypt', + 'openssl_public_decrypt' => 'Safe\openssl_public_decrypt', + 'openssl_public_encrypt' => 'Safe\openssl_public_encrypt', + 'openssl_random_pseudo_bytes' => 'Safe\openssl_random_pseudo_bytes', + 'openssl_seal' => 'Safe\openssl_seal', + 'openssl_sign' => 'Safe\openssl_sign', + 'openssl_x509_export' => 'Safe\openssl_x509_export', + 'openssl_x509_export_to_file' => 'Safe\openssl_x509_export_to_file', + 'openssl_x509_fingerprint' => 'Safe\openssl_x509_fingerprint', + 'openssl_x509_read' => 'Safe\openssl_x509_read', + 'output_add_rewrite_var' => 'Safe\output_add_rewrite_var', + 'output_reset_rewrite_vars' => 'Safe\output_reset_rewrite_vars', + 'pack' => 'Safe\pack', + 'parse_ini_file' => 'Safe\parse_ini_file', + 'parse_ini_string' => 'Safe\parse_ini_string', + 'parse_url' => 'Safe\parse_url', + 'password_hash' => 'Safe\password_hash', + 'pcntl_exec' => 'Safe\pcntl_exec', + 'pcntl_getpriority' => 'Safe\pcntl_getpriority', + 'pcntl_setpriority' => 'Safe\pcntl_setpriority', + 'pcntl_signal_dispatch' => 'Safe\pcntl_signal_dispatch', + 'pcntl_sigprocmask' => 'Safe\pcntl_sigprocmask', + 'pcntl_strerror' => 'Safe\pcntl_strerror', + 'PDF_activate_item' => 'Safe\PDF_activate_item', + 'PDF_add_locallink' => 'Safe\PDF_add_locallink', + 'PDF_add_nameddest' => 'Safe\PDF_add_nameddest', + 'PDF_add_note' => 'Safe\PDF_add_note', + 'PDF_add_pdflink' => 'Safe\PDF_add_pdflink', + 'PDF_add_thumbnail' => 'Safe\PDF_add_thumbnail', + 'PDF_add_weblink' => 'Safe\PDF_add_weblink', + 'PDF_attach_file' => 'Safe\PDF_attach_file', + 'PDF_begin_layer' => 'Safe\PDF_begin_layer', + 'PDF_begin_page' => 'Safe\PDF_begin_page', + 'PDF_begin_page_ext' => 'Safe\PDF_begin_page_ext', + 'PDF_circle' => 'Safe\PDF_circle', + 'PDF_clip' => 'Safe\PDF_clip', + 'PDF_close' => 'Safe\PDF_close', + 'PDF_closepath' => 'Safe\PDF_closepath', + 'PDF_closepath_fill_stroke' => 'Safe\PDF_closepath_fill_stroke', + 'PDF_closepath_stroke' => 'Safe\PDF_closepath_stroke', + 'PDF_close_pdi' => 'Safe\PDF_close_pdi', + 'PDF_close_pdi_page' => 'Safe\PDF_close_pdi_page', + 'PDF_concat' => 'Safe\PDF_concat', + 'PDF_continue_text' => 'Safe\PDF_continue_text', + 'PDF_curveto' => 'Safe\PDF_curveto', + 'PDF_delete' => 'Safe\PDF_delete', + 'PDF_end_layer' => 'Safe\PDF_end_layer', + 'PDF_end_page' => 'Safe\PDF_end_page', + 'PDF_end_page_ext' => 'Safe\PDF_end_page_ext', + 'PDF_end_pattern' => 'Safe\PDF_end_pattern', + 'PDF_end_template' => 'Safe\PDF_end_template', + 'PDF_fill' => 'Safe\PDF_fill', + 'PDF_fill_stroke' => 'Safe\PDF_fill_stroke', + 'PDF_fit_image' => 'Safe\PDF_fit_image', + 'PDF_fit_pdi_page' => 'Safe\PDF_fit_pdi_page', + 'PDF_fit_textline' => 'Safe\PDF_fit_textline', + 'PDF_initgraphics' => 'Safe\PDF_initgraphics', + 'PDF_lineto' => 'Safe\PDF_lineto', + 'PDF_makespotcolor' => 'Safe\PDF_makespotcolor', + 'PDF_moveto' => 'Safe\PDF_moveto', + 'PDF_open_file' => 'Safe\PDF_open_file', + 'PDF_place_image' => 'Safe\PDF_place_image', + 'PDF_place_pdi_page' => 'Safe\PDF_place_pdi_page', + 'PDF_rect' => 'Safe\PDF_rect', + 'PDF_restore' => 'Safe\PDF_restore', + 'PDF_rotate' => 'Safe\PDF_rotate', + 'PDF_save' => 'Safe\PDF_save', + 'PDF_scale' => 'Safe\PDF_scale', + 'PDF_setcolor' => 'Safe\PDF_setcolor', + 'PDF_setdash' => 'Safe\PDF_setdash', + 'PDF_setdashpattern' => 'Safe\PDF_setdashpattern', + 'PDF_setflat' => 'Safe\PDF_setflat', + 'PDF_setfont' => 'Safe\PDF_setfont', + 'PDF_setgray' => 'Safe\PDF_setgray', + 'PDF_setgray_fill' => 'Safe\PDF_setgray_fill', + 'PDF_setgray_stroke' => 'Safe\PDF_setgray_stroke', + 'PDF_setlinejoin' => 'Safe\PDF_setlinejoin', + 'PDF_setlinewidth' => 'Safe\PDF_setlinewidth', + 'PDF_setmatrix' => 'Safe\PDF_setmatrix', + 'PDF_setmiterlimit' => 'Safe\PDF_setmiterlimit', + 'PDF_setrgbcolor' => 'Safe\PDF_setrgbcolor', + 'PDF_setrgbcolor_fill' => 'Safe\PDF_setrgbcolor_fill', + 'PDF_setrgbcolor_stroke' => 'Safe\PDF_setrgbcolor_stroke', + 'PDF_set_border_color' => 'Safe\PDF_set_border_color', + 'PDF_set_border_dash' => 'Safe\PDF_set_border_dash', + 'PDF_set_border_style' => 'Safe\PDF_set_border_style', + 'PDF_set_info' => 'Safe\PDF_set_info', + 'PDF_set_layer_dependency' => 'Safe\PDF_set_layer_dependency', + 'PDF_set_parameter' => 'Safe\PDF_set_parameter', + 'PDF_set_text_pos' => 'Safe\PDF_set_text_pos', + 'PDF_set_value' => 'Safe\PDF_set_value', + 'PDF_show' => 'Safe\PDF_show', + 'PDF_show_xy' => 'Safe\PDF_show_xy', + 'PDF_skew' => 'Safe\PDF_skew', + 'PDF_stroke' => 'Safe\PDF_stroke', + 'pg_cancel_query' => 'Safe\pg_cancel_query', + 'pg_client_encoding' => 'Safe\pg_client_encoding', + 'pg_close' => 'Safe\pg_close', + 'pg_connect' => 'Safe\pg_connect', + 'pg_connection_reset' => 'Safe\pg_connection_reset', + 'pg_convert' => 'Safe\pg_convert', + 'pg_copy_from' => 'Safe\pg_copy_from', + 'pg_copy_to' => 'Safe\pg_copy_to', + 'pg_dbname' => 'Safe\pg_dbname', + 'pg_delete' => 'Safe\pg_delete', + 'pg_end_copy' => 'Safe\pg_end_copy', + 'pg_execute' => 'Safe\pg_execute', + 'pg_field_name' => 'Safe\pg_field_name', + 'pg_field_table' => 'Safe\pg_field_table', + 'pg_field_type' => 'Safe\pg_field_type', + 'pg_flush' => 'Safe\pg_flush', + 'pg_free_result' => 'Safe\pg_free_result', + 'pg_host' => 'Safe\pg_host', + 'pg_insert' => 'Safe\pg_insert', + 'pg_last_error' => 'Safe\pg_last_error', + 'pg_last_notice' => 'Safe\pg_last_notice', + 'pg_last_oid' => 'Safe\pg_last_oid', + 'pg_lo_close' => 'Safe\pg_lo_close', + 'pg_lo_export' => 'Safe\pg_lo_export', + 'pg_lo_import' => 'Safe\pg_lo_import', + 'pg_lo_open' => 'Safe\pg_lo_open', + 'pg_lo_read' => 'Safe\pg_lo_read', + 'pg_lo_read_all' => 'Safe\pg_lo_read_all', + 'pg_lo_seek' => 'Safe\pg_lo_seek', + 'pg_lo_truncate' => 'Safe\pg_lo_truncate', + 'pg_lo_unlink' => 'Safe\pg_lo_unlink', + 'pg_lo_write' => 'Safe\pg_lo_write', + 'pg_meta_data' => 'Safe\pg_meta_data', + 'pg_options' => 'Safe\pg_options', + 'pg_parameter_status' => 'Safe\pg_parameter_status', + 'pg_pconnect' => 'Safe\pg_pconnect', + 'pg_ping' => 'Safe\pg_ping', + 'pg_port' => 'Safe\pg_port', + 'pg_prepare' => 'Safe\pg_prepare', + 'pg_put_line' => 'Safe\pg_put_line', + 'pg_query' => 'Safe\pg_query', + 'pg_query_params' => 'Safe\pg_query_params', + 'pg_result_error_field' => 'Safe\pg_result_error_field', + 'pg_result_seek' => 'Safe\pg_result_seek', + 'pg_select' => 'Safe\pg_select', + 'pg_send_execute' => 'Safe\pg_send_execute', + 'pg_send_prepare' => 'Safe\pg_send_prepare', + 'pg_send_query' => 'Safe\pg_send_query', + 'pg_send_query_params' => 'Safe\pg_send_query_params', + 'pg_socket' => 'Safe\pg_socket', + 'pg_trace' => 'Safe\pg_trace', + 'pg_tty' => 'Safe\pg_tty', + 'pg_update' => 'Safe\pg_update', + 'pg_version' => 'Safe\pg_version', + 'phpcredits' => 'Safe\phpcredits', + 'phpinfo' => 'Safe\phpinfo', + 'png2wbmp' => 'Safe\png2wbmp', + 'posix_access' => 'Safe\posix_access', + 'posix_getgrnam' => 'Safe\posix_getgrnam', + 'posix_getpgid' => 'Safe\posix_getpgid', + 'posix_initgroups' => 'Safe\posix_initgroups', + 'posix_kill' => 'Safe\posix_kill', + 'posix_mkfifo' => 'Safe\posix_mkfifo', + 'posix_mknod' => 'Safe\posix_mknod', + 'posix_setegid' => 'Safe\posix_setegid', + 'posix_seteuid' => 'Safe\posix_seteuid', + 'posix_setgid' => 'Safe\posix_setgid', + 'posix_setpgid' => 'Safe\posix_setpgid', + 'posix_setrlimit' => 'Safe\posix_setrlimit', + 'posix_setuid' => 'Safe\posix_setuid', + 'preg_match' => 'Safe\preg_match', + 'preg_match_all' => 'Safe\preg_match_all', + 'preg_replace' => 'Safe\preg_replace', + 'preg_split' => 'Safe\preg_split', + 'proc_get_status' => 'Safe\proc_get_status', + 'proc_nice' => 'Safe\proc_nice', + 'pspell_add_to_personal' => 'Safe\pspell_add_to_personal', + 'pspell_add_to_session' => 'Safe\pspell_add_to_session', + 'pspell_clear_session' => 'Safe\pspell_clear_session', + 'pspell_config_create' => 'Safe\pspell_config_create', + 'pspell_config_data_dir' => 'Safe\pspell_config_data_dir', + 'pspell_config_dict_dir' => 'Safe\pspell_config_dict_dir', + 'pspell_config_ignore' => 'Safe\pspell_config_ignore', + 'pspell_config_mode' => 'Safe\pspell_config_mode', + 'pspell_config_personal' => 'Safe\pspell_config_personal', + 'pspell_config_repl' => 'Safe\pspell_config_repl', + 'pspell_config_runtogether' => 'Safe\pspell_config_runtogether', + 'pspell_config_save_repl' => 'Safe\pspell_config_save_repl', + 'pspell_new' => 'Safe\pspell_new', + 'pspell_new_config' => 'Safe\pspell_new_config', + 'pspell_save_wordlist' => 'Safe\pspell_save_wordlist', + 'pspell_store_replacement' => 'Safe\pspell_store_replacement', + 'ps_add_launchlink' => 'Safe\ps_add_launchlink', + 'ps_add_locallink' => 'Safe\ps_add_locallink', + 'ps_add_note' => 'Safe\ps_add_note', + 'ps_add_pdflink' => 'Safe\ps_add_pdflink', + 'ps_add_weblink' => 'Safe\ps_add_weblink', + 'ps_arc' => 'Safe\ps_arc', + 'ps_arcn' => 'Safe\ps_arcn', + 'ps_begin_page' => 'Safe\ps_begin_page', + 'ps_begin_pattern' => 'Safe\ps_begin_pattern', + 'ps_begin_template' => 'Safe\ps_begin_template', + 'ps_circle' => 'Safe\ps_circle', + 'ps_clip' => 'Safe\ps_clip', + 'ps_close' => 'Safe\ps_close', + 'ps_closepath' => 'Safe\ps_closepath', + 'ps_closepath_stroke' => 'Safe\ps_closepath_stroke', + 'ps_close_image' => 'Safe\ps_close_image', + 'ps_continue_text' => 'Safe\ps_continue_text', + 'ps_curveto' => 'Safe\ps_curveto', + 'ps_delete' => 'Safe\ps_delete', + 'ps_end_page' => 'Safe\ps_end_page', + 'ps_end_pattern' => 'Safe\ps_end_pattern', + 'ps_end_template' => 'Safe\ps_end_template', + 'ps_fill' => 'Safe\ps_fill', + 'ps_fill_stroke' => 'Safe\ps_fill_stroke', + 'ps_get_parameter' => 'Safe\ps_get_parameter', + 'ps_hyphenate' => 'Safe\ps_hyphenate', + 'ps_include_file' => 'Safe\ps_include_file', + 'ps_lineto' => 'Safe\ps_lineto', + 'ps_moveto' => 'Safe\ps_moveto', + 'ps_new' => 'Safe\ps_new', + 'ps_open_file' => 'Safe\ps_open_file', + 'ps_place_image' => 'Safe\ps_place_image', + 'ps_rect' => 'Safe\ps_rect', + 'ps_restore' => 'Safe\ps_restore', + 'ps_rotate' => 'Safe\ps_rotate', + 'ps_save' => 'Safe\ps_save', + 'ps_scale' => 'Safe\ps_scale', + 'ps_setcolor' => 'Safe\ps_setcolor', + 'ps_setdash' => 'Safe\ps_setdash', + 'ps_setflat' => 'Safe\ps_setflat', + 'ps_setfont' => 'Safe\ps_setfont', + 'ps_setgray' => 'Safe\ps_setgray', + 'ps_setlinecap' => 'Safe\ps_setlinecap', + 'ps_setlinejoin' => 'Safe\ps_setlinejoin', + 'ps_setlinewidth' => 'Safe\ps_setlinewidth', + 'ps_setmiterlimit' => 'Safe\ps_setmiterlimit', + 'ps_setoverprintmode' => 'Safe\ps_setoverprintmode', + 'ps_setpolydash' => 'Safe\ps_setpolydash', + 'ps_set_border_color' => 'Safe\ps_set_border_color', + 'ps_set_border_dash' => 'Safe\ps_set_border_dash', + 'ps_set_border_style' => 'Safe\ps_set_border_style', + 'ps_set_info' => 'Safe\ps_set_info', + 'ps_set_parameter' => 'Safe\ps_set_parameter', + 'ps_set_text_pos' => 'Safe\ps_set_text_pos', + 'ps_set_value' => 'Safe\ps_set_value', + 'ps_shading' => 'Safe\ps_shading', + 'ps_shading_pattern' => 'Safe\ps_shading_pattern', + 'ps_shfill' => 'Safe\ps_shfill', + 'ps_show' => 'Safe\ps_show', + 'ps_show2' => 'Safe\ps_show2', + 'ps_show_xy' => 'Safe\ps_show_xy', + 'ps_show_xy2' => 'Safe\ps_show_xy2', + 'ps_stroke' => 'Safe\ps_stroke', + 'ps_symbol' => 'Safe\ps_symbol', + 'ps_translate' => 'Safe\ps_translate', + 'putenv' => 'Safe\putenv', + 'readfile' => 'Safe\readfile', + 'readgzfile' => 'Safe\readgzfile', + 'readline_add_history' => 'Safe\readline_add_history', + 'readline_callback_handler_install' => 'Safe\readline_callback_handler_install', + 'readline_clear_history' => 'Safe\readline_clear_history', + 'readline_completion_function' => 'Safe\readline_completion_function', + 'readline_read_history' => 'Safe\readline_read_history', + 'readline_write_history' => 'Safe\readline_write_history', + 'readlink' => 'Safe\readlink', + 'realpath' => 'Safe\realpath', + 'register_tick_function' => 'Safe\register_tick_function', + 'rename' => 'Safe\rename', + 'rewind' => 'Safe\rewind', + 'rewinddir' => 'Safe\rewinddir', + 'rmdir' => 'Safe\rmdir', + 'rpmaddtag' => 'Safe\rpmaddtag', + 'rrd_create' => 'Safe\rrd_create', + 'rsort' => 'Safe\rsort', + 'sapi_windows_cp_conv' => 'Safe\sapi_windows_cp_conv', + 'sapi_windows_cp_set' => 'Safe\sapi_windows_cp_set', + 'sapi_windows_generate_ctrl_event' => 'Safe\sapi_windows_generate_ctrl_event', + 'sapi_windows_vt100_support' => 'Safe\sapi_windows_vt100_support', + 'scandir' => 'Safe\scandir', + 'sem_acquire' => 'Safe\sem_acquire', + 'sem_get' => 'Safe\sem_get', + 'sem_release' => 'Safe\sem_release', + 'sem_remove' => 'Safe\sem_remove', + 'session_abort' => 'Safe\session_abort', + 'session_decode' => 'Safe\session_decode', + 'session_destroy' => 'Safe\session_destroy', + 'session_regenerate_id' => 'Safe\session_regenerate_id', + 'session_reset' => 'Safe\session_reset', + 'session_unset' => 'Safe\session_unset', + 'session_write_close' => 'Safe\session_write_close', + 'settype' => 'Safe\settype', + 'set_include_path' => 'Safe\set_include_path', + 'set_time_limit' => 'Safe\set_time_limit', + 'sha1_file' => 'Safe\sha1_file', + 'shmop_delete' => 'Safe\shmop_delete', + 'shmop_read' => 'Safe\shmop_read', + 'shmop_write' => 'Safe\shmop_write', + 'shm_put_var' => 'Safe\shm_put_var', + 'shm_remove' => 'Safe\shm_remove', + 'shm_remove_var' => 'Safe\shm_remove_var', + 'shuffle' => 'Safe\shuffle', + 'simplexml_import_dom' => 'Safe\simplexml_import_dom', + 'simplexml_load_file' => 'Safe\simplexml_load_file', + 'simplexml_load_string' => 'Safe\simplexml_load_string', + 'sleep' => 'Safe\sleep', + 'socket_accept' => 'Safe\socket_accept', + 'socket_addrinfo_bind' => 'Safe\socket_addrinfo_bind', + 'socket_addrinfo_connect' => 'Safe\socket_addrinfo_connect', + 'socket_bind' => 'Safe\socket_bind', + 'socket_connect' => 'Safe\socket_connect', + 'socket_create' => 'Safe\socket_create', + 'socket_create_listen' => 'Safe\socket_create_listen', + 'socket_create_pair' => 'Safe\socket_create_pair', + 'socket_export_stream' => 'Safe\socket_export_stream', + 'socket_getpeername' => 'Safe\socket_getpeername', + 'socket_getsockname' => 'Safe\socket_getsockname', + 'socket_get_option' => 'Safe\socket_get_option', + 'socket_import_stream' => 'Safe\socket_import_stream', + 'socket_listen' => 'Safe\socket_listen', + 'socket_read' => 'Safe\socket_read', + 'socket_send' => 'Safe\socket_send', + 'socket_sendmsg' => 'Safe\socket_sendmsg', + 'socket_sendto' => 'Safe\socket_sendto', + 'socket_set_block' => 'Safe\socket_set_block', + 'socket_set_nonblock' => 'Safe\socket_set_nonblock', + 'socket_set_option' => 'Safe\socket_set_option', + 'socket_shutdown' => 'Safe\socket_shutdown', + 'socket_write' => 'Safe\socket_write', + 'socket_wsaprotocol_info_export' => 'Safe\socket_wsaprotocol_info_export', + 'socket_wsaprotocol_info_import' => 'Safe\socket_wsaprotocol_info_import', + 'socket_wsaprotocol_info_release' => 'Safe\socket_wsaprotocol_info_release', + 'sodium_crypto_pwhash' => 'Safe\sodium_crypto_pwhash', + 'sodium_crypto_pwhash_str' => 'Safe\sodium_crypto_pwhash_str', + 'solr_get_version' => 'Safe\solr_get_version', + 'sort' => 'Safe\sort', + 'soundex' => 'Safe\soundex', + 'spl_autoload_register' => 'Safe\spl_autoload_register', + 'spl_autoload_unregister' => 'Safe\spl_autoload_unregister', + 'sprintf' => 'Safe\sprintf', + 'sqlsrv_begin_transaction' => 'Safe\sqlsrv_begin_transaction', + 'sqlsrv_cancel' => 'Safe\sqlsrv_cancel', + 'sqlsrv_client_info' => 'Safe\sqlsrv_client_info', + 'sqlsrv_close' => 'Safe\sqlsrv_close', + 'sqlsrv_commit' => 'Safe\sqlsrv_commit', + 'sqlsrv_configure' => 'Safe\sqlsrv_configure', + 'sqlsrv_execute' => 'Safe\sqlsrv_execute', + 'sqlsrv_free_stmt' => 'Safe\sqlsrv_free_stmt', + 'sqlsrv_get_field' => 'Safe\sqlsrv_get_field', + 'sqlsrv_next_result' => 'Safe\sqlsrv_next_result', + 'sqlsrv_num_fields' => 'Safe\sqlsrv_num_fields', + 'sqlsrv_num_rows' => 'Safe\sqlsrv_num_rows', + 'sqlsrv_prepare' => 'Safe\sqlsrv_prepare', + 'sqlsrv_query' => 'Safe\sqlsrv_query', + 'sqlsrv_rollback' => 'Safe\sqlsrv_rollback', + 'ssdeep_fuzzy_compare' => 'Safe\ssdeep_fuzzy_compare', + 'ssdeep_fuzzy_hash' => 'Safe\ssdeep_fuzzy_hash', + 'ssdeep_fuzzy_hash_filename' => 'Safe\ssdeep_fuzzy_hash_filename', + 'ssh2_auth_agent' => 'Safe\ssh2_auth_agent', + 'ssh2_auth_hostbased_file' => 'Safe\ssh2_auth_hostbased_file', + 'ssh2_auth_password' => 'Safe\ssh2_auth_password', + 'ssh2_auth_pubkey_file' => 'Safe\ssh2_auth_pubkey_file', + 'ssh2_connect' => 'Safe\ssh2_connect', + 'ssh2_disconnect' => 'Safe\ssh2_disconnect', + 'ssh2_exec' => 'Safe\ssh2_exec', + 'ssh2_publickey_add' => 'Safe\ssh2_publickey_add', + 'ssh2_publickey_init' => 'Safe\ssh2_publickey_init', + 'ssh2_publickey_remove' => 'Safe\ssh2_publickey_remove', + 'ssh2_scp_recv' => 'Safe\ssh2_scp_recv', + 'ssh2_scp_send' => 'Safe\ssh2_scp_send', + 'ssh2_sftp' => 'Safe\ssh2_sftp', + 'ssh2_sftp_chmod' => 'Safe\ssh2_sftp_chmod', + 'ssh2_sftp_mkdir' => 'Safe\ssh2_sftp_mkdir', + 'ssh2_sftp_rename' => 'Safe\ssh2_sftp_rename', + 'ssh2_sftp_rmdir' => 'Safe\ssh2_sftp_rmdir', + 'ssh2_sftp_symlink' => 'Safe\ssh2_sftp_symlink', + 'ssh2_sftp_unlink' => 'Safe\ssh2_sftp_unlink', + 'stream_context_set_params' => 'Safe\stream_context_set_params', + 'stream_copy_to_stream' => 'Safe\stream_copy_to_stream', + 'stream_filter_append' => 'Safe\stream_filter_append', + 'stream_filter_prepend' => 'Safe\stream_filter_prepend', + 'stream_filter_register' => 'Safe\stream_filter_register', + 'stream_filter_remove' => 'Safe\stream_filter_remove', + 'stream_get_contents' => 'Safe\stream_get_contents', + 'stream_isatty' => 'Safe\stream_isatty', + 'stream_resolve_include_path' => 'Safe\stream_resolve_include_path', + 'stream_set_blocking' => 'Safe\stream_set_blocking', + 'stream_set_timeout' => 'Safe\stream_set_timeout', + 'stream_socket_accept' => 'Safe\stream_socket_accept', + 'stream_socket_client' => 'Safe\stream_socket_client', + 'stream_socket_pair' => 'Safe\stream_socket_pair', + 'stream_socket_server' => 'Safe\stream_socket_server', + 'stream_socket_shutdown' => 'Safe\stream_socket_shutdown', + 'stream_supports_lock' => 'Safe\stream_supports_lock', + 'stream_wrapper_register' => 'Safe\stream_wrapper_register', + 'stream_wrapper_restore' => 'Safe\stream_wrapper_restore', + 'stream_wrapper_unregister' => 'Safe\stream_wrapper_unregister', + 'strptime' => 'Safe\strptime', + 'strtotime' => 'Safe\strtotime', + 'substr' => 'Safe\substr', + 'swoole_async_write' => 'Safe\swoole_async_write', + 'swoole_async_writefile' => 'Safe\swoole_async_writefile', + 'swoole_event_defer' => 'Safe\swoole_event_defer', + 'swoole_event_del' => 'Safe\swoole_event_del', + 'swoole_event_write' => 'Safe\swoole_event_write', + 'symlink' => 'Safe\symlink', + 'syslog' => 'Safe\syslog', + 'system' => 'Safe\system', + 'tempnam' => 'Safe\tempnam', + 'timezone_name_from_abbr' => 'Safe\timezone_name_from_abbr', + 'time_nanosleep' => 'Safe\time_nanosleep', + 'time_sleep_until' => 'Safe\time_sleep_until', + 'tmpfile' => 'Safe\tmpfile', + 'touch' => 'Safe\touch', + 'uasort' => 'Safe\uasort', + 'uksort' => 'Safe\uksort', + 'unlink' => 'Safe\unlink', + 'unpack' => 'Safe\unpack', + 'uopz_extend' => 'Safe\uopz_extend', + 'uopz_implement' => 'Safe\uopz_implement', + 'usort' => 'Safe\usort', + 'virtual' => 'Safe\virtual', + 'vsprintf' => 'Safe\vsprintf', + 'xdiff_file_bdiff' => 'Safe\xdiff_file_bdiff', + 'xdiff_file_bpatch' => 'Safe\xdiff_file_bpatch', + 'xdiff_file_diff' => 'Safe\xdiff_file_diff', + 'xdiff_file_diff_binary' => 'Safe\xdiff_file_diff_binary', + 'xdiff_file_patch_binary' => 'Safe\xdiff_file_patch_binary', + 'xdiff_file_rabdiff' => 'Safe\xdiff_file_rabdiff', + 'xdiff_string_bpatch' => 'Safe\xdiff_string_bpatch', + 'xdiff_string_patch' => 'Safe\xdiff_string_patch', + 'xdiff_string_patch_binary' => 'Safe\xdiff_string_patch_binary', + 'xmlrpc_set_type' => 'Safe\xmlrpc_set_type', + 'xml_parser_create' => 'Safe\xml_parser_create', + 'xml_parser_create_ns' => 'Safe\xml_parser_create_ns', + 'xml_set_object' => 'Safe\xml_set_object', + 'yaml_parse' => 'Safe\yaml_parse', + 'yaml_parse_file' => 'Safe\yaml_parse_file', + 'yaml_parse_url' => 'Safe\yaml_parse_url', + 'yaz_ccl_parse' => 'Safe\yaz_ccl_parse', + 'yaz_close' => 'Safe\yaz_close', + 'yaz_connect' => 'Safe\yaz_connect', + 'yaz_database' => 'Safe\yaz_database', + 'yaz_element' => 'Safe\yaz_element', + 'yaz_present' => 'Safe\yaz_present', + 'yaz_search' => 'Safe\yaz_search', + 'yaz_wait' => 'Safe\yaz_wait', + 'zip_entry_close' => 'Safe\zip_entry_close', + 'zip_entry_open' => 'Safe\zip_entry_open', + 'zip_entry_read' => 'Safe\zip_entry_read', + 'zlib_decode' => 'Safe\zlib_decode', +]]]); +}; |