Créer un compte ou loggez-vous pour pouvoir ajouter, commenter et noter les snippets.

Navigation

Tags relatifs

my Symfony Plugins

Plugins demos


My bookmarks

Vous pouvez commenter/noter en utilisant le compte anonymous (mot de passe: anonymous)
You can comment/rate using the anonymous account (password: anonymous).

Snippets taggés : "xml" Snippets taggés : "xml"

[Joomla] Fichier xml basique de création d'un composant - 194 view(s)

<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5.0" method="upgrade">
  <name>snippets</name>
  <version>1.0</version>
  <creationDate>2008 11 27</creationDate>
  <author>Vernet Loïc</author>
  <authorEmail>cocoil@yahoo.fr</authorEmail>
  <authorUrl>http://www.strangebuzz.com</authorUrl>
  <copyright>(C) 2008 - 2009 COil</copyright>
  <license>COil</license>
  <description>Great component</description>
  <administration>
    <menu img="templates/myadmintemplate/images/menu/comments.png">My component</menu>
  </administration>
  <install />
  <uninstall />
</install>
par COil le 2008-11-27, taggé : component  extension  joomla  plugin  xml 
(1 commentaire)

[symfony] Extraire une table par batch d'un schema.xml - 133 view(s)

  // Delete external tables from plugin schema (already defined in another schema (main or other plugin))
  if (DCMC_EXTERNAL_TABLE) {
    foreach (explode(',', DCMC_EXTERNAL_TABLES) as $external_table) {
      $reg_exp = '/(<table name="'. $external_table. ')(((.)*(\s)*)*?)(<\/table>)/';
      $xmlstr = preg_replace($reg_exp, '', $xmlstr);
    }
  }
 
par COil le 2008-09-29, taggé : propel  regexp  schema  symfony  xml 
(1 commentaire)

[Pear] Display source code of all php files of a package - 441 view(s)

You will need the original package.xml, it can be usefull for package maintainers to provide source of their package as i did for my PHP_Debug pkg

// file
function showSource($dir, $file)
{
    $path = $dir. $file;
    print('<div>');
    print('<h1>'. $path. '</h1>');
    highlight_file($path);
    print('</div>'. "\n");
}
 
// Dir 
function parseDir($dir, $parent)
{
    $path = $parent. ($dir['name'] != '/' ? $dir['name']. '/' : '');
    foreach($dir->file as $file) {
        if (in_array($file['role'], array('test', 'php'))) {
            showSource($path, $file['name']);
        }
    }   
    foreach($dir->dir as $child) {
        parseDir($child, $path);
    }
    return;
}
 
$package = simplexml_load_file('package.xml');
$dir = '';
parseDir($package->contents->dir, $dir);
 
par COil le 2008-09-28, taggé : package  pear  php  release  xml 
(1 commentaire)
Debug toolbar