I wanted to connect to the lotus notes database, so I am using COM
$session = new COM("Lotus.NotesSession");
Now I want to know which methods are supported in this object and How to use them. Actually my intention is to scan all the data for a particular pattern of data.
Here is a link
to the doc for the NotesSession class, and an index for all the other related classes available for working with data from Notes and Domino.
As the concepts of Notes and Domino development are somewhat different from what most people are used to, I recommend that you look for some tuturial material. Unfortunately, you're not going to find any tutorials specifically directed toward PHP, but the programming model is going to be essentially the same regardless of the language. Although it's quite old, this free IBM Redbook probably covers all the basics of the programming model. Also, PDFs of an even older Java-oriented book by the original developer of these classes, who gives a lot of clear insights into the concepts of Notes and Domino, is posted here.
As far as the way to "scan all the data for a particular pattern goes", the NotesDatabase.Search or NotesDatabase.FTSearch methods could be of interest to you -- but it's really difficult to know exactly what you mean by that. Doing what you actually need to do, and doing it efficiently, may require a completely different approach.