PHP utility collection with hybrid and fluent APIs.

⌈⌋ branch:  hybrid7 libraries


Check-in [d63339146a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Permit $_SERVER->method(["name"]) syntax as well (varnames get unpacked from single-entry array).
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d63339146a88977086fea06801f4e761312e401e
User & Date: mario 2014-06-17 02:27:36
Context
2014-06-18
15:54
Simplified __filter list back to also allow plain callback names instead of [name, args[]]. Restructured filter() varname checks. check-in: 23a6b15a36 user: mario tags: trunk
2014-06-17
02:27
Permit $_SERVER->method(["name"]) syntax as well (varnames get unpacked from single-entry array). check-in: d63339146a user: mario tags: trunk
2014-03-21
21:45
Introduce ellipse … syntax for merging literal params into filter method names. check-in: 3a4f2387a0 user: mario tags: trunk
Changes

Changes to php7/input.php.

769
770
771
772
773
774
775



776
777
778
779
780
781
782
783
                // must be in internal nested format
                $this->__filter = $this->rules[$varname];
            }
        }

        // retrieve value for selected input variable
        $this->__varname = $varname;



        if (isset($this->__vars[$varname])) {
            $data = $this->__vars[$varname];
        }
        elseif (count($this->__filter) and ("list" == $this->__filter[0][0])) {
            $data = NULL;    // do nothing, as values will be fetched by a multiplex handler
        }
        else {
            INPUT_QUIET or trigger_error("Undefined input variable \${$this->__title}['{$this->__varname}']", E_USER_NOTICE);   // undecorative







>
>
>
|







769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
                // must be in internal nested format
                $this->__filter = $this->rules[$varname];
            }
        }

        // retrieve value for selected input variable
        $this->__varname = $varname;
        if (is_array($varname) and count($varname)===1) {  // single array [["name"]] becomes varname
            $varname = current($varname);
        }
        if (isset($this->__vars[$varname])) {   // entry exists
            $data = $this->__vars[$varname];
        }
        elseif (count($this->__filter) and ("list" == $this->__filter[0][0])) {
            $data = NULL;    // do nothing, as values will be fetched by a multiplex handler
        }
        else {
            INPUT_QUIET or trigger_error("Undefined input variable \${$this->__title}['{$this->__varname}']", E_USER_NOTICE);   // undecorative