Cakephpdocs 16

CategoryDataSource
Code ExamplesDataSources are the files that execute functions that talk with a source that stores or supplies data to the application, such as MySql, PostgreSql, Oracle, DB2, MS Sql Server. The DataSource abstracts the sending, retrieving, saving, and deleting data to the model so that the model really behaves the same regardless of what external source processes the data. => When creating custom DataSource, make sure the file name is lowercase and has _source.php appended. An XML DataSource could be named, for example, xml_source.php and would be placed in the app/models/datasources directory. Naming the class object in the DataSource file (in this case, for the XML DataSource) is done with the following syntax: class XmlSource extends DataSource {}
Test Code
Links
Remarks
Cancel