idea-php-toolbox icon indicating copy to clipboard operation
idea-php-toolbox copied to clipboard

targets should be lookup_string aware

Open oqq opened this issue 10 years ago • 0 comments

Under some circumstances it is necessary to be aware to current provided lookup_string. e.g.

{
    "providers": [
        {
          "name": "template_files",
            "items": [
                {
                    "type_text": "template filename",
                    "target": "file://app/resources/templates/$1"
                }
            ]
        }
    ]
}

With this example it is possible to strg-click to any template file given by lookup_string available in some directories.

$templateParser->render('index.html.php'); or $templateParser->render('sub/path/template_file.html.php');

To go more further, it should be also possible to provide target by any other provider function/const/member/field.

e.g.

<?php
class TemplateParser 
{
    public function getRelativeTemplatePath($file = '')
    {
        return "app/resources/templates/$file";
    }
}

thanks!

oqq avatar Feb 23 '16 13:02 oqq