function list doesn't work with private or public keyword?

Syntax highlighting, code folding, brace matching, code indenting, and function list

function list doesn't work with private or public keyword?

Postby erikig » Wed Jun 22, 2005 6:08 am

Hi,

starting to use OOP in PHP 5, I found that my PHP method:

private function name()

will not appear in the function list. I edited the wordfile.txt and managed to get at least two options in front of the function keyword working, but the third will not work.

Works:
/Function String 2 = "%[^t ]++^{public^}^{protected^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"

This works for public and protected, but I don't have a clue how to add a third element "private" can work and how I could implement the optional element "abstract". Looks I don't know enough about the UltraEdit RegEx.

Thanx for any suggestions.
Burkhart
User avatar
erikig
Newbie
 
Posts: 3
Joined: Thu Sep 01, 2005 11:00 pm

Re: function list doesn't work with private/public keyword

Postby Mofi » Mon Jun 05, 2006 2:18 pm

Next time list more function examples. I have to get the necessary information about "abstract" via an internet search engine because I have no knowledge about PHP5.

Following 3 additional function strings should now add all your functions to the function list:

/Function String 2 = "%[^t ]++^{public^}^{protected^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"
/Function String 3 = "%[^t ]++^{private^}^{abstract[^t ]+private^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"
/Function String 4 = "%[^t ]++abstract[^t ]+^{public^}^{protected^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"

Also possibe is:

/Function String 2 = "%[^t ]++^{public^}^{abstract[^t ]+public^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"
/Function String 3 = "%[^t ]++^{private^}^{abstract[^t ]+private^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"
/Function String 4 = "%[^t ]++^{protected^}^{abstract[^t ]+protected^}[^t ]+function[^t ]+^([a-z0-9_&]+^)"
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4058
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Syntax Highlighting