public function findByUri($uri, $create = false)
    {
        $subscriber = $this->findOneBy(array( "uri" => $uri ));
        if (!isset($subscriber) && $create) {
            $subscriber = $this->create();
            $subscriber->uri = $uri;
            $this->dm->persist($subscriber);
            $this->dm->flush();
        }
        return $subscriber;
    }
public function findByUri($uri, $create = false)
    {
        $subscriber = $this->findOneBy(array( "uri" => $uri ));
        if (!isset($subscriber) && $create) {
            $subscriber = $this->create();
            $subscriber->uri = $uri;
            $this->dm->persist($subscriber);
            $this->dm->flush();
        }
        return $subscriber;
    }
public function findByUri ( $ uri , $ create = false ) { $ subscriber = $ this -> findOneBy ( array ( "uri" => $ uri ) ) ; if ( ! isset ( $ subscriber ) && $ create ) { $ subscriber = $ this -> create ( ) ; $ subscriber -> uri = $ uri ; $ this -> dm -> persist ( $ subscriber ) ; $ this -> dm -> flush ( ) ; } return $ subscriber ; }
Find a subscriber by an uri

@param String $uri
@param boolean $create
@return \Applications\Entity\Subscriber
Find a subscriber by an uri