-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from mmoreram/feature/version-2
Refactoring for v^2
- Loading branch information
Showing
97 changed files
with
2,369 additions
and
5,342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,23 +11,23 @@ | |
* @author Marc Morera <[email protected]> | ||
*/ | ||
|
||
namespace Mmoreram\ControllerExtraBundle\Annotation\Abstracts; | ||
declare(strict_types=1); | ||
|
||
namespace Mmoreram\ControllerExtraBundle\Annotation; | ||
|
||
use Doctrine\Common\Annotations\Annotation as DoctrineAnnotation; | ||
|
||
/** | ||
* Flush annotation driver. | ||
* | ||
* @Annotation | ||
*/ | ||
abstract class Annotation extends DoctrineAnnotation | ||
{ | ||
/** | ||
* return value. | ||
* | ||
* @return string Value | ||
* @return null|string Value | ||
*/ | ||
public function getValue() | ||
public function getValue() : ? string | ||
{ | ||
return $this->value; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the ControllerExtraBundle for Symfony2. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* Feel free to edit as you please, and have fun. | ||
* | ||
* @author Marc Morera <[email protected]> | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mmoreram\ControllerExtraBundle\Annotation; | ||
|
||
/** | ||
* Class AnnotationWithEntityReference. | ||
*/ | ||
abstract class AnnotationWithEntityReference extends Annotation | ||
{ | ||
/** | ||
* @var string | ||
* | ||
* Entity namespace | ||
*/ | ||
protected $namespace; | ||
|
||
/** | ||
* @var array | ||
* | ||
* Factory | ||
*/ | ||
protected $factory; | ||
|
||
/** | ||
* @var string | ||
* | ||
* Repository | ||
*/ | ||
protected $repository; | ||
|
||
/** | ||
* return namespace. | ||
* | ||
* @return null|string Namespace | ||
*/ | ||
public function getNamespace() : ? string | ||
{ | ||
return $this->namespace; | ||
} | ||
|
||
/** | ||
* Get Factory. | ||
* | ||
* @return null|array | ||
*/ | ||
public function getFactory() : ? array | ||
{ | ||
return $this->factory; | ||
} | ||
|
||
/** | ||
* Get Repository. | ||
* | ||
* @return null|array | ||
*/ | ||
public function getRepository() : ? array | ||
{ | ||
return $this->repository; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,99 +11,100 @@ | |
* @author Marc Morera <[email protected]> | ||
*/ | ||
|
||
namespace Mmoreram\ControllerExtraBundle\Annotation; | ||
declare(strict_types=1); | ||
|
||
use Mmoreram\ControllerExtraBundle\Annotation\Abstracts\Annotation; | ||
namespace Mmoreram\ControllerExtraBundle\Annotation; | ||
|
||
/** | ||
* Form annotation driver. | ||
* Class CreateForm. | ||
* | ||
* @Annotation | ||
* @Target({"METHOD"}) | ||
*/ | ||
class Form extends Annotation | ||
final class CreateForm extends Annotation | ||
{ | ||
/** | ||
* @var string | ||
* | ||
* Name of the parameter | ||
*/ | ||
public $name; | ||
protected $name; | ||
|
||
/** | ||
* @var string | ||
* | ||
* Name of form. This value can refer to a namespace or a service alias | ||
*/ | ||
public $class; | ||
protected $class; | ||
|
||
/** | ||
* @var entity | ||
* @var string | ||
* | ||
* Entity from Request ParameterBag to use where building form | ||
*/ | ||
public $entity; | ||
protected $entity; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* Handle request | ||
*/ | ||
public $handleRequest = false; | ||
protected $handleRequest = false; | ||
|
||
/** | ||
* @var validate | ||
* @var bool | ||
* | ||
* Validates submited form if Request is handled. | ||
* Name of field to set result | ||
*/ | ||
public $validate = false; | ||
protected $validate = false; | ||
|
||
/** | ||
* return name. | ||
* | ||
* @return string Name | ||
* @return null|string | ||
*/ | ||
public function getName() | ||
public function getName() : ? string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* return class. | ||
* | ||
* @return string Class | ||
* @return null|string | ||
*/ | ||
public function getClass() | ||
public function getClass() : ? string | ||
{ | ||
return $this->class; | ||
} | ||
|
||
/** | ||
* return entity. | ||
* | ||
* @return string Entity | ||
* @return string | ||
*/ | ||
public function getEntity() | ||
public function getEntity() : ? string | ||
{ | ||
return $this->entity; | ||
} | ||
|
||
/** | ||
* return handle request. | ||
* | ||
* @return string Handle Request | ||
* @return bool | ||
*/ | ||
public function getHandleRequest() | ||
public function getHandleRequest() : bool | ||
{ | ||
return $this->handleRequest; | ||
} | ||
|
||
/** | ||
* return validate value. | ||
* | ||
* @return string Validate param name | ||
* @return bool | ||
*/ | ||
public function getValidate() | ||
public function getValidate() : bool | ||
{ | ||
return $this->validate; | ||
} | ||
|
Oops, something went wrong.