xuServer  4.2
xuServer est un Framework ORM écrit en PHP pour des bases de données MySQL.
Public Member Functions | Protected Member Functions
xsCollection Class Reference
Inheritance diagram for xsCollection:
xsClass xsComponent xsModel xsConcept

Public Member Functions

 __construct (&$parent, $table)
 
 __invoke ($x="")
 
 __toString ()
 
 sql_each ()
 
 sql_stats ()
 
 stats ($pFunc="")
 
 join ($xsClass)
 
 contains ($xsClass="")
 
 find ($criteria="__NOTHING__")
 
 feedOut ()
 
 _form_group ()
 
 _table ($jqSubmit="")
 
- Public Member Functions inherited from xsClass
 __construct ()
 
 __invoke ($sql="")
 
 __call ($funcName, $arguments)
 
 __toString ()
 
 val ($arr="_POST")
 
 upload ()
 
 create ($input="")
 create an instance of the current object in database More...
 
 read ()
 
 update ($input="", $value="")
 
 delete ()
 
 copy ()
 
 find ($criteria="__NOTHING__")
 
 each ($pfunc)
 
- Public Member Functions inherited from xsComponent
 addButton ($name="name", $value="", $label="__label", $CRUD="1111")
 
 addMethod ($name="name", $label="label", $container="xs-fn-footer")
 
 _form ($method="")
 builds and returns the html code for object formular More...
 
 _formCreate ()
 
 _formRead ()
 
 _formUpdate ()
 
 _formDelete ()
 
 _logo ($height="35")
 
 _icon ()
 
 _list_group_item ()
 
 _thumbnail ()
 
 _table ($sql="")
 
- Public Member Functions inherited from xsModel
 init ()
 
 load ($id="")
 
 build ($mci="", $debug=false)
 
 sql ($criteria="__NOTHING__")
 
 sql_create ()
 
 sql_read ()
 
 sql_update ()
 
 sql_delete ()
 
 sql_copy ()
 
 sql_each ()
 
 sql_stats ()
 
 sql_search ($term="")
 
 stats ($pFunc="")
 
 count ()
 
 sum ()
 
 min ()
 
 max ()
 
 avg ()
 
 percent ()
 
 every ()
 
 any ()
 
 CRUD ($CRUD="")
 
- Public Member Functions inherited from xsConcept
 mciparse ($string="")
 this method parses the given string parameter to determine the module name the concept name and the id of the object More...
 
 privilege ($key="")
 
 foldername ($autocreate=false)
 
 design_readclass ()
 
 design_constructor ()
 

Protected Member Functions

 build_sql ()
 
- Protected Member Functions inherited from xsComponent
 addProperty ($name="name", $value="", $label="__label", $CRUD="1111")
 
 addCollection ($table, $fk_index)
 
 onMetadata ()
 
 onBeforeMetadata ()
 
 onBuildMethods ()
 
 onInstance ()
 
 onBeforeInstance ()
 
 onInstanceFail ()
 
 onBeforeUpdate ()
 
 onUpdate ()
 
 _fieldset ($ajax=true)
 
 _iconCRUD ($crud="", $class="success")
 
- Protected Member Functions inherited from xsModel
 instance ($stmt, $collections="__NONE__")
 
 build_sql ()
 
 build_collections ($criteria="__NOTHING__")
 
- Protected Member Functions inherited from xsConcept
 mciSet ()
 

Additional Inherited Members

- Data Fields inherited from xsClass
 $properties =array()
 array of xsProperties More...
 
 $methods =array()
 array of xsMethods (end user public methods) More...
 
 $collections =array()
 array of xsCollections More...
 
 $uploading =false
 boolean that determines if a file is uploaded with the posted _form More...
 
 $_selectionType = "__NOTHING__"
 
- Data Fields inherited from xsModel
 $db_table ="xam_user"
 name of the table in Database that stores class instances More...
 
 $db_index =""
 name of table field that stores the auto_increment primary key More...
 
 $db_title =""
 name of table field that stores the class title if not specified before using xsClass::load(), the second table column is used More...
 
 $is_built =false
 flag to test if object has been build (metadata, methods ...) More...
 
 $title ="__notitle__"
 this property stores the common name given to an instance of the class More...
 
 $name ="__notitle__"
 this property stores : More...
 
 $can_create =1
 can user create concept instance More...
 
 $can_read =1
 can user read concept instance More...
 
 $can_update =1
 can user update concept instance More...
 
 $can_delete =1
 can user delete concept instance More...
 
 $can_search =1
 can user search concept instance More...
 
 $sql_load_alias =Array()
 
- Data Fields inherited from xsConcept
 $mci =""
 identification of the class concatenation of module_concept_dbid More...
 
 $module ="xam"
 name of the module that deals with the object held by xsClass (convention : word before the first "_" in tablename) More...
 
 $concept ="user"
 name of the class beeing held by xsClass. concept is the name of the php class that extends metaclass xsClass More...
 
 $includeFile =""
 path to the business class file if exists More...
 
 $logoPath =""
 path to the logo of current class More...
 
 $privilegeKey =""
 privilege name defined on child classes More...
 
 $db_id =0
 unique identifyer of primary key, instance number of the class More...
 
- Protected Attributes inherited from xsModel
 $sql_statement =""
 last build sql statement : More...
 
 $sql_statement_create =""
 create an instance in db More...
 
 $sql_statement_read =""
 read an instance in db More...
 
 $sql_statement_update =""
 update an instance in db More...
 
 $sql_statement_delete =""
 delete an instance in db More...
 
 $sql_statement_each =""
 sql each stand for selecting objects in db More...
 
 $sql_statement_stats =""
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( $parent,
  $table 
)

Member Function Documentation

◆ __invoke()

__invoke (   $x = "")

calling object as a function => launches the find() method

◆ __toString()

__toString ( )

◆ _form_group()

_form_group ( )

◆ _table()

_table (   $jqSubmit = "")

◆ build_sql()

build_sql ( )
protected

◆ contains()

contains (   $xsClass = "")

Checks if the object passed in argument is part of the current collection

Parameters
xsClass$xsClass

◆ feedOut()

feedOut ( )

◆ find()

find (   $criteria = "__NOTHING__")

Methode chainable

Returns
xsClass populate xsClass::_selection array with its elements
See also
xsClass::find()
Returns
xsCollection

◆ join()

join (   $xsClass)

extends the current collection to the target class

Parameters
unknown$xsClass
Returns
xsCollection

◆ sql_each()

sql_each ( )

◆ sql_stats()

sql_stats ( )

◆ stats()

stats (   $pFunc = "")

Calcule les statistiques sur la collection en cours et applique la function passée en pararmètres

Parameters
string$pFunc
Returns
xsCollection