How to disable all qform functionality

thread: 4 messages  |  last: a year ago  |  started: saturday, march 27, 2010, 7:14 pm pdt


#1  |  David B (Adelaide, SA) Australia
Saturday, March 27, 2010, 7:14 PM PDT

Hi all,

Sorry I know that this is documented somewhere, or it is in the forums somewhere, but I can't find it!

Could someone please tell me how to disable all qform functionality, I don't need it for a project. I just need the code generation & data classes.

thanks
DaveB

#2  |  Zbyszek Czarnecki (Warsaw, PL) Poland
Saturday, March 27, 2010, 7:33 PM PDT

qcodo.inc.php file, you can permanently disable it there

#3  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Saturday, March 27, 2010, 9:12 PM PDT

And specifically, all you have to do is comment out the following lines in qcodo.inc.php:

    QApplicationBase::$PreloadedClassFile['_enumerations'] = __QCODO_CORE__ . '/qform/_enumerations.inc.php';
    QApplicationBase::$PreloadedClassFile['qcontrolbase'] = __QCODO_CORE__ . '/qform/QControlBase.class.php';
    QApplicationBase::$PreloadedClassFile['qcontrol'] = __QCODO__ . '/qform/QControl.class.php';
    QApplicationBase::$PreloadedClassFile['qformbase'] = __QCODO_CORE__ . '/qform/QFormBase.class.php';
    QApplicationBase::$PreloadedClassFile['qform'] = __QCODO__ . '/qform/QForm.class.php';
    QApplicationBase::$PreloadedClassFile['_actions'] = __QCODO_CORE__ . '/qform/_actions.inc.php';
    QApplicationBase::$PreloadedClassFile['_events'] = __QCODO_CORE__ . '/qform/_events.inc.php';

Once those are commented out, you've essentially “disabled” qforms.

Although, just a head's up -- if you are using a PHP opcode cache (e.g. APC) which would be highly recommended on any application that you are trying to improve performance for, then there's actually little need to do even this.  If you simply don't call a QForm object, it will never get used.  And of course having the code on disk has no affect on performance either.

#4  |  David B (Adelaide, SA) Australia
Saturday, March 27, 2010, 11:52 PM PDT

Cool, thanks for that Zbyszek and Mike :) I think I will just leave it enabled then and not startup any objects. Size of code on disk is not bothering me.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.