|
@@ 71-75 (lines=5) @@
|
| 68 |
|
$result = false; |
| 69 |
|
$pair = $this->generateRulePair($line, self::SUB_DIRECTIVES); |
| 70 |
|
switch ($pair['directive']) { |
| 71 |
|
case self::DIRECTIVE_ALLOW: |
| 72 |
|
foreach ($this->userAgent as $userAgent) { |
| 73 |
|
$result = $this->allow[$userAgent]->add($pair['value']); |
| 74 |
|
} |
| 75 |
|
return $result; |
| 76 |
|
case self::DIRECTIVE_CACHE_DELAY: |
| 77 |
|
foreach ($this->userAgent as $userAgent) { |
| 78 |
|
$result = $this->cacheDelay[$userAgent]->add($pair['value']); |
|
@@ 76-80 (lines=5) @@
|
| 73 |
|
$result = $this->allow[$userAgent]->add($pair['value']); |
| 74 |
|
} |
| 75 |
|
return $result; |
| 76 |
|
case self::DIRECTIVE_CACHE_DELAY: |
| 77 |
|
foreach ($this->userAgent as $userAgent) { |
| 78 |
|
$result = $this->cacheDelay[$userAgent]->add($pair['value']); |
| 79 |
|
} |
| 80 |
|
return $result; |
| 81 |
|
case self::DIRECTIVE_CRAWL_DELAY: |
| 82 |
|
foreach ($this->userAgent as $userAgent) { |
| 83 |
|
$result = $this->crawlDelay[$userAgent]->add($pair['value']); |
|
@@ 81-85 (lines=5) @@
|
| 78 |
|
$result = $this->cacheDelay[$userAgent]->add($pair['value']); |
| 79 |
|
} |
| 80 |
|
return $result; |
| 81 |
|
case self::DIRECTIVE_CRAWL_DELAY: |
| 82 |
|
foreach ($this->userAgent as $userAgent) { |
| 83 |
|
$result = $this->crawlDelay[$userAgent]->add($pair['value']); |
| 84 |
|
} |
| 85 |
|
return $result; |
| 86 |
|
case self::DIRECTIVE_DISALLOW: |
| 87 |
|
foreach ($this->userAgent as $userAgent) { |
| 88 |
|
$result = $this->disallow[$userAgent]->add($pair['value']); |
|
@@ 86-90 (lines=5) @@
|
| 83 |
|
$result = $this->crawlDelay[$userAgent]->add($pair['value']); |
| 84 |
|
} |
| 85 |
|
return $result; |
| 86 |
|
case self::DIRECTIVE_DISALLOW: |
| 87 |
|
foreach ($this->userAgent as $userAgent) { |
| 88 |
|
$result = $this->disallow[$userAgent]->add($pair['value']); |
| 89 |
|
} |
| 90 |
|
return $result; |
| 91 |
|
} |
| 92 |
|
return false; |
| 93 |
|
} |