$files->compileIncludeOnce() method

Compile and include_once() the given file

Usage

// basic usage
$files->compileIncludeOnce(string $file);

// usage with all arguments
$files->compileIncludeOnce(string $file, array $options = []);

Arguments

NameType(s)Description
filestring

File to compile and include

options (optional)array

Optional associative array of the following:

  • includes (bool): Also compile files include()'d from the given $file? (default=true)
  • namespace (bool): Compile to make compatible with ProcessWire namespace? (default=true)
  • modules (bool): Allow FileCompilerModule module's to process the file as well? (default=false)
  • skipIfNamespace (bool): Return source $file if it declares a namespace (default=false)

Exceptions

Method can throw exceptions on error:

  • WireException - if given invalid $file or other fatal error


$files methods and properties

API reference based on ProcessWire core version 3.0.185

Twitter updates

  • ProcessWire 3.0.190 has 15 commits relative to 3.0.189 and contains a mixture of issue resolutions and feature additions. We’ll review these below, in addition to updates for the PageAutosave and ProFields Table modules— More
    3 December 2021
  • Great video by @jlahijani that demonstrates his ProcessWire page builder using ProFields Repeater Matrix, the new Page Autosave + Live Preview module and Uikit 3— youtube.com/watch?v=Rb5kiU…
    13 November 2021
  • More development on page automatic save this week, plus the addition of live preview— More
    12 November 2021

Latest news

  • ProcessWire Weekly #395
    In the 395th issue of ProcessWire Weekly we'll cover the latest core updates, check out the MJLM to HTML module, and more. Read on!
    Weekly.pw / 4 December 2021
  • ProcessWire 3.0.190 core updates
    ProcessWire 3.0.190 has 15 commits relative to 3.0.189 and contains a mixture of issue resolutions and feature additions. This post covers them all, in addition to updates for the PageAutosave and ProFields Table modules.
    Blog / 3 December 2021
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer