My favorites | Sign in
Project Home Wiki Source
Search
for
Imind_Profiler_Doctrine_Firebug  
Profiling Doctrine with Firebug/FirePHP
Featured, Phase-Implementation
Updated Feb 4, 2010 by szotyi

This allows to send Doctrine's profiling information to Firebug and FirePHP using Zend_Wildfire. It is Doctrine_Connection_Profiler mixed with Zend_Db_Profiler_Firebug

Details

Use-cases

  1. Setting up the profiler manually
  2. <?php
    $conn = Doctrine_Manager::connection('pgsql://dbuser:secret@db.example.com/db');
    $profiler = new Imind_Profiler_Doctrine_Firebug();
    $conn->setListener($profiler);
    ?>
  3. Setting up the profiler with Imind_Context
  4. <?xml version="1.0" encoding="UTF-8"?>
    <context  xmlns="http://www.imind.hu/schema/context"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
    http://www.imind.hu/schema/context http://www.imind.hu/schema/context/context.xsd">
        <registry>Zend_Registry</registry>
        <components>
            <component>
                <id>profiler</id>
                <class>Imind_Profiler_Doctrine_Firebug</class>
            </component>
            <component>
                <id>conn</id>
                <class>Doctrine_Manager</class>
                <default>true</default>
                <factory>connection</factory>
                <createOnLoad>true</createOnLoad>
                <constructor>
                    <arg>pgsql://user:password@localhost/dbname</arg>
                </constructor>
                <methods>
                     <method name="setAttribute">
                         <arg type="int">101</arg>
                         <arg type="bool">true</arg>
                     </method>
                     <method name="setListener">
                         <arg ref="profiler"/>
                     </method>
                 </methods>
             </component>
        </components>
    </context>

Sign in to add a comment
Powered by Google Project Hosting