예제 #1
0
 static function checkNegaPosi($from, $to)
 {
     if ($from === "" || $to === "") {
         return false;
     }
     $chunks = Chunk::all();
     $result = null;
     foreach ($chunks as $chunk) {
         $_from = $chunk['from'];
         $_to = $chunk['to'];
         if (preg_match("/{$_from}/u", $from) && preg_match("/{$_to}/u", $to)) {
             $result = trim($chunk['nega_posi']);
             break;
         }
     }
     if ($result == null || $result == "non") {
         $result = "f";
     }
     return $result;
 }