LazyRecord\Schema\SchemaCollection::count PHP Method

count() public method

public count ( )
    public function count()
    {
        return count($this->schemas);
    }

Usage Example

 public function testCountable()
 {
     $collection = new SchemaCollection(['\\TestApp\\Model\\UserSchema', '\\TestApp\\Model\\IDNumberSchema', '\\TestApp\\Model\\NameSchema', '\\AuthorBooks\\Model\\AddressSchema', '\\AuthorBooks\\Model\\BookSchema', '\\AuthorBooks\\Model\\AuthorSchema', '\\AuthorBooks\\Model\\AuthorBookSchema', '\\AuthorBooks\\Model\\PublisherSchema']);
     $this->assertEquals(8, $collection->count());
 }