<commit_before><?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 * Description of latticeviews
 *
 * @author deepwinter1
 */
class latticeviews {
   
   private static $initialObject = NULL;


   public static function createView($objectidorslug){
      
      
      if(!is_object($objectidorslug)){
         $object = Graph::object($objectidorslug);
      } else {
         $object = $objectidorslug;
      }
      if(!self::$initialObject){
         self::$initialObject = $object;
      }
      
      
      
		//some access control<commit_msg>Added an exception for createView, when called with an object that is not loaded<commit_after><?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 * Description of latticeviews
 *
 * @author deepwinter1
 */
class latticeviews {
   
   private static $initialObject = NULL;


   public static function createView($objectidorslug){
      
      
      if(!is_object($objectidorslug)){
         $object = Graph::object($objectidorslug);
      } else {
         $object = $objectidorslug;
      }
			if(!$object->loaded()){
				throw new Kohana_Exception('Trying to create view, but object is not loaded: $objectidorslug '.$object->slug);
			}
      if(!self::$initialObject){
         self::$initialObject = $object;
      }
      
      
      
		//some access control
{'fraction_non_alphanumeric': 0.11180555555555556, 'fraction_numerical': 0.001388888888888889, 'mean_word_length': 2.531862745098039, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '914831', 'n_tokens_mistral': 428, 'n_tokens_neox': 418, 'n_words': 110}