PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/WebsiteFiles/admin/bin/pear/Compat/Function/is_a.php

https://github.com/mcherryleigh/seniordesign
PHP | 47 lines | 14 code | 4 blank | 29 comment | 4 complexity | 4e92122b4b538ed779ae9064c2868cec MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4 |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2004 The PHP Group |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 3.0 of the PHP license, |
  9. // | that is bundled with this package in the file LICENSE, and is |
  10. // | available at through the world-wide-web at |
  11. // | http://www.php.net/license/3_0.txt. |
  12. // | If you did not receive a copy of the PHP license and are unable to |
  13. // | obtain it through the world-wide-web, please send a note to |
  14. // | license@php.net so we can mail you a copy immediately. |
  15. // +----------------------------------------------------------------------+
  16. // | Authors: Aidan Lister <aidan@php.net> |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: is_a.php,v 1.11 2004/06/12 06:53:00 aidan Exp $
  20. //
  21. /**
  22. * Replace function is_a()
  23. *
  24. * @category PHP
  25. * @package PHP_Compat
  26. * @link http://php.net/function.is_a
  27. * @author Aidan Lister <aidan@php.net>
  28. * @version $Revision: 1.11 $
  29. * @since PHP 4.2.0
  30. */
  31. if (!function_exists('is_a'))
  32. {
  33. function is_a ($object, $class)
  34. {
  35. if (get_class($object) == strtolower($class)) {
  36. return true;
  37. }
  38. else {
  39. return is_subclass_of($object, $class);
  40. }
  41. }
  42. }
  43. ?>