public static function run($function, $existing_version = null)
        {
            static::$existing_version = $existing_version;

            try {
                $canProceed = static::$function();

                return ($canProceed === false) ? false : true;
            } catch (DatabaseException $e) {
                Symphony::Log()->pushToLog('Could not complete upgrading. MySQL returned: ' . $e->getDatabaseErrorCode() . ': ' . $e->getMessage(), E_ERROR, true);

                return false;
            } catch (Exception $e) {
                Symphony::Log()->pushToLog('Could not complete upgrading because of the following error: ' . $e->getMessage(), E_ERROR, true);

                return false;
            }
        }
public static function run($function, $existing_version = null)
        {
            static::$existing_version = $existing_version;

            try {
                $canProceed = static::$function();

                return ($canProceed === false) ? false : true;
            } catch (DatabaseException $e) {
                Symphony::Log()->pushToLog('Could not complete upgrading. MySQL returned: ' . $e->getDatabaseErrorCode() . ': ' . $e->getMessage(), E_ERROR, true);

                return false;
            } catch (Exception $e) {
                Symphony::Log()->pushToLog('Could not complete upgrading because of the following error: ' . $e->getMessage(), E_ERROR, true);

                return false;
            }
        }
public static function run ( $ function , $ existing_version = null ) { static :: $ existing_version = $ existing_version ; try { $ canProceed = static :: $ function ( ) ; return ( $ canProceed === false ) ? false : true ; } catch ( DatabaseException $ e ) { Symphony :: Log ( ) -> pushToLog ( 'Could not complete upgrading. MySQL returned: ' . $ e -> getDatabaseErrorCode ( ) . ': ' . $ e -> getMessage ( ) , E_ERROR , true ) ; return false ; } catch ( Exception $ e ) { Symphony :: Log ( ) -> pushToLog ( 'Could not complete upgrading because of the following error: ' . $ e -> getMessage ( ) , E_ERROR , true ) ; return false ; } }
While we are supporting PHP5.2, we can't do this neatly as 5.2
lacks late static binding. `self` will always refer to `Migration`,
not the calling class, ie. `Migration_202`.
In Symphony 2.4, we will support PHP5.3 only, and we can have this
efficiency!

@return boolean
true if successful, false otherwise
While we are supporting PHP5 . 2 we can t do this neatly as 5 . 2 lacks late static binding . self will always refer to Migration not the calling class ie . Migration_202 . In Symphony 2 . 4 we will support PHP5 . 3 only and we can have this efficiency!