This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Autoloader { | |
public static $prefix = NULL; | |
public static function register($path, $prefix = 'class_') | |
{ | |
self::$prefix = $prefix; | |
if (is_dir($path)) | |
set_include_path($path . PATH_SEPARATOR . get_include_path()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Library; | |
class Router { | |
private static $_instance = NULL; | |
private function __clone() | |
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Security { | |
/** | |
* if(Security::checkInjection($value)) { | |
* error_log('Possible SQL/XSS injection attack detected with the request '.$value); | |
* } | |
* | |
* @param $value | |
* @return bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Security.php'; | |
class SecurityTest extends PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @var Security | |
*/ | |
protected $object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Security { | |
private static $cacheSetter = 'apc_store'; | |
private static $cacheGetter = 'apc_fetch'; | |
private static $cacheRemover = 'apc_delete'; | |
public static function setCacheSetter($callback) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class autoloader { | |
public static $loader; | |
public static function init() | |
{ | |
if (self::$loader == NULL) | |
self::$loader = new self(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.box { | |
float: left; | |
width: 30px; | |
height: 30px; | |
border: 1px solid red; | |
} | |
.clear { | |
clear: both; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MySQL { | |
private static $_instance = NULL; | |
private $conn = NULL; | |
public $server; | |
public $username; | |
public $password; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application; | |
class Configuration extends \Library\Configuration { | |
public function configDevelopment() | |
{ | |
$this->registry->set('database.connector', 'MySQL'); | |
$this->registry->set('database.settings', array( | |
'driver' => 'pdo_mysql', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application; | |
class Bootstrap extends \Library\Bootstrap { | |
/** | |
* Başlangıç methodu, setup hazırlanıyor. | |
* | |
* @return void | |
*/ |
OlderNewer