@param array $array

@return WishListItem
161952
protected function doCreateObject(array $array)
    {
        $orderItem = new WishListItem($array);
        if (isset($array['products']) && $product = reset($array['products'])) {
            $productMapper = new ProductsMapper();

            if (isset($array['images'])) {
                $product['images'] = $array['images'];
            }

            $orderItem->product = $productMapper->createObject($product);
        }

        return $orderItem;
    }
80310
public static function arrayToMask($array)
    {
        $mask = self::NONE_MASK;

        if (empty($array) || !is_array($array)) {
            return $mask;
        }

        foreach ($array as $verb) {
            switch ($verb) {
                case self::GET:
                    $mask |= self::GET_MASK;
                    break;
                case self::POST:
                    $mask |= self::POST_MASK;
                    break;
                case self::PUT:
                    $mask |= self::PUT_MASK;
                    break;
                case self::PATCH:
                    $mask |= self::PATCH_MASK;
                    break;
                case self::DELETE:
                    $mask |= self::DELETE_MASK;
                    break;
                case self::OPTIONS:
                    $mask |= self::OPTIONS_MASK;
                    break;
                case self::HEAD:
                    $mask |= self::HEAD_MASK;
                    break;
                case self::COPY:
                    $mask |= self::COPY_MASK;
                    break;
                case self::TRACE:
                    $mask |= self::TRACE_MASK;
                    break;
                case self::CONNECT:
                    $mask |= self::CONNECT_MASK;
                    break;
            }
        }

        return $mask;
    }
514712
public function doDebit(array $array)
    {
        $this->formatRequest($array);
        $WSRequest = array(
            'payment'                => $this->payment($array['payment']),
            'card'                   => $this->card($array['card']),
            'order'                  => $this->order($array['order']),
            'privateDataList'        => $this->privateData,
            'buyer'                  => $this->buyer($array['buyer'], $array['shippingAddress'], $array['billingAddress']),
            'authentication3DSecure' => $this->authentication3DSecure($array['3DSecure']),
            'authorization'          => $this->authorization($array['authorization']),
            'subMerchant'            => $this->subMerchant($array['subMerchant'])
        );
        return $this->webServiceRequest($array, $WSRequest, self::DIRECT_API, 'doDebit');
    }
1157704
protected function listifyTagLookup($array) {
        ksort($array);
        $list = array();
        foreach ($array as $name => $discard) {
            if ($name !== '#PCDATA' && !isset($this->def->info[$name])) continue;
            $list[] = $name;
        }
        return $this->listify($list);
    }
1348608
public function filterArray($array)
    {
        $newArray = array();

        foreach ($array as $key => $row) {
            foreach ($this->columnToFilter as $column) {
                if (!array_key_exists($column, $row)) {
                    continue;
                }

                if (self::match($this->patternToSearchQuoted, $row[$column], $this->invertedMatch)) {
                    $newArray[$key] = $row;
                    continue 2;
                }
            }
        }

        return $newArray;
    }
70213
private function getArray(Array_ $array)
    {
        $return = [];

        foreach ($array->items as $item) {
            if ($item->key === null) {
                $return[] = $this->getValue($item->value);
            } else {
                $return[$this->getValue($item->key)] = $this->getValue($item->value);
            }
        }

        return $return;
    }
984685
public static function getItems($array, $keys = null)
    {
        if (is_null($keys)) {
            return $array;
        } elseif (is_scalar($keys)) {
            $keys = [$keys => $array[$keys]];
        }
        $res = [];
        foreach ($keys as $k) {
            if (array_key_exists($k, $array)) {
                $res[$k] = $array[$k];
            }
        }
        return $res;
    }
788707
public function doCapture(array $array)
    {
        $WSRequest = array(
            'transactionID'   => $array['transactionID'],
            'payment'         => $this->payment($array['payment']),
            'privateDataList' => $this->privateData,
            'sequenceNumber'  => $array['sequenceNumber']
        );
        return $this->webServiceRequest($array, $WSRequest, self::DIRECT_API, 'doCapture');
    }
775455
private static function __s_array($array)
    {
        $border    = new Border(Border::TYPE_FRAME);
        $structure = new Structure(Structure::TYPE_ARRAY, '', null, '|', $border);

        return static::buildStructure($array, $structure);
    }
232835
public function setArray(array $array)
    {
        $this->array = array_values($array);
        $this->arraySize = count($this->array);
        $this->rewind();

        return $this;
    }
61715
public static function fromArray(array $array)
    {
        $hostname       = $array['hostname'] ?? null;
        $challengeTs    = $array['challenge_ts'] ?? null;
        $apkPackageName = $array['apk_package_name'] ?? null;

        if (isset($array['success']) && $array['success'] == true)
            return new static(true, [], $hostname, $challengeTs, $apkPackageName);

        if ( ! (isset($array['error-codes']) && is_array($array['error-codes'])))
            $array['error-codes'] = [ResponseV3::E_UNKNOWN_ERROR];

        return new static(false, $array['error-codes'], $hostname, $challengeTs, $apkPackageName);
    }
328898
public static function createFromArray(array $array): self
    {
        $map = new self;

        foreach ($array as $key => $value) {
            $map->put($key, $value);
        }

        return $map;
    }
539626
public static function listToMultiArray($array)
    {
        $nested = [];
        $depths = [];

        foreach ($array as $key => $arr) {

            if ($arr['depth'] == 0) {
                $nested[$key] = $arr;
            } else {
                $parent =& $nested;

                for ($i = 1; $i <= ($arr['depth']); $i++) {
                    $parent =& $parent[$depths[$i]];
                }

                $parent['pages'][$key] = $arr;
            }

            $depths[$arr['depth'] + 1] = $key;
        }

        return $nested;
    }
987605
public static function toMap(array $array) {
			$map = new SimpleMap();

			foreach ($array as $k => $v)
				$map->put($k, $v);

			return $map;
		}
679579
public function mergeRecursive($array)
    {
        if ($this->isInstanceOf($array, $this)) {
            $array = $array->val();
        }

        $this->val(array_merge_recursive($this->val(), $array));

        return $this;
    }
1075571
public function addParameters(array $array)
  {
    foreach ($array as $key => $val) {
      $this->addParameter($key, $val);
    }

    return $this->sortParameters();
  }
241055
protected function filterResults(array $array)
    {
        $curWord = $this->context->getCurrentWord();

        return array_filter($array, function($val) use ($curWord) {
            return fnmatch($curWord.'*', $val);
        });
    }