-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBaseHelper.php
74 lines (67 loc) · 2.13 KB
/
BaseHelper.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* Project codeigniter-basic-helper
* Created by PhpStorm
* User: 713uk13m <dev@nguyenanhung.com>
* Copyright: 713uk13m <dev@nguyenanhung.com>
* Date: 30/07/2022
* Time: 15:25
*/
namespace nguyenanhung\CodeIgniter\BasicHelper;
/**
* Class BaseHelper
*
* @package nguyenanhung\CodeIgniter\BasicHelper
* @author 713uk13m <dev@nguyenanhung.com>
* @copyright 713uk13m <dev@nguyenanhung.com>
*/
class BaseHelper
{
const VERSION = '1.7.0';
const LAST_MODIFIED = '2025-03-15';
const PROJECT_NAME = 'CodeIgniter - Basic Helper';
const AUTHOR_NAME = 'Hung Nguyen';
const AUTHOR_FULL_NAME = 'Hung Nguyen';
const AUTHOR_EMAIL = 'dev@nguyenanhung.com';
const AUTHOR_WEB = 'https://nguyenanhung.com';
const AUTHOR_BLOG = 'https://blog.nguyenanhung.com';
const GITHUB_URL = 'https://github.com/nguyenanhung/codeigniter-basic-helper';
const GITHUB_ISSUES_URL = 'https://github.com/nguyenanhung/codeigniter-basic-helper/issues';
const PACKAGES_URL = 'https://packagist.org/packages/nguyenanhung/codeigniter-basic-helper';
public function getVersion()
{
return self::VERSION;
}
public static function version()
{
return self::VERSION;
}
public function getAuthor()
{
return array(
'name' => self::AUTHOR_NAME,
'full_name' => self::AUTHOR_FULL_NAME,
'email' => self::AUTHOR_EMAIL,
'web' => self::AUTHOR_WEB,
'blog' => self::AUTHOR_BLOG
);
}
public function getPackageInfo()
{
return array(
'project_name' => self::PROJECT_NAME,
'project_version' => self::VERSION,
'version_updated' => self::LAST_MODIFIED,
'project_github' => self::GITHUB_URL,
'project_packages' => self::PACKAGES_URL,
'project_maintainer' => $this->getAuthor()
);
}
public static function writeLn($message, $newLine = "\n")
{
if (function_exists('json_encode') && (is_array($message) || is_object($message))) {
$message = json_encode($message);
}
echo $message . $newLine;
}
}