예제 #1
0
 private function saveNode(Node $node = null)
 {
     if ($node === null) {
         return;
     }
     $this->saveNode($node->rightNode);
     $this->saveNode($node->leftNode);
     if ($node->valueType === 1 && $node->subNode !== null) {
         $node->value = $this->saveNode($node->subNode);
     }
     if ($node->pointer === 0) {
         $node->pointer = $this->storage->add($node->pack());
     } else {
         $this->storage->update($node->pointer, $node->pack());
     }
     return $node->pointer;
 }
예제 #2
0
파일: Evasive.php 프로젝트: aporat/evasive
 /**
  *
  * @param int $counter            
  */
 public function updateLastRequestCounter($count)
 {
     $this->storage->update(['request_count' => $count]);
 }