Skip to content

Commit

Permalink
#6 recover resource classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bui Sy Nguyen committed Apr 29, 2016
1 parent 551ea90 commit 03c665f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 43 deletions.
42 changes: 0 additions & 42 deletions fproject/Zend/Amf/Parse/Resource/Stream.php

This file was deleted.

2 changes: 1 addition & 1 deletion fproject/Zend/Amf/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Zend_Amf_Server
*/
public function __construct()
{
TypeLoader::setResourceLoader(new ResourceLoader(array("Zend_Amf_Parse_Resource" => "Zend/Amf/Parse/Resource")));
TypeLoader::setResourceLoader(new ResourceLoader(array("Resource" => "amf/parse/resource")));
}

/**
Expand Down
37 changes: 37 additions & 0 deletions fproject/amf/parse/resource/ResourceStream.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
///////////////////////////////////////////////////////////////////////////////
//
// © Copyright f-project.net 2010-present.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///////////////////////////////////////////////////////////////////////////////

namespace fproject\amf\parse\resource;

/**
* This class will convert stream resource to string by just reading it
*
*/
class ResourceStream
{
/**
* Parse resource into string
*
* @param resource $resource Stream resource
* @return array
*/
public function parse($resource) {
return stream_get_contents($resource);
}
}

0 comments on commit 03c665f

Please sign in to comment.