/home
/icerik
/domains
/enicerik.com
/public_html
/App
/Controllers
/Frontend
/ArticleController.php
$articleQuery = $articles = $this->model['article'];
$selectCategory = null;
$categories = $this->model['category']->all(['status' => 0]);
$pagination = null;
if($category != null || $subcategory != null){
$oldCategory = null;
if($subcategory != null){
$oldCategory = $category;
$category = $subcategory;
}
$categorySQL = $this->model['category']->slugPairing($category);
$articleCount = $articleQuery->categoryFilter($categorySQL->id)['count'];
if($oldCategory != null){
$pagination = pagination($page,$articleCount,route('article.subcategory.list',['category' => $oldCategory,'subcategory' => $categorySQL->slug]).'?page=(:num)');
}else{
$pagination = pagination($page,$articleCount,route('article.category.list',['category' => $categorySQL->slug]).'?page=(:num)');
}
$articles = $articleQuery->categoryFilter($categorySQL->id,['pagination' => ['start' => $pagination['start'],'stop' => $pagination['stop']]]);
$selectCategory = $categorySQL->name;
}else{
$articleCount = $articleQuery->all(['status' => 0])['count'];
$pagination = pagination($page,$articleCount,route('article.list').'?page=(:num)');
/home
/icerik
/domains
/enicerik.com
/public_html
/App
/Controllers
/Frontend
/ArticleController.php
$articleQuery = $articles = $this->model['article'];
$selectCategory = null;
$categories = $this->model['category']->all(['status' => 0]);
$pagination = null;
if($category != null || $subcategory != null){
$oldCategory = null;
if($subcategory != null){
$oldCategory = $category;
$category = $subcategory;
}
$categorySQL = $this->model['category']->slugPairing($category);
$articleCount = $articleQuery->categoryFilter($categorySQL->id)['count'];
if($oldCategory != null){
$pagination = pagination($page,$articleCount,route('article.subcategory.list',['category' => $oldCategory,'subcategory' => $categorySQL->slug]).'?page=(:num)');
}else{
$pagination = pagination($page,$articleCount,route('article.category.list',['category' => $categorySQL->slug]).'?page=(:num)');
}
$articles = $articleQuery->categoryFilter($categorySQL->id,['pagination' => ['start' => $pagination['start'],'stop' => $pagination['stop']]]);
$selectCategory = $categorySQL->name;
}else{
$articleCount = $articleQuery->all(['status' => 0])['count'];
$pagination = pagination($page,$articleCount,route('article.list').'?page=(:num)');
/home
/icerik
/domains
/enicerik.com
/public_html
/System
/Libs
/Router
/Router.php
array_shift($params);
// Checking middlewares
if (array_key_exists('middlewares', $val)) {
foreach ($val['middlewares'] as $midKey => $midVal) {
list($controller, $method) = explode('@', $midVal['callback']);
if (class_exists($controller)) {
call_user_func_array([new $controller, $method], []);
}
}
}
if (is_callable($val['callback'])) {
call_user_func_array($val['callback'], array_values($params));
} else if (stripos($val['callback'], '@') !== false) {
list($controller, $method) = explode('@', $val['callback']);
if (class_exists($controller)) {
call_user_func_array([new $controller, $method], array_values($params));
} else {
self::pageNotFound();
}
}
break;
}
}
}
if ($matched === 0)
self::pageNotFound();
}
/**
* Check Domain
*
* @param array $params
/home
/icerik
/domains
/enicerik.com
/public_html
/System
/Libs
/Router
/Router.php
array_shift($params);
// Checking middlewares
if (array_key_exists('middlewares', $val)) {
foreach ($val['middlewares'] as $midKey => $midVal) {
list($controller, $method) = explode('@', $midVal['callback']);
if (class_exists($controller)) {
call_user_func_array([new $controller, $method], []);
}
}
}
if (is_callable($val['callback'])) {
call_user_func_array($val['callback'], array_values($params));
} else if (stripos($val['callback'], '@') !== false) {
list($controller, $method) = explode('@', $val['callback']);
if (class_exists($controller)) {
call_user_func_array([new $controller, $method], array_values($params));
} else {
self::pageNotFound();
}
}
break;
}
}
}
if ($matched === 0)
self::pageNotFound();
}
/**
* Check Domain
*
* @param array $params
/home
/icerik
/domains
/enicerik.com
/public_html
/System
/Kernel
/Kernel.php
use System\Facades\Facade;
use Whoops\Run as WhoopsRun;
use Whoops\Handler\PrettyPageHandler as WhoopsPrettyPageHandler;
class Kernel
{
public function __construct()
{
// Initialize Whoops Error Handler
$this->initWhoops();
// Initialize Config
$this->initApplications();
// Getting Routes
Import::config('routes');
// Starting Router
Router::run();
}
/**
* Whoops Initializer
*
* @return object
*/
private function initWhoops()
{
$whoops = new WhoopsRun;
$whoops->pushHandler(new WhoopsPrettyPageHandler);
$whoops->register();
return $this;
}
/**
* Application Initializer
*
* @return void
/home
/icerik
/domains
/enicerik.com
/public_html
/index.php
* Titan-2 Mini Framework
* Simple and Modern Web Application Framework
*
* Author : Turan Karatuğ
* Web : http://www.titanphp.com
* Docs : http://kilavuz.titanphp.com
* Version : 2.2.0
* Github : http://github.com/tkaratug/titan2
* License : MIT
*
*************************************************/
// Require Composer Autoload
require_once __DIR__ . '/vendor/autoload.php';
// Require Starter
require_once __DIR__ . '/System/Kernel/Starter.php';
// Run Kernel
new System\Kernel\Kernel();