The returned array will contain objects of the default type or
objects that inherit from the default.

@throws PropelException Any exceptions caught during processing will be
rethrown wrapped into a PropelException.
482054
public static function populateObjects(PDOStatement $stmt)
    {
        $results = array();

        // set the class once to avoid overhead in the loop
        $cls = CustomerPeer::getOMClass();
        // populate the object(s)
        while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
            $key = CustomerPeer::getPrimaryKeyHashFromRow($row, 0);
            if (null !== ($obj = CustomerPeer::getInstanceFromPool($key))) {
                // We no longer rehydrate the object, since this can cause data loss.
                // See http://www.propelorm.org/ticket/509
                // $obj->hydrate($row, 0, true); // rehydrate
                $results[] = $obj;
            } else {
                $obj = new $cls();
                $obj->hydrate($row);
                $results[] = $obj;
                CustomerPeer::addInstanceToPool($obj, $key);
            } // if key exists
        }
        $stmt->closeCursor();

        return $results;
    }
37750
private function initTypes()
    {
        $this->types = array();

        foreach ($this->loadTypes() as $type) {
            if (!$type instanceof TableTypeInterface) {
                throw new UnexpectedTypeException($type, 'Swoopaholic\Component\Table\TableTypeInterface');
            }

            $this->types[$type->getName()] = $type;
        }
    }
364624
@Override
  /*!#if ($TemplateOptions.KTypePrimitive)
  public KType [] toArray()
     #else !*/
  public Object[] toArray()
  /*! #end !*/
  {
    KType[] array = Intrinsics.<KType> newArray(size());
    int i = 0;
    for (KTypeCursor<KType> c : this) {
      array[i++] = c.value;
    }
    return array;
  }
673880
@Override
	public Object[] toArray() {
		combine();
		if(combined==null) {
			Set<E> emptySet = java.util.Collections.emptySet();
			return emptySet.toArray();
		}
		return combined.toArray();
	}
510439
public function objType()
    {
        if ($this->objType === null) {
            throw new RuntimeException(sprintf(
                'Missing object type ("obj_type"). Invalid property "%s".',
                $this->ident()
            ));
        }

        return $this->objType;
    }
269126
public Object[] getPropertyInfo() {
        List props = DefaultGroovyMethods.getMetaPropertyValues(objectUnderInspection);
        Object[] result = new Object[props.size()];
        int i = 0;
        for (Iterator iter = props.iterator(); iter.hasNext(); i++) {
            PropertyValue pv = (PropertyValue) iter.next();
            result[i] = fieldInfo(pv);
        }
        return result;
    }
312828
@SuppressWarnings("unchecked")
	public static <E> TypeInformation<E[]> OBJECT_ARRAY(TypeInformation<E> elementType) {
		if (elementType == Types.STRING) {
			return (TypeInformation) BasicArrayTypeInfo.STRING_ARRAY_TYPE_INFO;
		}
		return ObjectArrayTypeInfo.getInfoFor(elementType);
	}
1063159
@Override
  public Object[] array() {
    DataType dt = data.dataType();
    Object[] list = new Object[length];
    try {
      for (int i = 0; i < length; i++) {
        if (!data.isNullAt(offset + i)) {
          list[i] = get(i, dt);
        }
      }
      return list;
    } catch(Exception e) {
      throw new RuntimeException("Could not get the array", e);
    }
  }
503838
public boolean isArray() {
		if (type == null) {
			return false;
		}
		return type.isArray() || List.class.isAssignableFrom(type) || Set.class.isAssignableFrom(type);
	}
1137221
protected function getArray()
    {
        $key         = $this->getRangeKey()->getPropertyMetadata()->name;
        $array       = parent::getArray();
        $array[$key] = $this->getRangeValue();

        return $array;
    }
25543
public function istantiateObjects()
    {
        $this->validateObjectClassName();

        $objects_iterator = new ArrayIterator;

        $this->appendObjectDataToIterator($objects_iterator);

        $this->objects_istantiated = $objects_iterator;
        return $this->objects_istantiated;
    }
694903
public function toArray()
	{
		$defaults = $this->reflectionClass->getDefaultProperties();
		$return = array();
		
		foreach($defaults as $var => $val)
		{
			if($this->$var instanceof Model)
			{
				$return[$var] = $this->$var->toArray();
			}
			else
			{
				$return[$var] = $this->$var;
			}
		}
		
		return $return;
	}
368017
private static Object[] toObjectArray(Object primitiveArray) {
        if (primitiveArray == null) {
            throw new NullPointerException();
        }
        
        if (primitiveArray instanceof Object[]) {
            return (Object[]) primitiveArray;
        }

        if (primitiveArray instanceof Collection) {
            return ((Collection) primitiveArray).toArray();
        }
          
        Class clazz = primitiveArray.getClass();
        if (!clazz.isArray()) {
            return null;
        }

        int length = Array.getLength(primitiveArray);
        Object[] array = new Object[length];
        for (int i = 0; i < length; i++) {
            array[i] = Array.get(primitiveArray, i);
        }

        return array;
    }
1297557
private byte[] getSortedPropTypes() {
    int count = 0;
    for (PropListItem x = propListHead; x != null; x = x.next) {
      count++;
    }

    byte[] keys = new byte[count];
    for (PropListItem x = propListHead; x != null; x = x.next) {
      count--;
      keys[count] = x.propType;
    }

    Arrays.sort(keys);
    return keys;
  }
207671
public function getDefaultElements()
    {
        $relations = $this->owner->uninherited('element_defaults');
        if (!$relations) $relations = [];

        // inherit relations from another PageType
        if ($inherit_relations_from = $this->owner->uninherited('element_relations_inherit_from'))
        {
            if ($inherit_relations = Config::inst()->get($inherit_relations_from, 'element_defaults', Config::UNINHERITED))
            {
                $relations = array_merge_recursive($relations, $inherit_relations);
            }
        }
        return $relations;
    }
585169
public function getType() {
        if($this->typeInstance !== null) {
            return $this->typeInstance;
        }

        if(isset(static::$types[$this->type])) {
            $this->typeInstance = static::$types[$this->type];

            return static::$types[$this->type];
        } else {
            if(static::$defaultType !== null) {
                $this->typeInstance = static::$defaultType;

                return static::$defaultType;
            } else {
                throw new Exception('No `FieldType` Object Set For Field Type "' . $this->type . '" And No Default Set');
            }
        }
    }
627466
private static Class<?>[] getTypes(Object... objects) {
        if (objects == null) {
            return new Class[0];
        }

        Class<?>[] result = new Class[objects.length];

        for (int i = 0; i < objects.length; i++) {
            Object value = objects[i];
            result[i] = value == null ? NULL.class : value.getClass();
        }

        return result;
    }