GithubHelp home page GithubHelp logo

kladrapi-php's People

Contributors

adeg avatar igolka97 avatar xescoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kladrapi-php's Issues

Add composer.json

It would be perfect if you register this library on the packagist website and put here composer json for it

При поиске с помощью OneString не учитывает ContentType

Запрос:

        $query = new Query();
        $query->ContentType = 'city';
        $query->ContentName = 'Тюменская область, Тобольск';
        $query->OneString = true;
        $query->WithParent = true;
        $query->Limit = 1;

Ответ:

stdClass Object
(
    [searchContext] => stdClass Object
        (
            [oneString] => 1
            [contentType] => city
            [query] => Тюменская область, Тобольск
            [withParent] => 1
            [limit] => 1
        )
    [result] => Array
        (
            [0] => stdClass Object
                (
                    [id] => 7201700000000
                    [name] => Тобольский
                    [zip] => 
                    [type] => Район
                    [typeShort] => р-н
                    [okato] => 71410000000
                    [contentType] => district
                    [fullName] => Тюменская Область, Тобольский Район
                    [parents] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 7200000000000
                                    [name] => Тюменская
                                    [zip] => 
                                    [type] => Область
                                    [typeShort] => обл
                                    [okato] => 71000000000
                                    [contentType] => region
                                )
                        )
                )
        )
)

Хотя указан $query->ContentType = 'city';

И еще - не плохо бы все это обернуть в composer.

Улучшения по юзабилити клиента

Привет.

Думаю что код функции ухудшает возможности работы с родительскими объектами. Почуму бы не завести опциональный параметр в QueryToJson $assoc = false который потом передавать в json_decode. В моем прокте мне понадобился параметр contentType для заполнения полей адреса после поиска по индексу.

Если что могу оформить ПР

Спасибо!

Как подставлять полные наименования объектов в форму?

Использую форму для ввода адреса и ваш плагин.
Ввожу "Краснод", предлагает Краснодярский край, выбираю, в форму подставляется Краснодарский без края. Каким образом сделать так, чтобы подставлялось полное наменование? Может, есть какие-то настройки для этого?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.