} elseif ($val instanceof $keyType) { $this->$key = $val; } else { $this->$key = new $keyType($val); } unset($array[$key]); } elseif (property_exists($this, $key)) { $this->$key = $val; unset($array[$key]); } elseif (property_exists($this, $camelKey = $this->camelCase($key))) { // This checks if property exists as camelCase, leaving it in array as snake_case // in case of backwards compatibility issues. $this->$camelKey = $val; } } $this->modelData = $array; } /** * Blank initialiser to be used in subclasses to do post-construction initialisation - this * avoids the need for subclasses to have to implement the variadics handling in their * constructors. */ protected function gapiInit() { return; } /** * Create a simplified object suitable for straightforward * conversion to JSON. This is relatively expensive * due to the usage of reflection, but shouldn't be called * a whole lot, and is the most straightforward way to filter. */ public function toSimpleObject() { $object = new stdClass(); // Process all other data. foreach ($this->modelData as $key => $val) { $result = $this->getSimpleValue($val); if ($result !== null) { $object->$key = $this->nullPlaceholderCheck($result); } } // Process all public properties. $reflect = new ReflectionObject($this); $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); foreach ($props as $member) { $name = $member->getName(); $result = $this->getSimpleValue($this->$name); if ($result !== null) { $name = $this->getMappedName($name); $object->$name = $this->nullPlaceholderCheck($result); } } return $object; } /** * Handle different types of values, primarily * other objects and map and array data types. */ private function getSimpleValue($value) { if ($value instanceof Model) { return $value->toSimpleObject(); } elseif (is_array($value)) { $return = []; foreach ($value as $key => $a_value) { $a_value = $this->getSimpleValue($a_value); if ($a_value !== null) { $key = $this->getMappedName($key); $return[$key] = $this->nullPlaceholderCheck($a_value); } } return $return; } return $value; } /** * Check whether the value is the null placeholder and return true null. */ private function nullPlaceholderCheck($value) { if ($value === self::NULL_VALUE) { return null; } return $value; } /** * If there is an internal name mapping, use that. */ private function getMappedName($key) { if (isset($this->internal_gapi_mappings, $this->internal_gapi_mappings[$key])) { $key = $this->internal_gapi_mappings[$key]; } return $key; } /** * Returns true only if the array is associative. * @param array $array * @return bool True if the array is associative. */ protected function isAssociativeArray($array) { if (!is_array($array)) { return false; } $keys = array_keys($array); foreach ($keys as $key) { if (is_string($key)) { return true; } } return false; } /** * Verify if $obj is an array. * @throws \Google\Exception Thrown if $obj isn't an array. * @param array $obj Items that should be validated. * @param string $method Method expecting an array as an argument. */ public function assertIsArray($obj, $method) { if ($obj && !is_array($obj)) { throw new GoogleException( "Incorrect parameter type passed to $method(). Expected an array." ); } } /** @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->$offset) || isset($this->modelData[$offset]); } /** @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->$offset) ? $this->$offset : $this->__get($offset); } /** @return void */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (property_exists($this, $offset)) { $this->$offset = $value; } else { $this->modelData[$offset] = $value; $this->processed[$offset] = true; } } /** @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->modelData[$offset]); } protected function keyType($key) { $keyType = $key . "Type"; // ensure keyType is a valid class if (property_exists($this, $keyType) && $this->$keyType !== null && class_exists($this->$keyType)) { return $this->$keyType; } } protected function dataType($key) { $dataType = $key . "DataType"; if (property_exists($this, $dataType)) { return $this->$dataType; } } public function __isset($key) { return isset($this->modelData[$key]); } public function __unset($key) { unset($this->modelData[$key]); } /** * Convert a string to camelCase * @param string $value * @return string */ private function camelCase($value) { $value = ucwords(str_replace(['-', '_'], ' ', $value)); $value = str_replace(' ', '', $value); $value[0] = strtolower($value[0]); return $value; } }
Warning: Class "Google\Model" not found in /htdocs/wp-content/plugins/penci-ga-views/google-api/src/aliases.php on line 32
} elseif ($val instanceof $keyType) { $this->$key = $val; } else { $this->$key = new $keyType($val); } unset($array[$key]); } elseif (property_exists($this, $key)) { $this->$key = $val; unset($array[$key]); } elseif (property_exists($this, $camelKey = $this->camelCase($key))) { // This checks if property exists as camelCase, leaving it in array as snake_case // in case of backwards compatibility issues. $this->$camelKey = $val; } } $this->modelData = $array; } /** * Blank initialiser to be used in subclasses to do post-construction initialisation - this * avoids the need for subclasses to have to implement the variadics handling in their * constructors. */ protected function gapiInit() { return; } /** * Create a simplified object suitable for straightforward * conversion to JSON. This is relatively expensive * due to the usage of reflection, but shouldn't be called * a whole lot, and is the most straightforward way to filter. */ public function toSimpleObject() { $object = new stdClass(); // Process all other data. foreach ($this->modelData as $key => $val) { $result = $this->getSimpleValue($val); if ($result !== null) { $object->$key = $this->nullPlaceholderCheck($result); } } // Process all public properties. $reflect = new ReflectionObject($this); $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); foreach ($props as $member) { $name = $member->getName(); $result = $this->getSimpleValue($this->$name); if ($result !== null) { $name = $this->getMappedName($name); $object->$name = $this->nullPlaceholderCheck($result); } } return $object; } /** * Handle different types of values, primarily * other objects and map and array data types. */ private function getSimpleValue($value) { if ($value instanceof Model) { return $value->toSimpleObject(); } elseif (is_array($value)) { $return = []; foreach ($value as $key => $a_value) { $a_value = $this->getSimpleValue($a_value); if ($a_value !== null) { $key = $this->getMappedName($key); $return[$key] = $this->nullPlaceholderCheck($a_value); } } return $return; } return $value; } /** * Check whether the value is the null placeholder and return true null. */ private function nullPlaceholderCheck($value) { if ($value === self::NULL_VALUE) { return null; } return $value; } /** * If there is an internal name mapping, use that. */ private function getMappedName($key) { if (isset($this->internal_gapi_mappings, $this->internal_gapi_mappings[$key])) { $key = $this->internal_gapi_mappings[$key]; } return $key; } /** * Returns true only if the array is associative. * @param array $array * @return bool True if the array is associative. */ protected function isAssociativeArray($array) { if (!is_array($array)) { return false; } $keys = array_keys($array); foreach ($keys as $key) { if (is_string($key)) { return true; } } return false; } /** * Verify if $obj is an array. * @throws \Google\Exception Thrown if $obj isn't an array. * @param array $obj Items that should be validated. * @param string $method Method expecting an array as an argument. */ public function assertIsArray($obj, $method) { if ($obj && !is_array($obj)) { throw new GoogleException( "Incorrect parameter type passed to $method(). Expected an array." ); } } /** @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->$offset) || isset($this->modelData[$offset]); } /** @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->$offset) ? $this->$offset : $this->__get($offset); } /** @return void */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (property_exists($this, $offset)) { $this->$offset = $value; } else { $this->modelData[$offset] = $value; $this->processed[$offset] = true; } } /** @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->modelData[$offset]); } protected function keyType($key) { $keyType = $key . "Type"; // ensure keyType is a valid class if (property_exists($this, $keyType) && $this->$keyType !== null && class_exists($this->$keyType)) { return $this->$keyType; } } protected function dataType($key) { $dataType = $key . "DataType"; if (property_exists($this, $dataType)) { return $this->$dataType; } } public function __isset($key) { return isset($this->modelData[$key]); } public function __unset($key) { unset($this->modelData[$key]); } /** * Convert a string to camelCase * @param string $value * @return string */ private function camelCase($value) { $value = ucwords(str_replace(['-', '_'], ' ', $value)); $value = str_replace(' ', '', $value); $value[0] = strtolower($value[0]); return $value; } }
Warning: Class "Google\Collection" not found in /htdocs/wp-content/plugins/penci-ga-views/google-api/src/aliases.php on line 32

Fatal error: Uncaught Error: Class "Google\Model" not found in /htdocs/wp-content/plugins/penci-ga-views/google-api/src/Collection.php:10 Stack trace: #0 /htdocs/wp-content/plugins/elementor/vendor/composer/ClassLoader.php(576): include() #1 /htdocs/wp-content/plugins/elementor/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/htdocs/wp-cont...') #2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Google\\Collecti...') #3 /htdocs/wp-content/plugins/penci-ga-views/google-api/src/aliases.php(32): class_alias('Google\\Collecti...', 'Google_Collecti...') #4 /htdocs/wp-content/plugins/penci-ga-views/google-api/vendor/composer/autoload_real.php(41): require('/htdocs/wp-cont...') #5 /htdocs/wp-content/plugins/penci-ga-views/google-api/vendor/composer/autoload_real.php(45): {closure}('a8d3953fd995940...', '/htdocs/wp-cont...') #6 /htdocs/wp-content/plugins/penci-ga-views/google-api/vendor/autoload.php(25): ComposerAutoloaderInitf4d1a427d9ee01217ccf8dd65ee36eea::getLoader() #7 /htdocs/wp-content/plugins/penci-ga-views/api.php(2): require_once('/htdocs/wp-cont...') #8 /htdocs/wp-content/plugins/penci-ga-views/penci-ga-views.php(48): require_once('/htdocs/wp-cont...') #9 /htdocs/wp-settings.php(545): include_once('/htdocs/wp-cont...') #10 /htdocs/wp-config.php(101): require_once('/htdocs/wp-sett...') #11 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #12 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #13 /htdocs/index.php(17): require('/htdocs/wp-blog...') #14 {main} thrown in /htdocs/wp-content/plugins/penci-ga-views/google-api/src/Collection.php on line 10