Logo Search packages:      
Sourcecode: d-push version File versions  Download package

Mail_RFC822::_hasUnclosedBrackets ( string,

Checks if a string has an unclosed brackets or not. IMPORTANT: This function handles both angle brackets and square brackets;


string$stringThe string to check.
string$charsThe characters to check for.
boolean True if there are unclosed brackets inside the string, false otherwise.

Definition at line 371 of file z_RFC822.php.

References _hasUnclosedBracketsSub().

Referenced by _splitCheck().

        $num_angle_start = substr_count($string, $chars[0]);
        $num_angle_end   = substr_count($string, $chars[1]);

        $this->_hasUnclosedBracketsSub($string, $num_angle_start, $chars[0]);
        $this->_hasUnclosedBracketsSub($string, $num_angle_end, $chars[1]);

        if ($num_angle_start < $num_angle_end) {
            $this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')';
            return false;
        } else {
            return ($num_angle_start > $num_angle_end);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index