Domanda

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

È stato utile?

Soluzione

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();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top