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

Commit

Permalink
Merge pull request zendframework/zendframework#2 from zendframework/m…
Browse files Browse the repository at this point in the history
…aster

Update
  • Loading branch information
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 163 deletions.
1 change: 0 additions & 1 deletion src/Config.php
Expand Up @@ -197,5 +197,4 @@ public function configureInstance(Di $di, $instanceData)
}
}
}

}
1 change: 0 additions & 1 deletion src/Definition/ArrayDefinition.php
Expand Up @@ -166,5 +166,4 @@ public function toArray()
{
return $this->dataArray;
}

}
1 change: 0 additions & 1 deletion src/Definition/Builder/InjectionMethod.php
Expand Up @@ -73,5 +73,4 @@ public function getParameters()
{
return $this->parameters;
}

}
1 change: 0 additions & 1 deletion src/Definition/Builder/PhpClass.php
Expand Up @@ -176,5 +176,4 @@ public function getInjectionMethods()
{
return $this->injectionMethods;
}

}
1 change: 0 additions & 1 deletion src/Definition/BuilderDefinition.php
Expand Up @@ -322,5 +322,4 @@ public function getMethodParameters($class, $method)

return $methodParameters;
}

}
155 changes: 0 additions & 155 deletions src/Definition/CompilerDefinition.php
Expand Up @@ -304,161 +304,6 @@ protected function processParams(&$def, Reflection\ClassReflection $rClass, Refl

}

// public function processClass($className)
// {
// $strategy = $this->introspectionStrategy;
// $sClass = $this->directoryScanner->getClass($className, true, true);
//
// if (!$sClass->isInstantiable()) {
// return;
// }
//
// // determine supertypes
// $superTypes = array();
// if (($parentClasses = $sClass->getParentClasses()) !== null) {
// $superTypes = array_merge($superTypes, $parentClasses);
// }
// if (($interfaces = $sClass->getInterfaces())) {
// $superTypes = array_merge($superTypes, $interfaces);
// }
//
// $className = $sClass->getName();
// $this->classes[$className] = array(
// 'supertypes' => $superTypes,
// 'instantiator' => null,
// 'methods' => array(),
// 'parameters' => array()
// );
//
// $def = &$this->classes[$className];
//
// if ($def['instantiator'] == null) {
// if ($sClass->isInstantiable()) {
// $def['instantiator'] = '__construct';
// }
// }
//
// if ($sClass->hasMethod('__construct')) {
// $mScanner = $sClass->getMethod('__construct');
// if ($mScanner->isPublic() && $mScanner->getNumberOfParameters() > 0) {
// $def['methods']['__construct'] = true;
// $this->processParams($def, $sClass, $mScanner);
// }
// }
//
// foreach ($sClass->getMethods(true) as $mScanner) {
// if (!$mScanner->isPublic()) {
// continue;
// }
//
// $methodName = $mScanner->getName();
//
// if ($mScanner->getName() === '__construct') {
// continue;
// }
//
// if ($strategy->getUseAnnotations() == true) {
//
// $annotations = $mScanner->getAnnotations($strategy->getAnnotationManager());
//
// if (($annotations instanceof AnnotationCollection)
// && $annotations->hasAnnotation('Zend\Di\Definition\Annotation\Inject')) {
//
// $def['methods'][$methodName] = true;
// $this->processParams($def, $sClass, $mScanner);
// continue;
// }
// }
//
// $methodPatterns = $this->introspectionStrategy->getMethodNameInclusionPatterns();
//
// // matches a method injection pattern?
// foreach ($methodPatterns as $methodInjectorPattern) {
// preg_match($methodInjectorPattern, $methodName, $matches);
// if ($matches) {
// $def['methods'][$methodName] = false; // check ot see if this is required?
// $this->processParams($def, $sClass, $mScanner);
// continue 2;
// }
// }
//
// }
//
// $interfaceInjectorPatterns = $this->introspectionStrategy->getInterfaceInjectionInclusionPatterns();
//
// // matches the interface injection pattern
// /** @var $sInterface \Zend\Code\Scanner\ClassScanner */
// foreach ($sClass->getInterfaces(true) as $sInterface) {
// foreach ($interfaceInjectorPatterns as $interfaceInjectorPattern) {
// preg_match($interfaceInjectorPattern, $sInterface->getName(), $matches);
// if ($matches) {
// foreach ($sInterface->getMethods(true) as $sMethod) {
// if ($sMethod->getName() === '__construct') {
// constructor not allowed in interfaces
// continue;
// }
// $def['methods'][$sMethod->getName()] = true;
// $this->processParams($def, $sClass, $sMethod);
// }
// continue 2;
// }
// }
// }
//
// }
//
// protected function processParams(&$def, DerivedClassScanner $sClass, MethodScanner $sMethod)
// {
// if (count($sMethod->getParameters()) === 0) {
// return;
// }
//
// $methodName = $sMethod->getName();
//
// $def['parameters'][$methodName] = array();
//
// foreach ($sMethod->getParameters(true) as $position => $p) {
//
// /** @var $p \Zend\Code\Scanner\ParameterScanner */
// $actualParamName = $p->getName();
//
// $paramName = $this->createDistinctParameterName($actualParamName, $sClass->getName());
//
// $fqName = $sClass->getName() . '::' . $sMethod->getName() . ':' . $position;
//
// $def['parameters'][$methodName][$fqName] = array();
//
// // set the class name, if it exists
// $def['parameters'][$methodName][$fqName][] = $actualParamName;
// $def['parameters'][$methodName][$fqName][] = ($p->getClass() !== null) ? $p->getClass() : null;
// $def['parameters'][$methodName][$fqName][] = !$p->isOptional();
// }
// }
//
// protected function createDistinctParameterName($paramName, $class)
// {
// $currentParams = array();
// if ($this->classes[$class]['parameters'] === array()) {
// return $paramName;
// }
// foreach ($this->classes as $cdata) {
// foreach ($cdata['parameters'] as $mdata) {
// $currentParams = array_merge($currentParams, array_keys($mdata));
// }
// }
//
// if (!in_array($paramName, $currentParams)) {
// return $paramName;
// }
//
// $alt = 2;
// while (in_array($paramName . (string) $alt, $currentParams)) {
// $alt++;
// }
//
// return $paramName . (string) $alt;
// }

/**
* {@inheritDoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Definition/IntrospectionStrategy.php
Expand Up @@ -136,5 +136,4 @@ public function getInterfaceInjectionInclusionPatterns()
{
return $this->interfaceInjectionInclusionPatterns;
}

}
1 change: 0 additions & 1 deletion src/DefinitionList.php
Expand Up @@ -258,5 +258,4 @@ public function getMethodParameters($class, $method)

return array();
}

}
1 change: 0 additions & 1 deletion src/Display/Console.php
Expand Up @@ -179,5 +179,4 @@ protected function renderClassDefinition($definition, $class)
}
echo PHP_EOL;
}

}

0 comments on commit d86e872

Please sign in to comment.