mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 20:22:46 +01:00
bee043b163
Summary: Fixes T11547. I //think// this mostly gets about addressing @epriestley's comments in D16465 and stores each paste's line count in its snippet so that we can display the actual number of lines in the paste rather than '5 Lines'. Let me know if this is on the right track! Test Plan: Open /paste and see that each paste's actual line count is reported. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T11547 Differential Revision: https://secure.phabricator.com/D17256
30 lines
618 B
PHP
30 lines
618 B
PHP
<?php
|
|
|
|
final class PhabricatorPasteSnippet extends Phobject {
|
|
|
|
const FULL = 'full';
|
|
const FIRST_LINES = 'first_lines';
|
|
const FIRST_BYTES = 'first_bytes';
|
|
|
|
private $content;
|
|
private $type;
|
|
private $contentLineCount;
|
|
|
|
public function __construct($content, $type, $content_line_count) {
|
|
$this->content = $content;
|
|
$this->type = $type;
|
|
$this->contentLineCount = $content_line_count;
|
|
}
|
|
|
|
public function getContent() {
|
|
return $this->content;
|
|
}
|
|
|
|
public function getType() {
|
|
return $this->type;
|
|
}
|
|
|
|
public function getContentLineCount() {
|
|
return $this->contentLineCount;
|
|
}
|
|
}
|