1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 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 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 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 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661
<?php
/*
* The MIT License
*
* @author Brian Dayhoff <mopsyd@me.com>
* @copyright (c) 2017, Brian Dayhoff <mopsyd@me.com> all rights reserved.
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
namespace oroboros\core\interfaces\api;
/**
* <Oroboros Class Scope Api>
* @todo separate this by specific class type into their own interfaces, so this file does not become monolithic
* Defines the class scopes recognized by the oroboros system.
* 3rd-parties may add their own additional scopes through the module director.
* @author Brian Dayhoff <mopsyd@me.com>
*/
interface ClassScopeApi {
/**
* <Core>
* ----------------
* Core classes represent very system-specific classes provided to access
* functionality, that are not appropriate to override. Do not use these
* class scopes for 3rd party integrations.
*/
/**
* Represents core internal classes that run the guts of the framework.
* These should not be extended. This is the general, generic class scope assignment.
*/
const CLASS_SCOPE_CORE = "::core::";
/**
* Represents an abstract core class.
*/
const CLASS_SCOPE_CORE_ABSTRACT = "::abstract-core::";
/**
* Represents a common asset core class.
* These provide generic universal functionality
* within their scope to accomplish various
* common internal tasks.
* These should not be extended.
*/
const CLASS_SCOPE_CORE_COMMON = "::common-core::";
/**
* Represents an outward api for interacting with the system.
* These classes present the final api that other 3rd party programs
* utilize to leverage the functionality of this system
* through the provided facade.
* These classes should not be overridden.
*/
const CLASS_SCOPE_CORE_GLOBAL = "::global-core::";
/**
* Represents a module package designed specifically to extend the core.
* These are typically released by the same vendor for the
* explicit purpose of adding additional functionality,
* but are not appropriate for the main package.
* These classes should not be overridden.
*/
const CLASS_SCOPE_CORE_MODULE = "::module-core::";
/**
* Represents an extension package designed specifically
* to provide additional options to the core.
* These are typically released by the same vendor
* for the explicit purpose of adding additional,
* more refined, or more specialized base libraries to the core.
* These classes should not be overridden.
*/
const CLASS_SCOPE_CORE_EXTENSION = "::extension-core::";
/**
* <Codex>
* ----------------
* The Codex is an index of runtime class information.
* Its task is to provide a library of known classes,
* index them by keyword, and provide information about
* them upon request. It is primarilty used for supplying
* scope information to other classes so they can enforce it,
* but also works well for debugging, providing detailed
* api information, and benchmarking counts of currently
* active instances of objects, and how many of them are unique.
* It is essentially the system catalog for this system.
*/
/**
* <Generic Codex>
* This classification designates only that the class is a codex,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_CODEX = "::codex::";
const CLASS_SCOPE_CODEX_ABSTRACT = "::abstract-codex::";
const CLASS_SCOPE_CODEX_NULL = "::abstract-codex::";
const CLASS_SCOPE_CODEX_DEFAULT = "::core-codex::";
const CLASS_SCOPE_CODEX_GENERIC = "::generic-codex::";
const CLASS_SCOPE_CODEX_CORE = "::core-codex::";
/**
* Architecture
*/
/**
* <Bootstrap>
* ----------------
* Bootstrap classes are libraries that prepare the system for execution.
* They are tasked with loading prerequisite files, defining the environment,
* instantiating the router, determining the correct controller and method
* from the router, then executing the request. Bootstrap classes within this
* system typically get called from a routine, but can be instantiated and
* run independently also. Keep in mind that this is a low level class,
* and it is going to assume control when you execute it unless you pass
* in flags to make it perform differently. As such, it is generally
* inappropriate to use a bootstrap object further on in the order of
* operations, unless you take explicit care to circumvent it's assumption
* of control.
*/
/**
* <Generic Bootstrap>
* This classification designates only that the class is a bootstrap object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_BOOTSTRAP = "::bootstrap::";
const CLASS_SCOPE_BOOTSTRAP_ABSTRACT = "::abstract-bootstrap::";
const CLASS_SCOPE_BOOTSTRAP_NULL = '::null-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_DEFAULT = '::default-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_NULLDEBUG = '::nulldebug-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_DRYRUNWEB = '::dryrunweb-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_DRYRUNCGI = '::dryruncgi-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_UNITTEST = '::test-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_PROFILE = '::profile-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_BENCHMARK = '::benchmark-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_WEBPRODUCTION = '::webproduction-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_WEBSTAGING = '::webstaging-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_WEBDEV = '::webdev-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_CGIPRODUCTION = '::cgiproduction-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_CGISTAGING = '::cgistaging-bootstrap::';
const CLASS_SCOPE_BOOTSTRAP_CGIDEV = '::cgidev-bootstrap::';
/**
* <Auth>
* ----------------
* Auth objects make decisions about whether a request is valid or not.
* They will make a judgment, but do not execute any action for having
* made it, they just make the verdict available. Asking for a verdict
* is in scope for auth objects, using that verdict to change the flow
* of logic is out of scope.
*
* Auth objects are often paired with a Validator, but this prerequisite
* is situational, so it is not enforced. As long as they internally
* resolve the verdict, make no change to state outside their scope,
* and make the verdict available, they are doing their job correctly.
*
* Controllers should use Auth objects to make complex determinations
* instead of putting it inline, so that the controller code represents
* more the process of action per decision than the actual determination.
* This approach is not enforced, but it does keep code clean and readable,
* and keeps the single-responsibility principle intact.
*/
/**
* <Generic Auth>
* This classification designates only that the class is a auth object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_AUTH = "::auth::";
const CLASS_SCOPE_AUTH_ABSTRACT = "::abstract-auth::";
const CLASS_SCOPE_AUTH_NULL = "::null-auth::";
const CLASS_SCOPE_AUTH_DEFAULT = "::default-auth::";
/**
* <Enum>
* ----------------
* Enums provide a flat set of fixed values that are immutable.
* Enums are generally used internally as reflectors for api interfaces,
* granting a simple method of quickly indexing for a valid fixed parameter.
* Enums are always read-only, and build their data set internally in contrast
* to data-objects, which are packaged from externally defined data.
* Enums must have all of their data on hand at instantiation without
* any additional external direction, so they can be consistently relied
* upon to report their data accurately 100% of the time.
*/
/**
* <Generic Enum>
* This classification designates only that the class is an enumerator object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_ENUM = "::enum::";
const CLASS_SCOPE_ENUM_ABSTRACT = "::abstract-enum::";
const CLASS_SCOPE_ENUM_NULL = '::null-enum::';
const CLASS_SCOPE_ENUM_DEFAULT = '::default-enum::';
const CLASS_SCOPE_ENUM_API = '::api-enum::';
const CLASS_SCOPE_ENUM_CODEX = '::codex-enum::';
const CLASS_SCOPE_ENUM_VALIDATION = '::validation-enum::';
const CLASS_SCOPE_ENUM_UTILITY = '::utility-enum::';
const CLASS_SCOPE_ENUM_ENVIRONMENT = '::environment-enum::';
/**
* <Flags>
* ----------------
* Flags are modifiers passed to trigger altered behavior
* at instantiation or initialization of an object.
* They represent a direct order prior to ready-state
* for that object to operate along custom guidelines
* for it's remaining lifespan. They cannot be altered
* after initialization without fully reinitializing.
*
* Flags typically represent edge-case behavior that
* is expected but not common. For example, a database
* adapter might take a FLAG_DRYRUN parameter on initialization,
* which would mean that it does not alter any data even if
* it is asked to, and instead returns an accurate count of
* what would have been altered if the request was completed.
*
* Flag integration has to be done on a case by case basis,
* however all classes that extend from the base compatibility
* trait have methods available to them to leverage this behavior
* if desired.
*
* Valid flags for a concrete object should
* be defined in its api interface.
*
* Flag objects represent the actual conditional value of the flag,
* and as such their task is pretty much only to determine whether
* or not they currently apply. This is already heavily abstracted
* out and generally does not require any additional code aside
* from defining constants to set scope.
*/
/**
* <Generic Flag>
* This classification designates only that the class is a flag object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_FLAG = "::flag::";
const CLASS_SCOPE_FLAG_ABSTRACT = "::abstract-flag::";
const CLASS_SCOPE_FLAG_NULL = '::null-flag::';
const CLASS_SCOPE_FLAG_DEFAULT = '::default-flag::';
const CLASS_SCOPE_FLAG_ARGUMENT = '::argument-flag::';
const CLASS_SCOPE_FLAG_ADAPTER = '::adapter-flag::';
const CLASS_SCOPE_FLAG_AUTH = '::auth-flag::';
const CLASS_SCOPE_FLAG_BOOTSTRAP = '::bootstrap-flag::';
const CLASS_SCOPE_FLAG_BENCHMARK = '::benchmark-flag::';
const CLASS_SCOPE_FLAG_CONTROLLER = '::controller-flag::';
const CLASS_SCOPE_FLAG_DATA = '::data-flag::';
const CLASS_SCOPE_FLAG_DEBUG = '::debug-flag::';
const CLASS_SCOPE_FLAG_DRYRUN = '::dryrun-flag::';
const CLASS_SCOPE_FLAG_ENTITY = '::entity-flag::';
const CLASS_SCOPE_FLAG_ENVIRONMENT = '::environment-flag::';
const CLASS_SCOPE_FLAG_EVENT = '::event-flag::';
const CLASS_SCOPE_FLAG_EXECUTEONLY = '::executeonly-flag::';
const CLASS_SCOPE_FLAG_EXTENSION = '::extension-flag::';
const CLASS_SCOPE_FLAG_INITIALIZATION = '::initialization-flag::';
const CLASS_SCOPE_FLAG_JOB = '::job-flag::';
const CLASS_SCOPE_FLAG_LOCK = '::lock-flag::';
const CLASS_SCOPE_FLAG_MODEL = '::model-flag::';
const CLASS_SCOPE_FLAG_MODULE = '::module-flag::';
const CLASS_SCOPE_FLAG_READONLY = '::readonly-flag::';
const CLASS_SCOPE_FLAG_RESOURCE = '::resource-flag::';
const CLASS_SCOPE_FLAG_RESPONSE = '::response-flag::';
const CLASS_SCOPE_FLAG_REQUEST = '::request-flag::';
const CLASS_SCOPE_FLAG_ROUTINE = '::routine-flag::';
const CLASS_SCOPE_FLAG_SECURITY = '::security-flag::';
const CLASS_SCOPE_FLAG_SERVICE = '::service-flag::';
const CLASS_SCOPE_FLAG_STREAM = '::stream-flag::';
const CLASS_SCOPE_FLAG_SYSTEM = '::system-flag::';
const CLASS_SCOPE_FLAG_TEMPLATE = '::template-flag::';
const CLASS_SCOPE_FLAG_TEST = '::test-flag::';
const CLASS_SCOPE_FLAG_VALIDATION = '::validation-flag::';
const CLASS_SCOPE_FLAG_VIEW = '::view-flag::';
const CLASS_SCOPE_FLAG_WRITEONLY = '::writeonly-flag::';
/**
* <Promise>
* ----------------
* Promises are objects returned synchronously, which represent values
* from asynchronous calls. These allow the program to proceed with
* execution until such time as the value of the promise becomes required.
* They represent an effort to smoothe out a lot of the typical issues
* that arise when mixing synchronous local logic with asynchronous
* remote requests.
*
* Promises as they are implemented in Oroboros core follow the Promise/A+
* specification, which is a universal approach but typically the most
* represented in Javascript, where it's usage is pretty much standard.
*
* Any language that executes asynchronous calls can benefit from
* this approach, and minimize ambiguity about responses by doing so.
*/
/**
* <Generic Promise>
* This classification designates only that the class is a promise object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_PROMISE = "::promise::";
const CLASS_SCOPE_PROMISE_ABSTRACT = "::abstract-promise::";
const CLASS_SCOPE_PROMISE_NULL = "::null-promise::";
const CLASS_SCOPE_PROMISE_DEFAULT = "::generic-promise::";
const CLASS_SCOPE_PROMISE_GENERIC = "::generic-promise::";
/**
* <Error>
* ----------------
* Error objects represent a thrown error,
* or a class that manages them and provides
* execution control when errors arise.
*
* Native PHP Exceptions are errors,
* as are any class that manages them.
*/
/**
* <Generic Error>
* This classification designates only that the class is an error object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_ERROR_ = "::error::";
const CLASS_SCOPE_ERROR_ABSTRACT = "::abstract-error::";
const CLASS_SCOPE_ERROR_NULL = '::null-error::';
const CLASS_SCOPE_ERROR_DEFAULT = '::exception-error::';
const CLASS_SCOPE_ERROR_GENERIC = '::exception-error::';
const CLASS_SCOPE_ERROR_EXCEPTION = '::exception-error::';
const CLASS_SCOPE_ERROR_BADFUNCTIONCALL = '::badfunctioncall-error::';
const CLASS_SCOPE_ERROR_BADMETHODCALL = '::badmethodcall-error::';
const CLASS_SCOPE_ERROR_DOMAIN = '::domain-error::';
const CLASS_SCOPE_ERROR_INVALIDARGUMENT = '::invalidargument-error::';
const CLASS_SCOPE_ERROR_LENGTH = '::length-error::';
const CLASS_SCOPE_ERROR_LOGIC = '::logic-error::';
const CLASS_SCOPE_ERROR_OUTOFBOUNDS = '::outofbounds-error::';
const CLASS_SCOPE_ERROR_OUTOFRANGE = '::outofrange-error::';
const CLASS_SCOPE_ERROR_OVERFLOW = '::overflow-error::';
const CLASS_SCOPE_ERROR_RANGE = '::range-error::';
const CLASS_SCOPE_ERROR_RUNTIME = '::runtime-error::';
const CLASS_SCOPE_ERROR_UNDERFLOW = '::underflow-error::';
const CLASS_SCOPE_ERROR_UNEXPECTEDVALUE = '::unexpectedvalue-error::';
//Error Handling
const CLASS_SCOPE_ERROR_HANDLER_ABSTRACT = '::abstract-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_NULL = '::null-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_DEFAULT = '::generic-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_GENERIC = '::generic-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_FATAL = '::fatal-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_SECURITY = '::security-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_EMERGENCY = '::emergency-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_ALERT = '::alert-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_CRITICAL = '::critical-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_ERROR = '::error-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_WARNING = '::warning-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_NOTICE = '::notice-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_INFO = '::info-error-handler::';
const CLASS_SCOPE_ERROR_HANDLER_DEBUG = '::debug-error-handler::';
/**
* <Event>
* ----------------
* Events are classes that designate a point of interest
* during execution, or any time sensitive task that needs
* to run at a specific interval, date, or time.
* Like flags, events are primarily tasked with making a
* determination as to whether they currently apply or not,
* but also need to be able to report the details of the event
* to anything that requests more information about it.
*/
/**
* <Generic Event>
* This classification designates only that the class is an event object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_EVENT = "::event::";
const CLASS_SCOPE_EVENT_ABSTRACT = "::abstract-event::";
const CLASS_SCOPE_EVENT_NULL = '::null-event::';
const CLASS_SCOPE_EVENT_ERROR = '::error-event::';
const CLASS_SCOPE_EVENT_FLAG = '::flag-event::';
const CLASS_SCOPE_EVENT_INITIALIZATION = '::initialization-event::';
const CLASS_SCOPE_EVENT_DEBUG = '::debug-event::';
const CLASS_SCOPE_EVENT_COMPLETION = '::completion-event::';
const CLASS_SCOPE_EVENT_BUILD = '::build-event::';
const CLASS_SCOPE_EVENT_SHUTDOWN = '::shutdown-event::';
const CLASS_SCOPE_EVENT_CODEX = '::codex-event::';
const CLASS_SCOPE_EVENT_ROUTING = '::routing-event::';
const CLASS_SCOPE_EVENT_SERVICE = '::service-event::';
const CLASS_SCOPE_EVENT_ENTITY = '::entity-event::';
const CLASS_SCOPE_EVENT_STREAM = '::stream-event::';
const CLASS_SCOPE_EVENT_DATA = '::data-event::';
const CLASS_SCOPE_EVENT_PARSER = '::parser-event::';
const CLASS_SCOPE_EVENT_JOB = '::job-event::';
const CLASS_SCOPE_EVENT_SECURITY = '::security-event::';
const CLASS_SCOPE_EVENT_CONTROLLER = '::controller-event::';
const CLASS_SCOPE_EVENT_MODEL = '::model-event::';
const CLASS_SCOPE_EVENT_VIEW = '::view-event::';
const CLASS_SCOPE_EVENT_ADAPTER = '::adapter-event::';
const CLASS_SCOPE_EVENT_LIBRARY = '::library-event::';
const CLASS_SCOPE_EVENT_MODULE = '::module-event::';
const CLASS_SCOPE_EVENT_EXTENSION = '::extension-event::';
/**
* <Routine>
* ----------------
* Routines are classes that wrap procedural code.
* Their task is to encapsulate non-object oriented constructs
* in a way that is compatible with object-oriented architecture.
* Their task is to manage a subset of specific linear execution
* that is not an object (but may internally use objects), understand
* and report its scope and magnitude, and execute it on command,
* while managing any errors it arises appropriately.
*
* Internally, these classes are only used to parse initial bootloading
* and arrive at a useable bootstrap object correctly.
*
* Externally, they can be used as a wrapper for any independently
* executiing construct, and quickly creating a module around it.
*
* It is bad practice to base your system too heavily upon
* this class type. Use this extremely sparingly unless you
* are stuck with an already locked-in procedural approach,
* say from a legacy codebase or similar.
*/
/**
* <Generic Routine>
* This classification designates only that the class is a routine object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_ROUTINE = "::routine::";
const CLASS_SCOPE_ROUTINE_ABSTRACT = "::abstract-routine::";
const CLASS_SCOPE_ROUTINE_NULL = '::null-routine::';
const CLASS_SCOPE_ROUTINE_BOOTLOAD = '::bootload-routine::';
const CLASS_SCOPE_ROUTINE_SUBSYSTEM = '::subystem-routine::';
const CLASS_SCOPE_ROUTINE_PROCEDURAL = '::procedural-routine::';
const CLASS_SCOPE_ROUTINE_DECLARATIVE = '::declarative-routine::';
const CLASS_SCOPE_ROUTINE_WEB = '::web-routine::';
const CLASS_SCOPE_ROUTINE_CGI = '::cgi-routine::';
const CLASS_SCOPE_ROUTINE_BUILD = '::build-routine::';
const CLASS_SCOPE_ROUTINE_TEST = '::test-routine::';
const CLASS_SCOPE_ROUTINE_DEBUG = '::debug-routine::';
const CLASS_SCOPE_ROUTINE_PROXY = '::proxy-routine::';
/**
* <Pattern>
* ----------------
* A pattern is just a design pattern. It provides an unopinionated approach
* to efficiently performing a specific type of task, without any regard to
* why that task is neccessary. These are building blocks for robust class
* functionality. they are never required for use, but speed up ongoing
* development and scalability drastically if used intelligently. If used
* recklessly, they overengineer your system into a nightmare.
*
* Design patterns are usually provided as an abstract that can be extended,
* a trait that grants all of their methods independently, and an interface
* that enforces an agreed upon approach for interoperability.
*
* All of the abstract classes for design patterns are very low level,
* and extending those will require that you provide the logic for all
* of the actual work manually. Generally, it is better to use the trait
* as a drop-in solution wherever it is needed, and affix the interface if
* it needs to be passed around the system (pattern traits ALWAYS satisfy
* the interface requirements of the same pattern,
* class constant declarations notwithstanding).
*/
/**
* <Generic Pattern>
* This classification designates only that the class is a design pattern,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_PATTERN = "::pattern::";
const CLASS_SCOPE_PATTERN_ABSTRACT = "::abstract-pattern::";
//behavioral patterns
const CLASS_SCOPE_BEHAVIORAL_PATTERN = "::behavioral-pattern::";
//creational patterns
const CLASS_SCOPE_CREATIONAL_PATTERN = "::creational-pattern::";
const CLASS_SCOPE_CREATIONAL_ABSTRACT_FACTORY_PATTERN = "::abstract-factory-creational-pattern::";
const CLASS_SCOPE_CREATIONAL_FACTORY_PATTERN = "::factory-creational-pattern::";
const CLASS_SCOPE_CREATIONAL_PROTOTYPE_PATTERN = "::prototype-creational-pattern::";
const CLASS_SCOPE_CREATIONAL_BUILDER_PATTERN = "::builder-creational-pattern::";
const CLASS_SCOPE_CREATIONAL_OBJECT_POOL_PATTERN = "::object-pool-creational-pattern::";
/**
* <Singleton pattern>
* A pattern that enforces only a single instance of an object.
*
* There is a lot of discussion over whether or not this is an anti-pattern.
* I tend to agree that is is, but will not exclude it's compatibility
* from 3rd party integration.
*
* We do not use this pattern internally,
* but provide the classification
* for people using this package who want to.
*/
const CLASS_SCOPE_CREATIONAL_SINGLETON_PATTERN = "::object-pool-creational-pattern::";
//structural patterns
const CLASS_SCOPE_STRUCTURAL_PATTERN = "::structural-pattern::";
const CLASS_SCOPE_STRUCTURAL_REGISTRY_PATTERN = "::registry-structural-pattern::";
const CLASS_SCOPE_STRUCTURAL_STATIC_REGISTRY_PATTERN = "::static-registry-structural-pattern::";
//concurrency patterns
const CLASS_SCOPE_CONCURRENCY_PATTERN = "::concurrency-pattern::";
//more classifications may be added if we ever
//decide to dig into enterprise level patterns
//for this package.
/**
* System utilities
*/
/**
* <Entity>
* ----------------
* An Entity is any sort of unique object bound to a concrete identity.
* Users are entities, as are their accounts, and any other construct
* that has a defined and reproducible identity.
*
* Entity classes are tasked with maintaining the correct association
* between various data points that collectively constitute the entity,
* and maintaining their integrity and current state.
*
* Entities will typically interact with one or more Records,
* and determine the association and synchronization between
* those records internally, and present a public api for
* interacting with or modifying their state.
*/
/**
* <Generic Entity>
* This classification designates only that the class is an entity object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_ENTITY = "::entity::";
const CLASS_SCOPE_ENTITY_ABSTRACT = "::abstract-entity::";
const CLASS_SCOPE_ENTITY_NULL = '::null-entity::';
const CLASS_SCOPE_ENTITY_USER = '::user-entity::';
const CLASS_SCOPE_ENTITY_SITE = '::site-entity::';
const CLASS_SCOPE_ENTITY_APP = '::app-entity::';
const CLASS_SCOPE_ENTITY_DATA = '::data-entity::';
const CLASS_SCOPE_ENTITY_RECORD = '::record-entity::';
const CLASS_SCOPE_ENTITY_SERVICE = '::service-entity::';
const CLASS_SCOPE_ENTITY_ADAPTER = '::adapter-entity::';
const CLASS_SCOPE_ENTITY_REPORT = '::report-entity::';
const CLASS_SCOPE_ENTITY_CONFIGURATION = '::config-entity::';
/**
* <Job>
* ----------------
* A Job class represents a specific task, and its order of operations.
* The task of job classes is to execute a specifically defined task and
* see it to completion, manage it's errors, and appropriately clean up if
* something goes wrong, rolling back to the last acceptable state when
* this happens. They must also provide a Report object that verifies the
* status of their execution, and whether or not it resolved correctly.
*
* This may be confused with an event.
* A Job is the object that resolves the actual roadmap and execution method for a task.
* An Event is used as a container for an active job instance of that Job running.
*/
/**
* <Generic Job>
* This classification designates only that the class is a job object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_JOB = "::job::";
const CLASS_SCOPE_JOB_ABSTRACT = "::abstract-job::";
const CLASS_SCOPE_JOB_NULL = '::null-job::';
const CLASS_SCOPE_JOB_CRON = '::cron-job::';
const CLASS_SCOPE_JOB_CGI = '::cgi-job::';
const CLASS_SCOPE_JOB_QUEUE = '::queue-job::';
const CLASS_SCOPE_JOB_WEB = '::web-job::';
const CLASS_SCOPE_JOB_SERVICE = '::service-job::';
/**
* <Security>
* ----------------
* Security objects as a whole can be used anywhere,
* but they enforce explicit scope, and cannot be used
* in the wrong context. Security objects are tasked with
* preventing unauthorized access or exploits. Their task
* is to notice irregularities, create, send, and recieve
* security advisories, and alter the execution plan in some
* cases as neccessary to prevent damage.
*/
/**
* <Generic Security>
* This classification designates only that the class is a security object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_SECURITY = '::security::';
const CLASS_SCOPE_SECURITY_ABSTRACT = '::abstract-security::';
const CLASS_SCOPE_SECURITY_NULL = '::null-security::';
const CLASS_SCOPE_SECURITY_REQUEST = '::request-security::';
const CLASS_SCOPE_SECURITY_HACK = '::hack-security::';
const CLASS_SCOPE_SECURITY_AUTH = '::auth-security::';
const CLASS_SCOPE_SECURITY_SESSION = '::session-security::';
const CLASS_SCOPE_SECURITY_DATA = '::data-security::';
const CLASS_SCOPE_SECURITY_FILE = '::file-security::';
const CLASS_SCOPE_SECURITY_SERVICE = '::service-security::';
const CLASS_SCOPE_SECURITY_SERVER = '::server-security::';
const CLASS_SCOPE_SECURITY_PROXY = '::proxy-security::';
const CLASS_SCOPE_SECURITY_CLUSTER = '::cluster-security::';
const CLASS_SCOPE_SECURITY_SOURCE = '::source-security::';
const CLASS_SCOPE_SECURITY_ACCESS = '::access-security::';
const CLASS_SCOPE_SECURITY_DDOS = '::ddos-security::';
const CLASS_SCOPE_SECURITY_MAINTENANCE = '::maintenance-security::';
const CLASS_SCOPE_SECURITY_PRODUCTION = '::production-security::';
const CLASS_SCOPE_SECURITY_STAGING = '::staging-security::';
const CLASS_SCOPE_SECURITY_DEVELOPMENT = '::dev-security::';
/**
* <Template>
* ----------------
* A template simplifies the reproduction of content.
* These are most often used by Views, but may be used by anything
* that needs to abstract out injection of data into some kind of
* boilerplate syntax. Not all templates are automatically
* associated with views, but the majority of them are.
*/
/**
* <Generic Template>
* This classification designates only that the class is a template object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_TEMPLATE = "::template::";
const CLASS_SCOPE_TEMPLATE_ABSTRACT = "::abstract-template::";
const CLASS_SCOPE_TEMPLATE_NULL = '::null-template::';
const CLASS_SCOPE_TEMPLATE_PLAINTEXT = '::plaintext-template::';
const CLASS_SCOPE_TEMPLATE_CONSOLE = '::console-template::';
const CLASS_SCOPE_TEMPLATE_HTML = '::html-template::';
const CLASS_SCOPE_TEMPLATE_XML = '::xml-template::';
const CLASS_SCOPE_TEMPLATE_AJAX = '::ajax-template::';
const CLASS_SCOPE_TEMPLATE_JSON = '::json-template::';
const CLASS_SCOPE_TEMPLATE_CSV = '::csv-template::';
const CLASS_SCOPE_TEMPLATE_SQL = '::sql-template::';
const CLASS_SCOPE_TEMPLATE_JAVASCRIPT = '::javascript-template::';
const CLASS_SCOPE_TEMPLATE_CSS = '::css-template::';
const CLASS_SCOPE_TEMPLATE_JPG = '::jpg-template::';
const CLASS_SCOPE_TEMPLATE_GIF = '::gif-template::';
const CLASS_SCOPE_TEMPLATE_MP3 = '::mp3-template::';
const CLASS_SCOPE_TEMPLATE_MP4 = '::mp4-template::';
/**
* <Utility>
* ----------------
* A utility is an external and independent, directly integrated class.
* These are used when they wrap something too straightforward and
* simplistic to warrant an Adapter, or when the class needs
* to be directly extended.
*
* All helper classes should either be utilities or traits.
* (Use a trait if you want to be able to override behavior internally,
* use an adapter if it does it's full job as is).
*
* The approach between utilities and adapters is largely preferential.
* You may use either or, or a mix of both. Internally, complex operation
* is always designated to an adapter, and simple one-off tasks are
* designated to a utility. Knowing the appropriate distinction is
* based on use case, and no opinion about your preference is enforced,
* other than that you ascribe to the appropriate paradigm for whichever you use.
*
* Example:
*
* //Utilities are direct children of 3rd-party constructs,
* //or standalone constructs that should be capable of fully
* //fulfilling their scope without external resources.
* class Foo extends \DateTime {} //This is a utility.
*
* //Adapters wrap 3rd-party resources internally,
* //and are internal classes themselves.
* //They abstract out complex interaction,
* //and provide a simple public api to accomplish it.
* class Bar {
* private $_foo;
* public function __construct() {
* $this->_foo = new Foo();
* }
*
* public function setTime($time = 'NOW') {
* return $this->_foo->setTime($time);
* }
* }
*/
/**
* <Generic Utility>
* This classification designates only that the class is a utility object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_UTILITY = "::utility::";
const CLASS_SCOPE_UTILITY_ABSTRACT = "::abstract-utility::";
const CLASS_SCOPE_UTILITY_NULL = '::null-utility::';
const CLASS_SCOPE_UTILITY_MATH = '::math-utility::';
const CLASS_SCOPE_UTILITY_FORMATTING = '::formatting-utility::';
const CLASS_SCOPE_UTILITY_VALIDATION = '::validation-utility::';
const CLASS_SCOPE_UTILITY_OUTPUT = '::output-utility::';
const CLASS_SCOPE_UTILITY_DATA = '::data-utility::';
const CLASS_SCOPE_UTILITY_SECURITY = '::security-utility::';
const CLASS_SCOPE_UTILITY_PARSER = '::parse-utility::';
/**
* <Router>
* ----------------
* Routers make decisions about which classes and methods handle requests.
* Their only task is to map a request to an execution plan,
* and run the execution plan when requested.
*
* In theory this is pretty simple, but achieving this
* dynamically in a flexible and scalable way is actually
* quite complex under the hood.
*
* The Oroboros router schema is pretty standard and easily extensible.
* However it can be substituted with pretty much any other router also,
* provided you resolve the mapping conditions of that router against
* the provided interface.
*/
/**
* <Generic Router>
* This classification designates only that the class is a router object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_ROUTER = "::router::";
const CLASS_SCOPE_ROUTER_ABSTRACT = "::abstract-router::";
const CLASS_SCOPE_ROUTER_NULL = '::null-router::';
const CLASS_SCOPE_ROUTER_CGI = '::cgi-router::';
const CLASS_SCOPE_ROUTER_HTTP = '::http-router::';
const CLASS_SCOPE_ROUTER_AJAX = '::ajax-router::';
const CLASS_SCOPE_ROUTER_SOCKET = '::socket-router::';
const CLASS_SCOPE_ROUTE_ABSTRACT = '::abstract-route::';
//scopes of individual routes
const CLASS_SCOPE_ROUTE_NULL = '::null-route::';
const CLASS_SCOPE_ROUTE_CGI = '::cgi-route::';
const CLASS_SCOPE_ROUTE_HTTP = '::http-route::';
const CLASS_SCOPE_ROUTE_AJAX = '::ajax-route::';
const CLASS_SCOPE_ROUTE_SOCKET = '::socket-route::';
/**
* I/O
*/
/**
* <Request>
* ----------------
* A request object represents a request to the server by a client,
* or a request from the server to another server.
*
* Requests from a client become read only after they initialize.
* Outbound requests become read only when they are executed.
*
* Both can return an editable copy of themselves,
* but the original object remains unchanged after it's execution point.
*/
/**
* <Generic Request>
* This classification designates only that the class is a request object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_REQUEST = "::request::";
const CLASS_SCOPE_REQUEST_ABSTRACT = "::abstract-request::";
const CLASS_SCOPE_REQUEST_NULL = '::null-request::';
const CLASS_SCOPE_REQUEST_HTTP = '::http-request::';
const CLASS_SCOPE_REQUEST_REST = '::rest-request::';
const CLASS_SCOPE_REQUEST_AJAX = '::ajax-request::';
const CLASS_SCOPE_REQUEST_WEBSOCKET = '::websocket-request::';
/**
* <CGI Request>
* This is the default for command line interaction.
* It assumes script execution by default, and will
* be expected not to modify output content to STDOUT
* or STDERR in any way.
*
* This is a general purpose scope for command line interaction.
* It should generally be used by default, unless you know that
* the request always comes from a human user. This scope will
* not maintain interractive state with the command line, and
* will proceed as if each command should have a clean exit
* after execution.
*/
const CLASS_SCOPE_REQUEST_CGI = '::cgi-request::';
/**
* <Console Request>
* This also designates command line useage.
* Unlike the default CGI request, this designates
* that the request came from an active user,
* and will allow efforts to apply additional colors,
* spacing, or interactive input directives.
*
* Classes that expect ongoing state with the
* command line session must use this scope.
*/
const CLASS_SCOPE_REQUEST_CONSOLE = '::console-request::';
/**
* <Response>
* ----------------
* Response objects represent a response to a request,
* either the outbound response after execution
* (which is by default owned by the currently active View),
* or a response from a remote service.
*
* These follow the same principle as Request objects of
* becoming immutable after execution, except in the case of
* a Response to the client, execution is typically the last
* thing that happens before shutdown, so only shutdown methods
* will encounter it in an immutable state.
* In contrast, Response objects that are received from service
* calls are immutable as soon as they are received and parsed
* correctly.
*/
/**
* <Generic Response>
* This classification designates only that the class is a response object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_RESPONSE = '::response::';
const CLASS_SCOPE_RESPONSE_ABSTRACT = '::abstract-response::';
const CLASS_SCOPE_RESPONSE_NULL = '::null-response::';
const CLASS_SCOPE_RESPONSE_SUCCESS = '::success-response::';
const CLASS_SCOPE_RESPONSE_ERROR = '::error-response::';
const CLASS_SCOPE_RESPONSE_UNAUTHORIZED = '::unauthorized-response::';
const CLASS_SCOPE_RESPONSE_UNIMPLEMENTED = '::unimplemented-response::';
const CLASS_SCOPE_RESPONSE_REDIRECT = '::redirect-response::';
const CLASS_SCOPE_RESPONSE_TIMEOUT = '::timeout-response::';
const CLASS_SCOPE_RESPONSE_MISSING = '::notfound-response::';
const CLASS_SCOPE_RESPONSE_SECURITY = '::security-response::';
/**
* <Service>
* ----------------
* A service is a containerized wrapper for an external Api
* that holds no execution on the same process as the
* current runtime. Services are a subset of adapters,
* that specifically deal with outbound requests.
*
* Their task is to understand, interpret, provide,
* and execute a remote defined Api, and return a result that
* is in a uniform format for the internal system to understand.
* They may leverage any number of Data-Objects, Parsers,
* Records, Validators, etc to accomplish this.
*/
/**
* <Generic Service>
* This classification designates only that the class is a service object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_SERVICE = "::service::";
const CLASS_SCOPE_SERVICE_ABSTRACT = '::abstract-service::';
const CLASS_SCOPE_SERVICE_NULL = '::null-service::';
const CLASS_SCOPE_SERVICE_LOCAL = '::local-service::';
const CLASS_SCOPE_SERVICE_REMOTE = '::remote-service::';
const CLASS_SCOPE_SERVICE_REMOTE_AUTHENTICATED = '::authenticated-remote-service::';
const CLASS_SCOPE_SERVICE_REMOTE_UNAUTHENTICATED = '::unauthenticated-remote-service::';
const CLASS_SCOPE_SERVICE_CGI = '::cgi-service::';
const CLASS_SCOPE_SERVICE_CGI_JOB = '::cgi-job-service::';
const CLASS_SCOPE_SERVICE_CGI_JOB_CRON = '::cgi-cron-job-service::';
const CLASS_SCOPE_SERVICE_CGI_CONSOLE = '::cgi-console-service::';
const CLASS_SCOPE_SERVICE_DATA = '::data-service::';
const CLASS_SCOPE_SERVICE_DATA_AUTH = '::data-auth-service::';
const CLASS_SCOPE_SERVICE_DATA_INDEX = '::data-index-service::';
const CLASS_SCOPE_SERVICE_DATA_STREAM = '::data-stream-service::';
const CLASS_SCOPE_SERVICE_DATA_STORE = '::data-store-service::';
/**
* Data
*/
/**
* <Data Object>
* ----------------
* Data objects are just containers for information.
* By themselves, they make no decisions about that information,
* and only act as a container. To be stable, they must be able
* to reproduce their original result format from whatever they
* parse it into, and be able to do so even if changes are made.
* For simple data objects, this can be done with php internals.
* For complex data objects, this should be done by using a
* Parser class.
*/
/**
* <Generic Data Object>
* This classification designates only that the class is a data object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_DATA_OBJECT = "::data-object::";
const CLASS_SCOPE_DATA_OBJECT_ABSTRACT = '::abstract-data-object::';
const CLASS_SCOPE_DATA_OBJECT_NULL = '::null-data-object::';
const CLASS_SCOPE_DATA_OBJECT_READONLY = '::readonly-data-object::';
const CLASS_SCOPE_DATA_OBJECT_WRITEONLY = '::writeonly-data-object::';
const CLASS_SCOPE_DATA_OBJECT_EXECUTEONLY = '::executeonly-data-object::';
const CLASS_SCOPE_DATA_OBJECT_READWRITE = '::readwrite-data-object::';
const CLASS_SCOPE_DATA_OBJECT_READEXECUTE = '::readexecute-data-object::';
const CLASS_SCOPE_DATA_OBJECT_WRITEEXECUTE = '::writeexecute-data-object::';
const CLASS_SCOPE_DATA_OBJECT_OPEN = '::open-data-object::';
const CLASS_SCOPE_DATA_OBJECT_CONFIGURABLE = '::configurable-data-object::';
const CLASS_SCOPE_DATA_OBJECT_HOOK = '::hook-data-object::';
/**
* <Parser>
* ----------------
* A parser is tasked with the read/write operation against
* a defined content type. It's job is to translate a data
* structure into a PHP internal object or array, and to be
* able to recreate the same semantically correct data structure
* from the same or modified data. Parsers abstract out external
* data formats. The more parsers you have, the more universalized
* your I/O will be.
*/
/**
* <Generic Parser>
* This classification designates only that the class is a parser object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_PARSER = "::parser::";
const CLASS_SCOPE_PARSER_ABSTRACT = "::abstract-parser::";
const CLASS_SCOPE_PARSER_NULL = '::null-parser::';
const CLASS_SCOPE_PARSER_SQL = '::sql-parser::';
const CLASS_SCOPE_PARSER_SERIAL = '::serial-parser::';
const CLASS_SCOPE_PARSER_CSV = '::csv-parser::';
const CLASS_SCOPE_PARSER_XML = '::xml-parser::';
const CLASS_SCOPE_PARSER_JSON = '::json-parser::';
const CLASS_SCOPE_PARSER_INI = '::ini-parser::';
const CLASS_SCOPE_PARSER_YAML = '::yaml-parser::';
/**
* <Record>
* ----------------
* A record is a reflection of one specific entry in some datastore.
* That datastore may be a database, flatfile, memory, or a binding to a
* specific result in a remote service api, but it always represents
* one specific unique record.
*
* Unlike an Entity, a Record has no inherent cross-association with any
* related records that would collectively constitute a fully qualified
* entity.
*
* If for example you have a three related tables in a database that
* constitute all of the details about a user, then there are three
* record objects for that user, and one Entity that owns all three
* and understands how they correlate.
*
* Records are bound to one specific source, and represent one
* specific entry in that souce when instantiated.
*
* If more than one object needs to work with the same Record,
* it should be passed by reference so that operations are
* universally understood, and no other instances become
* out-of-sync with the current state of that record.
*/
/**
* <Generic Record>
* This classification designates only that the class is a record object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_RECORD = "::record::";
const CLASS_SCOPE_RECORD_ABSTRACT = "::abstract-record::";
const CLASS_SCOPE_RECORD_NULL = '::null-record::';
const CLASS_SCOPE_RECORD_SQL = '::sql-record::';
const CLASS_SCOPE_RECORD_SERIAL = '::serial-record::';
const CLASS_SCOPE_RECORD_CSV = '::csv-record::';
const CLASS_SCOPE_RECORD_XML = '::xml-record::';
const CLASS_SCOPE_RECORD_JSON = '::json-record::';
const CLASS_SCOPE_RECORD_INI = '::ini-record::';
const CLASS_SCOPE_RECORD_YAML = '::yaml-record::';
/**
* <Stream>
* ----------------
* A stream represents a wrapper for a specific data feed that needs to be
* read, written, or passed along elsewhere.
* Streams minimize the memory overhead of sets of data by allowing them to
* be read like a tape, where only the current pointer on the tape is
* taking up any memory at runtime. This allows you to handle very large
* files, resources, or memory objects with little to no performance
* impact on the application runtime.
*
* Oroboros's implementation of streams is based on
* the Psr\Http\StreamWrapper standard (Psr-7), though it
* is used extensively throughout the system, not just for messages.
*/
/**
* <Generic Stream>
* This classification designates only that the class is a stream object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_STREAM_RESOURCE = "::stream::";
const CLASS_SCOPE_STREAM_RESOURCE_ABSTRACT = "::abstract-stream::";
const CLASS_SCOPE_STREAM_RESOURCE_NULL = '::null-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_DEFAULT = self::CLASS_SCOPE_STREAM_RESOURCE_MEMORY;
const CLASS_SCOPE_STREAM_RESOURCE_BUFFER = '::buffer-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_DATA = '::data-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_MEMORY = '::memory-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_PROXY = '::proxy-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_REQUEST = '::request-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_RESPONSE = '::response-stream::';
const CLASS_SCOPE_STREAM_RESOURCE_SERVICE = '::service-stream::';
/**
* <Hooks>
* ----------------
* A hook is a scalar marker in some kind of data that designates that it
* should be automatically replaced with a known value or the result of a
* callback when it is encountered.
*
* This allows post-processing of data to be used in any designated scope.
* This is similar to Wordpress's concept of a shortcode, but this
* implementation is flexible enough to be used anywhere (including in
* database results, json files, etc), Allows for customized definition
* of what constitutes a Hook, respects scope, auth, and visibility, and
* by default nulls out all existing hooks that do not have an associated
* output registered for them, which prevents unresolved hooks from polluting
* the source they are encountered in. Hooks also have a debug switch, which
* will wrap whatever content they replace in a marker that designates
* where/why it was inserted. As hooks can be fired recursively, this is
* very handy for debugging root problems quickly while using them.
*
* Hooks are used somewhat internally, and it is not enforced that you use
* them to interact with this system. They are provided for convenience and
* granular post-processing, to prevent having to make retroactive changes
* to lower level structure when edge cases arise.
*
* You can create your own case-specific hook classes by extending AbstractHook.
* @see \oroboros\core\abstracts\hooks\AbstractHook
*
* There is also an interface and trait provided to accomplish this
* without direct class inheritance.
*/
/**
* <Generic Hook>
* This classification designates only that the class is a hook object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_HOOK = "::hook::";
const CLASS_SCOPE_HOOK_ABSTRACT = "::abstract-hook::";
const CLASS_SCOPE_HOOK_NULL = "::null-hook::";
const CLASS_SCOPE_HOOK_SYSTEM = "::system-hook::";
const CLASS_SCOPE_HOOK_API = "::api-hook::";
const CLASS_SCOPE_HOOK_ADAPTER = "::adapter-hook::";
const CLASS_SCOPE_HOOK_PROMISE = "::promise-hook::";
const CLASS_SCOPE_HOOK_SERVICE = "::service-hook::";
const CLASS_SCOPE_HOOK_JOB = "::job-hook::";
const CLASS_SCOPE_HOOK_CODEX = "::codex-hook::";
const CLASS_SCOPE_HOOK_CONTROLLER = "::controller-hook::";
const CLASS_SCOPE_HOOK_MODEL = "::model-hook::";
const CLASS_SCOPE_HOOK_VIEW = "::view-hook::";
const CLASS_SCOPE_HOOK_ENTITY = "::entity-hook::";
const CLASS_SCOPE_HOOK_EVENT = "::event-hook::";
const CLASS_SCOPE_HOOK_ROUTINE = "::routine-hook::";
const CLASS_SCOPE_HOOK_CACHE = "::cache-hook::";
const CLASS_SCOPE_HOOK_MESSAGE = "::message-hook::";
const CLASS_SCOPE_HOOK_REQUEST = "::request-hook::";
const CLASS_SCOPE_HOOK_RESPONSE = "::response-hook::";
/**
* Interoperability
*/
/**
* <Adapter>
* ----------------
* An adapter is a class that is inherently integrated with the
* system directly, and provides translation of some external resource,
* so that it can be used through this abstraction as an internal
* resource by interacting with the adapter.
*
* Most wrappers for external libraries are adapters.
*
* A class that manages shell interaction without
* directly extending the shell is an adapter.
*
* A session handler class that does not directly extend
* the native PHP session class is an adapter.
*
* All wrappers for SDK's are adapters.
*
* etc, etc.
*/
/**
* <Generic Adapter>
* This classification designates only that the class is a adapter object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_ADAPTER = "::adapter::";
const CLASS_SCOPE_ADAPTER_ABSTRACT = '::abstract-adapter::';
const CLASS_SCOPE_ADAPTER_NULL = '::null-adapter::';
const CLASS_SCOPE_ADAPTER_BROWSER = '::browser-adapter::';
const CLASS_SCOPE_ADAPTER_DATABASE = '::database-adapter::';
const CLASS_SCOPE_ADAPTER_LIBRARY = '::library-adapter::';
const CLASS_SCOPE_ADAPTER_PROXY = '::proxy-adapter::';
const CLASS_SCOPE_ADAPTER_SDK = '::sdk-adapter::';
const CLASS_SCOPE_ADAPTER_SERVER = '::server-adapter::';
const CLASS_SCOPE_ADAPTER_SERVICE = '::service-adapter::';
const CLASS_SCOPE_ADAPTER_SHELL = '::shell-adapter::';
const CLASS_SCOPE_ADAPTER_SOCKET = '::socket-adapter::';
/**
* <Extension>
* ----------------
* An extension is a package that adds additional classes publicly
* to the system. All assets provided by an extension can immediately
* be used anywhere as if they were native code.
*
* Extension packages may provided updated overrides for existing classes,
* or register additional previously nonexistent ones.
*
* All classes provided by an extension need to adhere to their api
* requirements, or the entire extension will be rejected.
*
* An extension class is the class that provides all of the information
* about an extension, what it contains, what scope it applies to,
* and what functionality it provides. It's much like a mini-codex for a
* set of non-core classes that extend the core.
*/
/**
* <Generic Extension>
* This classification designates only that the class is an extension object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_EXTENSION = "::extension::";
const CLASS_SCOPE_EXTENSION_ABSTRACT = "::abstract-extension::";
const CLASS_SCOPE_EXTENSION_NULL = '::null-extension::';
const CLASS_SCOPE_EXTENSION_ADAPTER = '::adapter-extension::';
const CLASS_SCOPE_EXTENSION_BENCHMARK = '::benchmark-extension::';
const CLASS_SCOPE_EXTENSION_AUTH = '::auth-extension::';
const CLASS_SCOPE_EXTENSION_BOOTSTRAP = '::bootstrap-extension::';
const CLASS_SCOPE_EXTENSION_CLUSTER = '::cluster-extension::';
const CLASS_SCOPE_EXTENSION_CODEX = '::codex-extension::';
const CLASS_SCOPE_EXTENSION_CONTROLLER = '::controller-extension::';
const CLASS_SCOPE_EXTENSION_DATA = '::data-extension::';
const CLASS_SCOPE_EXTENSION_DEBUG = '::debug-extension::';
const CLASS_SCOPE_EXTENSION_ENTITY = '::entity-extension::';
const CLASS_SCOPE_EXTENSION_ENUM = '::enum-extension::';
const CLASS_SCOPE_EXTENSION_ERROR = '::error-extension::';
const CLASS_SCOPE_EXTENSION_EVENT = '::event-extension::';
const CLASS_SCOPE_EXTENSION_FLAG = '::flag-extension::';
const CLASS_SCOPE_EXTENSION_JOB = '::job-extension::';
const CLASS_SCOPE_EXTENSION_MODEL = '::model-extension::';
const CLASS_SCOPE_EXTENSION_MODULE = '::module-extension::';
const CLASS_SCOPE_EXTENSION_PATTERN = '::pattern-extension::';
const CLASS_SCOPE_EXTENSION_PERFORMANCE = '::performance-extension::';
const CLASS_SCOPE_EXTENSION_PROXY = '::proxy-extension::';
const CLASS_SCOPE_EXTENSION_ROUTINE = '::routine-extension::';
const CLASS_SCOPE_EXTENSION_SECURITY = '::security-extension::';
const CLASS_SCOPE_EXTENSION_SERVICE = '::service-extension::';
const CLASS_SCOPE_EXTENSION_SHELL = '::shell-extension::';
const CLASS_SCOPE_EXTENSION_SOURCE = '::source-extension::';
const CLASS_SCOPE_EXTENSION_SYSTEM = '::system-extension::';
const CLASS_SCOPE_EXTENSION_TEMPLATE = '::template-extension::';
const CLASS_SCOPE_EXTENSION_TEST = '::test-extension::';
const CLASS_SCOPE_EXTENSION_THIRDPARTY = '::thirdparty-extension::';
const CLASS_SCOPE_EXTENSION_UTILITY = '::utility-extension::';
const CLASS_SCOPE_EXTENSION_VALIDATION = '::validation-extension::';
const CLASS_SCOPE_EXTENSION_VIEW = '::view-extension::';
const CLASS_SCOPE_EXTENSION_WRAPPER = '::wrapper-extension::';
/**
* <Module>
* ----------------
* A module is similar to an Extension, except that a module does not
* provide it's classes publicly. Instead, it is a package that remains
* distinctly independent, and presents a public Api instead of additional
* classes. All interaction with modules is done through their single Api.
* This is appropriate when most of the related classes are very
* case specific, and would not be appropriately used out of their
* intended scope as a general library.
*
* Modules that extend other modules have access to parent modules classes,
* but they are not otherwise available outside of any given module or it's
* direct dependent modules.
*
* Specialized packages that interact with a specific external resource in
* a predefined way are usually modules (eg: payment gateway, plugins, etc)
*/
/**
* <Generic Module>
* This classification designates only that the class is a module object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_MODULE = "::module::";
const CLASS_SCOPE_MODULE_ABSTRACT = "::abstract-module::";
const CLASS_SCOPE_MODULE_NULL = '::null-module::';
const CLASS_SCOPE_MODULE_SYSTEM = '::system-module::';
const CLASS_SCOPE_MODULE_CORE = '::core-module::';
const CLASS_SCOPE_MODULE_THIRDPARTY = '::thirdparty-module::';
/**
* <Component>
* ----------------
* A component is also similar to a Module or Extension, and shares some
* similarity with both. Like Extensions, their classes are publicly
* available. Like modules, they are managed by scope. In contrast to
* a Module, a Component scope is defined by it's
* CLASS_TYPE and CLASS_SCOPE assignment (not it's own, but the one or ones
* it designates that it applies to). Objects in that scope may request
* components freely, and objects outside that scope do not
* have access to them.
*
* Components satisfy general work in a very narrow scope.
* A frontend module to display the results of a blog feed in a widget
* should be a component, for example, because that specific use case only
* applies to Http Views, and never anywhere else.
*
* In contrast to Extensions and Modules, Components are single resources,
* and are not a package in and of themselves. They are generally
* distributed as part of an extension, but can also be packaged
* independently.
*/
/**
* <Generic Component>
* This classification designates only that the class is a component object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_COMPONENT = "::component";
const CLASS_SCOPE_COMPONENT_ABSTRACT = "::abstract-component";
/**
* MVC Structure
*/
/**
* <Controller>
* ----------------
* A controller is tasked with making all of the decisions,
* and ideally should also do none of the work.
* Controllers job is to interpret a request and execute
* the corresponding execution plan. Individual tasks within that
* execution plan should be considered out of scope for controllers
* to be directly executing unless they are extremely simple
* and non-blocking.
*
* Primarily, the Controller should be designating all work to sub-objects,
* and only deciding which ones to load and what to order them to do.
*
* This separation is not enforced, but the system heavily implies that it
* should be followed, and it's entire structure is intended to
* accomplish this. Failing to take this approach will cause you roadblocks
* later, but if you have a good reason for doing it that way, then by all
* means do so, nothing will inherently prevent it.
*/
/**
* <Generic Controller>
* This classification designates only that the class is a controller object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_CONTROLLER = "::controller::";
const CLASS_SCOPE_CONTROLLER_ABSTRACT = '::abstract-controller::';
const CLASS_SCOPE_CONTROLLER_NULL = '::null-controller::';
const CLASS_SCOPE_CONTROLLER_AJAX = '::ajax-controller::';
const CLASS_SCOPE_CONTROLLER_PUBLIC = '::public-controller::';
const CLASS_SCOPE_CONTROLLER_SECURITY = '::security-controller::';
const CLASS_SCOPE_CONTROLLER_ERROR = '::error-controller::';
const CLASS_SCOPE_CONTROLLER_ADMIN = '::admin-controller::';
const CLASS_SCOPE_CONTROLLER_SYSTEM = '::system-controller::';
const CLASS_SCOPE_CONTROLLER_CGI = '::cgi-controller::';
const CLASS_SCOPE_CONTROLLER_FRONT = '::front-controller::';
const CLASS_SCOPE_CONTROLLER_REST = '::rest-controller::';
const CLASS_SCOPE_CONTROLLER_HTTP = '::http-controller::';
const CLASS_SCOPE_CONTROLLER_SOCKET = '::socket-controller::';
const CLASS_SCOPE_CONTROLLER_PROXY = '::proxy-controller::';
const CLASS_SCOPE_CONTROLLER_MODULE = '::module-controller::';
const CLASS_SCOPE_CONTROLLER_EXTENSION = '::extension-controller::';
const CLASS_SCOPE_CONTROLLER_DEBUG = '::debug-controller::';
const CLASS_SCOPE_CONTROLLER_TEST = '::test-controller::';
/**
* <Library>
* ----------------
* Libraries are multi-purpose classes that cover a specific area of focus,
* and provide functionality to accomplish it easily. The majority of other
* classes distributed in this system are subsets of libraries, or extend
* from them.
*
* Libraries ideally should do all of the work and make
* none of the decisions. They are the inverse of the Controller
* (which makes all of the decisions and does none of the work).
*
* What designates something as a library, is that it does not
* provide opinion, and does not fall into a more focused
* class definition, and also is not inherently a wrapper for
* external functionality (though it may interact with one or
* multiple of these to do it's job).
*
* Libraries typically have a singular, narrow scope of focus, and are
* always the default option for accomplishing tasks within that focus.
* If this is not the case, they are at least an option on the list for
* accomplishing tasks in that area of focus (eg a MySQL library and a
* PostGRES library might be used interchangeably, but they both only
* deal with databases).
*/
/**
* <Generic Library>
* This classification designates only that the class is a library object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_LIBRARY = "::library::";
/**
* A library intended to be extended
*/
const CLASS_SCOPE_LIBRARY_ABSTRACT = '::abstract-library::';
/**
* A library that satisfies an expected condition and performs no operation.
*/
const CLASS_SCOPE_LIBRARY_NULL = '::null-library::';
/**
* A library that provides adapters
*/
const CLASS_SCOPE_LIBRARY_ADAPTER = '::adapter-library::';
/**
* A library that provides authorization
*/
const CLASS_SCOPE_LIBRARY_AUTH = '::auth-library::';
/**
* A library that provides bootstrap objects
*/
const CLASS_SCOPE_LIBRARY_BOOTSTRAP = '::bootstrap-library::';
/**
* A library that provides collections
*/
const CLASS_SCOPE_LIBRARY_COLLECTION = '::collection-library::';
/**
* A library that provides debug functionality
*/
const CLASS_SCOPE_LIBRARY_DEBUG = '::debug-library::';
/**
* A library that provides entities
*/
const CLASS_SCOPE_LIBRARY_ENTITY = '::entity-library::';
/**
* A library that provides events
*/
const CLASS_SCOPE_LIBRARY_EVENT = '::event-library::';
/**
* A library that provides parsing functionality
*/
const CLASS_SCOPE_LIBRARY_PARSER = '::parser-library::';
/**
* A library that provides utilities.
* Individual utilities should not use this,
* but their aggregators and managers can
* if it treats them as workers.
*/
const CLASS_SCOPE_LIBRARY_UTILITY = '::utility-library::';
/**
* A library that provides filehandling functionality
*/
const CLASS_SCOPE_LIBRARY_FILE = '::file-library::';
/**
* A library that provides or extends logging
* @note Must follow Psr-3 spec to be acceptable
*/
const CLASS_SCOPE_LIBRARY_LOGGER = '::logger-library::';
/**
* A library that provides or extends autoloading
* @note Must follow Psr-4 spec to be acceptable
*/
const CLASS_SCOPE_LIBRARY_AUTOLOAD = '::autoload-library::';
/**
* A library that provides or interacts with caching
* @note Must follow Psr-6 spec to be acceptable
*/
const CLASS_SCOPE_LIBRARY_CACHE = '::cache-library::';
/**
* A library that provides stream or message support
* @note Must follow Psr-7 spec to be acceptable
*/
const CLASS_SCOPE_LIBRARY_STREAM = '::stream-library::';
/**
* A library that provides container objects
* @note Must follow Psr-11 spec to be acceptable
*/
const CLASS_SCOPE_LIBRARY_CONTAINER = '::container-library::';
/**
* A library that provides container objects
* @note Must follow Psr-13 spec to be acceptable
*/
const CLASS_SCOPE_LIBRARY_LINK = '::link-library::';
/**
* A library provided as a worker.
* Use this if the worker does not have a more appropriate scope definition.
* @note Workers can only be requested by a manager class that has registered them as a valid worker instance.
*/
const CLASS_SCOPE_LIBRARY_WORKER = '::worker-library::';
/**
* A library that provides a manager for other related objects
* @note These libraries must define their valid worker instances, and can request any worker class that satisfies that condition, as long as it is in their scope.
*/
const CLASS_SCOPE_LIBRARY_MANAGER = '::manager-library::';
/**
* A private module library.
* @note This scope tells the factories and prototyper not to honor requests for the object if they are not part of it's parent module package.
*/
const CLASS_SCOPE_LIBRARY_MODULE = '::module-library::';
/**
* <Model>
* ----------------
* A model is essentially a library that performs system-specific tasks.
* Unlike a library, it is useless outside of the system that it is defined
* to use, because it has inherent association with the logic and structure
* of that specific system.
*
* Models primarily control the flow, presentation, and modification
* of information. Often times, they are structured to be automatically
* bound to a data layer, but this system does not really take that
* approach to them, be cause then you would not be able to interract with
* other sources of data effectively with a model, which degrades your
* overall structure when it is encountered and you have to start hacking
* in libraries that also fullfill the same responsibilities as models, or
* doing model stuff in the controller directly to compensate.
*
* The approach to Models that Oroboros takes, is that a model only
* represents the need to interract with a source of data and execute
* business logic against it, of which a data-layer is one type (but not the only type).
* For this reason, several implementations of abstract Model are provided,
* which can easily be scoped to just about any type of business logic
* application you need to do by extension. Model traits are also provided
* to accomplish this behavior in some other class (like maybe a model from
* another framework) in a way that is still recognizably valid through the
* interal structure. This allows you to make interoperable Models, which is
* typically unheard of, but can be used to maintain portability between two
* systems.
*
* For example, if you had a legacy application built on CodeIgniter,
* and you wanted to port it to Laravel (or to Oroboros :) ),
* you can use the Oroboros Model trait as a bridge to smooth out the
* distinction between the two, which will let you incrementally refactor
* to conform to the desired system's interface, and then eventually move
* it fully without really interrupting the live execution much.
*
* This approach was taken specifically because it is usually not possible
* to salvage much when porting models from one framework to another, as
* both have their own specific opinion about how it ought to be done,
* which often is the underlying cause of a full rewrite of an existing
* application. This is NOT a drop-in compatibility solution, it just takes
* a task that is usually impossible, and makes it somewhat approachable.
*
* Oroboros models work fine independently of any other system, and do not
* require external integration whatsoever. The primary purpose of this
* package is to satisfy all baseline needs and also allow those needs to
* be interchangeable for external preferred resources, so care has been
* taken to insure that both needs are well represented, particularly in
* how the Model class has been abstracted.
*/
/**
* <Generic Model>
* This classification designates only that the class is a model object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_MODEL = "::model::";
const CLASS_SCOPE_MODEL_ABSTRACT = "::abstract-model::";
/**
* <View>
* ----------------
* Views present information to the end user. They do not make decisions
* or perform logic aside from deciding how to render what they are
* given correctly.
*
* In Oroboros, Views are typically bound to an explicit
* output format (eg: plaintext, html, json, xml, csv, etc).
*
* Views can also instantiate and manage other views,
* so a granular approach to content output management
* is possible by doing this. Scoped views always set their headers
* correctly and can validate their content on demand.
*
* For Views that need to be more generalized, there are
* default implementations of the AbstractView, HttpView,
* and CgiView, which are scoped to anything, all web requests,
* and all command line interaction respectively.
*
* This provides the flexibility of having general purpose
* Views if desired, but again, neither approach is enforced.
*/
/**
* <Generic View>
* This classification designates only that the class is a view object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_VIEW = "::view::";
const CLASS_SCOPE_VIEW_ABSTRACT = '::abstract-view::';
const CLASS_SCOPE_VIEW_NULL = '::null-view::';
const CLASS_SCOPE_VIEW_PLAINTEXT = '::plaintext-view::';
const CLASS_SCOPE_VIEW_CONSOLE = '::console-view::';
const CLASS_SCOPE_VIEW_HTML = '::html-view::';
const CLASS_SCOPE_VIEW_XML = '::xml-view::';
const CLASS_SCOPE_VIEW_AJAX = '::ajax-view::';
const CLASS_SCOPE_VIEW_JSON = '::json-view::';
const CLASS_SCOPE_VIEW_CSV = '::csv-view::';
const CLASS_SCOPE_VIEW_SQL = '::sql-view::';
const CLASS_SCOPE_VIEW_JAVASCRIPT = '::javascript-view::';
const CLASS_SCOPE_VIEW_CSS = '::css-view::';
const CLASS_SCOPE_VIEW_JPG = '::jpg-view::';
const CLASS_SCOPE_VIEW_GIF = '::gif-view::';
const CLASS_SCOPE_VIEW_MP3 = '::mp3-view::';
const CLASS_SCOPE_VIEW_MP4 = '::mp4-view::';
/**
* Performance
*/
/**
* <Cache>
* ----------------
* Cache objects buffer data in a way that may or may not reflect
* it's exact current state (depending on designation).
* The purpose of a Cache object is to provide a default
* set when a piece of information is requested heavily and
* repeatedly, so that it does not become overly burdensome
* to performance to get it.
*
* The frustration of Caches is when they become out-of-sync with
* the literal data they represent, and present a wrong dataset.
* In many cases this is unavoidable, and a threshold of tolerance
* needs to be designated. In other cases, this is blocking, and
* the data ALWAYS needs to be represented accurately.
*
* The Oroboros implementation of Cache objects follows the Psr-6
* specification, and will shortly be upgraded to also support the
* Psr-16 specification as well. As with most other assets in this system,
* it can be interchangeably used with any other package that honors
* it's specification correctly.
*/
/**
* <Generic Cache>
* This classification designates only that the class is a cache object,
* and makes no further assumption about it. You will need to provide your
* own documentation if you use this scope.
*/
const CLASS_SCOPE_CACHE = "::cache::";
const CLASS_SCOPE_CACHE_ABSTRACT = "::abstract-cache::";
const CLASS_SCOPE_CACHE_NULL = "::null-cache::";
const CLASS_SCOPE_CACHE_DEFAULT = "::memory-cache::";
const CLASS_SCOPE_CACHE_AUTH = "::auth-cache::";
const CLASS_SCOPE_CACHE_OBJECT = "::object-cache::";
const CLASS_SCOPE_CACHE_ADAPTER = "::adapter-cache::";
const CLASS_SCOPE_CACHE_REQUEST = "::request-cache::";
const CLASS_SCOPE_CACHE_RESPONSE = "::response-cache::";
const CLASS_SCOPE_CACHE_GENERIC = "::memory-cache::";
const CLASS_SCOPE_CACHE_DISK = "::disk-cache::";
const CLASS_SCOPE_CACHE_MEMORY = "::memory-cache::";
const CLASS_SCOPE_CACHE_SHARED = "::shared-cache::";
const CLASS_SCOPE_CACHE_DATA = "::data-cache::";
const CLASS_SCOPE_CACHE_SERIAL = "::serial-cache::";
const CLASS_SCOPE_CACHE_BUFFER = "::buffer-cache::";
const CLASS_SCOPE_CACHE_SESSION = "::session-cache::";
const CLASS_SCOPE_CACHE_MEMCACHE = "::memcache-cache::";
const CLASS_SCOPE_CACHE_SERViCE = "::service-cache::";
const CLASS_SCOPE_CACHE_SERViCE_CDN = "::service-cdn-cache::";
const CLASS_SCOPE_CACHE_SERViCE_PROXY = "::service-proxy-cache::";
const CLASS_SCOPE_CACHE_CLIENT = "::client-cache::";
const CLASS_SCOPE_CACHE_CLIENT_REQUEST = "::client-browser-cache::";
const CLASS_SCOPE_CACHE_CLIENT_RESPONSE = "::client-browser-cache::";
const CLASS_SCOPE_CACHE_CLIENT_BROWSER = "::client-browser-cache::";
}