Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
6b4072cd
Commit
6b4072cd
authored
Sep 22, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mvc/style) fix missing php doc strings
parent
a1a73283
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
119 additions
and
8 deletions
+119
-8
ControllerBase.php
...ense/mvc/app/controllers/OPNsense/Base/ControllerBase.php
+1
-0
IndexController.php
...nse/mvc/app/controllers/OPNsense/Base/IndexController.php
+3
-0
IndexController.php
...nse/mvc/app/controllers/OPNsense/Cron/IndexController.php
+4
-0
ItemController.php
...ense/mvc/app/controllers/OPNsense/Cron/ItemController.php
+5
-0
SettingsController.php
...c/app/controllers/OPNsense/IDS/Api/SettingsController.php
+3
-0
IndexController.php
...ense/mvc/app/controllers/OPNsense/IDS/IndexController.php
+4
-0
SettingsController.php
...app/controllers/OPNsense/Proxy/Api/SettingsController.php
+7
-1
IndexController.php
...se/mvc/app/controllers/OPNsense/Proxy/IndexController.php
+4
-0
IndexController.php
...pp/controllers/OPNsense/TrafficShaper/IndexController.php
+4
-0
Drive.php
src/opnsense/mvc/app/library/Google/API/Drive.php
+4
-0
LDAP.php
src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php
+3
-1
QueryFilter.php
...nse/mvc/app/library/OPNsense/Base/Filters/QueryFilter.php
+5
-0
UIModelGrid.php
src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+1
-0
Backend.php
src/opnsense/mvc/app/library/OPNsense/Core/Backend.php
+1
-0
Config.php
src/opnsense/mvc/app/library/OPNsense/Core/Config.php
+2
-0
BaseModel.php
src/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php
+4
-3
ArrayField.php
...se/mvc/app/models/OPNsense/Base/FieldTypes/ArrayField.php
+1
-0
AutoNumberField.php
...c/app/models/OPNsense/Base/FieldTypes/AutoNumberField.php
+1
-0
BaseField.php
...nse/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
+8
-0
BooleanField.php
.../mvc/app/models/OPNsense/Base/FieldTypes/BooleanField.php
+1
-0
CSVListField.php
.../mvc/app/models/OPNsense/Base/FieldTypes/CSVListField.php
+1
-0
ConfigdActionsField.php
...p/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php
+2
-1
EmailField.php
...se/mvc/app/models/OPNsense/Base/FieldTypes/EmailField.php
+1
-0
IntegerField.php
.../mvc/app/models/OPNsense/Base/FieldTypes/IntegerField.php
+1
-0
InterfaceField.php
...vc/app/models/OPNsense/Base/FieldTypes/InterfaceField.php
+2
-1
ModelRelationField.php
...pp/models/OPNsense/Base/FieldTypes/ModelRelationField.php
+1
-0
NetworkField.php
.../mvc/app/models/OPNsense/Base/FieldTypes/NetworkField.php
+1
-0
OptionField.php
...e/mvc/app/models/OPNsense/Base/FieldTypes/OptionField.php
+2
-1
PortField.php
...nse/mvc/app/models/OPNsense/Base/FieldTypes/PortField.php
+4
-0
TextField.php
...nse/mvc/app/models/OPNsense/Base/FieldTypes/TextField.php
+1
-0
UrlField.php
...ense/mvc/app/models/OPNsense/Base/FieldTypes/UrlField.php
+1
-0
MenuInitException.php
...e/mvc/app/models/OPNsense/Base/Menu/MenuInitException.php
+4
-0
MenuItem.php
src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuItem.php
+1
-0
MenuSystem.php
...opnsense/mvc/app/models/OPNsense/Base/Menu/MenuSystem.php
+7
-0
IntegerValidator.php
.../app/models/OPNsense/Base/Validators/IntegerValidator.php
+4
-0
MinMaxValidator.php
...c/app/models/OPNsense/Base/Validators/MinMaxValidator.php
+4
-0
Cron.php
src/opnsense/mvc/app/models/OPNsense/Cron/Cron.php
+4
-0
IDS.php
src/opnsense/mvc/app/models/OPNsense/IDS/IDS.php
+4
-0
Proxy.php
src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.php
+4
-0
TrafficShaper.php
...e/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.php
+4
-0
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php
View file @
6b4072cd
...
...
@@ -120,6 +120,7 @@ class ControllerBase extends ControllerRoot
}
/**
* parse an xml type form
* @param $formname
* @return array
* @throws \Exception
...
...
src/opnsense/mvc/app/controllers/OPNsense/Base/IndexController.php
View file @
6b4072cd
...
...
@@ -35,6 +35,9 @@ namespace OPNsense\Base;
class
IndexController
extends
ControllerBase
{
/**
* default index action
*/
public
function
indexAction
()
{
}
...
...
src/opnsense/mvc/app/controllers/OPNsense/Cron/IndexController.php
View file @
6b4072cd
...
...
@@ -34,6 +34,10 @@ namespace OPNsense\Cron;
*/
class
IndexController
extends
\OPNsense\Base\IndexController
{
/**
* cron index page
* @throws \Exception
*/
public
function
indexAction
()
{
$this
->
view
->
title
=
"Cron settings"
;
...
...
src/opnsense/mvc/app/controllers/OPNsense/Cron/ItemController.php
View file @
6b4072cd
...
...
@@ -34,6 +34,11 @@ namespace OPNsense\Cron;
*/
class
ItemController
extends
\OPNsense\Base\IndexController
{
/**
* open cron form with selected item
* @param null $uuid cron item to open
* @throws \Exception
*/
public
function
openAction
(
$uuid
=
null
)
{
$this
->
view
->
title
=
"Cron settings"
;
...
...
src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php
View file @
6b4072cd
...
...
@@ -41,6 +41,9 @@ use \OPNsense\Core\Config;
*/
class
SettingsController
extends
ApiControllerBase
{
/**
* @var null|IDS IDS model to share across some methods (see getModel)
*/
private
$idsModel
=
null
;
/**
...
...
src/opnsense/mvc/app/controllers/OPNsense/IDS/IndexController.php
View file @
6b4072cd
...
...
@@ -34,6 +34,10 @@ namespace OPNsense\IDS;
*/
class
IndexController
extends
\OPNsense\Base\IndexController
{
/**
* default ids index page
* @throws \Exception
*/
public
function
indexAction
()
{
$this
->
view
->
title
=
"Intrusion Detection"
;
...
...
src/opnsense/mvc/app/controllers/OPNsense/Proxy/Api/SettingsController.php
View file @
6b4072cd
...
...
@@ -57,7 +57,7 @@ class SettingsController extends ApiControllerBase
/**
*
*
update proxy configuration fields
* @return array
* @throws \Phalcon\Validation\Exception
*/
...
...
@@ -151,6 +151,12 @@ class SettingsController extends ApiControllerBase
}
/**
* update remote blacklist item
* @param string $uuid
* @return array result status
* @throws \Phalcon\Validation\Exception
*/
public
function
setRemoteBlacklistAction
(
$uuid
)
{
if
(
$this
->
request
->
isPost
()
&&
$this
->
request
->
hasPost
(
"blacklist"
))
{
...
...
src/opnsense/mvc/app/controllers/OPNsense/Proxy/IndexController.php
View file @
6b4072cd
...
...
@@ -34,6 +34,10 @@ namespace OPNsense\Proxy;
*/
class
IndexController
extends
\OPNsense\Base\IndexController
{
/**
* proxy index page
* @throws \Exception
*/
public
function
indexAction
()
{
$this
->
view
->
title
=
"Proxy Server"
;
...
...
src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/IndexController.php
View file @
6b4072cd
...
...
@@ -34,6 +34,10 @@ namespace OPNsense\TrafficShaper;
*/
class
IndexController
extends
\OPNsense\Base\IndexController
{
/**
* traffic shaper index
* @throws \Exception
*/
public
function
indexAction
()
{
$this
->
view
->
title
=
"Traffic Shaper"
;
...
...
src/opnsense/mvc/app/library/Google/API/Drive.php
View file @
6b4072cd
...
...
@@ -51,6 +51,9 @@ class Drive
*/
private
$cred
=
null
;
/**
* construct a new Drive object
*/
public
function
__construct
()
{
// hook in Google's autoloader
...
...
@@ -95,6 +98,7 @@ class Drive
/**
* download a file by given GDrive file handle
* @param $fileHandle (object from listFiles)
* @return null|string
*/
...
...
src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php
View file @
6b4072cd
...
...
@@ -41,7 +41,7 @@ class LDAP
private
$ldapVersion
=
3
;
/**
* @var null
* @var null
base ldap search DN
*/
private
$baseSearchDN
=
null
;
...
...
@@ -113,6 +113,7 @@ class LDAP
}
/**
* construct a new LDAP connector
* @param null $baseSearchDN setup base searchDN or list of DN's separated by ;
* @param int $ldapVersion setup ldap version
*/
...
...
@@ -134,6 +135,7 @@ class LDAP
}
/**
* initiate a connection.
* @param $bind_url string url to use
* @param null $userdn connect dn to use, leave empty for anonymous
* @param null $password password
...
...
src/opnsense/mvc/app/library/OPNsense/Base/Filters/QueryFilter.php
View file @
6b4072cd
...
...
@@ -36,6 +36,11 @@ use \Phalcon\Filter;
*/
class
QueryFilter
{
/**
* sanitize query string
* @param $value sanitize input
* @return mixed sanitize output
*/
public
function
filter
(
$value
)
{
return
preg_replace
(
"/[^0-9,a-z,A-Z, ,*,\-,.,\#]/"
,
""
,
$value
);
...
...
src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
View file @
6b4072cd
...
...
@@ -41,6 +41,7 @@ class UIModelGrid
private
$DataField
=
null
;
/**
* construct a new UIModelGrid
* @param FieldTypes\ArrayField $DataField
*/
public
function
__construct
(
$DataField
)
...
...
src/opnsense/mvc/app/library/OPNsense/Core/Backend.php
View file @
6b4072cd
...
...
@@ -125,6 +125,7 @@ class Backend
}
/**
* check configd socket for last restart, return 0 socket not present.
* @return int last restart timestamp
*/
public
function
getLastRestart
()
...
...
src/opnsense/mvc/app/library/OPNsense/Core/Config.php
View file @
6b4072cd
...
...
@@ -57,6 +57,7 @@ class Config extends Singleton
/**
* return last known status of this configuration (valid or not)
* @return bool return (last known) status of this configuration
*/
public
function
isValid
()
...
...
@@ -213,6 +214,7 @@ class Config extends Singleton
}
/**
* check if there's a valid config loaded, throws an error if config isn't valid.
* @throws ConfigException
*/
private
function
checkvalid
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php
View file @
6b4072cd
...
...
@@ -36,10 +36,11 @@ use Phalcon\Logger\Adapter\Syslog;
/**
* Class BaseModel implements base model to bind config and definition to object.
* Derive from
this class
to create usable models.
* Every model definition should include a class (derived from
this
) and a xml model to define the data (model.xml)
* Derive from
BaseModel
to create usable models.
* Every model definition should include a class (derived from
BaseModel
) and a xml model to define the data (model.xml)
*
* See the Sample model for a full implementation.
* See the HelloWorld model for a full implementation.
* (https://github.com/opnsense/plugins/tree/master/devel/helloworld/src/opnsense/mvc/app/models/OPNsense/HelloWorld)
*
* @package OPNsense\Base
*/
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ArrayField.php
View file @
6b4072cd
...
...
@@ -113,6 +113,7 @@ class ArrayField extends BaseField
}
/**
* retrieve field validators for this field type
* @param string|array $fieldNames sort by fieldname
* @param bool $descending sort descending
* @return array
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/AutoNumberField.php
View file @
6b4072cd
...
...
@@ -116,6 +116,7 @@ class AutoNumberField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
View file @
6b4072cd
...
...
@@ -101,6 +101,7 @@ abstract class BaseField
protected
$internalAttributes
=
array
();
/**
* generate a new UUID v4 number
* @return string uuid v4 number
*/
public
function
generateUUID
()
...
...
@@ -140,6 +141,7 @@ abstract class BaseField
}
/**
* check if this is a container type without data
* @return bool returns if this a container type object (no data)
*/
public
function
isContainer
()
...
...
@@ -251,6 +253,7 @@ abstract class BaseField
}
/**
* return string interpretation of this field
* @return null|string string interpretation of this field
*/
public
function
__toString
()
...
...
@@ -303,6 +306,7 @@ abstract class BaseField
}
/**
* retrieve field attributes
* @return array Field attributes
*/
public
function
getAttributes
()
...
...
@@ -311,6 +315,7 @@ abstract class BaseField
}
/**
* get this nodes children
* @return array child items
*/
public
function
getChildren
()
...
...
@@ -319,6 +324,7 @@ abstract class BaseField
}
/**
* return field validators for this field
* @return array returns validators for this field type (empty if none)
*/
public
function
getValidators
()
...
...
@@ -336,6 +342,8 @@ abstract class BaseField
}
/**
* returns if this node is virtual, the framework uses this to determine if this node maybe should only be used to
* clone children. (using ArrayFields)
* @return bool is virtual node
*/
public
function
getInternalIsVirtual
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BooleanField.php
View file @
6b4072cd
...
...
@@ -43,6 +43,7 @@ class BooleanField extends BaseField
/**
* retrieve field validators for this field type
* @return array returns validators
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/CSVListField.php
View file @
6b4072cd
...
...
@@ -121,6 +121,7 @@ class CSVListField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php
View file @
6b4072cd
...
...
@@ -49,7 +49,7 @@ class ConfigdActionsField extends BaseField
private
static
$internalOptionList
=
array
();
/**
* @var array
* @var array
filters to use on the configd selection
*/
private
$internalFilters
=
array
();
...
...
@@ -146,6 +146,7 @@ class ConfigdActionsField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/EmailField.php
View file @
6b4072cd
...
...
@@ -43,6 +43,7 @@ class EmailField extends BaseField
protected
$internalIsContainer
=
false
;
/**
* retrieve field validators for this field type
* @return array returns Email validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/IntegerField.php
View file @
6b4072cd
...
...
@@ -89,6 +89,7 @@ class IntegerField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/InterfaceField.php
View file @
6b4072cd
...
...
@@ -51,7 +51,7 @@ class InterfaceField extends BaseField
private
static
$internalOptionList
=
array
();
/**
* @var array
* @var array
filters to use on the interface list
*/
private
$internalFilters
=
array
();
...
...
@@ -159,6 +159,7 @@ class InterfaceField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ModelRelationField.php
View file @
6b4072cd
...
...
@@ -125,6 +125,7 @@ class ModelRelationField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/NetworkField.php
View file @
6b4072cd
...
...
@@ -52,6 +52,7 @@ class NetworkField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/OptionField.php
View file @
6b4072cd
...
...
@@ -43,7 +43,7 @@ class OptionField extends BaseField
protected
$internalIsContainer
=
false
;
/**
* @var array
* @var array
valid options for this list
*/
private
$internalOptionList
=
array
();
...
...
@@ -89,6 +89,7 @@ class OptionField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns InclusionIn validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/PortField.php
View file @
6b4072cd
...
...
@@ -42,6 +42,9 @@ class PortField extends BaseField
*/
protected
$internalIsContainer
=
false
;
/**
* @var array list of well known services
*/
private
static
$wellknownservices
=
array
(
'cvsup'
,
'domain'
,
...
...
@@ -119,6 +122,7 @@ class PortField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns InclusionIn validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/TextField.php
View file @
6b4072cd
...
...
@@ -57,6 +57,7 @@ class TextField extends BaseField
}
/**
* retrieve field validators for this field type
* @return array returns Text/regex validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/UrlField.php
View file @
6b4072cd
...
...
@@ -43,6 +43,7 @@ class UrlField extends BaseField
protected
$internalIsContainer
=
false
;
/**
* retrieve field validators for this field type
* @return array returns Url validator
*/
public
function
getValidators
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuInitException.php
View file @
6b4072cd
...
...
@@ -28,6 +28,10 @@
*/
namespace
OPNsense\Base\Menu
;
/**
* Class MenuInitException
* @package OPNsense\Base\Menu
*/
class
MenuInitException
extends
\Exception
{
}
src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuItem.php
View file @
6b4072cd
...
...
@@ -220,6 +220,7 @@ class MenuItem
}
/**
* check if this item is selected
* @return bool is this item selected
*/
public
function
getSelected
()
...
...
src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuSystem.php
View file @
6b4072cd
...
...
@@ -28,8 +28,15 @@
*/
namespace
OPNsense\Base\Menu
;
/**
* Class MenuSystem
* @package OPNsense\Base\Menu
*/
class
MenuSystem
{
/**
* @var null|MenuItem root node
*/
private
$root
=
null
;
/**
...
...
src/opnsense/mvc/app/models/OPNsense/Base/Validators/IntegerValidator.php
View file @
6b4072cd
...
...
@@ -33,6 +33,10 @@ use \Phalcon\Validation\Validator;
use
\Phalcon\Validation\ValidatorInterface
;
use
\Phalcon\Validation\Message
;
/**
* Class IntegerValidator
* @package OPNsense\Base\Validators
*/
class
IntegerValidator
extends
Validator
implements
ValidatorInterface
{
...
...
src/opnsense/mvc/app/models/OPNsense/Base/Validators/MinMaxValidator.php
View file @
6b4072cd
...
...
@@ -33,6 +33,10 @@ use \Phalcon\Validation\Validator;
use
\Phalcon\Validation\ValidatorInterface
;
use
\Phalcon\Validation\Message
;
/**
* Class MinMaxValidator
* @package OPNsense\Base\Validators
*/
class
MinMaxValidator
extends
Validator
implements
ValidatorInterface
{
/**
...
...
src/opnsense/mvc/app/models/OPNsense/Cron/Cron.php
View file @
6b4072cd
...
...
@@ -30,6 +30,10 @@ namespace OPNsense\Cron;
use
OPNsense\Base\BaseModel
;
/**
* Class Cron
* @package OPNsense\Cron
*/
class
Cron
extends
BaseModel
{
/**
...
...
src/opnsense/mvc/app/models/OPNsense/IDS/IDS.php
View file @
6b4072cd
...
...
@@ -30,6 +30,10 @@ namespace OPNsense\IDS;
use
OPNsense\Base\BaseModel
;
/**
* Class IDS
* @package OPNsense\IDS
*/
class
IDS
extends
BaseModel
{
/**
...
...
src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.php
View file @
6b4072cd
...
...
@@ -30,6 +30,10 @@ namespace OPNsense\Proxy;
use
OPNsense\Base\BaseModel
;
/**
* Class Proxy
* @package OPNsense\Proxy
*/
class
Proxy
extends
BaseModel
{
}
src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.php
View file @
6b4072cd
...
...
@@ -30,6 +30,10 @@ namespace OPNsense\TrafficShaper;
use
OPNsense\Base\BaseModel
;
/**
* Class TrafficShaper
* @package OPNsense\TrafficShaper
*/
class
TrafficShaper
extends
BaseModel
{
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment