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

Was it helpful?

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();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top