Skip to content
Snippets Groups Projects
Select Git revision
  • 861a2621e6732a95aaf8e0a9f25ba77dc22c9024
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

StructuralElementsCopy.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    SimpleORMap.class.php 85.69 KiB
    <?php
    /**
     * SimpleORMap.class.php
     * simple object-relational mapping
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation; either version 2 of
     * the License, or (at your option) any later version.
     *
     * @author      André Noack <noack@data-quest.de>
     * @copyright   2010 Stud.IP Core-Group
     * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
     * @category    Stud.IP
    */
    
    class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
    {
        /**
         * Defines `_` as character used when joining composite primary keys.
         */
        const ID_SEPARATOR = '_';
    
        /**
         * table row data
         * @var array $content
         */
        protected $content = [];
        /**
         * table row data
         * @var array $content_db
         */
        protected $content_db = [];
        /**
         * new state of entry
         * @var boolean $is_new
         */
        protected $is_new = true;
        /**
         * deleted state of entry
         * @var boolean $is_deleted
         */
        protected $is_deleted = false;
        /**
         * name of db table
         * @var string $db_table
         */
        protected $db_table = '';
        /**
         * table columns
         * @var array $db_fields
         */
        protected $db_fields = null;
        /**
         * primary key columns
         * @var array $pk
         */
        protected $pk = null;
    
        /**
         * default values for columns
         * @var array $default_values
         */
        protected $default_values = [];
    
        /**
         * list of columns to deserialize
         * @var array key is name of column, value is name of ArrayObject class
         */
        protected $serialized_fields = [];