protected function getPrimaryConstraint($force = false)
    {
        if ($this->primary_constraint === null || $force) {
            $this->primary_constraint = null;
            if (array_key_exists('constraints', $this->storage_descriptor)) {
                foreach ($this->storage_descriptor['constraints'] as $constraint) {
                    if (is_array($constraint) &&
                        array_key_exists('primary', $constraint) &&
                        $constraint['primary'] === true
                    ) {
                        $this->primary_constraint = $constraint;
                        break;
                    }
                }
            }
        }

        return $this->primary_constraint;
    }
protected function getPrimaryConstraint($force = false)
    {
        if ($this->primary_constraint === null || $force) {
            $this->primary_constraint = null;
            if (array_key_exists('constraints', $this->storage_descriptor)) {
                foreach ($this->storage_descriptor['constraints'] as $constraint) {
                    if (is_array($constraint) &&
                        array_key_exists('primary', $constraint) &&
                        $constraint['primary'] === true
                    ) {
                        $this->primary_constraint = $constraint;
                        break;
                    }
                }
            }
        }

        return $this->primary_constraint;
    }
protected function getPrimaryConstraint ( $ force = false ) { if ( $ this -> primary_constraint === null || $ force ) { $ this -> primary_constraint = null ; if ( array_key_exists ( 'constraints' , $ this -> storage_descriptor ) ) { foreach ( $ this -> storage_descriptor [ 'constraints' ] as $ constraint ) { if ( is_array ( $ constraint ) && array_key_exists ( 'primary' , $ constraint ) && $ constraint [ 'primary' ] === true ) { $ this -> primary_constraint = $ constraint ; break ; } } } } return $ this -> primary_constraint ; }
Gets the Primary Constraint array fragment of the descriptor.
This method is protected to prevent to expose the array to public accesses.
@param bool $force If true, forces to update the Primary Constraint from the Storage main descriptor.
@return array Returns the array fragment that describes the Primary Constraint.
Gets the Primary Constraint array fragment of the descriptor . This method is protected to prevent to expose the array to public accesses .