This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table:table-row table:style-name="ro1"> | |
<table:table-cell/> | |
<table:table-cell table:style-name="ce1" office:value-type="string"> | |
<text:p>Name</text:p> | |
</table:table-cell> | |
<?php foreach($students as $student):?> | |
<table:table-cell table:style-name="ce1" office:value-type="string"> | |
<text:p><?php echo $student->getName()?></text:p> | |
</table:table-cell> | |
<?php endforeach;?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyExcel { | |
public static function setContent(sfEvent $event, $response) { | |
if (in_array(self::$format, self::$acceptedFormats)) { | |
//add content file | |
$doc = new ZipArchive(); | |
$doc->open(sfConfig::get('sf_data_dir') . '/documents/report/my_report.ods'); | |
$doc->addFromString('content.xml', $response); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyExcel { | |
private static $format = ''; | |
private static $acceptedFormats = array('ods', 'xls', 'pdf'); | |
public static function setFormat(sfEvent $event) { | |
self::$format = $event['format']; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app = require __DIR__.'/../src/app.php'; | |
$app->run(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Bootstraping */ | |
require_once __DIR__.'/../vendor/Silex/silex.phar'; | |
$app = new Silex\Application(); | |
/** App Definition */ | |
$urls = array( | |
'goog' => 'http://www.google.com', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Khepin; | |
class UrlService { | |
private $urls = array( | |
'goog' => 'http://www.google.com', | |
'fb' => 'http://www.facebook.com', | |
); | |
public function get($short){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Khepin\UrlService; | |
/** Bootstraping */ | |
require_once __DIR__.'/../vendor/Silex/silex.phar'; | |
$app = new Silex\Application(); | |
$app['autoloader']->registerNamespaces(array('Khepin' => __DIR__,)); | |
$app['url_service'] = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Bootstraping */ | |
//... previous code, unchanged ... | |
$app->register(new Silex\Extension\TwigExtension(), array( | |
'twig.path' => __DIR__.'/templates', | |
'twig.class_path' => __DIR__.'/../vendor/Twig/lib', | |
'twig.options' => array('cache' => __DIR__.'/../cache'), | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="style.css" /> | |
<title>Welcome to TSUSBOS - The Simple URL Shortener Based On Silex</title> | |
</head> | |
<body> | |
<div id="content">{% block content %}{% endblock %}</div> | |
</body> | |
</html> |