Example #1
0
 public function testAutoload()
 {
     $this->assertFalse(class_exists('FooBarFoo'), '->load() tries to load classes that does not begin with Link');
     $this->assertFalse(Link_Autoloader::load('Foo'), '->load() does not return false if it is not able to load a class');
     $this->assertTrue(Link_Autoloader::load('Link_Environment'), '->load() does not successfully loads a Link TPL class');
     $this->assertFalse(Link_Autoloader::load('Link\\Mock'), '->load() does not return false if a Link class does not exist');
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function __construct()
 {
     // -- Note : when the PSR-0 system will be put in place, these lines shall disappear
     require __DIR__ . '/../../vendor/Link-TPL/lib/Link/Autoloader.php';
     \Link_Autoloader::register();
     $dir = __DIR__ . '/../../views';
     // -- loaders
     $loader = new \Link_Loader_Filesystem($dir . '/templates');
     $cache = new \Link_Cache_Filesystem($dir . '/cache');
     $this->_engine = new \Link_Environnement($loader, $cache, array());
 }
Example #3
0
<?php

/**
 * This file is part of Link TPL.
 *
 * For the full copyright and license information, please view the LICENSE file
 * that was distributed with this source code.
 *
 * @copyright Copyleft (c) 2007+, Baptiste ClaviƩ, Talus' Works
 * @link      http://www.talus-works.net Talus' Works
 * @license   http://www.opensource.org/licenses/BSD-3-Clause Modified BSD License
 * @version   $Id: 4e308dd473a3e4830ce5efb3492ea779346ff606 $
 */
require dirname(__FILE__) . '/../lib/Link/Autoloader.php';
Link_Autoloader::register();