From a49cfea32657c599ccdad1b9d13d1be5f1bf21e6 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Mon, 14 Jun 2021 11:02:17 -0500 Subject: [PATCH 1/4] Fold in comments from the site. --- reference/var/functions/is-callable.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/reference/var/functions/is-callable.xml b/reference/var/functions/is-callable.xml index 9c55aac3c59f..664e9261700e 100644 --- a/reference/var/functions/is-callable.xml +++ b/reference/var/functions/is-callable.xml @@ -4,7 +4,7 @@ is_callable - Verify that the contents of a variable can be called as a function + Verify that the contents of a variable can be called as a function from the current scope. @@ -69,6 +69,20 @@ + + An object is always callable if it implements __invoke(). + A class name is callable if it implements __callStatic() + + If an object implements __call(), then this function will + return true for any method on that object, even if the method is not defined. + + + + This function may trigger autoloading if called with the name of a class. + + + + &reftitle.examples; From bd10d9664e481d5a16fdcdd8f3e4d380c1255db5 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Mon, 14 Jun 2021 16:34:02 -0500 Subject: [PATCH 2/4] Move to bulleted list. --- reference/var/functions/is-callable.xml | 33 ++++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/reference/var/functions/is-callable.xml b/reference/var/functions/is-callable.xml index 664e9261700e..7e37135e27f6 100644 --- a/reference/var/functions/is-callable.xml +++ b/reference/var/functions/is-callable.xml @@ -4,7 +4,7 @@ is_callable - Verify that the contents of a variable can be called as a function from the current scope. + Verify that a value can be called as a function from the current scope. @@ -69,20 +69,6 @@ - - An object is always callable if it implements __invoke(). - A class name is callable if it implements __callStatic() - - If an object implements __call(), then this function will - return true for any method on that object, even if the method is not defined. - - - - This function may trigger autoloading if called with the name of a class. - - - - &reftitle.examples; @@ -165,6 +151,23 @@ bool(false) + + + + An object is always callable if it implements __invoke(), + and that method is visible in the current scope. + + A class name is callable if it implements __callStatic() + + If an object implements __call(), then this function will + return true for any method on that object, even if the method is not defined. + + + This function may trigger autoloading if called with the name of a class. + + + + &reftitle.seealso; From 72abe4a78f9718badfad68fa0db82e07d21ccb94 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Mon, 14 Jun 2021 16:52:06 -0500 Subject: [PATCH 3/4] Syntax fix. --- reference/var/functions/is-callable.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reference/var/functions/is-callable.xml b/reference/var/functions/is-callable.xml index 7e37135e27f6..455f7af621a5 100644 --- a/reference/var/functions/is-callable.xml +++ b/reference/var/functions/is-callable.xml @@ -153,18 +153,18 @@ bool(false) - + An object is always callable if it implements __invoke(), and that method is visible in the current scope. - - A class name is callable if it implements __callStatic() - + + A class name is callable if it implements __callStatic() + If an object implements __call(), then this function will return true for any method on that object, even if the method is not defined. - - + + This function may trigger autoloading if called with the name of a class. - + From 215ec2dde67e54fa70ebe74c4679ba5d2ae830e3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 15 Jun 2021 00:03:21 +0200 Subject: [PATCH 4/4] Update reference/var/functions/is-callable.xml --- reference/var/functions/is-callable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/var/functions/is-callable.xml b/reference/var/functions/is-callable.xml index 455f7af621a5..6e899e06e0e5 100644 --- a/reference/var/functions/is-callable.xml +++ b/reference/var/functions/is-callable.xml @@ -151,7 +151,7 @@ bool(false) - + An object is always callable if it implements __invoke(),