Skip to content

Commit

Permalink
change namespace to Ylly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Samouh committed Feb 27, 2011
1 parent 68eb0fe commit 1dbe498
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 48 deletions.
24 changes: 12 additions & 12 deletions Controller/AdminController.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?php

namespace yProx\MediaManagerBundle\Controller;
namespace Ylly\MediaManagerBundle\Controller;

use yProx\CmsBundle\Entity\Site;
use Ylly\CmsBundle\Entity\Site;

use yProx\Extension\TeamBundle\Entity\Worker;
use Ylly\Extension\TeamBundle\Entity\Worker;

use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper;

use yProx\MediaManagerBundle\Enums\MediaType;
use Ylly\MediaManagerBundle\Enums\MediaType;

use yProx\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use Ylly\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;

use Symfony\Bundle\ZendBundle\Logger\Logger;

use yProx\MediaManagerBundle\Entity\Media;
use Ylly\MediaManagerBundle\Entity\Media;

use yProx\MediaManagerBundle\Form\Admin\MediaForm;
use Ylly\MediaManagerBundle\Form\Admin\MediaForm;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

Expand All @@ -41,7 +41,7 @@ public function indexAction()
}

$em = $this->get('doctrine.orm.entity_manager');
$medias = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findAll();
$medias = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findAll();
$association = $this->get('request')->get('association', false);
return $this->render('MediaManagerBundle:Admin:index.html.twig', array('medias' => $medias, 'association' => true));
}
Expand All @@ -63,7 +63,7 @@ public function editAction()
{
$em = $this->get('doctrine.orm.entity_manager');
$form = MediaForm::create($this->get('form.context'), 'media');
$media = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id'));
$media = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id'));

$form->bind($this->get('request'), $media);

Expand All @@ -78,7 +78,7 @@ public function saveAction()
{
$em = $this->get('doctrine.orm.entity_manager');
$form = MediaForm::create($this->get('form.context'), 'media');
$media = ($this->get('request')->get('media_id', null)) ? $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id')) : new Media();
$media = ($this->get('request')->get('media_id', null)) ? $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id')) : new Media();

if (!$media->getId()) $media->setCreatedAt(new \DateTime('now'));
$media->setUpdatedAt(new \DateTime('now'));
Expand Down Expand Up @@ -113,7 +113,7 @@ public function batchAction()
{
foreach($actions as $value)
{
$media = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($value);
$media = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($value);
$em->remove($media);
}
$em->flush();
Expand All @@ -133,7 +133,7 @@ public function listAction()
{
foreach($medias as $id)
{
$media = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($id);
$media = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($id);
$result[] = $media;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Controller/MediaController.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace yProx\MediaManagerBundle\Controller;
namespace Ylly\MediaManagerBundle\Controller;


use yProx\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use Ylly\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;

use Zend\GData\App\HttpException;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
Expand All @@ -16,7 +16,7 @@ class MediaController extends Controller
public function viewAction()
{
$em = $this->get('doctrine.orm.entity_manager');
$media = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id'));
$media = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id'));
if (!$media)
{
throw new HttpException('The media does not exist anymore');
Expand All @@ -30,7 +30,7 @@ public function viewAction()
public function viewOriginalAction()
{
$em = $this->get('doctrine.orm.entity_manager');
$media = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id'));
$media = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($this->get('request')->get('media_id'));
if (!$media)
{
throw new HttpException('The media does not exist anymore');
Expand All @@ -49,7 +49,7 @@ public function cropAction()
$y = $this->get('request')->get('y');
$media_id = $this->get('request')->get('media_id');
$em = $this->get('doctrine.orm.entity_manager');
$media = $em->getRepository('yProx\MediaManagerBundle\Entity\Media')->findOneById($media_id);
$media = $em->getRepository('Ylly\MediaManagerBundle\Entity\Media')->findOneById($media_id);

$imagine = new \Imagine\Gd\Imagine();
$file_temp = MediaManagerUpload::createTemporaryFile($media);
Expand Down
16 changes: 8 additions & 8 deletions DataFixtures/ORM/Media.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

namespace yProx\MediaManagerBundle\DataFixtures\ORM;
namespace Ylly\MediaManagerBundle\DataFixtures\ORM;

use yProx\MediaManagerBundle\Enums\MediaType;
use Ylly\MediaManagerBundle\Enums\MediaType;

use yProx\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use Ylly\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;

use yProx\MediaManagerBundle\Entity\Media;
use Ylly\MediaManagerBundle\Entity\Media;

use Doctrine\Common\DataFixtures\FixtureInterface;
use yProx\CrmBundle\Entity\Company;
use yProx\CrmBundle\Entity\Person;
use yProx\CrmBundle\Entity\User;
use yProx\CrmBundle\Entity\Note;
use Ylly\CrmBundle\Entity\Company;
use Ylly\CrmBundle\Entity\Person;
use Ylly\CrmBundle\Entity\User;
use Ylly\CrmBundle\Entity\Note;

/**
* Data Fixtures Class to load Media example from url et public resources
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/MediaManagerExtension.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace yProx\MediaManagerBundle\DependencyInjection;
namespace Ylly\MediaManagerBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Extension\Extension;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace yProx\MediaManagerBundle\Doctrine\ValueTransformer;
namespace Ylly\MediaManagerBundle\Doctrine\ValueTransformer;

use Symfony\Component\Form\Configurable;
use Symfony\Component\Form\ValueTransformer\TransformationFailedException;
Expand Down
2 changes: 1 addition & 1 deletion Entity/Media.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace yProx\MediaManagerBundle\Entity;
namespace Ylly\MediaManagerBundle\Entity;

/**
* Media Entity Definition
Expand Down
2 changes: 1 addition & 1 deletion Entity/MediaInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace yProx\MediaManagerBundle\Entity;
namespace Ylly\MediaManagerBundle\Entity;

/**
* Media Interface to implements medias associations
Expand Down
2 changes: 1 addition & 1 deletion Enums/MediaType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace yProx\MediaManagerBundle\Enums;
namespace Ylly\MediaManagerBundle\Enums;

/**
* Class whichs define possible Media type
Expand Down
6 changes: 3 additions & 3 deletions Form/Admin/MediaForm.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace yProx\MediaManagerBundle\Form\Admin;
namespace Ylly\MediaManagerBundle\Form\Admin;

use Symfony\Component\Form\FileField;

Expand All @@ -9,11 +9,11 @@
use Symfony\Component\Form\Form;
use Symfony\Component\Form\TextField;
use Symfony\Component\Form\TextareaField;
use yProx\CmsBundle\Form\Field\RichTextareaField;
use Ylly\CmsBundle\Form\Field\RichTextareaField;
use Symfony\Component\Form\FieldGroup;
use Symfony\Component\Form\CollectionField;

use yProx\CmsBundle\Inheritance\Form\InheritanceForm;
use Ylly\CmsBundle\Inheritance\Form\InheritanceForm;

use Doctrine\ORM\EntityManager;

Expand Down
2 changes: 1 addition & 1 deletion Form/Field/MediaField.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace yProx\MediaManagerBundle\Form\Field;
namespace Ylly\MediaManagerBundle\Form\Field;

use Symfony\Component\Form\Field;

Expand Down
8 changes: 4 additions & 4 deletions MediaManagerBundle.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace yProx\MediaManagerBundle;
namespace Ylly\MediaManagerBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerInterface;
Expand All @@ -12,17 +12,17 @@ class MediaManagerBundle extends Bundle
public function boot()
{
$em = $this->container->get('doctrine.orm.default_entity_manager');
Type::addType('longblob', 'yProx\MediaManagerBundle\Types\LongBlob');
Type::addType('longblob', 'Ylly\MediaManagerBundle\Types\LongBlob');
$em->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('LONGBLOB', 'longblob');


/*$classLoader = new \Doctrine\Common\ClassLoader('yProx', __DIR__."/Behavior");
/*$classLoader = new \Doctrine\Common\ClassLoader('Ylly', __DIR__."/Behavior");
$classLoader->register();
$evm = $em->getEventManager();
$fileableListener = new \yProx\MediaManagerBundle\Behavior\Fileable\FileableListener();
$fileableListener = new \Ylly\MediaManagerBundle\Behavior\Fileable\FileableListener();
$evm->addEventSubscriber($fileableListener);*/

}
Expand Down
4 changes: 2 additions & 2 deletions MediaManagerUpload/MediaManagerUpload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace yProx\MediaManagerBundle\MediaManagerUpload;
namespace Ylly\MediaManagerBundle\MediaManagerUpload;


/**
Expand All @@ -13,7 +13,7 @@

use Symfony\Component\HttpFoundation\File\File;

use yProx\MediaManagerBundle\Entity\Media;
use Ylly\MediaManagerBundle\Entity\Media;

class MediaManagerUpload
{
Expand Down
6 changes: 3 additions & 3 deletions Tests/Entity/MediaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* @author Jordan Samouh <lifeextension25@gmail.com>
* version 1.0
*/
use yProx\MediaManagerBundle\Enums\MediaType;
use yProx\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use yProx\MediaManagerBundle\Entity\Media;
use Ylly\MediaManagerBundle\Enums\MediaType;
use Ylly\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use Ylly\MediaManagerBundle\Entity\Media;

class MediaTest extends \PHPUnit_Framework_TestCase
{
Expand Down
8 changes: 4 additions & 4 deletions Tests/MediaManagerUpload/MediaManagerUploadTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
namespace yProx\MediaManagerBundle\Tests\MediaManagerUpload;
namespace Ylly\MediaManagerBundle\Tests\MediaManagerUpload;

/**
* MediaManagerUpload Test For MediaManagerUpload Lib Unit Test
* @author Jordan Samouh <lifeextension25@gmail.com>
* version 1.0
*/
use yProx\MediaManagerBundle\Enums\MediaType;
use yProx\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use yProx\MediaManagerBundle\Entity\Media;
use Ylly\MediaManagerBundle\Enums\MediaType;
use Ylly\MediaManagerBundle\MediaManagerUpload\MediaManagerUpload;
use Ylly\MediaManagerBundle\Entity\Media;
use Doctrine\DBAL\Types\Type;

class MediaManagerUploadTest
Expand Down
2 changes: 1 addition & 1 deletion Types/LongBlob.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace yProx\MediaManagerBundle\Types;
namespace Ylly\MediaManagerBundle\Types;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
Expand Down

2 comments on commit 1dbe498

@stof
Copy link

@stof stof commented on 1dbe498 Mar 15, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should fix the README file which still uses the old namespace

@jsamouh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done! thks

Please sign in to comment.