atayahmet/glad

View on GitHub
src/Glad/Interfaces/DatabaseAdapterInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Glad\Interfaces;

/**
 * User model adapter interface
 *
 * @author Ahmet ATAY
 * @category DatabaseAdapterInterface
 * @package Glad
 * @copyright 2015
 * @license http://opensource.org/licenses/MIT MIT license
 * @link https://github.com/atayahmet/glad
 */
interface DatabaseAdapterInterface {

    /**
     * Data insert
     *
     * @param array $credentials
     *
     * @return bool
     */ 
    public function gladInsert(array $credentials);

    /**
     * Data update
     *
     * @param array $where
     * @param array $credentials
     *
     * @return bool
     */ 
    public function gladUpdate(array $where, array $credentials);

    /**
     * Get the user identity
     *
     * @param array $identity
     *
     * @return array
     */
    public function getIdentity($identity);

    /**
     * Get the user identity with user id
     *
     * @param mixed $userId
     *
     * @return array
     */
    public function getIdentityWithId($userId);
}