Пример #1
0
 static function buildQuery($array)
 {
     $standard = array();
     foreach ($array as $k => $v) {
         //exclude standard array handling from php array handling
         if (is_array($v) && !preg_match('@\\[.*\\]$@', $k)) {
             $key = urlencode($k);
             foreach ($v as $v2) {
                 $standard[] = $key . '=' . urlencode($v2);
             }
             unset($array[$k]);
         }
     }
     $phpquery = http_build_query($array);
     $standard = implode('&', $standard);
     return Arrays::implode('&', array($phpquery, $standard));
 }
Пример #2
0
 protected function getNode($node)
 {
     if ($node && Tool::isInt($node)) {
         return $this->db->row($this->table, $node, Arrays::implode(',', ['id', 'order_in', 'order_out', 'order_depth', $this->fkColumn]));
     }
     return (array) $node;
 }