Changeset 2687512
- Timestamp:
- 03/02/2022 01:10:12 PM (4 years ago)
- Location:
- questpass/trunk
- Files:
-
- 5 added
- 13 edited
-
readme.txt (modified) (1 diff)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/ClassLoader.php (modified) (1 diff)
-
vendor/composer/autoload_classmap.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (3 diffs)
-
vendor/composer/autoload_static.php (modified) (3 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
-
vendor_prefixed/adquesto/adquesto-php-sdk/examples/example_autoprepare.php (modified) (1 diff)
-
vendor_prefixed/adquesto/adquesto-php-sdk/examples/example_manualprepare.php (modified) (1 diff)
-
vendor_prefixed/adquesto/adquesto-php-sdk/examples/example_webhook.php (modified) (2 diffs)
-
vendor_prefixed/adquesto/adquesto-php-sdk/src/Content.php (modified) (1 diff)
-
vendor_prefixed/guzzlehttp/psr7/src/Exception (added)
-
vendor_prefixed/guzzlehttp/psr7/src/Exception/MalformedUriException.php (added)
-
vendor_prefixed/kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php (modified) (46 diffs)
-
vendor_prefixed/league/oauth2-client/src/Token/AccessTokenInterface.php (modified) (1 diff)
-
vendor_prefixed/symfony (added)
-
vendor_prefixed/symfony/deprecation-contracts (added)
-
vendor_prefixed/symfony/deprecation-contracts/function.php (added)
Legend:
- Unmodified
- Added
- Removed
-
questpass/trunk/readme.txt
r2653235 r2687512 50 50 == Changelog == 51 51 52 = 2.0.3 (2022-03-02) = 53 * Fixed constants prefixed by php-scoper 54 52 55 = 2.0.2 (2022-01-05) = 53 56 * Fixed refreshing JavaScript code for widget -
questpass/trunk/vendor/autoload.php
r2653235 r2687512 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 3a186aabbdc52f5e64d54f6d489b71c2::getLoader();7 return ComposerAutoloaderInit708051363b81f601d72a518eaa1a4f87::getLoader(); -
questpass/trunk/vendor/composer/ClassLoader.php
r2653235 r2687512 150 150 /** 151 151 * @return string[] Array of classname => path 152 * @psalm- vararray<string, string>152 * @psalm-return array<string, string> 153 153 */ 154 154 public function getClassMap() -
questpass/trunk/vendor/composer/autoload_classmap.php
r2653235 r2687512 240 240 'Questpass\\Settings\\Option\\OptionIntegration' => $baseDir . '/src/Settings/Option/OptionIntegration.php', 241 241 'Questpass\\Settings\\Option\\OptionInterface' => $baseDir . '/src/Settings/Option/OptionInterface.php', 242 'Questpass\\Settings\\Option\\PostTypesOption' => $baseDir . '/src/Settings/Option/Post typesOption.php',242 'Questpass\\Settings\\Option\\PostTypesOption' => $baseDir . '/src/Settings/Option/PostTypesOption.php', 243 243 'Questpass\\Settings\\PluginSettingsPage' => $baseDir . '/src/Settings/PluginSettingsPage.php', 244 244 'Questpass\\Settings\\PostSettingsForm' => $baseDir . '/src/Settings/PostSettingsForm.php', -
questpass/trunk/vendor/composer/autoload_real.php
r2653235 r2687512 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 3a186aabbdc52f5e64d54f6d489b71c25 class ComposerAutoloaderInit708051363b81f601d72a518eaa1a4f87 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 3a186aabbdc52f5e64d54f6d489b71c2', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit708051363b81f601d72a518eaa1a4f87', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 3a186aabbdc52f5e64d54f6d489b71c2', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit708051363b81f601d72a518eaa1a4f87', 'loadClassLoader')); 28 28 29 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 31 31 require __DIR__ . '/autoload_static.php'; 32 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit 3a186aabbdc52f5e64d54f6d489b71c2::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInit708051363b81f601d72a518eaa1a4f87::getInitializer($loader)); 34 34 } else { 35 35 $map = require __DIR__ . '/autoload_namespaces.php'; -
questpass/trunk/vendor/composer/autoload_static.php
r2653235 r2687512 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 3a186aabbdc52f5e64d54f6d489b71c27 class ComposerStaticInit708051363b81f601d72a518eaa1a4f87 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 255 255 'Questpass\\Settings\\Option\\OptionIntegration' => __DIR__ . '/../..' . '/src/Settings/Option/OptionIntegration.php', 256 256 'Questpass\\Settings\\Option\\OptionInterface' => __DIR__ . '/../..' . '/src/Settings/Option/OptionInterface.php', 257 'Questpass\\Settings\\Option\\PostTypesOption' => __DIR__ . '/../..' . '/src/Settings/Option/Post typesOption.php',257 'Questpass\\Settings\\Option\\PostTypesOption' => __DIR__ . '/../..' . '/src/Settings/Option/PostTypesOption.php', 258 258 'Questpass\\Settings\\PluginSettingsPage' => __DIR__ . '/../..' . '/src/Settings/PluginSettingsPage.php', 259 259 'Questpass\\Settings\\PostSettingsForm' => __DIR__ . '/../..' . '/src/Settings/PostSettingsForm.php', … … 264 264 { 265 265 return \Closure::bind(function () use ($loader) { 266 $loader->prefixLengthsPsr4 = ComposerStaticInit 3a186aabbdc52f5e64d54f6d489b71c2::$prefixLengthsPsr4;267 $loader->prefixDirsPsr4 = ComposerStaticInit 3a186aabbdc52f5e64d54f6d489b71c2::$prefixDirsPsr4;268 $loader->classMap = ComposerStaticInit 3a186aabbdc52f5e64d54f6d489b71c2::$classMap;266 $loader->prefixLengthsPsr4 = ComposerStaticInit708051363b81f601d72a518eaa1a4f87::$prefixLengthsPsr4; 267 $loader->prefixDirsPsr4 = ComposerStaticInit708051363b81f601d72a518eaa1a4f87::$prefixDirsPsr4; 268 $loader->classMap = ComposerStaticInit708051363b81f601d72a518eaa1a4f87::$classMap; 269 269 270 270 }, null, ClassLoader::class); -
questpass/trunk/vendor/composer/installed.php
r2653235 r2687512 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => ' dev-develop',4 'version' => ' dev-develop',3 'pretty_version' => '1.0.0+no-version-set', 4 'version' => '1.0.0.0', 5 5 'type' => 'library', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => 'be0347c4509d407579a1cd8892264a0808d94b3d',8 'reference' => NULL, 9 9 'name' => 'questpass/questpass', 10 10 'dev' => false, … … 120 120 ), 121 121 'questpass/questpass' => array( 122 'pretty_version' => ' dev-develop',123 'version' => ' dev-develop',122 'pretty_version' => '1.0.0+no-version-set', 123 'version' => '1.0.0.0', 124 124 'type' => 'library', 125 125 'install_path' => __DIR__ . '/../../', 126 126 'aliases' => array(), 127 'reference' => 'be0347c4509d407579a1cd8892264a0808d94b3d',127 'reference' => NULL, 128 128 'dev_requirement' => false, 129 129 ), -
questpass/trunk/vendor_prefixed/adquesto/adquesto-php-sdk/examples/example_autoprepare.php
r2611365 r2687512 15 15 use QuestpassVendor\Adquesto\SDK\ElementsContextProvider; 16 16 const API_URL = 'https://api.adquesto.com/v1/publishers/services/'; 17 $adquesto = new Content(\ API_URL, '__paste Service UUID here__', new InMemoryStorage(), new CurlHttpClient(), PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER));17 $adquesto = new Content(\QuestpassVendor\API_URL, '__paste Service UUID here__', new InMemoryStorage(), new CurlHttpClient(), PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER)); 18 18 try { 19 19 $javascript = $adquesto->javascript([$elementsProvider = new ElementsContextProvider(null, null, 0, $hasActiveCampaigns)]); -
questpass/trunk/vendor_prefixed/adquesto/adquesto-php-sdk/examples/example_manualprepare.php
r2611365 r2687512 15 15 use QuestpassVendor\Adquesto\SDK\ElementsContextProvider; 16 16 const API_URL = 'https://api.adquesto.com/v1/publishers/services/'; 17 $adquesto = new Content(\ API_URL, '__paste Service UUID here__', new InMemoryStorage(), new CurlHttpClient(), PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER));17 $adquesto = new Content(\QuestpassVendor\API_URL, '__paste Service UUID here__', new InMemoryStorage(), new CurlHttpClient(), PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER)); 18 18 try { 19 19 $javascript = $adquesto->javascript([$elementsProvider = new ElementsContextProvider(null, null, 0, $hasActiveCampaigns)]); -
questpass/trunk/vendor_prefixed/adquesto/adquesto-php-sdk/examples/example_webhook.php
r2611365 r2687512 32 32 case 'questo_update_service_status_option': 33 33 case 'questo_update_subscription_option': 34 $service = new \QuestpassVendor\Adquesto\SDK\Service(new \QuestpassVendor\Adquesto\SDK\ServiceAPIUrl(\ API_URL,\SERVICE_UUID), new CurlHttpClient());34 $service = new \QuestpassVendor\Adquesto\SDK\Service(new \QuestpassVendor\Adquesto\SDK\ServiceAPIUrl(\QuestpassVendor\API_URL, \QuestpassVendor\SERVICE_UUID), new CurlHttpClient()); 35 35 $serviceStatusResponse = $service->fetchStatus(); 36 36 if (!$serviceStatusResponse) { … … 44 44 break; 45 45 case 'questo_force_update_javascript': 46 $adquesto = new Content(\ API_URL,\SERVICE_UUID, new InMemoryStorage(), new CurlHttpClient(), PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER));46 $adquesto = new Content(\QuestpassVendor\API_URL, \QuestpassVendor\SERVICE_UUID, new InMemoryStorage(), new CurlHttpClient(), PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER)); 47 47 try { 48 48 $javascript = $adquesto->requestJavascript(\true); -
questpass/trunk/vendor_prefixed/adquesto/adquesto-php-sdk/src/Content.php
r2653235 r2687512 235 235 $wrapperId = 'adquestoWrapper'; 236 236 $str = \sprintf('<div id="%s">%s</div>', $wrapperId, $content); 237 $dom = HtmlDomParser::str_get_html($str, $lowercase = \true, $forceTagsClosed = \true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN = \false);237 $dom = HtmlDomParser::str_get_html($str, $lowercase = \true, $forceTagsClosed = \true, $target_charset = \DEFAULT_TARGET_CHARSET, $stripRN = \false); 238 238 // ->childNodes() removes text tags like [ngg] that's why we use ->nodes here 239 239 return $dom->getElementById($wrapperId)->nodes; -
questpass/trunk/vendor_prefixed/kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php
r2611365 r2687512 46 46 \defined('MAX_FILE_SIZE') || \define('MAX_FILE_SIZE', 600000); 47 47 \define('HDOM_SMARTY_AS_TEXT', 1); 48 function file_get_html($url, $use_include_path = \false, $context = null, $offset = 0, $maxLen = -1, $lowercase = \true, $forceTagsClosed = \true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN = \true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText =DEFAULT_SPAN_TEXT)48 function file_get_html($url, $use_include_path = \false, $context = null, $offset = 0, $maxLen = -1, $lowercase = \true, $forceTagsClosed = \true, $target_charset = \DEFAULT_TARGET_CHARSET, $stripRN = \true, $defaultBRText = \DEFAULT_BR_TEXT, $defaultSpanText = \DEFAULT_SPAN_TEXT) 49 49 { 50 50 if ($maxLen <= 0) { 51 $maxLen = MAX_FILE_SIZE;51 $maxLen = \MAX_FILE_SIZE; 52 52 } 53 53 $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); … … 64 64 return $dom->load($contents, $lowercase, $stripRN); 65 65 } 66 function str_get_html($str, $lowercase = \true, $forceTagsClosed = \true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN = \true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText =DEFAULT_SPAN_TEXT)66 function str_get_html($str, $lowercase = \true, $forceTagsClosed = \true, $target_charset = \DEFAULT_TARGET_CHARSET, $stripRN = \true, $defaultBRText = \DEFAULT_BR_TEXT, $defaultSpanText = \DEFAULT_SPAN_TEXT) 67 67 { 68 68 $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); 69 if (empty($str) || \strlen($str) > MAX_FILE_SIZE) {69 if (empty($str) || \strlen($str) > \MAX_FILE_SIZE) { 70 70 $dom->clear(); 71 71 return \false; … … 79 79 class simple_html_dom_node 80 80 { 81 public $nodetype = HDOM_TYPE_TEXT;81 public $nodetype = \HDOM_TYPE_TEXT; 82 82 public $tag = 'text'; 83 83 public $attr = array(); … … 154 154 } 155 155 $string .= ' HDOM_INNER_INFO: '; 156 if (isset($node->_[ HDOM_INFO_INNER])) {157 $string .= "'" . $node->_[ HDOM_INFO_INNER] . "'";156 if (isset($node->_[\HDOM_INFO_INNER])) { 157 $string .= "'" . $node->_[\HDOM_INFO_INNER] . "'"; 158 158 } else { 159 159 $string .= ' NULL '; … … 255 255 function innertext() 256 256 { 257 if (isset($this->_[ HDOM_INFO_INNER])) {258 return $this->_[ HDOM_INFO_INNER];259 } 260 if (isset($this->_[ HDOM_INFO_TEXT])) {261 return $this->dom->restore_noise($this->_[ HDOM_INFO_TEXT]);257 if (isset($this->_[\HDOM_INFO_INNER])) { 258 return $this->_[\HDOM_INFO_INNER]; 259 } 260 if (isset($this->_[\HDOM_INFO_TEXT])) { 261 return $this->dom->restore_noise($this->_[\HDOM_INFO_TEXT]); 262 262 } 263 263 $ret = ''; … … 286 286 \call_user_func_array($this->dom->callback, array($this)); 287 287 } 288 if (isset($this->_[ HDOM_INFO_OUTER])) {289 return $this->_[ HDOM_INFO_OUTER];290 } 291 if (isset($this->_[ HDOM_INFO_TEXT])) {292 return $this->dom->restore_noise($this->_[ HDOM_INFO_TEXT]);288 if (isset($this->_[\HDOM_INFO_OUTER])) { 289 return $this->_[\HDOM_INFO_OUTER]; 290 } 291 if (isset($this->_[\HDOM_INFO_TEXT])) { 292 return $this->dom->restore_noise($this->_[\HDOM_INFO_TEXT]); 293 293 } 294 294 $ret = ''; 295 if ($this->dom && $this->dom->nodes[$this->_[ HDOM_INFO_BEGIN]]) {296 $ret = $this->dom->nodes[$this->_[ HDOM_INFO_BEGIN]]->makeup();297 } 298 if (isset($this->_[ HDOM_INFO_INNER])) {295 if ($this->dom && $this->dom->nodes[$this->_[\HDOM_INFO_BEGIN]]) { 296 $ret = $this->dom->nodes[$this->_[\HDOM_INFO_BEGIN]]->makeup(); 297 } 298 if (isset($this->_[\HDOM_INFO_INNER])) { 299 299 // todo: <br> should either never have HDOM_INFO_INNER or always 300 300 if ($this->tag !== 'br') { 301 $ret .= $this->_[ HDOM_INFO_INNER];301 $ret .= $this->_[\HDOM_INFO_INNER]; 302 302 } 303 303 } elseif ($this->nodes) { … … 306 306 } 307 307 } 308 if (isset($this->_[ HDOM_INFO_END]) && $this->_[HDOM_INFO_END] != 0) {308 if (isset($this->_[\HDOM_INFO_END]) && $this->_[\HDOM_INFO_END] != 0) { 309 309 $ret .= '</' . $this->tag . '>'; 310 310 } … … 313 313 function text() 314 314 { 315 if (isset($this->_[ HDOM_INFO_INNER])) {316 return $this->_[ HDOM_INFO_INNER];315 if (isset($this->_[\HDOM_INFO_INNER])) { 316 return $this->_[\HDOM_INFO_INNER]; 317 317 } 318 318 switch ($this->nodetype) { 319 case HDOM_TYPE_TEXT:320 return $this->dom->restore_noise($this->_[ HDOM_INFO_TEXT]);321 case HDOM_TYPE_COMMENT:319 case \HDOM_TYPE_TEXT: 320 return $this->dom->restore_noise($this->_[\HDOM_INFO_TEXT]); 321 case \HDOM_TYPE_COMMENT: 322 322 return ''; 323 case HDOM_TYPE_UNKNOWN:323 case \HDOM_TYPE_UNKNOWN: 324 324 return ''; 325 325 } … … 363 363 { 364 364 // text, comment, unknown 365 if (isset($this->_[ HDOM_INFO_TEXT])) {366 return $this->dom->restore_noise($this->_[ HDOM_INFO_TEXT]);365 if (isset($this->_[\HDOM_INFO_TEXT])) { 366 return $this->dom->restore_noise($this->_[\HDOM_INFO_TEXT]); 367 367 } 368 368 $ret = '<' . $this->tag; … … 374 374 continue; 375 375 } 376 $ret .= $this->_[ HDOM_INFO_SPACE][$i][0];376 $ret .= $this->_[\HDOM_INFO_SPACE][$i][0]; 377 377 //no value attr: nowrap, checked selected... 378 378 if ($val === \true) { 379 379 $ret .= $key; 380 380 } else { 381 switch ($this->_[ HDOM_INFO_QUOTE][$i]) {382 case HDOM_QUOTE_DOUBLE:381 switch ($this->_[\HDOM_INFO_QUOTE][$i]) { 382 case \HDOM_QUOTE_DOUBLE: 383 383 $quote = '"'; 384 384 break; 385 case HDOM_QUOTE_SINGLE:385 case \HDOM_QUOTE_SINGLE: 386 386 $quote = '\''; 387 387 break; … … 389 389 $quote = ''; 390 390 } 391 $ret .= $key . $this->_[ HDOM_INFO_SPACE][$i][1] . '=' . $this->_[HDOM_INFO_SPACE][$i][2] . $quote . $val . $quote;391 $ret .= $key . $this->_[\HDOM_INFO_SPACE][$i][1] . '=' . $this->_[\HDOM_INFO_SPACE][$i][2] . $quote . $val . $quote; 392 392 } 393 393 } 394 394 $ret = $this->dom->restore_noise($ret); 395 return $ret . $this->_[ HDOM_INFO_ENDSPACE] . '>';395 return $ret . $this->_[\HDOM_INFO_ENDSPACE] . '>'; 396 396 } 397 397 function find($selector, $idx = null, $lowercase = \false) … … 410 410 return array(); 411 411 } 412 if (!isset($this->_[ HDOM_INFO_BEGIN])) {412 if (!isset($this->_[\HDOM_INFO_BEGIN])) { 413 413 return array(); 414 414 } 415 $head = array($this->_[ HDOM_INFO_BEGIN] => 1);415 $head = array($this->_[\HDOM_INFO_BEGIN] => 1); 416 416 $cmd = ' '; 417 417 // Combinator … … 460 460 // Find parent closing tag if the current element doesn't have a closing 461 461 // tag (i.e. void element) 462 $end = !empty($this->_[ HDOM_INFO_END]) ? $this->_[HDOM_INFO_END] : 0;462 $end = !empty($this->_[\HDOM_INFO_END]) ? $this->_[\HDOM_INFO_END] : 0; 463 463 if ($end == 0) { 464 464 $parent = $this->parent; 465 while (!isset($parent->_[ HDOM_INFO_END]) && $parent !== null) {465 while (!isset($parent->_[\HDOM_INFO_END]) && $parent !== null) { 466 466 $end -= 1; 467 467 $parent = $parent->parent; 468 468 } 469 $end += $parent->_[ HDOM_INFO_END];469 $end += $parent->_[\HDOM_INFO_END]; 470 470 } 471 471 // Get list of target nodes 472 $nodes_start = $this->_[ HDOM_INFO_BEGIN] + 1;472 $nodes_start = $this->_[\HDOM_INFO_BEGIN] + 1; 473 473 $nodes_count = $end - $nodes_start; 474 474 $nodes = \array_slice($this->dom->nodes, $nodes_start, $nodes_count, \true); … … 617 617 // Found a match. Add to list and clear node 618 618 if ($pass) { 619 $ret[$node->_[ HDOM_INFO_BEGIN]] = 1;619 $ret[$node->_[\HDOM_INFO_BEGIN]] = 1; 620 620 } 621 621 unset($node); … … 831 831 switch ($name) { 832 832 case 'outertext': 833 return $this->_[ HDOM_INFO_OUTER] = $value;833 return $this->_[\HDOM_INFO_OUTER] = $value; 834 834 case 'innertext': 835 if (isset($this->_[ HDOM_INFO_TEXT])) {836 return $this->_[ HDOM_INFO_TEXT] = $value;837 } 838 return $this->_[ HDOM_INFO_INNER] = $value;835 if (isset($this->_[\HDOM_INFO_TEXT])) { 836 return $this->_[\HDOM_INFO_TEXT] = $value; 837 } 838 return $this->_[\HDOM_INFO_INNER] = $value; 839 839 } 840 840 if (!isset($this->attr[$name])) { 841 $this->_[ HDOM_INFO_SPACE][] = array(' ', '', '');842 $this->_[ HDOM_INFO_QUOTE][] =HDOM_QUOTE_DOUBLE;841 $this->_[\HDOM_INFO_SPACE][] = array(' ', '', ''); 842 $this->_[\HDOM_INFO_QUOTE][] = \HDOM_QUOTE_DOUBLE; 843 843 } 844 844 $this->attr[$name] = $value; … … 1209 1209 'tr' => array('td' => 1, 'th' => 1, 'tr' => 1), 1210 1210 ); 1211 function __construct($str = null, $lowercase = \true, $forceTagsClosed = \true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN = \true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText =DEFAULT_SPAN_TEXT, $options = 0)1211 function __construct($str = null, $lowercase = \true, $forceTagsClosed = \true, $target_charset = \DEFAULT_TARGET_CHARSET, $stripRN = \true, $defaultBRText = \DEFAULT_BR_TEXT, $defaultSpanText = \DEFAULT_SPAN_TEXT, $options = 0) 1212 1212 { 1213 1213 if ($str) { … … 1229 1229 $this->clear(); 1230 1230 } 1231 function load($str, $lowercase = \true, $stripRN = \true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText =DEFAULT_SPAN_TEXT, $options = 0)1231 function load($str, $lowercase = \true, $stripRN = \true, $defaultBRText = \DEFAULT_BR_TEXT, $defaultSpanText = \DEFAULT_SPAN_TEXT, $options = 0) 1232 1232 { 1233 1233 global $debug_object; … … 1257 1257 // strip out server side scripts 1258 1258 $this->remove_noise("'(<\\?)(.*?)(\\?>)'s", \true); 1259 if ($options & HDOM_SMARTY_AS_TEXT) {1259 if ($options & \HDOM_SMARTY_AS_TEXT) { 1260 1260 // Strip Smarty scripts 1261 1261 $this->remove_noise("'(\\{\\w)(.*?)(\\})'s", \true); … … 1264 1264 $this->parse(); 1265 1265 // end 1266 $this->root->_[ HDOM_INFO_END] = $this->cursor;1266 $this->root->_[\HDOM_INFO_END] = $this->cursor; 1267 1267 $this->parse_charset(); 1268 1268 // make load function chainable … … 1330 1330 $this->root->dump($show_attr); 1331 1331 } 1332 protected function prepare($str, $lowercase = \true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText =DEFAULT_SPAN_TEXT)1332 protected function prepare($str, $lowercase = \true, $defaultBRText = \DEFAULT_BR_TEXT, $defaultSpanText = \DEFAULT_SPAN_TEXT) 1333 1333 { 1334 1334 $this->clear(); … … 1346 1346 $this->root = new simple_html_dom_node($this); 1347 1347 $this->root->tag = 'root'; 1348 $this->root->_[ HDOM_INFO_BEGIN] = -1;1349 $this->root->nodetype = HDOM_TYPE_ROOT;1348 $this->root->_[\HDOM_INFO_BEGIN] = -1; 1349 $this->root->nodetype = \HDOM_TYPE_ROOT; 1350 1350 $this->parent = $this->root; 1351 1351 if ($this->size > 0) { … … 1368 1368 $node = new simple_html_dom_node($this); 1369 1369 ++$this->cursor; 1370 $node->_[ HDOM_INFO_TEXT] = $s;1370 $node->_[\HDOM_INFO_TEXT] = $s; 1371 1371 $this->link_nodes($node, \false); 1372 1372 } … … 1479 1479 // Set end position if no further tags found 1480 1480 if ($this->char !== '<') { 1481 $this->root->_[ HDOM_INFO_END] = $this->cursor;1481 $this->root->_[\HDOM_INFO_END] = $this->cursor; 1482 1482 return \false; 1483 1483 } … … 1504 1504 // Current tag is a block tag, so it may close an ancestor 1505 1505 if (isset($this->optional_closing_tags[$parent_lower]) && isset($this->block_tags[$tag_lower])) { 1506 $this->parent->_[ HDOM_INFO_END] = 0;1506 $this->parent->_[\HDOM_INFO_END] = 0; 1507 1507 $org_parent = $this->parent; 1508 1508 // Traverse ancestors to find a matching opening tag … … 1518 1518 $this->parent = $this->parent->parent; 1519 1519 } 1520 $this->parent->_[ HDOM_INFO_END] = $this->cursor;1520 $this->parent->_[\HDOM_INFO_END] = $this->cursor; 1521 1521 return $this->as_text_node($tag); 1522 1522 } … … 1524 1524 // Grandparent exists and current tag is a block tag, so our 1525 1525 // parent doesn't have an end tag 1526 $this->parent->_[ HDOM_INFO_END] = 0;1526 $this->parent->_[\HDOM_INFO_END] = 0; 1527 1527 // No end tag 1528 1528 $org_parent = $this->parent; … … 1536 1536 $this->parent = $org_parent; 1537 1537 // restore origonal parent 1538 $this->parent->_[ HDOM_INFO_END] = $this->cursor;1538 $this->parent->_[\HDOM_INFO_END] = $this->cursor; 1539 1539 return $this->as_text_node($tag); 1540 1540 } 1541 1541 } elseif ($this->parent->parent && \strtolower($this->parent->parent->tag) === $tag_lower) { 1542 1542 // Grandparent exists and current tag closes it 1543 $this->parent->_[ HDOM_INFO_END] = 0;1543 $this->parent->_[\HDOM_INFO_END] = 0; 1544 1544 $this->parent = $this->parent->parent; 1545 1545 } else { … … 1549 1549 } 1550 1550 // Set end position of parent tag to current cursor position 1551 $this->parent->_[ HDOM_INFO_END] = $this->cursor;1551 $this->parent->_[\HDOM_INFO_END] = $this->cursor; 1552 1552 if ($this->parent->parent) { 1553 1553 $this->parent = $this->parent->parent; … … 1559 1559 // start tag 1560 1560 $node = new simple_html_dom_node($this); 1561 $node->_[ HDOM_INFO_BEGIN] = $this->cursor;1561 $node->_[\HDOM_INFO_BEGIN] = $this->cursor; 1562 1562 ++$this->cursor; 1563 1563 $tag = $this->copy_until($this->token_slash); … … 1569 1569 // <!-- Comment --> 1570 1570 if (isset($tag[0]) && $tag[0] === '!') { 1571 $node->_[ HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>');1571 $node->_[\HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>'); 1572 1572 if (isset($tag[2]) && $tag[1] === '-' && $tag[2] === '-') { 1573 1573 // Comment ("<!--") 1574 $node->nodetype = HDOM_TYPE_COMMENT;1574 $node->nodetype = \HDOM_TYPE_COMMENT; 1575 1575 $node->tag = 'comment'; 1576 1576 } else { 1577 1577 // Could be doctype or CDATA but we don't care 1578 $node->nodetype = HDOM_TYPE_UNKNOWN;1578 $node->nodetype = \HDOM_TYPE_UNKNOWN; 1579 1579 $node->tag = 'unknown'; 1580 1580 } 1581 1581 if ($this->char === '>') { 1582 $node->_[ HDOM_INFO_TEXT] .= '>';1582 $node->_[\HDOM_INFO_TEXT] .= '>'; 1583 1583 } 1584 1584 $this->link_nodes($node, \true); … … 1591 1591 if ($pos = \strpos($tag, '<') !== \false) { 1592 1592 $tag = '<' . \substr($tag, 0, -1); 1593 $node->_[ HDOM_INFO_TEXT] = $tag;1593 $node->_[\HDOM_INFO_TEXT] = $tag; 1594 1594 $this->link_nodes($node, \false); 1595 1595 $this->char = $this->doc[--$this->pos]; … … 1599 1599 // Handle invalid tag names (i.e. "<html#doc>") 1600 1600 if (!\preg_match('/^\\w[\\w:-]*$/', $tag)) { 1601 $node->_[ HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');1601 $node->_[\HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>'); 1602 1602 // Next char is the beginning of a new tag, don't touch it. 1603 1603 if ($this->char === '<') { … … 1607 1607 // Next char closes current tag, add and be done with it. 1608 1608 if ($this->char === '>') { 1609 $node->_[ HDOM_INFO_TEXT] .= '>';1609 $node->_[\HDOM_INFO_TEXT] .= '>'; 1610 1610 } 1611 1611 $this->link_nodes($node, \false); … … 1615 1615 } 1616 1616 // begin tag, add new node 1617 $node->nodetype = HDOM_TYPE_ELEMENT;1617 $node->nodetype = \HDOM_TYPE_ELEMENT; 1618 1618 $tag_lower = \strtolower($tag); 1619 1619 $node->tag = $this->lowercase ? $tag_lower : $tag; … … 1622 1622 // Traverse ancestors to close all optional closing tags 1623 1623 while (isset($this->optional_closing_tags[$tag_lower][\strtolower($this->parent->tag)])) { 1624 $this->parent->_[ HDOM_INFO_END] = 0;1624 $this->parent->_[\HDOM_INFO_END] = 0; 1625 1625 $this->parent = $this->parent->parent; 1626 1626 } … … 1648 1648 // Out of bounds before the tag ended 1649 1649 if ($this->pos >= $this->size - 1 && $this->char !== '>') { 1650 $node->nodetype = HDOM_TYPE_TEXT;1651 $node->_[ HDOM_INFO_END] = 0;1652 $node->_[ HDOM_INFO_TEXT] = '<' . $tag . $space[0] . $name;1650 $node->nodetype = \HDOM_TYPE_TEXT; 1651 $node->_[\HDOM_INFO_END] = 0; 1652 $node->_[\HDOM_INFO_TEXT] = '<' . $tag . $space[0] . $name; 1653 1653 $node->tag = 'text'; 1654 1654 $this->link_nodes($node, \false); … … 1658 1658 // Attributes cannot start after opening tag 1659 1659 if ($this->doc[$this->pos - 1] == '<') { 1660 $node->nodetype = HDOM_TYPE_TEXT;1660 $node->nodetype = \HDOM_TYPE_TEXT; 1661 1661 $node->tag = 'text'; 1662 1662 $node->attr = array(); 1663 $node->_[ HDOM_INFO_END] = 0;1664 $node->_[ HDOM_INFO_TEXT] = \substr($this->doc, $begin_tag_pos, $this->pos - $begin_tag_pos - 1);1663 $node->_[\HDOM_INFO_END] = 0; 1664 $node->_[\HDOM_INFO_TEXT] = \substr($this->doc, $begin_tag_pos, $this->pos - $begin_tag_pos - 1); 1665 1665 $this->pos -= 2; 1666 1666 $this->char = ++$this->pos < $this->size ? $this->doc[$this->pos] : null; … … 1686 1686 } else { 1687 1687 //no value attr: nowrap, checked selected... 1688 $node->_[ HDOM_INFO_QUOTE][] =HDOM_QUOTE_NO;1688 $node->_[\HDOM_INFO_QUOTE][] = \HDOM_QUOTE_NO; 1689 1689 $node->attr[$name] = \true; 1690 1690 if ($this->char != '>') { … … 1693 1693 // prev 1694 1694 } 1695 $node->_[ HDOM_INFO_SPACE][] = $space;1695 $node->_[\HDOM_INFO_SPACE][] = $space; 1696 1696 // prepare for next attribute 1697 1697 $space = array($this->copy_skip($this->token_blank), '', ''); … … 1703 1703 // go until the tag ended 1704 1704 $this->link_nodes($node, \true); 1705 $node->_[ HDOM_INFO_ENDSPACE] = $space[0];1705 $node->_[\HDOM_INFO_ENDSPACE] = $space[0]; 1706 1706 // handle empty tags (i.e. "<div/>") 1707 1707 if ($this->copy_until_char('>') === '/') { 1708 $node->_[ HDOM_INFO_ENDSPACE] .= '/';1709 $node->_[ HDOM_INFO_END] = 0;1708 $node->_[\HDOM_INFO_ENDSPACE] .= '/'; 1709 $node->_[\HDOM_INFO_END] = 0; 1710 1710 } else { 1711 1711 // reset parent … … 1720 1720 // since a br tag never has sub nodes, this works well. 1721 1721 if ($node->tag === 'br') { 1722 $node->_[ HDOM_INFO_INNER] = $this->default_br_text;1722 $node->_[\HDOM_INFO_INNER] = $this->default_br_text; 1723 1723 } 1724 1724 return \true; … … 1733 1733 switch ($this->char) { 1734 1734 case '"': 1735 $quote_type = HDOM_QUOTE_DOUBLE;1735 $quote_type = \HDOM_QUOTE_DOUBLE; 1736 1736 $this->char = ++$this->pos < $this->size ? $this->doc[$this->pos] : null; 1737 1737 // next … … 1741 1741 break; 1742 1742 case '\'': 1743 $quote_type = HDOM_QUOTE_SINGLE;1743 $quote_type = \HDOM_QUOTE_SINGLE; 1744 1744 $this->char = ++$this->pos < $this->size ? $this->doc[$this->pos] : null; 1745 1745 // next … … 1749 1749 break; 1750 1750 default: 1751 $quote_type = HDOM_QUOTE_NO;1751 $quote_type = \HDOM_QUOTE_NO; 1752 1752 $value = $this->copy_until($this->token_attr); 1753 1753 } … … 1763 1763 } 1764 1764 if (!$is_duplicate) { 1765 $node->_[ HDOM_INFO_QUOTE][] = $quote_type;1765 $node->_[\HDOM_INFO_QUOTE][] = $quote_type; 1766 1766 $node->attr[$name] = $value; 1767 1767 } … … 1779 1779 $node = new simple_html_dom_node($this); 1780 1780 ++$this->cursor; 1781 $node->_[ HDOM_INFO_TEXT] = '</' . $tag . '>';1781 $node->_[\HDOM_INFO_TEXT] = '</' . $tag . '>'; 1782 1782 $this->link_nodes($node, \false); 1783 1783 $this->char = ++$this->pos < $this->size ? $this->doc[$this->pos] : null; -
questpass/trunk/vendor_prefixed/league/oauth2-client/src/Token/AccessTokenInterface.php
r2653235 r2687512 16 16 17 17 use JsonSerializable; 18 use QuestpassVendor\ReturnTypeWillChange;18 use ReturnTypeWillChange; 19 19 use RuntimeException; 20 20 interface AccessTokenInterface extends JsonSerializable
Note: See TracChangeset
for help on using the changeset viewer.