bjyoungblood/BjyProfiler — pull request #20 by ashawley (2013-01-23 15:35:28+00:00)
Title: Add enable/disable to BjyProfiler\Db\Profiler\Profiler 

In some of my unit tests I need to use this profiler. However, I want the profiler to be disabled for the setup and teardown of databases fixtures for system under test. That way the fixtures can be modified by other programmers but without affecting the expected query profiles in the unit tests.

This commit is a trivial change but adds two new methods so that the profiler can be easily disabled and re-enabled.

```php
$db->getProfiler()->disable();
...
$db->getProfiler()->enable();
```

This is easier to read than the current workaround, which works since the class constructor accepts a boolean that in turn sets the `$enabled` property.

```php
$db->setProfiler(new Profiler(false))) // disable
...
$db->setProfiler(new Profiler(true))) // enable
```

The class already contained logic to correctly enable or disable profiling based on the value of the `$enabled` property.