protected static function addJobByOperationType(
        OperationInterface $operation,
        \Closure $install,
        \Closure $uninstall,
        \Closure $update = null
    ) {
        switch ($operation->getJobType()) {
            case 'install':
                self::getContainer()->addJob($install($operation->getPackage()));
                break;
            case 'uninstall':
                self::getContainer()->addJob($uninstall($operation->getPackage()));
                break;
            case 'update':
                $update = $update ?: $install;
                self::getContainer()->addJob($update($operation->getTargetPackage()));
                break;
        }
    }
protected static function addJobByOperationType(
        OperationInterface $operation,
        \Closure $install,
        \Closure $uninstall,
        \Closure $update = null
    ) {
        switch ($operation->getJobType()) {
            case 'install':
                self::getContainer()->addJob($install($operation->getPackage()));
                break;
            case 'uninstall':
                self::getContainer()->addJob($uninstall($operation->getPackage()));
                break;
            case 'update':
                $update = $update ?: $install;
                self::getContainer()->addJob($update($operation->getTargetPackage()));
                break;
        }
    }
protected static function addJobByOperationType ( OperationInterface $ operation , \ Closure $ install , \ Closure $ uninstall , \ Closure $ update = null ) { switch ( $ operation -> getJobType ( ) ) { case 'install' : self :: getContainer ( ) -> addJob ( $ install ( $ operation -> getPackage ( ) ) ) ; break ; case 'uninstall' : self :: getContainer ( ) -> addJob ( $ uninstall ( $ operation -> getPackage ( ) ) ) ; break ; case 'update' : $ update = $ update ? : $ install ; self :: getContainer ( ) -> addJob ( $ update ( $ operation -> getTargetPackage ( ) ) ) ; break ; } }
Add job by operation type.

@param OperationInterface $operation
@param \Closure $install
@param \Closure $update
@param \Closure $uninstall
Add job by operation type .