Skip to content
Snippets Groups Projects
Select Git revision
  • d436a45e1576a0080d8c966529095f8d187a5941
  • main default protected
  • studip-rector
  • ci-opt
  • course-members-export-as-word
  • data-vue-app
  • pipeline-improvements
  • webpack-optimizations
  • rector
  • icon-renewal
  • http-client-and-factories
  • jsonapi-atomic-operations
  • vueify-messages
  • tic-2341
  • 135-translatable-study-areas
  • extensible-sorm-action-parameters
  • sorm-configuration-trait
  • jsonapi-mvv-routes
  • docblocks-for-magic-methods
19 results

CoursewareModule.class.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 87.23 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;
    
         /**
         * db table metadata
         * @var ?array $schemes;
         */
        public static $schemes = null;
    
        /**
         * configuration data for subclasses
         * @see self::configure()
         * @var array $config;
         */
        protected static $config = [];
    
        /**
         * stores instantiated related objects
         * @var array $relations
         */
        protected $relations = [];
    
        /**
         * assoc array for storing values for additional fields
         *
         * @var array $additional_data