예제 #1
0
파일: DDC.php 프로젝트: junioraby/TRDC
 private function matricule($object)
 {
     $temp = explode("\\", get_class($object));
     $classe = $temp[count($temp) - 1];
     $index = count($this->em->getRepository('TRCCoreBundle:' . $classe)->findAll()) + 1;
     $date = date('dmY');
     $matricule = $this->ct($classe) . Core::position($index) . $date;
     return $matricule;
 }
예제 #2
0
 public function rcDDC($ddc)
 {
     $ctc = $ddc->getTdc()->getCode();
     $radical = $ddc->getClient()->getRadical();
     //$temp = explode("\\", get_class($));
     //$classe = $temp[count($temp) - 1];
     $index = count($this->em->getRepository('TRCCoreBundle:DDC\\DDC')->findBy(array("client" => $ddc->getClient(), "tdc" => $ddc->getTdc()), array(), null, 0)) + 1;
     $date = date('dmY');
     $matricule = $radical . $ctc . Core::position($index) . $date;
     return $matricule;
 }