Driver.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /*
  3. * $Id$
  4. *
  5. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  6. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  7. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  8. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  9. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16. *
  17. * This software consists of voluntary contributions made by many individuals
  18. * and is licensed under the LGPL. For more information, see
  19. * <http://www.doctrine-project.org>.
  20. */
  21. namespace Doctrine\ORM\Mapping\Driver;
  22. use Doctrine\ORM\Mapping\ClassMetadataInfo;
  23. /**
  24. * Contract for metadata drivers.
  25. *
  26. * @since 2.0
  27. * @author Jonathan H. Wage <jonwage@gmail.com>
  28. * @todo Rename: MetadataDriver or MappingDriver
  29. */
  30. interface Driver
  31. {
  32. /**
  33. * Loads the metadata for the specified class into the provided container.
  34. *
  35. * @param string $className
  36. * @param ClassMetadataInfo $metadata
  37. */
  38. function loadMetadataForClass($className, ClassMetadataInfo $metadata);
  39. /**
  40. * Gets the names of all mapped classes known to this driver.
  41. *
  42. * @return array The names of all mapped classes known to this driver.
  43. */
  44. function getAllClassNames();
  45. /**
  46. * Whether the class with the specified name should have its metadata loaded.
  47. * This is only the case if it is either mapped as an Entity or a
  48. * MappedSuperclass.
  49. *
  50. * @param string $className
  51. * @return boolean
  52. */
  53. function isTransient($className);
  54. }