function factory($type, $native = null) { loader('dyn'); $what = ucfirst(Inflector::camelize($type . '_factory')); $class = 'Thin\\' . $what; if (!class_exists($class)) { $code = 'namespace Thin; class ' . $what . ' extends DynLib {}'; eval($code); } return new $class($native); }
function loader($path) { foreach (scandir($path) as $filename) { if ($filename === '.' || $filename === '..') { continue; } $fullPath = $path . '/' . $filename; if (is_file($fullPath)) { require_once $fullPath; } elseif (is_dir($fullPath)) { loader($fullPath); } } }
function add($filename, $patterns) { if (!is_string($filename)) { throw new \Exception('$filename argument must be string'); } if (is_string($patterns)) { $patterns = array($patterns); } else { if (!is_array($patterns)) { throw new \Exception('$patterns argument must be string or array'); } } $fullPath = implode('/', fromStack()); $fullFilename = empty($fullPath) ? $fullPath . '/' . $filename : $filename; $module = new Module($filename, realpath($fullFilename), $patterns); loader()->addModule($module); return $module; }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('session'); class SessionCore extends SessionLib { }
?> "></div> <?/*end comments*/?> </div> <?/*form*/?> <?include($_SERVER['DOCUMENT_ROOT'].'/includes/product/reviews/form.php');?> <?/*end form*/?> </div> <div class="tab-content-item" id="<?php echo $arParams['ROUTE_STORE']; ?> "> <div class="container"> <?php echo loader($arParams['ROUTE_STORE']); ?> <?/*store*/?> <div id="route-<?php echo $arParams['ROUTE_STORE']; ?> "></div> <?/*end store*/?> </div> </div> </div> </div> <?/*end more info and tabs*/?> </div>
function log_message($level = "error", $message = "") { static $_log; $_log =& loader("Log"); $_log->write_function($level, $message); }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2016 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('pipeline'); class QueueCore extends PipelineLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('misc'); class FluentCore extends MiscLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('ephemere'); class CacheCore extends EphemereLib { }
/** * scripts * * @since 1.2.1 * @deprecated 2.0.0 * * @package Redaxscript * @category Loader * @author Henry Ruhs * * @param string $mode */ function scripts($mode = '') { if ($mode == '') { $output = Redaxscript\Hook::trigger('script_start'); } /* parse loader ini */ $loader_ini = parse_ini_file('templates/' . Redaxscript\Registry::get('template') . '/scripts/.loader', 1); /* inherit from other templates */ $loader_inherit = $loader_ini['inherit']; if ($loader_inherit) { foreach ($loader_inherit as $key => $template) { $loader_inherit_ini = parse_ini_file('templates/' . $template . '/scripts/.loader', 1); $loader_ini = array_merge_recursive($loader_inherit_ini, $loader_ini); } } $loader_minify = $loader_ini['settings']['minify']; /* init mode */ if ($mode == 'init') { $output .= '<script> /* <![cdata[ */ ' . loader('scripts', 'init') . ' /* ]]> */ </script>' . PHP_EOL; } else { $loader_single = $loader_ini['single']; /* logged in */ if (LOGGED_IN == TOKEN) { $loader_admin_single = $loader_ini['admin_single']; } $loader_deploy = $loader_ini['settings']['deploy']; /* merge loader include as needed */ $loader_include = array(); if ($loader_single) { $loader_include = array_merge($loader_include, $loader_single); } if ($loader_admin_single) { $loader_include = array_merge($loader_include, $loader_admin_single); } /* collect output */ if ($loader_include) { foreach ($loader_include as $value) { $output .= '<script src="' . $value . '"></script>' . PHP_EOL; } } /* type of deployment */ $output .= '<script> /* <![cdata[ */ ' . scripts_transport($loader_minify); if ($loader_deploy == 'inline') { $output .= loader('scripts', 'inline') . ' /* ]]> */ </script>' . PHP_EOL; } else { $output .= ' /* ]]> */ </script>' . PHP_EOL; $output .= '<script src="' . REWRITE_ROUTE . 'loader/scripts"></script>' . PHP_EOL; } } if ($mode == '') { $output .= Redaxscript\Hook::trigger('script_end'); } echo $output; }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('redys'); class RedisCore extends RedysLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2013 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('loop'); class PromiseLib { /** * The asynchronous operation is pending. */ const PENDING = 0; /** * The asynchronous operation has completed, and has a result. */ const FULFILLED = 1; /** * The asynchronous operation has completed with an error. */ const REJECTED = 2; /** * The current state of this promise.
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2016 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('app'); class ContainerCore extends AppLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('mailer'); class MailCore extends MailerLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('log'); class LogCore extends LogLib { }
function load($loader) { $loader =& loader(); $loader->add_loader($loader); }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2016 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('routing'); class RouterCore extends RoutingLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('flat'); class LiteCore extends FlatLib { }
<?php loader()->registerNamespace("Kylewm\\Brevity", __DIR__ . '/external/brevity-php/src');
<?php namespace Thin; loader("model"); class BlazzSystemDbModel extends ModelLib { /* Make hooks of model */ public function _hooks() { $obj = $this; // $this->_hooks['beforeCreate'] = function () use ($obj) {}; // $this->_hooks['beforeRead'] = ; // $this->_hooks['beforeUpdate'] = ; // $this->_hooks['beforeDelete'] = ; // $this->_hooks['afterCreate'] = ; // $this->_hooks['afterRead'] = ; // $this->_hooks['afterUpdate'] = ; // $this->_hooks['afterDelete'] = ; // $this->_hooks['validate'] = function () use ($data) { // return true; // }; } }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('now'); class RegistryCore extends NowLib { }
<?php // require __DIR__ . '/vendor/autoload.php'; if (!function_exists('\\BarnabyWalters\\Mf2\\hasNumericKeys')) { require_once __DIR__ . '/external/barnabywalters/mf-cleaner/src/BarnabyWalters/Mf2/Functions.php'; } require_once __DIR__ . '/external/indieweb/link-rel-parser/src/IndieWeb/link_rel_parser.php'; loader()->registerNamespace('IndieAuth', dirname(__FILE__) . '/external/indieauth/client/src');
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('collection'); class CollectionCore extends CollectionLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('array'); class ArrayCore extends ArrayLib { }
define("DATABASE_SETTINGS", TRUE); // Database "connection_settings.php" Settings File define("TEMPLATE_FILE", TRUE); // Current "template.php" File In Use define("TEMPLATE_FUNCTIONS_LOADER", TRUE); // Current Website Template Design Functions Includer/Loader "template_functions.php" define("TEMPLATE_CONFIG", TRUE); // Template Config File "template_config.php" define("PAGES_FOLDER_GENERATORS", TRUE); // Content Generator Files (controller.php / compiler.php) define("CONFIG_FILE", TRUE); // Normal Config File "config.php" # Main Core File require_once "include/core.php"; # Website Template And Design Loader loader(); require_once "database/connection.php"; main_database_connection(); //another_database_connection ( "dbconn_one", "localhost", "root", "Daniel1", "mysql", "utf8" ); # Website Template Configuration File require_once "include/config.php"; # Including Custom Page CSS $stdcss = array('css' => array()); # Including Custom Page JS $stdjs = array('js' => array()); # Language Loader $lang = array_merge(language('global')); # Page Title $pagetitle = "New_Page_File"; $HTMLOUT = ""; // Starting Variable
<?php /* sOB - Simple Open builing Bot * * Copyright 2009 - Claudio Mignanti <*****@*****.**> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ session_start(); $page = $_GET['page']; if (!isset($page)) { $page = 'default'; } require "./inc/{$page}.php"; require "./inc/status.php"; #load template, if it doesn't exist load default one if (file_exists('tpl.htm')) { $tpl = file('tpl.htm'); } else { $tpl = file('tpl.htm.default'); } $tpl = str_replace("%body", loader(), $tpl); $tpl = str_replace("%status", status(), $tpl); foreach ($tpl as $a) { echo $a; }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('model'); class ModelCore extends ModelLib { }
<?php /** * Thin is a swift Framework for PHP 5.4+ * * @package Thin * @version 1.0 * @author Gerald Plusquellec * @license BSD License * @copyright 1996 - 2015 Gerald Plusquellec * @link http://github.com/schpill/thin */ namespace Thin; loader('blazz'); class MemoryCore extends BlazzLib { }
include_once 'includes/bootstrap.php'; /* install */ install(); } else { /* install post */ install_post(); /* bootstrap */ include_once 'includes/bootstrap.php'; /* define meta */ define('TITLE', l('installation')); define('ROBOTS', 'none'); /* module init */ Redaxscript\Hook::trigger('init'); /* call loader else render template */ if (FIRST_PARAMETER == 'loader' && (SECOND_PARAMETER == 'styles' || SECOND_PARAMETER == 'scripts')) { echo loader(SECOND_PARAMETER, 'outline'); } else { include_once 'templates/install/install.phtml'; } } /** * install * * @since 1.2.1 * @deprecated 2.0.0 * * @package Redaxscript * @category Install * @author Henry Ruhs */ function install()
function __autoload($class) { loader($class); }