public function setUp() { \Xpressengine\Comment\CommentEntity::setReplyCharlen(3); }
/** * Bootstrap the application events. * * @return void */ public function boot() { $source = base_path('core/src/Xpressengine/Comment/config/comment.php'); $this->mergeConfigFrom($source, 'comment'); CommentEntity::setReplyCharlen($this->app['config']['comment.commentReplyCodeLen']); }
/** * Reply character length * * @return int */ private function getReplyCharlen() { return CommentEntity::getReplyCharlen(); }
/** * 같은 depth 에 가장 마지막 자식노드의 reply 코드 값 * * @param CommentEntity $comment comment object * @return string */ public function getLastChildReply(CommentEntity $comment) { $reply = $this->conn->table($this->table)->where('head', $comment->head)->where('reply', 'like', $comment->reply . str_repeat('_', CommentEntity::getReplyCharlen()))->max('reply'); return $reply; }