readObject

@return object
487714
public function readObject() {

            $objInfo = $this->readU29();
            $storedObject = ($objInfo & 0x01)==0;
            $objInfo = $objInfo >> 1;

            if ($storedObject) {

                $objectReference = $objInfo;
                if (!isset($this->storedObjects[$objectReference])) {

                    throw new Exception('Object reference #' . $objectReference . ' not found');

                } else {

                    $rObject = $this->storedObjects[$objectReference];

                }

            } else {

                $storedClass = ($objInfo & 0x01)==0;
                $objInfo= $objInfo >> 1;

                // If this is a stored  class.. we have the info
                if ($storedClass) {
                  
                    $classReference = $objInfo;
                    if (!isset($this->storedClasses[$classReference])) {

                        throw new Exception('Class reference #' . $classReference . ' not found');

                    } else {

                        $encodingType = $this->storedClasses[$classReference]['encodingType'];
                        $propertyNames = $this->storedClasses[$classReference]['propertyNames'];
                        $className = $this->storedClasses[$classReference]['className'];

                    }
                  
                } else { 

                    $className = $this->readString();
                    $encodingType = $objInfo & 0x03;
                    $propertyNames = array();
                    $objInfo = $objInfo >> 2;

                }
                  
                //ClassMapping magic
                if ($className) {

                    if ($localClassName = $this->getLocalClassName($className)) {

                        $rObject = new $localClassName();

                    } else {

                        $rObject = new SabreAMF_TypedObject($className,array());

                    }
                } else {

                    $rObject = new STDClass(); 

                }

                $this->storedObjects[] =& $rObject;

                if ($encodingType & SabreAMF_AMF3_Const::ET_EXTERNALIZED) {

                    if (!$storedClass) {
                        $this->storedClasses[] = array('className' => $className,'encodingType'=>$encodingType,'propertyNames'=>$propertyNames);
                    }
                    if ($rObject instanceof SabreAMF_Externalized) {
                        $rObject->readExternal($this->readAMFData());
                    } elseif ($rObject instanceof SabreAMF_TypedObject) {
                        $rObject->setAMFData(array('externalizedData'=>$this->readAMFData()));
                    } else {
                        $rObject->externalizedData = $this->readAMFData();
                    }
                    //$properties['externalizedData'] = $this->readAMFData();

                } else {

                    if ($encodingType & SabreAMF_AMF3_Const::ET_SERIAL) {

                        if (!$storedClass) {
                            $this->storedClasses[] = array('className' => $className,'encodingType'=>$encodingType,'propertyNames'=>$propertyNames);
                        }
                        $properties = array();
                        do {
                            $propertyName = $this->readString();
                            if ($propertyName!="") {
                                $propertyNames[] = $propertyName;
                                $properties[$propertyName] = $this->readAMFData();
                            }
                        } while ($propertyName!="");
                        
                        
                    } else {
                        if (!$storedClass) {
                            $propertyCount = $objInfo;
                            for($i=0;$i<$propertyCount;$i++) {

                                $propertyNames[] = $this->readString();

                            }
                            $this->storedClasses[] = array('className' => $className,'encodingType'=>$encodingType,'propertyNames'=>$propertyNames);

                        }

                        $properties = array();
                        foreach($propertyNames as $propertyName) {

                            $properties[$propertyName] = $this->readAMFData();

                        }

                    }
                    
                    if ($rObject instanceof SabreAMF_TypedObject) {
                        $rObject->setAMFData($properties);
                    } else {
                        foreach($properties as $k=>$v) if ($k) $rObject->$k = $v;
                    }

                }

            }
            return $rObject;

        }
171589
public function toStdObject()
    {
        $object = new \stdClass();
        $object->uid = $this->getUid();
        $object->level = $this->getLevel();
        $object->keyword = $this->getKeyword();
        $object->children = array();
        return $object;
    }
1086752
public function read()
	{
		$this->position++;
		if ( $this->position >= count( $this->buffer ) ) return false;

		return $this->buffer[ $this->position ];
	}
977048
public function read()
    {
        $path = $this->getProjectPath() . '/' . $this->getOutputFile();
        if (!is_readable($path)) {
            $this->getContainer()->setValues(null);
            return $this->getContainer();
        }
        $newContainer = unserialize(file_get_contents($path));
        return $newContainer;
    }
1168290
protected function getObject()
	{
		if( !isset( $this->object ) )
		{
			$siteid = $this->context->getLocale()->getSiteId();
			$conf = array( 'siteid' => $this->context->getConfig()->get( 'madmin/cache/prefix' ) . $siteid );
			$this->object = \Aimeos\MW\Cache\Factory::create( 'Flow', $conf, $this->cache );
		}

		return $this->object;
	}
779895
public function getResponseObject()
    {
        if (empty($this->responseObject)) {
            $this->responseObject = $this->convertResponseBodyToObject(
                $this->restDriver->getBody(),
                $this->restDriver->getHeader('content-type')
            );
        }

        return $this->responseObject;
    }
1246325
public function read()
    {
        $response = $this->api->request('GET', $this->absolutePath());

        return (string) $response->getBody();
    }
258856
private function readBody(): self
    {
        if (null !== $this->body) {
            return $this;
        }

        if ($this->headers->get('Transfer-Encoding') === 'chunked') {
            $this->body = $this->readChunked();
        } else {
            $this->body = $this->readDefault((int) $this->headers->get('Content-Length', 4096));
        }

        return $this;
    }
313466
Object readObject()
    throws IOException
  {
    int ch = read();

    switch (ch) {
    case 0x00: case 0x01: case 0x02: case 0x03:
    case 0x04: case 0x05: case 0x06: case 0x07:
    case 0x08: case 0x09: case 0x0a: case 0x0b:
    case 0x0c: case 0x0d: case 0x0e: case 0x0f:
      
    case 0x10: case 0x11: case 0x12: case 0x13:
    case 0x14: case 0x15: case 0x16: case 0x17:
    case 0x18: case 0x19: case 0x1a: case 0x1b:
    case 0x1c: case 0x1d: case 0x1e: case 0x1f:
      return readString(ch - 0x00);
      
    case 0x20: case 0x21: case 0x22: case 0x23:
    case 0x24: case 0x25: case 0x26: case 0x27:
    case 0x28: case 0x29: case 0x2a: case 0x2b:
    case 0x2c: case 0x2d: case 0x2e: case 0x2f:
      return readBinary(ch - 0x20);
      
    case 0x30: case 0x31: case 0x32: case 0x33:
      return readString(((ch - 0x30) << 8) + read());
      
    case 0x34: case 0x35: case 0x36: case 0x37:
      return readBinary(((ch - 0x34) << 8) + read());
      
      // long three-byte
    case 0x3c: case 0x3d: case 0x3e: case 0x3f:
      return new Long(((ch - 0x3c) << 16) + (read() << 8) + read());

    case 0x41:
      _peek = ch;
      return readBinary();
      
    case 0x42: {
      int len = readShort();
      return readBinary(len);
    }
    
    // class def
    case 0x43:
      scanObjectDef();
      return readObject();
      
    case 0x44: { /* double */
      long value = readLong();
      
      return Double.longBitsToDouble(value);
    }
      
    case 'E':
      throw new UnsupportedOperationException("Invalid Hessian 'E' error code.");
      
    case 0x46:
      return Boolean.FALSE;
      
    case 0x47: {
      int type = scanInt();
      return readObject();
    }
    
    // untyped variable map
    case 0x48: {
      HashMap<Object,Object> map = new HashMap<>();
    
      while ((ch = read()) != 'Z') {
        _peek = ch;
        map.put(readObject(), readObject());
      }
      return map;
    }
      
    case 0x49: { // 'I' int
      int value = readInt32();
      
      return new Integer(value);
    }
    
    case 0x4a: // time
      return new Date(readLong());
      
    case 0x4b: // time in seconds
      return new Date(readInt32() * 1000L);
    
    case 0x4c: { // 'L' long
      long value = readLong();
    
      return new Long(value);
    }
    
    // typed variable map
    case 0x4d: {
      HashMap<Object,Object> map = new HashMap<>();
      
      readType();
    
      while ((ch = read()) != 'Z') {
        _peek = ch;
        map.put(readObject(), readObject());
      }
      return map;
    }
    
    case 0x4e: // 'N' null
      return null;
      
    case 0x4f: // 'O' object instance
      {
        int type = scanInt();
        String []def = _classDefs.get(type);
        int len = def.length - 1;
        HashMap<Object,Object> map = new HashMap<>();
        
        for (int i = 0; i < len; i++) {
          map.put(def[i], readObject());
        }
        
        return map;
      }
      
    case 0x50: { // ext type
      String type = readType();
      return readObject();
    }
    
    case 0x51: { // backref
      int ref = readInt32();
      return null;
    }
      
      // string non-tail chunk
    case 0x52: {
      int len = readShort();
      StringBuilder sb = new StringBuilder();
      readString(sb, len);
      readString(sb);
      return sb.toString();
    }
      
      // string tail chunk
    case 0x53: {
      int len = readShort();
      return readString(len);
    }
      
    case 0x54:
      return Boolean.TRUE;
      
      // typed variable list
    case 0x55: {
      ArrayList<Object> list = new ArrayList<>();
      
      readType();
      while ((ch = read()) != 'Z') {
        _peek = ch;
        list.add(readObject());
      }
      return list;
    }
      
      // typed fixed list
    case 0x56: {
      ArrayList<Object> list = new ArrayList<>();

      readType();
      int len = scanInt();
      for (int i = 0; i < len; i++) {
        list.add(readObject());
      }
      return list;
    }
      
      // untyped variable list
    case 0x57: {
      ArrayList<Object> list = new ArrayList<>();
      
      while ((ch = read()) != 'Z') {
        _peek = ch;
        list.add(readObject());
      }
      return list;
    }

      // untyped fixed list
    case 0x58: {
      ArrayList<Object> list = new ArrayList<>();
      int len = scanInt();
      for (int i = 0; i < len; i++) {
        list.add(readObject());
      }
      return list;
    }
    
    case 0x59: { // (long) int
      long value = readInt32();
    
      return new Long(value);
    }
    
    case 0x5b: // 0.0
      return DOUBLE_ZERO;
      
    case 0x5c: // 1.0
      return DOUBLE_ONE;
      
    case 0x5d: // double(b0)
      return new Double((byte) read());
      
    case 0x5e: // double(short)
      return new Double((short) readShort());
      
    case 0x5f: // double mill
      return new Double(readInt32() * 0.001);
      
      // object instance
    case 0x60: case 0x61: case 0x62: case 0x63:
    case 0x64: case 0x65: case 0x66: case 0x67:
    case 0x68: case 0x69: case 0x6a: case 0x6b:
    case 0x6c: case 0x6d: case 0x6e: case 0x6f:
    {
      int type = ch - 0x60;
      String []def = _classDefs.get(type);
      int len = def.length - 1;
      HashMap<Object,Object> map = new HashMap<>();
      
      for (int i = 0; i < len; i++) {
        map.put(def[i], readObject());
      }
      
      return map;
    }

      // direct fixed typed list
    case 0x70: case 0x71: case 0x72: case 0x73:
    case 0x74: case 0x75: case 0x76: case 0x77: {
      ArrayList<Object> list = new ArrayList<>();
      readType();
      int len = ch - 0x70;
      for (int i = 0; i < len; i++) {
        list.add(readObject());
      }
      return list;
    }
      
      // direct fixed untyped list
    case 0x78: case 0x79: case 0x7a: case 0x7b:
    case 0x7c: case 0x7d: case 0x7e: case 0x7f: {
      ArrayList<Object> list = new ArrayList<>();
      int len = ch - 0x78;
      for (int i = 0; i < len; i++) {
        list.add(readObject());
      }
      return list;
    }
      
      // int single-byte
    case 0x80: case 0x81: case 0x82: case 0x83:
    case 0x84: case 0x85: case 0x86: case 0x87:
    case 0x88: case 0x89: case 0x8a: case 0x8b:
    case 0x8c: case 0x8d: case 0x8e: case 0x8f:
      
    case 0x90: case 0x91: case 0x92: case 0x93:
    case 0x94: case 0x95: case 0x96: case 0x97:
    case 0x98: case 0x99: case 0x9a: case 0x9b:
    case 0x9c: case 0x9d: case 0x9e: case 0x9f:
      
    case 0xa0: case 0xa1: case 0xa2: case 0xa3:
    case 0xa4: case 0xa5: case 0xa6: case 0xa7:
    case 0xa8: case 0xa9: case 0xaa: case 0xab:
    case 0xac: case 0xad: case 0xae: case 0xaf:
      
    case 0xb0: case 0xb1: case 0xb2: case 0xb3:
    case 0xb4: case 0xb5: case 0xb6: case 0xb7:
    case 0xb8: case 0xb9: case 0xba: case 0xbb:
    case 0xbc: case 0xbd: case 0xbe: case 0xbf:
      return new Integer(ch - 0x90);
      
      // int two-byte
    case 0xc0: case 0xc1: case 0xc2: case 0xc3:
    case 0xc4: case 0xc5: case 0xc6: case 0xc7:
    case 0xc8: case 0xc9: case 0xca: case 0xcb:
    case 0xcc: case 0xcd: case 0xce: case 0xcf:
      return new Integer(((ch - 0xc8) << 8) + read());
      
      // int three-byte
    case 0xd0: case 0xd1: case 0xd2: case 0xd3:
    case 0xd4: case 0xd5: case 0xd6: case 0xd7:
      return new Integer(((ch - 0xd4) << 16) + (read() << 8) + read());
      
      // long single byte
    case 0xd8: case 0xd9: case 0xda: case 0xdb:
    case 0xdc: case 0xdd: case 0xde: case 0xdf:
      
    case 0xe0: case 0xe1: case 0xe2: case 0xe3:
    case 0xe4: case 0xe5: case 0xe6: case 0xe7:
    case 0xe8: case 0xe9: case 0xea: case 0xeb:
    case 0xec: case 0xed: case 0xee: case 0xef:
      return new Long(ch - 0xe0);
      
      // int two-byte
    case 0xf0: case 0xf1: case 0xf2: case 0xf3:
    case 0xf4: case 0xf5: case 0xf6: case 0xf7:
    case 0xf8: case 0xf9: case 0xfa: case 0xfb:
    case 0xfc: case 0xfd: case 0xfe: case 0xff:
      return new Long(((ch - 0xf8) << 8) + read());
      
    default:
      throw new UnsupportedOperationException("0x" + Integer.toHexString(ch));
    }
  }
861488
public function toObject()
    {
        $object = $this->toArray();

        //fix type to object
        if (isset($object['properties'])) {
            $object['properties'] = (object)$object['properties'];
        }

        foreach (['anyOf', 'allOf', 'oneOf', 'not'] as $property) {
            //fix type to object
            if (isset($object[$property])) {
                foreach ($object[$property] as &$propertyItem) {
                    $propertyItem = (object)$propertyItem;
                }
            }
        }

        return (object)$object;
    }
401865
public Object readObject ()
        throws IOException, ClassNotFoundException
    {
        try {
            // read the class mapping
            ClassMapping cmap = readClassMapping();
            if (cmap == null) {
                if (STREAM_DEBUG) {
                    log.info(hashCode() + ": Read null.");
                }
                return null;
            }

            if (STREAM_DEBUG) {
                log.info(hashCode() + ": Reading with " + cmap.streamer + ".");
            }

            // create an instance of the appropriate object
            Object target = cmap.streamer.createObject(this);
            readBareObject(target, cmap.streamer, true);
            return target;

        } catch (OutOfMemoryError oome) {
            throw (IOException)new IOException("Malformed object data").initCause(oome);
        }
    }
1105792
public static function GetVersionObject() {
		if(!is_object(self::$version)) {
			self::$version = new Version(dirname(__FILE__) .'/../VERSION');
		}
		return(self::$version);
	}
735409
public function determineObject()
    {
        if (isset($_GET['post'])) {
            return $_GET['post'];
        }

        if (isset($_POST['post_ID'])) {
            return $_POST['post_ID'];
        }

        if (isset($_POST['cuztom']['object'])) {
            return $_POST['cuztom']['object'];
        }
    }
389401
public function readProperties($object)
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException(1, 'object');
        }

        $reflector = new \ReflectionObject($object);
        $result    = array();

        // Iterate over the properties of the object.
        foreach ($reflector->getProperties() as $property) {
            $property->setAccessible(true);
            $result[$property->getName()] = $property->getValue($object);
        }

        return $result;
    }
1221209
public Object read(Object object) {
        if(object instanceof Map)
            return mapLookup((Map)object, _identifier);
        else return beanLookup(object, _identifier);
    }
992726
public function read()
    {
        $batch = [OP_RECV_MESSAGE => true];
        if ($this->metadata === null) {
            $batch[OP_RECV_INITIAL_METADATA] = true;
        }
        $read_event = $this->call->startBatch($batch);
        if ($this->metadata === null) {
            $this->metadata = $read_event->metadata;
        }

        return $this->_deserializeResponse($read_event->message);
    }
608353
private static function getModelFromDBObject($dbObject)
    {
        $modelName = get_called_class();
        $object = new $modelName();
        foreach ($dbObject as $column => $val) {
            $object->$column = $val;
        }

        return $object;
    }