ConfigInterface.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\ObjectManager;
  7. /**
  8. * Interface \Magento\Framework\ObjectManager\ConfigInterface
  9. *
  10. */
  11. interface ConfigInterface
  12. {
  13. /**
  14. * Set class relations
  15. *
  16. * @param RelationsInterface $relations
  17. *
  18. * @return void
  19. */
  20. public function setRelations(RelationsInterface $relations);
  21. /**
  22. * Set configuration cache instance
  23. *
  24. * @param ConfigCacheInterface $cache
  25. *
  26. * @return void
  27. */
  28. public function setCache(ConfigCacheInterface $cache);
  29. /**
  30. * Retrieve list of arguments per type
  31. *
  32. * @param string $type
  33. * @return array|null
  34. */
  35. public function getArguments($type);
  36. /**
  37. * Check whether type is shared
  38. *
  39. * @param string $type
  40. * @return bool
  41. */
  42. public function isShared($type);
  43. /**
  44. * Retrieve instance type
  45. *
  46. * @param string $instanceName
  47. * @return mixed
  48. */
  49. public function getInstanceType($instanceName);
  50. /**
  51. * Retrieve preference for type
  52. *
  53. * @param string $type
  54. * @return string
  55. * @throws \LogicException
  56. */
  57. public function getPreference($type);
  58. /**
  59. * Returns list of virtual types
  60. *
  61. * @return array
  62. */
  63. public function getVirtualTypes();
  64. /**
  65. * Extend configuration
  66. *
  67. * @param array $configuration
  68. * @return void
  69. */
  70. public function extend(array $configuration);
  71. /**
  72. * Returns list on preferences
  73. *
  74. * @return array
  75. */
  76. public function getPreferences();
  77. }