ascvh@#%(^-^)V ?host,ip,port,protocol,title,domain,country,city,link,org ???à JFIF  x x ?? C         ?? C   ?à   " ??     ?? μ  } !1AQa "q2?‘?#B±áR?e$3br? %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz??…???‰?’“”?–—???¢£¤¥|§¨?a23′μ?·?1o??????èéêòó???×?ùúáa?????èéê?òó???÷?ùú??     ?? μ   w !1AQ aq"2?B‘?±á #3Rebr?{ gilour

File "AbstractPlatformConnectorTable.php"

Full Path: /home/zcziejy/ryadselyen/Nextend/Framework/Database/AbstractPlatformConnectorTable.php
File size: 1.95 KB
MIME-type: text/x-php
Charset: utf-8

<?php


namespace Nextend\Framework\Database;


abstract class AbstractPlatformConnectorTable {

    protected $primaryKeyColumn = "id";

    /** @var AbstractPlatformConnector */
    protected static $connector;

    protected $tableName;

    public function __construct($tableName) {

        $this->tableName = self::$connector->getPrefix() . $tableName;
    }

    public function getTableName() {
        return $this->tableName;
    }

    abstract public function findByPk($primaryKey);

    abstract public function findByAttributes(array $attributes, $fields = false, $order = false);

    abstract public function findAll($order = false);

    /**
     * Return with all row by attributes
     *
     * @param array       $attributes
     * @param bool|array  $fields
     * @param bool|string $order
     *
     * @return mixed
     */
    abstract public function findAllByAttributes(array $attributes, $fields = false, $order = false);

    /**
     * Insert new row
     *
     * @param array $attributes
     *
     * @return mixed|void
     */
    abstract public function insert(array $attributes);

    abstract public function insertId();

    /**
     * Update row(s) by param(s)
     *
     * @param array $attributes
     * @param array $conditions
     *
     * @return mixed
     */
    abstract public function update(array $attributes, array $conditions);

    /**
     * Update one row by primary key with $attributes
     *
     * @param mixed $primaryKey
     * @param array $attributes
     *
     * @return mixed
     */
    abstract public function updateByPk($primaryKey, array $attributes);

    /**
     * Delete one with by primary key
     *
     * @param mixed $primaryKey
     *
     * @return mixed
     */
    abstract public function deleteByPk($primaryKey);

    /**
     * Delete all rows by attributes
     *
     * @param array $conditions
     *
     * @return mixed
     */
    abstract public function deleteByAttributes(array $conditions);
}