Improved: The Router now accepts actions, either trough the _action as parameter, or on the URL pattern after the controller name Example: http://youdomain/[controllername]/[actionname]/ It is now possible to load as many navigations on the page as wanted by passing the name to the JsonNavigation::getInstance()->loadJsonNavigationArray('[NAME]'); call in the navigationAction of the Controller Building forms by simple adding the namespace use Nibiru\Factory\Form; and calling Example: Form::addInputTypeText( array( 'name' => 'lastname', 'value' => 'placeholder' ) ); To finalize the form the last call should be something like this: Form::addForm( array('name' => 'testform', 'method' => 'post', 'action' => '/' . Router::getInstance()->currentPage(), 'target' => '_self') ); The Database design has fully been refactored, now it contains an autoloading mechanism which can be triggert by createing a database folder in the application folder, a Example file is in the folder applicatoin/database The Database access can now be implemented anywhere in your application by adding the namespace to your database accessing Logic: use Nibiru\Factory\Db;
52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?php
|
|
namespace Nibiru;
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: kasdorf
|
|
* Date: 10.11.17
|
|
* Time: 09:06
|
|
*/
|
|
|
|
interface IDb
|
|
{
|
|
/**
|
|
* @desc Has to select a given Rowset by the index ID of the table
|
|
* @param bool $id
|
|
* @return mixed
|
|
*/
|
|
public function selectRowsetById( $id = false );
|
|
|
|
/**
|
|
* @desc inserts a rowset into the table, by the given nextInsertIndex return
|
|
* value for the table
|
|
* @param bool $id
|
|
* @return mixed
|
|
*/
|
|
public function insertRowsetById( $rowset = array(), $id = false );
|
|
|
|
/**
|
|
* @desc in order to have a page navigation a dataset should also be selectable
|
|
* by a min and max value, result limitation
|
|
* @param bool $min
|
|
* @param bool $max
|
|
* @return mixed
|
|
*/
|
|
public function selectDatasetByMinMax( $min = false, $max = false );
|
|
|
|
/**
|
|
* @desc insert a given array by a format into the table of the database
|
|
* @param array $dataset
|
|
* @return mixed
|
|
*/
|
|
public function insertArrayIntoTable( $dataset = array() );
|
|
|
|
/**
|
|
* @desc beacause there is no autoindex this has to be part of every database model
|
|
* class, so the next index is always correctly set
|
|
* @return mixed
|
|
*/
|
|
public function nextInsertIndex();
|
|
|
|
|
|
|
|
} |