dwoo-project / dwoo

[UNMAINTAINED] php template engine
http://dwoo.org
GNU Lesser General Public License v3.0
167 stars 58 forks source link

cant include the loader #68

Closed saiballo closed 7 years ago

saiballo commented 7 years ago

Hello,

I use last version of dwoo (1.3) but I can't include the php class. I use an example like this:

// Include the main class, the rest will be automatically loaded require './lib/Dwoo/Loader.php';

// Create the controller, it is reusable and can render multiple templates $core = new Dwoo\Core();

// Create some data $data = array('a'=>5, 'b'=>6);

// Output the result echo $core->get('index.tpl', $data);

but I had an error: Fatal error: Interface 'Dwoo\ILoader' not found

How can I install last version of dwoo? I don't use composer

thank you

saiballo commented 7 years ago

I haven't file 'autoload.php'...

emulienfou commented 7 years ago

Hi @saiballo, FYI the Loader class is used to Handles plugin loading and caching of plugins names/paths relationships.

To use Dwoo, you have to follow this documentation: http://dwoo.org/documentation/v1.3/getting-started.html

If you have already an autoload system, use it to load Dwoo classes, otherwise use Composer.

saiballo commented 7 years ago

Hi,

in the documentation you say:

" // Include the main class, the rest will be automatically loaded require 'vendor/autoload.php'; "

ok, I have download last version of dwoo... the path and the file "vendor/autoloadphp" does not exsist.

emulienfou commented 7 years ago

You need to use composer, it will generate the vendor/autoload.php file for you!

You have to do something like:

php composer.phar install
emulienfou commented 7 years ago

If you don't want to use composer, you need to include/require all files manually such as:

require './lib/Dwoo/Core.php';
require ...
saiballo commented 7 years ago

ok, I resolve using composer. thank you