PageRenderTime 285ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/classes/utils/Log.php

http://zeybux.googlecode.com/
PHP | 834 lines | 277 code | 63 blank | 494 comment | 29 complexity | 0c5ac3138f9e3964c867eaa30fb631f6 MD5 | raw file
  1. <?php
  2. /**
  3. * $Header$
  4. * $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $
  5. *
  6. * @version $Revision: 293929 $
  7. * @package Log
  8. */
  9. define('PEAR_LOG_EMERG', 0); /* System is unusable */
  10. define('PEAR_LOG_ALERT', 1); /* Immediate action required */
  11. define('PEAR_LOG_CRIT', 2); /* Critical conditions */
  12. define('PEAR_LOG_ERR', 3); /* Error conditions */
  13. define('PEAR_LOG_WARNING', 4); /* Warning conditions */
  14. define('PEAR_LOG_NOTICE', 5); /* Normal but significant */
  15. define('PEAR_LOG_INFO', 6); /* Informational */
  16. define('PEAR_LOG_DEBUG', 7); /* Debug-level messages */
  17. define('PEAR_LOG_ALL', 0xffffffff); /* All messages */
  18. define('PEAR_LOG_NONE', 0x00000000); /* No message */
  19. /* Log types for PHP's native error_log() function. */
  20. define('PEAR_LOG_TYPE_SYSTEM', 0); /* Use PHP's system logger */
  21. define('PEAR_LOG_TYPE_MAIL', 1); /* Use PHP's mail() function */
  22. define('PEAR_LOG_TYPE_DEBUG', 2); /* Use PHP's debugging connection */
  23. define('PEAR_LOG_TYPE_FILE', 3); /* Append to a file */
  24. define('PEAR_LOG_TYPE_SAPI', 4); /* Use the SAPI logging handler */
  25. /**
  26. * The Log:: class implements both an abstraction for various logging
  27. * mechanisms and the Subject end of a Subject-Observer pattern.
  28. *
  29. * @author Chuck Hagenbuch <chuck@horde.org>
  30. * @author Jon Parise <jon@php.net>
  31. * @since Horde 1.3
  32. * @package Log
  33. */
  34. class Log
  35. {
  36. /**
  37. * Indicates whether or not the log can been opened / connected.
  38. *
  39. * @var boolean
  40. * @access protected
  41. */
  42. var $_opened = false;
  43. /**
  44. * Instance-specific unique identification number.
  45. *
  46. * @var integer
  47. * @access protected
  48. */
  49. var $_id = 0;
  50. /**
  51. * The label that uniquely identifies this set of log messages.
  52. *
  53. * @var string
  54. * @access protected
  55. */
  56. var $_ident = '';
  57. /**
  58. * The default priority to use when logging an event.
  59. *
  60. * @var integer
  61. * @access protected
  62. */
  63. var $_priority = PEAR_LOG_INFO;
  64. /**
  65. * The bitmask of allowed log levels.
  66. *
  67. * @var integer
  68. * @access protected
  69. */
  70. var $_mask = PEAR_LOG_ALL;
  71. /**
  72. * Holds all Log_observer objects that wish to be notified of new messages.
  73. *
  74. * @var array
  75. * @access protected
  76. */
  77. var $_listeners = array();
  78. /**
  79. * Maps canonical format keys to position arguments for use in building
  80. * "line format" strings.
  81. *
  82. * @var array
  83. * @access protected
  84. */
  85. var $_formatMap = array('%{timestamp}' => '%1$s',
  86. '%{ident}' => '%2$s',
  87. '%{priority}' => '%3$s',
  88. '%{message}' => '%4$s',
  89. '%{file}' => '%5$s',
  90. '%{line}' => '%6$s',
  91. '%{function}' => '%7$s',
  92. '%{class}' => '%8$s',
  93. '%\{' => '%%{');
  94. /**
  95. * Attempts to return a concrete Log instance of type $handler.
  96. *
  97. * @param string $handler The type of concrete Log subclass to return.
  98. * Attempt to dynamically include the code for
  99. * this subclass. Currently, valid values are
  100. * 'console', 'syslog', 'sql', 'file', and 'mcal'.
  101. *
  102. * @param string $name The name of the actually log file, table, or
  103. * other specific store to use. Defaults to an
  104. * empty string, with which the subclass will
  105. * attempt to do something intelligent.
  106. *
  107. * @param string $ident The identity reported to the log system.
  108. *
  109. * @param array $conf A hash containing any additional configuration
  110. * information that a subclass might need.
  111. *
  112. * @param int $level Log messages up to and including this level.
  113. *
  114. * @return object Log The newly created concrete Log instance, or
  115. * null on an error.
  116. * @access public
  117. * @since Log 1.0
  118. */
  119. function &factory($handler, $name = '', $ident = '', $conf = array(),
  120. $level = PEAR_LOG_DEBUG)
  121. {
  122. $handler = strtolower($handler);
  123. $class = 'Log_' . $handler;
  124. $classfile = 'Log/' . $handler . '.php';
  125. /*
  126. * Attempt to include our version of the named class, but don't treat
  127. * a failure as fatal. The caller may have already included their own
  128. * version of the named class.
  129. */
  130. if (!class_exists($class, false)) {
  131. include_once $classfile;
  132. }
  133. /* If the class exists, return a new instance of it. */
  134. if (class_exists($class, false)) {
  135. $obj = new $class($name, $ident, $conf, $level);
  136. return $obj;
  137. }
  138. $null = null;
  139. return $null;
  140. }
  141. /**
  142. * Attempts to return a reference to a concrete Log instance of type
  143. * $handler, only creating a new instance if no log instance with the same
  144. * parameters currently exists.
  145. *
  146. * You should use this if there are multiple places you might create a
  147. * logger, you don't want to create multiple loggers, and you don't want to
  148. * check for the existance of one each time. The singleton pattern does all
  149. * the checking work for you.
  150. *
  151. * <b>You MUST call this method with the $var = &Log::singleton() syntax.
  152. * Without the ampersand (&) in front of the method name, you will not get
  153. * a reference, you will get a copy.</b>
  154. *
  155. * @param string $handler The type of concrete Log subclass to return.
  156. * Attempt to dynamically include the code for
  157. * this subclass. Currently, valid values are
  158. * 'console', 'syslog', 'sql', 'file', and 'mcal'.
  159. *
  160. * @param string $name The name of the actually log file, table, or
  161. * other specific store to use. Defaults to an
  162. * empty string, with which the subclass will
  163. * attempt to do something intelligent.
  164. *
  165. * @param string $ident The identity reported to the log system.
  166. *
  167. * @param array $conf A hash containing any additional configuration
  168. * information that a subclass might need.
  169. *
  170. * @param int $level Log messages up to and including this level.
  171. *
  172. * @return object Log The newly created concrete Log instance, or
  173. * null on an error.
  174. * @access public
  175. * @since Log 1.0
  176. */
  177. function &singleton($handler, $name = '', $ident = '', $conf = array(),
  178. $level = PEAR_LOG_DEBUG)
  179. {
  180. static $instances;
  181. if (!isset($instances)) $instances = array();
  182. $signature = serialize(array($handler, $name, $ident, $conf, $level));
  183. if (!isset($instances[$signature])) {
  184. $instances[$signature] = &Log::factory($handler, $name, $ident,
  185. $conf, $level);
  186. }
  187. return $instances[$signature];
  188. }
  189. /**
  190. * Abstract implementation of the open() method.
  191. * @since Log 1.0
  192. */
  193. function open()
  194. {
  195. return false;
  196. }
  197. /**
  198. * Abstract implementation of the close() method.
  199. * @since Log 1.0
  200. */
  201. function close()
  202. {
  203. return false;
  204. }
  205. /**
  206. * Abstract implementation of the flush() method.
  207. * @since Log 1.8.2
  208. */
  209. function flush()
  210. {
  211. return false;
  212. }
  213. /**
  214. * Abstract implementation of the log() method.
  215. * @since Log 1.0
  216. */
  217. function log($message, $priority = null)
  218. {
  219. return false;
  220. }
  221. /**
  222. * A convenience function for logging a emergency event. It will log a
  223. * message at the PEAR_LOG_EMERG log level.
  224. *
  225. * @param mixed $message String or object containing the message
  226. * to log.
  227. *
  228. * @return boolean True if the message was successfully logged.
  229. *
  230. * @access public
  231. * @since Log 1.7.0
  232. */
  233. function emerg($message)
  234. {
  235. return $this->log($message, PEAR_LOG_EMERG);
  236. }
  237. /**
  238. * A convenience function for logging an alert event. It will log a
  239. * message at the PEAR_LOG_ALERT log level.
  240. *
  241. * @param mixed $message String or object containing the message
  242. * to log.
  243. *
  244. * @return boolean True if the message was successfully logged.
  245. *
  246. * @access public
  247. * @since Log 1.7.0
  248. */
  249. function alert($message)
  250. {
  251. return $this->log($message, PEAR_LOG_ALERT);
  252. }
  253. /**
  254. * A convenience function for logging a critical event. It will log a
  255. * message at the PEAR_LOG_CRIT log level.
  256. *
  257. * @param mixed $message String or object containing the message
  258. * to log.
  259. *
  260. * @return boolean True if the message was successfully logged.
  261. *
  262. * @access public
  263. * @since Log 1.7.0
  264. */
  265. function crit($message)
  266. {
  267. return $this->log($message, PEAR_LOG_CRIT);
  268. }
  269. /**
  270. * A convenience function for logging a error event. It will log a
  271. * message at the PEAR_LOG_ERR log level.
  272. *
  273. * @param mixed $message String or object containing the message
  274. * to log.
  275. *
  276. * @return boolean True if the message was successfully logged.
  277. *
  278. * @access public
  279. * @since Log 1.7.0
  280. */
  281. function err($message)
  282. {
  283. return $this->log($message, PEAR_LOG_ERR);
  284. }
  285. /**
  286. * A convenience function for logging a warning event. It will log a
  287. * message at the PEAR_LOG_WARNING log level.
  288. *
  289. * @param mixed $message String or object containing the message
  290. * to log.
  291. *
  292. * @return boolean True if the message was successfully logged.
  293. *
  294. * @access public
  295. * @since Log 1.7.0
  296. */
  297. function warning($message)
  298. {
  299. return $this->log($message, PEAR_LOG_WARNING);
  300. }
  301. /**
  302. * A convenience function for logging a notice event. It will log a
  303. * message at the PEAR_LOG_NOTICE log level.
  304. *
  305. * @param mixed $message String or object containing the message
  306. * to log.
  307. *
  308. * @return boolean True if the message was successfully logged.
  309. *
  310. * @access public
  311. * @since Log 1.7.0
  312. */
  313. function notice($message)
  314. {
  315. return $this->log($message, PEAR_LOG_NOTICE);
  316. }
  317. /**
  318. * A convenience function for logging a information event. It will log a
  319. * message at the PEAR_LOG_INFO log level.
  320. *
  321. * @param mixed $message String or object containing the message
  322. * to log.
  323. *
  324. * @return boolean True if the message was successfully logged.
  325. *
  326. * @access public
  327. * @since Log 1.7.0
  328. */
  329. function info($message)
  330. {
  331. return $this->log($message, PEAR_LOG_INFO);
  332. }
  333. /**
  334. * A convenience function for logging a debug event. It will log a
  335. * message at the PEAR_LOG_DEBUG log level.
  336. *
  337. * @param mixed $message String or object containing the message
  338. * to log.
  339. *
  340. * @return boolean True if the message was successfully logged.
  341. *
  342. * @access public
  343. * @since Log 1.7.0
  344. */
  345. function debug($message)
  346. {
  347. return $this->log($message, PEAR_LOG_DEBUG);
  348. }
  349. /**
  350. * Returns the string representation of the message data.
  351. *
  352. * If $message is an object, _extractMessage() will attempt to extract
  353. * the message text using a known method (such as a PEAR_Error object's
  354. * getMessage() method). If a known method, cannot be found, the
  355. * serialized representation of the object will be returned.
  356. *
  357. * If the message data is already a string, it will be returned unchanged.
  358. *
  359. * @param mixed $message The original message data. This may be a
  360. * string or any object.
  361. *
  362. * @return string The string representation of the message.
  363. *
  364. * @access protected
  365. */
  366. function _extractMessage($message)
  367. {
  368. /*
  369. * If we've been given an object, attempt to extract the message using
  370. * a known method. If we can't find such a method, default to the
  371. * "human-readable" version of the object.
  372. *
  373. * We also use the human-readable format for arrays.
  374. */
  375. if (is_object($message)) {
  376. if (method_exists($message, 'getmessage')) {
  377. $message = $message->getMessage();
  378. } else if (method_exists($message, 'tostring')) {
  379. $message = $message->toString();
  380. } else if (method_exists($message, '__tostring')) {
  381. $message = (string)$message;
  382. } else {
  383. $message = var_export($message, true);
  384. }
  385. } else if (is_array($message)) {
  386. if (isset($message['message'])) {
  387. if (is_scalar($message['message'])) {
  388. $message = $message['message'];
  389. } else {
  390. $message = var_export($message['message'], true);
  391. }
  392. } else {
  393. $message = var_export($message, true);
  394. }
  395. } else if (is_bool($message) || $message === NULL) {
  396. $message = var_export($message, true);
  397. }
  398. /* Otherwise, we assume the message is a string. */
  399. return $message;
  400. }
  401. /**
  402. * Using debug_backtrace(), returns the file, line, and enclosing function
  403. * name of the source code context from which log() was invoked.
  404. *
  405. * @param int $depth The initial number of frames we should step
  406. * back into the trace.
  407. *
  408. * @return array Array containing four strings: the filename, the line,
  409. * the function name, and the class name from which log()
  410. * was called.
  411. *
  412. * @access private
  413. * @since Log 1.9.4
  414. */
  415. function _getBacktraceVars($depth)
  416. {
  417. /* Start by generating a backtrace from the current call (here). */
  418. $bt = debug_backtrace();
  419. /*
  420. * If we were ultimately invoked by the composite handler, we need to
  421. * increase our depth one additional level to compensate.
  422. */
  423. $class = isset($bt[$depth+1]['class']) ? $bt[$depth+1]['class'] : null;
  424. if ($class !== null && strcasecmp($class, 'Log_composite') == 0) {
  425. $depth++;
  426. $class = isset($bt[$depth + 1]) ? $bt[$depth + 1]['class'] : null;
  427. }
  428. /*
  429. * We're interested in the frame which invoked the log() function, so
  430. * we need to walk back some number of frames into the backtrace. The
  431. * $depth parameter tells us where to start looking. We go one step
  432. * further back to find the name of the encapsulating function from
  433. * which log() was called.
  434. */
  435. $file = isset($bt[$depth]) ? $bt[$depth]['file'] : null;
  436. $line = isset($bt[$depth]) ? $bt[$depth]['line'] : 0;
  437. $func = isset($bt[$depth + 1]) ? $bt[$depth + 1]['function'] : null;
  438. /*
  439. * However, if log() was called from one of our "shortcut" functions,
  440. * we're going to need to go back an additional step.
  441. */
  442. if (in_array($func, array('emerg', 'alert', 'crit', 'err', 'warning',
  443. 'notice', 'info', 'debug'))) {
  444. $file = isset($bt[$depth + 1]) ? $bt[$depth + 1]['file'] : null;
  445. $line = isset($bt[$depth + 1]) ? $bt[$depth + 1]['line'] : 0;
  446. $func = isset($bt[$depth + 2]) ? $bt[$depth + 2]['function'] : null;
  447. $class = isset($bt[$depth + 2]) ? $bt[$depth + 2]['class'] : null;
  448. }
  449. /*
  450. * If we couldn't extract a function name (perhaps because we were
  451. * executed from the "main" context), provide a default value.
  452. */
  453. if (is_null($func)) {
  454. $func = '(none)';
  455. }
  456. /* Return a 4-tuple containing (file, line, function, class). */
  457. return array($file, $line, $func, $class);
  458. }
  459. /**
  460. * Produces a formatted log line based on a format string and a set of
  461. * variables representing the current log record and state.
  462. *
  463. * @return string Formatted log string.
  464. *
  465. * @access protected
  466. * @since Log 1.9.4
  467. */
  468. function _format($format, $timestamp, $priority, $message)
  469. {
  470. /*
  471. * If the format string references any of the backtrace-driven
  472. * variables (%5 %6,%7,%8), generate the backtrace and fetch them.
  473. */
  474. if (preg_match('/%[5678]/', $format)) {
  475. list($file, $line, $func, $class) = $this->_getBacktraceVars(2);
  476. }
  477. /*
  478. * Build the formatted string. We use the sprintf() function's
  479. * "argument swapping" capability to dynamically select and position
  480. * the variables which will ultimately appear in the log string.
  481. */
  482. return sprintf($format,
  483. $timestamp,
  484. $this->_ident,
  485. $this->priorityToString($priority),
  486. $message,
  487. isset($file) ? $file : '',
  488. isset($line) ? $line : '',
  489. isset($func) ? $func : '',
  490. isset($class) ? $class : '');
  491. }
  492. /**
  493. * Returns the string representation of a PEAR_LOG_* integer constant.
  494. *
  495. * @param int $priority A PEAR_LOG_* integer constant.
  496. *
  497. * @return string The string representation of $level.
  498. *
  499. * @access public
  500. * @since Log 1.0
  501. */
  502. function priorityToString($priority)
  503. {
  504. $levels = array(
  505. PEAR_LOG_EMERG => 'emergency',
  506. PEAR_LOG_ALERT => 'alert',
  507. PEAR_LOG_CRIT => 'critical',
  508. PEAR_LOG_ERR => 'error',
  509. PEAR_LOG_WARNING => 'warning',
  510. PEAR_LOG_NOTICE => 'notice',
  511. PEAR_LOG_INFO => 'info',
  512. PEAR_LOG_DEBUG => 'debug'
  513. );
  514. return $levels[$priority];
  515. }
  516. /**
  517. * Returns the the PEAR_LOG_* integer constant for the given string
  518. * representation of a priority name. This function performs a
  519. * case-insensitive search.
  520. *
  521. * @param string $name String containing a priority name.
  522. *
  523. * @return string The PEAR_LOG_* integer contstant corresponding
  524. * the the specified priority name.
  525. *
  526. * @access public
  527. * @since Log 1.9.0
  528. */
  529. function stringToPriority($name)
  530. {
  531. $levels = array(
  532. 'emergency' => PEAR_LOG_EMERG,
  533. 'alert' => PEAR_LOG_ALERT,
  534. 'critical' => PEAR_LOG_CRIT,
  535. 'error' => PEAR_LOG_ERR,
  536. 'warning' => PEAR_LOG_WARNING,
  537. 'notice' => PEAR_LOG_NOTICE,
  538. 'info' => PEAR_LOG_INFO,
  539. 'debug' => PEAR_LOG_DEBUG
  540. );
  541. return $levels[strtolower($name)];
  542. }
  543. /**
  544. * Calculate the log mask for the given priority.
  545. *
  546. * This method may be called statically.
  547. *
  548. * @param integer $priority The priority whose mask will be calculated.
  549. *
  550. * @return integer The calculated log mask.
  551. *
  552. * @access public
  553. * @since Log 1.7.0
  554. */
  555. function MASK($priority)
  556. {
  557. return (1 << $priority);
  558. }
  559. /**
  560. * Calculate the log mask for all priorities up to the given priority.
  561. *
  562. * This method may be called statically.
  563. *
  564. * @param integer $priority The maximum priority covered by this mask.
  565. *
  566. * @return integer The resulting log mask.
  567. *
  568. * @access public
  569. * @since Log 1.7.0
  570. *
  571. * @deprecated deprecated since Log 1.9.4; use Log::MAX() instead
  572. */
  573. function UPTO($priority)
  574. {
  575. return Log::MAX($priority);
  576. }
  577. /**
  578. * Calculate the log mask for all priorities greater than or equal to the
  579. * given priority. In other words, $priority will be the lowest priority
  580. * matched by the resulting mask.
  581. *
  582. * This method may be called statically.
  583. *
  584. * @param integer $priority The minimum priority covered by this mask.
  585. *
  586. * @return integer The resulting log mask.
  587. *
  588. * @access public
  589. * @since Log 1.9.4
  590. */
  591. function MIN($priority)
  592. {
  593. return PEAR_LOG_ALL ^ ((1 << $priority) - 1);
  594. }
  595. /**
  596. * Calculate the log mask for all priorities less than or equal to the
  597. * given priority. In other words, $priority will be the highests priority
  598. * matched by the resulting mask.
  599. *
  600. * This method may be called statically.
  601. *
  602. * @param integer $priority The maximum priority covered by this mask.
  603. *
  604. * @return integer The resulting log mask.
  605. *
  606. * @access public
  607. * @since Log 1.9.4
  608. */
  609. function MAX($priority)
  610. {
  611. return ((1 << ($priority + 1)) - 1);
  612. }
  613. /**
  614. * Set and return the level mask for the current Log instance.
  615. *
  616. * @param integer $mask A bitwise mask of log levels.
  617. *
  618. * @return integer The current level mask.
  619. *
  620. * @access public
  621. * @since Log 1.7.0
  622. */
  623. function setMask($mask)
  624. {
  625. $this->_mask = $mask;
  626. return $this->_mask;
  627. }
  628. /**
  629. * Returns the current level mask.
  630. *
  631. * @return interger The current level mask.
  632. *
  633. * @access public
  634. * @since Log 1.7.0
  635. */
  636. function getMask()
  637. {
  638. return $this->_mask;
  639. }
  640. /**
  641. * Check if the given priority is included in the current level mask.
  642. *
  643. * @param integer $priority The priority to check.
  644. *
  645. * @return boolean True if the given priority is included in the current
  646. * log mask.
  647. *
  648. * @access protected
  649. * @since Log 1.7.0
  650. */
  651. function _isMasked($priority)
  652. {
  653. return (Log::MASK($priority) & $this->_mask);
  654. }
  655. /**
  656. * Returns the current default priority.
  657. *
  658. * @return integer The current default priority.
  659. *
  660. * @access public
  661. * @since Log 1.8.4
  662. */
  663. function getPriority()
  664. {
  665. return $this->_priority;
  666. }
  667. /**
  668. * Sets the default priority to the specified value.
  669. *
  670. * @param integer $priority The new default priority.
  671. *
  672. * @access public
  673. * @since Log 1.8.4
  674. */
  675. function setPriority($priority)
  676. {
  677. $this->_priority = $priority;
  678. }
  679. /**
  680. * Adds a Log_observer instance to the list of observers that are listening
  681. * for messages emitted by this Log instance.
  682. *
  683. * @param object $observer The Log_observer instance to attach as a
  684. * listener.
  685. *
  686. * @param boolean True if the observer is successfully attached.
  687. *
  688. * @access public
  689. * @since Log 1.0
  690. */
  691. function attach(&$observer)
  692. {
  693. if (!is_a($observer, 'Log_observer')) {
  694. return false;
  695. }
  696. $this->_listeners[$observer->_id] = &$observer;
  697. return true;
  698. }
  699. /**
  700. * Removes a Log_observer instance from the list of observers.
  701. *
  702. * @param object $observer The Log_observer instance to detach from
  703. * the list of listeners.
  704. *
  705. * @param boolean True if the observer is successfully detached.
  706. *
  707. * @access public
  708. * @since Log 1.0
  709. */
  710. function detach($observer)
  711. {
  712. if (!is_a($observer, 'Log_observer') ||
  713. !isset($this->_listeners[$observer->_id])) {
  714. return false;
  715. }
  716. unset($this->_listeners[$observer->_id]);
  717. return true;
  718. }
  719. /**
  720. * Informs each registered observer instance that a new message has been
  721. * logged.
  722. *
  723. * @param array $event A hash describing the log event.
  724. *
  725. * @access protected
  726. */
  727. function _announce($event)
  728. {
  729. foreach ($this->_listeners as $id => $listener) {
  730. if ($event['priority'] <= $this->_listeners[$id]->_priority) {
  731. $this->_listeners[$id]->notify($event);
  732. }
  733. }
  734. }
  735. /**
  736. * Indicates whether this is a composite class.
  737. *
  738. * @return boolean True if this is a composite class.
  739. *
  740. * @access public
  741. * @since Log 1.0
  742. */
  743. function isComposite()
  744. {
  745. return false;
  746. }
  747. /**
  748. * Sets this Log instance's identification string.
  749. *
  750. * @param string $ident The new identification string.
  751. *
  752. * @access public
  753. * @since Log 1.6.3
  754. */
  755. function setIdent($ident)
  756. {
  757. $this->_ident = $ident;
  758. }
  759. /**
  760. * Returns the current identification string.
  761. *
  762. * @return string The current Log instance's identification string.
  763. *
  764. * @access public
  765. * @since Log 1.6.3
  766. */
  767. function getIdent()
  768. {
  769. return $this->_ident;
  770. }
  771. }