/**
  *
  * @param string $directiveString 
  * @return \webignition\RobotsTxt\Directive\Directive
  */
 public function getDirective($directiveString)
 {
     $directive = new \webignition\RobotsTxt\Directive\Directive();
     $directive->parse($directiveString);
     if ($directive->is(self::USER_AGENT_FIELD_NAME)) {
         $directive = new \webignition\RobotsTxt\UserAgentDirective\UserAgentDirective();
         $directive->parse($directiveString);
     }
     return $directive;
 }
 /**
  *
  * @param string $directiveString
  * @return \webignition\RobotsTxt\Directive\Directive 
  */
 protected function getNewDirective($directiveString)
 {
     $directive = new \webignition\RobotsTxt\UserAgentDirective\UserAgentDirective();
     $directive->parse($directiveString);
     return $directive;
 }