public function install()
    {
        // Check if not installed ...
        if (true !== $this->isInstalled()) {
            try {
                $this
                    ->dumpState()                                   // Backup current state
                    ->installed(true)                               // 1st mark that it installed
                    ->makeVerbose()                                 // Enable the complete output of PHP's errors
                    ->whoops(new Run())                             // Create a Whoops instance
                    ->installWhoops()                               // Install Whoops Exception Handler
                    ->getLogger()
                        ->debug('Debugging tools installed.');

            } catch (Doozr_Debugging_Exception $exception) {

                $this
                    ->installed(false)
                    ->uninstallWhoops()
                    ->restoreState();

                throw new Doozr_Debugging_Exception(
                    sprintf('Debugging could not be installed! Error: %s', $exception->getMessage())
                );
            }

        } else {
            throw new Doozr_Debugging_Exception(
                'Debugging is already installed!'
            );
        }

        // Enable chaining
        return $this;
    }
public function install()
    {
        // Check if not installed ...
        if (true !== $this->isInstalled()) {
            try {
                $this
                    ->dumpState()                                   // Backup current state
                    ->installed(true)                               // 1st mark that it installed
                    ->makeVerbose()                                 // Enable the complete output of PHP's errors
                    ->whoops(new Run())                             // Create a Whoops instance
                    ->installWhoops()                               // Install Whoops Exception Handler
                    ->getLogger()
                        ->debug('Debugging tools installed.');

            } catch (Doozr_Debugging_Exception $exception) {

                $this
                    ->installed(false)
                    ->uninstallWhoops()
                    ->restoreState();

                throw new Doozr_Debugging_Exception(
                    sprintf('Debugging could not be installed! Error: %s', $exception->getMessage())
                );
            }

        } else {
            throw new Doozr_Debugging_Exception(
                'Debugging is already installed!'
            );
        }

        // Enable chaining
        return $this;
    }
public function install ( ) { // Check if not installed ... if ( true !== $ this -> isInstalled ( ) ) { try { $ this -> dumpState ( ) // Backup current state -> installed ( true ) // 1st mark that it installed -> makeVerbose ( ) // Enable the complete output of PHP's errors -> whoops ( new Run ( ) ) // Create a Whoops instance -> installWhoops ( ) // Install Whoops Exception Handler -> getLogger ( ) -> debug ( 'Debugging tools installed.' ) ; } catch ( Doozr_Debugging_Exception $ exception ) { $ this -> installed ( false ) -> uninstallWhoops ( ) -> restoreState ( ) ; throw new Doozr_Debugging_Exception ( sprintf ( 'Debugging could not be installed! Error: %s' , $ exception -> getMessage ( ) ) ) ; } } else { throw new Doozr_Debugging_Exception ( 'Debugging is already installed!' ) ; } // Enable chaining return $ this ; }
Enables debugging by making the system verbose and by enabling PHP to fetch all errors, notice and so on.

@author Benjamin Carl <opensource@clickalicious.de>
@return $this Instance for chaining
@access public
@throws
Enables debugging by making the system verbose and by enabling PHP to fetch all errors notice and so on .