├── AutoLoadOne.php ├── LICENSE ├── README.md ├── autoloadone ├── composer.json └── package.json /AutoLoadOne.php: -------------------------------------------------------------------------------- 1 | fileGen = '.'; //getcwd(); // dirname($_SERVER['SCRIPT_FILENAME']); 84 | $this->rooturl = '.'; //getcwd(); // dirname($_SERVER['SCRIPT_FILENAME']); 85 | $this->t1 = microtime(true); 86 | $tmpArr = explode('/', $_SERVER['SCRIPT_FILENAME']); // it always returns with linux separators. 87 | $this->fileConfig = end($tmpArr); // the config name shares the same name as the php but with extension .json 88 | $this->fileConfig = $this->dirNameLinux(getcwd()) . '/' . str_replace($this->extension, '.json', $this->fileConfig); 89 | } 90 | 91 | /** 92 | * returns dir name linux way. 93 | * 94 | * @param $url 95 | * @param bool $ifFullUrl 96 | * 97 | * @return string 98 | */ 99 | public function dirNameLinux($url, bool $ifFullUrl = true): string 100 | { 101 | $url = trim($url); 102 | $dir = ($ifFullUrl) ? dirname($url) : $url; 103 | $dir = $this->fixSeparator($dir); 104 | // remove trailing / 105 | return rtrim($dir, '/'); 106 | } 107 | 108 | public function fixSeparator($fullUrl) 109 | { 110 | return str_replace('\\', '/', $fullUrl); // replace windows path for linux path. 111 | } 112 | 113 | /** @noinspection PhpUnused */ 114 | public static function format($json, $unescapeUnicode, $unescapeSlashes): string 115 | { 116 | $result = ''; 117 | $pos = 0; 118 | $strLen = strlen($json); 119 | $indentStr = ' '; 120 | $newLine = "\n"; 121 | $outOfQuotes = true; 122 | $buffer = ''; 123 | $noescape = true; 124 | for ($i = 0; $i < $strLen; $i++) { 125 | $char = substr($json, $i, 1); 126 | if ('"' === $char && $noescape) { 127 | $outOfQuotes = !$outOfQuotes; 128 | } 129 | if (!$outOfQuotes) { 130 | $buffer .= $char; 131 | $noescape = !('\\' === $char) || !$noescape; 132 | continue; 133 | } 134 | if ('' !== $buffer) { 135 | if ($unescapeSlashes) { 136 | $buffer = str_replace('\\/', '/', $buffer); 137 | } 138 | if ($unescapeUnicode && function_exists('mb_convert_encoding')) { 139 | $buffer = preg_replace_callback('/(\\\\+)u([0-9a-f]{4})/i', static function($match) { 140 | $l = strlen($match[1]); 141 | if ($l % 2) { 142 | $code = hexdec($match[2]); 143 | if (0xD800 <= $code && 0xDFFF >= $code) { 144 | return $match[0]; 145 | } 146 | /** @noinspection PhpComposerExtensionStubsInspection */ 147 | return str_repeat('\\', $l - 1) . 148 | mb_convert_encoding(pack('H*', $match[2]), 'UTF-8', 'UCS-2BE'); 149 | } 150 | return $match[0]; 151 | }, $buffer); 152 | } 153 | $result .= $buffer . $char; 154 | $buffer = ''; 155 | continue; 156 | } 157 | if (':' === $char) { 158 | $char .= ' '; 159 | } elseif ('}' === $char || ']' === $char) { 160 | $pos--; 161 | $prevChar = substr($json, $i - 1, 1); 162 | if ('{' !== $prevChar && '[' !== $prevChar) { 163 | $result .= $newLine; 164 | $result .= str_repeat($indentStr, $pos); 165 | } else { 166 | $result = rtrim($result); 167 | } 168 | } 169 | $result .= $char; 170 | if (',' === $char || '{' === $char || '[' === $char) { 171 | $result .= $newLine; 172 | if ('{' === $char || '[' === $char) { 173 | $pos++; 174 | } 175 | $result .= str_repeat($indentStr, $pos); 176 | } 177 | } 178 | return $result; 179 | } 180 | 181 | public function init(): void 182 | { 183 | $this->log = ''; 184 | $this->logStat = ''; 185 | if (PHP_SAPI === 'cli') { 186 | $this->initSapi(); 187 | } else { 188 | if (_AUTOLOAD_ONLYCLI) { 189 | echo 'You should run it as a command line parameter.'; 190 | die(1); 191 | } 192 | $this->initWeb(); 193 | } 194 | } 195 | 196 | private function initSapi(): void 197 | { 198 | global $argv; 199 | $v = $this::VERSION . ' (c) Jorge Castro'; 200 | echo <<extension . " will be generate)\n"; 215 | echo "-save (save the file to generate)\n"; 216 | echo "-compression (compress the result)\n"; 217 | echo "-savefilename (the filename to be generated. By default its autoload.php)\n"; 218 | echo "-excludens (namespace excluded)\n"; 219 | echo "-excludepath (path excluded)\n"; 220 | echo "-externalpath (external paths)\n"; 221 | echo "------------------------------------------------------------------\n"; 222 | } else { 223 | $this->getAllParametersCli(); 224 | $this->fileGen = ($this->fileGen === '') ? '.' : $this->fileGen; //getcwd() 225 | $this->button = 1; 226 | } 227 | if ($this->current) { 228 | $this->rooturl = '.'; //getcwd(); 229 | $this->fileGen = '.'; //getcwd(); 230 | $this->savefile = 1; 231 | $this->savefileName = 'autoload.php'; 232 | $this->stop = 0; 233 | $this->compression = 1; 234 | $this->button = 1; 235 | $this->excludeNS = ''; 236 | $this->externalPath = ''; 237 | $this->excludePath = ''; 238 | } 239 | echo '-folder ' . $this->rooturl . " (folder to scan)\n"; 240 | echo '-filegen ' . $this->fileGen . ' (folder where autoload' . $this->extension . " will be generate)\n"; 241 | echo '-save ' . ($this->savefile ? 'yes' : 'no') . " (save filegen)\n"; 242 | echo '-compression ' . ($this->compression ? 'yes' : 'no') . " (compress the result)\n"; 243 | echo '-savefilename ' . $this->savefileName . " (save filegen name)\n"; 244 | echo '-excludens ' . $this->excludeNS . " (namespace excluded)\n"; 245 | echo '-excludepath ' . $this->excludePath . " (path excluded)\n"; 246 | echo '-externalpath ' . $this->externalPath . " (path external)\n"; 247 | echo "------------------------------------------------------------------\n"; 248 | } 249 | 250 | private function getAllParametersCli(): void 251 | { 252 | $this->rooturl = $this->fixSeparator($this->getParameterCli('folder')); 253 | $this->fileGen = $this->fixSeparator($this->getParameterCli('filegen')); 254 | $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; 255 | $this->savefile = $this->getParameterCli('save')==="yes" ? 1:0; 256 | $this->savefileName = $this->getParameterCli('savefilename', 'autoload.php'); 257 | $this->stop = $this->getParameterCli('stop') === "yes" ? 1 : 0; 258 | $this->compression = $this->getParameterCli('compression') === "yes" ? 1 : 0; 259 | $this->current = $this->getParameterCli('current', true); 260 | $this->excludeNS = $this->getParameterCli('excludens'); 261 | $this->excludePath = $this->getParameterCli('excludepath'); 262 | $this->externalPath = $this->getParameterCli('externalpath'); 263 | $this->debugMode = $this->getParameterCli('debug'); 264 | } 265 | 266 | /** 267 | * @param $key 268 | * @param string $default is the defalut value is the parameter is set without value. 269 | * 270 | * @return string 271 | */ 272 | private function getParameterCli($key, string $default = ''): string 273 | { 274 | global $argv; 275 | $p = array_search('-' . $key, $argv, true); 276 | if ($p === false) { 277 | return ''; 278 | } 279 | if ($default !== '') { 280 | return $default; 281 | } 282 | if (count($argv) >= $p + 1) { 283 | return $this->removeTrailSlash($argv[$p + 1]); 284 | } 285 | return ''; 286 | } 287 | 288 | private function removeTrailSlash($txt): string 289 | { 290 | return rtrim($txt, '/\\'); 291 | } 292 | 293 | private function initWeb(): void 294 | { 295 | @ob_start(); 296 | // Not in cli-mode 297 | @session_start(); 298 | $this->logged = @$_SESSION['log']; 299 | if (!$this->logged) { 300 | $user = @$_POST['user']; 301 | $password = @$_POST['password']; 302 | if (($user === _AUTOLOAD_USER && $password === _AUTOLOAD_PASSWORD) || _AUTOLOAD_ENTER) { 303 | $_SESSION['log'] = '1'; 304 | $this->logged = 1; 305 | } else { 306 | sleep(1); // sleep a second 307 | $_SESSION['log'] = '0'; 308 | @session_destroy(); 309 | } 310 | @session_write_close(); 311 | } else { 312 | $this->button = @$_POST['button']; 313 | if (!$this->button) { 314 | $loadOk = $this->loadParam(); 315 | if ($loadOk === false) { 316 | $this->addLog('Unable to load configuration file ' . $this->savefileName . 317 | '. It is not obligatory', 'warning'); 318 | } else { 319 | $this->addLog('Configuration loaded ' . $this->savefileName . 320 | '.', 'info'); 321 | } 322 | } else { 323 | $this->debugMode = isset($_GET['debug']); 324 | $this->rooturl = $this->removeTrailSlash(@$_POST['rooturl'] ? $_POST['rooturl'] : $this->rooturl); 325 | $this->fileGen = $this->removeTrailSlash(@$_POST['fileGen'] ? $_POST['fileGen'] : $this->fileGen); 326 | $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; 327 | $this->excludeNS = 328 | $this->cleanInputFolder($this->removeTrailSlash(@$_POST['excludeNS'] ? $_POST['excludeNS'] 329 | : $this->excludeNS)); 330 | $this->excludePath = 331 | $this->cleanInputFolder($this->removeTrailSlash(@$_POST['excludePath'] ? $_POST['excludePath'] 332 | : $this->excludePath)); 333 | $this->externalPath = 334 | $this->cleanInputFolder($this->removeTrailSlash(@$_POST['externalPath'] ? $_POST['externalPath'] 335 | : $this->externalPath)); 336 | $this->savefile = (@$_POST['savefile']) ?: $this->savefile; 337 | $this->savefileName = (@$_POST['savefileName']) ?: $this->savefileName; 338 | $this->stop = @$_POST['stop']; 339 | $this->compression = @$_POST['compression']; 340 | } 341 | /** @noinspection PhpConditionAlreadyCheckedInspection */ 342 | if ($this->button === 'logout') { 343 | @session_destroy(); 344 | $this->logged = 0; 345 | @session_write_close(); 346 | } 347 | } 348 | } 349 | 350 | /** 351 | * @return bool 352 | */ 353 | private function loadParam(): bool 354 | { 355 | if (!_AUTOLOAD_SAVEPARAM) { 356 | return false; 357 | } 358 | $fullPHP = @file_get_contents($this->savefileName); 359 | if ($fullPHP === false) { 360 | $fullPHP = ''; 361 | } 362 | $a1 = strpos($fullPHP, '/* -- CONFIG START HERE --'); 363 | if ($a1 === false) { 364 | // we try the old method (json file if exists) 365 | $oldMethod = @file_get_contents($this->fileConfig); 366 | if (!$oldMethod) { 367 | return false; 368 | } 369 | $this->addLog('Reading the configuration using the old method ' . $this->fileConfig . ' (you could delete this file)', 'error'); 370 | $param = json_decode($oldMethod, true); 371 | $param = $param['local'] ?? null; 372 | } else { 373 | $a1 += strlen('/* -- CONFIG START HERE --'); 374 | $a2 = strpos($fullPHP, '-- CONFIG END HERE -- ', $a1); 375 | if ($a2 === false) { 376 | return false; 377 | } 378 | $txt = trim(substr($fullPHP, $a1, $a2 - $a1)); 379 | $param = json_decode($txt, true); 380 | } 381 | if ($param === null) { 382 | return false; 383 | } 384 | $this->fileGen = @$param['fileGen']; 385 | $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; 386 | $this->savefile = @$param['savefile']; 387 | $this->compression = @$param['compression']; 388 | $this->savefileName = @$param['savefileName']; 389 | $this->excludeNS = @$param['excludeNS']; 390 | $this->excludePath = @$param['excludePath']; 391 | $this->externalPath = @$param['externalPath']; 392 | return true; 393 | } 394 | 395 | /** 396 | * @param mixed $txt The message to show 397 | * @param string $type =['error','warning','info','success','stat','statinfo','staterror'][$i] 398 | */ 399 | public function addLog($txt, string $type = ''): void 400 | { 401 | if (PHP_SAPI === 'cli') { 402 | $txt = str_replace(['', '', '', ''], ["\033[1m", "\033[4m", "\033[0m", "\033[0m"], $txt); 403 | switch ($type) { 404 | case 'error': 405 | case 'staterror': 406 | echo "\033[31m$txt\033[0m\n"; 407 | break; 408 | case 'warning': 409 | echo "\033[33m$txt\033[0m\n"; 410 | break; 411 | case 'info': 412 | echo "\033[37m$txt\033[0m\n"; 413 | break; 414 | case 'success': 415 | echo "\033[32m$txt\033[0m\n"; 416 | break; 417 | case 'statinfo': 418 | case 'stat': 419 | echo "\033[34m$txt\033[0m\n"; 420 | break; 421 | default: 422 | echo "\033[0m$txt\033[0m\n"; 423 | break; 424 | } 425 | } else { 426 | switch ($type) { 427 | case 'error': 428 | $this->log .= "
$txt
"; 429 | break; 430 | case 'warning': 431 | $this->log .= "
$txt
"; 432 | break; 433 | case 'info': 434 | $this->log .= "
$txt
"; 435 | break; 436 | case 'success': 437 | $this->log .= "
$txt
"; 438 | break; 439 | case 'stat': 440 | $this->logStat .= "
$txt
"; 441 | break; 442 | case 'statinfo': 443 | $this->logStat .= "
$txt
"; 444 | break; 445 | case 'staterror': 446 | $this->logStat .= "
$txt
"; 447 | break; 448 | default: 449 | $this->log .= "
$txt
"; 450 | break; 451 | } 452 | } 453 | } 454 | 455 | /** 456 | * @param $value 457 | * 458 | * @return string 459 | */ 460 | private function cleanInputFolder($value): string 461 | { 462 | // remove windows line carriage 463 | // remove previous ,\n if any and converted into \n. It avoids duplicate ,,\n 464 | // we add ,\n again. 465 | // we remove trailing \ 466 | // we remove trailing / 467 | return str_replace(["\r\n", ",\n", "\n", '\\,', '/,'], ["\n", "\n", ",\n", ',', ','], $value); 468 | } 469 | 470 | public function process(): void 471 | { 472 | $this->rooturl = $this->fixSeparator($this->rooturl); 473 | $this->fileGen = $this->fixSeparator($this->fileGen); 474 | $this->externalPath = $this->fixSeparator($this->externalPath); 475 | if ($this->rooturl) { 476 | $this->baseGen = $this->dirNameLinux($this->fileGen . '/' . $this->getFileName()); 477 | [$files, $json] = $this->listFolderFiles($this->rooturl); 478 | $filesAbsolute = array_fill(0, count($files), false); 479 | $jsonAbsolute = array_fill(0, count($json), false); 480 | $extPathArr = explode(',', $this->externalPath); 481 | foreach ($extPathArr as $ep) { 482 | $ep = $this->dirNameLinux($ep, false); 483 | [$files2, $json2] = $this->listFolderFiles($ep); 484 | foreach ($json2 as $newJson) { 485 | $json[] = $newJson; 486 | $jsonAbsolute[] = true; 487 | } 488 | foreach ($files2 as $newFile) { 489 | $files[] = $newFile; 490 | $filesAbsolute[] = true; 491 | } 492 | } 493 | //die(1); 494 | $ns = []; 495 | $nsAlt = []; 496 | $pathAbsolute = []; 497 | $pathAbsoluteExt = []; 498 | $autoruns = []; 499 | $autorunsFromJson = []; 500 | $autorunsFirst = []; 501 | $excludeNSArr = str_replace(["\n", "\r", ' '], '', $this->excludeNS); 502 | $excludeNSArr = explode(',', $excludeNSArr); 503 | //$excludePathArr = $this->fixSeparator($this->excludePath); 504 | $excludePathArr = str_replace(["\n", "\r"], '', $this->excludePath); 505 | $excludePathArr = explode(',', $excludePathArr); 506 | foreach ($excludePathArr as $key => $item) { 507 | $excludePathArr[$key] = trim($item); 508 | } 509 | $this->result = ''; 510 | if ($this->button) { 511 | foreach ($json as $key => $f) { 512 | //echo "running $f
"; 513 | $f = $this->fixSeparator($f); 514 | $dirOriginal = $this->dirNameLinux($f); 515 | $jsonE = $this->parseJSONFile($dirOriginal); 516 | foreach ($jsonE as $item) { 517 | if (!$jsonAbsolute[$key]) { 518 | $dir = $this->genPath($dirOriginal); //folder/subfolder/f1 519 | $full = $dir . '/' . $item; ///folder/subfolder/f1/F1.php 520 | } else { 521 | //$dir = $dirOriginal; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder 522 | $full = $dirOriginal . '/' . $item; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder/NaturalClass.php 523 | } 524 | $autoruns[] = $full; 525 | $autorunsFromJson[] = $full; 526 | } 527 | } 528 | $mapped = []; 529 | foreach ($files as $key => $f) { 530 | $f = $this->fixSeparator($f); 531 | $runMe = ''; 532 | $pArr = $this->parsePHPFile($f, $runMe); 533 | $dirOriginal = $this->dirNameLinux($f); 534 | if (!$filesAbsolute[$key]) { 535 | $dir = $this->genPath($dirOriginal); //folder/subfolder/f1 536 | $full = $this->genPath($f); ///folder/subfolder/f1/F1.php 537 | } else { 538 | $dir = dirname($f); //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder 539 | $full = $f; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder/NaturalClass.php 540 | } 541 | $urlFull = $this->dirNameLinux($full); ///folder/subfolder/f1 542 | $tmpArr = explode('/', $f); //F1.php 543 | $basefile = end($tmpArr); // the config name shares the same name as the php but with extension .json 544 | if ($runMe !== '') { 545 | switch ($runMe) { 546 | case '@autorun first': 547 | $autorunsFirst[] = $full; 548 | $this->addLog("Adding autorun (priority): $full", 'info'); 549 | break; 550 | case '@autorunclass': 551 | $autoruns[] = $full; 552 | $this->addLog("Adding autorun (class, use future): $full", 'info'); 553 | break; 554 | case '@autorun': 555 | $autoruns[] = $full; 556 | $this->addLog("Adding autorun: $full", 'info'); 557 | break; 558 | } 559 | } 560 | foreach ($pArr as $p) { 561 | $nsp = $p['namespace']; 562 | $cs = $p['classname']; 563 | $this->statNameSpaces[$nsp] = 1; 564 | $this->statNumPHP++; 565 | if ($cs !== '') { 566 | $this->statNumClass++; 567 | } 568 | $altUrl = ($nsp !== '') ? $nsp . '\\' . $cs : $cs; // namespace 569 | if ($nsp !== '' || $cs !== '') { 570 | if ((!isset($ns[$nsp]) || $ns[$nsp] === $dir) && $basefile === $cs . $this->extension) { 571 | // namespace doesn't exist and the class is equals to the name 572 | // adding as a folder 573 | $exclude = false; 574 | if ($nsp !== '' && in_array($nsp, $excludeNSArr, true)) { 575 | //if ($this->inExclusion($nsp, $this->excludeNSArr) && $nsp!="") { 576 | $this->addLog("Ignoring namespace (path specified in Excluded NameSpace): $altUrl -> $full", 577 | 'warning'); 578 | $exclude = true; 579 | } 580 | if ($this->inExclusion($dir, $excludePathArr)) { 581 | $this->addLog("Ignoring relative path (path specified in Excluded Path): $altUrl -> $dir", 582 | 'warning'); 583 | $exclude = true; 584 | } 585 | if ($this->inExclusion($dirOriginal, $excludePathArr)) { 586 | $this->addLog("Ignoring full path (path specified in Excluded Path): $altUrl -> $dirOriginal", 587 | 'warning'); 588 | $exclude = true; 589 | } 590 | if (!$exclude) { 591 | if ($nsp === '') { 592 | $this->addLog("Adding Full map (empty namespace): $altUrl -> $full to class $cs", 'warning'); 593 | $nsAlt[$altUrl] = $full; 594 | if ($this->externalPath !== "" && strpos($full, $this->externalPath) === 0) { 595 | $pathAbsoluteExt[$altUrl] = $filesAbsolute[$key]; 596 | } else { 597 | $pathAbsolute[$altUrl] = $filesAbsolute[$key]; 598 | } 599 | } elseif (isset($ns[$nsp])) { 600 | $mapped[] = $nsp . '\\' . $cs; 601 | $this->addLog("Reusing the folder: $nsp -> $dir to class $cs", 602 | 'success'); 603 | } else { 604 | $ns[$nsp] = $dir; 605 | if ($this->externalPath !== "" && strpos($dir, $this->externalPath) === 0) { 606 | $pathAbsoluteExt[$nsp] = $filesAbsolute[$key]; 607 | } else { 608 | $pathAbsolute[$nsp] = $filesAbsolute[$key]; 609 | } 610 | $this->addLog("Adding Folder as namespace: $nsp -> $dir to class $cs", 'info'); 611 | } 612 | } 613 | } elseif (isset($nsAlt[$altUrl])) { 614 | $this->addLog("Error Conflict:Class with name $altUrl -> $dir" 615 | . " is already defined. File $f", 'error'); 616 | $this->statConflict++; 617 | if ($this->stop) { 618 | die(1); 619 | } 620 | } elseif ((!in_array($altUrl, $excludeNSArr, true) || $nsp === '') && 621 | !$this->inExclusion($urlFull, $excludePathArr)) { 622 | if (in_array($altUrl, $mapped, true)) { 623 | $this->addLog("Not Added Full relation: $altUrl -> $full to class $cs (already added)", 'warning'); 624 | } else { 625 | $this->addLog("Adding Full relation: $altUrl -> $full to class $cs", 'warning'); 626 | $nsAlt[$altUrl] = $full; 627 | if ($this->externalPath !== "" && strpos($full, $this->externalPath) === 0) { 628 | $pathAbsoluteExt[$altUrl] = $filesAbsolute[$key]; 629 | } else { 630 | $pathAbsolute[$altUrl] = $filesAbsolute[$key]; 631 | } 632 | } 633 | } 634 | } 635 | } 636 | if (count($pArr) === 0) { 637 | $this->statNumPHP++; 638 | if ($runMe === '@noautoload') { 639 | $this->addLog("Ignoring $full Reason: @noautoload found", 'warning'); 640 | } else { 641 | $this->addLog("Ignoring $full Reason: No class found on file.", 'warning'); 642 | } 643 | } 644 | } 645 | foreach ($autorunsFirst as $auto) { 646 | $this->addLog("Adding file $auto Reason: @autoload first found", 'warning'); 647 | } 648 | foreach ($autoruns as $auto) { 649 | if (in_array($auto, $autorunsFromJson, true)) { 650 | $this->addLog("Adding file $auto Reason: composer.json found", 'warning'); 651 | } else { 652 | $this->addLog("Adding file $auto Reason: @autoload found", 'warning'); 653 | } 654 | } 655 | $autoruns = array_merge($autorunsFirst, $autoruns); 656 | $this->result = 657 | $this->genautoload($this->fileGen . '/' . $this->getFileName(), $ns, $nsAlt, $pathAbsolute, 658 | $pathAbsoluteExt, $autoruns); 659 | } 660 | if ($this->statNumPHP === 0) { 661 | $p = 100; 662 | } else { 663 | $p = round((count($ns) + count($nsAlt)) * 100 / $this->statNumPHP, 2); 664 | } 665 | if ($this->statNumClass === 0) { 666 | $pc = 100; 667 | } else { 668 | $pc = round((count($ns) + count($nsAlt)) * 100 / $this->statNumClass, 2); 669 | } 670 | $this->addLog('Number of Classes: ' . $this->statNumClass . '', 'stat'); 671 | $this->addLog('Number of Namespaces: ' . count($this->statNameSpaces) . '', 'stat'); 672 | $this->addLog('Number of Maps: ' . (count($ns) + count($nsAlt)) . ' (you want to reduce it)', 673 | 'stat'); 674 | $this->addLog('Number of PHP Files: ' . $this->statNumPHP . '', 'stat'); 675 | $this->addLog('Number of PHP Autorun: ' . count($autoruns) . '', 'stat'); 676 | $this->addLog('Number of conflicts: ' . $this->statConflict . '', 'stat'); 677 | if ($this->statError) { 678 | $this->addLog('Number of errors: ' . $this->statError . '', 'staterror'); 679 | } 680 | $this->addLog('Ratio map per file: ' . $p . '% ' . $this->evaluation($p) . 681 | ' (less is better. 100% means one map/one file)', 'statinfo'); 682 | $this->addLog('Ratio map per classes: ' . $pc . '% ' . $this->evaluation($pc) . 683 | ' (less is better. 100% means one map/one class)', 'statinfo'); 684 | $this->addLog('Map size: ' . round($this->statByteUsed / 1024, 1) . 685 | " kbytes (less is better, it's an estimate of the memory used by the map)", 'statinfo'); 686 | $this->addLog('Map size Compressed: ' . round($this->statByteUsedCompressed / 1024, 1) . 687 | " kbytes (less is better, it's an estimate of the memory used by the map)", 'statinfo'); 688 | } else { 689 | $this->addLog('No folder specified'); 690 | } 691 | } 692 | 693 | /** 694 | * returns the name of the filename if the original filename constains .php then it is not added, otherwise 695 | * it is added. 696 | * 697 | * @return string 698 | */ 699 | public function getFileName(): string 700 | { 701 | if (strpos($this->savefileName, '.php') === false) { 702 | return $this->savefileName . $this->extension; 703 | } 704 | return $this->savefileName; 705 | } 706 | 707 | public function listFolderFiles($dir): array 708 | { 709 | $arr = []; 710 | $json = []; 711 | $this->listFolderFilesAlt($dir, $arr, $json); 712 | return [$arr, $json]; 713 | } 714 | 715 | public function listFolderFilesAlt($dir, &$list, &$json): array 716 | { 717 | if ($dir === '') { 718 | return []; 719 | } 720 | $ffs = @scandir($this->fixRelative($dir)); 721 | if ($ffs === false) { 722 | $this->addLog("\nError: Unable to reader folder [$dir]. Check the name of the folder and the permissions", 723 | 'error'); 724 | $this->statError++; 725 | return []; 726 | } 727 | foreach ($ffs as $ff) { 728 | if ($ff !== '.' && $ff !== '..') { 729 | if ($ff === 'composer.json') { 730 | $json[] = $list[] = $dir . '/' . $ff; 731 | } 732 | if ((strlen($ff) >= 5) && substr($ff, -4) === $this->extension) { 733 | // PHP_OS_FAMILY=='Windows' 734 | $list[] = $dir . '/' . $ff; 735 | } 736 | if (is_dir($dir . '/' . $ff)) { 737 | $this->listFolderFilesAlt($dir . '/' . $ff, $list, $json); 738 | } 739 | } 740 | } 741 | return $list; 742 | } 743 | 744 | private function fixRelative($path) 745 | { 746 | if (strpos($path, '..') !== false) { 747 | return getcwd() . '/' . $path; 748 | } 749 | return $path; 750 | } 751 | 752 | public function parseJSONFile($filename) 753 | { 754 | try { 755 | $filenameFixed = $this->fixRelative($filename) . '/composer.json'; 756 | if (is_file($filenameFixed)) { 757 | $content = file_get_contents($filenameFixed); 758 | } else { 759 | return []; 760 | } 761 | if ($this->debugMode) { 762 | echo $filename . ' trying token...
'; 763 | } 764 | $tokens = json_decode($content, true); 765 | } catch (Exception $ex) { 766 | echo "Error in $filename\n"; 767 | die(1); 768 | } 769 | return $tokens['autoload']['files'] ?? []; 770 | } 771 | 772 | public function genPath($path) 773 | { 774 | $path = $this->fixSeparator($path); 775 | if (strpos($path, $this->baseGen) === 0) { 776 | $min1 = strrpos($path, '/'); 777 | $min2 = strrpos($this->baseGen . '/', '/'); 778 | //$min=min(strlen($path),strlen($this->baseGen)); 779 | $min = min($min1, $min2); 780 | $baseCommon = $min; 781 | for ($i = 0; $i < $min; $i++) { 782 | if (substr($path, 0, $i) !== substr($this->baseGen, 0, $i)) { 783 | $baseCommon = $i - 2; 784 | break; 785 | } 786 | } 787 | // moving down the relative path (/../../) 788 | $c = substr_count(substr($this->baseGen, $baseCommon), '/'); 789 | $r = str_repeat('/..', $c); 790 | // moving up the relative path 791 | $r2 = substr($path, $baseCommon); 792 | return $r . $r2; 793 | } 794 | return substr($path, strlen($this->baseGen)); 795 | } 796 | 797 | /** 798 | * @param $filename 799 | * @param string $runMe 800 | * 801 | * @return array 802 | */ 803 | public function parsePHPFile($filename, string &$runMe): array 804 | { 805 | $runMe = ''; 806 | $r = []; 807 | try { 808 | if (is_file($this->fixRelative($filename))) { 809 | $content = file_get_contents($this->fixRelative($filename)); 810 | } else { 811 | return []; 812 | } 813 | if ($this->debugMode) { 814 | echo $filename . ' trying token...
'; 815 | } 816 | $tokens = token_get_all($content); 817 | } catch (Exception $ex) { 818 | echo "Error in $filename\n"; 819 | die(1); 820 | } 821 | foreach ($tokens as $token) { 822 | if (is_array($token) && ($token[0] === T_COMMENT || $token[0] === T_DOC_COMMENT)) { 823 | if (strpos($token[1], '@noautoload') !== false) { 824 | $runMe = '@noautoload'; 825 | return []; 826 | } 827 | if (strpos($token[1], '@autorun') !== false) { 828 | if (strpos($token[1], '@autorunclass') !== false) { 829 | $runMe = '@autorunclass'; 830 | } elseif (strpos($token[1], '@autorun first') !== false) { 831 | $runMe = '@autorun first'; 832 | } else { 833 | $runMe = '@autorun'; 834 | } 835 | } 836 | } 837 | } 838 | $nameSpace = ''; 839 | $className = ''; 840 | foreach ($tokens as $p => $token) { 841 | if (is_array($token) && $token[0] === T_NAMESPACE) { 842 | // We found a namespace 843 | $ns = ''; 844 | for ($i = $p + 2; $i < $p + 30; $i++) { 845 | if (is_array($tokens[$i])) { 846 | $ns .= $tokens[$i][1]; 847 | } else { 848 | // tokens[$p]==';' ?? 849 | break; 850 | } 851 | } 852 | $nameSpace = $ns; 853 | } 854 | $isClass = false; 855 | // A class is defined by a T_CLASS + a space + name of the class. 856 | if (is_array($token) && ($token[0] === T_CLASS || $token[0] === T_INTERFACE || $token[0] === T_TRAIT) && 857 | is_array($tokens[$p + 1]) && $tokens[$p + 1][0] === T_WHITESPACE) { 858 | $isClass = true; 859 | if (is_array($tokens[$p - 1]) && $tokens[$p - 1][0] === T_PAAMAYIM_NEKUDOTAYIM && 860 | $tokens[$p - 1][1] === '::') { 861 | // /namespace/Nameclass:class <-- we skip this case. 862 | $isClass = false; 863 | } 864 | } 865 | if ($isClass) { 866 | // encontramos una clase 867 | $min = min($p + 30, count($tokens) - 1); 868 | for ($i = $p + 2; $i < $min; $i++) { 869 | if (is_array($tokens[$i]) && $tokens[$i][0] === T_STRING) { 870 | $className = $tokens[$i][1]; 871 | break; 872 | } 873 | } 874 | $r[] = ['namespace' => trim($nameSpace), 'classname' => trim($className)]; 875 | } 876 | } // foreach 877 | return $r; 878 | } 879 | 880 | /** 881 | * @param string $path 882 | * @param string[] $exclusions 883 | * 884 | * @return bool 885 | */ 886 | private function inExclusion(string $path, array $exclusions): bool 887 | { 888 | foreach ($exclusions as $ex) { 889 | if ($ex !== '') { 890 | if ($ex[strlen($ex) - 1] === '*') { 891 | $bool = $this->startwith($path, substr($ex, 0, -1)); 892 | if ($bool) { 893 | return true; 894 | } 895 | } 896 | if ($ex[0] === '*') { 897 | $bool = $this->endswith($path, $ex); 898 | if ($bool) { 899 | return true; 900 | } 901 | } 902 | if ((strpos($ex, '*') === false) && $path === $ex) { 903 | return true; 904 | } 905 | } 906 | } 907 | return false; 908 | } 909 | 910 | public function startwith($string, $test): bool 911 | { 912 | return strpos($string, $test) === 0; 913 | } 914 | 915 | public function endswith($string, $test): bool 916 | { 917 | $strlen = strlen($string); 918 | $testlen = strlen($test); 919 | if ($testlen > $strlen) { 920 | return false; 921 | } 922 | return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0; 923 | } 924 | 925 | public function genautoload($file, $namespaces, $namespacesAlt, $pathAbsolute, $pathAbsoluteExt, $autoruns) 926 | { 927 | $template = "filename.
950 | * example: ['namespace\Class']='folder\file.php' 951 | */ 952 | ${{tempname}}__arrautoloadCustom = [ 953 | {{custom}} 954 | ]; 955 | ${{tempname}}__arrautoloadCustomCommon = [ 956 | {{customCommon}} 957 | ]; 958 | 959 | /* @var string[] ${{tempname}}__arrautoload It stores the map of definitions as namespace=>folder 960 | * Example: ['namespace']='folder' 961 | */ 962 | ${{tempname}}__arrautoload = [ 963 | {{include}} 964 | ]; 965 | ${{tempname}}__arrautoloadCommon = [ 966 | {{includeCommon}} 967 | ]; 968 | 969 | /** 970 | * @var boolean[] ${{tempname}}__arrautoloadAbsolute It stores the map absolutely
971 | * Example: $['namespace' or 'namespace\Class']=true if it's absolute (it uses the full path) 972 | */ 973 | ${{tempname}}__arrautoloadAbsolute = [ 974 | {{includeabsolute}} 975 | ]; 976 | ${{tempname}}__arrautoloadAbsoluteExt = [ 977 | {{includeabsoluteext}} 978 | ]; 979 | 980 | /** 981 | * @param $class_name 982 | * @throws Exception 983 | */ 984 | function {{tempname}}__auto($class_name) 985 | { 986 | // it's called only if the class is not loaded. 987 | set_exception_handler('autoloadone_exception_handler'); 988 | $p=strrpos($class_name,'\\'); 989 | if($p!==false) { 990 | $ns=substr($class_name,0,$p); 991 | $cls=substr($class_name,$p+1); 992 | } else { 993 | $ns=''; 994 | $cls=$class_name; 995 | } 996 | // special cases 997 | if (isset($GLOBALS['{{tempname}}__arrautoloadCustom'][$class_name])) { 998 | {{tempname}}__loadIfExists($class_name,$GLOBALS['{{tempname}}__arrautoloadCustom'][$class_name] 999 | , $class_name,'{{tempname}}__arrautoloadCustomCommon'); 1000 | restore_exception_handler(); 1001 | return; 1002 | } 1003 | // normal (folder) cases 1004 | if (isset($GLOBALS['{{tempname}}__arrautoload'][$ns])) { 1005 | {{tempname}}__loadIfExists($class_name,$GLOBALS['{{tempname}}__arrautoload'][$ns] . '/' . $cls . '.php' 1006 | , $ns,'{{tempname}}__arrautoloadCommon'); 1007 | restore_exception_handler(); 1008 | return; 1009 | } 1010 | if(!class_exists($class_name)) { 1011 | throw new RuntimeException("AutoLoadOne Error: No file found for class [$class_name]"); 1012 | } 1013 | restore_exception_handler(); 1014 | } 1015 | 1016 | /** 1017 | * We load the file. 1018 | * @param string $className the name of the class 1019 | * @param string $filename the filename to load 1020 | * @param string $key key of the class it could be the full class name or only the namespace 1021 | * @param string $arrayName [optional] it's the name of the arrayname used to replaced |n| values. 1022 | * @throws Exception 1023 | */ 1024 | function {{tempname}}__loadIfExists($className,$filename, $key,$arrayName='') 1025 | { 1026 | if (isset($GLOBALS['{{tempname}}__arrautoloadAbsolute'][$key])) { 1027 | $fullFile = $filename; // it's an absolute path 1028 | if (strpos($fullFile, '../') === 0) { // Or maybe, not, it's a remote-relative path. 1029 | $oldDir = getcwd(); // we copy the current url 1030 | chdir(__DIR__); 1031 | } 1032 | } elseif (isset($GLOBALS['{{tempname}}__arrautoloadAbsoluteExt'][$key])) { 1033 | $fullFile = {{tempname}}__replaceCurlyVariable($filename, $arrayName); // it's an absolute external path 1034 | } else { 1035 | $fullFile = __DIR__ . '/' . {{tempname}}__replaceCurlyVariable($filename, $arrayName); // it's relative to this path 1036 | } 1037 | if ((@include $fullFile) === false) { 1038 | if ($GLOBALS['autoloadone__debug']) { 1039 | throw new RuntimeException("AutoLoadOne Error: Loading file [$fullFile] for class [$className]"); 1040 | } 1041 | throw new RuntimeException("AutoLoadOne Error: No file found for class [$className]"); 1042 | } 1043 | if (isset($oldDir)) { 1044 | chdir($oldDir); 1045 | } 1046 | } 1047 | function {{tempname}}__replaceCurlyVariable($string,$arrayName) { 1048 | if(strpos($string,'|')===false) { 1049 | return $string; 1050 | } // nothing to replace. 1051 | return preg_replace_callback('/\\|\s?(\w+)\s?\\|/u', static function ($matches) use ($arrayName) { 1052 | $item = is_array($matches) ? substr($matches[0], 1, -1) 1053 | : substr($matches, 1, -1); 1054 | return $GLOBALS[$arrayName][$item]; 1055 | }, $string); 1056 | } 1057 | function autoloadone_exception_handler($exception) { 1058 | $isCli=!http_response_code(); 1059 | $r="Uncaught Exception: [".get_class($exception)."] code:".$exception->getCode()."\n".$exception->getMessage()."\n"; 1060 | if ($GLOBALS['autoloadone__debug']) { 1061 | $r .= "Trace:\n"; 1062 | foreach ($exception->getTrace() as $error) { 1063 | // we remove all trace pointing to this file. 1064 | if (isset($error['file'])) { 1065 | if(strpos($error['file'], __FILE__) === false) { 1066 | $r .= @$error['file'] . '[' . @$error['line'] . ']' . ' function:' . @$error['function'] . '(' 1067 | .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' :@$error['args']) 1068 | . "\n"; 1069 | } else { 1070 | $r .= '(nofile)' . '[' . @$error['line'] . ']' . ' function:' . @$error['function'] . '(' 1071 | .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' :@$error['args']) 1072 | . "\n"; 1073 | } 1074 | } 1075 | } 1076 | } 1077 | if(!$isCli) { 1078 | $r=str_replace(["\n",'[',']'],["
","[","]"],$r); 1079 | } 1080 | echo $r; 1081 | die(1); 1082 | } 1083 | 1084 | 1085 | 1086 | spl_autoload_register(static function ($class_name) { 1087 | {{tempname}}__auto($class_name); 1088 | }); 1089 | // {{autorun_flag}} 1090 | {{autorun}} 1091 | 1092 | EOD; 1093 | $includeNotCompressed = $this->createArrayPHP($namespaces); 1094 | $customNotCompressed = $this->createArrayPHP($namespacesAlt); 1095 | $commonAbsolute = $this->compress($namespacesAlt); 1096 | //$commonNameSpace=$this->compress($namespaces); 1097 | $commonNameAbs = $this->compress($namespaces); 1098 | $custom = $this->createArrayPHP($namespacesAlt); 1099 | $htmlCommonAbsolute = $this->createArrayPHP($commonAbsolute); 1100 | $include = $this->createArrayPHP($namespaces); 1101 | $htmlCommonNameAbs = $this->createArrayPHP($commonNameAbs); 1102 | $includeAbsolute = ''; 1103 | $includeAbsoluteExt = ''; 1104 | foreach ($pathAbsolute as $k => $v) { 1105 | if ($v) { 1106 | $includeAbsolute .= "\t'$k' => true,\n"; 1107 | } 1108 | } 1109 | foreach ($pathAbsoluteExt as $k => $v) { 1110 | if ($v) { 1111 | $includeAbsoluteExt .= "\t'$k' => true,\n"; 1112 | } 1113 | } 1114 | $includeAbsolute = rtrim($includeAbsolute, ",\n"); 1115 | $includeAbsoluteExt = rtrim($includeAbsoluteExt, ",\n"); 1116 | $autorun = ''; // 1117 | $excludePathArr = str_replace(["\n", "\r"], '', $this->excludePath); 1118 | $excludePathArr = explode(',', $excludePathArr); 1119 | foreach ($excludePathArr as $key => $item) { 1120 | $excludePathArr[$key] = trim($item); 1121 | } 1122 | if (_AUTOLOAD_COMPOSERJSON) { 1123 | foreach ($autoruns as $v) { 1124 | if ($this->inExclusion(dirname($v), $excludePathArr)) { 1125 | $autorun .= "// @include __DIR__.'$v'; // excluded by path\n"; 1126 | } else { 1127 | $autorun .= "@include __DIR__.'$v';\n"; 1128 | } 1129 | } 1130 | } 1131 | // 1024 is the memory used by code, *1.3 is an overhead, usually it's mess. 1132 | $this->statByteUsedCompressed = (strlen($include) + strlen($includeAbsolute) + strlen($includeAbsoluteExt) + strlen($custom)) * 1.3 + 1024; 1133 | $this->statByteUsed = 1134 | (strlen($includeNotCompressed) + strlen($htmlCommonAbsolute) + strlen($htmlCommonNameAbs) + 1135 | strlen($includeAbsolute) + strlen($includeAbsoluteExt) + strlen($customNotCompressed)) * 1.3 + 1024; 1136 | $template = str_replace([ 1137 | '{{custom}}', 1138 | '{{include}}', 1139 | '{{customCommon}}', 1140 | '{{includeabsolute}}', 1141 | '{{includeabsoluteext}}', 1142 | '{{includeCommon}}', 1143 | '{{tempname}}', 1144 | '{{autorun}}', 1145 | '{{autorun_flag}}', 1146 | '{{version}}', 1147 | '{{extension}}', 1148 | '{{date}}' 1149 | ], [ 1150 | $custom, 1151 | $include, 1152 | $htmlCommonAbsolute, 1153 | $includeAbsolute, 1154 | $includeAbsoluteExt, 1155 | $htmlCommonNameAbs, 1156 | substr(uniqid('s'), 0, 6), // we don't need a long name. 1157 | $autorun, 1158 | _AUTOLOAD_COMPOSERJSON ? 1159 | 'Autorun: this file was created using _AUTOLOAD_COMPOSERJSON=true' 1160 | : 'Autorun: this file was created using _AUTOLOAD_COMPOSERJSON=false so autorun is disabled', 1161 | $this::VERSION, 1162 | $this->extension, 1163 | date('Y/m/d H:i:s') 1164 | ], $template); 1165 | if ($this->savefile) { 1166 | $ok = @file_put_contents($file, $template); 1167 | if ($ok) { 1168 | $this->addLog("File $file generated", 'info'); 1169 | $ok = $this->saveParam(); 1170 | if ($ok === false) { 1171 | $this->addLog('Unable to save configuration file ' . $file . 1172 | '. It is not obligatory.', 'warning'); 1173 | } 1174 | } else { 1175 | $this->addLog("Unable to write file $file. Check the folder and permissions. You could write it manually.", 1176 | 'error'); 1177 | $this->statError++; 1178 | } 1179 | $this->addLog('', 'info'); 1180 | } 1181 | return $template; 1182 | } 1183 | 1184 | private function createArrayPHP($array): string 1185 | { 1186 | $result = ''; 1187 | foreach ($array as $k => $v) { 1188 | if (is_numeric($k)) { 1189 | $result .= "\t$k => '$v',\n"; 1190 | } else { 1191 | $result .= "\t'$k' => '$v',\n"; 1192 | } 1193 | } 1194 | return rtrim($result, ",\n"); 1195 | } 1196 | 1197 | /** 1198 | * It compresses the paths 1199 | * 1200 | * @param string[] $paths An associative array with the paths 1201 | * 1202 | * @return array 1203 | */ 1204 | public function compress(array &$paths): array 1205 | { 1206 | if (!$this->compression) { 1207 | return []; 1208 | } 1209 | $arr = $paths; 1210 | $foundIndex = 0; 1211 | $found = []; 1212 | foreach ($arr as $item) { 1213 | if (strlen($item) > 10) { // we compress path of at least 20 characters. 1214 | $maxcount = 0; 1215 | $last = strlen($item); 1216 | for ($index = $last; $index > 10; $index--) { // we compress up to 20 characters. 1217 | $sum = 0; 1218 | $findme = substr($item, 0, $index); 1219 | foreach ($arr as $item2) { 1220 | if (strpos($item2, $findme) === 0) { 1221 | $sum += $index; // it counts the number of characters 1222 | } 1223 | } 1224 | if ($sum > $maxcount && 1225 | $sum >= $index * 2) { // it must save at least x2 the number of characters compressed 1226 | $maxcount = $sum; 1227 | $foundIndex++; 1228 | $foundKey = '|' . $foundIndex . '|'; 1229 | // replace 1230 | foreach ($arr as $k2 => $item2) { 1231 | if (strpos($item2, $findme) === 0) { 1232 | $arr[$k2] = str_replace($findme, $foundKey, $item2); 1233 | /** @noinspection PhpUnusedLocalVariableInspection */ 1234 | $sum += $index; // it counts the number of characters 1235 | } 1236 | } 1237 | $found[$foundIndex] = $findme; 1238 | } 1239 | } 1240 | } 1241 | } 1242 | $paths = $arr; 1243 | return $found; 1244 | } 1245 | 1246 | /** 1247 | * @return bool|int 1248 | */ 1249 | private function saveParam() 1250 | { 1251 | if (!_AUTOLOAD_SAVEPARAM) { 1252 | return false; 1253 | } 1254 | $param = []; 1255 | $currentPath = $this->dirNameLinux(getcwd(), false); 1256 | $param['rooturl'] = $this->rooturl === $currentPath ? '.' : $this->rooturl; 1257 | $param['fileGen'] = $this->fileGen === $currentPath ? '.' : $this->fileGen; 1258 | $param['savefile'] = $this->savefile; 1259 | $param['compression'] = $this->compression; 1260 | $param['savefileName'] = $this->savefileName; 1261 | $param['excludeNS'] = $this->excludeNS; 1262 | $param['excludePath'] = $this->excludePath; 1263 | $param['externalPath'] = $this->externalPath; 1264 | $fullPHP = @file_get_contents($this->savefileName); 1265 | if ($fullPHP === false) { 1266 | return false; 1267 | } 1268 | $a1 = strpos($fullPHP, '/* -- CONFIG START HERE --'); 1269 | if ($a1 === false) { 1270 | return false; 1271 | } 1272 | $a1 += strlen('/* -- CONFIG START HERE --'); 1273 | $a2 = strpos($fullPHP, "\n-- CONFIG END HERE -- */", $a1); 1274 | if ($a2 === false) { 1275 | return false; 1276 | } 1277 | $txt = substr($fullPHP, 0, $a1) . "\n" 1278 | . json_encode($param, JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE) . 1279 | substr($fullPHP, $a2); 1280 | return @file_put_contents($this->savefileName, $txt); 1281 | } 1282 | 1283 | private function evaluation($percentage): string 1284 | { 1285 | switch (true) { 1286 | case $percentage === 0: 1287 | return 'How?'; 1288 | case $percentage < 10: 1289 | return 'Awesome'; 1290 | case $percentage < 25: 1291 | return 'Good'; 1292 | case $percentage < 40: 1293 | return 'Acceptable'; 1294 | case $percentage < 80: 1295 | return 'Bad.'; 1296 | } 1297 | return 'The worst'; 1298 | } 1299 | 1300 | public function render(): void 1301 | { 1302 | if ($this->debugMode) { 1303 | ob_clean(); 1304 | } 1305 | if (PHP_SAPI === 'cli') { 1306 | $t2 = microtime(true); 1307 | echo "\n" . (round(($t2 - $this->t1) * 1000) / 1000) . " sec. Finished\n"; 1308 | } elseif (!$this->logged) { 1309 | $web = <<<'LOGS' 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | AutoLoadOneGenerator Login Screen 1316 | 1317 | 1318 | LOGS; 1319 | $web .= $this->bootstrapcss(); 1320 | $web .= <<<'LOGS' 1321 | 1322 | 1323 | 1324 |
1325 |
1326 |
1327 |
1328 |
1329 |
1330 |
1331 |

Login Screen

1332 |
1333 |
1334 |
1335 |
1336 |
1337 | 1338 |
1339 |
1340 | 1341 |
1342 |
1343 |
1344 |
1345 | 1346 |
1347 |
1348 | 1349 |
1350 |
1351 |
1352 |
1353 | 1354 |
1355 |
1356 |
1357 |
1358 |
1359 |
1360 |
1361 |
1362 |
1363 | 1364 | 1365 | 1366 | LOGS; 1367 | echo $web; 1368 | } else { 1369 | $web = <<<'TEM1' 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | AutoLoadOneGenerator {{version}} 1376 | 1377 | 1378 | 1379 | TEM1; 1380 | $web .= $this->bootstrapcss(); 1381 | $web .= <<<'TEM1' 1382 | 1383 | 1384 | 1385 |
1386 |
1387 |
1388 |
1389 |
1390 |
1391 |
1392 |

AutoLoadOneGenerator {{version}}.

1393 |
1394 |
1395 |
1396 |
1397 |
1398 | 1399 |     1400 | 1401 |
1402 |
1403 |
1404 |
1405 | 1406 |
1407 |
1408 | 1410 | The root folder to scan files
1411 | Extension scanned: {{extension}}
1412 | PHP files that contain the comment @noautoload are ignored
1413 | The path used here is case sensitive, even in Windows.
1414 | PHP files that don't contain a class/interface are ignored.
1415 | {{autorun_enable}}
1416 | Examples: 1417 |
Absolute paths: c:\root\folder, 1418 | c:/root/folder, /root/folder
1419 | Relative paths: folder/other, folder\other
1420 |
1421 |
1422 |
1423 |
1424 | 1427 |
1428 |
1429 | 1432 | Full or relative path (local file) where the autoload{{extension}} 1433 | will be generated.
1434 | Example:
/etc/httpd/web,c:\apache\htdoc
1435 | Note: This path is also used to determine the relativity of the includes
1436 |
1437 |
1438 | 1439 |
1440 |
1441 | 1444 |
1445 |
1446 | 1448 |
1449 | 1451 |
1452 | The PHP file that we want to generate. You could generate it manually (copy and paste the result)
1453 |
1454 |
1455 |
1456 |
1457 | 1460 |
1461 |
1462 | 1463 | Folder(s) of the external library without trailing "/" separated by comma or in a new line.
1464 | The folders will be stored as an absolute path however, it's possible to use a relative path.
1465 | Example:
1466 | C:\temp\folder
1467 | /folder/somefolder
1468 | ../../mapache-commons\lib (relative path to the result folder)
1469 |
1470 |
1471 |
1472 | 1475 |
1476 |
1477 | 1478 | Namespaces without trailing "/" separated by comma or in a new line. It includes local and external folders. 1479 |
Example:
1480 | /mynamespace,/mynamespace2/subnamespace
1481 |
1482 |
1483 |
1484 | 1485 |
1486 |
1487 | 1488 | The relative path without trailing "/" separated by comma or in a new line. 1489 | You could also use the wildcard (*). 1490 |
Example:
1491 | vendor/pchart/class Exclude the folder but not the subfolders.
1492 | /path* for any folder that starts with "/path*,"path/folder".."
1493 | */path for any folder that ends with "*/path"
1494 |
1495 |
1496 |
1497 | 1498 |
1499 |
1500 |
1501 | 1505 | 1506 |
1507 |
1508 |
1509 |
1510 |
1511 |
1512 | 1518 | 1519 |
1520 |
1521 |
1522 |
1523 |
1524 | 1525 |
1526 |
1527 |
{{log}}
1528 |
1529 |
1530 |
1531 |
1532 | 1533 |
1534 |
1535 |
{{logstat}}
1536 |
1537 |
1538 |
1539 |
1540 | 1541 |
1542 |
1543 | 1544 |
1545 |
1546 |
1547 |
1548 | 1549 |
1550 |
1551 | 1552 |
1553 |
1554 |
1555 |
1556 | 1557 |     1558 | 1559 |
1560 |
1561 | 1562 | 1563 |
1564 | 1567 |
1568 |
1569 |
1570 |
1571 |
1572 | 1573 | 1574 | 1575 | TEM1; 1576 | $web = str_replace([ 1577 | '{{rooturl}}', 1578 | '{{autorun_enable}}', 1579 | '{{fileGen}}', 1580 | '{{extension}}', 1581 | '{{excludeNS}}', 1582 | '{{externalPath}}', 1583 | '{{excludePath}}', 1584 | '{{savefile}}', 1585 | '{{savefileName}}', 1586 | '{{stop}}', 1587 | '{{compression}}', 1588 | '{{log}}', 1589 | '{{logstat}}', 1590 | '{{version}}', 1591 | '{{result}}' 1592 | ], [ 1593 | $this->rooturl, 1594 | _AUTOLOAD_COMPOSERJSON ? '_AUTOLOAD_COMPOSERJSON=true Composer.json autorun is considered. PHP files that contain the comment "@autorun" are executed (even if they don\'t have a class)
1595 | PHP files that contain the comment "@autorun first" are executed with priority
' 1596 | : '_AUTOLOAD_COMPOSERJSON=false. @autorun flag and composer.json autorun are not considered', 1597 | $this->fileGen, 1598 | $this->extension, 1599 | $this->excludeNS, 1600 | $this->externalPath, 1601 | $this->excludePath, 1602 | ($this->savefile) ? 'checked' : '', 1603 | $this->savefileName, 1604 | ($this->stop) ? 'checked' : '', 1605 | ($this->compression) ? 'checked' : '', 1606 | $this->log, 1607 | $this->logStat, 1608 | $this::VERSION, 1609 | $this->result 1610 | ], $web); 1611 | $this->cli = "php autoloadone.php -folder \"$this->rooturl\" -filegen \"$this->fileGen\" -save "; 1612 | $tmp = ($this->compression ? 'yes' : 'no'); 1613 | $this->cli .= "-compression $tmp "; 1614 | $tmp = str_replace(["\n", "\r"], '', $this->excludeNS); 1615 | $this->cli .= "-excludens \"$tmp\" "; 1616 | $tmp = str_replace(["\n", "\r"], '', $this->externalPath); 1617 | $this->cli .= "-externalpath \"$tmp\" "; 1618 | $tmp = str_replace(["\n", "\r"], '', $this->excludePath); 1619 | $this->cli .= "-excludepath \"$tmp\""; 1620 | $web = str_replace('{{cli}}', $this->cli, $web); 1621 | $t2 = microtime(true); 1622 | $ms = (round(($t2 - $this->t1) * 1000) / 1000) . ' sec.'; 1623 | $web = str_replace('{{ms}}', $ms, $web); 1624 | echo $web; 1625 | } 1626 | } 1627 | 1628 | public function bootstrapcss(): string 1629 | { 1630 | return << 1632 | html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.in{opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;opacity:0;line-break:auto}.tooltip.in{opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} 1633 | 1634 | BOOTS; 1635 | } 1636 | } // end class AutoLoadOne 1637 | if (_AUTOLOAD_SELFRUN || PHP_SAPI === 'cli') { 1638 | $auto = new AutoLoadOne(); 1639 | $auto->init(); 1640 | $auto->process(); 1641 | $auto->render(); 1642 | } 1643 | 1644 | // @noautoload 1645 | /* 1646 | * @noautoload 1647 | */ 1648 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Escuela de Formación Técnica Chile SPA 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PHP Auto Include AutoLoadOne Generator 2 | 3 | AutoloadOne is a program that generates an autoload class (Auto Include) for PHP that is project specific. This class is useful to use classes on code without calling each "include" manually. It is a direct alternative to Composer's autoload, but it works differently. 4 | Composer's autoload, scans the folders during runtime, while this library only scans the folder once, and it stores the result. 5 | 6 | [![Packagist](https://img.shields.io/packagist/v/eftec/autoloadone.svg)](https://packagist.org/packages/eftec/autoloadone) 7 | [![Total Downloads](https://poser.pugx.org/eftec/autoloadone/downloads)](https://packagist.org/packages/eftec/autoloadone) 8 | [![Maintenance](https://img.shields.io/maintenance/yes/2025.svg)]() 9 | [![composer](https://img.shields.io/badge/composer-%3E2.0-blue.svg)]() 10 | [![php](https://img.shields.io/badge/php-7.4-green.svg)]() 11 | [![php](https://img.shields.io/badge/php-8.4-green.svg)]() 12 | [![CocoaPods](https://img.shields.io/badge/docs-60%25-yellow.svg)]() 13 | 14 | 15 | 16 | Contrary to other alternatives, it supports the easiest way to autoload classes using PHP without sacrifice performance. 17 | How it works?. AutoLoadOne pre-calculates every class of a project and generates a single autoload.php (or the name 18 | indicated) file that it's ready to use. You don't need a specific folder, structure or rule to use it. Just generate 19 | the autoload file **class**, **include,** and you are ready to load any class (even classes without a namespace, classes in the 20 | namespace in different folders, multiple classes defined in a single file...). 21 | 22 | AutoLoadOne is a replacement to Composer's Autoload, rendering obsolete the use of psr-0 or psr-4. 23 | 24 | 25 | > NOTE: If you run the dev-distro, then you must exclude the example/ folder because it contains @autorun tags. 26 | 27 | **Last Update 26 Jan, 2023** 28 | 29 | > "Universal Autoloading classes in PHP, any class, any time!" 30 | 31 | ## Table of Contents 32 | 33 | 34 | * [PHP Auto Include AutoLoadOne Generator](#php-auto-include-autoloadone-generator) 35 | * [Table of Contents](#table-of-contents) 36 | * [How it Works?](#how-it-works) 37 | * [When I should re-run AutoLoadOne?](#when-i-should-re-run-autoloadone) 38 | * [Composer Autoload features:](#composer-autoload-features-) 39 | * [AutoLoadOne extended features:](#autoloadone-extended-features-) 40 | * [Getting started](#getting-started) 41 | * [Usage using the CLI](#usage-using-the-cli) 42 | * [Usage via code](#usage-via-code) 43 | * [Usage (generate code via Web)](#usage--generate-code-via-web-) 44 | * [Usage (via cli)](#usage--via-cli-) 45 | * [Usage of the generated file (autoload.php)](#usage-of-the-generated-file--autoloadphp-) 46 | * [Note](#note) 47 | * [Autorun](#autorun) 48 | * [Extension](#extension) 49 | * [Statistic and optimization](#statistic-and-optimization) 50 | * [How can I reduce the map?](#how-can-i-reduce-the-map) 51 | * [Test](#test) 52 | * [AutoLoadOne](#autoloadone) 53 | * [Optimized AutoLoadOne](#optimized-autoloadone) 54 | * [Composer's autoload (using optimize)](#composers-autoload--using-optimize-) 55 | * [Why the size matter?.](#why-the-size-matter) 56 | * [Lookup usage?](#lookup-usage) 57 | * [How many lookup are called?.](#how-many-lookup-are-called) 58 | * [TEST II (Magento 2.2.3)](#test-ii--magento-223-) 59 | * [Let's say we have 1000 concurrent users](#lets-say-we-have-1000-concurrent-users) 60 | * [Compression and Magento.](#compression-and-magento) 61 | * [Code execution.](#code-execution) 62 | * [Benchmark](#benchmark) 63 | * [Security](#security) 64 | * [Composer.json](#composerjson) 65 | * [Version](#version) 66 | * [Todo](#todo) 67 | 68 | 69 | ## How it Works? 70 | 71 | :one: 72 | Run AutoLoadOne.php as CLI or as Web. 73 | :two: 74 | AutoLoadOne will generate a single file called autoload.php (or the name indicated) based in your project. 75 | For the record, it takes mere 1.5 seconds to scan WordPress and yes, it is compatible with WordPress. 76 | :three: 77 | Include the generated file (ex: autoload.php) in your project code and start using it. 78 | 79 | ## When I should re-run AutoLoadOne? 80 | 81 | You don't need to run it again if you are adding a new class with the same namespace in the same folder. 82 | 83 | Also, you could edit autoload.php manually by adding more classes and namespaces. 84 | 85 | Or you could run AutoLoadOne.php again and replace the old generated file. 86 | 87 | ## Composer Autoload features: 88 | :black_square_button: One class per file 89 | :black_square_button: One Namespace per file. 90 | :black_square_button: The file must have a namespace. 91 | :black_square_button: It requires composer. 92 | :black_square_button: It validates the file each file the class is loaded per user. 93 | :black_square_button: The structure of the folders should be pre-defined. 94 | :white_check_mark: Support CLI 95 | 96 | ## AutoLoadOne extended features: 97 | :white_check_mark: One or Many classes per file. 98 | :white_check_mark: One or many namespaces per file. 99 | :white_check_mark: The file could contain optionally a namespace. 100 | :white_check_mark: It only requires PHP 101 | :white_check_mark: The folder structure and classes are validated once. 102 | :white_check_mark: If you add a class that shares a previous folder and uses the previous namespace, then you don't need to run the generator. 103 | :white_check_mark: You could use any structure of folder. It's recommended to use the same folder for the same namespace, 104 | but it's not a requisite. 105 | :white_check_mark: Support CLI and Web-UI. 106 | :white_check_mark: It doesn't require APCU, lock files or cache. 107 | :white_check_mark: It´s compatible with practically any project, including a project that uses Composer's autoload. 108 | :white_check_mark: It's compatible with PSR-0, PSR-4, and practically any specification, since you don't need to use 109 | any special configuration or standard. 110 | :white_check_mark: It allows libraries outside the project folder. 111 | For example /someuser/myproject/ allows to include libraries from the folder /otheruser/library/ 112 | :white_check_mark: It doesn't require APCU, lock files or cache. 113 | :white_check_mark: It has a minimum impact on runtime. 114 | :white_check_mark: It allows compression without impacting the runtime. 115 | 116 | ## Getting started 117 | 118 | You could run directly AutoLoadOne.php (via web of via CLI), or you could create a file that calls it. 119 | 120 | ## Usage using the CLI 121 | 122 | You must execute it in the root folder, and it will generate a file called autoload.php. 123 | 124 | ```shell 125 | php AutoLoadOne.php -generate 126 | ``` 127 | > If AutoLoadOne.php is not in the same folder then you can copy it, or set the path to use it 128 | > php /somefolder/AutoLoadOne.php -generate 129 | > There are more commands that you can use but -generate is the basic and out-the-box experience. 130 | 131 | 132 | ## Usage via code 133 | 134 | * Copy AutoLoadOne.php in the root folder (recommended) of your project 135 | * Execute it directly or 136 | * Create the next PHP file (in the root folder) and execute it. 137 | 138 | ```php 139 | init(); 148 | $auto->process(); 149 | $auto->render(); 150 | ``` 151 | 152 | 153 | 154 | ## Usage (generate code via Web) 155 | 156 | :one: 157 | Copy the file **autoloadone.php** somewhere. 158 | 159 | :two: 160 | For security, you could edit the first lines of the class **autoloadone.php**. Change the user, password and autoloadenter if it's required. 161 | 162 | ```php 163 | 168 | ``` 169 | :three: 170 | Start the browser 171 | 172 | Enter your user and password. If _AUTOLOAD_ENTER is true then you are logged automatically. 173 | 174 | ![autoloadone login](https://github.com/EFTEC/AutoLoadOne/blob/master/doc/login.jpg "Autoloadone logon") 175 | 176 | 177 | :four: 178 | Select the folder to scan, then select the file to generate and finally press the button GENERATE. 179 | 180 | ![autoloadone screen](https://github.com/EFTEC/AutoLoadOne/blob/master/doc/screen.jpg "Autoloadone screen") 181 | 182 | * Root Folder : The folder to scan. 183 | * Generated File: The full path (local) of the autoload.php. Even if you are not using the generation of file, you must specify it, because the program uses for determine the relative path. 184 | * Save File: If you check it, then generate file will be generated. If PHP doesn't have access to save the file, then you could copy the code manually (screen Result) 185 | * Excluded Namespace : Namespace excluded of mapping. 186 | * Excluded Map : Paths excluded to scan (they are not recursives) 187 | 188 | 189 | 190 | :five: 191 | The result should look this: 192 | 193 | ![autoloadone screen2](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/screen2.jpg "Autoloadone screen2") 194 | 195 | ## Usage (via cli) 196 | 197 | ![autoloadone cli](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/cli1.jpg) 198 | 199 | In the shell, browser to the folder where you want to generate the code and run the next command 200 | 201 | Commands available : 202 | 203 | * current (scan and generates files from the current folder) 204 | * folder (folder to scan) 205 | * filegen (folder where autoload.php will be generate) 206 | * filename (name of the filename to generate by default its autoload.php) 207 | * save yes/no (save the file to generate).This option is required. 208 | * excludens (namespace excluded) 209 | * excludepath (path excluded) 210 | * externalpath (include an external path). An external path is a library that lives outside the project folder 211 | 212 | 213 | > Example: php autoloadone.php -folder folder\scan -filegen folder\whereautoload\ -save yes 214 | 215 | 216 | ``` 217 | php folder/located/autoloadone.php -current 218 | ``` 219 | 220 | 221 | 222 | ## Usage of the generated file (autoload.php) 223 | 224 | :one: 225 | include the generated file by the previous step. ex: autoload.php 226 | 227 | ```php 228 | 232 | ``` 233 | and that's it!. 234 | 235 | In the /test folder you could find some example to try. 236 | 237 | > Note:Finally, you could delete the file autoloadone.php if you wish for. 238 | 239 | ## Note 240 | 241 | > If you want to exclude a class, you could add the namespace to the exclude list, or you could skip a folder. 242 | > Also, if a class has the next comment, it's excluded automatically: 243 | 244 | ```php 245 | 248 | ``` 249 | 250 | 251 | ## Autorun 252 | 253 | > If you want to execute (run) a php file, then you could add the next comment. 254 | 255 | ```php 256 | 259 | ``` 260 | 261 | > You could also set priority to the execution by adding a comment with @autorun first 262 | 263 | ```php 264 | 267 | ``` 268 | 269 | 270 | > If you find the error: Parse error: syntax error, in on line 000. Then some php files scanned have some syntax error. The solution is to fix the problem or to exclude the whole folder. 271 | > How to find the file with error? You could run the page with the debug flag: autoloadone.php?debug=1 272 | 273 | ## Extension 274 | 275 | You could change the extension (by default it is .php) by running the next command 276 | 277 | ```php 278 | $auto=new AutoLoadOne(); 279 | $auto->extension='.php'; // it's not required. By default it's .php 280 | ``` 281 | 282 | ## Statistic and optimization 283 | 284 | This library generates the next statistics. **The objective is simple, you must reduce (in the possible), the size of the map. The smaller the map, then the better.** 285 | 286 | ``` 287 | Number of Classes: 42 288 | Number of Namespaces: 12 289 | Number of Maps: 16 290 | Number of PHP Files: 50 291 | Number of PHP Autorun: 3 292 | Number of conflicts: 0 293 | Ratio map per file: 32% Acceptable (less is better. 100% means one map/one file)< 294 | Ratio map per classes: 38.1% Acceptable (less is better. 100% means one map/one class) 295 | Map size: 3.1 kbytes (less is better, it's an estimate of the memory used by the map) 296 | ``` 297 | Example of the screen: 298 | 299 | ![autoloadone screen](doc/screen3.jpg "Autoloadone screen") 300 | 301 | In the log file: 302 | * White means a normal operation 303 | * Yellow means a warning. For example, some file was excluded. 304 | * Green means an optimization. 305 | * Blue means an important operation was done succesfully. 306 | * Red is an error that must be attended. 307 | 308 | 309 | ### How can I reduce the map? 310 | 311 | * You could use one class / one file, also, the class must have the same name as the filename. **The name of the namespace is irrelevant** 312 | > Example Customer.php and class Customer { } 313 | * Grouping classes of the same namespace in the same folder. So, the library could map the whole namespace as a single folder instead of map per file/class. 314 | * * :file_folder: repository (_repositoryns\\_) 315 | * * * :page_with_curl: MyClass.php _repositoryns\\MyClass_ 316 | * * * :page_with_curl: MyClass2.php _repositoryns\\MyClass2_ 317 | * * :file_folder: model (_namespace_model\\_) 318 | * * * :page_with_curl: MyClass.php _namespace_model\\MyClass_ 319 | * * * :page_with_curl: MyClass2.php _namespace_model\\MyClass2_ 320 | * You could remove (:scissors:) namespaces and folders that you don't need it. Some namespaces and folders are used by the system however, they don't require to be autoloaded because they are loaded manually (for example, most libraries load 321 | its own include manually) 322 | * * :file_folder: somelibrary 323 | * * * :page_with_curl: MainLibraryClass.php 324 | * * * :page_with_curl: IncludesLibrary.php :scissors: 325 | * * * :file_folder: somelibrary :scissors: 326 | * * * * :page_with_curl: MoreIncludesLibrary.php :scissors: 327 | * * * * :page_with_curl: MoreIncludesLibrary.php :scissors: 328 | * You could also exclude a file/class/include/strut by adding the tag **@noautoload** 329 | ```php 330 | /* @noautoload */ 331 | class Someclass { 332 | 333 | } 334 | ``` 335 | * * :file_folder: somelibrary 336 | * * * :page_with_curl: MainLibraryClass.php 337 | * * * :page_with_curl: IncludesLibrary.php **@noautoload** :scissors: 338 | * Only files with the extension **.php** (or the defined extension) are loaded. So, Files **.inc**, **.phpinclude** or similar, are automatically excluded (:scissors:). 339 | * * :file_folder: somelibrary 340 | * * * :page_with_curl: file.inc.php (inc.php is included but .inc) 341 | * * * :page_with_curl: IncludesLibrary.inc :scissors: 342 | * * * :page_with_curl: MoreIncludesLibrary.inc :scissors: 343 | * Another optimization is to write **many classes in the same file**. This library even allows to use multi classes / multi namespaces in the same file. So, it's possible to create a bulk version of a project. 344 | * * :page_with_curl: AllClassesOneFile.php 345 | * * * namespace _repositoryns\\_ 346 | * * * * class _repositoryns\\MyClass_ 347 | * * * * class _repositoryns\\MyClass3_ 348 | * * * namespace _anotherns\\MyClass2_ 349 | * * * * class _anotherns\\MyClass2_ 350 | 351 | ## Test 352 | 353 | I created an empty blog on Laravel. The project is empty but the default libraries and components. 354 | 355 | 356 | Files: 357 | 358 | 7545 files in total. (including files that aren't PHP files) 359 | 360 | ### AutoLoadOne 361 | 362 | Number of Classes: 5565 363 | Number of Namespaces: 765 364 | Number of Maps: 2305 (you want to reduce it) 365 | Number of PHP Files: 6302 366 | Number of PHP Autorun: 0 367 | Number of conflicts: 31 368 | 369 | File generated: 370 | 371 | autoload.php 231kb. 372 | 373 | ### Optimized AutoLoadOne 374 | 375 | I separated PHPUnit and Mockery from the project. Why? Both libraries are for unit test. 376 | 377 | excluded namespace = /vendor/phpunit/*,/vendor/mockery/* 378 | 379 | 380 | Number of Classes: 5565 381 | Number of Namespaces: 765 382 | Number of Maps: 1535 (you want to reduce it) 383 | Number of PHP Files: 6302 384 | Number of PHP Autorun: 0 385 | Number of conflicts: 13 386 | 387 | File generated: 388 | 389 | autoload.php 159kb. 390 | 391 | ### Composer's autoload (using optimize) 392 | 393 | composer dump-autoload -o 394 | 395 | Generated optimized autoload files containing 3519 classes 396 | Number of Maps: 3519 (static and not-static) 397 | 398 | Autoload uses one of the next methods: 399 | 400 | * Static: (fast method, it uses more memory, and it requires to be calculated manually) 401 | 402 | 403 | autoload.php 1kb 404 | autoload_real.php 3kb 405 | autoload_static.php 468kb 406 | ClassLoader.php 14kb 407 | 408 | 409 | * Not static: (default method) 410 | 411 | 412 | autoload.php 1kb 413 | autoload_real.php 3kb 414 | autoload_namespaces.php 1kb 415 | autoload_psr4.php 4kb 416 | autoload_classmap.php 426kb 417 | 418 | 419 | ### Why the size matter?. 420 | 421 | Let's say we are calling a single webpage that uses autoload. 422 | 423 | If we use **Composer's autoload (static)**, we are also calling a file that uses **468kb** (plus other files), and this memory is loaded into the memory. It could use (an average of) **609kb of ram** per call (it's around PHP file x 1.3 x 1kb) 424 | 425 | For example, what if we have **1000 concurrent users**. It will use 609kb x 1000 = **609mb of ram** thanks to Autoload alone at the same time and with **10k concurrent users** we will use **6gb of ram** only because autoload. 426 | 427 | 428 | With **AutoLoadOne**, it is optimized to **302mb** (1000 users) or 3gb (10k users), it is for the version not optimized. 429 | 430 | AutoLoadOne tags all classes from the project, including classes that aren't defined in composer.json (unless they are excluded from the project). **Composer's autoload found only 3519 classes, while AutoLoadOne found all classes of the project (5565).** 431 | 432 | However, some classes are not required to be loaded by the project (for example unit test classes), so we could exclude those classes of the project. 433 | 434 | For example, excluding PHPUnit and Mockery reduces the use to 206mb (1000 users) or 2gb (10k users) but **we could optimize it even further.** 435 | 436 | | Concurrent Users | Composer's autoload (Optimized) | AutoLoadOne | AutoLoadOne Optimized | AutoLoadOne Optimized and compressed | 437 | |------------------|---------------------------------|-------------|-----------------------|--------------------------------------| 438 | | 1000 | 609mb | 301mb | 206mb | 130mb | 439 | | 10000 | 6gb | 3gb | 2gb | 1gb | 440 | 441 | 442 | ### Lookup usage? 443 | 444 | Let's say we have a "map" with different elements. How much time does it take to find the element of the map?. 445 | 446 | | Map size | Time (1 million of lookup sequentially) | 447 | |-----------|-----------------------------------------| 448 | | 100 | 0.271 seconds +/- | 449 | | 10.000 | 0.299 seconds +/- | 450 | | 1.000.000 | 0.376 seconds +/- | 451 | 452 | So, the size of the map/lookup time is not important. The difference between a small map (100 elements) versus a huge map (1 million of elements) is 0.1 second in total (per 1 millon of queries). 453 | However, the memory usage matters, and it could impact the performance considerably. 454 | 455 | #### How many lookup are called?. 456 | 457 | Let's say we have 10k concurrent users and each one calls 100 different classes. It means we are doing 10k x 100 = 1 million of lookup at the same time. 458 | 459 | ## TEST II (Magento 2.2.3) 460 | 461 | Magento is a huge project, it has 22k PHP files and from it, 20k are classes. 462 | 463 | AutoLoadOne: 464 | 465 | Number of Classes: 21063 466 | Number of Namespaces: 7018 467 | Number of Maps: 9473 (you want to reduce it) 468 | Number of PHP Files: 22862 469 | Number of PHP Autorun: 0 470 | Number of conflicts: 6 471 | Ratio map per file: 41.44% Bad. (less is better. 100% means one map/one file) 472 | Ratio map per classes: 44.97% Bad. (less is better. 100% means one map/one class) 473 | Map size: 1398.7 kbytes (less is better, it's an estimate of the memory used by the map) 474 | Map size Compressed: 1195.1 kbytes (less is better, it's an estimate of the memory used by the map) 475 | 476 | It takes +/- 200 seconds to generate the autoload.php 477 | 478 | In comparison, Composer's autoload (optimized) uses 479 | 480 | Generated optimized autoload files containing 11582 classes 481 | Number of Maps: 11582 classes (2.6mb of memory will be use per request per user) 482 | 483 | | Composer's autoload (optimized) | AutoLoadOne (not optimized) | AutoLoadOne (not optimized, compressed) | 484 | |---------------------------------|-----------------------------|-----------------------------------------| 485 | | 2.6mb | 1.36mb | 1.16mb | 486 | 487 | However, it is without a manual optimization. 488 | 489 | ### Let's say we have 1000 concurrent users 490 | 491 | | Concurrent Users(*) | Composer's autoload (Optimized) | AutoLoadOne (not optimized) | AutoLoadOne (compressed) | 492 | |---------------------|---------------------------------|-----------------------------|--------------------------| 493 | | 1000 | 2.6gb | 1.36gb | 1.16gb | 494 | | 10000 | 26gb | 13.6gb | 11.6gb | 495 | 496 | > (*) However, Magento wasn't create for concurrency. But, however what we are measuring is not the number of 497 | > concurrent users but the number of concurrent calls (for example rest-json, opening a page and such). 498 | 499 | ### Compression and Magento. 500 | 501 | While AutoLoadOne is able to compress the map, but it only compresses the path of it, not the namespace. It is 502 | because the compression is aimed to generate the minimum impact on the system. Magento relies on heavily in huge 503 | namespaces so the compression is unable to compress them. But still, the system is able to compress values in 15%. 504 | 505 | In general, the compression allows to shrink the values in 40-50%. 506 | 507 | 508 | ### Code execution. 509 | 510 | Both AutoLoadOne and Composer's autoload execute a code when it is initialized/executed. 511 | 512 | When AutoLoadOne generates the map, it consists of two relational arrays as follows: 513 | 514 | ```php 515 | private $_arrautoloadCustom = array( 516 | 'Magento\AdminNotification' => '/app/code/', 517 | 'Magento\Notice' => '/app/code/Developer/',... 518 | 519 | ``` 520 | 521 | While Composer's autoload generates an array that requires concatenation. 522 | 523 | ```php 524 | array( 525 | 'Magento\\AdminNotification' => $baseDir . '/app/code/MagentoActions.php', 526 | 'Magento\\Notice' => $baseDir . '/app/code/Developer/Notice.php', 527 | ``` 528 | 529 | So it requires to concatenate each map (with a variable called $baseDir). So Composer's autoload affects slighly the performance. 530 | 531 | 532 | ## Benchmark 533 | 534 | PHP 7.1.18 + Windows 10 + SSD. 535 | 536 | ![AutoloadOne Benchmark](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/speed.jpg) 537 | 538 | _More is better._ 539 | 540 | 541 | > I did a synthetic benchmark by loading different classes and reading the performance of it. Since my machine has a SSD disk then, the impact of the disk is minimum in comparison with a mechanical hard disk. 542 | > This chart compares the performance against INCLUDE. 543 | 544 | ## Security 545 | 546 | You could block the access to the file 547 | 548 | RedirectMatch 403 ^/folder/^/folder/.*$ 549 | 550 | > :heavy_exclamation_mark: While the program has a build-in-security measure, however I suggest to protect adding new layers of security such as locating the AutoLoadOne.php file 551 | outside the public/web folder. 552 | 553 | > AutoLoadOne.php is not safe (because it writes a generate file), it doesn't have access to the database, neither it allows to write any content to the file but, it could overwrite an exist code and put down a system. 554 | 555 | > However, the generate file is safe (autoload.php) and you could expose to the net. 556 | 557 | * Change the user and password and set _AUTOLOAD_ENTER to false. 558 | * Or, Don't put this file in your public website. 559 | * Or, change the filename. 560 | * Or, you could block the access to the file using .htaccess or similar. 561 | 562 | ``` 563 | RewriteEngine On 564 | RewriteBase / 565 | 566 | 567 | Order Allow,Deny 568 | Deny from all 569 | 570 | ``` 571 | 572 | * Or you could restrict the access to PHP, and it's the behaviour by default on Linux (it runs under Apache's account 573 | , most of the time as user NOBODY) 574 | 575 | 576 | ## Composer.json 577 | 578 | Commonly, this library does not need **composer.json**, and it actively ignores its configuration (because it reads the PHP 579 | source code directly). However, since 1.19, AutoLoadOne reads (optionally) part of the information of composer.json (for compatibility 580 | purpose). For example, the library **guzzlehttp** uses this feature. 581 | 582 | > Note: it requires to set the constant _AUTOLOAD_COMPOSERJSON to **true**. By default, this variable is **false**. 583 | 584 | Let's say the next file: 585 | 586 | composer.json 587 | 588 | ```json 589 | { 590 | "autoload": { 591 | "psr-4": { 592 | "blahblahblah": "some folder blahblahblah/" 593 | }, 594 | "files": ["src/functions_include.php"] 595 | } 596 | } 597 | ``` 598 | 599 | If AUTOLOAD_COMPOSERJSON is true the AutoLoadOne includes the file (or files) declared in composer.json and declared 600 | in 'files'. This file or files is added to our autoload.php as follows: 601 | 602 | Our code to generate autorun.php 603 | ```php 604 | define("_AUTOLOAD_COMPOSERJSON",true); 605 | include 'vendor/eftec/autoloadone/AutoLoadOne.php'; 606 | ``` 607 | 608 | And our autorun.php generated. 609 | ```php 610 | @include __DIR__.'/folder/jsontest/src/functions_include.php'; 611 | ``` 612 | Since it is done once (when autoload.php is generated), then this feature does not affect the performance because it 613 | reads the composer.json files once. 614 | 615 | 616 | ## Version 617 | * 1.30.1 2025-02-21 618 | * Fixed a problem with the command line. 619 | * 1.30 2025-02-21 620 | * Fixed external path. 621 | * Fixed a warning with a float value. 622 | * 1.29 2024-12-30 623 | * update dependencies. 624 | * cleaned the code 625 | * 1.28 2023-01-26 626 | * Small cleanups 627 | * 1.27 2022-08-27 628 | * [fix] fixed a problem with double mapped. 629 | * 1.26 2022-02-21 630 | * [fix] compatibility with PHP 8.1. 631 | * Raising the compatibility with php 7.1.5 and higher. If you want to use an old version, then you can use 1.25.1 632 | * Adding AutoLoadOne as a composer's binary file. 633 | * 1.25.1 2021-06-09 634 | * [fix] in autoloadone_exception_handler when the arguments of the error is not an array but a string. 635 | * 1.25 2021-04-17 636 | * A better error management. Now, it shows the line of the error in a custom trace. 637 | * 1.24 2021-04-17 638 | * [cli] Re-colored the CLI. 639 | * [code] Some cleanups in the code. 640 | * [fix] Now the generated file shows the correct hour. 641 | * 1.23 2021-02-26 642 | * Updatted the file generated. 643 | * 1.22.2 2021-02-26 644 | * fixed composer.json 645 | * 1.22.1 2021-02-26 646 | * fixed an error in the code 647 | * 1.22 2021-02-26 648 | * Another fix (it failed to save the configuration file. It failed to use the same path for multiple classes) 649 | * Configuration now it is stored in the same file autoload.php. The old file is still could be used but only if 650 | the new configuration is not set or used. 651 | * Removed part of the configuration, functions related with json and constants related with json. 652 | * 1.21.2 2021-02-15 653 | * Removed wrong "']" characters. 654 | * 1.21.1 2021-02-15 655 | * fixed composer.json (wrong number) 656 | * 1.21 2021-02-15 657 | * Fixed a big problem with linux. It used basename(), but it works diffently in Linux and Windows. Now, it works in 658 | Linux. 659 | * 1.20 2020-09-02 660 | * some cleanups. 661 | * The GUI has some examples. 662 | * _AUTOLOAD_COMPOSERJSON is indicated where it is executed or not. 663 | * 1.19.2 2020-06-05 664 | * composer.json feature is now optional (and disable by default) 665 | * 1.19.1 2020-06-05 666 | * composer.json autoload-files now it could be excluded via "exclude-path" 667 | * 1.19 2020-06-05 668 | * Added composer.json {'autoload':{'files':[]}} 669 | * 1.18 2020-04-23 670 | * Some cleaning. 671 | * The generated file is alsoc cleaned and optimized. 672 | * 1.17 2020-01-26 (optional but by default), the map is compressed. 673 | * The compression has a minimum impact on runtime, it only uses a regular expression to replace a string. 674 | * 1.16 2019-08-04 Removed git reference. It's not used. Changed the style format to PSR 675 | * 1.15 2019-06-08 Removed external css again. Now it generates the css inside the file. 676 | * 1.14 2019-06-08 Fixed some bug. Reverted to global (const arrays are not compatible with php<7.0) 677 | * 1.12 2019-05-10 Added some changes pushed. Removed css. 678 | * 1.11 2019-03-04 It allows to specify the result php file. And some cleanups. Now, /namespace/nameclass:class is not considered a class 679 | * 1.10 2018-10-18 It solves a small bug when we load autoload.php from a different url, 680 | and it calls an external and remote folder. 681 | * 1.9 2018-10-14 A small fix and some colors. 682 | * 1.8 2018-10-14 Added external path and some fixes. Now you could add a path without comma (it's added automatically) [WebUI] 683 | * 1.7 2018-10-12 Some small fixes. Now by default, the system uses the caller's path instead of the AutoLoadOne.php path. 684 | * 1.6 2018-09-28 Added wildcard (*) to exclusion list (folders). 685 | * 1.5 2018-09-05 Now the interface open automatically by default. This file must be deleted or restricted if it's used publicity. 686 | * 1.4 2018-08-25 Some example. Now the interface doesn't open automatically by default. It's for security. 687 | * 1.3 2018-07-05 Now it works with interface, and it fixes a problem with some specific file. It also fixes a problem 688 | with linux vs Windows folder. 689 | * 1.2 2018-07-01 Lots of changes. Modified exclusion. Title and icons for the web ui. It also allows to disable the web. 690 | * 1.1 2018-06-26 Some fixes. 691 | * 1.0 2018-06-24 First version 692 | 693 | ## Todo 694 | * ~~Save configuration~~ 695 | * ~~CLI (more commands)~~ 696 | * Clean the code. 697 | * ~~Convert to a single class.~~ 698 | * ~~External folder/library (relative or absolute path)~~ 699 | * The generation fails if a php file has an error. 700 | * ~~Specify the extensions. By default, it scans only .php files.~~ 701 | -------------------------------------------------------------------------------- /autoloadone: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | =7.4" 17 | }, 18 | "bin": [ 19 | "autoloadone" 20 | ], 21 | "archive": { 22 | "exclude": ["/examples"] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "autoloadone", 3 | "version": "1.21.1", 4 | "description": "PHP library for generate auto load class", 5 | "main": "vendor/AutoLoadOne.php", 6 | "directories": { 7 | "doc": "doc", 8 | "test": "test" 9 | }, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/EFTEC/AutoLoadOne.git" 16 | }, 17 | "keywords": [ 18 | "php", 19 | "autoload", 20 | "autoinclude" 21 | ], 22 | "author": "Jorge Castro C", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/EFTEC/AutoLoadOne/issues" 26 | }, 27 | "homepage": "https://github.com/EFTEC/AutoLoadOne#readme" 28 | } 29 | --------------------------------------------------------------------------------