Piwik\Plugins\CustomVariables\CustomVariables::getMaxLengthCustomVariables PHP 메소드

getMaxLengthCustomVariables() 공개 정적인 메소드

There are also some hardcoded places in JavaScript
public static getMaxLengthCustomVariables ( ) : integer
리턴 integer
    public static function getMaxLengthCustomVariables()
    {
        return 200;
    }

Usage Example

예제 #1
0
파일: Model.php 프로젝트: a4tunado/piwik
 public function addCustomVariable()
 {
     $dbTable = $this->getDbTableName();
     $index = $this->getHighestCustomVarIndex() + 1;
     $maxLen = CustomVariables::getMaxLengthCustomVariables();
     Db::exec(sprintf('ALTER TABLE %s ', $dbTable) . sprintf('ADD COLUMN custom_var_k%d VARCHAR(%d) DEFAULT NULL,', $index, $maxLen) . sprintf('ADD COLUMN custom_var_v%d VARCHAR(%d) DEFAULT NULL;', $index, $maxLen));
     return $index;
 }
All Usage Examples Of Piwik\Plugins\CustomVariables\CustomVariables::getMaxLengthCustomVariables