Overview

Namespaces

  • AnalyseModule
    • Models
  • BaseModule
    • Exceptions
    • Models
    • Repository
    • Services
  • DispatchModule
    • Helpers
    • Models
    • Tools
  • PredictModule
  • SearchModule

Classes

  • AnalyseModule\AnalysePresenter
  • AnalyseModule\ConservancyPresenter
  • AnalyseModule\Models\BaseTool
  • AnalyseModule\Models\ConservancyComparator
  • BaseModule\BasePresenter
  • BaseModule\DiscoveredViewReflection
  • BaseModule\ErrorPresenter
  • BaseModule\Form
  • BaseModule\HomepagePresenter
  • BaseModule\Models\BaseModel
  • BaseModule\Models\FileModel
  • BaseModule\PesekPresenter
  • BaseModule\Repository\BaseRepository
  • BaseModule\Repository\TestRepository
  • BaseModule\RouterFactory
  • BaseModule\RssPresenter
  • BaseModule\Services\Authenticator
  • BaseModule\Services\BaseService
  • BaseModule\Services\DbService
  • DispatchModule\BaseMatch
  • DispatchModule\BaseParser
  • DispatchModule\BlastMatch
  • DispatchModule\BlatMatch
  • DispatchModule\Helpers\RnaplotHelper
  • DispatchModule\Helpers\TravelerHelper
  • DispatchModule\Models\BaseModel
  • DispatchModule\Models\BlastModel
  • DispatchModule\Models\BlastXMLParser
  • DispatchModule\Models\BlatModel
  • DispatchModule\Models\Cppredict2Model
  • DispatchModule\Models\CppredictModel
  • DispatchModule\Models\FastaModel
  • DispatchModule\Models\FileModel
  • DispatchModule\PredictParser
  • DispatchModule\ResultSet
  • DispatchModule\SearchParser
  • DispatchModule\Sequence
  • DispatchModule\Tools\AnnotationDbTool
  • DispatchModule\Tools\BaseTool
  • DispatchModule\Tools\Cppredict2Tool
  • DispatchModule\Tools\DbTool
  • DispatchModule\Tools\SimilarityTool
  • DispatchModule\Tools\TaxonomyDbTool
  • PredictModule\PredictPresenter
  • SearchModule\SearchPresenter

Interfaces

  • DispatchModule\Tools\ToolInterface

Exceptions

  • BaseModule\Exceptions\BaseException
  • BaseModule\Exceptions\NotFoundException
  • BaseModule\Exceptions\ToolException
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 
<?php
/**
 * This file is part of the Nette Framework (http://nette.org)
 *
 * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 *
 * For the full copyright and license information, please view
 * the file license.txt that was distributed with this source code.
 */

namespace BaseModule;

/**
 * Reflection metadata class with discovery for a database.
 *
 * @author     Jan Skrasek
 * @property-write Nette\Database\Connection $connection
 */
class DiscoveredViewReflection extends \Nette\Database\Reflection\DiscoveredReflection implements \Nette\Database\IReflection {

    /**
     * Gets primary key - if not found with default DiscoveredReflection, use column called 'id'
     *
     * @param type $table
     * @return string
     */
    public function getPrimary($table) {
        $primary = parent::getPrimary($table);
        if ($primary == '') {
            $primary = 'id';
        }

        return $primary;
    }

    /**
     * Manually add references for views (which is something standard Nette DiscoveredReflection cannot do)
     *
     * @param type $table
     * @param type $key
     * @param type $refresh
     * @return type
     */
    public function getHasManyReference($table, $key, $refresh = TRUE) {
        $this->structure['hasMany']['vw_acc_ann_tax'] = array(
            'fk_sequences' => array('fk_accession', 'sequences'),
            'fk_qualities' => array('fk_accession', 'qualities'),
            'fk_predictions' => array('fk_accession', 'predictions')
        );
        $this->structure['hasMany']['vw_acc_ann_tax_grouped_acc'] = $this->structure['hasMany']['vw_acc_ann_tax'];
        $this->structure['hasMany']['vw_acc_ann_tax_grouped_name'] = $this->structure['hasMany']['vw_acc_ann_tax'];
        return parent::getHasManyReference($table, $key, $refresh);
    }

}
API documentation generated by ApiGen