Giter VIP home page Giter VIP logo

easybib_doctrineresource's People

Contributors

fh avatar glaubinix avatar mischosch avatar rwos avatar till avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

omusico

easybib_doctrineresource's Issues

hardcoded entity folder and wrong folder paths in different contexts

Do we really want to add this folder although it does not necessarily exist in a project?

https://github.com/easybib/EasyBib_DoctrineResource/blob/master/src/EasyBib/Doctrine/DoctrineResource.php#L299

another issue I ran into:
when using doctrineResource from within a module, which does not live in app/modules/ (for example in a travis-ci test environment)

the path determined by getModulePath does not resolve to an existing folder, actually it generates something like: /bibsample/app/modules/infolit/app/modules/infolit/src/InfoLit/Entity

a rather dirty way to fix this issue would be the following, which leads to increased FS-reads :( cannot think of a better way right now.

    /**
     * Get Entity folders
     *
     * @return array
     */
    protected function getEntityFolders()
    {
        $folders = array();

        //only set default entity dir if it really exists
        if (is_dir($this->rootPath . '/library/Doctrine/Model')) {
            $folders[] = $this->rootPath . '/library/Doctrine/Model';
        }

        //set configured entity-dir if run in module-standalone context
        if (is_dir($this->rootPath . '/' . $this->config->modelFolder)) {
            $folders[] = $this->rootPath . '/' . $this->config->modelFolder;
        }

        //set configured entity-dir if run in module context
        if (is_dir($this->getModulePath() . $this->config->modelFolder)) {
            $folders[] = $this->modulePath . '/' . $this->config->modelFolder;
        }

        return $folders;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.