Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Zend code method prototype #5262

Closed
wants to merge 6 commits into from
Closed

Zend code method prototype #5262

wants to merge 6 commits into from

Conversation

blanchonvincent
Copy link
Contributor

$reflectionMethod->getPrototype() will return an array :

'namespace' => 'ZendTest\Code\Reflection\TestAsset',
'class' => 'TestSampleClass12',
'name' => 'doSomething',
'visibility' => 'public',
'return' => 'string',
'arguments' => array(
    'one' => array(
        'type'     => 'int',
        'required' => true,
        'by_ref'   => true,
        'default'  => null,
    ),
    'two' => array(
        'type'     => 'int',
        'required' => true,
        'by_ref'   => false,
        'default'  => null,
    ),
),

$reflectionMethod->getPrototype(MethodReflection::PROTOTYPE_AS_STRING) will return an string :

public string doSomething(int &$one, int $two)

@blanchonvincent
Copy link
Contributor Author

@Ocramius Please, have a look

@weierophinney
Copy link
Member

Awesome -- this will allow us to deprecate/remove much if not most of the Zend\Server\Reflection functionality!

weierophinney added a commit that referenced this pull request Oct 23, 2013
…ion-prototype

Zend code method prototype
weierophinney added a commit that referenced this pull request Oct 23, 2013
@ghost ghost assigned weierophinney Oct 23, 2013
@weierophinney
Copy link
Member

Merged to develop for release with 2.3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants