lib/db/cortex.php
protected function applyWhitelist() {
		if ($this->dbsType == 'sql') {
			// fetch full schema
			if (!$this->fluid && isset(self::$schema_cache[$key=$this->table.$this->db->uuid()]))
				$schema = self::$schema_cache[$key];
			else {
				$schema = $this->mapper->schema();
				self::$schema_cache[$this->table.$this->db->uuid()] = $schema;
			}
			// apply reduced fields schema
			if ($this->whitelist)
				$schema = array_intersect_key($schema, array_flip($this->whitelist));
			$this->mapper->schema($schema);
			$this->mapper->reset();
		}
	}
protected function applyWhitelist() {
		if ($this->dbsType == 'sql') {
			// fetch full schema
			if (!$this->fluid && isset(self::$schema_cache[$key=$this->table.$this->db->uuid()]))
				$schema = self::$schema_cache[$key];
			else {
				$schema = $this->mapper->schema();
				self::$schema_cache[$this->table.$this->db->uuid()] = $schema;
			}
			// apply reduced fields schema
			if ($this->whitelist)
				$schema = array_intersect_key($schema, array_flip($this->whitelist));
			$this->mapper->schema($schema);
			$this->mapper->reset();
		}
	}
protected function applyWhitelist ( ) { if ( $ this -> dbsType == 'sql' ) { // fetch full schema if ( ! $ this -> fluid && isset ( self :: $ schema_cache [ $ key = $ this -> table . $ this -> db -> uuid ( ) ] ) ) $ schema = self :: $ schema_cache [ $ key ] ; else { $ schema = $ this -> mapper -> schema ( ) ; self :: $ schema_cache [ $ this -> table . $ this -> db -> uuid ( ) ] = $ schema ; } // apply reduced fields schema if ( $ this -> whitelist ) $ schema = array_intersect_key ( $ schema , array_flip ( $ this -> whitelist ) ) ; $ this -> mapper -> schema ( $ schema ) ; $ this -> mapper -> reset ( ) ; } }
apply whitelist to active mapper schema
apply whitelist to active mapper schema