Fetch the same property for all the elements.

@param Nip\Records\Collections\Collection $array
@param string $property
@param bool|string $return
@return array The property values
358272
public function pluck($array, $property, &$return = false)
    {
        $return = [];

        if (count($array) > 0) {
            foreach ($array as $item) {
                if (is_array($item)) {
                    $this->pluck($array, $property, $return);
                }

                $return[] = $item->$property;
            }
        }

        return $return;
    }
888344
private function decodeByProperty($property, $format)
    {
        return array_map(function ($entry) use ($property) {
            \PHPUnit_Framework_Assert::assertInternalType('array', $entry);
            \PHPUnit_Framework_Assert::assertArrayHasKey($property, $entry);

            return $entry[$property];
        }, $this->decode($format));
    }
615048
public function findAll($array, $params, $returnKey = false)
    {
        $return = [];

        if (count($array)) {
            foreach ($array as $item) {
                $found = true;
                foreach ($params as $key => $value) {
                    if ($item->$key != $value) {
                        $found = false;
                    }
                }
                if ($found) {
                    if ($returnKey) {
                        $return[$item->$returnKey] = $item;
                    } else {
                        $return[] = $item;
                    }
                }
            }
        }

        return $return;
    }
206969
public function &__get($property)
	{
		$value = null;
		
		if(!empty($property))
		{
			$call = "getter_".$property;
			
			if(method_exists($this, $call))
				$value = $this->{$call}();
			
			/*
				elseif($this instanceof ArrayAccess)
					$value = $this->offsetGet($property);
			*/
		}
		
		return $value;
	}
361940
public function get($property = null, $reset = false)
    {
        if (empty($this->data) || $reset === true) {
            $this->makeRequest($this->getUrl(), 'GET');
            $this->data = $this->getResponseBody();
        }
        if ($property !== null) {
            return $this->data->{$property} ?? [];
        }
        return $this->data;
    }
886727
public static function extractPropertyInArray($property, array $vos = array())
    {
        $ret = array();
        foreach ($vos as /* @var $vo Berthe\AbstractVO */ $vo) {
            if (!($vo instanceof Berthe\AbstractVO)) {
                trigger_error("Wrong object given for property extraction");
                continue;
            }
            if (property_exists($vo, $property)) {
                $ret[] = array(
                    'id' => $vo->id,
                    $property => $vo->{$property}
                );
            }
        }
        return $ret;
    }
299138
public function &__get($property)
    {
        $get[ $property ] = false;

        if (services()->has($property)) {
            $get[ $property ] = services()->get($property);
        }

        return $get[ $property ];
    }
520085
public function getProperty($property){        
        //Primero Busco por get
        $getMethod= 'get' . strtoupper($property[0]) . substr($property, 1);                     
        if($this->reflection->hasMethod($getMethod)){
            $reflectionMethod= $this->reflection->getMethod($getMethod);
            //Si existe el metodo set y es public lo seteo
            if($reflectionMethod->isPublic()){
                return $this->object->$getMethod();
            }            
        }else if($this->reflection->hasProperty($property)){
            //Si existe la propiedad y es public la seteo
            $reflectionProperty= $this->reflection->getProperty($property);
            if($reflectionProperty->isPublic()){
                return $this->object->$property;
            }
        }
        return NULL;
    }
492481
public function getDistinct(string $method, bool $returnValue = true)
    {
        $isMethod = null;

        $array = [];

        foreach ($this->elements as $item) {
            $value = $this->elementMethodCall($method, $item, $isMethod);

            if (!in_array($value, $array, true)) {
                $array[] = $returnValue ? $value : $item;
            }
        }

        $clone = clone $this;
        $clone->elements = array_unique($array, SORT_REGULAR);

        return $clone;
    }
161199
public static function in($value, array $array, $returnKey = false)
    {
        $inArray = in_array($value, $array, true);

        if ($returnKey) {
            if ($inArray) {
                return array_search($value, $array, true);
            }

            return null;
        }

        return $inArray;
    }
1354755
public function select(array $criteria = array(),
            $return = Table::RETURN_MODEL) {
        if (!$this->checkExists()) {
            return ($this->delayExecute) ? $this : new ArrayCollection();
        }

        $this->current = self::OP_SELECT;

        $this->query = 'SELECT ' . $this->prepareColumns();
        $this->query .= ' FROM `' . $this->name . '`' . $this->processJoins();

        $this->where($criteria);

        $this->setExpectedResult($return, true);
        if ($this->delayExecute) {
            return $this;
        }
        return $this->execute();
    }
202239
public function fetchAll($returnType = Table::RETURN_MODEL) {
        $return = $this->select(array(), $returnType);
        if (is_a($return, 'DBScribe\Table')) $return = $return->execute();
        if (is_bool($return)) return new ArrayCollection();

        return $return;
    }
18029
public function getKeyedByProperty($property)
    {
        $results = [];
        foreach ($this as $item) {
            $results[$item->$property] = $item;
        }
        return new static($results);
    }
494361
public function collectionGroup($property)
    {
        $collections = [];
        foreach ($this->group($property) as $id => $elements) {
            $collection = $this->createFrom($elements);

            $collections[$id] = $collection;
        }

        return $collections;
    }
154728
public function get($property, $default = null)
    {

        //if its an array of properties;
        if (is_array($property)) {
            $values = array();

            foreach ($property as $key => $prop) {
                if (isset($this->$prop)) {
                    $values[$prop] = $this->$prop;
                }
            }
            return (!empty($values)) ? $values : $default;
        }

        if (isset($this->$property)) {
            return $this->$property;
        }
        return $default;
    }
1115121
public JsonArray getAsArray(String property) {
		if (!super.has(property)) {
			super.set(property, new JsonValue(new JsonArray()), false);
		}
		return get(property).getAsArray();
	}
564836
private static function &getProperty($object, string $property)
  {
    $value = &\Closure::bind(function & () use ($property) {
      return $this->$property;
    }, $object, $object)->__invoke();

    return $value;
  }