Dharmas include all phenomena, whether they be physiological, psychological, social, internal or external. Some may think that dharmas only include physical (external) and physiological phenomena. They would not consider psychological phenomena, such as thoughts, to be dharmas. Buddhism considers all phenomena, physical or mental, to be dharmas. The six sense organs interact with the six kinds of sense objects: eyes see forms, ears hear sounds, etc. These are all dharmas. The sixth sense organ, consciousness, has thoughts as its object. The object of consciousness also includes the symbols, words and language which people use in thinking, reasoning, remembering and communicating. All of these symbols and thoughts are dharmas from the standpoint of Buddhadharma.
Let me make a distinction between dharma and Dharma. Dharma with a lower case "d" refers to any phenomenon. Dharma with an upper case "D" refers to Buddhadharma, or the teachings of the Buddha, the methods of practice and the principles and concepts which underlie practice. But remember, even the teachings of the Buddha and the methods of practice are themselves phenomena, or dharmas.
The Yogacara school explains three types of dharmas. The first type includes all physical objects, and is sometimes called the dharma of form. The second type includes mental dharmas, for example thoughts, moods and feelings. There are also dharmas which are neither physical nor mental. These are the symbols we use in conceptualizing thoughts, and include names, numbers, and abstract ideas such as space and time. Though these symbols are absolutely necessary when one is thinking and remembering, they are not the thoughts themselves. Therefore, they are not considered to be mental dharmas.
All three kinds of dharmas described above are called samskrita, or dharmas with outflows ─ that is, they are dharmas arising from attachment. All phenomena that are part of the world of ordinary sentient beings are considered dharmas with outflows. On the other hand, all phenomena that arise in connection with enlightened beings are dharmas without outflows, and are called asamskrita. Such dharmas include nirvana. True Suchness, and emptiness.