_command = $value; } public function execCommand($param){ foreach($param as $key =>$val){  $this->_command->isValue($val); } }}class doCommand implements ICommand{ public function isValue($val){ if($val){ echo $val.'\n'; } }}class famCommand implements ICommand{ public function isValue($val){ if($val != 'famCommand'){ return 'famCommand'; } }}$claim = new CommonClain(new doCommand());echo $claim->execCommand(array(1,22,33,44,55));