Question

I need develop a custom class/widget in my Phalcon project So that it can be used anywhere in the program.
Like yii widgets.
Please help

Était-ce utile?

La solution

You need register another directory/namespace such as the documentation says

<?php
// For Namespaces
$loader->registerNamespaces(
    array(
       //...
       "MyLib"    => "../app/library",
       "MyPlugin" => "../app/plugins",
    )
)->register();

// For directories
$loader->registerDirs(
    array(
        "../app/library/",
        "../app/plugins/"
    )
)->register();
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top