本文整理汇总了PHP中t3lib_div::int_from_ver方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::int_from_ver方法的具体用法?PHP t3lib_div::int_from_ver怎么用?PHP t3lib_div::int_from_ver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_div
的用法示例。
在下文中一共展示了t3lib_div::int_from_ver方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*/
public function __construct()
{
if (t3lib_div::int_from_ver(TYPO3_version) < 6002000) {
// Loads the cli_args array with command line arguments
$this->cli_args = $this->cli_getArgIndex();
} else {
// Loads the cli_args array with command line arguments
$this->cli_setArguments($_SERVER['argv']);
}
$this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
$this->issueRepository = $this->objectManager->get('Tx_Smoothmigration_Domain_Repository_IssueRepository');
$this->messageBus = $this->objectManager->get('Tx_Smoothmigration_Service_MessageService');
// Adding options to help archive:
$this->cli_options = array();
$this->cli_options[] = array('check', 'Check your code for needed migrations');
$this->cli_options[] = array('report', 'Detailed Report including extension, codeline and check');
$this->cli_options[] = array('executeAllChecks', 'Execute all checks and show a short summary');
$this->cli_options[] = array('migrate', 'Try to migrate your code');
$this->cli_options[] = array('help', 'Display this message');
// Setting help texts:
$this->cli_help['name'] = 'CLI Smoothmigration Agent';
$this->cli_help['synopsis'] = 'cli_dispatch.phpsh smoothmigration {task}';
$this->cli_help['description'] = 'Executes the report of the smoothmigration extension on CLI Basis';
$this->cli_help['examples'] = './typo3/cli_dispatch.phpsh smoothmigration report';
$this->cli_help['author'] = 'Ingo Schmitt <is@marketing-factory.de>';
}
示例2: tslib_fe_checkAlternativeIdMethods
function tslib_fe_checkAlternativeIdMethods($params, $ref)
{
$pObj =& $params['pObj'];
if (t3lib_div::int_from_ver($GLOBALS["TYPO_VERSION"]) >= 3007000) {
$siteScript = t3lib_div::getIndpEnv('TYPO3_SITE_SCRIPT');
} else {
$siteScript = $GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"];
}
if ($siteScript && substr($siteScript, 0, 9) != 'index.php') {
// If there has been a redirect (basically; we arrived here otherwise than via "index.php" in the URL) this can happend either due to a CGI-script or because of reWrite rule. Earlier we used $_SERVER['REDIRECT_URL'] to check but
$uParts = parse_url($siteScript);
// Parse the path:
$requestFilename = trim(preg_replace('/.*\\//', '', $uParts['path']));
// This is the filename of the script/simulated pdf-file.
$parts = explode('.', preg_replace('/.*\\//', '', $requestFilename));
$pCount = count($parts);
if ($parts[$pCount - 1] == 'pdf') {
if ($pCount > 2) {
$pObj->type = intval($parts[$pCount - 2]);
$pObj->id = $parts[$pCount - 3];
} else {
$pObj->type = $GLOBALS['pdf_generator2_parameters']['typeNum'];
$pObj->id = $parts[0];
}
}
}
}
示例3: __construct
/**
* Constructor
*/
public function __construct()
{
if (t3lib_div::int_from_ver(TYPO3_version) < 6001000) {
$this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
} else {
$this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
}
}
示例4: convertVersionNumberToInteger
/**
* @param string $versionNumber
* @return integer
*/
public static function convertVersionNumberToInteger($versionNumber)
{
if (class_exists('t3lib_utility_VersionNumber') && is_callable('t3lib_utility_VersionNumber::convertVersionNumberToInteger')) {
return t3lib_utility_VersionNumber::convertVersionNumberToInteger($versionNumber);
} else {
return t3lib_div::int_from_ver($versionNumber);
}
}
示例5: buildCharsetField
/**
* Renders an input element that allows to enter the charset to be used.
*
* @param array $params: Field information to be rendered
* @param t3lib_tsStyleConfig $pObj: The calling parent object.
* @return string The HTML input field
*/
public function buildCharsetField(array $params, t3lib_tsStyleConfig $pObj) {
$fieldName = substr($params['fieldName'], 5, -1);
$typo3Version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
$readonly = ($typo3Version < 4007000) ? '' : ' readonly="readonly"';
$field = '<input id="' . $fieldName . '" name="' . $params['fieldName'] . '" value="utf-8"' . $readonly . ' />';
return $field;
}
示例6: includeLocalLang
/**
* Includes the locallang file for the 'newloginbox' extension
*
* @return array The LOCAL_LANG array
*/
function includeLocalLang()
{
$typoVersion = t3lib_div::int_from_ver($GLOBALS['TYPO_VERSION']);
if ($typoVersion >= 3008000) {
$LOCAL_LANG = $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('newloginbox') . 'locallang.xml', FALSE);
} else {
include t3lib_extMgm::extPath('newloginbox') . 'locallang.php';
}
return $LOCAL_LANG;
}
示例7: initializeAction
/**
* Initializes the controller before invoking an action method.
*
* @return void
*/
protected function initializeAction()
{
$this->pageRenderer->addCssFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/StyleSheet/module.css');
$this->pageRenderer->addInlineLanguageLabelFile('EXT:smoothmigration/Resources/Private/Language/locallang.xml');
$this->pageRenderer->addJsLibrary('jquery', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/jquery-1.10.1.min.js');
$this->pageRenderer->addJsLibrary('sprintf', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/sprintf.min.js');
$this->pageRenderer->addJsFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/General.js');
if (t3lib_div::int_from_ver(TYPO3_version) > 6001000) {
$this->moduleToken = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->generateToken('moduleCall', 'tools_SmoothmigrationSmoothmigration');
}
}
示例8: includeLocalLang
/**
* Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
*
* @return The array with language labels
*/
function includeLocalLang()
{
$llFile = t3lib_extMgm::extPath('ods_osm') . 'locallang.xml';
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
if ($version >= 4007000) {
$object = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
$LOCAL_LANG = $object->getParsedData($llFile, $GLOBALS['LANG']->lang);
} else {
$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
}
return $LOCAL_LANG;
}
示例9: convertVersionNumberToInteger
/**
* Returns TRUE if the current TYPO3 version is compatible to the input version
* Notice that this function compares branches, not versions
* (4.0.1 would be > 4.0.0 although they use the same compat_version)
*
* @param string $verNumberStr Minimum branch number: format "4.0" NOT "4.0.0"
* @return boolean Returns TRUE if compatible with the provided version number
*/
public static function convertVersionNumberToInteger($verNumberStr)
{
$result = '';
if (self::isEqualOrHigherSixZero()) {
$result = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($verNumberStr);
} elseif (class_exists('t3lib_utility_VersionNumber')) {
$result = t3lib_utility_VersionNumber::convertVersionNumberToInteger($verNumberStr);
} else {
$result = t3lib_div::int_from_ver($verNumberStr);
}
return $result;
}
示例10: getNumericTYPO3versionNumber
/**
* Returns the current TYPO3 version number as an integer, eg. 4005000 for version 4.5
*
* @return int
*/
public function getNumericTYPO3versionNumber()
{
if (class_exists(VersionNumberUtility)) {
$numeric_typo3_version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
} else {
if (class_exists('t3lib_utility_VersionNumber')) {
$numeric_typo3_version = t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version);
} else {
$numeric_typo3_version = t3lib_div::int_from_ver(TYPO3_version);
}
}
return $numeric_typo3_version;
}
示例11: includeLocalLang
/**
* Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
*
* @return array The array with language labels
*/
protected function includeLocalLang()
{
$llFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('listfeusers') . 'locallang.xml';
$version = class_exists('\\TYPO3\\CMS\\Core\\Utility\\VersionNumberUtility') ? \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
if ($version < 4006000) {
$LOCAL_LANG = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
} else {
/** @var $llxmlParser t3lib_l10n_parser_Llxml */
$llxmlParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangXmlParser');
$LOCAL_LANG = $llxmlParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
}
return $LOCAL_LANG;
}
示例12: includeLocalLang
/**
* Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
*
* @return array The array with language labels
*/
protected function includeLocalLang()
{
$llFile = t3lib_extMgm::extPath('medfancyboxcontent') . 'locallang.xml';
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
if ($version < 4006000) {
$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
} else {
/** @var $llxmlParser t3lib_l10n_parser_Llxml */
$llxmlParser = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
$LOCAL_LANG = $llxmlParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
}
return $LOCAL_LANG;
}
示例13: getTypoVersion
public static function getTypoVersion()
{
$result = FALSE;
$callingClassName = '\\TYPO3\\CMS\\Core\\Utility\\VersionNumberUtility';
if (class_exists($callingClassName) && method_exists($callingClassName, 'convertVersionNumberToInteger')) {
$result = call_user_func($callingClassName . '::convertVersionNumberToInteger', TYPO3_version);
} else {
if (class_exists('t3lib_utility_VersionNumber') && method_exists('t3lib_utility_VersionNumber', 'convertVersionNumberToInteger')) {
$result = t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version);
} else {
if (class_exists('t3lib_div') && method_exists('t3lib_div', 'int_from_ver')) {
$result = t3lib_div::int_from_ver(TYPO3_version);
}
}
}
return $result;
}
示例14: init
/**
* Initializes sidebar object. Checks if there any tables to display and
* adds sidebar item if there are any.
*
* @param object $pObj Parent object
* @return void
*/
function init(&$pObj)
{
if (t3lib_div::int_from_ver(TYPO3_version) >= 4000005) {
$this->pObj =& $pObj;
$this->tables = t3lib_div::trimExplode(',', $this->pObj->modTSconfig['properties']['recordDisplay_tables'], true);
if ($this->tables) {
// Get permissions
$this->calcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::readPageAccess($this->pObj->id, $this->pObj->perms_clause));
foreach ($this->tables as $table) {
if ($this->canDisplayTable($table)) {
// At least one displayable table found!
$this->pObj->sideBarObj->addItem('records', $this, 'sidebar_renderRecords', $GLOBALS['LANG']->getLL('records'), 25);
break;
}
}
}
}
}
示例15: includeLocalLang
/**
* Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
*
* @return The array with language labels
*/
function includeLocalLang()
{
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
if ($version >= 6000000) {
$llFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('myquizpoll') . 'locallang.xml';
$localLanguageParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangXmlParser');
$LOCAL_LANG = $localLanguageParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
} else {
if ($version >= 4007000) {
$llFile = t3lib_extMgm::extPath('myquizpoll') . 'locallang.xml';
$localizationParser = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
$LOCAL_LANG = $localizationParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
} else {
$llFile = t3lib_extMgm::extPath('myquizpoll') . 'locallang.xml';
$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
}
}
return $LOCAL_LANG;
}