Created
October 13, 2011 08:41
-
-
Save lab2023/1283757 to your computer and use it in GitHub Desktop.
KebabChecker
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 | |
const Z_VERSION='1.11.10'; | |
const D_VERSION='1.2.4'; | |
const EXTJS_VERSION='3.4.0'; | |
const P_VERSION='5.3.4'; | |
/*Mondatary Requirements*/ | |
/*Zend Version Control*/ | |
$zend=false; | |
if(file_exists('../library/Zend/version.php')){ | |
require_once '../library/Zend/version.php'; | |
$zend_version=new Zend_Version(); | |
if($zend_version-> compareVersion(Z_VERSION)==0) { | |
$zend=true; | |
} | |
else | |
$zend=false; | |
check($zend,'Zend Framework Versiyon Uyumluluk Sorunu Var.! Kullandığınız ZF Versiyonu :'.zend_version::VERSION.' Kebab Framework İçin Gerekli Versiyon : '.Z_VERSION,TRUE); | |
} | |
else{ | |
check($zend,'Kebab Framework Kurulu Değil !',TRUE); | |
} | |
/*End Zend Version Control*/ | |
/*Doctrin Control*/ | |
$doctrine=false; | |
if(file_exists('../library/Doctrine')){ | |
require_once '../library/Doctrine/Core.php'; | |
$doctrine=true; | |
check(Doctrine_Core::VERSION==D_VERSION,'Doctrine ORM Versiyon Uyumluluk Sorunu Var.! Kullandığını Doctrine ORM Versiyonu : '.Doctrine_Core::VERSION.' Kebab Framework İçin Gerekli Versiyon : '.D_VERSION,TRUE); | |
} | |
else{ | |
check($doctrine,'Doctrine ORM Kurulu Değil !',TRUE); | |
} | |
/*End Doctrine Control*/ | |
/*Ext JS Control*/ | |
//require_once('assets/vendors/ext-3.4.0/src/ext-core/src/core/Ext.js'); | |
$extjs=false; | |
if(file_exists('assets/vendors/ext-3.4.0')){ | |
$extjs=true; | |
check($extjs,'Ext JS Versiyon Uyumluluk Sorunu Var. ! Kullandığınız Ext JS Versiyonu : '.EXTJS_VERSION.'Kebab Framwork İçin Gerekli Versiyon : '.EXTJS_VERSION,TRUE); | |
} | |
else{ | |
check($extjs,'ExJS Kurulu Değil',TRUE); | |
} | |
/*End Ext Js Control*/ | |
/*Php Version Control*/ | |
check(version_compare(PHP_VERSION,P_VERSION)>=0,'PHP Versiyonu Uyumluluk Sorunu Var Kullandığınız PHP Versiyonu : '.PHP_VERSION.' Kebab Framework '.P_VERSION.' ve Üzeri Gerektirir',TRUE); | |
/*Optional Requirements*/ | |
/*Apc Control*/ | |
check(extension_loaded('apc'),'APC Kurulu Değil .',FALSE); | |
function check($bool,$error,$ismandatory=FALSE){ | |
if($bool){ | |
echo ''; | |
} | |
else{ | |
echo $ismandatory ? 'ERROR : ':'WARNING : '; | |
echo $error.'<br>'; | |
if($ismandatory){ | |
exit('<br>Bu Problemi Cozmeden Devam Edemezsiniz !!!'); | |
} | |
} | |
} |
for example 'C:\wamp\www\kebab\library\Zend' like?
yeap
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you must control file exist with base path