PluginProbe
Code Engine – PHP Snippets, AI Functions & Automation for WordPress / 0.0.1
Code Engine – PHP Snippets, AI Functions & Automation for WordPress v0.0.1
0.5.6 0.5.5 0.5.4 0.5.3 0.5.2 0.5.1 0.5.0 0.4.9 0.4.8 0.4.7 0.4.6 trunk 0.0.1 0.0.2 0.2.8 0.2.9 0.3.0 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 All 32 releases
code-engine / classes / models / snippet.php

snippet.php in Code Engine – PHP Snippets, AI Functions & Automation for WordPress 0.0.1, at classes/models/snippet.php

65 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Model class for common handling of various snippets.
4 */
5 final class Meow_CDEGN_Models_Snippet {
6
7 /** @var int */
8 private $id;
9
10 /** @var string */
11 private $src;
12
13 /** @var string */
14 private $name;
15
16 /** @var string */
17 private $description;
18
19 /** @var string */
20 private $code;
21
22 /** @var string */
23 private $edit_url;
24
25 public function __construct(
26 int $id,
27 string $src,
28 string $name,
29 ?string $description,
30 string $code,
31 string $edit_url
32 ) {
33 $this->id = $id;
34 $this->src = $src;
35 $this->name = $name;
36 $this->description = $description ?? '';
37 $this->code = $code;
38 $this->edit_url = $edit_url;
39 }
40
41 public function id(): int {
42 return $this->id;
43 }
44
45 public function src(): string {
46 return $this->src;
47 }
48
49 public function name(): string {
50 return $this->name;
51 }
52
53 public function description(): string {
54 return $this->description;
55 }
56
57 public function code(): string {
58 return $this->code;
59 }
60
61 public function edit_url(): string {
62 return $this->edit_url;
63 }
64 }
65