-
-
Notifications
You must be signed in to change notification settings - Fork 19
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 #11 from ytake/feature-change-dependency
Feature change dependency
- Loading branch information
Showing
68 changed files
with
2,335 additions
and
544 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ filter: | |
- src/* | ||
excluded_paths: | ||
- tests/* | ||
- src/data/* | ||
tools: | ||
php_code_sniffer: | ||
config: | ||
|
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Yuuki Takezawa | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
|
@@ -7,18 +8,25 @@ | |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
* This software consists of voluntary contributions made by many individuals | ||
* and is licensed under the MIT license. | ||
* Copyright (c) 2015 Yuuki Takezawa | ||
* | ||
* | ||
* CodeGenMethod Class, CodeGen Class is: | ||
* Copyright (c) 2012-2015, The Ray Project for PHP | ||
* | ||
* @license http://opensource.org/licenses/bsd-license.php BSD | ||
*/ | ||
|
||
namespace Ytake\LaravelAspect; | ||
|
||
use Doctrine\Common\Annotations\AnnotationRegistry; | ||
use Ytake\LaravelAspect\Exception\FileNotFoundException; | ||
|
||
/** | ||
* Class Annotation | ||
* | ||
* @package Ytake\LaravelAspect | ||
* @author yuuki.takezawa<[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
*/ | ||
class Annotation | ||
{ | ||
|
@@ -34,16 +42,15 @@ public function registerAnnotations(array $files) | |
} | ||
|
||
/** | ||
* use annotations | ||
* | ||
* @return void | ||
* @throws FileNotFoundException | ||
*/ | ||
public function registerAspectAnnotations() | ||
{ | ||
foreach ($this->files as $file) { | ||
if (file_exists($file)) { | ||
AnnotationRegistry::registerFile($file); | ||
if (!file_exists($file)) { | ||
throw new FileNotFoundException($file); | ||
} | ||
AnnotationRegistry::registerFile($file); | ||
} | ||
AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Transactional.php'); | ||
AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Cacheable.php'); | ||
|
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,53 @@ | ||
<?php | ||
|
||
/** | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
* This software consists of voluntary contributions made by many individuals | ||
* and is licensed under the MIT license. | ||
* Copyright (c) 2015 Yuuki Takezawa | ||
* | ||
* | ||
* CodeGenMethod Class, CodeGen Class is: | ||
* Copyright (c) 2012-2015, The Ray Project for PHP | ||
* | ||
* @license http://opensource.org/licenses/bsd-license.php BSD | ||
*/ | ||
|
||
namespace Ytake\LaravelAspect\Annotation; | ||
|
||
use Doctrine\Common\Annotations\Reader; | ||
|
||
/** | ||
* Class AnnotationReaderTrait | ||
*/ | ||
trait AnnotationReaderTrait | ||
{ | ||
/** @var Reader */ | ||
protected $reader; | ||
|
||
/** @var string */ | ||
protected $annotation; | ||
|
||
/** | ||
* @param Reader $reader | ||
*/ | ||
public function setReader(Reader $reader) | ||
{ | ||
$this->reader = $reader; | ||
} | ||
|
||
/** | ||
* @param string $annotation | ||
*/ | ||
public function setAnnotation($annotation) | ||
{ | ||
$this->annotation = $annotation; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
|
@@ -7,6 +8,16 @@ | |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
* This software consists of voluntary contributions made by many individuals | ||
* and is licensed under the MIT license. | ||
* Copyright (c) 2015 Yuuki Takezawa | ||
* | ||
* | ||
* CodeGenMethod Class, CodeGen Class is: | ||
* Copyright (c) 2012-2015, The Ray Project for PHP | ||
* | ||
* @license http://opensource.org/licenses/bsd-license.php BSD | ||
*/ | ||
|
||
namespace Ytake\LaravelAspect\Annotation; | ||
|
@@ -16,8 +27,6 @@ | |
/** | ||
* @Annotation | ||
* @Target("METHOD") | ||
* @author yuuki.takezawa<[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
*/ | ||
final class CacheEvict extends Annotation | ||
{ | ||
|
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
|
@@ -7,6 +8,16 @@ | |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
* This software consists of voluntary contributions made by many individuals | ||
* and is licensed under the MIT license. | ||
* Copyright (c) 2015 Yuuki Takezawa | ||
* | ||
* | ||
* CodeGenMethod Class, CodeGen Class is: | ||
* Copyright (c) 2012-2015, The Ray Project for PHP | ||
* | ||
* @license http://opensource.org/licenses/bsd-license.php BSD | ||
*/ | ||
|
||
namespace Ytake\LaravelAspect\Annotation; | ||
|
@@ -16,8 +27,6 @@ | |
/** | ||
* @Annotation | ||
* @Target("METHOD") | ||
* @author yuuki.takezawa<[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
*/ | ||
final class CachePut extends Annotation | ||
{ | ||
|
Oops, something went wrong.