mirror of
https://github.com/moparisthebest/wallabag
synced 2024-12-25 08:48:53 -05:00
Doctrine ! FOS User !
This commit is contained in:
parent
fc2079f9d2
commit
a6f683e51a
@ -16,6 +16,10 @@ class AppKernel extends Kernel
|
||||
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
|
||||
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
|
||||
new FOS\UserBundle\FOSUserBundle(),
|
||||
new Wallabag\Bundle\CoreBundle\WallabagCoreBundle(),
|
||||
new Wallabag\Bundle\ApiBundle\WallabagApiBundle(),
|
||||
new Wallabag\Bundle\CliBundle\WallabagCliBundle(),
|
||||
);
|
||||
|
||||
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
|
||||
|
@ -67,3 +67,9 @@ swiftmailer:
|
||||
username: "%mailer_user%"
|
||||
password: "%mailer_password%"
|
||||
spool: { type: memory }
|
||||
|
||||
# FOS User Configuration
|
||||
fos_user:
|
||||
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
|
||||
firewall_name: main
|
||||
user_class: Wallabag\CoreBundle\Entity\User
|
@ -0,0 +1,33 @@
|
||||
wallabag_cli:
|
||||
resource: "@WallabagCliBundle/Controller/"
|
||||
type: annotation
|
||||
prefix: /
|
||||
|
||||
wallabag_api:
|
||||
resource: "@WallabagApiBundle/Controller/"
|
||||
type: annotation
|
||||
prefix: /
|
||||
|
||||
wallabag_core:
|
||||
resource: "@WallabagCoreBundle/Controller/"
|
||||
type: annotation
|
||||
prefix: /
|
||||
|
||||
fos_user_security:
|
||||
resource: "@FOSUserBundle/Resources/config/routing/security.xml"
|
||||
|
||||
fos_user_profile:
|
||||
resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
|
||||
prefix: /profile
|
||||
|
||||
fos_user_register:
|
||||
resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
|
||||
prefix: /register
|
||||
|
||||
fos_user_resetting:
|
||||
resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
|
||||
prefix: /resetting
|
||||
|
||||
fos_user_change_password:
|
||||
resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
|
||||
prefix: /profile
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "symfony/framework-standard-edition",
|
||||
"name": "wallabag/wallabag-symfony",
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"description": "The \"Symfony Standard Edition\" distribution",
|
||||
"description": "Wallabag Symfony Edition",
|
||||
"autoload": {
|
||||
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
|
||||
},
|
||||
@ -17,7 +17,9 @@
|
||||
"symfony/monolog-bundle": "~2.4",
|
||||
"sensio/distribution-bundle": "~3.0",
|
||||
"sensio/framework-extra-bundle": "~3.0",
|
||||
"incenteev/composer-parameter-handler": "~2.0"
|
||||
"incenteev/composer-parameter-handler": "~2.0",
|
||||
"fivefilters/php-readability": "v1.0",
|
||||
"friendsofsymfony/user-bundle": "2.0.x-dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"sensio/generator-bundle": "~2.3"
|
||||
|
130
composer.lock
generated
130
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "0f5bf28fac35560dbdb2e597d32df056",
|
||||
"hash": "4f4cbc95623d5596ec8cf7cb1e3e4b11",
|
||||
"packages": [
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
@ -629,6 +629,120 @@
|
||||
],
|
||||
"time": "2014-07-11 03:05:53"
|
||||
},
|
||||
{
|
||||
"name": "fivefilters/php-readability",
|
||||
"version": "v1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "http://code.fivefilters.org/php-readability.git",
|
||||
"reference": "4f56053bd1fd540969b6cfb7f799a31c7352faee"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Readability": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Keyvan Minoukadeh",
|
||||
"email": "keyvan@keyvan.net",
|
||||
"homepage": "http://keyvan.net",
|
||||
"role": "Developer (ported original JS code to PHP)"
|
||||
},
|
||||
{
|
||||
"name": "Arc90",
|
||||
"homepage": "http://arc90.com",
|
||||
"role": "Developer (original JS version)"
|
||||
}
|
||||
],
|
||||
"description": "Automatic article extraction from HTML",
|
||||
"homepage": "http://code.fivefilters.org/php-readability/",
|
||||
"keywords": [
|
||||
"article",
|
||||
"article extraction",
|
||||
"content",
|
||||
"content extraction",
|
||||
"extraction",
|
||||
"html"
|
||||
],
|
||||
"time": "2013-04-17 13:51:09"
|
||||
},
|
||||
{
|
||||
"name": "friendsofsymfony/user-bundle",
|
||||
"version": "dev-master",
|
||||
"target-dir": "FOS/UserBundle",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FriendsOfSymfony/FOSUserBundle.git",
|
||||
"reference": "1fe261de17abde29d6d461b7a93873d48b0efce7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/1fe261de17abde29d6d461b7a93873d48b0efce7",
|
||||
"reference": "1fe261de17abde29d6d461b7a93873d48b0efce7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"symfony/form": "~2.1",
|
||||
"symfony/framework-bundle": "~2.1",
|
||||
"symfony/security-bundle": "~2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "*",
|
||||
"swiftmailer/swiftmailer": ">=4.3, <6.0",
|
||||
"symfony/validator": "~2.1",
|
||||
"symfony/yaml": "~2.1",
|
||||
"twig/twig": "~1.5",
|
||||
"willdurand/propel-typehintable-behavior": "dev-master"
|
||||
},
|
||||
"suggest": {
|
||||
"willdurand/propel-typehintable-behavior": "Needed when using the propel implementation"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"FOS\\UserBundle": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Christophe Coevoet",
|
||||
"email": "stof@notk.org"
|
||||
},
|
||||
{
|
||||
"name": "FriendsOfSymfony Community",
|
||||
"homepage": "https://github.com/friendsofsymfony/FOSUserBundle/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Thibault Duplessis",
|
||||
"email": "thibault.duplessis@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Symfony FOSUserBundle",
|
||||
"homepage": "http://friendsofsymfony.github.com",
|
||||
"keywords": [
|
||||
"User management"
|
||||
],
|
||||
"time": "2014-08-01 02:49:19"
|
||||
},
|
||||
{
|
||||
"name": "incenteev/composer-parameter-handler",
|
||||
"version": "v2.1.0",
|
||||
@ -1580,18 +1694,14 @@
|
||||
"time": "2014-04-28 14:01:06"
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [
|
||||
|
||||
],
|
||||
"stability-flags": {
|
||||
"friendsofsymfony/user-bundle": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"platform": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"platform-dev": [
|
||||
|
||||
]
|
||||
"platform-dev": []
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\ApiBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
||||
|
||||
class DefaultController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/hello/{name}")
|
||||
* @Template()
|
||||
*/
|
||||
public function indexAction($name)
|
||||
{
|
||||
return array('name' => $name);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\ApiBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* This is the class that validates and merges configuration from your app/config files
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
|
||||
*/
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('wallabag_api');
|
||||
|
||||
// Here you should define the parameters that are allowed to
|
||||
// configure your bundle. See the documentation linked above for
|
||||
// more information on that topic.
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\ApiBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
|
||||
/**
|
||||
* This is the class that loads and manages your bundle configuration
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
|
||||
*/
|
||||
class WallabagApiExtension extends Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.xml');
|
||||
}
|
||||
}
|
20
src/Wallabag/Bundle/ApiBundle/Resources/config/services.xml
Normal file
20
src/Wallabag/Bundle/ApiBundle/Resources/config/services.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<!--
|
||||
<parameters>
|
||||
<parameter key="wallabag_api.example.class">Wallabag\Bundle\ApiBundle\Example</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="wallabag_api.example" class="%wallabag_api.example.class%">
|
||||
<argument type="service" id="service_id" />
|
||||
<argument>plain_value</argument>
|
||||
<argument>%parameter_name%</argument>
|
||||
</service>
|
||||
</services>
|
||||
-->
|
||||
</container>
|
@ -0,0 +1 @@
|
||||
Hello {{ name }}!
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\ApiBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class DefaultControllerTest extends WebTestCase
|
||||
{
|
||||
public function testIndex()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/hello/Fabien');
|
||||
|
||||
$this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
|
||||
}
|
||||
}
|
9
src/Wallabag/Bundle/ApiBundle/WallabagApiBundle.php
Normal file
9
src/Wallabag/Bundle/ApiBundle/WallabagApiBundle.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\ApiBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class WallabagApiBundle extends Bundle
|
||||
{
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace Wallabag\Bundle\CliBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use Wallabag\Schema;
|
||||
|
||||
/**
|
||||
* Application aware command
|
||||
*
|
||||
* Provide a silex application in CLI context.
|
||||
*/
|
||||
class CreateSchemaCommand extends Command
|
||||
{
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('db:create')
|
||||
->setDescription('Create default schema')
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$app = $this->getSilexApplication();
|
||||
$db = $app['db'];
|
||||
|
||||
Schema::createTables($db);
|
||||
|
||||
$output->writeln("<info>Schema created</info>");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CliBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
||||
|
||||
class DefaultController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/hello/{name}")
|
||||
* @Template()
|
||||
*/
|
||||
public function indexAction($name)
|
||||
{
|
||||
return array('name' => $name);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CliBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* This is the class that validates and merges configuration from your app/config files
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
|
||||
*/
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('wallabag_cli');
|
||||
|
||||
// Here you should define the parameters that are allowed to
|
||||
// configure your bundle. See the documentation linked above for
|
||||
// more information on that topic.
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CliBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
|
||||
/**
|
||||
* This is the class that loads and manages your bundle configuration
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
|
||||
*/
|
||||
class WallabagCliExtension extends Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.xml');
|
||||
}
|
||||
}
|
20
src/Wallabag/Bundle/CliBundle/Resources/config/services.xml
Normal file
20
src/Wallabag/Bundle/CliBundle/Resources/config/services.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<!--
|
||||
<parameters>
|
||||
<parameter key="wallabag_cli.example.class">Wallabag\Bundle\CliBundle\Example</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="wallabag_cli.example" class="%wallabag_cli.example.class%">
|
||||
<argument type="service" id="service_id" />
|
||||
<argument>plain_value</argument>
|
||||
<argument>%parameter_name%</argument>
|
||||
</service>
|
||||
</services>
|
||||
-->
|
||||
</container>
|
@ -0,0 +1 @@
|
||||
Hello {{ name }}!
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CliBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class DefaultControllerTest extends WebTestCase
|
||||
{
|
||||
public function testIndex()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/hello/Fabien');
|
||||
|
||||
$this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
|
||||
}
|
||||
}
|
9
src/Wallabag/Bundle/CliBundle/WallabagCliBundle.php
Normal file
9
src/Wallabag/Bundle/CliBundle/WallabagCliBundle.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CliBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class WallabagCliBundle extends Bundle
|
||||
{
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
||||
|
||||
class DefaultController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/hello/{name}")
|
||||
* @Template()
|
||||
*/
|
||||
public function indexAction($name)
|
||||
{
|
||||
return array('name' => $name);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* This is the class that validates and merges configuration from your app/config files
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
|
||||
*/
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('wallabag_core');
|
||||
|
||||
// Here you should define the parameters that are allowed to
|
||||
// configure your bundle. See the documentation linked above for
|
||||
// more information on that topic.
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
|
||||
/**
|
||||
* This is the class that loads and manages your bundle configuration
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
|
||||
*/
|
||||
class WallabagCoreExtension extends Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.xml');
|
||||
}
|
||||
}
|
94
src/Wallabag/Bundle/CoreBundle/Entity/Config.php
Normal file
94
src/Wallabag/Bundle/CoreBundle/Entity/Config.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Config
|
||||
*
|
||||
* @ORM\Table()
|
||||
* @ORM\Entity(repositoryClass="Wallabag\Bundle\CoreBundle\Repository\ConfigRepository")
|
||||
*/
|
||||
class Config
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="name", type="string", length=255)
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="value", type="text")
|
||||
*/
|
||||
private $value;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
* @return Config
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value
|
||||
*
|
||||
* @param string $value
|
||||
* @return Config
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
294
src/Wallabag/Bundle/CoreBundle/Entity/Entry.php
Normal file
294
src/Wallabag/Bundle/CoreBundle/Entity/Entry.php
Normal file
@ -0,0 +1,294 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Entry
|
||||
*
|
||||
* @ORM\Table(indexes={@ORM\Index(name="idx_status", columns={"status"})})
|
||||
* @ORM\Entity(repositoryClass="Wallabag\Bundle\CoreBundle\Repository\EntryRepository")
|
||||
*/
|
||||
class Entry
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="url", type="text")
|
||||
*/
|
||||
private $url;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="title", type="text")
|
||||
*/
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="content", type="text")
|
||||
*/
|
||||
private $content;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="updated", type="boolean")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="status", type="string", length=255)
|
||||
*/
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="bookmark", type="boolean")
|
||||
*/
|
||||
private $bookmark;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="fetched", type="boolean")
|
||||
*/
|
||||
private $fetched;
|
||||
|
||||
/**
|
||||
* @var User
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\Bundle\CoreBundle\Entity\User")
|
||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity="Wallabag\Bundle\CoreBundle\Entity\Tag")
|
||||
* @ORM\JoinTable(name="tags_entries",
|
||||
* joinColumns={@ORM\JoinColumn(name="entry_id", referencedColumnName="id")},
|
||||
* inverseJoinColumns={@ORM\JoinColumn(name="tag_id", referencedColumnName="id")})
|
||||
*/
|
||||
private $tags;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set url
|
||||
*
|
||||
* @param string $url
|
||||
* @return Entry
|
||||
*/
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set title
|
||||
*
|
||||
* @param string $title
|
||||
* @return Entry
|
||||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get title
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set content
|
||||
*
|
||||
* @param string $content
|
||||
* @return Entry
|
||||
*/
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->content = $content;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param boolean $updated
|
||||
* @return Entry
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status
|
||||
*
|
||||
* @param string $status
|
||||
* @return Entry
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->status = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set bookmark
|
||||
*
|
||||
* @param boolean $bookmark
|
||||
* @return Entry
|
||||
*/
|
||||
public function setBookmark($bookmark)
|
||||
{
|
||||
$this->bookmark = $bookmark;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bookmark
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getBookmark()
|
||||
{
|
||||
return $this->bookmark;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set fetched
|
||||
*
|
||||
* @param boolean $fetched
|
||||
* @return Entry
|
||||
*/
|
||||
public function setFetched($fetched)
|
||||
{
|
||||
$this->fetched = $fetched;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get fetched
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getFetched()
|
||||
{
|
||||
return $this->fetched;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $tags
|
||||
*/
|
||||
public function setTags($tags)
|
||||
{
|
||||
$this->tags = $tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return User
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
public function setUser($user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
}
|
94
src/Wallabag/Bundle/CoreBundle/Entity/PluginOption.php
Normal file
94
src/Wallabag/Bundle/CoreBundle/Entity/PluginOption.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* PluginOption
|
||||
*
|
||||
* @ORM\Table()
|
||||
* @ORM\Entity(repositoryClass="Wallabag\Bundle\CoreBundle\Entity\PluginOptionRepository")
|
||||
*/
|
||||
class PluginOption
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="name", type="string", length=255)
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="value", type="text")
|
||||
*/
|
||||
private $value;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
* @return PluginOption
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value
|
||||
*
|
||||
* @param string $value
|
||||
* @return PluginOption
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
64
src/Wallabag/Bundle/CoreBundle/Entity/Tag.php
Normal file
64
src/Wallabag/Bundle/CoreBundle/Entity/Tag.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Tag
|
||||
*
|
||||
* @ORM\Table()
|
||||
* @ORM\Entity(repositoryClass="Wallabag\Bundle\CoreBundle\Repository\TagRepository")
|
||||
*/
|
||||
class Tag
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="value", type="string", length=255)
|
||||
*/
|
||||
private $value;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value
|
||||
*
|
||||
* @param string $value
|
||||
* @return Tag
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
223
src/Wallabag/Bundle/CoreBundle/Entity/User.php
Normal file
223
src/Wallabag/Bundle/CoreBundle/Entity/User.php
Normal file
@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\UserBundle\Model\User as BaseUser;
|
||||
|
||||
/**
|
||||
* User
|
||||
*
|
||||
* @ORM\Table()
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class User extends BaseUser
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="preferred_locale", type="string", length=5)
|
||||
*/
|
||||
private $preferredLocale;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="items_per_page", type="integer")
|
||||
*/
|
||||
private $itemsPerPage;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="theme", type="string")
|
||||
*/
|
||||
private $theme = 'original';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="items_sorting_direction", type="string")
|
||||
*/
|
||||
private $itemsSortingDirection = 'asc';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="api_token", type="string")
|
||||
*/
|
||||
private $apiToken;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="feed_token", type="string")
|
||||
*/
|
||||
private $feedToken;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="auth_google_token", type="string")
|
||||
*/
|
||||
private $authGoogleToken;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="auth_mozilla_token", type="string")
|
||||
*/
|
||||
private $authMozillaToken;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPreferredLocale()
|
||||
{
|
||||
return $this->preferredLocale;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $preferredLocale
|
||||
*/
|
||||
public function setPreferredLocale($preferredLocale)
|
||||
{
|
||||
$this->preferredLocale = $preferredLocale;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getApiToken()
|
||||
{
|
||||
return $this->apiToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $apiToken
|
||||
*/
|
||||
public function setApiToken($apiToken)
|
||||
{
|
||||
$this->apiToken = $apiToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthGoogleToken()
|
||||
{
|
||||
return $this->authGoogleToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $authGoogleToken
|
||||
*/
|
||||
public function setAuthGoogleToken($authGoogleToken)
|
||||
{
|
||||
$this->authGoogleToken = $authGoogleToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthMozillaToken()
|
||||
{
|
||||
return $this->authMozillaToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $authMozillaToken
|
||||
*/
|
||||
public function setAuthMozillaToken($authMozillaToken)
|
||||
{
|
||||
$this->authMozillaToken = $authMozillaToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFeedToken()
|
||||
{
|
||||
return $this->feedToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $feedToken
|
||||
*/
|
||||
public function setFeedToken($feedToken)
|
||||
{
|
||||
$this->feedToken = $feedToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getItemsPerPage()
|
||||
{
|
||||
return $this->itemsPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $itemsPerPage
|
||||
*/
|
||||
public function setItemsPerPage($itemsPerPage)
|
||||
{
|
||||
$this->itemsPerPage = $itemsPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getItemsSortingDirection()
|
||||
{
|
||||
return $this->itemsSortingDirection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $itemsSortingDirection
|
||||
*/
|
||||
public function setItemsSortingDirection($itemsSortingDirection)
|
||||
{
|
||||
$this->itemsSortingDirection = $itemsSortingDirection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTheme()
|
||||
{
|
||||
return $this->theme;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $theme
|
||||
*/
|
||||
public function setTheme($theme)
|
||||
{
|
||||
$this->theme = $theme;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* ConfigRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class ConfigRepository extends EntityRepository
|
||||
{
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* EntryRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class EntryRepository extends EntityRepository
|
||||
{
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* PluginOptionRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class PluginOptionRepository extends EntityRepository
|
||||
{
|
||||
}
|
15
src/Wallabag/Bundle/CoreBundle/Repository/TagRepository.php
Normal file
15
src/Wallabag/Bundle/CoreBundle/Repository/TagRepository.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* TagRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class TagRepository extends EntityRepository
|
||||
{
|
||||
}
|
20
src/Wallabag/Bundle/CoreBundle/Resources/config/services.xml
Normal file
20
src/Wallabag/Bundle/CoreBundle/Resources/config/services.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<!--
|
||||
<parameters>
|
||||
<parameter key="wallabag_core.example.class">Wallabag\Bundle\CoreBundle\Example</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="wallabag_core.example" class="%wallabag_core.example.class%">
|
||||
<argument type="service" id="service_id" />
|
||||
<argument>plain_value</argument>
|
||||
<argument>%parameter_name%</argument>
|
||||
</service>
|
||||
</services>
|
||||
-->
|
||||
</container>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" datatype="plaintext" original="file.ext">
|
||||
<body>
|
||||
<trans-unit id="1">
|
||||
<source>Symfony2 is great</source>
|
||||
<target>J'aime Symfony2</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1 @@
|
||||
Hello {{ name }}!
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class DefaultControllerTest extends WebTestCase
|
||||
{
|
||||
public function testIndex()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/hello/Fabien');
|
||||
|
||||
$this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
|
||||
}
|
||||
}
|
9
src/Wallabag/Bundle/CoreBundle/WallabagCoreBundle.php
Normal file
9
src/Wallabag/Bundle/CoreBundle/WallabagCoreBundle.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\Bundle\CoreBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class WallabagCoreBundle extends Bundle
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user