Xpressengine\Document\Models\Document::setReplyCharLen PHP Method

setReplyCharLen() public static method

Set reply character length
public static setReplyCharLen ( integer $len ) : void
$len integer reply character length
return void
    public static function setReplyCharLen($len)
    {
        self::$replyCharLen = $len;
    }

Usage Example

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $app = $this->app;
     // set reply code length config to Document model
     Document::setReplyCharLen($app['config']['xe.documentReplyCodeLen']);
     $app->singleton('xe.document.config', function ($app) {
         return new ConfigHandler($app['xe.config']);
     });
     $app->singleton('xe.document.instance', function ($app) {
         $instanceManagerClass = $app['xe.interception']->proxy(InstanceManager::class, 'DocumentInstanceManager');
         return new $instanceManagerClass($app['xe.db']->connection('document'), $app['xe.document.config']);
     });
     $app->singleton(['xe.document' => DocumentHandler::class], function ($app) {
         $documentHandlerClass = $app['xe.interception']->proxy(DocumentHandler::class, 'Document');
         $document = new $documentHandlerClass($app['xe.db']->connection('document'), $app['xe.document.config'], $app['xe.document.instance'], $app['request']);
         return $document;
     });
 }