Zend_Db_Profiler-Firebug.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <sect3 id="zend.db.profiler.profilers.firebug">
  2. <title>פרופילינג בעזרת Firebug</title>
  3. <para>
  4. <code>Zend_Db_Profiler_Firebug</code> שולח מידע פרופילינג ל <ulink url="http://www.getfirebug.com/">Firebug</ulink> <ulink
  5. url="http://getfirebug.com/logging.html">Console</ulink>.
  6. </para>
  7. <para>
  8. כל המידע נשלח באמצעות רכיב ה <code>Zend_Wildfire_Channel_HttpHeaders</code> אשר משתמש בכותרי HTTP כדי לוודא שתוכן העמוד לא משובש.
  9. ניפוי בקשות AJAX אשר דורשות תגובות XML ו JSON אפשרי בשיטה זו.
  10. </para>
  11. <para>
  12. דרישות:
  13. </para>
  14. <itemizedlist>
  15. <listitem><para>
  16. דפדפן פיירפוקס גרסא 3 למרות שגרסא 2 גם נתמכת
  17. </para></listitem>
  18. <listitem> <para>
  19. תוסף ה Firebug לפיירפוקס אשר ניתן להורדה דרך <ulink url="https://addons.mozilla.org/en-US/firefox/addon/1843">https://addons.mozilla.org/en-US/firefox/addon/1843</ulink>.
  20. </para></listitem>
  21. <listitem><para>
  22. תוסף ה FirePHP לפיירפוקס אשר ניתן להורדה דרך <ulink
  23. url="https://addons.mozilla.org/en-US/firefox/addon/6149">https://addons.mozilla.org/en-US/firefox/addon/6149</ulink>.
  24. </para></listitem>
  25. </itemizedlist>
  26. <example id="zend.db.profiler.profilers.firebug.example.with_front_controller">
  27. <title>פרופילינג מסד נתונים בעזרת <code>Zend_Controller_Front</code></title>
  28. <programlisting role="php"><![CDATA[
  29. // In your bootstrap file
  30. $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
  31. $profiler->setEnabled(true);
  32. // Attach the profiler to your db adapter
  33. $db->setProfiler($profiler)
  34. // Dispatch your front controller
  35. // All DB queries in your model, view and controller
  36. // files will now be profiled and sent to Firebug
  37. ]]>
  38. </programlisting>
  39. </example>
  40. <example id="zend.db.profiler.profilers.firebug.example.without_front_controller">
  41. <title>פרופילינג מסד נתונים ללא שימוש ב <code>Zend_Controller_Front</code></title>
  42. <programlisting role="php"><![CDATA[
  43. $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
  44. $profiler->setEnabled(true);
  45. // Attach the profiler to your db adapter
  46. $db->setProfiler($profiler)
  47. $request = new Zend_Controller_Request_Http();
  48. $response = new Zend_Controller_Response_Http();
  49. $channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
  50. $channel->setRequest($request);
  51. $channel->setResponse($response);
  52. // Start output buffering
  53. ob_start();
  54. // Now you can run your DB queries to be profiled
  55. // Flush profiling data to browser
  56. $channel->flush();
  57. $response->sendHeaders();
  58. ]]>
  59. </programlisting>
  60. </example>
  61. </sect3>
  62. <!--
  63. vim:se ts=4 sw=4 et:
  64. -->