This file contains hidden or 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 | |
/** | |
* Created by PhpStorm. | |
* User: ciba | |
* Date: 07.07.16 | |
* Time: 11:40 | |
*/ | |
namespace App\Support\Banks\Drivers; |
This file contains hidden or 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
server { | |
... | |
server_name dev-site.com | |
location ~ ^/(uploads|media|common)/ { | |
if (-f $request_filename) { | |
break; | |
} | |
rewrite ^(.*)$ http://production-site.com$1 permanent; | |
} | |
... |
This file contains hidden or 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 Article_model extends MY_Model{ | |
//should i kept it before OR after ? | |
public $before_delete = array( 'delete_timestamps' ); | |
protected $soft_delete = TRUE; | |
//my column name is deleted_by such case still i have to mentioned or its optional | |
protected $deleted_by_key = 'deleted_by'; | |
protected function delete_timestamps($where) | |
{ |
This file contains hidden or 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 Twig_Loader_Database implements Twig_LoaderInterface, Twig_ExistsLoaderInterface | |
{ | |
const MAIN_NAMESPACE = '__main__'; | |
protected $templates = array(); | |
/** |
This file contains hidden or 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 | |
/** | |
* Loads template from the HMVC. | |
* Initialize | |
* $loader = new Twig_Loader_Hmvc(APPPATH.'views'); | |
* | |
* @author Michail Maksarov <michail1982@gmail.com> | |
*/ | |
class Twig_Loader_Hmvc extends Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderInterface | |
{ |
This file contains hidden or 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
#Add Trailing slash | |
RewriteCond %{REQUEST_METHOD} GET | |
RewriteCond %{REQUEST_URI} !(/$|\.) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] |
This file contains hidden or 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
/* | |
.htaccess | |
#UTIL REWRITES | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^common/img/(.*)$ /utils/cacher.php?url=https://example.com/common/img/$1 [L] | |
*/ | |
$url = $_GET['url']; | |
$filename = dirname(dirname(__FILE__)).parse_url($url, PHP_URL_PATH); | |
$pathname = substr($filename, 0, strrpos($filename, '/')); | |
if(!is_dir($pathname)) { |
This file contains hidden or 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
/*! DataTables Query string integration | |
* ©2014 Michail1982 - datatables.net/license | |
*/ | |
/** | |
* DataTables integration get and save params in query string. | |
* | |
* This file sets the defaults and adds options to DataTables to get and save params in query string. | |
*/ | |
(function(window, document, undefined) { |
This file contains hidden or 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 SYSDIR . '/core/Model.php'; | |
/** | |
* CREATE tree ( | |
* pk INT(10) NOT NULL AUTO_INCREMENT, | |
* lft INT(10) NOT NULL DEFAULT 0, | |
* rgt INT(10) NOT NULL DEFAULT 0, | |
* PRIMARY KEY pk, | |
* INDEX left_key (lft, rgt) |
This file contains hidden or 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
#------------------------------------------------------------------------------- | |
# CodeIgniter .htaccess file for the main index.php directory | |
#------------------------------------------------------------------------------- | |
#------------------------------------------------------------------------------- | |
# If you must have your CI "system" directory at http://www.domain.tld/system/, | |
# Then I advise you to place a .htaccess file in that directory | |
# with "deny from all" in it. | |
#------------------------------------------------------------------------------- |
NewerOlder