| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <sect3 id="zend.db.profiler.profilers.firebug">
- <title>פרופילינג בעזרת Firebug</title>
- <para>
- <code>Zend_Db_Profiler_Firebug</code> שולח מידע פרופילינג ל <ulink url="http://www.getfirebug.com/">Firebug</ulink> <ulink
- url="http://getfirebug.com/logging.html">Console</ulink>.
- </para>
- <para>
- כל המידע נשלח באמצעות רכיב ה <code>Zend_Wildfire_Channel_HttpHeaders</code> אשר משתמש בכותרי HTTP כדי לוודא שתוכן העמוד לא משובש.
- ניפוי בקשות AJAX אשר דורשות תגובות XML ו JSON אפשרי בשיטה זו.
- </para>
- <para>
- דרישות:
- </para>
- <itemizedlist>
- <listitem><para>
- דפדפן פיירפוקס גרסא 3 למרות שגרסא 2 גם נתמכת
- </para></listitem>
- <listitem> <para>
- תוסף ה Firebug לפיירפוקס אשר ניתן להורדה דרך <ulink url="https://addons.mozilla.org/en-US/firefox/addon/1843">https://addons.mozilla.org/en-US/firefox/addon/1843</ulink>.
- </para></listitem>
- <listitem><para>
- תוסף ה FirePHP לפיירפוקס אשר ניתן להורדה דרך <ulink
- url="https://addons.mozilla.org/en-US/firefox/addon/6149">https://addons.mozilla.org/en-US/firefox/addon/6149</ulink>.
- </para></listitem>
- </itemizedlist>
- <example id="zend.db.profiler.profilers.firebug.example.with_front_controller">
- <title>פרופילינג מסד נתונים בעזרת <code>Zend_Controller_Front</code></title>
- <programlisting role="php"><![CDATA[
- // In your bootstrap file
- $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
- $profiler->setEnabled(true);
- // Attach the profiler to your db adapter
- $db->setProfiler($profiler)
- // Dispatch your front controller
- // All DB queries in your model, view and controller
- // files will now be profiled and sent to Firebug
- ]]>
- </programlisting>
- </example>
- <example id="zend.db.profiler.profilers.firebug.example.without_front_controller">
- <title>פרופילינג מסד נתונים ללא שימוש ב <code>Zend_Controller_Front</code></title>
- <programlisting role="php"><![CDATA[
- $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
- $profiler->setEnabled(true);
- // Attach the profiler to your db adapter
- $db->setProfiler($profiler)
- $request = new Zend_Controller_Request_Http();
- $response = new Zend_Controller_Response_Http();
- $channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
- $channel->setRequest($request);
- $channel->setResponse($response);
- // Start output buffering
- ob_start();
- // Now you can run your DB queries to be profiled
- // Flush profiling data to browser
- $channel->flush();
- $response->sendHeaders();
- ]]>
- </programlisting>
- </example>
- </sect3>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|