1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-14 02:34:24 +02:00

Make the functions API automatically enabled by default in core site profiles

This commit is contained in:
Ryan Cramer
2019-01-11 09:10:43 -05:00
parent 3517295e27
commit 1a94578b1e
5 changed files with 74 additions and 6 deletions

View File

@@ -17,7 +17,7 @@
* This file is licensed under the MIT license * This file is licensed under the MIT license
* https://processwire.com/about/license/mit/ * https://processwire.com/about/license/mit/
* *
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer * ProcessWire 3.x, Copyright 2019 by Ryan Cramer
* https://processwire.com * https://processwire.com
* *
*/ */
@@ -51,5 +51,19 @@ $config->debug = false;
*/ */
$config->prependTemplateFile = '_init.php'; $config->prependTemplateFile = '_init.php';
/**
* Allow core API variables to also be accessed as functions?
*
* Recommended. This enables API varibles like $pages to also be accessed as pages(),
* as an example. And so on for most other core variables.
*
* Benefits are better type hinting, always in scope, and potentially shorter API calls.
* See the file /wire/core/FunctionsAPI.php for details on these functions.
*
* @var bool
*
*/
$config->useFunctionsAPI = true;
/*** INSTALLER CONFIG ********************************************************************/ /*** INSTALLER CONFIG ********************************************************************/

View File

@@ -17,7 +17,7 @@
* This file is licensed under the MIT license * This file is licensed under the MIT license
* https://processwire.com/about/license/mit/ * https://processwire.com/about/license/mit/
* *
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer * ProcessWire 3.x, Copyright 2019 by Ryan Cramer
* https://processwire.com * https://processwire.com
* *
*/ */
@@ -40,6 +40,20 @@ if(!defined("PROCESSWIRE")) die();
*/ */
$config->debug = false; $config->debug = false;
/**
* Allow core API variables to also be accessed as functions?
*
* Recommended. This enables API varibles like $pages to also be accessed as pages(),
* as an example. And so on for most other core variables.
*
* Benefits are better type hinting, always in scope, and potentially shorter API calls.
* See the file /wire/core/FunctionsAPI.php for details on these functions.
*
* @var bool
*
*/
$config->useFunctionsAPI = true;
/*** INSTALLER CONFIG ********************************************************************/ /*** INSTALLER CONFIG ********************************************************************/

View File

@@ -17,7 +17,7 @@
* This file is licensed under the MIT license * This file is licensed under the MIT license
* https://processwire.com/about/license/mit/ * https://processwire.com/about/license/mit/
* *
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer * ProcessWire 3.x, Copyright 2019 by Ryan Cramer
* https://processwire.com * https://processwire.com
* *
*/ */
@@ -40,5 +40,19 @@ if(!defined("PROCESSWIRE")) die();
*/ */
$config->debug = false; $config->debug = false;
/**
* Allow core API variables to also be accessed as functions?
*
* Recommended. This enables API varibles like $pages to also be accessed as pages(),
* as an example. And so on for most other core variables.
*
* Benefits are better type hinting, always in scope, and potentially shorter API calls.
* See the file /wire/core/FunctionsAPI.php for details on these functions.
*
* @var bool
*
*/
$config->useFunctionsAPI = true;
/*** INSTALLER CONFIG ********************************************************************/ /*** INSTALLER CONFIG ********************************************************************/

View File

@@ -17,7 +17,7 @@
* This file is licensed under the MIT license * This file is licensed under the MIT license
* https://processwire.com/about/license/mit/ * https://processwire.com/about/license/mit/
* *
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer * ProcessWire 3.x, Copyright 2019 by Ryan Cramer
* https://processwire.com * https://processwire.com
* *
*/ */
@@ -62,7 +62,19 @@ $config->prependTemplateFile = '_init.php';
*/ */
$config->appendTemplateFile = '_main.php'; $config->appendTemplateFile = '_main.php';
/**
* Allow core API variables to also be accessed as functions?
*
* Recommended. This enables API varibles like $pages to also be accessed as pages(),
* as an example. And so on for most other core variables.
*
* Benefits are better type hinting, always in scope, and potentially shorter API calls.
* See the file /wire/core/FunctionsAPI.php for details on these functions.
*
* @var bool
*
*/
$config->useFunctionsAPI = true;
/*** INSTALLER CONFIG ********************************************************************/ /*** INSTALLER CONFIG ********************************************************************/

View File

@@ -17,7 +17,7 @@
* This file is licensed under the MIT license * This file is licensed under the MIT license
* https://processwire.com/about/license/mit/ * https://processwire.com/about/license/mit/
* *
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer * ProcessWire 3.x, Copyright 2019 by Ryan Cramer
* https://processwire.com * https://processwire.com
* *
*/ */
@@ -62,6 +62,20 @@ $config->prependTemplateFile = '_init.php';
*/ */
$config->appendTemplateFile = '_main.php'; $config->appendTemplateFile = '_main.php';
/**
* Allow core API variables to also be accessed as functions?
*
* Recommended. This enables API varibles like $pages to also be accessed as pages(),
* as an example. And so on for most other core variables.
*
* Benefits are better type hinting, always in scope, and potentially shorter API calls.
* See the file /wire/core/FunctionsAPI.php for details on these functions.
*
* @var bool
*
*/
$config->useFunctionsAPI = true;
/*** INSTALLER CONFIG ********************************************************************/ /*** INSTALLER CONFIG ********************************************************************/