0
1
Fork 0

Js doc asteriscos

This commit is contained in:
Juan Ferrer Toribio 2016-12-20 10:32:17 +01:00
parent 3c83bed5b3
commit 63d75a7ff6
103 changed files with 353 additions and 298 deletions

View File

@ -12,12 +12,12 @@
*
* - http://www.mydomain.org -> config.www.php
* - http://test.mydomain.org -> config.test.php
**/
*/
return [
/**
* Database parameters.
**/
*/
'db' => [
'host' => 'localhost'
,'port' => 3306

View File

@ -55,8 +55,7 @@
}
.new-text a
{
color: blue;
text-decoration: underline;
color: #2962FF;
}
.new-text li
{

View File

@ -44,8 +44,7 @@
}
.new-text a
{
color: blue;
text-decoration: underline;
color: #2962FF;
}
.new-text li
{

View File

@ -3,7 +3,7 @@ var Calc = require ('./calc');
/**
* Computes a sum of data in the model.
**/
*/
module.exports = new Class
({
Extends: Calc

View File

@ -4,7 +4,7 @@ var SimpleIterator = require ('./simple-iterator');
/**
* Interface for handle foreach operations on the model.
**/
*/
module.exports = new Class
({
Extends: Vn.Param
@ -132,23 +132,23 @@ module.exports = new Class
* You don't need to define it if model isn't updatable.
*
* @param {integer} row The row number
**/
*/
,before: function (row) {}
/**
* Called after each update or insert row operation.
*
* @param {integer} row The row number
**/
*/
,after: function (row) {}
/**
* Called before each model refresh.
**/
*/
,init: function () {}
/**
* Called when an operation in the model is complete.
**/
*/
,done: function () {}
});

View File

@ -8,7 +8,7 @@
* Warning! You should set a well defined dababase level privileges to use this
* class or you could have a serious security hole in you application becasuse
* the user can send any statement to the server. For example: DROP DATABASE
**/
*/
var Connection = new Class ();
module.exports = Connection;
@ -44,7 +44,7 @@ Connection.implement
*
* @param {String} sql The SQL statement
* @param {Function} callback The function to call when operation is done
**/
*/
,execSql: function (sql, callback)
{
this.send ('core/query', {'sql': sql},
@ -57,7 +57,7 @@ Connection.implement
* @param {Sql.Stmt} stmt The statement
* @param {Function} callback The function to call when operation is done
* @param {Sql.Batch} batch The batch used to set the parameters
**/
*/
,execStmt: function (stmt, callback, batch)
{
this.execSql (stmt.render (batch), callback);
@ -69,7 +69,7 @@ Connection.implement
* @param {String} query The SQL statement
* @param {Function} callback The function to call when operation is done
* @param {Sql.Batch} batch The batch used to set the parameters
**/
*/
,execQuery: function (query, callback, batch)
{
this.execStmt (new Sql.String ({query: query}), callback, batch);

View File

@ -11,7 +11,7 @@ module.exports = new Class
{
/**
* The model associated to this form.
**/
*/
model:
{
type: Model
@ -30,7 +30,7 @@ module.exports = new Class
},
/**
* The row where the form positioned, has -1 if the row is unselected.
**/
*/
row:
{
type: Number
@ -51,7 +51,7 @@ module.exports = new Class
},
/**
* The number of rows in the form.
**/
*/
numRows:
{
type: Number
@ -65,7 +65,7 @@ module.exports = new Class
},
/**
* Checks if the form data is ready.
**/
*/
ready:
{
type: Boolean

View File

@ -7,28 +7,28 @@ module.exports = new Class
{
/**
* The model associated to this form.
**/
*/
model:
{
type: Model
},
/**
* The row where the form positioned, has -1 if the row is unselected.
**/
*/
row:
{
type: Number
},
/**
* The number of rows in the form.
**/
*/
numRows:
{
type: Number
},
/**
* Checks if the form data is ready.
**/
*/
ready:
{
type: Boolean
@ -46,7 +46,7 @@ module.exports = new Class
/**
* Emits the 'iter-changed' signal on the form.
**/
*/
,iterChanged: function ()
{
this.signalEmit ('iter-changed');
@ -57,7 +57,7 @@ module.exports = new Class
*
* @param {String} columnName The column name
* @return {integer} The column index or -1 if column not exists
**/
*/
,getColumnIndex: function (columnName)
{
if (this._model)
@ -80,7 +80,7 @@ module.exports = new Class
/**
* Removes the current row.
**/
*/
,deleteRow: function ()
{
if (this._row >= 0)
@ -92,7 +92,7 @@ module.exports = new Class
*
* @param {String} columnName The column name
* @return {Object} The value
**/
*/
,get: function (columnName)
{
return this._model.get (this._row, columnName);
@ -103,7 +103,7 @@ module.exports = new Class
*
* @param {String} columnName The column name
* @param {Object} value The new value
**/
*/
,set: function (columnName, value)
{
return this._model.set (this._row, columnName, value);
@ -114,7 +114,7 @@ module.exports = new Class
*
* @param {String} columnName The column index
* @return {Object} The value
**/
*/
,getByIndex: function (column)
{
return this._model.getByIndex (this._row, column);
@ -125,7 +125,7 @@ module.exports = new Class
*
* @param {String} columnName The column index
* @param {Object} value The new value
**/
*/
,setByIndex: function (column, value)
{
return this._model.setByIndex (this._row, column, value);

View File

@ -9,7 +9,7 @@ var Connection = require ('./connection');
* Note that table and column names must be unique in the selection query,
* otherwise updates are not allowed on that table/column. If two tables or
* columns have the same name, an alias should be used to make it updatable.
**/
*/
var Model = new Class ();
module.exports = Model;
@ -56,7 +56,7 @@ Model.implement
{
/**
* The connection used to execute the statement.
**/
*/
conn:
{
type: Connection
@ -72,7 +72,7 @@ Model.implement
},
/**
* The result index.
**/
*/
resultIndex:
{
type: Number
@ -87,7 +87,7 @@ Model.implement
},
/**
* The batch used to execute the statement.
**/
*/
batch:
{
type: Sql.Batch
@ -103,7 +103,7 @@ Model.implement
},
/**
* The model select statement.
**/
*/
stmt:
{
type: Sql.Stmt
@ -119,7 +119,7 @@ Model.implement
},
/**
* The model query.
**/
*/
query:
{
type: String
@ -137,7 +137,7 @@ Model.implement
},
/**
* The main table.
**/
*/
mainTable:
{
type: String
@ -154,7 +154,7 @@ Model.implement
},
/**
* Determines if the model is updatable.
**/
*/
updatable:
{
type: Boolean
@ -171,7 +171,7 @@ Model.implement
},
/**
* The number of rows in the model.
**/
*/
numRows:
{
type: Number
@ -185,7 +185,7 @@ Model.implement
},
/**
* The current status of the model.
**/
*/
status:
{
type: Number
@ -196,7 +196,7 @@ Model.implement
},
/**
* Checks if the model data is ready.
**/
*/
ready:
{
type: Boolean
@ -207,7 +207,7 @@ Model.implement
},
/**
* Update mode.
**/
*/
mode:
{
enumType: Mode
@ -215,7 +215,7 @@ Model.implement
},
/**
* Wether to execute the model query automatically.
**/
*/
autoLoad:
{
type: Boolean
@ -275,7 +275,7 @@ Model.implement
/**
* Refresh the model data reexecuting the query on the database.
**/
*/
,refresh: function ()
{
var ready = false;
@ -422,7 +422,7 @@ Model.implement
* @param {String} field The destination field name
* @param {String} table The destination table name
* @param {Sql.Expr} srcColumn The default value expression
**/
*/
,setDefault: function (field, table, expr)
{
this._defaults.push
@ -439,7 +439,7 @@ Model.implement
* @param {String} field The destination field name
* @param {String} table The destination table name
* @param {Object} value The default value
**/
*/
,setDefaultFromValue: function (field, table, value)
{
this._defaults.push
@ -457,7 +457,7 @@ Model.implement
* @param {String} field The destination field name
* @param {String} table The destination table name
* @param {String} srcColumn The source column
**/
*/
,setDefaultFromColumn: function (field, table, srcColumn)
{
this._defaults.push
@ -473,7 +473,7 @@ Model.implement
*
* @param {integer} column The column index
* @return {Boolean} %true if column exists, %false otherwise
**/
*/
,checkColExists: function (column)
{
return this.columns
@ -486,7 +486,7 @@ Model.implement
*
* @param {integer} rowIndex The row index
* @return {Boolean} %true if row exists, %false otherwise
**/
*/
,checkRowExists: function (rowIndex)
{
return this.data
@ -511,7 +511,7 @@ Model.implement
*
* @param {string} columnName The column name
* @return {number} The column index or -1 if column not exists
**/
*/
,getColumnIndex: function (columnName)
{
var index;
@ -529,7 +529,7 @@ Model.implement
* @param {number} rowIndex The row index
* @param {string} columnName The column name
* @return {mixed} The value
**/
*/
,get: function (rowIndex, columnName)
{
var index = this.getColumnIndex (columnName);
@ -546,7 +546,7 @@ Model.implement
* @param {number} rowIndex The row index
* @param {string} columnName The column name
* @param {mixed} value The new value
**/
*/
,set: function (rowIndex, columnName, value)
{
var index = this.getColumnIndex (columnName);
@ -563,7 +563,7 @@ Model.implement
* @param {number} rowIndex The row index
* @param {number} column The column index
* @return {mixed} The value
**/
*/
,getByIndex: function (rowIndex, column)
{
if (this.checkRowExists (rowIndex) && this.checkColExists (column))
@ -578,7 +578,7 @@ Model.implement
* @param {number} rowIndex The row index
* @param {number} col The column index
* @param {mixed} value The new value
**/
*/
,setByIndex: function (rowIndex, col, value)
{
if (!this.checkRowExists (rowIndex)
@ -634,7 +634,7 @@ Model.implement
* Deletes a row from the model.
*
* @param {number} rowIndex The row index
**/
*/
,deleteRow: function (rowIndex)
{
if (!this.checkRowExists (rowIndex)
@ -681,7 +681,7 @@ Model.implement
* Inserts a new row on the model.
*
* @return The index of the inserted row
**/
*/
,insertRow: function ()
{
if (!this._checkTableUpdatable (this._mainTable))
@ -709,7 +709,7 @@ Model.implement
/**
* Performs all model changes on the database.
**/
*/
,performOperations: function ()
{
var ops = this._operations;
@ -925,7 +925,7 @@ Model.implement
/**
* Undoes all unsaved changes made to the model.
**/
*/
,reverseOperations: function ()
{
for (var i = 0; i < this._operations.length; i++)
@ -998,7 +998,7 @@ Model.implement
*
* @param {integer} column The column name
* @param {SortWay} way The sort way
**/
*/
,sortByName: function (columnName, way)
{
this._requestedSortIndex = -1;
@ -1015,7 +1015,7 @@ Model.implement
*
* @param {integer} column The column index
* @param {SortWay} way The sort way
**/
*/
,sort: function (column, way)
{
this._requestedSortIndex = column;
@ -1062,7 +1062,7 @@ Model.implement
* FIXME: Not fully implemented.
*
* @param {String} column The column name
**/
*/
,indexColumn: function (column)
{
this._requestedIndexes[column] = true;
@ -1106,7 +1106,7 @@ Model.implement
* @param {String} column The column name
* @param {Object} value The value to search
* @return {integer} The column index
**/
*/
,search: function (column, value)
{
var index = this.getColumnIndex (column);
@ -1120,7 +1120,7 @@ Model.implement
* @param {integer} col The column index
* @param {Object} value The value to search
* @return {integer} The column index
**/
*/
,searchByIndex: function (col, value)
{
if (!this.checkColExists (col))
@ -1264,7 +1264,7 @@ Model.implement
* @param {String} schema The original table schema
* @param {Array} pks Array with the names of primary keys
* @param {String} ai The autoincrement column name
**/
*/
,setInfo: function (table, orgname, schema, pks, ai)
{
if (!this.tableInfo)

View File

@ -10,7 +10,7 @@ module.exports = new Class
{
/**
* The form field referenced by this param.
**/
*/
column:
{
type: String
@ -26,7 +26,7 @@ module.exports = new Class
},
/**
* The form referenced by this param.
**/
*/
form:
{
type: Form
@ -48,7 +48,7 @@ module.exports = new Class
/**
* Determines whether the link to the form is unidirectional, ie, a
* change in the form updates the parameter but not vice versa.
**/
*/
oneWay:
{
type: Boolean

View File

@ -9,7 +9,7 @@ module.exports = new Class
{
/**
* The connection used to execute the statement.
**/
*/
conn:
{
type: Connection
@ -25,7 +25,7 @@ module.exports = new Class
},
/**
* The model query.
**/
*/
query:
{
type: String
@ -41,7 +41,7 @@ module.exports = new Class
},
/**
* The model select statement.
**/
*/
stmt:
{
type: Sql.Stmt
@ -57,7 +57,7 @@ module.exports = new Class
},
/**
* The batch used to execute the statement.
**/
*/
batch:
{
type: Sql.Batch
@ -73,7 +73,7 @@ module.exports = new Class
},
/**
* Wether to execute automatically de query que it's ready.
**/
*/
autoLoad:
{
type: Boolean,

View File

@ -3,7 +3,7 @@ var Result = require ('./result');
/**
* This class stores the database results.
**/
*/
module.exports = new Class
({
results: null
@ -11,7 +11,7 @@ module.exports = new Class
/**
* Initilizes the resultset object.
**/
*/
,initialize: function (results, error)
{
this.results = results;
@ -22,7 +22,7 @@ module.exports = new Class
* Gets the query error.
*
* @return {Db.Err} the error or null if no errors hapened
**/
*/
,getError: function ()
{
return this.error;
@ -44,7 +44,7 @@ module.exports = new Class
* Fetchs the next result from the resultset.
*
* @return {Db.Result} the result or %null if error or there are no more results
**/
*/
,fetchResult: function ()
{
var result = this.fetch ();
@ -64,7 +64,7 @@ module.exports = new Class
* Fetchs the first row from the next resultset.
*
* @return {Array} the row if success, %null otherwise
**/
*/
,fetchRow: function ()
{
var result = this.fetch ();
@ -81,7 +81,7 @@ module.exports = new Class
* Fetchs the first row and column value from the next resultset.
*
* @return {Object} the value if success, %null otherwise
**/
*/
,fetchValue: function ()
{
var row = this.fetchRow ();

View File

@ -1,11 +1,11 @@
/**
* This class stores a database result.
**/
*/
module.exports = new Class
({
/**
* Initilizes the result object.
**/
*/
initialize: function (result)
{
this.data = result.data;
@ -29,7 +29,7 @@ module.exports = new Class
*
* @param {String} columnName The column name
* @return {Object} The cell value
**/
*/
,get: function (columnName)
{
var columnIndex = this.columnMap[columnName];
@ -38,7 +38,7 @@ module.exports = new Class
/**
* Resets the result iterator.
**/
*/
,reset: function ()
{
this.row = -1;
@ -46,7 +46,7 @@ module.exports = new Class
/**
* Moves the internal iterator to the next row.
**/
*/
,next: function ()
{
this.row++;

View File

@ -4,7 +4,7 @@ var Model = require ('./model');
/**
* A light iterator for models.
**/
*/
module.exports = new Class
({
Extends: Vn.Object
@ -13,7 +13,7 @@ module.exports = new Class
{
/**
* The model associated to this form.
**/
*/
model:
{
type: Model
@ -28,7 +28,7 @@ module.exports = new Class
},
/**
* The row where the form positioned, has -1 if the row is unselected.
**/
*/
row:
{
type: Number
@ -43,7 +43,7 @@ module.exports = new Class
},
/**
* The number of rows in the form.
**/
*/
numRows:
{
type: Number
@ -57,7 +57,7 @@ module.exports = new Class
},
/**
* Checks if the form data is ready.
**/
*/
ready:
{
type: Boolean

View File

@ -19,7 +19,7 @@ module.exports = new Class
*
* @param {string} objectId The object identifier
* @return {Object} The object, or %null if not found
**/
*/
,$: function (objectId)
{
if (this.builder)
@ -86,7 +86,7 @@ module.exports = new Class
/**
* Called when the form is opened.
**/
*/
,open: function ()
{
this.close ();
@ -96,7 +96,7 @@ module.exports = new Class
/**
* Called when the form is closed.
**/
*/
,close: function ()
{
if (!this.isOpen)
@ -108,12 +108,12 @@ module.exports = new Class
/**
* Called when the form is activated.
**/
*/
,activate: function () {}
/**
* Called when the form is deactivated.
**/
*/
,deactivate: function () {}
,_destroy: function ()

View File

@ -444,18 +444,12 @@ module.exports = new Class
,setTitle: function (title)
{
Vn.Node.removeChilds (this.$('title'));
if (title)
this.$('title').appendChild (title);
Vn.Node.setChild (this.$('title'), title);
}
,setActions: function (actions)
{
Vn.Node.removeChilds (this.$('action-bar'));
if (actions)
this.$('action-bar').appendChild (actions);
Vn.Node.setChild (this.$('action-bar'), actions);
}
,closeForm: function ()

View File

@ -16,7 +16,7 @@ module.exports = new Class
*
* @param {string} objectId The object identifier
* @return {Object} The object, or %null if not found
**/
*/
,$: function (objectId)
{
if (this.builderResult)

View File

@ -4,7 +4,7 @@ var NodeBuilder = require ('./node-builder');
/**
* Represents a grid column. This is an abstract class and should not be
* instantiated directly.
**/
*/
module.exports = new Class
({
Extends: NodeBuilder
@ -65,7 +65,7 @@ module.exports = new Class
/**
* Initializes the column.
**/
*/
,initialize: function (props)
{
this.parent (props);
@ -87,7 +87,7 @@ module.exports = new Class
*
* @param {HTMLTableRow} tr the table row
* @return {HTMLTableData} the rendered cell
**/
*/
,render: function (tr)
{
var td = this.td.cloneNode (true);

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* Format that applies to the value.
**/
*/
format:
{
type: String

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* The directory where the images are allocated.
**/
*/
directory:
{
type: String
@ -15,7 +15,7 @@ module.exports = new Class
},
/**
* The subdirectory where the images are allocated.
**/
*/
subdir:
{
type: String
@ -23,7 +23,7 @@ module.exports = new Class
},
/**
* Subdirectory where full images are allocated.
**/
*/
fullDir:
{
type: String
@ -31,7 +31,7 @@ module.exports = new Class
},
/**
* The REST connection used to upload the image.
**/
*/
conn:
{
type: Vn.JsonConnection

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* The link url.
**/
*/
href:
{
type: String
@ -15,7 +15,7 @@ module.exports = new Class
},
/**
* the target where the link is opened.
**/
*/
target:
{
type: String

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* The text to append to the number.
**/
*/
unit:
{
type: String
@ -15,7 +15,7 @@ module.exports = new Class
},
/**
* The number of decimal places to display.
**/
*/
digits: {
type: Number
,value: 0

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* Format that applies to the value.
**/
*/
format:
{
type: String

View File

@ -3,7 +3,7 @@ var Popup = require ('./popup');
/**
* Class to show message dialogs with buttons.
**/
*/
var Dialog = new Class ();
module.exports = Dialog;
@ -55,7 +55,7 @@ Dialog.implement
{
/**
* The message displayed to the user.
**/
*/
message:
{
type: String
@ -70,7 +70,7 @@ Dialog.implement
}
/**
* The dialog icon.
**/
*/
,icon:
{
type: String
@ -85,7 +85,7 @@ Dialog.implement
}
/**
* The dialog buttons.
**/
*/
,buttons:
{
enumType: Button

View File

@ -112,7 +112,7 @@ module.exports = new Class
* editable.
*
* @param {Boolean} editable Whether the user is allowed to edit the entry
**/
*/
,setEditable: function (editable) {}
/**
@ -120,7 +120,7 @@ module.exports = new Class
* on the associated entry.
*
* @param {Object} value The new value for the entry
**/
*/
,putValue: function (value) {}
/**
@ -128,7 +128,7 @@ module.exports = new Class
* on the associated entry changes.
*
* @param {Object} value The new entry value
**/
*/
,valueChanged: function (value)
{
this._value = value;

View File

@ -1,6 +1,6 @@
/**
* Class to display or edit an image. Also it allows to show it's full version.
**/
*/
module.exports = new Class
({
Extends: Htk.Field
@ -9,7 +9,7 @@ module.exports = new Class
{
/**
* The directory where the images are allocated.
**/
*/
directory:
{
type: String
@ -25,7 +25,7 @@ module.exports = new Class
},
/**
* The subdirectory where the images are allocated.
**/
*/
subdir:
{
type: String
@ -41,7 +41,7 @@ module.exports = new Class
},
/**
* Whether to show the full image when mouse hover.
**/
*/
fullDir:
{
type: String
@ -57,7 +57,7 @@ module.exports = new Class
},
/**
* The REST connection used to upload the image.
**/
*/
conn:
{
type: Vn.JsonConnection

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* Format that applies to the value.
**/
*/
format:
{
type: String

View File

@ -10,7 +10,7 @@ module.exports = new Class
{
/**
* The model associated to this form.
**/
*/
model:
{
type: Db.Model
@ -26,7 +26,7 @@ module.exports = new Class
},
/**
* The row where the form positioned, has -1 if the row is unselected.
**/
*/
row:
{
type: Number
@ -47,7 +47,7 @@ module.exports = new Class
},
/**
* The number of rows in the form.
**/
*/
numRows:
{
type: Number
@ -61,7 +61,7 @@ module.exports = new Class
},
/**
* Checks if the form data is ready.
**/
*/
ready:
{
type: Boolean
@ -72,7 +72,7 @@ module.exports = new Class
},
/**
* Checks if the form data is ready.
**/
*/
placeholder:
{
type: String
@ -88,7 +88,7 @@ module.exports = new Class
},
/**
* Wether to allow null values.
**/
*/
notNull:
{
type: Boolean

View File

@ -7,7 +7,7 @@ module.exports = new Class
{
/**
* Format that applies to the value.
**/
*/
format:
{
type: String

View File

@ -9,7 +9,7 @@ module.exports = new Class
{
/**
* Subdirectory where full images are allocated.
**/
*/
fullDir:
{
type: String

View File

@ -10,7 +10,7 @@ module.exports = new Class
{
/**
* The source data model.
**/
*/
model:
{
type: Db.Model
@ -38,7 +38,7 @@ module.exports = new Class
},
/**
* Message that should be displayed when source model is not ready.
**/
*/
emptyMessage:
{
type: String
@ -46,7 +46,7 @@ module.exports = new Class
},
/**
* Wether to display the header with column titles.
**/
*/
showHeader:
{
type: Boolean

View File

@ -6,7 +6,7 @@ var Tpl = require ('./image-editor.xml');
/**
* A form to handle the image database, it allows to add new images or
* replace it.
**/
*/
module.exports = new Class
({
Extends: Component
@ -14,7 +14,7 @@ module.exports = new Class
{
/**
* The REST connection used to upload the image.
**/
*/
conn:
{
type: Vn.JsonConnection

View File

@ -3,7 +3,7 @@ var Widget = require ('./widget');
/**
* Class to handle popups.
**/
*/
module.exports = new Class
({
Extends: Widget
@ -12,7 +12,7 @@ module.exports = new Class
{
/**
* The popup child.
**/
*/
child:
{
type: Widget
@ -28,7 +28,7 @@ module.exports = new Class
}
/**
* The popup child Node.
**/
*/
,childNode:
{
type: Object
@ -44,7 +44,7 @@ module.exports = new Class
}
/**
* Indicates how the dialog must be displayed.
**/
*/
,modal:
{
type: Boolean

View File

@ -10,7 +10,7 @@ module.exports = new Class
{
/**
* The source data model.
**/
*/
model:
{
type: Db.Model
@ -33,7 +33,7 @@ module.exports = new Class
}
/**
* The identifier for internal iterator.
**/
*/
,formId:
{
type: String
@ -49,7 +49,7 @@ module.exports = new Class
/**
* {Function (Vn.BuilderResult, Db.Form)} Function to call after every
* box rendering.
**/
*/
,renderer:
{
type: Function
@ -64,7 +64,7 @@ module.exports = new Class
}
/**
* Message that should be displayed when source model is not ready.
**/
*/
,emptyMessage:
{
type: String

View File

@ -1,6 +1,6 @@
/**
* Class to show toast messages.
**/
*/
module.exports =
{
maxMessages: 6
@ -13,7 +13,7 @@ module.exports =
* Shows a normal toast message.
*
* @param {String} message The message text
**/
*/
,showMessage: function (message)
{
this._showText (message, 'message');
@ -23,7 +23,7 @@ module.exports =
* Shows a warning toast message.
*
* @param {String} message The message text
**/
*/
,showWarning: function (message)
{
this._showText (message, 'warning');
@ -33,7 +33,7 @@ module.exports =
* Shows an error toast message.
*
* @param {String} message The message text
**/
*/
,showError: function (message)
{
this._showText (message, 'error');
@ -74,7 +74,7 @@ module.exports =
/**
* Hides all currently displayed toast messages.
**/
*/
,hide: function ()
{
if (!this._container)

View File

@ -8,7 +8,7 @@ module.exports = new Class
{
/**
* Main HTML node that represents the widget
**/
*/
node:
{
type: Object
@ -20,7 +20,7 @@ module.exports = new Class
},
/**
* CSS classes to be appendend to the node classes.
**/
*/
class:
{
type: String

View File

@ -4,7 +4,7 @@ var Value = require ('./value');
/**
* A map container for many Sql.Object
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -3,7 +3,7 @@ var Stmt = require ('./stmt');
/**
* The equivalent of a SQL delete.
**/
*/
module.exports = new Class
({
Extends: Stmt

View File

@ -5,7 +5,7 @@ var Field = require ('./field');
/**
* The equivalent of a SQL DML.
**/
*/
module.exports = new Class
({
Extends: Stmt

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/**
* The equivalent of a SQL expression.
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -5,7 +5,7 @@ var Expr = require ('./expr');
* The equivalent of a SQL field.
*
* @param {string} taget The name of the owner table
**/
*/
module.exports = new Class
({
Extends: Expr

View File

@ -3,7 +3,7 @@ var Operation = require ('./operation');
/**
* The equivalent of a SQL operation.
**/
*/
module.exports = new Class
({
Extends: Operation

View File

@ -3,7 +3,7 @@ var Operation = require ('./operation');
/**
* The equivalent of a SQL operation.
**/
*/
module.exports = new Class
({
Extends: Operation

View File

@ -7,7 +7,7 @@ var List = require ('./list');
*
* @param {string} funcName The name of the function
* @param {Array#Sql.Expr} param Array with function parameters
**/
*/
module.exports = new Class
({
Extends: Expr

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/**
* A holder for another object.
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -3,7 +3,7 @@ var Dml = require ('./dml');
/**
* The equivalent of a SQL insert.
**/
*/
module.exports = new Class
({
Extends: Dml

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/**
* List of Sql.Object
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -3,7 +3,7 @@ var Stmt = require ('./stmt');
/**
* The equivalent of a SQL multi statement.
**/
*/
module.exports = new Class
({
Extends: Stmt

View File

@ -1,6 +1,6 @@
/**
* Base class for all objects on this library.
**/
*/
module.exports = new Class
({
Extends: Vn.Object
@ -10,14 +10,14 @@ module.exports = new Class
*
* @param {Sql.Batch} batch The batch used to render the object
* @return {String} The SQL string
**/
*/
,render: function (batch) {}
/**
* Gets if the object is ready to be rendered.
*
* @return {boolean} %true if the object is ready, %false otherwise
**/
*/
,isReady: function ()
{
return true;
@ -27,6 +27,6 @@ module.exports = new Class
* Through the query looking for containers and adds it to the batch.
*
* @return {Sql.Batch} batch The batch
**/
*/
,findHolders: function (batch) {}
});

View File

@ -6,7 +6,7 @@ var Expr = require ('./expr');
*
* @param {Array#Sql.Expr} expr Array with the exprs
* @param {Sql..Operation.Type} type The type of the operation
**/
*/
var Operation = new Class ();
module.exports = Operation;

View File

@ -3,7 +3,7 @@ var Value = require ('./value');
/**
* The equivalent of a SQL value.
**/
*/
module.exports = new Class
({
Extends: Value

View File

@ -4,7 +4,7 @@ var Field = require ('./field');
/**
* The equivalent of a SQL select.
**/
*/
module.exports = new Class
({
Extends: Stmt

View File

@ -4,7 +4,7 @@ var Expr = require ('./expr');
/**
* The equivalent of a SQL statement.
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -4,7 +4,7 @@ var Holder = require ('./holder');
/**
* Literal SQL string.
**/
*/
module.exports = new Class
({
Extends: Stmt

View File

@ -3,7 +3,7 @@ var Target = require ('./target');
/**
* Represents a database table.
**/
*/
module.exports = new Class
({
Extends: Target

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/**
* The equivalent of a SQL target.
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -3,7 +3,7 @@ var Dml = require ('./dml');
/**
* The equivalent of a SQL update.
**/
*/
module.exports = new Class
({
Extends: Dml

View File

@ -3,7 +3,7 @@ var Expr = require ('./expr');
/**
* The equivalent of a SQL value.
**/
*/
module.exports = new Class
({
Extends: Expr
@ -13,7 +13,7 @@ module.exports = new Class
{
/**
* The master param.
**/
*/
param:
{
type: Vn.Param
@ -29,7 +29,7 @@ module.exports = new Class
},
/**
* The value.
**/
*/
value:
{
type: String

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/**
* Creates a object from a XML specification.
**/
*/
module.exports = new Class
({
Extends: Object
@ -69,7 +69,7 @@ module.exports = new Class
* @path String The XML path
* @dstDocument Document The document used to create the nodes
* @return %true on success, %false othersise
**/
*/
,loadXml: function (path, dstDocument)
{
this._path = path;
@ -115,7 +115,7 @@ module.exports = new Class
* @path Node The DOM node
* @dstDocument Document The document used to create the nodes
* @return %true on success, %false othersise
**/
*/
,loadXmlFromNode: function (node, dstDocument)
{
this._compileInit (dstDocument);
@ -264,7 +264,7 @@ module.exports = new Class
/**
* Creates a text node context.
**/
*/
,textCompile: function (node, tagName)
{
if (!tagName)
@ -284,7 +284,7 @@ module.exports = new Class
/**
* Creates a object context.
**/
*/
,objectCompile: function (node, tagName)
{
var klass = vnCustomTags[tagName];
@ -443,7 +443,7 @@ module.exports = new Class
/**
* Creates a HTML node context.
**/
*/
,elementCompile: function (node, tagName)
{
var attributes = {};

View File

@ -1,6 +1,6 @@
/**
* Brownser cookie handler.
**/
*/
module.exports =
{
set: function (key, value, days)

View File

@ -1,6 +1,6 @@
/**
* Date handling utilities.
**/
*/
Date.prototype.clone = function ()
{

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/**
* Class to handle the URL.
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -3,7 +3,7 @@ var HashListener = require ('./hash-listener');
/**
* Class to handle the URL.
**/
*/
module.exports =
{
_hash: null
@ -33,7 +33,7 @@ module.exports =
* Gets the hash part of the URL.
*
* @param {string} key The variable name
**/
*/
,get: function (key)
{
return this._hashMap[key];
@ -43,7 +43,7 @@ module.exports =
* Sets the hash part of the URL, respecting the current hash variables.
*
* @param {Object} map A key-value map
**/
*/
,add: function (map)
{
var newMap = this._hashMap;
@ -58,7 +58,7 @@ module.exports =
* Sets the hash part of the URL.
*
* @param {Object} map A key-value map
**/
*/
,set: function (map)
{
if (map)
@ -90,7 +90,7 @@ module.exports =
* @param {Object} map A key-value map
* @param {boolean} add %true to combine with the current map, %false otherwise
* @return {String} The URL
**/
*/
,make: function (map, add)
{
var hash = '#!';

View File

@ -4,7 +4,7 @@ var JsonException = require ('./json-exception');
/**
* Handler for JSON rest connections.
**/
*/
module.exports = new Class
({
Extends: Object
@ -15,7 +15,7 @@ module.exports = new Class
/**
* Initilizes the connection object.
**/
*/
,initialize: function ()
{
this.parent ();
@ -48,7 +48,7 @@ module.exports = new Class
* @param {String} password The user password
* @param {Boolean} remember Specifies if the user should be remembered
* @param {Function} openCallback The function to call when operation is done
**/
*/
,open: function (user, pass, remember, callback)
{
if (user !== null && user !== undefined)
@ -92,7 +92,7 @@ module.exports = new Class
* Closes the connection to the REST service.
*
* @param {Function} callback The function to call when operation is done
**/
*/
,close: function (callback)
{
this._closeClient ();
@ -122,7 +122,7 @@ module.exports = new Class
*
* @param {String} user The user name
* @param {Function} callback The callback function
**/
*/
,supplantUser: function (user, callback)
{
var params = {'supplantUser': user};
@ -141,7 +141,7 @@ module.exports = new Class
/**
* Ends the user supplanting and restores the last login.
**/
*/
,supplantEnd: function ()
{
this.fetchToken ();
@ -154,7 +154,7 @@ module.exports = new Class
* @param {String} restService The service path
* @param {Map} params The params to pass to the service
* @param {Function} callback The response callback
**/
*/
,send: function (restService, params, callback)
{
if (!params)
@ -162,7 +162,7 @@ module.exports = new Class
params['srv'] = 'json:'+ restService;
this.sendWithUrl (params, callback, 'post', '.');
this.sendWithUrl (params, callback, 'POST', '.');
}
,sendForm: function (form, callback)
@ -174,7 +174,7 @@ module.exports = new Class
if (elements[i].name)
params[elements[i].name] = elements[i].value;
this.sendWithUrl (params, callback, 'post', form.action);
this.sendWithUrl (params, callback, 'POST', form.action);
}
,sendFormMultipart: function (form, callback)
@ -185,7 +185,7 @@ module.exports = new Class
formData.append ('token', this.token);
var request = new XMLHttpRequest ();
request.open ('post', form.action, true);
request.open ('POST', form.action, true);
request.onreadystatechange =
this._onStateChange.bind (this, request, callback);
request.send (formData);

View File

@ -1,6 +1,6 @@
/**
* This class stores the database errors.
**/
*/
module.exports = new Class
({
exception: null

View File

@ -3,7 +3,7 @@ vnLocaleStrings = {};
/**
* Class to manage the internationalization.
**/
*/
module.exports =
{
language: null
@ -24,7 +24,7 @@ module.exports =
var file = path +'/locale/'+ this.language +'.json'+ Vn.getVersion ();
var request = new XMLHttpRequest ();
request.open ('get', file, true);
request.open ('GET', file, true);
request.onreadystatechange = this.loadDone.bind (this, request, callback);
request.send ();
}

View File

@ -1,6 +1,11 @@
module.exports =
{
/**
* Removes all node childs.
*
* @param {Node} node The HTML Node
*/
removeChilds: function (node)
{
var childs = node.childNodes;
@ -10,12 +15,37 @@ module.exports =
node.removeChild (childs[0]);
}
/**
* Removes a node from the document.
*
* @param {Node} node The HTML Node
*/
,remove: function (node)
{
if (node.parentNode)
node.parentNode.removeChild (node);
}
/**
* Replaces the node child/s with another one.
*
* @param {Node} node The HTML Node
* @param {Node} child The new child or %null to set an empty node
*/
,setChild: function (node, child)
{
this.removeChilds (node);
if (child)
node.appendChild (child);
}
/**
* Replaces the node text/childs with text.
*
* @param {Node} node The HTML Node
* @param {Node} child The new node text or %null for no text
*/
,setText: function (node, text)
{
Vn.Node.removeChilds (node);
@ -25,14 +55,25 @@ module.exports =
node.ownerDocument.createTextNode (text));
}
/**
* Adds a class to the node CSS classes. Note that this
* function doesn't check if the node already has the class.
*
* @param {Node} node The HTML Node
* @param {String} className The CSS class name
*/
,addClass: function (node, className)
{
/* var classes = node.className.split (' ');
if (classes.split (' ').indexOf (className) == -1)
*/ node.className = className +' '+ node.className;
node.className = className +' '+ node.className;
}
/**
* Removes a class from the node CSS classes. This functions
* removes all ocurrences of the class from the node.
*
* @param {Node} node The HTML Node
* @param {String} className The CSS class name
*/
,removeClass: function (node, className)
{
var index = 0;
@ -49,18 +90,23 @@ module.exports =
node.className = classes.join (' ');
}
/**
* Hides the node from the document.
*
* @param {Node} node The HTML Node
*/
,hide: function (node)
{
node.style.display = 'none';
}
/**
* Shows a hidden node.
*
* @param {Node} node The hidden HTML Node
*/
,show: function (node)
{
node.style.display = 'block';
}
};
$ = function (id)
{
return document.getElementById (id);
}

View File

@ -3,7 +3,7 @@
* The main base class. Manages the signal system.
*
* @param signals Map with all connected signal handlers
**/
*/
module.exports = new Class
({
Tag: 'vn-object'
@ -17,18 +17,29 @@ module.exports = new Class
this.setProperties (props);
}
/**
* Sets a group of object properties.
*
* @param {Object} props Properties
*/
,setProperties: function (props)
{
for (var prop in props)
this[prop] = props[prop];
}
/**
* Increases the object reference count.
*/
,ref: function ()
{
this._refCount++;
return this;
}
/**
* Decreases the object reference count.
*/
,unref: function ()
{
this._refCount--;
@ -55,7 +66,7 @@ module.exports = new Class
* @param {String} id The signal identifier
* @param {Function} callback The callback
* @param {Object} instance The instance
**/
*/
,on: function (id, callback, instance)
{
if (!(callback instanceof Function))
@ -84,7 +95,7 @@ module.exports = new Class
* @param {String} id The signal identifier
* @param {Function} callback The callback
* @param {Boolean} block %true for lock the signal, %false for unlock
**/
*/
,blockSignal: function (id, callback, block, instance)
{
if (!this._signalData)
@ -105,7 +116,7 @@ module.exports = new Class
* Emits a signal in the current object.
*
* @param {String} id The signal identifier
**/
*/
,signalEmit: function (id)
{
if (!this._signalData)
@ -133,7 +144,7 @@ module.exports = new Class
* @param {String} id The signal identifier
* @param {Function} callback The connected callback
* @param {Object} instance The instance
**/
*/
,disconnect: function (id, callback, instance)
{
if (!this._signalData)
@ -154,7 +165,7 @@ module.exports = new Class
* Disconnects all signals for the given instance.
*
* @param {Object} instance The instance
**/
*/
,disconnectByInstance: function (instance)
{
if (!this._signalData)
@ -175,7 +186,7 @@ module.exports = new Class
/**
* Destroys the object, this method should only be called before losing
* the last reference to the object.
**/
*/
,_destroy: function ()
{
if (!this._signalData)
@ -189,6 +200,12 @@ module.exports = new Class
this._signalData = null;
}
/**
* Links the object with another object.
*
* @param {Object} prop The linked property
* @param {Object} handlers The object events to listen with
*/
,link: function (prop, handlers)
{
this._signalInit ();

View File

@ -5,7 +5,7 @@ var Value = require ('./value');
/**
* Simply a linkable value holder.
**/
*/
module.exports = new Class
({
Extends: Object

View File

@ -1,13 +1,13 @@
/**
* Class to handle the URL.
**/
*/
module.exports =
{
/**
* Gets the value of a URL variable.
*
* @param {string} key The variable name
**/
*/
getQuery: function (key)
{
var regExp = new RegExp ('[\?\&]'+ key +'=([^\&]*)(\&?)', 'i');
@ -21,7 +21,7 @@ module.exports =
*
* @param {string} key The variable name
* @param {string} value The new value
**/
*/
,setQuery: function (key, value)
{
var changed = true;

View File

@ -45,7 +45,7 @@ Vn = module.exports = {
* is already included, does nothing.
*
* @param {string} fileName The stylesheet file name
**/
*/
,includeCss: function (fileName)
{
var cssData = this.cssIncludes[fileName];
@ -75,7 +75,7 @@ Vn = module.exports = {
* Excludes a CSS stylesheet from the current document.
*
* @param {string} fileName The stylesheet file name
**/
*/
,excludeCss: function (fileName)
{
var cssData = this.cssIncludes[fileName];
@ -145,7 +145,7 @@ Vn = module.exports = {
* Should be called on the last statically incuded script.
*
* @param {Function} callback The main function
**/
*/
,main: function (callback)
{
if (this.mainCalled)
@ -206,7 +206,7 @@ Vn = module.exports = {
* current script.
*
* @param {...} The list of files as function arguments
**/
*/
,include: function ()
{
for (var i = 0; i < arguments.length; i++)
@ -223,7 +223,7 @@ Vn = module.exports = {
* current script.
*
* @param {...} The list of files as function arguments
**/
*/
,resource: function ()
{
for (var i = 0; i < arguments.length; i++)
@ -240,7 +240,7 @@ Vn = module.exports = {
* are resolved.
*
* @param {Function} callback The callback function
**/
*/
,define: function (callback)
{
this.currentCallback = callback;
@ -251,7 +251,7 @@ Vn = module.exports = {
*
* @param {string} libName The folder of the library
* @param {Array<string>} files Array with every library file name
**/
*/
,includeLib: function (libName, files)
{
Vn.Locale.loadScript ('js/'+ libName +'.js');
@ -267,7 +267,7 @@ Vn = module.exports = {
* @param {string} fileName The script file name
* @param {Function} callback The function to call when script is
* downloaded and included
**/
*/
,includeJs: function (fileName, callback, skipVersion)
{
var includeData = this._realIncludeJs (fileName, skipVersion);
@ -344,7 +344,7 @@ Vn = module.exports = {
*
* @param {string} path The file path
* @param {Function} callback The function to call when file is downloaded
**/
*/
,loadXml: function (path, callback)
{
var includeData = this._realLoadXml (path);
@ -387,7 +387,7 @@ Vn = module.exports = {
*
* @param {string} path The file path
* @return {Object} The DOM object
**/
*/
,getXml: function (path)
{
var includeData = this.includes[path];
@ -402,7 +402,7 @@ Vn = module.exports = {
* Checks if user is using a mobile browser.
*
* return {boolean} %true if is mobile, %false otherwise.
**/
*/
,isMobile: function ()
{
if (this.isMobileCached === null)

View File

@ -65,7 +65,7 @@ class SshConnection
/**
* Abrebiated method to make SSH connections.
**/
*/
function __construct ($host, $user, $password)
{
$this->connection = $connection = ssh2_connect ($host);
@ -83,7 +83,7 @@ class SshConnection
/**
* Executes a command on the host.
**/
*/
function exec ($command)
{
return ssh2_exec ($this->connection, $command);
@ -91,7 +91,7 @@ class SshConnection
/**
* Escapes the double quotes from an string.
**/
*/
static function escape ($str)
{
return '"'. str_replace ('"', '\\"', $str) .'"';

View File

@ -4,7 +4,7 @@ include __DIR__.'/account.php';
/**
* Updates the user password.
**/
*/
class ChangePassword extends Vn\Web\JsonRequest
{
const PARAMS = ['newPassword'];

View File

@ -89,7 +89,7 @@ class Query extends Vn\Web\JsonRequest
/**
* Transforms the database result into a JSON parseable object.
**/
*/
function transformResult ($result)
{
$tableMap = [];
@ -182,7 +182,7 @@ class Query extends Vn\Web\JsonRequest
/**
* Transforms the database value into a JSON parseable value.
**/
*/
function castValue ($value, $type)
{
if ($value !== NULL)

View File

@ -4,7 +4,7 @@ include __DIR__.'/account.php';
/**
* Sets the user password.
**/
*/
class SetPassword extends Vn\Web\JsonRequest
{
const PARAMS = [

View File

@ -5,7 +5,7 @@ include __DIR__.'/account.php';
/**
* Updates the user credentials on external systems like Samba, create
* home directory, create mailbox, etc.
**/
*/
class SyncUser extends Vn\Web\JsonRequest
{
const PARAMS = ['syncUser'];

View File

@ -4,7 +4,7 @@ use Vn\Lib;
/**
* Adds a document to the Document Management System.
**/
*/
class Add extends Vn\Web\JsonRequest
{
function run ($db)

View File

@ -1,7 +1,7 @@
/**
* Adds a new lot, generates its barcode
* inserts/updates de record on table #vn2008.buy_edi
**/
*/
USE edi;
DROP PROCEDURE IF EXISTS batch_new;
DELIMITER $$

View File

@ -2,7 +2,7 @@
* Creates a buy line from an EDI lot.
*
* @param v_edi The EDI id
**/
*/
USE edi;
DROP PROCEDURE IF EXISTS edi_load;
DELIMITER $$

View File

@ -3,7 +3,7 @@
*
* @param v_mail_id Message-ID of email
* @param v_sender Origin email id
**/
*/
USE edi;
DROP PROCEDURE IF EXISTS message_new;
DELIMITER $$

View File

@ -8,7 +8,7 @@ class Image
* Creates an image resource from a valid image file.
*
* @param string $srcFile The source file name
**/
*/
static function create ($srcFile)
{
$imageType = exif_imagetype ($srcFile);
@ -43,7 +43,7 @@ class Image
* @param integer $maxWidth The maximum width of resized image in pixels
* @param boolean $crop Wether to crop the image
* @param boolean $symbolicSrc If it is not necessary to resize the image creates a symbolic link using the passed path as source
**/
*/
static function resizeSave ($image, $dstFile, $maxHeight, $maxWidth, $crop = FALSE, $symbolicSrc = NULL)
{
$width = imagesx ($image);

View File

@ -10,7 +10,7 @@ require_once (__DIR__.'/lib.php');
* @param integer $maxHeight The maximum height of resized image in pixels
* @param integer $maxWidth The maximum width of resized image in pixels
* @param boolean $rewrite Wether to rewrite the destination file if it exits
**/
*/
class Resize extends Vn\Lib\Method
{
const PARAMS = [

View File

@ -5,7 +5,7 @@ require_once (__DIR__.'/util.php');
/**
* Syncronizes the data directory with the database, this may take
* some time.
**/
*/
class Sync extends Vn\Lib\Method
{
private $trashSubdir;
@ -111,7 +111,7 @@ class Sync extends Vn\Lib\Method
* Moves a data directory to the trash.
*
* @param string $file The file to move to the trash
**/
*/
function moveTrash ($file)
{
$trashBasedir = "{$this->dataDir}/.trash/". $this->$trashSubdir;

View File

@ -9,7 +9,7 @@ require_once (__DIR__.'/util.php');
* @param string $file The file name
* @param integer $width The width of the thumb
* @param integer $height The height of the thumb
**/
*/
class Thumb extends Vn\Web\RestRequest
{
function run ()

View File

@ -7,7 +7,7 @@ use Vn\Lib\UserException;
/**
* Uploads a file creating its corresponding sizes.
**/
*/
class Upload extends Vn\Web\JsonRequest
{
function run ($db)

View File

@ -4,7 +4,7 @@ require_once (__DIR__.'/image.php');
/**
* Base class for image methods.
**/
*/
class Util
{
var $app;
@ -20,7 +20,7 @@ class Util
* Loads information for specified schema.
*
* @param string $schema The schema name
**/
*/
function loadInfo ($schema)
{
$db = $this->app->getSysConn ();

View File

@ -3,7 +3,7 @@
/**
* Ejemplo:
* <Cube><Cube time="2010-12-10"><Cube currency="USD" rate="1.3244"/>
**/
*/
class ExchangeRate extends Vn\Lib\Method
{
function run ($db)
@ -22,7 +22,7 @@ class ExchangeRate extends Vn\Lib\Method
{
$xmlDate = new DateTime ($cube['time']);
// Si existen datos más recientes de la máxima fecha los añade
// Si existen datos m<EFBFBD>s recientes de la m<>xima fecha los a<>ade
if ($maxDate < $xmlDate)
foreach ($cube->Cube as $subCube)

View File

@ -4,7 +4,7 @@ require_once (__DIR__.'/tpv.php');
/**
* Gets transaction confirmations from the IMAP mailbox.
**/
*/
class ConfirmMail extends Vn\Lib\Method
{
function run ($db)

View File

@ -4,7 +4,7 @@ require_once (__DIR__.'/tpv.php');
/**
* Gets transaction confirmation from HTTP POST.
**/
*/
class ConfirmPost extends Vn\Web\RestRequest
{
function run ($db)

View File

@ -5,7 +5,7 @@ require_once (__DIR__.'/tpv.php');
/**
* Gets transaction confirmation from SOAP service.
**/
*/
class ConfirmSoap extends Vn\Web\RestRequest
{
function run ($db)

View File

@ -4,7 +4,7 @@ class Tpv
{
/**
* Tryes to confirm a transaction with the given params.
**/
*/
static function confirm ($db, $params)
{
if (!(isset ($params['Ds_Amount'])

View File

@ -2,7 +2,7 @@
/**
* Starts a new TPV transaction and returns the params.
**/
*/
class Transaction extends Vn\Web\JsonRequest
{
const PARAMS = ['amount'];

View File

@ -7,7 +7,7 @@ namespace Vn\Web;
*
* Format for $_REQUEST['srv'] variable:
* - [serviceName]:[requestDir]/[requestFile]
**/
*/
class App extends \Vn\Lib\App
{
protected $conn = NULL;
@ -52,7 +52,7 @@ class App extends \Vn\Lib\App
* or the default config file if isn't defined a file for the vhost.
*
* @return string The config file name
**/
*/
function getConfigFile ()
{
if (!empty ($_SERVER['SERVER_NAME'])

View File

@ -6,7 +6,7 @@ use Vn\Lib\Locale;
/**
* Base class for services that sends response as HTML format.
**/
*/
class HtmlService extends Service
{
function run ()

View File

@ -8,7 +8,7 @@ namespace Vn\Web;
* @property string $exception The exception name
* @property string $message The message string
* @property string $code The code of message
**/
*/
class JsonException
{
var $exception = NULL;

View File

@ -7,7 +7,7 @@ namespace Vn\Web;
*
* @property Object $data The returned data
* @property array $warnings Array with warning messages
**/
*/
class JsonReply
{
var $data = NULL;

View File

@ -4,6 +4,6 @@ namespace Vn\Web;
/**
* Base class for JSON services.
**/
*/
abstract class JsonRequest extends RestRequest {}

View File

@ -6,7 +6,7 @@ use Vn\Lib;
/**
* Base class for JSON application.
**/
*/
class JsonService extends RestService
{
private $warnings = NULL;

View File

@ -7,7 +7,7 @@ use Exception;
/**
* Basic class to encode, decode and verify JWT tokens. It implements the HS256
* algorithm from the RFC 7519 standard.
**/
*/
class Jwt
{
/**
@ -16,7 +16,7 @@ class Jwt
* @param {Array} $payload The data to encode
* @param {string} $key The key used to sign the token
* @return {string} The new JWT token
**/
*/
static function encode ($payload, $key)
{
$header = [
@ -37,7 +37,7 @@ class Jwt
* @param {Array} $token The JWT token
* @param {string} $key The key used to validate the token
* @return {string} The JWT validated and decoded data
**/
*/
static function decode ($token, $key)
{
$parts = explode ('.', $token);

View File

@ -10,7 +10,7 @@ class Security
/**
* Base class for REST services.
**/
*/
abstract class RestRequest extends \Vn\Lib\Method
{
const PARAMS = NULL;

Some files were not shown because too many files have changed in this diff Show More