CORE/core/view.php : 237 CORE/core/view.php : 196 CORE/core/controller.php : 120 APP/controller/tools/source.php : 75 CORE/core/controller.php : 89 CORE/core/controller.php : 70 CORE/core.php : 170 BASE/index.php : 9 0.00171 - Loading view "view/page/source.html" CORE/core/view.php : 237 CORE/core/view.php : 196 CORE/core/controller.php : 120 APP/controller/index.php : 65 APP/controller/tools/source.php : 75 CORE/core/controller.php : 89 CORE/core/controller.php : 70 CORE/core.php : 170 BASE/index.php : 9 0.00194 - Loading view "view/page.html" UltraLight Showcase

Source for library:sourcelist

<?php namespace App\Library;
/**
 * Custom example transform.
 */
class Sourcelist
{
    
/**
     * The url to the source blocks.
     */
    
const URL_BASE '/source/%s/%s';
    
/**
     * Configuration array.
     *
     * @var array
     */
    
private $_config;
    
/**
     * Currently active url.
     *
     * @var array
     */
    
private $_active;

    
/**
     * Construct with configuration variable.
     *
     * @param array $config
     */
    
public function __construct($config$active)
    {
        
$this->_config $config;
        
$this->_active $active;
    }

    
/**
     * Render to string.
     *
     * @return string
     */
    
public function __toString()
    {
        
$result = [];
        foreach (
$this->_config as $name => $details) {
            
$result[] = $this->_getRenderedGroup($name$details['files']);
        }
        return 
implode(PHP_EOL$result);
    }

    
/**
     * Render group to string.
     *
     * @param string $name
     * @param array $files
     * @return string
     */
    
private function _getRenderedGroup($name$files)
    {
        
$result = [
            
'<div class="list-group">',
            
'<div class="list-group-item disabled"><b>' ucfirst($name) . '</b></div>',
        ];
        foreach (
$files as $file) {
            
$url sprintf(self::URL_BASE$name$file);
            
$active = ($url == $this->_active) ? ' active' '';
            
$result[] = "<a href=\"{$url}\" class=\"list-group-item{$active}\">{$file}</a>";
        }
        
$result[] = '</div>';
        return 
implode(PHP_EOL$result);
    }
}
CORE/core.php : 185 BASE/index.php : 9 0.00238 - Loaded classes array (14) ( 'Show' => array (2) ( 'file' => "CORE/show.php", 'time' => 0.00016, ), 'Config' => array (2) ( 'file' => "CORE/config.php", 'time' => 0.00018, ), 'Core\Cache' => array (2) ( 'file' => "CORE/core/cache.php", 'time' => 0.00022, ), 'Core\Cache\File' => array (2) ( 'file' => "CORE/core/cache/file.php", 'time' => 0.00022, ), 'Core\Arrays' => array (2) ( 'file' => "CORE/core/arrays.php", 'time' => 0.00043, ), 'Request' => array (2) ( 'file' => "CORE/request.php", 'time' => 0.00072, ), 'Sanitize' => array (2) ( 'file' => "CORE/sanitize.php", 'time' => 0.00073, ), 'Core\Controller' => array (2) ( 'file' => "CORE/core/controller.php", 'time' => 0.0008, ), 'App\Controller\Index' => array (2) ( 'file' => "APP/controller/index.php", 'time' => 0.0008, ), '\App\Controller\Tools\Source' => array (2) ( 'file' => "APP/controller/tools/source.php", 'time' => 0.0008, ), 'Core\View' => array (2) ( 'file' => "CORE/core/view.php", 'time' => 0.00083, ), 'App\Library\Sourcelist' => array (2) ( 'file' => "APP/library/sourcelist.php", 'time' => 0.00165, ), 'Core\Format\Variable' => array (2) ( 'file' => "CORE/core/format/variable.php", 'time' => 0.0018, ), 'Core\Bootstrap\Navbar' => array (2) ( 'file' => "CORE/core/bootstrap/navbar.php", 'time' => 0.00191, ), ) CORE/core.php : 186 BASE/index.php : 9 0.00351 - Debug "Done."