コード例 #1
0
 /**
  * @return \Illuminate\Support\Collection
  */
 public function getScopes()
 {
     $methods = $this->class_parser->getMethods();
     $scopes = collect();
     foreach ($methods as $method) {
         if (substr($method->name, 0, 5) !== 'scope') {
             continue;
         }
         $scopes->push(camel_case(substr($method->name, 5)));
     }
     return $scopes;
 }
コード例 #2
0
 /**
  * @param string $method
  *
  * @return \stdClass
  */
 public function parseMethod($method)
 {
     return $this->class_parser->getMethod($method);
     //        if (!is_null($this->statements)) {
     //
     //            $return = @$this->methodStatementsReturns[$method] ?: [];
     //        }
 }
コード例 #3
0
 /**
  * @param ClassParser $class
  * @param string      $method
  */
 public function __construct($class, $method)
 {
     $this->class = $class;
     $this->method = $method;
     $this->reflector = $this->class->getReflector()->getMethod($this->method);
 }