Пример #1
0
        /**
         * Creates a new quercus program
         *
         * @param quercus the owning quercus engine
         * @param sourceFile the path to the source file
         * @param statement the top-level statement
         */
        public QuercusProgram(QuercusContext quercus,
                              string sourceFile,
                              QuercusPage page)
        {
            _quercus      = quercus;
            _sourceFile   = sourceFile;
            _compiledPage = page;

            _depend = new BasicDependencyContainer();

            _topDepend = new BasicDependencyContainer();
            _topDepend.setCheckInterval(quercus.getDependencyCheckInterval());
            _topDepend.add(new PageDependency());
        }
Пример #2
0
        /**
         * Creates a new quercus program
         *
         * @param quercus the owning quercus engine
         * @param sourceFile the path to the source file
         * @param statement the top-level statement
         */
        public QuercusProgram(QuercusContext quercus,
                              string sourceFile,
                              HashMap <StringValue, Function> functionMap,
                              ArrayList <Function> functionList,
                              HashMap <String, InterpretedClassDef> classMap,
                              ArrayList <InterpretedClassDef> classList,
                              FunctionInfo functionInfo,
                              Statement statement)
        {
            _quercus = quercus;

            _depend = new BasicDependencyContainer();
            _depend.setCheckInterval(quercus.getDependencyCheckInterval());

            _topDepend = new BasicDependencyContainer();
            _topDepend.setCheckInterval(quercus.getDependencyCheckInterval());
            _topDepend.add(new PageDependency());

            _sourceFile = sourceFile;
            if (sourceFile != null)
            {
                addDepend(sourceFile);
            }

            _functionMap  = functionMap;
            _functionList = functionList;

            for (Map.Entry <StringValue, Function> entry : functionMap.entrySet())
            {
                _functionMapLowerCase.put(entry.getKey().toLowerCase(Locale.ENGLISH),
                                          entry.getValue());
            }

            _classMap  = classMap;
            _classList = classList;

            _functionInfo = functionInfo;
            _statement    = statement;
        }