Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
1654d28c
Commit
1654d28c
authored
8 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
deployment gui - valuestore - update phpdoc
parent
21246c7a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/valuestore/classes/valuestore.class.php
+41
-11
41 additions, 11 deletions
public_html/valuestore/classes/valuestore.class.php
with
41 additions
and
11 deletions
public_html/valuestore/classes/valuestore.class.php
+
41
−
11
View file @
1654d28c
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* $oVersion = new valuestore();
* $oVersion = new valuestore();
*
*
* to delete values for a single place:
* to delete values for a single place:
* $oVersion->setProject("", $this->_aPrjConfig["fileprefix"]$sPhase, $sPlace);
* $oVersion->setProject("", $this->_aPrjConfig["fileprefix"]
,
$sPhase, $sPlace);
* $aVersions=$oVersion->deleteValues();
* $aVersions=$oVersion->deleteValues();
*
*
* to delete all version items for a whole whole project (packages) in all phases
* to delete all version items for a whole whole project (packages) in all phases
...
@@ -338,13 +338,14 @@ class valuestore {
...
@@ -338,13 +338,14 @@ class valuestore {
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
/**
/**
* init before setting or getting
* init a "position" before getting or updating deleting a value
*
* @param string $sProject project id
* @param string $sProject project id
* @param string $sPackage package id
* @param string $sPackage package id
* @param string $sPhase phase (preview|stage|live)
* @param string $sPhase phase (preview|stage|live)
* @param string $sPlace place
(
)
* @param string $sPlace place
(onhold|ready2install|deployed
)
* @param string $sHost
* @param string $sHost
hostname (for place deployed)
* @return type
* @return type
string
*/
*/
public
function
setProject
(
$sProject
,
$sPackage
,
$sPhase
=
false
,
$sPlace
=
false
,
$sHost
=
false
){
public
function
setProject
(
$sProject
,
$sPackage
,
$sPhase
=
false
,
$sPlace
=
false
,
$sHost
=
false
){
$this
->
sProject
=
preg_replace
(
'/[^a-z\-\_0-9]/'
,
''
,
$sProject
);
$this
->
sProject
=
preg_replace
(
'/[^a-z\-\_0-9]/'
,
''
,
$sProject
);
...
@@ -352,12 +353,31 @@ class valuestore {
...
@@ -352,12 +353,31 @@ class valuestore {
return
$this
->
sProject
;
return
$this
->
sProject
;
}
}
/**
* set a package (and more granular items)
* @see setProject()
*
* @param string $sPackage package id
* @param string $sPhase phase (preview|stage|live)
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public
function
setPackage
(
$sPackage
,
$sPhase
,
$sPlace
=
false
,
$sHost
=
false
){
public
function
setPackage
(
$sPackage
,
$sPhase
,
$sPlace
=
false
,
$sHost
=
false
){
$this
->
sPackage
=
preg_replace
(
'/[^a-z\-\_0-9]/'
,
''
,
$sPackage
);
$this
->
sPackage
=
preg_replace
(
'/[^a-z\-\_0-9]/'
,
''
,
$sPackage
);
$this
->
setPhase
(
$sPhase
,
$sPlace
,
$sHost
);
$this
->
setPhase
(
$sPhase
,
$sPlace
,
$sHost
);
return
$this
->
sPackage
;
return
$this
->
sPackage
;
}
}
/**
* set a phase (and more granular items)
* @see setProject()
*
* @param string $sPhase phase (preview|stage|live)
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public
function
setPhase
(
$sPhase
,
$sPlace
=
false
,
$sHost
=
false
){
public
function
setPhase
(
$sPhase
,
$sPlace
=
false
,
$sHost
=
false
){
if
(
!
$this
->
sProject
&&
!
$this
->
sPackage
){
if
(
!
$this
->
sProject
&&
!
$this
->
sPackage
){
$this
->
_quit
(
__FUNCTION__
,
"ERROR: you need to set a project. Use the setProject() method to do so."
);
$this
->
_quit
(
__FUNCTION__
,
"ERROR: you need to set a project. Use the setProject() method to do so."
);
...
@@ -371,6 +391,14 @@ class valuestore {
...
@@ -371,6 +391,14 @@ class valuestore {
return
$this
->
sPhase
;
return
$this
->
sPhase
;
}
}
/**
* set a place (and host)
* @see setProject()
*
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public
function
setPlace
(
$sPlace
,
$sHost
=
false
){
public
function
setPlace
(
$sPlace
,
$sHost
=
false
){
if
((
!
$this
->
sProject
&&
!
$this
->
sPackage
)){
if
((
!
$this
->
sProject
&&
!
$this
->
sPackage
)){
$this
->
_quit
(
__FUNCTION__
,
"ERROR: you need to set a project and phase. Use the setProject() method to do so."
);
$this
->
_quit
(
__FUNCTION__
,
"ERROR: you need to set a project and phase. Use the setProject() method to do so."
);
...
@@ -387,6 +415,13 @@ class valuestore {
...
@@ -387,6 +415,13 @@ class valuestore {
return
$this
->
sPlace
;
return
$this
->
sPlace
;
}
}
/**
* set a host for place "deployed"
* @see setProject()
*
* @param string $sHost hostname
* @return type string
*/
public
function
setHost
(
$sHost
=
false
){
public
function
setHost
(
$sHost
=
false
){
if
((
!
$this
->
sProject
&&
!
$this
->
sPackage
)){
if
((
!
$this
->
sProject
&&
!
$this
->
sPackage
)){
$this
->
_quit
(
__FUNCTION__
,
"ERROR: you need to set a project, phase and place. Use the setProject() method to do so."
);
$this
->
_quit
(
__FUNCTION__
,
"ERROR: you need to set a project, phase and place. Use the setProject() method to do so."
);
...
@@ -423,11 +458,6 @@ class valuestore {
...
@@ -423,11 +458,6 @@ class valuestore {
return
true
;
return
true
;
}
}
/**
* delete values
* @return boolean
*/
/**
/**
* delete values from value store. You need to call setProject() to set
* delete values from value store. You need to call setProject() to set
* project or package and optional phase, place, host. Then call this delete
* project or package and optional phase, place, host. Then call this delete
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment