|
class theory
since i've pretty much taught myself most of what i know about classes, i thought i'd ask here about the logic on this specific issue.
i'm making a class called Agent.
functions within this class include:
createAgent() -enters new agent in the system
searchAgent($string) -searches agents and returns array of agent ids
setAgent($agent_id) -sets all agent properties
editAgent($agent_id) -edits agent properties
when i create a new Agent object, it really relates to just 1 agent. so if my searchAgent() function returns 5 Agent IDs, then 5 new Agent objects will be created.
here is my question .. should createAgent() and searchAgent() be in my Agent class? those 2 functions deal with ALL Agents, and setAgent() and editAgent() deal with 1 single agent.
if this doesnt' make sense.. i'll try again.
|