<?php namespace Metadata; /** * Base class for method metadata. * * This class is intended to be extended to add your application specific * properties, and flags. * * @author Johannes M. Schmitt <schmittjoh@gmail.com> */ class MethodMetadata implements \Serializable { public $class; public $name; public $reflection; public function __construct($class, $name) { $this->class = $class; $this->name = $name; $this->reflection = new \ReflectionMethod($class, $name); $this->reflection->setAccessible(true); } /** * @param object $obj * @param array $args * * @return mixed */ public function invoke($obj, array $args = array()) { return $this->reflection->invokeArgs($obj, $args); } public function serialize() { return serialize(array($this->class, $this->name)); } public function unserialize($str) { list($this->class, $this->name) = unserialize($str); $this->reflection = new \ReflectionMethod($this->class, $this->name); $this->reflection->setAccessible(true); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Cache | Folder | 0755 |
|
|
Driver | Folder | 0755 |
|
|
AdvancedMetadataFactoryInterface.php | File | 464 B | 0644 |
|
ClassHierarchyMetadata.php | File | 791 B | 0644 |
|
ClassMetadata.php | File | 1.86 KB | 0644 |
|
MergeableClassMetadata.php | File | 837 B | 0644 |
|
MergeableInterface.php | File | 200 B | 0644 |
|
MetadataFactory.php | File | 5.71 KB | 0644 |
|
MetadataFactoryInterface.php | File | 723 B | 0644 |
|
MethodMetadata.php | File | 1.12 KB | 0644 |
|
NullMetadata.php | File | 198 B | 0644 |
|
PropertyMetadata.php | File | 1.28 KB | 0644 |
|
Version.php | File | 83 B | 0644 |
|