public static function getBasesFromParamInfo(array $params, $argc)
    {
        static $blacklist = array(
            'null',
            'true',
            'false',
            'array(...)',
            'array()',
            '[...]',
            '[]',
            '(...)',
            '()',
            '"..."',
            'b"..."',
            "'...'",
            "b'...'",
        );

        $params = \array_values($params);
        $bases = array();

        for ($i = 0; $i < $argc; ++$i) {
            if (isset($params[$i])) {
                $param = $params[$i];
            } else {
                $param = null;
            }

            if (!isset($param['name']) || \is_numeric($param['name'])) {
                $name = null;
            } elseif (\in_array(\strtolower($param['name']), $blacklist, true)) {
                $name = null;
            } else {
                $name = $param['name'];
            }

            if (isset($param['path'])) {
                $access_path = $param['path'];

                if (!empty($param['expression'])) {
                    $access_path = '('.$access_path.')';
                }
            } else {
                $access_path = '$'.$i;
            }

            $bases[] = BasicObject::blank($name, $access_path);
        }

        return $bases;
    }
public static function getBasesFromParamInfo(array $params, $argc)
    {
        static $blacklist = array(
            'null',
            'true',
            'false',
            'array(...)',
            'array()',
            '[...]',
            '[]',
            '(...)',
            '()',
            '"..."',
            'b"..."',
            "'...'",
            "b'...'",
        );

        $params = \array_values($params);
        $bases = array();

        for ($i = 0; $i < $argc; ++$i) {
            if (isset($params[$i])) {
                $param = $params[$i];
            } else {
                $param = null;
            }

            if (!isset($param['name']) || \is_numeric($param['name'])) {
                $name = null;
            } elseif (\in_array(\strtolower($param['name']), $blacklist, true)) {
                $name = null;
            } else {
                $name = $param['name'];
            }

            if (isset($param['path'])) {
                $access_path = $param['path'];

                if (!empty($param['expression'])) {
                    $access_path = '('.$access_path.')';
                }
            } else {
                $access_path = '$'.$i;
            }

            $bases[] = BasicObject::blank($name, $access_path);
        }

        return $bases;
    }
public static function getBasesFromParamInfo ( array $ params , $ argc ) { static $ blacklist = array ( 'null' , 'true' , 'false' , 'array(...)' , 'array()' , '[...]' , '[]' , '(...)' , '()' , '"..."' , 'b"..."' , "'...'" , "b'...'" , ) ; $ params = \ array_values ( $ params ) ; $ bases = array ( ) ; for ( $ i = 0 ; $ i < $ argc ; ++ $ i ) { if ( isset ( $ params [ $ i ] ) ) { $ param = $ params [ $ i ] ; } else { $ param = null ; } if ( ! isset ( $ param [ 'name' ] ) || \ is_numeric ( $ param [ 'name' ] ) ) { $ name = null ; } elseif ( \ in_array ( \ strtolower ( $ param [ 'name' ] ) , $ blacklist , true ) ) { $ name = null ; } else { $ name = $ param [ 'name' ] ; } if ( isset ( $ param [ 'path' ] ) ) { $ access_path = $ param [ 'path' ] ; if ( ! empty ( $ param [ 'expression' ] ) ) { $ access_path = '(' . $ access_path . ')' ; } } else { $ access_path = '$' . $ i ; } $ bases [ ] = BasicObject :: blank ( $ name , $ access_path ) ; } return $ bases ; }
Creates base objects given parameter info.

@param array $params Parameters as returned from getCallInfo
@param int   $argc   Number of arguments the helper was called with

@return BasicObject[] Base objects for the arguments
Creates base objects given parameter info .