protected function getWsdlElementAttributes($comment)
    {
        $nillable = $minOccurs = $maxOccurs = null;
        if (preg_match('/{(.+)}/', $comment, $attr)) {
            if (preg_match_all('/((\w+)\s*=\s*(\w+))/mi', $attr[1], $attr)) {
                foreach ($attr[2] as $id => $prop) {
                    $prop = strtolower($prop);
                    $val = strtolower($attr[3][$id]);
                    if ($prop == 'nillable') {
                        if ($val == 'false' || $val == 'true') {
                            $nillable = $val;
                        } else {
                            $nillable = $val ? 'true' : 'false';
                        }
                    } elseif ($prop == 'minoccurs') {
                        $minOccurs = intval($val);
                    } elseif ($prop == 'maxoccurs') {
                        $maxOccurs = ($val == 'unbounded') ? 'unbounded' : intval($val);
                    }
                }
            }
        }
        return [
            'nillable' => $nillable,
            'minOccurs' => $minOccurs,
            'maxOccurs' => $maxOccurs
        ];
    }
protected function getWsdlElementAttributes($comment)
    {
        $nillable = $minOccurs = $maxOccurs = null;
        if (preg_match('/{(.+)}/', $comment, $attr)) {
            if (preg_match_all('/((\w+)\s*=\s*(\w+))/mi', $attr[1], $attr)) {
                foreach ($attr[2] as $id => $prop) {
                    $prop = strtolower($prop);
                    $val = strtolower($attr[3][$id]);
                    if ($prop == 'nillable') {
                        if ($val == 'false' || $val == 'true') {
                            $nillable = $val;
                        } else {
                            $nillable = $val ? 'true' : 'false';
                        }
                    } elseif ($prop == 'minoccurs') {
                        $minOccurs = intval($val);
                    } elseif ($prop == 'maxoccurs') {
                        $maxOccurs = ($val == 'unbounded') ? 'unbounded' : intval($val);
                    }
                }
            }
        }
        return [
            'nillable' => $nillable,
            'minOccurs' => $minOccurs,
            'maxOccurs' => $maxOccurs
        ];
    }
protected function getWsdlElementAttributes ( $ comment ) { $ nillable = $ minOccurs = $ maxOccurs = null ; if ( preg_match ( '/{(.+)}/' , $ comment , $ attr ) ) { if ( preg_match_all ( '/((\w+)\s*=\s*(\w+))/mi' , $ attr [ 1 ] , $ attr ) ) { foreach ( $ attr [ 2 ] as $ id => $ prop ) { $ prop = strtolower ( $ prop ) ; $ val = strtolower ( $ attr [ 3 ] [ $ id ] ) ; if ( $ prop == 'nillable' ) { if ( $ val == 'false' || $ val == 'true' ) { $ nillable = $ val ; } else { $ nillable = $ val ? 'true' : 'false' ; } } elseif ( $ prop == 'minoccurs' ) { $ minOccurs = intval ( $ val ) ; } elseif ( $ prop == 'maxoccurs' ) { $ maxOccurs = ( $ val == 'unbounded' ) ? 'unbounded' : intval ( $ val ) ; } } } } return [ 'nillable' => $ nillable , 'minOccurs' => $ minOccurs , 'maxOccurs' => $ maxOccurs ] ; }
Parse attributes nillable, minOccurs, maxOccurs
@param string $comment Extracted PHPDoc comment
@return array
Parse attributes nillable minOccurs maxOccurs