Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2 into zf11884
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Kellner committed Nov 19, 2011
2 parents bd63b57 + cbd9acb commit 84d1f31
Show file tree
Hide file tree
Showing 255 changed files with 8,531 additions and 5,632 deletions.
12 changes: 5 additions & 7 deletions README-GIT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ github or other public site, or setup/use your own repository.

% git config user.email <your email address>

* Add a remote to the canonical ZF repository (or GitHub mirror), so
you can keep your fork up-to-date:
* Add a remote to the canonical ZF repository, so you can keep your fork
up-to-date:

% git remote add zf2 git://github.com/zendframework/zf2.git
- OR -
% git remote add zf2 git://git.zendframework.com/zf.git
% git remote add zf2 https://github.com/zendframework/zf2.git
- AND -
% git fetch zf2

Expand Down Expand Up @@ -77,7 +75,7 @@ github or other public site, or setup/use your own repository.

* Add a remote for the ZF repository and fetch it

% git remote add zf2 git://git.zendframework.com/zf.git
% git remote add zf2 https://github.com/zendframework/zf2.git
% git fetch zf2

* Create a new branch for the ZF repository (named "zf/master" here)
Expand Down Expand Up @@ -186,7 +184,7 @@ FEEDS AND EMAILS
================
RSS feeds may be found at:

http://git.zendframework.com/feeds/<branch>.xml
https://github.com/zendframework/zf2/commits/<branch>.atom

where <branch> is a branch in the repository.

Expand Down
29 changes: 7 additions & 22 deletions demos/Zend/Service/LiveDocx/check-environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
require_once __DIR__ . DIRECTORY_SEPARATOR . 'Bootstrap.php';

use Zend\Version;
use Zend\Http\Client as HttpClient;
use Zend\Service\LiveDocx\MailMerge;
use Zend\Service\LiveDocx\Helper;

Expand All @@ -21,16 +20,6 @@

// -----------------------------------------------------------------------------

$httpClientOptions = array(
'maxredirects' => 3,
'timeout' => 5, // seconds
'keepalive' => false
);

$httpClient = new HttpClient(null, $httpClientOptions);

// -----------------------------------------------------------------------------

$failed = false;
$counter = 1;

Expand Down Expand Up @@ -194,20 +183,16 @@

// -----------------------------------------------------------------------------

$httpClient->setUri(GEOIP_SERVICE_URI);

$httpResponse = $httpClient->request();

if ($httpResponse->isSuccessful()) {
$results = @file_get_contents(GEOIP_SERVICE_URI);

if (false != $results) {
$keys = array(
'Ip' => 'IP address',
'City' => 'city',
'RegionName' => 'region',
'CountryName' => 'country'
);

$simplexml = new SimpleXMLElement($httpResponse->getBody());
$simplexml = new SimpleXMLElement($results);
foreach ($keys as $key => $value) {
Helper::printLineToc($counter, sprintf('Checking your %s (%s)', $keys[$key], $simplexml->$key), TEST_PASS);
$counter++;
Expand All @@ -221,9 +206,9 @@

$microtime = microtime(true);

$httpClient->setUri(MailMerge::WSDL);
$results = @file_get_contents(MailMerge::WSDL);

if ($httpClient->request()->isSuccessful()) {
if (false != $results) {
$duration = microtime(true) - $microtime;
$result = TEST_PASS;
} else {
Expand Down Expand Up @@ -286,9 +271,9 @@

$microtime = microtime(true);

$httpClient->setUri(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_WSDL);
$results = @file_get_contents(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_WSDL);

if ($httpClient->request()->isSuccessful()) {
if (false != $results) {
$duration = microtime(true) - $microtime;
$result = TEST_PASS;
} else {
Expand Down
6 changes: 3 additions & 3 deletions documentation/manual/es/module_specs/Zend_Amf-Server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ private function getContactHandler(event:ResultEvent):void {


<para>
<classname>Zend_Amf</classname> provides tools for mapping resource
types returned by service classes into data consumable by
ActionScript. </para>
<classname>Zend_Amf</classname> proporciona herramientas para el mapeo de los tipos
de recursos devueltos por las clases de servicio en los datos
de consumo de ActionScript.</para>

<para> In order to handle specific resource type, the user needs to
create a plugin class named after the resource name, with words
Expand Down
14 changes: 7 additions & 7 deletions library/Zend/Amf/Adobe/Introspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace Zend\Amf\Adobe;

use Zend\Amf\Exception,
Zend\Reflection\ReflectionClass,
Zend\Reflection\ReflectionProperty,
Zend\Code\Reflection\ClassReflection,
Zend\Code\Reflection\PropertyReflection,
Zend\Server\Reflection,
Zend\Server\Reflection\ReflectionClass as ServerReflectionClass,
SplFileInfo;
Expand Down Expand Up @@ -145,7 +145,7 @@ protected function _addClassAttributes($typename, \DOMElement $typexml)
return;
}

$rc = new ReflectionClass($typename);
$rc = new ClassReflection($typename);
foreach ($rc->getProperties() as $prop) {
if (!$prop->isPublic()) {
continue;
Expand Down Expand Up @@ -212,12 +212,12 @@ protected function _addService(ServerReflectionClass $refclass, \DOMElement $tar
/**
* Extract type of the property from DocBlock
*
* @param \Zend\Reflection\ReflectionProperty $prop reflection property object
* @param \Zend\Code\Reflection\PropertyReflection $prop reflection property object
* @return string Property type
*/
protected function _getPropertyType(ReflectionProperty $prop)
protected function _getPropertyType(PropertyReflection $prop)
{
$docBlock = $prop->getDocComment();
$docBlock = $prop->getDocBlock();

if (!$docBlock) {
return 'Unknown';
Expand All @@ -228,7 +228,7 @@ protected function _getPropertyType(ReflectionProperty $prop)
}

$tag = $docBlock->getTag('var');
return trim($tag->getDescription());
return trim($tag->getContent());
}

/**
Expand Down
25 changes: 24 additions & 1 deletion library/Zend/Amf/Response/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,33 @@ public function getResponse()
{
if (!headers_sent()) {
header('Cache-Control: no-cache, must-revalidate');
if($this->isIeOverSsl()) {
header('Cache-Control: cache, must-revalidate');
header('Pragma: public');
} else {
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
}
header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
header('Pragma: no-cache');
header('Content-Type: application/x-amf');
}
return parent::getResponse();
}

protected function isIeOverSsl()
{
$ssl = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : false;
if (!$ssl || ($ssl == 'off')) {
// IIS reports "off", whereas other browsers simply don't populate
return false;
}

$ua = $_SERVER['HTTP_USER_AGENT'];
if (!preg_match('/; MSIE \d+\.\d+;/', $ua)) {
// Not MicroSoft Internet Explorer
return false;
}

return true;
}
}
16 changes: 6 additions & 10 deletions library/Zend/Authentication/Adapter/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,14 @@ public function authenticate()
return $authResult;
}

if (true === $this->getAmbiguityIdentity()) {
$validIdentities = array ();
$zendAuthCredentialMatchColumn = $this->_zendDb->foldCase('zend_auth_credential_match');
foreach ($resultIdentities as $identity) {
if (1 === (int) $identity[$zendAuthCredentialMatchColumn]) {
$validIdentities[] = $identity;
}
// At this point, ambiguity is allready done. Loop, check and break on success.
foreach ($resultIdentities as $identity) {
$authResult = $this->_authenticateValidateResult($identity);
if ($authResult->isValid()) {
break;
}
$resultIdentities = $validIdentities;
}

$authResult = $this->_authenticateValidateResult(array_shift($resultIdentities));

return $authResult;
}

Expand Down
Loading

0 comments on commit 84d1f31

Please sign in to comment.