alias for inst ?

alias for inst ?

LapointeLapointe Posts: 342Questions: 66Answers: 4


is there a way to alias this in php class Editor::inst( $db, $TblName )
for example Editor::inst( $db, $TblName as 'tbl') or Editor::inst( $db, $TblName )->name('tbl') or ???




  • allanallan Posts: 53,561Questions: 1Answers: 8,303 Site admin

    I don't quite understand I'm afraid - are you looking to alias the table name? If so try:

    Editor::inst( $db, $TblName .' as tbl')

    However it isn't something we use extensively, so it is possible there might be a few rough edges.


  • LapointeLapointe Posts: 342Questions: 66Answers: 4

    hi @allan

    Yes it was what I was looking for... I use .data files that describe datas, .def that describe associated table and editor...

    With many table in a dataset, fields do have prefix using table name.

    So when I want to test a way using a view, the stable name used for tests change, and I need to change fields definition in .def files.

    So using alias I can reuse fields definitions with no change at all...

    I did test $Table as 'tbl', missing table name must be a string

    Sometimes I'm better... and this is not really difficult to be


Sign In or Register to comment.