Exemplo n.º 1
0
 /**
  * @test
  */
 public function shouldParseWrapperClass()
 {
     //given
     $parser = new WrapperParser('\\Mocks\\MockUserWrapper');
     //when
     $parser->parse();
     //then
     $complex = $parser->getComplexTypes();
     $this->assertCount(3, $complex);
 }
Exemplo n.º 2
0
 public function wrapper(&$type, $docComment)
 {
     if (!$this->isComplex($type)) {
         throw new WrapperParserException("This attribute is not complex type.");
     }
     preg_match('#@className=(.*?)(?:\\s|$)#', $docComment, $matches);
     $className = $matches[1];
     $type = str_replace('\\', '', $className);
     $wrapperParser = new WrapperParser($className);
     $wrapperParser->parse();
     return $wrapperParser;
 }
Exemplo n.º 3
0
 public function wrapper()
 {
     if (!$this->isComplex()) {
         throw new ParameterParserException("This parameter is not complex type.");
     }
     preg_match('#@className=(.*?)(?:\\s|$)#', $this->_parameter, $matches);
     $className = $matches[1];
     $this->_type = str_replace('\\', '', $className);
     $wrapperParser = new WrapperParser($className);
     $wrapperParser->parse();
     return $wrapperParser;
 }