1000 search results

223 lines | src/AppBundle/Entity/User.php
// ... lines 1 - 4
use Doctrine\Common\Collections\ArrayCollection;
// ... lines 6 - 16
class User implements UserInterface
{
// ... lines 19 - 214
/**
* @return ArrayCollection|Genus[]
*/
public function getStudiedGenuses()
{
return $this->studiedGenuses;
}
}
See Code Block in Script
224 lines | src/AppBundle/Entity/Genus.php
// ... lines 1 - 5
use Doctrine\Common\Collections\Criteria;
// ... lines 7 - 15
class Genus
{
// ... lines 18 - 214
public function getExpertScientists()
{
$criteria = Criteria::create()
// ... lines 218 - 221
}
}
See Code Block in Script
224 lines | src/AppBundle/Entity/Genus.php
// ... lines 1 - 5
use Doctrine\Common\Collections\Criteria;
// ... lines 7 - 15
class Genus
{
// ... lines 18 - 214
public function getExpertScientists()
{
$criteria = Criteria::create()
->andWhere(Criteria::expr()->gt('yearsStudied', 20))
// ... lines 219 - 221
}
}
See Code Block in Script
// ... lines 1 - 5
use Doctrine\Common\Annotations\Reader;
// ... lines 7 - 12
class LinkSerializationSubscriber implements EventSubscriberInterface
{
private $router;
private $annotationReader;
// ... lines 18 - 20
public function __construct(RouterInterface $router, Reader $annotationReader)
{
$this->router = $router;
$this->annotationReader = $annotationReader;
// ... line 25
}
// ... lines 27 - 72
}
See Code Block in Script
15 lines | src/AppBundle/Entity/Movie.php
// ... lines 1 - 4
use Doctrine\ORM\Mapping as ORM;
// ... lines 6 - 15
See Code Block in Script
15 lines | src/AppBundle/Entity/Movie.php
// ... lines 1 - 4
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="movie")
*/
class Movie
{
}
See Code Block in Script
56 lines | src/AppBundle/Test/ApiTestCase.php
// ... lines 1 - 4
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
// ... lines 6 - 8
class ApiTestCase extends KernelTestCase
{
// ... lines 11 - 44
private function purgeDatabase()
{
$purger = new ORMPurger($this->getService('doctrine')->getManager());
$purger->purge();
}
// ... lines 50 - 55
}
See Code Block in Script
// ... lines 1 - 5
use Doctrine\ORM\EntityManager;
// ... lines 7 - 17
class WeirdFormAuthenticator extends AbstractGuardAuthenticator
{
private $em;
// ... lines 21 - 22
public function __construct(EntityManager $em, RouterInterface $router)
{
$this->em = $em;
// ... line 26
}
// ... lines 28 - 99
}
See Code Block in Script
16 lines | app/autoload.php
// ... lines 1 - 2
use Doctrine\Common\Annotations\AnnotationRegistry;
// ... lines 4 - 12
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
// ... lines 14 - 16
See Code Block in Script
129 lines | features/bootstrap/FeatureContext.php
// ... lines 1 - 120
/**
* @return \Doctrine\ORM\EntityManager
*/
private function getEntityManager()
{
return $this->getContainer()->get('doctrine.orm.entity_manager');
}
// ... lines 128 - 129
See Code Block in Script
22 lines | .env.dist
// ... lines 1 - 15
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
###< doctrine/doctrine-bundle ###
See Code Block in Script
22 lines | .env.dist
// ... lines 1 - 15
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://root:@127.0.0.1:3306/symfony4_space_bar
###< doctrine/doctrine-bundle ###
See Code Block in Script
101 lines | src/Controller/ArticleController.php
// ... lines 1 - 7
use Doctrine\ORM\EntityManagerInterface;
// ... lines 9 - 15
class ArticleController extends AbstractController
{
// ... lines 18 - 35
/**
* @Route("/news/{slug}", name="article_show")
*/
public function show($slug, MarkdownHelper $markdownHelper, SlackClient $slack, EntityManagerInterface $em)
{
// ... lines 41 - 86
}
// ... lines 88 - 99
}
See Code Block in Script
56 lines | src/Controller/ArticleAdminController.php
// ... lines 1 - 5
use Doctrine\ORM\EntityManagerInterface;
// ... lines 7 - 10
class ArticleAdminController extends AbstractController
{
// ... lines 13 - 15
public function new(EntityManagerInterface $em)
{
// ... lines 18 - 53
}
}
See Code Block in Script
56 lines | src/Controller/ArticleAdminController.php
// ... lines 1 - 5
use Doctrine\ORM\EntityManagerInterface;
// ... lines 7 - 10
class ArticleAdminController extends AbstractController
{
// ... lines 13 - 15
public function new(EntityManagerInterface $em)
{
// ... lines 18 - 40
// publish most articles
if (rand(1, 10) > 2) {
$article->setPublishedAt(new \DateTime(sprintf('-%d days', rand(1, 100))));
}
$em->persist($article);
$em->flush();
// ... lines 48 - 53
}
}
See Code Block in Script
56 lines | src/Controller/ArticleAdminController.php
// ... lines 1 - 5
use Doctrine\ORM\EntityManagerInterface;
// ... lines 7 - 10
class ArticleAdminController extends AbstractController
{
// ... lines 13 - 15
public function new(EntityManagerInterface $em)
{
// ... lines 18 - 45
$em->persist($article);
$em->flush();
return new Response(sprintf(
'Hiya! New Article id: #%d slug: %s',
$article->getId(),
$article->getSlug()
));
}
}
See Code Block in Script
81 lines | src/Controller/ArticleController.php
// ... lines 1 - 7
use Doctrine\ORM\EntityManagerInterface;
// ... lines 9 - 15
class ArticleController extends AbstractController
{
// ... lines 18 - 30
public function homepage(EntityManagerInterface $em)
{
// ... lines 33 - 38
}
// ... lines 40 - 79
}
See Code Block in Script
51 lines | src/Repository/ArticleRepository.php
// ... lines 1 - 5
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
// ... lines 7 - 14
class ArticleRepository extends ServiceEntityRepository
{
// ... lines 17 - 49
}
See Code Block in Script
93 lines | src/Entity/Article.php
// ... lines 1 - 4
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ArticleRepository")
*/
class Article
{
// ... lines 12 - 91
}
See Code Block in Script
34 lines | src/DataFixtures/BaseFixture.php
// ... lines 1 - 5
use Doctrine\Common\Persistence\ObjectManager;
abstract class BaseFixture extends Fixture
{
/** @var ObjectManager */
private $manager;
// ... lines 12 - 32
}
See Code Block in Script