Get a data for this model

@param  string $property
@param  string $method
@param  int    $mode
@throws Exception
545287
private function _initOne($property, $method, $mode) {
		$data = $this->__call($method);
		
		if ($data === null) {
			return;
		}

		if ($data instanceof Collection) {
			if ($mode !== self::MODE_CASCADE_MANY) {
				throw new Exception('Model hasn\'t a parental collection');
			}

			$this->_data[$property] = $data;

			return;
		}

		if ($mode === self::MODE_JOIN) {
			if ($data instanceof Model) {
				$data = $data->toArray();
			}

			if (! is_array($data)) {
				throw new Exception('Unsupported type "' . gettype($data) . '" provided by "' . $method . '()"');
			}

			$this->_data += $data;
		}
		else if ($mode === self::MODE_CASCADE) {
			$this->_data[$property] = $data;
		}
		else if ($mode === self::MODE_CASCADE_MANY) {
			throw new Exception('Unable to use a model in the "Cascade many" mode');
		}
		else {
			throw new Exception('Uncnown loading mode');
		}
	}
743210
public function getMethodAnnotations($method)
    {
        if (!$this->hasMethod($method)) {
            $name = $this->_getReflection()->getName();
            throw new Exception\InvalidArgumentException(
                "The class {$name} doesn't have a property called {$method}"
            );
        }

        if (empty($this->_annotations['methods'][$method])) {
            $comment = $this->_getReflection()
                ->getMethod($method)
                ->getDocComment();
            $data = AnnotationParser::getAnnotations($comment);
            $methodAnnotations = new AnnotationsList();
            foreach ($data as $property => $parsedData) {
                $methodAnnotations->append(
                    $this->_createAnnotation($property, $parsedData)
                );
            }
            $this->_annotations['methods'][$method] = $methodAnnotations;
        }
        return $this->_annotations['methods'][$method];
    }
938038
protected function bindAttr($model, &$result)
    {
        foreach ($this->bindAttr as $key => $attr) {
            $key = is_numeric($key) ? $attr : $key;
            if (isset($result->$key)) {
                throw new Exception('bind attr has exists:' . $key);
            } else {
                $result->setAttr($key, $model ? $model->$attr : null);
            }
        }
    }
988875
public function &__get($property)
    {
        $getter = 'get'.\ucfirst($property);
        if (\in_array($property, array('alerts','cfg','status'))) {
            return $this->{$property};
        } elseif (\method_exists($this, $getter)) {
            $return = $this->{$getter}();
            return $return;
        } elseif (isset($this->status[$property])) {
            return $this->status[$property];
        } else {
            $this->debug->log('property', $property);
        }
    }
953185
protected function getRequestDataByMethod($method = HttpMethods::GET)
    {
        switch ($method) {
            // POST method
            case HttpMethods::POST:
                $postData = array_merge($_GET, $_POST);
                return $postData ?: [];
                break;
            // PUT method
            case HttpMethods::PUT:
            // PATH method
            case HttpMethods::PATCH:
                $data = $this->cypher->decode(file_get_contents('php://input'));
                parse_str($data, $patchData);
                $patchData = array_merge($_GET, $patchData);
                return $patchData ?: [];
                break;

            // methods with empty payload
            case HttpMethods::DELETE:
            case HttpMethods::HEAD:
            case HttpMethods::OPTIONS:
                return [];
                break;

            // GET method (default)
            case HttpMethods::GET:
            default:
                return $_GET;
                break;
        }
    }
1056779
private function loadDataInBatch(string $mode): void
    {
        $fields = array_keys($this->configEntities[$this->entity]['cols']);
        // Replace by all fields if update as we have to load everything
        if ($mode === 'update') {
            $fields = array_keys($this->entityCols);
        }

        // Load the data from the helper, only if pretend is false
        $filename = $this->csv->getRealPath();
        $this->dbHelper->setPretend($this->pretend);
        $sql = $this->dbHelper->loadData($this->entity, $filename, $fields, $mode);

        $this->returnRes === true ? array_push($this->queries, $sql) : null;

        // Destroy the file
        unlink($this->csv->getRealPath());
    }
51527
protected function _fetch_row($result, $mode)
    {
        if ($result || ($result === null && ($result = $this->last_result))) {
            if ($result !== true) {
                return $result->fetch($mode);
            }
        }

        return false;
    }
366316
public function get($property, $type = null, $default = null)
    {
        if (!isset($this->param[$property])) {
            return $default;
        }

        if (isset($type)) {
            $method = TypeCast::METHODPREFIX . $type;

            return TypeCast::$method($this->param[$property]);
        }

        return $this->param[$property];
    }
435833
public function get($key, $default = null, $mode = self::HAS_ISSET)
    {
        if (!$this->has($key, $mode)) {
            return $default;
        }

        $key = $this->normalizeKey($key);

        return $this->data[$key];
    }
806832
public function getMethodMetadata($method, $index)
    {
        if ($this->hasMethodMetadata($method, $index)) {
            return $this->methodMetadata[$method][$index];
        }

        return false;
    }
867468
public function get(string $key, string $method = null) {
		if(is_null($method)) {
			$method = self::DATA_COMBINED;
		}

		$data = null;

		switch($method) {
		case self::DATA_QUERYSTRING:
			$data = $this->queryStringParameters->get($key);
			break;

		case self::DATA_BODY:
			$data =$this->bodyParameters->get($key);
			break;

		case self::DATA_FILES:
			$data = $this->fileUploadParameters->getFile($key);
			break;

		case self::DATA_COMBINED:
			$data = $this->parameters->get($key);
			break;

		default:
			throw new InvalidInputMethodException($method);
		}

		return $data;
	}
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;
    }
920339
public function action($mode, $args = [])
    {
        if (!$this->persistence) {
            throw new Exception(['action() requires model to be associated with db']);
        }

        if (!$this->persistence->hasMethod('action')) {
            throw new Exception('Persistence does not support action()');
        }

        return $this->persistence->action($this, $mode, $args);
    }
141139
public function getMappedMethod($method)
    {
        // Check if the method called is provided in the mapping.
        if (!array_key_exists($method, self::$validatorMapping)) {
            throw new Exception(sprintf(
                'Mapping for method "%s" not found, make sure it exists in the mapping file.',
                $method
            ));
        }

        return self::$validatorMapping[$method];
    }
310920
public function get($property)
    {
        return isset($this->data[$property]) ? $this->data[$property] : null;
    }
961147
protected function getPersonBy($mode, $value)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        switch ($mode) {
            case 'email':
                $query = '
                SELECT
                    person.`id`,
                    person.`name`,
                    person.`username`,
                    email.`email`
                  FROM ' . Database::TABLE_EMAIL . ' email
                  INNER JOIN ' . Database::TABLE_PERSON . ' person ON (
                    email.`person` = person.`id`
                  )
                  WHERE email.`email` = :value';
                break;
            case 'username':
                $query = 'SELECT `id`, `name`, `username`
                  FROM ' . Database::TABLE_PERSON . '
                  WHERE `username` = :value';
                break;
            case 'name':
                $query = 'SELECT `id`, `name`, `username`
                  FROM ' . Database::TABLE_PERSON . '
                  WHERE `name` = :value';
                break;
            default:
                throw new \Exception('Wrong mode selected!', 1363897547);
        }

        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':value', $value, \PDO::PARAM_STR);
        $executeResult = $statement->execute();

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult);
        return $statement->fetch(\PDO::FETCH_ASSOC);
    }
376134
public function fetch($query, $mode)
    {
        $context = $this->getCommandContext();
        $context->mode = $mode;
        $context->query = $query;
        $context->repository = $query->getRepository();

        if ($this->getCommandChain()->run('before.fetch', $context) !== false) {
            $modes = array(
                    AnDomain::FETCH_ROW => AnDatabase::FETCH_ARRAY,
                    AnDomain::FETCH_ROW_LIST => AnDatabase::FETCH_ARRAY_LIST,
                    AnDomain::FETCH_ENTITY => AnDatabase::FETCH_ARRAY,
                    AnDomain::FETCH_ENTITY_SET => AnDatabase::FETCH_ARRAY_LIST,
                    AnDomain::FETCH_ENTITY_LIST => AnDatabase::FETCH_ARRAY_LIST,
                    AnDomain::FETCH_VALUE => AnDatabase::FETCH_FIELD,
                    AnDomain::FETCH_VALUE_LIST => AnDatabase::FETCH_FIELD_LIST,
            );

            $mode = $modes[$mode];

            $context['data'] = $this->_adapter->select(to_str($query), $mode);

            $this->getCommandChain()->run('after.fetch', $context);
        }

        return $context->data;
    }