src/Draggy/Loader.php
private function getProjectProperties()
    {
        $r = '';

        $projectOptions = (array)$this->xml->xpath('/draggy/project');
        $projectOptions = (array)$projectOptions[0];

        $this->checkMandatoryAttributes('Project', $projectOptions, ['language', 'description', 'orm', 'framework']);

        $r .= 'Draggy.prototype.setLanguage(\'' . $projectOptions['language'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setDescription(\'' . str_replace('\'', '\\\'', $projectOptions['description']) . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setORM(\'' . $projectOptions['orm'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setFramework(\'' . $projectOptions['framework'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.updateConfiguration();' . PHP_EOL;

        return $r;
    }
private function getProjectProperties()
    {
        $r = '';

        $projectOptions = (array)$this->xml->xpath('/draggy/project');
        $projectOptions = (array)$projectOptions[0];

        $this->checkMandatoryAttributes('Project', $projectOptions, ['language', 'description', 'orm', 'framework']);

        $r .= 'Draggy.prototype.setLanguage(\'' . $projectOptions['language'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setDescription(\'' . str_replace('\'', '\\\'', $projectOptions['description']) . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setORM(\'' . $projectOptions['orm'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setFramework(\'' . $projectOptions['framework'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.updateConfiguration();' . PHP_EOL;

        return $r;
    }
private function getProjectProperties ( ) { $ r = '' ; $ projectOptions = ( array ) $ this -> xml -> xpath ( '/draggy/project' ) ; $ projectOptions = ( array ) $ projectOptions [ 0 ] ; $ this -> checkMandatoryAttributes ( 'Project' , $ projectOptions , [ 'language' , 'description' , 'orm' , 'framework' ] ) ; $ r .= 'Draggy.prototype.setLanguage(\'' . $ projectOptions [ 'language' ] . '\');' . PHP_EOL ; $ r .= 'Draggy.prototype.setDescription(\'' . str_replace ( '\'' , '\\\'' , $ projectOptions [ 'description' ] ) . '\');' . PHP_EOL ; $ r .= 'Draggy.prototype.setORM(\'' . $ projectOptions [ 'orm' ] . '\');' . PHP_EOL ; $ r .= 'Draggy.prototype.setFramework(\'' . $ projectOptions [ 'framework' ] . '\');' . PHP_EOL ; $ r .= 'Draggy.prototype.updateConfiguration();' . PHP_EOL ; return $ r ; }
Get the project properties from the saved file

@return string
Get the project properties from the saved file