src/Model/AbstractModel.php
public static function replacePhpReservedKeyword($keyword, $context = null)
    {
        if (PhpReservedKeyword::instance()->is($keyword)) {
            if ($context !== null) {
                $keywordKey = $keyword . '_' . $context;
                if (!array_key_exists($keywordKey, self::$replacedPhpReservedKeywords)) {
                    self::$replacedPhpReservedKeywords[$keywordKey] = 0;
                } else {
                    self::$replacedPhpReservedKeywords[$keywordKey]++;
                }
                return '_' . $keyword . (self::$replacedPhpReservedKeywords[$keywordKey] ? '_' . self::$replacedPhpReservedKeywords[$keywordKey] : '');
            } else {
                return '_' . $keyword;
            }
        } else {
            return $keyword;
        }
    }
public static function replacePhpReservedKeyword($keyword, $context = null)
    {
        if (PhpReservedKeyword::instance()->is($keyword)) {
            if ($context !== null) {
                $keywordKey = $keyword . '_' . $context;
                if (!array_key_exists($keywordKey, self::$replacedPhpReservedKeywords)) {
                    self::$replacedPhpReservedKeywords[$keywordKey] = 0;
                } else {
                    self::$replacedPhpReservedKeywords[$keywordKey]++;
                }
                return '_' . $keyword . (self::$replacedPhpReservedKeywords[$keywordKey] ? '_' . self::$replacedPhpReservedKeywords[$keywordKey] : '');
            } else {
                return '_' . $keyword;
            }
        } else {
            return $keyword;
        }
    }
public static function replacePhpReservedKeyword ( $ keyword , $ context = null ) { if ( PhpReservedKeyword :: instance ( ) -> is ( $ keyword ) ) { if ( $ context !== null ) { $ keywordKey = $ keyword . '_' . $ context ; if ( ! array_key_exists ( $ keywordKey , self :: $ replacedPhpReservedKeywords ) ) { self :: $ replacedPhpReservedKeywords [ $ keywordKey ] = 0 ; } else { self :: $ replacedPhpReservedKeywords [ $ keywordKey ] ++ ; } return '_' . $ keyword . ( self :: $ replacedPhpReservedKeywords [ $ keywordKey ] ? '_' . self :: $ replacedPhpReservedKeywords [ $ keywordKey ] : '' ) ; } else { return '_' . $ keyword ; } } else { return $ keyword ; } }
Returns a usable keyword for a original keyword
@uses PhpReservedKeyword::instance()
@uses PhpReservedKeyword::is()
@param string $keyword the keyword
@param string $context the context
@return string
Returns a usable keyword for a original keyword